From: Ken Raeburn Date: Sat, 20 Aug 2005 08:26:36 +0000 (+0000) Subject: * aclocal.m4 (PL_KRB5_MAJOR_RELEASE, PL_KRB5_MINOR_RELEASE, PL_KRB5_PATCHLEVEL, X-Git-Tag: ms-bug-test-20060525~166 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f4c196b45a266fe7b00b5dd556160338248c886c;p=krb5.git * aclocal.m4 (PL_KRB5_MAJOR_RELEASE, PL_KRB5_MINOR_RELEASE, PL_KRB5_PATCHLEVEL, PL_KRB5_RELTAIL): New macros, holding values extracted from patchlevel.h at autoconf time. (K5_VERSION): Define in terms of the PL_* macros. (K5_TOPDIR): If m4exit doesn't work, try builtin(m4exit,1). * configure.in: Set KRB5_VERSION from K5_VERSION, don't parse patchlevel.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17343 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index 5def3494c..b2af644ef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,14 @@ 2005-08-20 Ken Raeburn - * aclocal.m4 (K5_AC_INIT, K5_VERSION, K5_BUGADDR): New macros. - * configure.in: Use K5_AC_INIT instead of AC_INIT. + * aclocal.m4 (K5_AC_INIT, K5_BUGADDR): New macros. + (PL_KRB5_MAJOR_RELEASE, PL_KRB5_MINOR_RELEASE, PL_KRB5_PATCHLEVEL, + PL_KRB5_RELTAIL): New macros, holding values extracted from + patchlevel.h at autoconf time. + (K5_VERSION): Define in terms of the PL_* macros. + (K5_TOPDIR): If m4exit doesn't work, try builtin(m4exit,1). + + * configure.in: Use K5_AC_INIT instead of AC_INIT. Set + KRB5_VERSION from K5_VERSION, don't parse patchlevel.h. 2005-08-16 Ken Raeburn diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 67c6e970c..c02426bcb 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -21,7 +21,8 @@ ifelse(fileexists(../../aclocal.m4),YES,[../..],[dnl ifelse(fileexists(../../../aclocal.m4),YES,[../../..],[dnl ifelse(fileexists(../../../../aclocal.m4),YES,[../../../..],[dnl errprint(__file__:__line__: Cannot find path to aclocal.m4[ -])m4exit(1)UNKNOWN])])])])])) +]) m4exit(1) dnl sometimes that does not work? +builtin(m4exit,1)UNKNOWN])])])])])) dnl AC_DEFUN(V5_SET_TOPDIR,[dnl ac_reltopdir="K5_TOPDIR" @@ -42,7 +43,23 @@ fi dnl dnl Version info. dnl -define([K5_VERSION],CVS) dnl fix up later +pushdef([x],esyscmd([sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p' < ]K5_TOPDIR/patchlevel.h)) +define([PL_KRB5_MAJOR_RELEASE],regexp(x,[KRB5_MAJOR_RELEASE=\(.*\)],[\1])) +ifelse(PL_KRB5_MAJOR_RELEASE,,[errprint([Can't determine KRB5_MAJOR_RELEASE value from patchlevel.h. +]) m4exit(1) dnl sometimes that does not work? +builtin(m4exit,1)]) +define([PL_KRB5_MINOR_RELEASE],regexp(x,[KRB5_MINOR_RELEASE=\(.*\)],[\1])) +ifelse(PL_KRB5_MINOR_RELEASE,,[errprint([Can't determine KRB5_MINOR_RELEASE value from patchlevel.h. +]) m4exit(1) dnl sometimes that does not work? +builtin(m4exit,1)]) +define([PL_KRB5_PATCHLEVEL],regexp(x,[KRB5_PATCHLEVEL=\(.*\)],[\1])) +ifelse(PL_KRB5_PATCHLEVEL,,[errprint([Can't determine KRB5_PATCHLEVEL value from patchlevel.h. +]) m4exit(1) dnl sometimes that does not work? +builtin(m4exit,1)]) +define([PL_KRB5_RELTAIL],regexp(x,[KRB5_RELTAIL="\(.*\)"],[\1])) +dnl RELTAIL is allowed to not be defined. +popdef([x]) +define([K5_VERSION],PL_KRB5_MAJOR_RELEASE.PL_KRB5_MINOR_RELEASE[]ifelse(PL_KRB5_PATCHLEVEL,0,,.PL_KRB5_PATCHLEVEL)ifelse(PL_KRB5_RELTAIL,,,-PL_KRB5_RELTAIL)) define([K5_BUGADDR],krb5-bugs@mit.edu) define([K5_AC_INIT],[AC_INIT(Kerberos 5, K5_VERSION, K5_BUGADDR, krb5) AC_CONFIG_SRCDIR($1)]) diff --git a/src/configure.in b/src/configure.in index 5b79986b6..5efb8c0bc 100644 --- a/src/configure.in +++ b/src/configure.in @@ -8,18 +8,10 @@ if test "x$cache_file" = "x/dev/null"; then fi dnl CONFIG_RULES -dnl -dnl Determine version from patchlevel.h -eval `sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p' < $srcdir/patchlevel.h` -KRB5_VERSION="$KRB5_MAJOR_RELEASE.$KRB5_MINOR_RELEASE" -if test "$KRB5_PATCHLEVEL" = 0; then :; else - KRB5_VERSION="$KRB5_VERSION.$KRB5_PATCHLEVEL" -fi -if test -n "$KRB5_RELTAIL"; then - KRB5_VERSION="$KRB5_VERSION-$KRB5_RELTAIL" -fi +KRB5_VERSION=K5_VERSION AC_SUBST(KRB5_VERSION) dnl +dnl AC_REQUIRE_CPP dnl dnl The following lines are so that configure --help gives some global