apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r919390 - in /apr/apr/branches/1.4.x: ./ buildconf configure.in
Date Fri, 05 Mar 2010 12:38:36 GMT
Author: rpluem
Date: Fri Mar  5 12:38:36 2010
New Revision: 919390

URL: http://svn.apache.org/viewvc?rev=919390&view=rev
Log:
Merge r748902, r760443, r835607 from trunk:

Go back around and clean up GNU libtool 2.x detection and usage.

(Tested with GNU libtool 2.2.6, 1.5.26, and jlibtool; and GNU autoconf 2.63.)

* configure.in
  (AC_CONFIG_MACRO_DIR): Define so that glibtoolize2 knows where to plop things.
  (AC_PROG_SED): Always find sed.
  (Xsed): Define to work around libtool 2.x brokenness.
* build/buildcheck.sh: Re-activate libtool 2.x
* buildconf: Clean up and rationalize the entire process of importing libtool
  autoconf macros.


* AC_PROG_SED is only avaliable in recent autoconf versions.
  Use AC_CHECK_PROG instead if AC_PROG_SED is not present.


Allow --verbose'ity with ./buildconf for debugging
Reviewed by: pluem

Modified:
    apr/apr/branches/1.4.x/   (props changed)
    apr/apr/branches/1.4.x/buildconf
    apr/apr/branches/1.4.x/configure.in

Propchange: apr/apr/branches/1.4.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Mar  5 12:38:36 2010
@@ -1 +1 @@
-/apr/apr/trunk:733052,747990,748361,748371,748565,748888,748988,749810,782838,783398,783958,784633,784773,788588,793192,794118,794485,795267,799497,800627,809745,809854,810472,811455,813063,821306,829490,831641,905040,908427,910419
+/apr/apr/trunk:733052,747990,748361,748371,748565,748888,748902,748988,749810,760443,782838,783398,783958,784633,784773,788588,793192,794118,794485,795267,799497,800627,809745,809854,810472,811455,813063,821306,829490,831641,835607,905040,908427,910419

Modified: apr/apr/branches/1.4.x/buildconf
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/buildconf?rev=919390&r1=919389&r2=919390&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/buildconf (original)
+++ apr/apr/branches/1.4.x/buildconf Fri Mar  5 12:38:36 2010
@@ -40,25 +40,20 @@
 # Note: APR supplies its own config.guess and config.sub -- we do not
 #       rely on libtool's versions
 #
-echo "Copying libtool helper files ..."
+echo "buildconf: copying libtool helper files using $libtoolize"
 
 # Remove any libtool files so one can switch between libtool 1.3
 # and libtool 1.4 by simply rerunning the buildconf script.
-(cd build ; rm -f ltconfig ltmain.sh libtool.m4)
+(cd build ; rm -f ltconfig ltmain.sh libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4)
 
-$libtoolize --copy --automake --force $verbose
-
-if [ -f libtool.m4 ]; then 
-   ltfile=`pwd`/libtool.m4
-elif grep all_pkgmacro_files $libtoolize > /dev/null; then
-    # libtool 2.x
-   aclocal_dir=`sed -n '/^aclocaldir=/{s/.*=//;p;q;}' < $libtoolize`
-   ltfiles=`sed -n '/^all_pkgmacro_files=/{s/.*=//;;s/"//;p;q;}' < $libtoolize`
-   for f in $ltfiles; do
-       test -f "$aclocal_dir/$f" && cp "$aclocal_dir/$f" build
-   done
-   ltfile=$aclocal_dir/libtool.m4
-else
+lt_pversion=`$libtoolize --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[-
].*//g;q'`
+lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
+IFS=.; set $lt_version; IFS=' '
+if test "$1" = "1"; then
+  $libtoolize --copy --automake --force $verbose
+  if [ -f libtool.m4 ]; then 
+    ltfile=`pwd`/libtool.m4
+  else
    ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \
                    < $libtoolize`"
    ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`}
@@ -67,21 +62,17 @@
      ltpath=`dirname $libtoolize`
      ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4
    fi
-fi
-  
-if [ ! -f $ltfile ]; then
+  fi
+  if [ ! -f $ltfile ]; then
     echo "$ltfile not found"
     exit 1
+  fi
+  # Do we need this anymore?
+  echo "buildconf: Using libtool.m4 at ${ltfile}."
+  cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
 fi
-
-echo "buildconf: Using libtool.m4 at ${ltfile}."
-
-cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
-
-# libtool.m4 from 1.6 requires ltsugar.m4
-if [ -f ltsugar.m4 ]; then
-   rm -f build/ltsugar.m4
-   mv ltsugar.m4 build/ltsugar.m4
+if test "$1" = "2"; then
+  $libtoolize --copy --force $verbose
 fi
 
 # Clean up any leftovers
@@ -90,22 +81,22 @@
 #
 # Generate the autoconf header and ./configure
 #
-echo "Creating include/arch/unix/apr_private.h.in ..."
+echo "buildconf: creating include/arch/unix/apr_private.h.in ..."
 ${AUTOHEADER:-autoheader} $verbose
 
-echo "Creating configure ..."
+echo "buildconf: creating configure ..."
 ### do some work to toss config.cache?
 ${AUTOCONF:-autoconf} $verbose
 
 # Remove autoconf 2.5x's cache directory
 rm -rf autom4te*.cache
 
-echo "Generating 'make' outputs ..."
+echo "buildconf: generating 'make' outputs ..."
 build/gen-build.py $verbose make
 
 # Create RPM Spec file
 if [ -f `which cut` ]; then
-  echo rebuilding rpm spec file
+  echo "buildconf: rebuilding rpm spec file"
   ( REVISION=`build/get-version.sh all include/apr_version.h APR`
     VERSION=`echo $REVISION | cut -d- -s -f1`
     RELEASE=`echo $REVISION | cut -d- -s -f2`

Modified: apr/apr/branches/1.4.x/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/configure.in?rev=919390&r1=919389&r2=919390&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/configure.in (original)
+++ apr/apr/branches/1.4.x/configure.in Fri Mar  5 12:38:36 2010
@@ -10,6 +10,7 @@
 AC_CONFIG_HEADER(include/arch/unix/apr_private.h)
 AC_CONFIG_MACRO_DIR(build)
 AC_CONFIG_AUX_DIR(build)
+AC_CONFIG_MACRO_DIR(build)
 
 dnl 
 dnl Include our own M4 macros along with those for libtool
@@ -129,6 +130,12 @@
 dnl preload section from invoking the macro to get compiler info.
 AC_PROG_CC
 
+dnl AC_PROG_SED is only avaliable in recent autoconf versions.
+dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present.
+ifdef([AC_PROG_SED],
+      [AC_PROG_SED],
+      [AC_CHECK_PROG(SED, sed, sed)])
+
 dnl Preload
 APR_PRELOAD
 
@@ -172,6 +179,11 @@
 AC_ARG_ENABLE(experimental-libtool,[  --enable-experimental-libtool Use experimental custom
libtool],
   [experimental_libtool=$enableval],[experimental_libtool=no])
 
+dnl Workarounds for busted Libtool 2.x when we don't call AC_PROG_LIBTOOL
+if test "x$Xsed" = "x"; then
+  Xsed="$SED -e 1s/^X//"
+fi
+
 case $host in
 *-os2*)
     # Use a custom-made libtool replacement



Mime
View raw message