chiark / gitweb /
src/method-impl.lisp: Initialize `suppliedp' flags properly.
[sod] / configure.ac
index 264bef26119550efd9c9b612ddc7334d58c86d39..75bed26171a0adf60bfdfe720e29890d01dfd37f 100644 (file)
@@ -7,7 +7,7 @@ dnl
 
 dnl----- Licensing notice ---------------------------------------------------
 dnl
-dnl This file is part of the Sensble Object Design, an object system for C.
+dnl This file is part of the Sensible Object Design, an object system for C.
 dnl
 dnl SOD is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
@@ -38,6 +38,32 @@ AM_PROG_LIBTOOL
 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.
 
@@ -79,7 +105,12 @@ 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]
+  [doc/Makefile]
+  [test/Makefile])
 AC_OUTPUT
 
 dnl----- That's all, folks --------------------------------------------------