citadel/configure.in extract version number from source code
authorArt Cancro <ajc@citadel.org>
Wed, 3 Jan 2018 22:55:59 +0000 (17:55 -0500)
committerArt Cancro <ajc@citadel.org>
Wed, 3 Jan 2018 22:55:59 +0000 (17:55 -0500)
citadel/citadel.h
citadel/configure.ac
libcitadel/configure.in

index 6e9e09ff3480167caeaf2f543e65548bc929b105..fea62aaa2909207792589115f9f5f2c1a0bf3114 100644 (file)
@@ -35,16 +35,6 @@ extern "C" {
  */
 #define CITADEL        PACKAGE_STRING
 
-/*
- * REV_LEVEL is the current version number (multiplied by 100 to avoid having
- * to fiddle with the decimal).  REV_MIN is the oldest version of Citadel
- * whose data files are compatible with the current version.  If the data files
- * are older than REV_MIN, none of the programs will work until the setup
- * program is run again to bring things up to date.  EXPORT_REV_MIN is the
- * oldest version of Citadel whose export files we can read.  The latter is
- * usually more strict because you're not really supposed to dump/load and
- * upgrade at the same time.
- */
 #define REV_LEVEL      917             // This version
 #define REV_MIN                591             // Oldest compatible database
 #define EXPORT_REV_MIN 760             // Oldest compatible export files
index 17a5259910debb47a673d7f2e744f5651a6a8c2f..16ad728958f06a0687637251db23914bc574c1da 100644 (file)
@@ -1,7 +1,8 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.52)
-AC_INIT([Citadel], [916], [http://www.citadel.org/])
-AC_REVISION([$Revision: 5108 $])
+
+AC_INIT([citadel],m4_esyscmd_s([grep REV_LEVEL citadel.h | sed 's/[^0-9]*//g']))
+AC_REVISION(m4_esyscmd_s([git log --pretty=%h | head -1])
 AC_CONFIG_SRCDIR([citserver.c])
 AC_CONFIG_HEADER(sysdep.h)
 AC_CONFIG_MACRO_DIR([m4])
index 933d19daf892aa661dcaf90b8f1a0daa645ae420..178d5d18385e2c8aeff33c7caaefa61b0abb2f9f 100755 (executable)
@@ -4,9 +4,7 @@ dnl
 
 dnl Ensure that libcitadel is configured with autoconf 2.52 or newer
 AC_PREREQ(2.52)
-
-AC_INIT([libcitadel], m4_esyscmd([grep LIBCITADEL_VERSION lib/libcitadel.h | sed 's/[^0-9]*//g' ]))
-
+AC_INIT([libcitadel], m4_esyscmd_s([grep LIBCITADEL_VERSION lib/libcitadel.h | sed 's/[^0-9]*//g' ]))
 AC_CONFIG_SRCDIR(Makefile.in)
 AC_CONFIG_AUX_DIR(conftools)
 AC_CONFIG_SRCDIR(tests/Makefile.in)
@@ -20,7 +18,7 @@ dnl Set LIBAGE to 0.
 dnl
 
 LIBCURRENT=4
-LIBREVISION=m4_esyscmd([grep LIBCITADEL_VERSION lib/libcitadel.h | sed 's/[^0-9]*//g' ])
+LIBREVISION=m4_esyscmd_s([grep LIBCITADEL_VERSION lib/libcitadel.h | sed 's/[^0-9]*//g' ])
 LIBAGE=0
 
 sinclude(conftools/libtool.m4)