subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1142604 - in /subversion/trunk: autogen.sh build/ build/buildcheck.sh build/config.guess build/config.sub configure.ac
Date Mon, 04 Jul 2011 10:24:15 GMT
Author: philip
Date: Mon Jul  4 10:24:14 2011
New Revision: 1142604

URL: http://svn.apache.org/viewvc?rev=1142604&view=rev
Log:
Fix issue 3930 by restoring the old libtool handling, effectively
reverting r876227 and r876296.

* configure.ac: Remove --with-custom-libtool, add --enable-experimental-libtool.

* autogen.sh: Setup for libtool.

* build/buildcheck.sh: Check for libtool.

* build/config.sub:
* build/config.guess: Remove, now generated by autogen.sh.

* build: Adjust svn:ignore.

Removed:
    subversion/trunk/build/config.guess
    subversion/trunk/build/config.sub
Modified:
    subversion/trunk/autogen.sh
    subversion/trunk/build/   (props changed)
    subversion/trunk/build/buildcheck.sh
    subversion/trunk/configure.ac

Modified: subversion/trunk/autogen.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/autogen.sh?rev=1142604&r1=1142603&r2=1142604&view=diff
==============================================================================
--- subversion/trunk/autogen.sh (original)
+++ subversion/trunk/autogen.sh Mon Jul  4 10:24:14 2011
@@ -53,6 +53,69 @@ done
 # ### sees an empty arg rather than missing one.
 ./build/buildcheck.sh "$RELEASE_MODE" || exit 1
 
+# Handle some libtool helper files
+#
+# ### eventually, we can/should toss this in favor of simply using
+# ### APR's libtool. deferring to a second round of change...
+#
+
+libtoolize="`./build/PrintPath glibtoolize libtoolize libtoolize15`"
+lt_major_version=`$libtoolize --version 2>/dev/null | sed -e 's/^[^0-9]*//' -e 's/\..*//'
-e '/^$/d' -e 1q`
+
+if [ "x$libtoolize" = "x" ]; then
+    echo "libtoolize not found in path"
+    exit 1
+fi
+
+rm -f build/config.guess build/config.sub
+$libtoolize --copy --automake --force
+
+ltpath="`dirname $libtoolize`"
+ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4}
+
+if [ ! -f $ltfile ]; then
+    echo "$ltfile not found (try setting the LIBTOOL_M4 environment variable)"
+    exit 1
+fi
+
+echo "Copying libtool helper: $ltfile"
+# An ancient helper might already be present from previous builds,
+# and it might be write-protected (e.g. mode 444, seen on FreeBSD).
+# This would cause cp to fail and print an error message, but leave
+# behind a potentially outdated libtool helper.  So, remove before
+# copying:
+rm -f build/libtool.m4
+cp $ltfile build/libtool.m4
+
+for file in ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4; do
+    rm -f build/$file
+
+    if [ $lt_major_version -ge 2 ]; then
+        ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/$file}
+
+        if [ ! -f $ltfile ]; then
+            echo "$ltfile not found (try setting the LIBTOOL_M4 environment variable)"
+            exit 1
+        fi
+
+        echo "Copying libtool helper: $ltfile"
+        cp $ltfile build/$file
+    fi
+done
+
+if [ $lt_major_version -ge 2 ]; then
+    for file in config.guess config.sub; do
+        configfile=${LIBTOOL_CONFIG-`cd $ltpath/../share/libtool/config ; pwd`/$file}
+
+        if [ ! -f $configfile ]; then
+            echo "$configfile not found (try setting the LIBTOOL_CONFIG environment variable)"
+            exit 1
+        fi
+
+	cp $configfile build/$file
+    done
+fi
+
 # Create the file detailing all of the build outputs for SVN.
 #
 # Note: this dependency on Python is fine: only SVN developers use autogen.sh

Propchange: subversion/trunk/build/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jul  4 10:24:14 2011
@@ -6,4 +6,6 @@ ltversion.m4
 lt~obsolete.m4
 ltmain.sh
 pkg.m4
+config.guess
+config.sub
 transform_libtool_scripts.sh

