From 72d8f8901985324b50a9b8c255170ec08f9b7eea Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Thu, 14 Nov 2002 04:43:25 +0000 Subject: [PATCH] Invoke autoconf/autoreconf with the option --localdir or --include depending on if pre/post autoconf 2.54. In 2.55 --localdir has been removed and replaced with --include which was introduced in 2.53. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14996 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ChangeLog | 6 ++++++ src/aclocal.m4 | 4 ++++ src/config/ChangeLog | 7 +++++++ src/config/post.in | 2 +- src/config/pre.in | 1 + src/util/ChangeLog | 5 +++++ src/util/reconf | 18 ++++++++++++++++-- 7 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bb2bf7919..79910614b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2002-11-13 Ezra Peisach + + * aclocal.m4 (CONFIG_RULES): Define AUTOCONFINCFLAGS as --include + or --localdir depending on autoconf version. In autoconf 2.55 + --localdir disappears. + 2002-11-12 Tom Yu * aclocal.m4 (tcl_lib): Add RPATH_TAIL to TCL_RPATH to handle AIX diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 8a4099cd5..9223bfcd1 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -81,9 +81,13 @@ dnl else AUTOCONFFLAGS= AUTOHEADER=autoheader AUTOHEADERFLAGS= +dnl Autoconf 2.54+ use --include, --localdir is obsolete and removed +ifdef([AC_MSG_FAILURE], AUTOCONFINCFLAGS="--include", dnl + AUTOCONFINCFLAGS="--localdir") dnl fi AC_SUBST(AUTOCONF) AC_SUBST(AUTOCONFFLAGS) +AC_SUBST(AUTOCONFINCFLAGS) AC_SUBST(AUTOHEADER) AC_SUBST(AUTOHEADERFLAGS) dnl diff --git a/src/config/ChangeLog b/src/config/ChangeLog index c4c9e62f4..8293acad8 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,10 @@ +2002-11-13 Ezra Peisach + + * pre.in (AUTOCONFINCFLAGS): Define by configure. + + * post.in (Makefile): Invoke autoconf with AUTOCONFINCFLAGS + instead of hardcoding --localdir. + 2002-11-12 Tom Yu * shlib.conf: Fix AIX to explicitly include system libraries in diff --git a/src/config/post.in b/src/config/post.in index 5d45bf224..8972c6585 100644 --- a/src/config/post.in +++ b/src/config/post.in @@ -96,7 +96,7 @@ $(srcdir)/$(thisconfigdir)/configure: $(srcdir)/$(thisconfigdir)/configure.in \ $(SRCTOP)/aclocal.m4 -$(RM) -r $(srcdir)/$(thisconfigdir)/autom4te.cache cd $(srcdir)/$(thisconfigdir) && \ - $(AUTOCONF) --localdir=$(CONFIG_RELTOPDIR) $(AUTOCONFFLAGS) + $(AUTOCONF) ${AUTOCONFINCFLAGS}=$(CONFIG_RELTOPDIR) $(AUTOCONFFLAGS) -$(RM) -r $(srcdir)/$(thisconfigdir)/autom4te.cache RECURSE_TARGETS=all-recurse clean-recurse distclean-recurse install-recurse \ diff --git a/src/config/pre.in b/src/config/pre.in index 01d4b1ef5..ff162ccc9 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -173,6 +173,7 @@ LEXLIB = @LEXLIB@ YACC = @YACC@ AUTOCONF = @AUTOCONF@ AUTOCONFFLAGS = @AUTOCONFFLAGS@ +AUTOCONFINCFLAGS = @AUTOCONFINCFLAGS@ AUTOHEADER = @AUTOHEADER@ AUTOHEADERFLAGS = @AUTOHEADERFLAGS@ diff --git a/src/util/ChangeLog b/src/util/ChangeLog index 82e36c08a..659661dc3 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,3 +1,8 @@ +2002-11-13 Ezra Peisach + + * reconf: For pre autoconf 2.54 - invoke autoreconf with -l for + localdir. Posr 2.54 use the -I option. + 2002-09-27 Tom Yu * depgen.sed: Solaris sed doesn't like '\(^.*$\)'; replace it with diff --git a/src/util/reconf b/src/util/reconf index 48ebb30f4..c24627203 100644 --- a/src/util/reconf +++ b/src/util/reconf @@ -5,6 +5,7 @@ autoreconfprog=autoreconf localdir=. autoreconfoptions="" verbose=false +localdirarg= autoreconf="/bin/sh $autoreconfprog" @@ -74,6 +75,19 @@ if autoreconf --version | sed -e "$sedcmd1" -e "$sedcmd2" | egrep "$patb" >/dev/ *) ;; esac + + # Determine the proper argument to autoreconf + case "$autoconfversion" in + 2.1*) + localdirarg="-l" + ;; + 2.5[23]) + localdirarg="-l" + ;; + *) + localdirarg="-I" + ;; + esac else echo "Couldn't find autoconf 2.13 or higher in your path." echo " " @@ -82,9 +96,9 @@ else fi if $verbose ; then - echo $autoreconf $autoreconfoptions -l $localdir --verbose $force + echo $autoreconf $autoreconfoptions $localdirarg $localdir --verbose $force fi -$autoreconf $autoreconfoptions -l $localdir --verbose $force || exit 1 +$autoreconf $autoreconfoptions $localdirarg $localdir --verbose $force || exit 1 if test $? = 0 ; then if test ! -d include/krb5/autoconf.stmp ; then cp /dev/null include/krb5/autoconf.stmp -- 2.26.2