|
Lines 1-122
Link Here
|
| 1 |
#! /bin/sh /usr/share/dpatch/dpatch-run |
|
|
| 2 |
## 025_libtool_2.x_fixes.dpatch by <jsw@debian.org> |
| 3 |
## |
| 4 |
## All lines beginning with `## DP:' are a description of the patch. |
| 5 |
## DP: Update build system to work with libtool 2.x |
| 6 |
## DP: |
| 7 |
## DP: This corresponds to upstream revisions: |
| 8 |
## DP: 733052 |
| 9 |
## DP: 742752 |
| 10 |
## DP: 748902 |
| 11 |
## DP: 757363 |
| 12 |
diff --git a/buildconf b/buildconf |
| 13 |
index bc0e9fd..11554ed 100755 |
| 14 |
--- srclib/apr/buildconf |
| 15 |
+++ srclib/apr/buildconf |
| 16 |
@@ -35,17 +35,20 @@ fi |
| 17 |
# Note: APR supplies its own config.guess and config.sub -- we do not |
| 18 |
# rely on libtool's versions |
| 19 |
# |
| 20 |
-echo "Copying libtool helper files ..." |
| 21 |
+echo "buildconf: copying libtool helper files using $libtoolize" |
| 22 |
|
| 23 |
# Remove any libtool files so one can switch between libtool 1.3 |
| 24 |
# and libtool 1.4 by simply rerunning the buildconf script. |
| 25 |
-(cd build ; rm -f ltconfig ltmain.sh libtool.m4) |
| 26 |
- |
| 27 |
-$libtoolize --copy --automake |
| 28 |
- |
| 29 |
-if [ -f libtool.m4 ]; then |
| 30 |
- ltfile=`pwd`/libtool.m4 |
| 31 |
-else |
| 32 |
+(cd build ; rm -f ltconfig ltmain.sh libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4) |
| 33 |
+ |
| 34 |
+lt_pversion=`$libtoolize --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` |
| 35 |
+lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'` |
| 36 |
+IFS=.; set $lt_version; IFS=' ' |
| 37 |
+if test "$1" = "1"; then |
| 38 |
+ $libtoolize --copy --automake |
| 39 |
+ if [ -f libtool.m4 ]; then |
| 40 |
+ ltfile=`pwd`/libtool.m4 |
| 41 |
+ else |
| 42 |
ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \ |
| 43 |
< $libtoolize`" |
| 44 |
ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`} |
| 45 |
@@ -54,21 +57,21 @@ else |
| 46 |
ltpath=`dirname $libtoolize` |
| 47 |
ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4 |
| 48 |
fi |
| 49 |
-fi |
| 50 |
- |
| 51 |
-if [ ! -f $ltfile ]; then |
| 52 |
+ fi |
| 53 |
+ if [ ! -f $ltfile ]; then |
| 54 |
echo "$ltfile not found" |
| 55 |
exit 1 |
| 56 |
+ fi |
| 57 |
+ # Do we need this anymore? |
| 58 |
+ echo "buildconf: Using libtool.m4 at ${ltfile}." |
| 59 |
+ cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4 |
| 60 |
fi |
| 61 |
- |
| 62 |
-echo "buildconf: Using libtool.m4 at ${ltfile}." |
| 63 |
- |
| 64 |
-cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4 |
| 65 |
- |
| 66 |
-# libtool.m4 from 1.6 requires ltsugar.m4 |
| 67 |
-if [ -f ltsugar.m4 ]; then |
| 68 |
- rm -f build/ltsugar.m4 |
| 69 |
- mv ltsugar.m4 build/ltsugar.m4 |
| 70 |
+if test "$1" = "2"; then |
| 71 |
+ $libtoolize --copy |
| 72 |
+ # Wouldn't it just be better to define top_builddir?? |
| 73 |
+ mv build/libtool.m4 build/libtool.m4.$$ |
| 74 |
+ cat build/libtool.m4.$$ | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4 |
| 75 |
+ rm build/libtool.m4.$$ |
| 76 |
fi |
| 77 |
|
| 78 |
# Clean up any leftovers |
| 79 |
diff --git a/configure.in b/configure.in |
| 80 |
index 46b4b32..2ac1439 100644 |
| 81 |
--- srclib/apr/configure.in |
| 82 |
+++ srclib/apr/configure.in |
| 83 |
@@ -9,6 +9,7 @@ AC_PREREQ(2.50) |
| 84 |
AC_INIT(build/apr_common.m4) |
| 85 |
AC_CONFIG_HEADER(include/arch/unix/apr_private.h) |
| 86 |
AC_CONFIG_AUX_DIR(build) |
| 87 |
+AC_CONFIG_MACRO_DIR(build) |
| 88 |
|
| 89 |
dnl |
| 90 |
dnl Include our own M4 macros along with those for libtool |
| 91 |
@@ -20,6 +21,10 @@ sinclude(build/apr_win32.m4) |
| 92 |
sinclude(build/apr_hints.m4) |
| 93 |
sinclude(build/libtool.m4) |
| 94 |
sinclude(build/ltsugar.m4) |
| 95 |
+sinclude(build/argz.m4) |
| 96 |
+sinclude(build/ltoptions.m4) |
| 97 |
+sinclude(build/ltversion.m4) |
| 98 |
+sinclude(build/lt~obsolete.m4) |
| 99 |
|
| 100 |
dnl Hard-coded inclusion at the tail end of apr_private.h: |
| 101 |
AH_BOTTOM([ |
| 102 |
@@ -117,6 +122,8 @@ dnl can only be used once within a configure script, so this prevents a |
| 103 |
dnl preload section from invoking the macro to get compiler info. |
| 104 |
AC_PROG_CC |
| 105 |
|
| 106 |
+AC_PROG_SED |
| 107 |
+ |
| 108 |
dnl Preload |
| 109 |
APR_PRELOAD |
| 110 |
|
| 111 |
@@ -160,6 +167,11 @@ echo "performing libtool configuration..." |
| 112 |
AC_ARG_ENABLE(experimental-libtool,[ --enable-experimental-libtool Use experimental custom libtool], |
| 113 |
[experimental_libtool=$enableval],[experimental_libtool=no]) |
| 114 |
|
| 115 |
+dnl Workarounds for busted Libtool 2.x when we don't call AC_PROG_LIBTOOL |
| 116 |
+if test "x$Xsed" = "x"; then |
| 117 |
+ Xsed="$SED -e 1s/^X//" |
| 118 |
+fi |
| 119 |
+ |
| 120 |
case $host in |
| 121 |
*-os2*) |
| 122 |
# Use a custom-made libtool replacement |