1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2024-12-22 23:47:56 +01:00

- added support for ECL in autotools scripts.

This commit is contained in:
cage 2022-03-19 17:38:51 +01:00
parent d3546ed781
commit 4e00e3a7c8
4 changed files with 86 additions and 66 deletions

View File

@ -57,11 +57,14 @@ scripts/welcome-bot.lisp
dist_man1_MANS = doc/tinmop.man
$(PACKAGE): $(CONF_PATH_FILE) *.asd src/*
$(LISP_COMPILER) \
--eval "(asdf:load-system '$(PACKAGE))" \
--eval "(in-package main)" \
--eval "(sb-ext:save-lisp-and-die \"$(PACKAGE)\" :toplevel 'main::main :executable t :purify t :save-runtime-options t)"
if test "$(LISP_COMPILER)" = "sbcl"; then \
$(LISP_COMPILER) \
--eval "(asdf:load-system '$(PACKAGE))" \
--eval "(in-package main)" \
--eval "(sb-ext:save-lisp-and-die \"$(PACKAGE)\" :toplevel 'main::main :executable t :purify t :save-runtime-options t)"; \
else \
$(LISP_COMPILER) --eval "(asdf:make-build :tinmop :type :program :move-here #P\"./\" :epilogue-code '(main::main))"; \
fi
$(CONF_PATH_FILE):
grep "^;" $(CONF_PATH_FILE_IN) > $(CONF_PATH_FILE)
echo -e "(in-package :config)\n" >> $(CONF_PATH_FILE);

View File

@ -305,6 +305,7 @@ LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LISP_COMPILER = @LISP_COMPILER@
LISP_COMPILER_ECL = @LISP_COMPILER_ECL@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
@ -1047,11 +1048,14 @@ uninstall-man: uninstall-man1
$(PACKAGE): $(CONF_PATH_FILE) *.asd src/*
$(LISP_COMPILER) \
--eval "(asdf:load-system '$(PACKAGE))" \
--eval "(in-package main)" \
--eval "(sb-ext:save-lisp-and-die \"$(PACKAGE)\" :toplevel 'main::main :executable t :purify t :save-runtime-options t)"
if test "$(LISP_COMPILER)" = "sbcl"; then \
$(LISP_COMPILER) \
--eval "(asdf:load-system '$(PACKAGE))" \
--eval "(in-package main)" \
--eval "(sb-ext:save-lisp-and-die \"$(PACKAGE)\" :toplevel 'main::main :executable t :purify t :save-runtime-options t)"; \
else \
$(LISP_COMPILER) --eval "(asdf:make-build :tinmop :type :program :move-here #P\"./\" :epilogue-code '(main::main))"; \
fi
$(CONF_PATH_FILE):
grep "^;" $(CONF_PATH_FILE_IN) > $(CONF_PATH_FILE)
echo -e "(in-package :config)\n" >> $(CONF_PATH_FILE);

93
configure vendored
View File

@ -630,6 +630,7 @@ MAN
UNZIP
GPG
CURL
LISP_COMPILER_ECL
LISP_COMPILER
POSUB
LTLIBINTL
@ -756,7 +757,6 @@ with_gnu_ld
enable_rpath
with_libiconv_prefix
with_libintl_prefix
enable_check_sbcl_version
'
ac_precious_vars='build_alias
host_alias
@ -1402,8 +1402,6 @@ Optional Features:
--disable-dependency-tracking
speeds up one-time build
--disable-rpath do not hardcode runtime library paths
--disable-check-sbcl-version
Disable checks for minimum supported SBCL version
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -7013,8 +7011,8 @@ printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
# Extract the first word of "sbcl", so it can be a program name with args.
set dummy sbcl; ac_word=$2
# Extract the first word of "asbcl", so it can be a program name with args.
set dummy asbcl; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_LISP_COMPILER+y}
@ -7060,9 +7058,63 @@ fi
if test "$LISP_COMPILER" = "no" ; then
as_fn_error $? "Can not find SBCL, Common Lisp compiler." "$LINENO" 5
# Extract the first word of "ecl", so it can be a program name with args.
set dummy ecl; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_LISP_COMPILER_ECL+y}
then :
printf %s "(cached) " >&6
else $as_nop
case $LISP_COMPILER_ECL in
[\\/]* | ?:[\\/]*)
ac_cv_path_LISP_COMPILER_ECL="$LISP_COMPILER_ECL" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_path_LISP_COMPILER_ECL="$as_dir$ac_word$ac_exec_ext"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_LISP_COMPILER_ECL" && ac_cv_path_LISP_COMPILER_ECL="no"
;;
esac
fi
LISP_COMPILER_ECL=$ac_cv_path_LISP_COMPILER_ECL
if test -n "$LISP_COMPILER_ECL"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LISP_COMPILER_ECL" >&5
printf "%s\n" "$LISP_COMPILER_ECL" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
if test "$LISP_COMPILER" = "no" ; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can not find SBCL, Common Lisp compiler." >&5
printf "%s\n" "$as_me: WARNING: Can not find SBCL, Common Lisp compiler." >&2;};
else
if test "$LISP_COMPILER" = "no" ; then
as_fn_error $? "Can not find ECL, Common Lisp compiler." "$LINENO" 5;
fi
fi
LISP_COMPILER=$LISP_COMPILER_ECL;
# Extract the first word of "curl", so it can be a program name with args.
set dummy curl; ac_word=$2
@ -7564,33 +7616,6 @@ fi
SBCL_MIN_VERSION="1.4.16";
SBCL_VERSION=`${LISP_COMPILER} --version | ${AWK} -- '// {print $2}'`
# Check whether --enable-check-sbcl-version was given.
if test ${enable_check_sbcl_version+y}
then :
enableval=$enable_check_sbcl_version;
fi
if test "$enable_check_sbcl_version" = "yes" || test "$enable_check_sbcl_version" = "" ; then
SBCL_VERSION_OK=`echo "$SBCL_VERSION $SBCL_MIN_VERSION" | ${AWK} -f compare_version.awk`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler is too old" >&5
printf %s "checking if the compiler is too old... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: To Disable this test type: './configure --disable-check-sbcl-version." >&5
printf "%s\n" "$as_me: To Disable this test type: './configure --disable-check-sbcl-version." >&6;}
if test "$SBCL_VERSION_OK" = "1" ; then
as_fn_error $? "Lisp compiler too old, $SBCL_MIN_VERSION is the oldest supported." "$LINENO" 5
exit 1;
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: version is not too old" >&5
printf "%s\n" "version is not too old" >&6; }
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_get_version in -lssl" >&5
printf %s "checking for SSL_get_version in -lssl... " >&6; }

View File

@ -41,12 +41,20 @@ fi
AM_GNU_GETTEXT([external])
AC_PATH_PROG([LISP_COMPILER],[sbcl],[no])
AC_PATH_PROG([LISP_COMPILER],[asbcl],[no])
AC_PATH_PROG([LISP_COMPILER_ECL],[ecl],[no])
if test "$LISP_COMPILER" = "no" ; then
AC_MSG_ERROR([Can not find SBCL, Common Lisp compiler.])
AC_MSG_WARN([Can not find SBCL, Common Lisp compiler.]);
else
if test "$LISP_COMPILER" = "no" ; then
AC_MSG_ERROR([Can not find ECL, Common Lisp compiler.]);
fi
fi
LISP_COMPILER=$LISP_COMPILER_ECL;
AC_PATH_PROG([CURL],[curl],[no])
if test "$CURL" = "no" ; then
@ -116,26 +124,6 @@ fi
AC_PROG_MKDIR_P
dnl check sbcl version
SBCL_MIN_VERSION="1.4.16";
SBCL_VERSION=`${LISP_COMPILER} --version | ${AWK} -- '// {print $2}'`
AC_ARG_ENABLE([check-sbcl-version], [AS_HELP_STRING([--disable-check-sbcl-version], [Disable checks for minimum supported SBCL version])], [], [])
if test "$enable_check_sbcl_version" = "yes" || test "$enable_check_sbcl_version" = "" ; then
SBCL_VERSION_OK=`echo "$SBCL_VERSION $SBCL_MIN_VERSION" | ${AWK} -f compare_version.awk`
AC_MSG_CHECKING([if the compiler is too old])
AC_MSG_NOTICE([To Disable this test type: './configure --disable-check-sbcl-version.])
if test "$SBCL_VERSION_OK" = "1" ; then
AC_MSG_ERROR([Lisp compiler too old, $SBCL_MIN_VERSION is the oldest supported.])
exit 1;
else
AC_MSG_RESULT([version is not too old])
fi
fi
dnl checks for libraries
AC_CHECK_LIB([ssl], [SSL_get_version], [], AC_MSG_ERROR([Can not find libssl.]))