Automatically use aclocal/automake 1.10 or 1.9 as appropriate when bootstrapping
authordpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Mon, 26 Nov 2007 16:29:01 +0000 (16:29 +0000)
committerdpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Mon, 26 Nov 2007 16:29:01 +0000 (16:29 +0000)
git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@6828 a7884b65-44f6-0310-8a51-81a127f17b15

bootstrap

index a0df9329c1fe81c58d8a2f92601da886b76357a6..3deb33d2266e67043787fde9e474843d12630350 100644 (file)
--- a/bootstrap
+++ b/bootstrap
@@ -8,7 +8,42 @@
 #
 #######################################################################
 
+# Check for aclocal 1.9/1.10
+echo "Checking aclocal..."
+RET=`type aclocal-1.10 2&>1 /dev/null || echo fail`
+if [ ! $RET ];
+then
+  ACLOCAL=aclocal-1.10
+else
+  RET=`type aclocal-1.9 2&>1 /dev/null || echo fail` 
+  if [ ! $RET ];
+  then
+    ACLOCAL=aclocal-1.9
+  else
+    echo "ERROR: this script requires aclocal-1.9 or aclocal-1.10"
+    exit 1
+  fi
+fi
+
+# Check for automake 1.9/1.10
+echo "Checking automake..."
+RET=`type automake-1.10 2&>1 /dev/null || echo fail`
+if [ ! $RET ];
+then
+  AUTOMAKE=automake-1.10
+else
+  RET=`type automake-1.9 2&>1 /dev/null || echo fail`
+  if [ ! $RET ];
+  then
+    AUTOMAKE=automake-1.9
+  else
+    echo "ERROR: this script requires automake-1.9 or automake-1.10"
+    exit 1
+  fi
+fi
+
 # Insert the version number wherever it's needed
+echo "Stamping the version number..."
 LONG_VER=`grep '#define VERSION_PACKAGE' pgadmin/include/version.h | awk '{print $3}'`
 SHORT_VER=`echo $LONG_VER | cut -d . -f1,2`
 
@@ -21,11 +56,16 @@ sed -e "s/PGADMIN_LONG_VERSION/$LONG_VER/" -e "s/PGADMIN_SHORT_VERSION/$SHORT_VE
 sed -e "s/PGADMIN_LONG_VERSION/$LONG_VER/" -e "s/PGADMIN_SHORT_VERSION/$SHORT_VER/" pkg/src/build-tarball.in > pkg/src/build-tarball
 sed -e "s/PGADMIN_LONG_VERSION/$LONG_VER/" -e "s/PGADMIN_SHORT_VERSION/$SHORT_VER/" pkg/suse/pgadmin3.spec.in > pkg/suse/pgadmin3.spec
 
-set -x
+echo "Configuring the build system..."
+
 if ! ([ -x config ]); then 
+  set -x
   mkdir config
 fi
-aclocal-1.9 && \
+
+set -x
+
+$ACLOCAL && \
 autoheader && \
-automake-1.9 --foreign --add-missing --copy && \
+$AUTOMAKE --foreign --add-missing --copy && \
 autoconf