Modified: subversion/trunk/build/buildcheck.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/build/buildcheck.sh?rev=1142604&r1=1142603&r2=1142604&view=diff
==============================================================================
--- subversion/trunk/build/buildcheck.sh (original)
+++ subversion/trunk/build/buildcheck.sh Mon Jul  4 10:24:14 2011
@@ -76,6 +76,61 @@ fi
 echo "buildcheck: autoheader version $ah_version (ok)"
 
 #--------------------------------------------------------------------------
+# libtool 1.4 or newer
+#
+LIBTOOL_WANTED_MAJOR=1
+LIBTOOL_WANTED_MINOR=4
+LIBTOOL_WANTED_PATCH=
+LIBTOOL_WANTED_VERSION=1.4
+
+# The minimum version for source releases is 1.4.3,
+# because it's required by (at least) Solaris.
+if test "$VERSION_CHECK" = "--release"; then
+  LIBTOOL_WANTED_PATCH=3
+  LIBTOOL_WANTED_VERSION=1.4.3
+else
+  case `uname -sr` in
+    SunOS\ 5.*)
+      LIBTOOL_WANTED_PATCH=3
+      LIBTOOL_WANTED_VERSION=1.4.3
+      ;;
+  esac
+fi
+
+libtool=`./build/PrintPath glibtool libtool libtool15`
+# Extract the libtool version number: everything from the first number in
+# the version text until a hyphen or space.
+lt_pversion=`$libtool --version 2>/dev/null |
+  sed -e 's/^[^0-9]*//' -e 's/[- ].*//' -e '/^$/d' |
+  sed -e 1q`
+if test -z "$lt_pversion"; then
+  echo "buildcheck: libtool not found."
+  echo "            You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
+  exit 1
+fi
+lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
+IFS=.; set $lt_version; IFS=' '
+lt_status="good"
+if test "$1" = "$LIBTOOL_WANTED_MAJOR"; then
+   if test "$2" -gt "$LIBTOOL_WANTED_MINOR"; then
+      lt_status="good"
+   elif test "$2" -lt "$LIBTOOL_WANTED_MINOR"; then
+      lt_status="bad"
+   elif test ! -z "$LIBTOOL_WANTED_PATCH"; then
+       if test "$3" -lt "$LIBTOOL_WANTED_PATCH"; then
+           lt_status="bad"
+       fi
+   fi
+fi
+if test $lt_status != "good"; then
+  echo "buildcheck: libtool version $lt_pversion found."
+  echo "            You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
+  exit 1
+fi
+
+echo "buildcheck: libtool version $lt_pversion (ok)"
+
+#--------------------------------------------------------------------------
 # check that our local copies of files match up with those in APR(UTIL)
 #
 if test -d ./apr; then

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1142604&r1=1142603&r2=1142604&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Mon Jul  4 10:24:14 2011
@@ -215,15 +215,21 @@ AC_DEFINE_UNQUOTED(SVN_LOCALE_DIR, "${sv
                    [Defined to be the path to the installed locale dirs])
 
 dnl Check for libtool -- we'll definitely need it for all our shared libs!
-AC_ARG_WITH(custom-libtool,
-AS_HELP_STRING([--with-custom-libtool=PATH],
-               [Specify the command to run libtool]),
-               [ AC_MSG_NOTICE([using $withval as libtool])
-                 sh_libtool="$withval" ],
-               [ AC_MSG_NOTICE([using APR's libtool])
-                 sh_libtool="`$apr_config --apr-libtool`" ])
-LIBTOOL="$sh_libtool"
-SVN_LIBTOOL="$sh_libtool"
+echo "configuring libtool now"
+ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
+AC_ARG_ENABLE(experimental-libtool,
+  AS_HELP_STRING([--enable-experimental-libtool],[Use APR's libtool]),
+  [experimental_libtool=$enableval],[experimental_libtool=no])
+
+if test "$experimental_libtool" = "yes"; then
+  echo "using APR's libtool"
+  sh_libtool="`$apr_config --apr-libtool`"
+  LIBTOOL="$sh_libtool"
+  SVN_LIBTOOL="$sh_libtool"
+else
+  sh_libtool="$abs_builddir/libtool"
+  SVN_LIBTOOL="\$(SHELL) $sh_libtool"
+fi
 AC_SUBST(SVN_LIBTOOL)
 
 dnl Determine the libtool version



Mime
View raw message