]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* use the same header in all configure.in's and Makefile.am's
authorThomas Tanner <tanner@gmx.de>
Sat, 20 Mar 1999 22:04:40 +0000 (22:04 +0000)
committerThomas Tanner <tanner@gmx.de>
Sat, 20 Mar 1999 22:04:40 +0000 (22:04 +0000)
* TODO: all internal variables and macros are now documented
* demo/Makefile.am: use $(LIBS) instead of -lm
* doc/libtool.texi: documented thread_safe_flag_spec,
  renamed all AM_ENABLE/DISABLE_* macros to AC_*,
  documented AC_DISABLE_FAST_INSTALL and AC_LIBTOOL_DLOPEN
  documentation for -module updated
* ltmain.in: bugfix: "-dlopen self [-all]-static" wouldn't use
  dlopen_self_static, automatically enable -export-dynamic when
  using "-dlopen self", always make run-paths absolute,
  ignore -lc only on platforms that don't have such a library,
  don't generate an installable pseudo-library for convenience
  libraries, bugfix: export_symbols would be removed immediately
  before it is be used

17 files changed:
ChangeLog
Makefile.am
TODO
cdemo/Makefile.am
cdemo/configure.in
demo/Makefile.am
demo/configure.in
depdemo/Makefile.am
depdemo/configure.in
doc/Makefile.am
doc/libtool.texi
libltdl/Makefile.am
libltdl/configure.in
ltmain.in
mdemo/Makefile.am
mdemo/configure.in
tests/Makefile.am

index 769ae97abe71f61402608997521ae37fda45a987..3cd1451f544509b4ebf82fea6d8ebe0bbd10db28 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+1999-03-20 Thomas Tanner  <tanner@gmx.de>
+
+       * use the same header in all configure.in's and Makefile.am's
+       * TODO: all internal variables and macros are now documented
+       * demo/Makefile.am: use $(LIBS) instead of -lm
+       * doc/libtool.texi: documented thread_safe_flag_spec,
+         renamed all AM_ENABLE/DISABLE_* macros to AC_*, 
+         documented AC_DISABLE_FAST_INSTALL and AC_LIBTOOL_DLOPEN
+         documentation for -module updated
+       * ltmain.in: bugfix: "-dlopen self [-all]-static" wouldn't use
+         dlopen_self_static, automatically enable -export-dynamic when
+         using "-dlopen self", always make run-paths absolute,
+         ignore -lc only on platforms that don't have such a library,
+         don't generate an installable pseudo-library for convenience
+         libraries, bugfix: export_symbols would be removed immediately
+         before it is be used
+
 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * ltconfig.in (sunos4*, with_gnu_ld, hardcode_minus_L): remove, we
index 14005eea0008af30fd636b93fe14f2c3cdf5ae89..a43a37cfeb16e162fe24e18bed9bb5428d4de7a1 100644 (file)
@@ -1,5 +1,4 @@
-## Process Makefile.am with automake to create Makefile.in. -*-Makefile-*-
-## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+## Process this file with automake to produce Makefile.in
 
 AUTOMAKE_OPTIONS = 1.3e gnits readme-alpha
 
