diff options
author | Ken Raeburn <raeburn@mit.edu> | 2005-08-20 08:26:36 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2005-08-20 08:26:36 +0000 |
commit | f4c196b45a266fe7b00b5dd556160338248c886c (patch) | |
tree | b64a1756036b10267137e25df6fb2b9041afdc1b /src/aclocal.m4 | |
parent | 0529d3ab3802b53771184d7dc8b88b568ef914f2 (diff) | |
download | krb5-f4c196b45a266fe7b00b5dd556160338248c886c.zip krb5-f4c196b45a266fe7b00b5dd556160338248c886c.tar.gz krb5-f4c196b45a266fe7b00b5dd556160338248c886c.tar.bz2 |
* 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
Diffstat (limited to 'src/aclocal.m4')
-rw-r--r-- | src/aclocal.m4 | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 67c6e97..c02426b 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)]) |