X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/97a9a385a376202d0859ff8191858d13ec8901c2..c7a9ed3415c37906b77d77ef7e6d3e9af797b694:/configure.ac diff --git a/configure.ac b/configure.ac index 361421f..c1fed50 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,32 @@ AX_CFLAGS_WARN_ALL mdw_LIBTOOL_VERSION_INFO dnl-------------------------------------------------------------------------- +dnl Convert the version number for ASDF. + +## This is surprisingly awful. The convention for official version numbers +## is that they look like MAJOR.MINOR.PATCH[.BPB][-N-gHEX[+]]. ASDF +## insists on simple numeric things separated by dots. If there's no Git +## thing on the end, then the main version number will do fine. If there +## is, then we insert /two/ `0's in, followed by N and the HEX converted to +## decimal. Why two? Because if there's no brown-paper-bag number, we +## want to make sure that the first BPB release is higher than any of the +## preceding Git revisions. +ver=AC_PACKAGE_VERSION +case $ver in + *-*-g*) + base=${ver%%-*} tail=${ver#*-} + n=${tail%%-*} tail=${tail#*-g} + case $tail in *+) grubby=.1 tail=${tail%+} ;; *) grubby= ;; esac + rev=$(( 0x$tail )) + ASDF_VERSION=$base.0.0.$n.$rev$grubby + ;; + *) + ASDF_VERSION=$ver + ;; +esac +AC_SUBST([ASDF_VERSION]) + +dnl-------------------------------------------------------------------------- dnl Common Lisp things. AC_ARG_WITH([lisp-system], @@ -60,10 +86,10 @@ AC_SUBST([LISPSYS]) AC_MSG_RESULT([$LISPSYS]) AC_MSG_CHECKING([FASL file extension]) -FASL_TYPE=$($CL_LAUNCH -l $LISPSYS -ip \ +fasl=$($CL_LAUNCH -l $LISPSYS -ip \ '(pathname-type (compile-file-pathname "foo.lisp"))') -AC_SUBST([FASL_TYPE]) -AC_MSG_RESULT([.$FASL_TYPE]) +AC_SUBST([fasl]) +AC_MSG_RESULT([.$fasl]) AC_ARG_WITH([lisp-source-dir], [AS_HELP_STRING([--with-lisp-source-dir=DIR], @@ -79,7 +105,7 @@ AC_SUBST([lispsysdir], [$with_lisp_system_dir]) dnl-------------------------------------------------------------------------- dnl Output. -AC_CONFIG_FILES([Makefile src/Makefile lib/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile lib/Makefile test/Makefile]) AC_OUTPUT dnl----- That's all, folks --------------------------------------------------