diff --git a/TODO b/TODO
index fe10068d6510cc6984dc6146fb2ab40b8f51023b..e5e277bab4e2a9ddf4cbf8907d8bd90cc9ee3026 100644 (file)
--- a/TODO
+++ b/TODO
@@ -16,14 +16,7 @@ paths into libraries, as well as binaries: `... -Wl,-soname
 * Lists of exported symbols should be stored in the pseudo library
 so that the size of lt_preloaded_symbols can be reduced.
 
-* Documentation:
-
-- AC_PROG_LIBTOOL, AC_ENABLE/DISABLE_SHARED/STATIC/FAST_INSTALL,
-  AC_LIBTOOL_DLOPEN, AC_LIBLTDL_CONVENIENCE/INSTALLABLE are not documented
-
-- Purpose and usage of convenience libraries must be better documented
-
-- some new internal variables are not documented yet.
+* Purpose and usage of convenience libraries must be better documented
 
 In the future:
 **************
index 4fe0994716e8c494ada2f7f00bab935cbb951493..ab054957cdc331b20454ead41cd800899b6b490e 100644 (file)
@@ -1,5 +1,5 @@
-# A brief demonstration of Libtool modules. -*-Makefile-*-
-#
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = no-dependencies foreign
 
 EXTRA_DIST = acinclude.m4
index cf28fa653f3cae9ce25278a3503630ca654bffd6..eea60fb90c21e48e62c31fef9956eddccaad15a1 100644 (file)
@@ -1,4 +1,5 @@
-dnl Initialize the cdemo package.
+dnl Process this file with autoconf to create configure.
+
 AC_INIT(main.c)
 AM_INIT_AUTOMAKE(cdemo,0.1)
 
index 1df6fec29517bade04b1fa37a1c27ba32553d643..87b7ef3f6a514dc096c6a6999d28c649ab9fef3d 100644 (file)
@@ -1,5 +1,5 @@
-# A brief demonstration of using Automake with Libtool. -*-Makefile-*-
-#
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = no-dependencies foreign
 
 EXTRA_DIST = $(TESTS) acinclude.m4
@@ -76,8 +76,8 @@ hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
          eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
          libdir=$(libdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
-         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib -lm $$flag || echo unsupported > $@"; \
-         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib -lm $$flag || echo unsupported > $@"
+         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $$flag || echo unsupported > $@"; \
+         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $$flag || echo unsupported > $@"
 
 hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
        @eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
@@ -87,8 +87,8 @@ hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
            echo "echo unsupported > $@"; \
            echo unsupported > $@ || status="$$?"; \
          else \
-           echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello -lm"; \
-           $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello -lm || status="$$?"; \
+           echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello $(LIBS)"; \
+           $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello $(LIBS) || status="$$?"; \
          fi; \
          exit $$status
 
@@ -98,16 +98,16 @@ hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
        @eval `egrep -e '^(shlibpath_var|hardcode_.*|wl)=' libtool`; \
          libdir=$(libdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
-         echo "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello -lm $$flag || echo unsupported > $@"; \
-         eval "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello -lm $$flag || echo unsupported > $@"
+         echo "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $$flag || echo unsupported > $@"; \
+         eval "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $$flag || echo unsupported > $@"
 
 hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES)
        @rm -f hc-minusL
        @eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
          libdir=$(libdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
-         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello -lm $$flag || echo unsupported > $@"; \
-         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello -lm $$flag || echo unsupported > $@"
+         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $$flag || echo unsupported > $@"; \
+         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $$flag || echo unsupported > $@"
 
 $(OBJECTS): libtool
 libtool: $(LIBTOOL_DEPS)
index 2641d8614b89505f1b0e2010a05d0bdcf33ba0e4..c419b56b601ec682b6b38dcf280262fa97b72a38 100644 (file)
@@ -1,4 +1,5 @@
-dnl Initialize the hell package.
+dnl Process this file with autoconf to create configure.
+
 AC_INIT(hello.c)
 AM_INIT_AUTOMAKE(hell,1.0)
 
index c3d3aa3d65ee6f51e6452c3cdb9dfebe7dcf9921..64dd5871283d893aad7b8f304df62b9c99276854 100644 (file)
@@ -1,5 +1,5 @@
-# A brief demonstration of inter-library dependencies
-#
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = no-dependencies foreign
 
 SUBDIRS = l1 l2 l3 l4
index bfd04c2b880cae5b0d8db43932df68a8e9e9fb30..e4e317e7bdc4fde999022a89bf3ed99abf656e77 100644 (file)
@@ -1,4 +1,5 @@
-dnl Initialize the depdemo package.
+dnl Process this file with autoconf to create configure.
+
 AC_INIT(main.c)
 AM_INIT_AUTOMAKE(depdemo,0.1)
 
index 9df4e7f8197b0e82a991827903473bc076965ee6..b07461d5cdbb9bc5e6374ef9de00a1e16c195e8c 100644 (file)
@@ -1,10 +1,5 @@
-## Process Makefile.am with automake to create Makefile.in. -*-Makefile-*-
-##
-## Copyright (C) 1996 Free Software Foundation, Inc.
-## This Makefile.am is free software; the Free Software Foundation
-## gives unlimited permission to copy, distribute and modify it.
-##
-## Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = gnits
 info_TEXINFOS = libtool.texi
 libtool_TEXINFOS = PLATFORMS
index d787c87b1ce2b252890d91cf833b4ddf92649050..3697a9a23573cb982c4bd68a27b7a3d24a91d663 100644 (file)
@@ -1189,9 +1189,7 @@ executable.
 
 @item -module
 Creates a library that can be dlopenend (@pxref{Dlopened modules}). 
-This option doesn't work for programs and must not be used 
-together with @samp{-export-symbols}.
-It enables the option @samp{-export-dynamic} automatically.
+This option doesn't work for programs.
 Module names don't need to be prefixed with 'lib'.
 In order to prevent name clashes, however, 'libname' and 'name' 
 must not be used at the same time in your package.
@@ -1619,12 +1617,12 @@ example).}
 By default, this macro turns on shared libraries if they are available,
 and also enables static libraries if they don't conflict with the shared
 libraries.  You can modify these defaults by calling either the
-@code{AM_DISABLE_SHARED} or @code{AM_DISABLE_STATIC} macros:
+@code{AC_DISABLE_SHARED} or @code{AC_DISABLE_STATIC} macros:
 
 @example
 # Turn off shared libraries during beta-testing, since they
 # make the build process take too long.
-AM_DISABLE_SHARED
+AC_DISABLE_SHARED
 AM_PROG_LIBTOOL
 @end example
 
@@ -1644,7 +1642,9 @@ configuring with @samp{--enable-shared} every package named in the
 comma-separated @var{pkgs} list, and every other package with
 @samp{--disable-shared}.  The @samp{--enable-static=@var{pkgs}} flag
 behaves similarly, but it uses @samp{--enable-static} and
-@samp{--disable-static}.
+@samp{--disable-static}. The same applies to the 
+@samp{--enable-fast-install=@var{pkgs}} flag, which uses
+@samp{--enable-fast-install} and @samp{--disable-fast-install}.
 
 The package name @samp{default} matches any packages which have not set
 their name in the @code{PACKAGE} environment variable.
@@ -1672,13 +1672,28 @@ on @file{libtool}.
 
 @end defmac
 
-@defmac AM_DISABLE_SHARED
+@defmac AC_LIBTOOL_DLOPEN
+Enable checking for dlopen support. This macro should be used if
+the package makes use of the -dlopen and -dlpreopen flags, otherwise
+libtool will assume that the system does not support dlopening.
+The macro must be called *before* @code{AM_PROG_LIBTOOL}.
+@end defmac
+
+@defmac AC_DISABLE_FAST_INSTALL
+Change the default behaviour for @code{AM_PROG_LIBTOOL} to disable
+optimization for fast installation.  The user may still override
+this default by specifying @samp{--enable-fast-install}.
+@end defmac
+
+@defmac AC_DISABLE_SHARED
+@defmacx AM_DISABLE_SHARED
 Change the default behaviour for @code{AM_PROG_LIBTOOL} to disable
 shared libraries.  The user may still override this default by
 specifying @samp{--enable-shared}.
 @end defmac
 
-@defmac AM_DISABLE_STATIC
+@defmac AC_DISABLE_STATIC
+@defmacx AM_DISABLE_STATIC
 Change the default behaviour for @code{AM_PROG_LIBTOOL} to disable
 static libraries.  The user may still override this default by
 specifying @samp{--enable-static}.
@@ -3594,7 +3609,7 @@ aren't defined in that library.
 @defvar always_export_symbols
 Whether libtool should automatically generate a list of exported symbols
 using @var{export_symbols_cmds} before linking an archive.
-Set to @samp{yes} or @samp{no}.  Default is @samp{no}
+Set to @samp{yes} or @samp{no}.  Default is @samp{no}.
 @end defvar
 
 @defvar archive_cmds
@@ -3895,6 +3910,11 @@ this variable to extend the library search path.  Linker switches such
 as @code{-L} also augment the search path.
 @end defvar
 
+@defvar thread_safe_flag_spec
+Linker flag (passed through the C compiler) used to generate thread-safe
+libraries.
+@end defvar
+
 @defvar version_type
 The library version numbering type.  One of @samp{libtool},
 @samp{linux}, @samp{osf}, @samp{sunos}, or @samp{none}.
index fd4e05e26ac9e1849f0c79a19a5aa9d72ba832b0..22dfc45bda8ae68b055b8083e91b12d7fe27f862 100644 (file)
@@ -1,5 +1,5 @@
-# A brief demonstration of using Automake with Libtool. -*-Makefile-*-
-#
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = no-dependencies foreign
 
 if INSTALL_LTDL
index 8eaaede816b3533c620ac213d2f5593700321ebd..0d3b45351efa498427932fc2134031c4eecd6081 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to create configure.
-dnl Initialize the libltdl package.
+
 AC_INIT(ltdl.c)
 
 if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
index 0294541d5952c82e35a68995092ffb86260c34f9..d2ca097549e4860dd20cd31c5e5052a11faf2226 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -831,8 +831,17 @@ compiler."
     do
       case "$arg" in
       -all-static | -static)
-       if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+       if test "X$arg" = "X-all-static"; then
+         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
            $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+         fi
+         if test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+       else
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
        fi
        build_libtool_libs=no
        build_old_libs=yes
@@ -873,13 +882,18 @@ compiler."
              dlself=yes
            elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
              dlself=yes
+           else
+             export_dynamic=yes
            fi
            prev=
            continue
            ;;
          *)
-           dlprefiles="$dlprefiles $arg"
-           test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
+           if test "$prev" = dlfiles; then
+             dlfiles="$dlfiles $arg"
+           else
+             dlprefiles="$dlprefiles $arg"
+           fi
            prev=
            ;;
          esac
@@ -903,13 +917,30 @@ compiler."
          prev=
          continue
          ;;
-       rpath)
-         rpath="$rpath $arg"
-         prev=
-         continue
-         ;;
-       xrpath)
-         xrpath="$xrpath $arg"
+       rpath | xrpath)
+         # We need an absolute path.
+         case "$arg" in
+         /* | [A-Za-z]:[/\\]*) ;;
+         *)
+           absdir=`cd "$arg" && pwd`
+           if test -z "$absdir"; then
+             $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+             exit 1
+           fi
+           arg="$absdir"
+           ;;
+         esac
+         if test "$prev" = rpath; then
+           case "$rpath " in
+           *" $arg "*) ;;
+           *) rpath="$rpath $arg" ;;
+           esac
+         else
+           case "$xrpath " in
+           *" $arg "*) ;;
+           *) xrpath="$xrpath $arg" ;;
+           esac
+         fi
          prev=
          continue
          ;;
@@ -928,7 +959,6 @@ compiler."
        if test -n "$link_static_flag"; then
          compile_command="$compile_command $link_static_flag"
          finalize_command="$finalize_command $link_static_flag"
-         dlopen_self=$dlopen_self_static
        fi
        continue
        ;;
@@ -955,22 +985,16 @@ compiler."
        ;;
 
       -export-dynamic)
-       if test "$export_dynamic" != yes; then
-         export_dynamic=yes
-         if test -n "$export_dynamic_flag_spec"; then
-           eval arg=\"$export_dynamic_flag_spec\"
-         else
-           arg=
-         fi
-       fi
+       export_dynamic=yes
+       continue
        ;;
 
       -export-symbols | -export-symbols-regex)
        if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-         $echo "$modename: cannot have more than one -exported-symbols"
+         $echo "$modename: not more than one -exported-symbols argument allowed"
          exit 1
        fi
-       if test "$arg" = "-export-symbols"; then
+       if test "X$arg" = "X-export-symbols"; then
          prev=expsyms
        else
          prev=expsyms_regex
@@ -979,7 +1003,7 @@ compiler."
        ;;
 
       -L*)
-       dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
+       dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
        case "$dir" in
        /* | [A-Za-z]:[/\\]*)
          # Add the corresponding hardcode_libdir_flag, if it is not identical.
@@ -1010,31 +1034,29 @@ compiler."
        ;;
 
       -l*)
-       if test "$arg" = "-lm"; then
+       if test "$arg" = "-lc"; then
+         case "$host" in
+         *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
+           # These systems don't actually have c library (as such)
+           continue
+           ;;
+         esac
+       elif test "$arg" = "-lm"; then
          case "$host" in
          *-*-cygwin* | *-*-beos*)
-           # Ignore -lm on Cygwin and BeOS
+           # These systems don't actually have math library (as such)
            continue
            ;;
-         esac  
-       elif test "$arg" = "-lc"; then
-         # Always ignore -lc
-         continue
+         esac
        fi
        deplibs="$deplibs $arg"
        ;;
 
       -module)
-       if test "$module" != yes; then
-         module=yes
-         if test -n "$export_dynamic_flag_spec"; then
-           eval arg=\"$export_dynamic_flag_spec\"
-         else
-           arg=
-         fi
-       fi
+       module=yes
+       continue
        ;;
-       
+
       -no-undefined)
        allow_undefined=no
        continue
@@ -1058,7 +1080,23 @@ compiler."
        ;;
 
       -R*)
-       xrpath="$xrpath "`$echo "X$arg" | $Xsed -e 's/^-R//'`
+       dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+       # We need an absolute path.
+       case "$dir" in
+       /* | [A-Za-z]:[/\\]*) ;;
+       *)
+         absdir=`cd "$dir" && pwd`
+         if test -z "$absdir"; then
+           $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+           exit 1
+         fi
+         dir="$absdir"
+         ;;
+       esac
+       case "$xrpath " in
+       *" $dir "*) ;;
+       *) xrpath="$xrpath $dir" ;;
+       esac
        continue
        ;;
 
@@ -1067,7 +1105,6 @@ compiler."
        if test -z "$pic_flag" && test -n "$link_static_flag"; then
          compile_command="$compile_command $link_static_flag"
          finalize_command="$finalize_command $link_static_flag"
-         dlopen_self=$dlopen_self_static
        fi
        continue
        ;;
@@ -1431,6 +1468,12 @@ compiler."
       exit 1
     fi
 
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
     oldlibs=
     # calculate the name of the file, without its directory
     outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
@@ -1473,7 +1516,7 @@ compiler."
        $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
       fi
 
-      if test -n "$export_symbols"; then
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
        $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
       fi
 
@@ -1512,11 +1555,6 @@ compiler."
        output_objdir="$output_objdir/$objdir"
       fi
 
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
-
       if test -n "$objs"; then
        $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
        exit 1
@@ -1840,7 +1878,6 @@ EOF
              fi
            done
          fi
-         deplibs=$newdeplibs
          ;;
        file_magic*)
          set dummy $deplibs_check_method
@@ -1894,7 +1931,8 @@ EOF
            fi
          done # Gone through all deplibs.
          ;;
-       none | unknown | *) newdeplibs=""
+       none | unknown | *)
+         newdeplibs=""
          if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
               -e 's/ -[LR][^ ]*//g' -e 's/[    ]//g' |
             grep . >/dev/null; then
@@ -1936,21 +1974,23 @@ EOF
            else
              build_libtool_libs=no
            fi
-           dlname=
-           library_names=
          else
            echo "*** The inter-library dependencies that have been dropped here will be"
            echo "*** automatically added whenever a program is linked with this library"
            echo "*** or is declared to -dlopen it."
          fi
        fi
+       # Done checking deplibs!
+       deplibs=$newdeplibs
       fi
 
-      # test again, we may have decided not to build it any more
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+      
+      # Test again, we may have decided not to build it any more
       if test "$build_libtool_libs" = yes; then
-       deplibs=$newdeplibs
-       # Done checking deplibs!
        # Get the real and link names of the library.
        eval library_names=\"$library_names_spec\"
        set dummy $library_names
@@ -2180,11 +2220,6 @@ EOF
        fi 
       fi
     
-      if test "$dlself" = yes && test "$export_dynamic" = no; then
-       $echo "$modename: error: \`-dlopen self' requires \`-export-dynamic'" 1>&2
-       exit 1
-      fi
-
       if test -n "$rpath$xrpath"; then
        # If the user specified any rpath flags, then add them.
        for libdir in $rpath $xrpath; do
@@ -2359,7 +2394,6 @@ extern \"C\" {
              $run $rm $export_symbols
              $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
            else
-             $run $rm $export_symbols
              $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$objdir/$output.exp"'
              $run eval 'grep -f "$objdir/$output.exp" < "$nlist" > "$nlist"T'
              $run eval 'mv "$nlist"T "$nlist"'
@@ -2566,7 +2600,7 @@ static const void *lt_preloaded_setup() {
        fi
       fi
 
-      # Delete the old output file.
+      # Delete the old output files.
       $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
 
       $show "$link_command"
@@ -2856,7 +2890,15 @@ fi\
 
       # Only create the output if not a dry run.
       if test -z "$run"; then
-       $echo > $output "\
+       for installed in no yes; do
+         if test "$installed" = yes; then
+           if test -z "$install_libdir"; then
+             break
+           fi
+           output="$output_objdir/$outputname"i
+         fi
+         $rm $output
+         $echo > $output "\
 # $output - a libtool library file
 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
 
@@ -2878,15 +2920,12 @@ age=$age
 revision=$revision
 
 # Is this an already installed library?
-installed=no
+installed=$installed
 
 # Directory that this library needs to be installed in:
 libdir='$install_libdir'\
 "
-
-       $rm "$output_objdir/$outputname"i
-       sed 's/^installed=no$/installed=yes/' \
-         < "$output" > "$output_objdir/$outputname"i || exit 1
+       done
       fi
 
       # Do a symbolic link so that the libtool archive can be found in
index 67806b8870cfb69f7cc061e89b015dd5b37abb3c..c6f5f48f42cd0431325eb5a7acb11c9fc0273981 100644 (file)
@@ -1,5 +1,5 @@
-# A brief demonstration of Libtool modules. -*-Makefile-*-
-#
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = no-dependencies foreign
 
 INCLUDES = -I$(srcdir)/../libltdl
index 1c17ed5bc8f2ba6edbb05b6299979619bcf98989..495670dd57208a9108af327332f2149dabf9c3a0 100644 (file)
@@ -1,4 +1,5 @@
-dnl Initialize the mdemo package.
+dnl Process this file with autoconf to create configure.
+
 AC_INIT(main.c)
 AM_INIT_AUTOMAKE(mdemo,0.1)
 
index 1e43e5d6a30e4f20b0a20863d58ee135546fe49a..9ebe3adad5e63825f8c81d57b98884ae2f638628 100644 (file)
@@ -1,4 +1,4 @@
-## Process this file with automake to create Makefile.in -*-Makefile-*-
+## Process this file with automake to produce Makefile.in
 
 AUTOMAKE_OPTIONS = gnits