]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* m4/libtool.m4 (AC_LIBTOOL_SETUP): Don't define the value for
authorGary V. Vaughan <gary@gnu.org>
Tue, 11 Nov 2003 16:49:32 +0000 (16:49 +0000)
committerGary V. Vaughan <gary@gnu.org>
Tue, 11 Nov 2003 16:49:32 +0000 (16:49 +0000)
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.

ChangeLog
Makefile.am
libltdl/configure.ac
m4/libtool.m4

index 5c6c851a91b3d190e48f9e30c2d55c069cbe1d8c..dc7a509185268e7cde5974288aff7e323d659eeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-11-11  Gary V. Vaughan  <gary@gnu.org>
+
+       * 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  <scott@netsplit.com>
 
        * ltmain.in: Add -pthread and similar to $deplibs ($compile_deplibs
@@ -12,7 +23,7 @@
 
 2003-11-09  Peter O'Gorman  <peter@pogma.com>
 
-       * 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.
 
index 02125358eb5023ba4840129b66df7900e869867a..f92f5a2b4cd7b930c94f7ca8825fd6b712901a61 100644 (file)
@@ -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 $@
 
index b171874ddef5430472878a2ebadcf63530b3dc52..19f7e1224cc6fee87f61d9f8bb81cba4d341c468 100644 (file)
@@ -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
index 1830f8c1c7a258bba0066d1266aa0516d47806e7..3af06f3c21b254df652dda952e809c79eb34ba73 100644 (file)
@@ -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'