From: Gary V. Vaughan Date: Tue, 11 Nov 2003 16:49:32 +0000 (+0000) Subject: * m4/libtool.m4 (AC_LIBTOOL_SETUP): Don't define the value for X-Git-Tag: release-1-9b~254 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c866b386af1d6cebd5a3edd57248d7b75fc9c5e3;p=thirdparty%2Flibtool.git * m4/libtool.m4 (AC_LIBTOOL_SETUP): Don't define the value for ltmain unconditionally. (_LT_PROG_LTMAIN): New macro to ensure that the shell variable `ltmain' actually points at a suitable `ltmain.sh'. (_AC_PROG_LIBTOOL): Require it. (AC_LIBTOOL_CONFIG, _LT_AC_TAG_CONFIG): Invoke it. * Makefile.am (libtool): ltmain.sh is in the build tree. * libltdl/configure.ac: Ditto. --- diff --git a/ChangeLog b/ChangeLog index 5c6c851a9..dc7a50918 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-11-11 Gary V. Vaughan + + * m4/libtool.m4 (AC_LIBTOOL_SETUP): Don't define the value for + ltmain unconditionally. + (_LT_PROG_LTMAIN): New macro to ensure that the + shell variable `ltmain' actually points at a suitable `ltmain.sh'. + (_AC_PROG_LIBTOOL): Require it. + (AC_LIBTOOL_CONFIG, _LT_AC_TAG_CONFIG): Invoke it. + * Makefile.am (libtool): ltmain.sh is in the build tree. + * libltdl/configure.ac: Ditto. + 2003-11-10 Scott James Remnant * ltmain.in: Add -pthread and similar to $deplibs ($compile_deplibs @@ -12,7 +23,7 @@ 2003-11-09 Peter O'Gorman - * ltmain.in (linkalldeplibs,darwin): Fix a bug reported by Idar + * ltmain.in (linkalldeplibs,darwin): Fix a bug reported by Idar Tollefsen where a dir could be added to the link line with no '-L' on darwin. diff --git a/Makefile.am b/Makefile.am index 02125358e..f92f5a2b4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,7 +42,7 @@ bin_SCRIPTS = libtool libtoolize config_status = $(top_builddir)/config.status -libtool: $(srcdir)/config/ltmain.sh $(top_builddir)/configure +libtool: config/ltmain.sh $(top_builddir)/configure CONFIG_FILES= CONFIG_HEADERS= $(SHELL) $(config_status) chmod +x $@ diff --git a/libltdl/configure.ac b/libltdl/configure.ac index b171874dd..19f7e1224 100644 --- a/libltdl/configure.ac +++ b/libltdl/configure.ac @@ -34,7 +34,7 @@ AC_CONFIG_SRCDIR([ltdl.c]) ## ------------------------------- ## if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then - if test -f ${srcdir}/ltmain.sh; then + if test -f ltmain.sh; then # if libltdl is libtoolized, it is assumed to be stand-alone and # installed unless the command line overrides it (tested above) enable_ltdl_install=yes diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 1830f8c1c..3af06f3c2 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -46,12 +46,13 @@ AC_DEFUN([AC_PROG_LIBTOOL], # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_REQUIRE([_LT_PROG_LTMAIN])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" +LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -62,6 +63,20 @@ define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL +# _LT_PROG_LTMAIN +# --------------- +# In libtool itself `ltmain.sh' is in the build tree, but everything else +# ships it in the source tree, for completeness, if we find a copy in the +# build tree use that before falling back to auxdir. +AC_DEFUN([_LT_PROG_LTMAIN], +[case $ac_aux_dir in + $srcdir) ltmain=./ltmain.sh ;; + $srcdir/*) ltmain=`expr "$ac_aux_dir" : "$srcdir/\(.*\)"`/ltmain.sh ;; +esac +test -f "$ltmain" || ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], @@ -125,15 +140,16 @@ rm="rm -f" # Global variables: default_ofile=libtool +ofile="$default_ofile" can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" + with_gnu_ld="$lt_cv_prog_gnu_ld" + AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) @@ -1717,6 +1733,7 @@ m4_define([_LT_AC_TAG_CONFIG], ]) AC_CONFIG_COMMANDS([libtool-tags], [ + _LT_PROG_LTMAIN if test -f "$ltmain"; then if test ! -f "${ofile}"; then AC_MSG_ERROR([output file `$ofile' does not exist]) @@ -4197,6 +4214,7 @@ _LT_EOF ;; esac + _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem @@ -4213,7 +4231,6 @@ _LT_EOF PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' - ltmain='$ltmain' ofile='$ofile' sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst'