]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Hack: define top_build_prefix for old autotools
authorAmos Jeffries <amosjeffries@squid-cache.org>
Sun, 1 Aug 2010 12:53:19 +0000 (06:53 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Sun, 1 Aug 2010 12:53:19 +0000 (06:53 -0600)
This hack was removed during the libtool 2.2 upgrade.

The issue shows up as bundle builds failing to link libltdl/libltdlc.la
when they should in fact be linking ../libltdl/libltdlc.la in src/Makefile

It is caused by the macros of libtool 2.2 assuming the presence of
top_build_prefix but since autoconf 2.62 that was replaced with
ac_top_build_prefix and is no longer automatically defined in Makefile's.

Some distros also seem to have back-ported the removal of top_build_prefix
into their old autoconf causing macro version tests to fail.

configure.in

index 5ac2127c868b042e1b798dc867d0aa30ca21a6c1..f2cd9694b828cf2ad3677730f04e641d2f2a578b 100644 (file)
@@ -110,6 +110,14 @@ else
 fi
 
 LT_INIT([dlopen])
+if ! test "${ac_top_build_prefix}" = "";
+then
+       # LTDL v3-v7 macros assume the autoconf 2.62 variable top_build_prefix is defined
+       # But from autoconf 2.64 its called ac_top_build_prefix and not automatically added to the Makefile
+       # This fixes Linux LTDLv3-v7, and BSD LTDL v2.2
+       top_build_prefix=${ac_top_build_prefix}
+       AC_SUBST(top_build_prefix)
+fi
 LTDL_INIT
 
 dnl LibTool environment is now prepared for setup. Check that it is usable and initialize.