diff options
author | Justin Erenkrantz <jerenkrantz@apache.org> | 2009-02-28 18:32:55 +0000 |
---|---|---|
committer | Justin Erenkrantz <jerenkrantz@apache.org> | 2009-02-28 18:32:55 +0000 |
commit | fcc997a868794a68bfe814cd421b7ccab2205780 (patch) | |
tree | feb099f99e7fc998a23c0d9501825ad73aa4cffe /buildconf | |
parent | a0f74660570d698dda2561a1fe20456124bdd9e9 (diff) | |
download | apr-fcc997a868794a68bfe814cd421b7ccab2205780.tar.gz |
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.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@748902 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'buildconf')
-rwxr-xr-x | buildconf | 55 |
1 files changed, 23 insertions, 32 deletions
@@ -35,25 +35,20 @@ fi # 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) - -$libtoolize --copy --automake - -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 +(cd build ; rm -f ltconfig ltmain.sh libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4) + +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 + 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"`} @@ -62,21 +57,17 @@ else 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 fi # Clean up any leftovers @@ -85,22 +76,22 @@ rm -f aclocal.m4 libtool.m4 # # 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} -echo "Creating configure ..." +echo "buildconf: creating configure ..." ### do some work to toss config.cache? ${AUTOCONF:-autoconf} # Remove autoconf 2.5x's cache directory rm -rf autom4te*.cache -echo "Generating 'make' outputs ..." +echo "buildconf: generating 'make' outputs ..." build/gen-build.py 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` |