diff options
author | Lee Leahu <freedesktop-bugs@dyweni.com> | 2008-11-07 11:00:15 -0500 |
---|---|---|
committer | James Cloos <cloos@jhcloos.com> | 2008-11-07 11:00:15 -0500 |
commit | 8256de6062eb150c612ef09a1ae855de0a0cba6c (patch) | |
tree | 249dc4e6e4655315e70db10f05098d7fd8ea29f2 | |
parent | 012e73faab8dc8617c6da4679715dae14f6cddd4 (diff) | |
download | xorg-lib-libXaw-8256de6062eb150c612ef09a1ae855de0a0cba6c.tar.gz |
Fix configure error when using libtool-2.2.*
The configure script errors out when preparing to compile libXaw.
The error occurs with libtool-2.2.6a and libtool-2.2.4.
The error does not occur with libtool-1.5.26.
The error is caused because the libtool file is not created by the
time sed attempts to fix the SONAME.
Libtool-2.2 made an incompatible change to LT_INIT (which replaces
AC_PROG_LIBTOOL): it generates the libtool script at the AC_OUTPUT,
rather then right after being called. Sometimes, configure scripts
call configure to run tests or read its settings; in those cases,
LT_OUTPUT can be appended to force libtool generation earlier.
There is one caveat: libtool is still (re)generated during AC_OUTPUT,
so in our case, even adding LT_OUTPUT wouldn't help, because the sed
changes are overwritten.
AFAICS the solution is to use AC_CONFIG_COMMANDS; patch against
current git master attached.
Report and patch from: http://bugs.freedesktop.org/show_bug.cgi?id=18073
Signed-off-by: James Cloos <cloos@jhcloos.com>
-rw-r--r-- | configure.ac | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 1e93691..e8c56b3 100644 --- a/configure.ac +++ b/configure.ac @@ -22,13 +22,8 @@ PKG_PROG_PKG_CONFIG # # fix libtool to set SONAME to libXaw.so.$major # -AC_MSG_CHECKING([hacks in libtool for libXaw SONAME]) -if grep "xorglibxawname" libtool > /dev/null ; then - AC_MSG_RESULT([already done]) -else - AC_MSG_RESULT([no, fixing]) - AC_CHECK_PROG([SED], [sed], [sed]) - test "x$SED" = x && AC_MSG_ERROR([sed needed to hack libtool script]) +AC_PROG_SED +AC_CONFIG_COMMANDS([libtool_hack], [ cp -f libtool libtool_ $SED '1,/^soname_spec/{ /^soname_spec/i\ @@ -36,9 +31,8 @@ else xorglibxawname="libXaw" /^soname_spec/s/libname/xorglibxawname/ }' libtool_ > libtool - test "$?" = 0 || AC_MSG_ERROR([failed to hack libtool script]) rm -f libtool_ -fi +]) # Win32 DLL rules are different. case $host_os in |