aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2000-11-01 18:36:12 +0000
committerEzra Peisach <epeisach@mit.edu>2000-11-01 18:36:12 +0000
commit3e1820b10eb88aa0380a0167b1762aeb2e667ba7 (patch)
tree3630cc3abf5514a316c3b133e409a6181fc60152 /src/util
parent32428cbe50c656d353b9236b11d2296dd84bacf2 (diff)
downloadkrb5-3e1820b10eb88aa0380a0167b1762aeb2e667ba7.zip
krb5-3e1820b10eb88aa0380a0167b1762aeb2e667ba7.tar.gz
krb5-3e1820b10eb88aa0380a0167b1762aeb2e667ba7.tar.bz2
* reconf: Rework syntax to detect version numbers of newer
autoconf versions. For autoconf > 2.19, we need to pass an absolute path for the localdir to autoreconf. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12846 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
-rw-r--r--src/util/ChangeLog6
-rw-r--r--src/util/reconf31
2 files changed, 30 insertions, 7 deletions
diff --git a/src/util/ChangeLog b/src/util/ChangeLog
index 9665b68..1b696f8 100644
--- a/src/util/ChangeLog
+++ b/src/util/ChangeLog
@@ -1,3 +1,9 @@
+2000-11-01 Ezra Peisach <epeisach@mit.edu>
+
+ * reconf: Rework syntax to detect version numbers of newer
+ autoconf versions. For autoconf > 2.19, we need to pass an
+ absolute path for the localdir to autoreconf.
+
2000-10-27 Ezra Peisach <epeisach@mit.edu>
* reconf: Pass "-m util/autoconf" to autoreconf only if we are
diff --git a/src/util/reconf b/src/util/reconf
index 78c0c9b..197db27 100644
--- a/src/util/reconf
+++ b/src/util/reconf
@@ -2,6 +2,7 @@
force=
autoreconfprog=./util/autoconf/autoreconf
+localdir=.
autoreconfoptions="-m util/autoconf"
verbose=false
@@ -23,14 +24,30 @@ do
done
# Currently (2000-10-03) we need 2.12 or later, and 2.13 is current.
-pat="version 2.1[23456789]"
+# Thie pattern also recognizes 2.40 and up.
+patb="2.(1[2-9])|([4-9][0-9])"
+
+# sedcmd1 recognizes the older 2.12 version, and sedcmd2 the newer 2.49
+sedcmd1="s,.*version \(.*\)$,\1,"
+sedcmd2="s,.*) \(.*\)$,\1,;1q"
+
if test ! -f $autoreconfprog ; then
- if autoreconf --version | grep "$pat" >/dev/null && \
- autoconf --version | grep "$pat" >/dev/null && \
- autoheader --version | grep "$pat" >/dev/null; then
+ if autoreconf --version | sed -e "$sedcmd1" -e "$sedcmd2" | egrep "$patb" >/dev/null && \
+ autoconf --version | sed -e "$sedcmd1" -e "$sedcmd2" | egrep "$patb" >/dev/null && \
+ autoheader --version | sed -e "$sedcmd1" -e "$sedcmd2" | egrep "$patb" >/dev/null; then
autoreconf=autoreconf
autoreconfoptions=
- echo "Using" `autoconf --version` "found in your path..."
+ autoconfversion=`autoconf --version | sed -e "$sedcmd1" -e "$sedcmd2"`
+ echo "Using autoconf version $autoconfversion found in your path..."
+ # Determine if localdir needs to be relative or absolute
+ case "$autoconfversion" in
+ 2.1*)
+ localdir=.
+ ;;
+ *)
+ localdir=`pwd`
+ ;;
+ esac
else
echo "Couldn't find autoconf 2.12 or higher in your path."
echo " "
@@ -42,6 +59,6 @@ if test ! -f $autoreconfprog ; then
fi
if $verbose ; then
- echo $autoreconf $autoreconfoptions -l . --verbose $force
+ echo $autoreconf $autoreconfoptions -l $localdir --verbose $force
fi
-$autoreconf $autoreconfoptions -l . --verbose $force
+$autoreconf $autoreconfoptions -l $localdir --verbose $force