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.
+## is that they look like [MAJOR.MINOR.PATCH~]MAJOR.MINOR.PATCH[.BPB]
+## [-N-gHEX[+]]. ASDF insists on simple numeric things separated by dots.
+## If there's no interim-version thing on the front or 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#*-}
+ case $ver in
+ *~*) pre=${ver%%~*}. tail=${ver#*~} ;;
+ *) pre= tail=$ver ;;
+ esac
+ base=${tail%%-*} tail=${tail#*-}
n=${tail%%-*} tail=${tail#*-g}
- case $tail in *+) grubby=.1 tail=${tail%+} ;; *) grubby= ;; esac
+ case $tail in *+) grubby=.0.1 tail=${tail%+} ;; *) grubby= ;; esac
rev=$(( 0x$tail ))
- ASDF_VERSION=$base.0.0.$n.$rev$grubby
+ ASDF_VERSION=$pre$base.0.0.$n.$rev$grubby
;;
*)
ASDF_VERSION=$ver
dnl--------------------------------------------------------------------------
dnl Common Lisp things.
-AC_ARG_WITH([lisp-system],
- [AS_HELP_STRING([--with-lisp-system=SYSTEMS],
- [preference order of cl-launch Lisp systems])],
- [], [with_lisp_system="sbcl clisp"])
+WORKING_LISPS="sbcl,clisp,ecl"; AC_SUBST([WORKING_LISPS])
-AC_CHECK_PROGS([CL_LAUNCH], [cl-launch], [not-found])
-case "$CL_LAUNCH" in
- not-found) AC_MSG_ERROR([\`cl-launch' not found]) ;;
+AC_CHECK_PROGS([RUNLISP], [runlisp], [not-found])
+case "$RUNLISP" in
+ not-found) AC_MSG_ERROR([\`runlisp' not found]) ;;
esac
-AC_MSG_CHECKING([for best choice of Lisp system])
-if ! LISPSYS=$($CL_LAUNCH -l "$with_lisp_system" \
- -ip '(string-downcase (lisp-implementation-type))'); then
- AC_MSG_ERROR([cl-launch didn't like any Lisp system])
-fi
-AC_SUBST([LISPSYS])
-AC_MSG_RESULT([$LISPSYS])
-
AC_MSG_CHECKING([FASL file extension])
-fasl=$($CL_LAUNCH -l $LISPSYS -ip \
- '(pathname-type (compile-file-pathname "foo.lisp"))')
+fasl=$($RUNLISP -L$WORKING_LISPS -e \
+ '(format t "~A~%"
+ (pathname-type (compile-file-pathname "foo.lisp")))')
AC_SUBST([fasl])
AC_MSG_RESULT([.$fasl])
dnl Make sure the TeX programs we need are available.
case $sod_have_latex in maybe)
+AC_CHECK_PROGS([TEX], [tex], [none])
AC_CHECK_PROGS([PDFLATEX], [pdflatex], [none])
AC_CHECK_PROGS([KPSEWHICH], [kpsewhich], [none])
AC_CHECK_PROGS([BIBTEX], [bibtex], [none])
AC_CHECK_PROGS([MAKEINDEX], [makeindex], [none])
-case ,$PDFLATEX,$KPSEWHICH,$BIBTEX,$MAKEINDX, in
+case ,$TEX,$PDFLATEX,$KPSEWHICH,$BIBTEX,$MAKEINDX, in
*,none,*)
AC_MSG_WARN([Necessary TeX programs not found: can't build manual!])
sod_have_latex=no
esac
;; esac
+sod_have_custom_bib=no
case $sod_have_latex in maybe)
SOD_CHECK_LATEX_FILE([strayman.cls], [], [sod_have_latex=no])
SOD_CHECK_LATEX_FILE([fontenc.sty], [], [sod_have_latex=no])
SOD_CHECK_LATEX_FILE([phvb8r.tfm], [], [sod_have_latex=no])
SOD_CHECK_LATEX_FILE([pcrr8rn.tfm], [], [sod_have_latex=no])
+SOD_CHECK_LATEX_FILE([merlin.mbs], [sod_have_custom_bib=yes], [:])
+
case $sod_have_latex in
no)
AC_MSG_WARN([Necessary LaTeX packages not found: can't build manual!])
;;
esac
AM_CONDITIONAL([HAVE_LATEX], [test "$sod_have_latex" = "yes"])
+AM_CONDITIONAL([HAVE_CUSTOM_BIB], [test "$sod_have_custom_bib" = "yes"])
dnl--------------------------------------------------------------------------
dnl Output.
AC_CONFIG_FILES(
[Makefile]
+ [common/Makefile]
[src/Makefile]
[lib/Makefile]
[doc/Makefile]