Index: libtool/.cvsignore diff -c /dev/null libtool/.cvsignore:1.2 *** /dev/null Thu Apr 29 16:10:58 1999 --- libtool/.cvsignore Sun Mar 14 06:42:46 1999 *************** *** 0 **** --- 1,12 ---- + .*.prcs_aux + Makefile + Makefile.in + acinclude.m4 + aclocal.m4 + clibtool.cfg + configure + config.* + libtool + ltmain.sh + ltconfig + libtoolize Index: libtool/AUTHORS diff -c libtool/AUTHORS:1.1.1.1 libtool/AUTHORS:1.4 *** libtool/AUTHORS:1.1.1.1 Tue Apr 1 20:25:22 1997 --- libtool/AUTHORS Fri Nov 27 16:17:20 1998 *************** *** 1,3 **** ! Authors of GNU Libtool. Gordon Matzigkeit. Designed and implemented libtool. --- 1,8 ---- ! Authors of GNU Libtool. The following people contributed enough in ! order to warrant exchanging legal papers with the Free Software ! Foundation. Gordon Matzigkeit. Designed and implemented libtool. + Alexandre Oliva . Co-maintainer. + Thomas Tanner . Co-maintainer. + Gary V. Vaughan . Co-maintainer. \ No newline at end of file Index: libtool/ChangeLog diff -c libtool/ChangeLog:1.1.1.80 libtool/ChangeLog:1.385.2.117 *** libtool/ChangeLog:1.1.1.80 Fri Mar 20 08:58:42 1998 --- libtool/ChangeLog Thu Apr 29 15:07:13 1999 *************** *** 1,1554 **** ! 1998-03-20 Gordon Matzigkeit ! * Release 1.2. ! 1998-03-18 Gordon Matzigkeit ! * ltmain.in: Rearrange some of the echos to make them more ! consistent. ! 1998-03-14 Gordon Matzigkeit ! * ltmain.in: Break up an echo command that causes Solaris printf ! to dump core. Apparently the Solaris people hardcoded a 2110-byte ! buffer into their printf(1). Feh. From John Judge. ! 1998-03-11 Gordon Matzigkeit ! * ltconfig.in: Change the test for the PIC compiler flag so that ! we assume it doesn't work if there are any warning messages. This ! fixes a bug using old GCC's on HP-UX. Reported by Akim Demaille. ! 1998-03-10 Andreas Schwab ! * Makefile.am ($(srcdir)/ltconfig): Remove bogus command to create ! a file ltconfig in the build directory. ! 1998-03-09 Andreas Schwab ! * ltmain.in: Avoid unnecessary use of command substitution, ! replacing foo=`eval \\$echo \"$mumble\"` by eval foo=\"$mumble\". ! (link): Use ${1+"$@"} in wrapper scripts in order to pass ! arguments safely to a program. ! * ltconfig.in: Use -fpic instead of -fPIC if $host_cpu matches ! m68*. ! 1998-03-08 Gordon Matzigkeit ! * Release 1.1. ! * ltmain.in: I like `here documents' a lot, but apparently ! they are so badly handled by old and buggy /bin/sh's, that ! replacing `cat < ! * ltconfig.in: Copy the contents of ltmain.sh into the generated ! libtool. This should more than halve the execution times on old ! or buggy /bin/sh systems, such as HP-UX 9 and SunOS 4.1.4. From ! Tom Lane. ! 1998-03-05 Gordon Matzigkeit ! * libtool.m4 (AM_ENABLE_SHARED, AM_ENABLE_STATIC): Add support for ! the `default' package, so that people can control unnamed ! packages. ! (LD): Only add an ABI flag under IRIX 6.x, since IRIX 5.x doesn't ! support them. From Alexandre Oliva. ! 1998-03-01 Gordon Matzigkeit ! * ltconfig.in: Port to UnixWare 2.x. From Christopher Olsen. ! 1998-02-25 Gordon Matzigkeit ! * ltmain.in (compile): For consistency, honour the `-static' flag ! during compilation. ! 1998-02-23 Brendan Kehoe ! * libtool.m4 (AM_ENABLE_SHARED, AM_ENABLE_STATIC): For ! --enable-shared, heed the value of $PACKAGE from AM_INIT_AUTOMAKE ! if given as the argument for the library to be built shared. ! 1998-02-20 Gordon Matzigkeit ! * libtool.m4, ltconfig.in (NM): Fix up a typo confusion between ! $ac_dir and $dir. Reported by Akim Demaille. ! * ltmain.in (link): Don't allow both `-version-info' and ! `-release'. Reported by Danny Backx. ! 1998-02-18 Gordon Matzigkeit ! * Makefile.am (noinst_SCRIPTS): Remove lineno from distribution. ! * lineno: Remove from distribution, as it is no longer needed. ! * Makefile.am ($(srcdir)/ltconfig.in, $(srcdir)/ltmain.sh): ! Rewrite these rules not to use config.status or lineno. This ! makes things simpler, and reduces dependencies, so that the ! scripts are rebuilt and installed in srcdir only when necessary. ! Reported by Stephan Kulow. ! 1998-02-16 Gordon Matzigkeit ! * libtool.m4, ltmain.in, ltconfig.in: Correctly identify absolute ! directory names on MS-DOS. Suggested by Bob Friesenhahn. ! * ltconfig.in, ltmain.in, libtool.m4: Change a bunch of `sed N!d' ! commands to `sed Nq', for efficiency. ! * ltmain.in: Only egrep the first few lines of files in order to ! determine if they were libtool-generated. This prevents egrep(1) ! from taking forever to look at a 10MB binary on Solaris. From ! Stephan Kulow. ! 1998-02-11 Gordon Matzigkeit ! * ltconfig.in (no_undefined_flag): Add a flag to declare under ! Solaris that the library should not have any undefined ! references. Suggested by Bob Friesenhahn. ! * ltmain.in (mkdir): Fix one more mkdir race. From H.J. Lu. ! 1998-02-08 Gordon Matzigkeit ! * ltconfig.in, ltmain.in (striplib, old_striplib): Ditto. ! * ltconfig.in (profile_flag_pattern): Get rid of dead code. ! 1998-02-07 Gordon Matzigkeit ! * libtool.m4 (AM_ENABLE_SHARED, AM_ENABLE_STATIC): New macros to ! modify the `--enable-shared' and `--enable-static' defaults in the ! configure script. This works a lot better than the old ! `enable_shared' and `enable_static' variables did. Reported by ! Bob Friesenhahn. ! 1998-02-07 Samuel Tardieu ! * ltmain.in: Recognize .ada, .ads and .adb as known suffixes (they ! are used by GNAT, the GNU Ada compiler). ! 1998-02-06 Gordon Matzigkeit ! * ltconfig.in: Turn on IRIX shared libraries again! ! * libtool.m4 (LD): Use file(1) to discover which ABI we're using ! on IRIX, and propagate the correct linker flag. From Jim Wilson. ! * ltconfig.in, ltmain.in (Xsed): `arg=-n; echo "$arg" | sed ...' ! gives problems, because the `-n' is interpreted as an option to ! echo(1). So, use `echo "X$arg" | sed -e 's/^X//' ...' everywhere, ! via the $Xsed convenience variable. Suggested by H.J. Lu. ! 1998-02-02 Gordon Matzigkeit ! * ltconfig.in: Turn off IRIX shared library support until 32-bit ! and 64-bit ABI differences can be resolved. ! 1998-01-28 Gordon Matzigkeit ! * libtool.m4 (LD): Reverse yesterday's change because `-old_ld' ! isn't accepted by GCC. ! 1998-01-27 Gordon Matzigkeit ! * ltconfig.in (soname_spec): Add in user-specified release numbers ! for every host system that supports an soname that differs from ! the linkname. ! * libtool.m4 (LD): Add `-old_ld' to the list of flags that need to ! be passed through on SGI. Reported by Chris Lee. ! * ltmain.in (release): Prepend a hyphen to the release number, and ! fix a typo because `-version-info' takes only 3 args. From ! H.J. Lu. ! 1998-01-25 Gordon Matzigkeit ! * ltconfig.in (library_names_spec): On Linux, use the ! user-specified release. ! * ltmain.in (link): Allow the user to specify a release number for ! the library using the `-release' flag. Suggested by H.J. Lu and ! Ian Lance Taylor. ! 1998-01-19 Gordon Matzigkeit ! * ltconfig.in (old_postuninstall_cmds): Reorder so that chmod ! happens after ranlib. From Markus F.X.J. Oberhumer. ! * ltmain.in (mode): Added `gcc*' and `*-gcc*' to the patterns that ! recognize compilers. From Pieter Schoenmakers. ! (link): Recognize `.a' files again. Suggested by Pieter ! Schoenmakers. ! 1998-01-18 Gordon Matzigkeit ! * ltmain.in (compile): Recognize `.asm' extension, for use with ! the nasm assembler. From Markus F.X.J. Oberhumer. ! 1998-01-12 Gordon Matzigkeit ! * ltconfig.in (runpath_var): Use instead of ! `hardcode_runpath_var'. ! 1998-01-11 Gordon Matzigkeit ! * ltmain.in (finish): Add a better --finish message. Suggested by ! Kenneth Albanowski. ! * ltconfig.in, ltmain.in: Fix a few typos. ! 1998-01-03 Gordon Matzigkeit ! * ltmain.in (link): Quote the definition of $echo in the wrapper ! script. ! * ltconfig.in (export_dynamic_flag_spec): Use `--export-dynamic' ! instead of `-export-dynamic', which is not accepted by all GNU ! ld's. From Eiichi Takamori. ! * ltmain.in (install): Don't print silly `library stripping' ! warnings. Reported by François Pinard. ! 1997-12-19 Gordon Matzigkeit ! * ltmain.in: Don't forget to quote the CDPATH substitution. From ! Tor Lillqvist. ! 1997-12-18 Gordon Matzigkeit ! * ltconfig.in, ltmain.in (CDPATH): Unset this environment variable ! so that HP-UX shells, at least, don't print out the directory name ! after a `cd' command. From Tor Lillqvist. ! 1997-12-10 Gordon Matzigkeit ! * demo/Makefile.am (hardcode): Change a bunch of references to ! `$(LIBS)' to `-lm', since we no longer put -lm in LIBS. ! * demo/configure.in: Delete the test for libm, since it is ! standard on every system. ! * demo/Makefile.am (libhello_la_LDFLAGS): Change to include -lm, ! in accordance with new inter-library dependency code. ! * ltmain.in (dependency_libs): Added to help people link programs ! without having to explicitly specify inter-library dependencies. ! * ltconfig.in (COLLECT_NAMES): Oops... I forgot to apply the AIX 3 ! restriction to the generated libtool script. Reported by Stefan ! Westerfeld. ! 1997-12-05 Gordon Matzigkeit ! * ltconfig.in (thisdir): Quote $echo in the generated libtool ! script for HP-UX. From Markus F.X.J. Oberhumer. ! * ltmain.in (link): Recognize the `.s' suffix. From Markus ! F.X.J. Oberhumer. ! * ltconfig.in (link_static_flag): Don't quote ${wl} on HP-UX ! because link_static_flag is never evaled. From Eric Backus. ! 1997-12-01 Gordon Matzigkeit ! * demo/Makefile.am (helldl_DEPENDENCIES): Add `libhello.la' to our ! dependencies so that parallel builds work correctly. From Jim ! Meyering. ! * Makefile.am ($(srcdir)/ltconfig, $(srcdir)/ltmain.sh): Rewrite ! these rules so that they are parallelizable. Reported by Jim ! Meyering. ! * ltconfig.in (ltecho): We need special handling to quote the ! `echo' variable itself. From Alexandre Oliva. ! 1997-11-29 Gordon Matzigkeit ! * ltconfig.in (COLLECT_NAMES): Enable this workaround for a broken ! collect2 only on AIX 3. This avoids problems on other AIX ! versions. Reported by Stefan Westerfeld. ! * ltmain.in, ltconfig.in (finish_eval): Variable like finish_cmds, ! except it is a single command which is evaled, and not shown. ! * ltconfig.in: Port to AmigaOS. From Joop van de Wege. ! * ltmain.in (echo): Delete preamble to check for a working echo, ! since we just use the one included in the generated libtool. ! * ltconfig.in (echo): Include this definition in the generated ! libtool script. ! 1997-11-28 Gordon Matzigkeit ! * ltconfig.in, libtool.m4 (NM): Add /usr/ccs/bin to the PATH ! before checking. From Kaveh R. Ghazi. ! (NM): Delete an extraneous egrep from ltconfig. ! * ltconfig.in (finish_cmds): Change back to using `ldconfig -n'. ! This makes Linux behave like other systems, which is more in line ! with what libtool needs. ! 1997-11-27 Gordon Matzigkeit ! * ltmain.in: Change a whole bunch of `progname' variables to ! `modename'. This is for clarity, and to fix a tiny typo in finish ! mode. ! * libtool.spec (Name, Version): Ditto. ! * configure.in (AM_INIT_AUTOMAKE): Use PRCS to automatically generate ! the proper package name and version number. ! * ltconfig.in (gnu_ld_acts_native): Treat GNU ld like the native ! linker on SunOS 4.x. Suggested by Alexandre Oliva. ! (deplibs): Change the defaults all over, since most systems cannot ! handle inter-library depdencies. ! * libtool.m4, ltconfig.in (NM): Only look at the first line of the ! output from NM when determining whether it supports a command line ! option. This prevents false positives on OSes which ignore ! invalid flags, like HP-UX, which prints `nm: unknown option "B" ! ignored'. Reported by Kaveh R. Ghazi. ! * ltconfig.in (finish_cmds): On Linux, update ld.so.cache by ! removing the `-n' flag from ldconfig. Suggested by Kenneth ! Albanowski. ! * Makefile.am (maintainer-checkin, maintainer-release): New ! commands to reap the full benefit of using PRCS to maintain ! libtool version numbers. ! * ltconfig.in, ltmain.in (global_symbol_pipe): Explicitly cast all ! addresses to __ptr_t. This fixes a bug due to a strict IRIX ! compiler. Suggested by Kaveh R. Ghazi. ! 1997-11-23 Gordon Matzigkeit ! * ltmain.in (echo): For aesthetics, avoid using `$echo' when ! `echo' will do *exactly* the same thing. This prevents ugly ! `printf %s\n timestamp > some.lo' commands from appearing in the ! libtool output. ! (link): Delete the `-allow-undefined' flag because it is now the ! default. Make `-no-undefined' in order for people to declare that ! a library is entirely self-contained. This prevents maintainers ! from accidentally creating shared libraries that won't work on ! AIX. Reported by Stefan Westerfeld and Danny Backx. ! * ltconfig.in (echo): Use an echo variable, just as in ltmain.in, ! because we need it for quoting substitutions. For most of the ! script, though, use the default echo, just like Autoconf does. ! Without this patch, character \001 ends up in global_symbol_pipe. ! Reported by Lars Hecking and Jürgen Fluk. ! * ltmain.in (echo): Set default to `echo=echo'. Ooops. That's ! what you get for testing obscure code paths and forgetting to ! revert to the original version. Reported by Danny Backx. ! 1997-11-14 Gordon Matzigkeit ! * ltconfig.in (hardcode_libdir_flag_spec): Set to `-R' for FreeBSD ! 2.2. From Sean Kelly. ! (postuninstall_cmds, old_postuninstall_cmds): Commands to run ! after uninstall mode deletes the libraries. Suggested by Joop van ! de Wege. ! (export_dynamic_flag_spec): On HP-UX, add the `${wl}-E' ! export_dynamic_flag_spec. Reported by Matthias Hoelzer. ! 1997-11-11 Gordon Matzigkeit ! * ltconfig.in, ltmain.in (sed_quote_subst): Oops. We forgot to ! quote backticks. Reported by Joop van de Wege. ! 1997-11-09 Gordon Matzigkeit ! * ltconfig.in (symcode): On IRIX, don't extract undefined ! symbols. When a function is inlined by G++, references to it are ! still marked as undefined in the object file. This means that our ! symbol file causes undefined references, because there are ! actually no matching global symbols. Reported by Paul Kendall. ! 1997-11-08 Gordon Matzigkeit ! * ltconfig.in: Don't forget to redirect the COLLECT_NAMES libtool ! script fragment to the generated libtool, rather than to stdout. ! 1997-11-07 Gordon Matzigkeit ! * libtool.m4 (LD): Add a more sophisticated test to determine the ! ABI flag on IRIX 6. Suggested by Lars Hecking and Ian Lance ! Taylor. ! * ltconfig.in, ltmain.in (COLLECT_NAMES): Only export this ! variable if we are running under AIX. Otherwise, we tickle a g++ ! bug under IRIX. From Paul Kendall. ! * Change bug reporting address to . ! * ltconfig.in (allow_undefined_flag): OSF/1 3.x also requires a ! wildcard argument to `-expect_unresolved'. From Stephan Kulow. ! 1997-11-06 Gordon Matzigkeit ! * ltmain.in (link): Use libname_spec. ! * ltconfig.in (pic_flag): Somehow, the HP-UX pic_flag (`+Z') was ! dropped between libtool-1.0 and now. Add it back in. Reported by ! Akim Demaille. ! Integrated more patches for OS/2. From Jeff Freedman. ! (libname_spec): New variable for OSes that don't require their ! libraries to look like `libNAME.a'. ! * ltmain.in (link): Only use global_symbol_pipe if it has been ! defined. From Stephan Kulow. ! * ltconfig.in (global_symbol_pipe): Protect C fragment under C++ ! compilers. From Stephan Kulow. ! * Makefile.am ($(srcdir)/acinclude.m4, ! $(srcdir)/demo/acinclude.m4): Change rules to use LN_S so that ! they can be run on any system. ! * ltconfig.in (archive_cmds): For NetBSD, don't include deplibs. ! From Dieter Baron. ! * ltmain.in (mkdir): Check that the directory doesn't exist before ! we exit with error, so that we don't get races during parallel ! builds. From H.J. Lu. ! (fbsd_hideous_sh_bug): Apparently, some FreeBSD /bin/sh's have a ! bug that will empty base_compile unless we do this dummy ! assignment. From Marc van Kempen. ! 1997-10-22 Gordon Matzigkeit ! * libtool.m4 (libtool_shared, libtool_static): Fixed logic error ! to reenable override of libtool's defaults by setting ! enable_shared or enable_static in configure.in. Reported by Tom ! Tromey and Stephan Kulow. ! * ltmain.in (link): Add explicit support for compiler options that ! begin with `+'. Reported by Aubert Pierre. ! 1997-10-20 Gordon Matzigkeit ! * ltmain.in: Silly me. Change a bunch of occurances of "* $dir *" ! into *" $dir "*. ! * ltconfig.in (pic_flag): PIC is the default for AIX. From Mark ! Kettenis. It is also the default for OSF/1. ! * demo/Makefile.am (objdir): Quote double-quotes. From Mark ! Kettenis. ! * ltconfig.in (global_symbol_pipe): This variable is not ! double-evaled, so it should not be double quoted. From Mark ! Kettenis. ! 1997-10-19 Gordon Matzigkeit ! * ltconfig.in (LD): Same as below. ! * libtool.m4 (LD): Set LD if we discover an absolute path to GNU ! ld. This prevents breakage when `$CC -print-prog-name=ld' returns ! an absolute directory name. Reported by Ulrich Drepper. ! * ltconfig.in: Port to OS/2 using EMX. From Jeff Freedman. ! * ltmain.in (link): Use old_archive_from_new_cmds. ! * ltconfig.in (old_archive_from_new_cmds): New variable to ! support DLL libraries. ! * ltmain.in (link): Only `eval' export_dynamic_flag_spec if it is ! not empty. Reported by Stephan Kulow. ! 1997-10-18 Gordon Matzigkeit ! * ltconfig.in (objdir): Use the .libs directory on all systems for ! which that name is valid, and _libs on the others (like MS-DOS). ! Suggested by Juergen Erhard. ! 1997-10-14 Gordon Matzigkeit ! * ltmain.in (link): Added a bit more inter-language support to the ! symbol file generation process. ! Instead of complaining about unrecognized argument suffices, pass ! them to the linker. This prevents libtool from barfing on ! mandatory arguments to linker flags. Reported by Michael ! Tiemann. ! 1997-10-09 Gordon Matzigkeit ! * ltmain.in (link): Change the wrapper script to follow symlinks ! in order to find thisdir. This should put the final nail in the ! coffin for problems with wrapper scripts. From Ian Lance Taylor. ! 1997-10-07 Gordon Matzigkeit ! * ltmain.in: Change a few `$echo' commands into `$show' to make ! --silent mode behave as advertised. ! * ltconfig.in (allow_undefined_flag): On OSF/1 4.x, use ! `-expect_unresolved \*'. From Christian Mondrup. ! * ltmain.in (install): Change install mode to allow a specified ! /bin/sh argument at the beginning of the install_prog. Also, ! specify the shell to run when invoking libtool recursively for ! finish mode. From Chris Provenzano. ! ! * libtool.m4 (LIBTOOL): Change definition to include $(SHELL). ! From Chris Provenzano. ! ! * ltconfig.in: Port to UTS 4.x. From Alistair Crooks. ! ! * demo/Makefile.am (hc-libflag): Add rules to make this binary for ! hardcode.test. ! ! 1997-09-24 Gordon Matzigkeit ! ! * ltconfig.in (LD): As with libtool.m4, don't override LD. ! Do a whole bunch of ac_t quoting. ! ! 1997-09-24 Ian Lance Taylor ! ! * libtool.m4 (AM_PROG_LD): Don't override LD in the environment. ! ! 1997-09-21 Gordon Matzigkeit ! ! * libtool.m4, ltconfig.in (NM): Arguments to the for loop must be ! whitespace separated. This fixes a bug under FreeBSD's /bin/sh. ! From George Scott. ! ! 1997-09-20 Gordon Matzigkeit ! ! * ltmain.in (deplibs): When building shared libraries, always add ! -lc to deplibs. Reported by Andreas Jellinghaus. ! ! 1997-09-15 Gordon Matzigkeit ! ! * ltconfig.in, ltmain.in (COLLECT_NAMES): If the COLLECT_NAMES ! environment variable has not been set, set it to empty. This ! apparently fixes the AIX bug with GCC's collect2. Reported by ! Mark Kettenis. ! ! * demo/Makefile.am, ltmain.in, tests/hardcode.test (objdir): ! Changed objdir variable .libs to _libs. This is another MS-DOS ! portability fix. Suggested by Robert Hoehne. ! ! 1997-09-13 Gordon Matzigkeit ! ! * ltconfig.in, ltmain.in (hardcode_minusL): Fix typo by renaming ! hardcode_minusL to hardcode_minus_L. Also add FreeBSD ! hardcode_libdir_flag_spec. From Paul Traina. ! ! * ltmain.in (link): Honour multiple `-rpath' flags when linking ! programs. Suggested by Bengt Martensson. ! Quote appearances of $echo in the wrapper script. From Alexandre ! Oliva. ! ! * Makefile.am, configure.in, tests/tlibtool: Use ltmain.in instead ! of ltmain.sh.in. ! ! * ltmain.in: Rename ltmain.sh.in to ltmain.in. This fixes a ! portability problem (on MS-DOS, of all places!). From Robert ! Hoehne. ! ! 1997-09-11 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Do not transform libtool objects to regular ! objects if we did not build old libs. Reported by Tomas Hiller. ! ! 1997-09-05 Gordon Matzigkeit ! ! * demo/Makefile.am (hell_debug_LDFLAGS): Change hell.static to ! hell.debug in order to reflect the new static linking semantics. ! ! * ltmain.sh.in (link): Add new `-all-static' flag to prevent all ! dynamic linking. The old `-static' flag just prevents dynamic ! linking against libtool libraries. Suggested by Bengt ! Martensson. ! ! * ltconfig.in (with_gnu_ld): Add a test to make sure that we are ! actually using GNU ld. This fixes an inconsistency when running ! ltconfig without using libtool.m4. Reported by Ulrich Drepper. ! (global_symbol_pipe): Delete symbols that are not valid C ! identifiers. Reported by Johan Danielsson and Bengt Martensson. ! ! 1997-09-04 Gordon Matzigkeit ! ! * ltmain.sh.in (echo): Quote all the uses of `echo' in all eval ! statements. Reported by Bengt Martensson and Alexandre Oliva. ! (echo): Need to surround test args with double quotes, or the echo ! test fails on Digital Unix 4.0. From Todd Kover. ! ! 1997-08-28 Gordon Matzigkeit ! ! * ltmain.sh.in (echo): Change test to one that uses printf. ! This works on AIX, which has the same problems that Solaris does, ! but no working echo program. ! ! 1997-08-27 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Make sure that compile_command and ! finalize_command are always evaled. Quote any unknown linker ! flags we need to pass through. ! (compile): Use quoting for flags we pass. ! (echo): I hate Sun! The /usr/bin/echo on Solaris handles ! backslash sequences, which makes it impossible to do backslash ! quoting using echo and sed. So, we search for an echo that obeys ! the `echo '\t'` = '\t' equality. Then we use `$echo' everywhere ! in ltmain.sh. ! Put tabs back into the ${IFS= } sequences. Emacs untabify is ! libtool bane. ! ! * ltconfig.in: Quote all variable values that may contain ! metacharacters creating the libtool script. This provides ! complete protection, so that even single-quotes may appear inside ! a libtool variable value. ! ! * ltmain.sh.in (link): Quote finalize_command before putting it in ! the wrapper script. ! ! 1997-08-26 Gordon Matzigkeit ! ! * ltmain.sh.in (sed_quote_subst): Change the quoting procedure ! again. I think that the new one is robust for *all* characters, ! including whitespace and metacharacters. ! ! 1997-08-25 Gordon Matzigkeit ! ! * ltmain.sh.in: Change quoting procedure because some shells ! cannot handle `]' in scan sets. From Ian Dall. ! ! 1997-08-22 Gordon Matzigkeit ! ! * ltmain.sh.in (execute): Added -dlopen flag handling. Suggested ! by Alexandre Oliva. ! ! 1997-08-21 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Change executable wrapper to fix up value ! of thisdir, as well as progdir, if the $0 path doesn't work. This ! guarantees that shlibpath_var is set correctly. Add support for ! execute mode. ! ! * ltmain.sh.in (execute): New mode to automatically set ! shlibpath_var, which allows easy debugging of uninstalled ! executables and libraries. Suggested by Kenneth Albanowski. ! ! 1997-08-20 Gordon Matzigkeit ! ! * Makefile.am ($(srcdir)/ltconfig): Use lineno. ! ! * configure.in: Add AM_PROG_AWK for lineno. ! ! * lineno: New program to automatically put line numbers in ! ltconfig. ! ! * libtool.m4, ltconfig.in (AM_PROG_LD): Yet Another Rewrite, which ! incorporates the results of `gcc -print-program-name=ld'. ! Suggested by Alexandre Oliva. ! ! 1997-08-14 Gordon Matzigkeit ! ! * ltmain.sh.in: Accept `--quiet' and `--silent' flags to turn off ! command echoing. From Juergen A. Erhard. ! ! (compile): Recognize the Objective C `.m' extension. From Juergen ! A. Erhard. ! ! (compile): Suppress error output from the second compilation (if ! any) so that we don't get those frustrating duplicate error ! messages. ! ! 1997-08-12 Gordon Matzigkeit ! ! * ltconfig.in: Added messages to config.log to describe what sort ! of test we are running. ! (pic_flag): Added a sanity check for pic_flag. This should fix ! bugs reported using the cc bundled with HP-UX 10. Suggested by ! Bruno Haible and Akim Demaille. ! ! 1997-08-01 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Add -dlopen and -dlpreopen support for ! libtool objects. This means that dlopened modules no longer need ! to be shared libraries. ! ! * ltconfig.in (pic_flag): GCC on IRIX 6 always builds PIC. ! Reported by Ian Lance Taylor. ! ! * libtool.m4 (LD): Always add `-n32' to the linker if we are using ! GCC on IRIX 6. Reported by Ian Lance Taylor. ! ! 1997-07-30 Gordon Matzigkeit ! ! * libtool.m4 (AM_PROG_LIBTOOL): Explicitly check enable_shared and ! enable_static rather than just enableval. This allows ! configure.in scripts to set their own defaults. Suggested by ! Tommy Reilly. ! ! 1997-07-29 Gordon Matzigkeit ! ! * ltmain.sh.in: Add NLS environment variable handling copied from ! ltconfig.in. Reported by Akim Demaille. ! (link): If allow_undefined_flag is not supported, then turn on old ! libraries. Reported by Akim Demaille. ! ! * demo/dlmain.c (main): Use dld_preloaded_symbol_count to display ! a message about the sortedness of the symbol table. ! ! * ltconfig.in (nlist): Use an nlist convenience variable, so that ! code can be shared directly with ltmain.sh.in. ! ! * ltconfig.in, ltmain.sh.in (dld_preloaded_symbol_count): Count up ! the number of symbols in the dld_preloaded_symbols. Set to `-1' ! if the list wasn't both sorted and counted. This allows ! applications to do a quick binary search, if they are so inclined. ! ! 1997-07-25 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Remove code for `-version-file', since it ! has been long-deprecated. ! ! Disable static linking if hardcode_direct is unsupported and there ! is no working link_static_flag. This provides correct behaviour ! for all cases on AIX 3, regardless of whether collect2 is broken ! or not. Reported by Mark Kettenis. ! ! * ltconfig.in: Fix typo in test polarity. From Mark Kettenis. ! ! 1997-07-24 Gordon Matzigkeit ! ! * ltconfig.in (hardcode_direct): Set to `unsupported' if aix3 uses ! a broken collect2. Adapted out of test results from Mark ! Kettenis. ! (link_static_flag): Make sure the link_static_flag actually works ! with a trivial binary. ! ! * ltmain.sh.in, ltconfig.in (export_dynamic_flag_spec): Renamed ! from export_dynamic_flag because we eval it in ltmain.sh. ! ! * ltmain.sh.in (link_static): Don't eval link_static_flag. ! ! * demo/dlmain.c (main): Change function prototype to be KNR ! compatible. From Kaveh R. Ghazi. ! ! * ltmain.sh.in (link): Use no_builtin_flag. This works around ! conflicting definitions of builtin functions with at least GCC. ! Reported by Kazuhiro Sasayama. ! ! * ltconfig.in (no_builtin_flag): New flag to turn off builtin ! functions when compiling an object file. ! (pipe_works): Use it. ! ! 1997-07-23 Gordon Matzigkeit ! ! * ltconfig.in (pic_flag): According to the libg++ 2.7.2 configure ! script, DEC alpha CPUs are PIC-only, as well. Reported by Kevin ! Jacobs. ! ! 1997-07-21 Gordon Matzigkeit ! ! * ltconfig.in, ltmain.sh.in: Replace all occurances of "sed 'X; ! Y'" with "sed -e 'X' -e 'Y'". ! ! * ltmain.sh.in (link): Finish full integration for `-dlopen' and ! `-dlpreopen'. ! ! Fix two silly typos where I used a compile_command in place of a ! finalize_command, and vice versa. ! ! Change the wrapper script to check a hardcoded path only if the ! argv[0] method fails. This is a compromise for the previous two ! patches, and should solve the majority of problems with wrapper ! scripts. From Kenneth Albanowski. ! ! (link): Change a reference to hardcode_libdir_colon_separated to ! use the new hardcode_libdir_separator variable. ! ! * demo/Makefile.am (helldl_LDFLAGS): Add `-export-dynamic' and ! `-dlpreopen' for building helldl. ! ! * demo/dlmain.c (main): Succeed, even if none of the libhello ! symbols have been preloaded. ! ! 1997-07-20 Gordon Matzigkeit ! ! * ltconfig.in (global_symbol_pipe): Add `U' to the accepted global ! symbol types. This means that we will get duplicate symbols, but ! we'll also be sure to get all global symbols used by the program. ! ! * ltconfig.in (pipe_works), ltmain.sh.in (link): Sort and make ! symbol output unique. ! ! 1997-07-19 Gordon Matzigkeit ! ! * ltconfig.in (pipe_works): Check to make sure our guessed ! global_symbol_pipe actually works. ! ! * ltmain.sh.in (link): Revert change from Kenneth Albanowski. The ! wrapper scripts are more reliable when they just use the argv[0] ! value. Generally, when the argv[0] method doesn't work, the user ! is trying to do something weird with an uninstalled binary, and ! should try a different approach. ! ! * ltconfig.in, ltmain.sh.in (CC): Always use `$CC' instead of ! `$cc'. This fixes a FreeBSD bug. Reported by Chuck Robey, and ! others. ! ! 1997-07-14 Gordon Matzigkeit ! ! * ltmain.sh.in (link): In wrapper scripts, hardcode the current ! directory to prevent phony argv[0] values from screwing up our ! program. From Kenneth Albanowski. ! ! 1997-07-13 Gordon Matzigkeit ! ! * Makefile.am (demo_distfiles): Add demo/dlmain.c to the ! distribution. ! ! 1997-07-12 Gordon Matzigkeit ! ! * demo/Makefile.am: Add helldl, made from dlmain.c, to demostrate ! `-dlopen' usage. ! ! * demo/dlmain.c: New file to demonstrate preloaded modules. ! ! * ltmain.sh.in (link): Add `-dlopen' flag to preload dynamic ! modules, even on static platforms. Use `$NM' and ! `$global_symbol_cmd' to extract symbols from required files. ! (dlname): Delete dlname mode entirely. It is rendered obsolete ! because the `.la' file format is now a public interface. ! ! * ltconfig.in (NM): New variable for BSD-compatible nm program. ! (global_symbol_cmd): Pipeline to extract global symbols from the ! nm output. ! ! * ltmain.sh.in: The .la file header should depend on `ltmain.sh', ! not `$PROGRAM'. ! (link): Make sure $export_dynamic_flag is eval'ed before it is ! used. ! ! 1997-07-11 Gordon Matzigkeit ! ! * libtool.spec: New Red Hat Package Manager specification file in ! order to help people prepare distributions of libtool for Linux. ! ! * ltmain.sh.in: Eliminate two accidental uses of the NONE magic ! value. These were breaking libtool's behaviour when no mode is ! specified. ! ! 1997-07-08 Gordon Matzigkeit ! ! * Release 1.0. ! ! * ltconfig.in: On SunOS, append /usr/etc to the PATH before ! running ldconfig; on *BSD, append /sbin. This was done in line ! with the Linux change suggested by Kenneth Albanowski. ! ! * demo/Makefile.am (hardcode_tests): Aesthetic change to ! alphabetize order of compiling the hardcode tests. ! ! * Makefile.am (EXTRA_DIST): Delete README-automake. ! ! * README-automake: Remove from distribution. ! ! 1997-07-02 Gordon Matzigkeit ! ! * ltmain.sh.in (link): In the executable wrapper, strip trailing ! colons from the shlibpath_var because some ld.so's, notably ! OpenBSD 2.0's (!), don't parse colon-terminated values correctly. ! From Tim Pierce. ! ! 1997-07-01 Gordon Matzigkeit ! ! * ltmain.sh.in, ltconfig.in: Eliminate uses of the NONE magic ! variable value. Use an empty variable instead. ! ! * ltconfig.in (with_gcc, with_gnu_ld): Do the tests for the C ! compiler and linker if the variables are unset, or if they are not ! GNU C and ld. ! (RANLIB): Eliminate redundant `if' statement. ! ! * configure.in: Use AM_PROG_LD. ! ! * libtool.m4 (AM_PROG_LD_GNU): New macro to determine if LD is GNU ! ld. ! (AM_PROG_LD): Rename AM_PATH_PROG_LD to AM_PROG_LD. Parameterize ! so that the user can specify `--with-gnu-ld' or `--without-gnu-ld' ! to indicate his preference. ! (AM_PROG_LIBTOOL): Use it. ! ! 1997-06-30 Gordon Matzigkeit ! ! * ltconfig.in: Append /sbin to the path before running ldconfig on ! Linux. This helps superusers who haven't set their PATH ! correctly. Suggested by Kenneth Albanowski. ! ! 1997-06-29 Gordon Matzigkeit ! ! * ltmain.sh.in: Change all the `eval "$run ..."' sequences to ! `$run "eval ..."'. ! ! Change all `$ln_s ...' sequences to use `(cd /dir && $LN_S ...)'. ! This is the sequence recommended by the Autoconf manual, and ! should avoid any problems on older machines. Eliminate all uses ! of `cp -p'. Reported by Akim Demaille. ! ! (install): Use `test $# -gt 0' instead of `test -n "$1"'. ! ! * ltconfig.in (LN_S): Add test to see if `ln -s' works. ! ! * libtool.m4: Increment serial number, and require AC_PROG_LN_S. ! ! 1997-06-26 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Add missing `test' statement. Reported by ! Akim Demaille. ! ! 1997-06-24 Gordon Matzigkeit ! ! * libtool.m4 (LD): Consistently use ac_cv_path_ld instead of ! am_cv_path_ld. From Tim Pierce. ! ! 1997-06-20 Gordon Matzigkeit ! ! * ltmain.sh.in: Redo two robustness fixes. Alexandre had the ! correct approach, but I botched them. ! ! * ltconfig.in (dynamic_linker): Disable shared libraries on ! MkLinux unless GNU libc is in use. Reported by Akim Demaille. ! ! 1997-06-19 Gordon Matzigkeit ! ! * ltmain.sh.in (install): Add a missing `test' command. Reported ! by Joel Weber. ! Miscellaneous fixes to improve robustness. From Alexandre Oliva. ! ! 1997-06-14 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Create invalid libtool objects when partial ! linking if we don't have PIC. From Jeff Dairiki. ! (install): Fix bug if libtool object is installed to a file name ! without directory components. From Jeff Dairiki. ! ! 1997-06-13 Gordon Matzigkeit ! ! * Makefile.am (demo/configure): Fix up rules to run autoconf. ! (aclocal.m4): Now we depend on our own libtool.m4. ! ! * configure.in (AM_PATH_PROG_LD): Use it. ! ! * libtool.m4 (AM_PATH_PROG_LD): New macro to find the linker used ! by the C compiler. ! (AM_PROG_LIBTOOL): Use it. ! ! * ltmain.sh.in (install, uninstall): Support installing and ! uninstalling `.lo' files. From Jeff Dairiki. ! ! 1997-06-11 Gordon Matzigkeit ! ! * Makefile.am (ltconfig, ltmain.sh): Only move if $(srcdir) is not ! the current directory. Don't regenerate every time the package is ! reconfigured. Reported by Tom Tromey. ! (MAINTAINERCLEANFILES): Added ltconfig, ltmain.sh, so that ! $(srcdir) is not messed with during a regular clean. ! ! 1997-06-10 Gordon Matzigkeit ! ! * Makefile.am (ltconfig, ltmain.sh): Be sure to move these files ! into $(srcdir) once they are created. ! ! * ltmain.sh.in (link): Disable building static libraries. ! People should use their favourite AR and RANLIB commands. ! Disable building old-style objects if `--disable-static' is ! given. Suggested by Tom Lees and Stephan Kulow. ! ! 1997-06-08 Gordon Matzigkeit ! ! * ltconfig.in (host_cpu, host_vendor, host_os): Patch up ! definitions, to allow for the fact that the host_os may contain ! hyphens (as in linux-gnu). From Scott Goehring. ! ! * ltmain.sh.in (link): Move the `dlname' setting closer to the top ! of the file. Suggested by David Mosberger-Tang. ! Symlink the libtool archive into the `.libs' directory so that it ! can be found by programs that want to find a library's dlname by ! searching LD_LIBRARY_PATH. Reported by David Mosberger-Tang. ! ! 1997-06-06 Gordon Matzigkeit ! ! * Tell people to report bugs to the new libtool mailing list, ! . ! ! 1997-06-05 Gordon Matzigkeit ! ! * ltconfig.in (allow_undefined_flag): New variable that implements ! `-allow-undefined'. ! (archive_cmds): Enable C++ constructors for FreeBSD 2.2. From ! David Nugent. ! ! * ltmain.sh.in (link): Accept new `-allow-undefined' flag when ! building libtool libraries. This tells libtool to allow ! unresolved symbols to exist in shared libraries. Basically, this ! turns off shared libraries on AIX. Suggested by Ian Lance Taylor. ! ! 1997-05-26 Gordon Matzigkeit ! ! * libtool.m4 (LD): On at least IRIX, many different flags need to ! be propagated to the linker if they are part of the compiler ! command line. Reported by Anthony Green. ! ! 1997-05-10 Gordon Matzigkeit ! ! * ltconfig.in: Trivial port to FreeBSD 3. From David Nugent. ! ! 1997-04-25 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Remove all traces of `-whole-archive', ! `-no-whole-archive', and libtool convenience libraries. They were ! more trouble than they're worth. If these are ever reimplemented, ! they need more careful attention to make portable. ! ! * libtool.m4, ltconfig.in: Added a `--disable-static' flag to turn ! off static library creation. From Tom Lees (who finally convinced ! me that it was the Right Thing to do). ! ! 1997-04-22 Gordon Matzigkeit ! ! * ltmain.sh.in (hardcode_runpath_var, runpath_var): Use them, if ! the linker has no -rpath flag. ! Quote the values we use to set runpath_var and shlibpath_var. ! (link): Use libobjlibs for libtool convenience libraries. ! ! * ltconfig.in (hardcode_runpath_var, runpath_var): Add new ! variables to describe linkers that honour `LD_RUN_PATH'. ! (host_cpu, host_os): Use these more specific variables, rather ! than the full canonical host system name. ! ! * ltmain.sh.in (dlname): Distinguish between missing ! `-export-dynamic' and when the library is only statically linked. ! ! 1997-04-21 Gordon Matzigkeit ! ! * ltconfig.in: Trivial port to OpenBSD by making it an alias for ! NetBSD. From Tim Pierce. ! ! 1997-04-16 Gordon Matzigkeit ! ! * ltconfig.in: Temporary measures to check for a broken collect2 ! program. Right now, we just see if we're using GCC on AIX 3. ! ! 1997-04-13 Gordon Matzigkeit ! ! * ltmain.sh.in (mode): Use `egrep -e' when inferring the operation ! mode. ! ! 1997-04-12 Gordon Matzigkeit ! ! * ltconfig.in (linker): Some GNU ld's don't accept `--version', ! but do accept `-v'. From Jukka Honkela. ! (ld_shlibs): AIX lossage may be settling down. AIX 3.2.5 ld does ! *not* hardcode direct libraries, but AIX 4.1.[45] ld does. ! ! 1997-04-07 Gordon Matzigkeit ! ! * ltconfig.in (hardcode_action): Fix silly logic error. From ! Bruno Haible. ! ! 1997-04-05 Gordon Matzigkeit ! ! * ltmain.sh.in (install): Relink if hardcode_action is `relink', ! rather than using complex conditionals based on the other ! hardcode variables. ! ! * ltconfig.in (hardcode_action): Set to `relink', not `immediate', ! if we can only hardcode existing directories. Rearrange ! conditionals to make the intent clearer, otherwise this can be one ! hellish piece of code for the already-dizzy libtool maintainer. ! ! 1997-04-02 Gordon Matzigkeit ! ! * replfunc.m4: Delete from the distribution. Documentation now ! describes how to set LTALLOCA and LTLIBOBJS in your own ! configure.in. ! ! * ltmain.sh.in (link): Make sure a libtool library only counts as ! a shared library if its library_names are non-null. ! Use timestamps for .lo's when PIC is turned off, rather than ! symlinking to the real object. This helps invalid mixtures of PIC ! and non-PIC to fail. ! ! 1997-04-01 Gordon Matzigkeit ! ! * Makefile.am (EXTRA_DIST): Distribute libtool.prj. ! ! * Shameless plug: Changed source code management system from CVS ! to PRCS. ! ! * libtool.scm: Initial Guile implementation of libtool. ! ! * ltmain.sh.in: An unexpected inconsistency in my whole approach ! to shared libraries has proven that libtool needs to be completely ! rewritten if I'm going to give full shared library support for ! platforms that don't use the GNU C library version 2 (which to my ! knowledge currently only works on GNU Hurd and Linux/GNU systems). ! Porting the GNU C library should not be difficult, though. ! ! Platforms that don't have the dlopen(3) family of functions will ! need to install GNU DLD version 4 in order to build any kind of ! libraries at all. Unfortunately, DLD 4 won't be released for a ! while, because I maintain it, and I'm too busy working on libtool. ! ! I'll keep the old ltconfig/ltmain.sh implementation around for as ! long as I can, and continue applying bug fixes, so that I'll have ! a reasonable starting point for this new libtool implementation. ! ! It looks like this implementation will be even more complex than ! the original (pre-0.7) libtool. Initial estimates show that it ! may be up to 3 times slower, and 5 times larger than libtool-0.9. ! I'll probably have to rewrite it in Guile to get reasonable ! performance, which will severely limit its portability for a ! while. ! ! That will also introduce a bootstrapping issue, since the next ! release of Guile will use libtool to build shared libraries. So, ! if users want to have shared Guile libraries, they will have to ! configure Guile with `--disable-shared', compile it, install it, ! then reconfigure Guile with `--enable-shared' and repeat. ! ! I was hoping to get libtool 1.0 out the door by early April, but ! now it looks like it will take at least another year before it'll ! be usable by the public at large. April fools. libtool.scm ! doesn't exist yet, either. ! ! * ltconfig.in (verify_host): Remove redundant `Transform *-*-linux* ! to *-*-linux-gnu*'. From Bruno Haible. ! ! 1997-03-31 Gordon Matzigkeit ! ! * Makefile.am: Use the new AUTOMAKE and ACLOCAL variables. ! ! * ltmain.sh.in (link): Only fail if a convenience library doesn't ! exist, and the user specified -whole-archive. ! Fix shell quoting that was breaking @OUTPUT@ substitution. ! ! 1997-03-28 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Use the hardcode_libdir_separator. ! Convenience libraries are libtool objects if we're not building ! libtool libs. ! ! * ltconfig.in (hardcode_libdir_separator): Added in case the ! linker only honours the last of the -rpath flags (but it can ! contain multiple colon-separated directories), such as on OSF/1. ! Reported by Carl D. Roth. ! ! * ltmain.sh.in (link): Set the dlname if -export-dynamic is given. ! (install, uninstall): Handle the dlname file separately. ! ! * ltconfig.in (export_dynamic_flag): Added to allow programs to ! use reflexive dlopens. ! ! * ltmain.sh.in: Include the mode name in any help messages. ! (dlname): New mode to give the name to be used with dlopen(3). ! ! * ltconfig.in (AR): Allow AR to be set by the user, and export it ! to ltmain.sh. ! ! * ltmain.sh.in: Remove broken profiled library support. ! Added `-whole-archive' and `-no-whole-archive' to manipulate ! convenience libraries. ! ! 1997-03-27 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Allow the creation of static convenience ! libraries made of libtool objects. Suggested by David ! Mosberger-Tang. ! ! 1997-03-25 Gordon Matzigkeit ! ! * ltconfig.in: On AIX, libtool also needs to look for `B' symbols ! in nm output. These are global variable definitions. ! ! * ltmain.sh.in: Linking with -static should link against the ! linklib if old_library is empty (like it is on AIX). ! ! * ltconfig.in: Change the order of OS detection, so that ! linux-gnu* is detected before gnu*. ! ! * Makefile.am (libtool): Use the correct CC, RANLIB, LD, when ! generating libtool. From Carl D. Roth. ! ! * configure.in: Find out the user-supplied CC, LD, RANLIB. From ! Carl D. Roth. ! ! 1997-03-24 Gordon Matzigkeit ! ! * ltmain.sh.in: Linking with -static should link against the old ! library, not linklib. ! ! * README-automake: Updated to point to Automake 1.1m. ! ! 1997-03-15 Gordon Matzigkeit ! ! * demo/main.c: Use it. ! ! * demo/foo.h: Declare it. ! ! * demo/foo.c: Added definition of `nothing' so that we have an ! global variable definition, as well as functions. ! ! 1997-03-12 Gordon Matzigkeit ! ! * ltconfig.in: Make sure either enable_shared or enable_static is ! configured. Reported by Tom Tromey. ! ! * ltmain.sh.in: Bomb out if no library types are configured. ! ! 1997-02-22 Gordon Matzigkeit ! ! * ltconfig.in, ltmain.sh.in (hardcode_libdir_flag_spec): Renamed ! from `hardcode_libdir_flag'. ! (library_names_spec): Renamed from `lib_names'. ! ! * ltconfig.in, ltmain.sh.in (hardcode_action): Change value from ! `rpath' to `immediate'. ! ! * replfunc.m4: Add AM_FUNC_ALLOCA, AM_FUNC_MEMCMP, and ! AM_STRUCT_ST_BLOCKS. ! ! 1997-02-18 Gordon Matzigkeit ! ! * ltconfig.in: Transform *-*-linux* to *-*-linux-gnu* to support ! old-style config.guess scripts. ! ! 1997-02-17 Gordon Matzigkeit ! ! * ltmain.sh.in: Create objdir *before* linking a program into it. ! ! 1997-02-12 Gordon Matzigkeit ! ! * ltconfig.in: Any ld --version that returns GNU is probably a GNU ! ld. From Marcus Daniels. ! ! * libtool.m4: Added AM_REPLACE_FUNCS. ! ! 1997-02-11 Gordon Matzigkeit ! ! * ltconfig.in: Trivial port to *-*-osf4. From Bruno Haible. ! ! 1997-02-10 Gordon Matzigkeit ! ! * ltconfig.in: AIX 3 and 4 ld only hardcodes LIBPATH if -L is not ! specified. This behaviour is the same with both xlc and gcc. ! ! 1997-02-07 Gordon Matzigkeit ! ! * doc/platforms.texi: Yaay! We found a workaround for HP-UX ! /bin/sh buffer overflows. From Eric Backus. ! ! 1997-02-03 Gordon Matzigkeit ! ! * Release 0.9. ! ! * PLATFORMS, doc/platforms.texi, Makefile.am, doc/Makefile.am: ! Move PLATFORMS to doc/platforms.texi. ! ! * ltmain.sh.in (link): Use hardcode_libdir_flag to get a library ! directory into the resulting binary. ! Use hardcode_action, and make many simplifying changes to have ! compilation and finalization be consistent with each other. ! ! * ltconfig.in: Not so amazing! It's AIX cc that hardcodes direct ! libraries... gcc doesn't, though. ! (link_rpath_flag): Change link_rpath_flag to be ! hardcode_libdir_flag. ! (hardcode_action): New variable to simplify ltmain.sh. ! ! 1997-01-29 Gordon Matzigkeit ! ! * ltmain.sh.in: Change to take advantage of linkers that don't ! hardcode direct libraries. ! ! * ltconfig.in: Amazing! AIX 3 linker doesn't hardcode direct ! libraries, which makes it less buggy than AIX 4. Reported by Mark ! Kettenis. ! ! * demo/configure.in: Check for the math library. ! ! * demo/foo.c (foo): Change to use the `cos' function, so that we ! need to link against another library. ! ! 1997-01-28 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Export the PATH variable in order to find ! the program, rather than giving a full path. This helps give the ! program a less confusing value for argv[0]. ! ! 1997-01-26 Gordon Matzigkeit ! ! * Release 0.8. ! ! 1997-01-24 Gordon Matzigkeit ! ! * Makefile.am (demo_distfiles): Add demo/acinclude.m4 to the ! distribution. ! ! 1997-01-22 Gordon Matzigkeit ! ! * libtool.m4: For IRIX 6, ld needs -n32 if cc uses it. Reported ! by Bruno Haible. ! ! * ltconfig.in: IRIX ld does not hardcode direct libraries. ! Reported by Bruno Haible. ! ! 1997-01-18 Gordon Matzigkeit ! ! * ltconfig.in, ltmain.sh.in (hardcode_shlibpath_var): Allow new ! value, `unsupported', since most linkers do not allow you to use ! shlibpath_var for initial linking. ! ! * ltconfig.in: Lots of bug fixes from Bruno Haible. Set wl on ! OSF/1, fix definitions of hardcode_* variables. ! (archive_cmds): Fix not to use +h on HP-UX 9.x. Reported by Bruno ! Haible. ! ! 1997-01-17 Gordon Matzigkeit ! ! * libtoolize.in: Handle explicit AC_CONFIG_AUX_DIR settings. ! Suggested by Akim Demaille. ! ! * libtool.m4: Change ltconfig line to use $CONFIG_SHELL when it is ! specified. Reported by Bruno Haible. ! ! 1997-01-16 Gordon Matzigkeit ! ! * demo/Makefile.am (hc-direct): Do better searching for the proper ! name to do a direct link. ! (hc-libpath): Make allowances if shlibpath_var cannot be used ! to find libraries at link time, such as on AIX. ! ! * Makefile.am (demo_distfiles): Remove ansi2knr.1 and ansi2knr.c. ! ! * demo/foo.c, demo/hello.c, demo/main.c: Change ANSI prototypes to ! KNR form, for better portability, and less ansi2knr hair. ! ! * demo/configure.in: Remove AM_FUNC_PROTOTYPES. ! ! * demo/Makefile.am: Remove ansi2knr from the AUTOMAKE_OPTIONS. ! ! * demo/ansi2knr.1, demo/ansi2knr.c: Removed these files. ! ! * ltmain.sh.in: Use 1>&2 consistently to direct errors and ! warnings to stderr. ! (compile): Fix missing single quote. ! ! * ltconfig.in (hardcode_direct): On Solaris at least, using ! DIR/libNAME.so does not hardcode DIR, so introduce a new hardcode ! variable to reflect that. ! ! * ltmain.sh.in (link): If linking with $link_static_flag fails, ! then retry without it, but still use the .a versions of ! uninstalled libtool archives. ! ! 1997-01-15 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Eval $link_static_flag. Reported by Bruno ! Haible. ! ! * PLATFORMS: Add to distribution. Suggested by Bruno Haible. ! ! 1997-01-13 Gordon Matzigkeit ! ! * ltconfig.in: Add support for SCO OpenServer 5.x. From ! Christopher Olsen. ! ! (can_build_shared): Initialize at the top of the file, so that ! shared libraries aren't built on platforms that don't support ! them. ! ! 1997-01-11 Gordon Matzigkeit ! ! * ltmain.sh.in, ltconfig.in, libtoolize.in, doc/libtool.texi: ! Update the copyright completion years. ! ! 1997-01-08 Gordon Matzigkeit ! ! * ltconfig.in: Port to IRIX 5.3, 6.2. ! ! 1997-01-06 Gordon Matzigkeit ! ! * ltconfig.in: HP-UX 9 support is the same as HP-UX 10, so the ! port is trivial. ! ! * libtoolize.in: Add --dry-run option, -n for short. ! ! 1997-01-03 Gordon Matzigkeit ! ! * ltmain.sh.in (link): On at least SunOS, /bin/sh doesn't ! understand "export something=val". From Bruno Haible. ! ! 1997-01-02 Gordon Matzigkeit ! ! * ltmain.sh.in (compile): Recognize valid source file suffixes for ! Fortran and C++. ! ! 1996-12-17 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Don't allow *._o and *.l_o to be valid ! object type suffixes, in spite of Automake's current ansi2knr ! implementation. Not all compilers allow non-`.o' suffixes. ! ! 1996-12-16 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Delete the `libtool' version type. ! ! 1996-12-12 Gordon Matzigkeit ! ! * ltconfig.in: Use the full autoconf syntax when checking for GNU ! C. Delete library stripping program, until we have a correct ! test. ! ! 1996-12-11 Gordon Matzigkeit ! ! * ltconfig.in: On AIX 3, use /usr/ucb/nm, not /ucb/nm. From ! ir. M.M. Kettenis. ! ! 1996-12-09 Gordon Matzigkeit ! ! Reported by Charles Kerr: ! * doc/libtool.texi (Creating Object Files): Doc fix independant -> ! independent. ! ! * ltconfig.in (ld_shlibs): SunOS 4 doesn't support shared library ! dependencies. ! ! 1996-12-08 Gordon Matzigkeit ! ! * Release 0.7. ! ! * Makefile.am (EXTRA_DIST): Add README-automake to the ! distribution. ! ! * ltmain.sh.in (link): When linking libtool libraries, use ! standard objects if they are PIC. This prevents spurious warnings ! about invalid suffixes on AIX. ! ! * demo/Makefile.am: Rename libhell to libhello, so that we're not ! quite as offensive. ! ! * ltconfig.in: Remove unnecessary host validity checking. ! ! * ltmain.sh.in: Don't force people to use libNAME.la: SOMETHING.la ! is good enough (for consistency with *.a handling). ! ! 1996-12-07 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Accept files ending in .a as standard ! object files. Reported by Ulrich Drepper. ! Remove support for creating profiled libraries (for now). ! Transform all library objects into standard objects when linking a ! program. ! ! * ltconfig.in (thisdir): How embarrassing! An error in the regexp ! for finding the directory component of the script path. ! ! 1996-12-05 Gordon Matzigkeit ! ! * ltmain.sh.in (compile): Support `.S' (preprocessed assembler) ! files. Reported by Anthony Green. ! ! * libtoolize.in: Give clearer instrutions for how to update ! aclocal.m4. ! ! * ltconfig.in, ltmain.sh.in (link): Add support for creating ! reloadable objects. ! ! 1996-12-04 Gordon Matzigkeit ! ! * ltmain.sh.in (install): Fix passing -n flag to `libtool ! --finish'. ! (compile): Compile `.lo' and `.o' objects at the same time so that ! non-PIC objects (if they are available) can be used for linking ! into programs and creating static archives. Suggested by Ulrich ! Drepper. ! ! 1996-12-03 Gordon Matzigkeit ! ! * ltmain.sh.in (link): Give the full path to the libtool library ! when sourcing it. ! ! * ltconfig.in (old_striplib): Do a configuration test to determine ! if old-style libraries actually can be stripped or not. ! ! 1996-12-02 Gordon Matzigkeit ! ! * ltconfig.in: Delete reference to ABOUT-LIBS. ! ! * tests: Added new subdirectory. ! ! * doc/libtool.texi: Doc fixes, and finished up the Configuring ! chapter. ! ! * ltmain.sh.in (link): Allow *._o and *.l_o to be valid object ! file suffixes, for Automake's ansi2knr implementation. ! New option -version-info replaces -version-file. ! ! [help]: Give a pointer to mode-specific help when appropriate. ! ! * ltconfig.in: Changed messages to correspond to AM_PROG_CC_STDC. ! ! * demo: Also test Automake's ansi2knr support. ! ! 1996-11-19 Gordon Matzigkeit ! ! * ltconfig.in: Bug fixes for AIX 4, and for static platforms. ! ! * ltmain.sh.in (install): Fix for loops over arguments. ! Need to quote ${IFS= } -> "${IFS= }". ! (link): Fix soname_spec bug. Create objdir whether or not we have ! shared libraries. ! ! * ltconfig.in: Check for library stripping program. ! Use test -f instead of test -e. ! ! 1996-11-18 Gordon Matzigkeit ! ! * ltconfig.in: Don't run the RANLIB test unless RANLIB wasn't ! set. ! Be verbose about the environment variables we were configured ! with. ! ! * ltmain.sh.in (objdir): change to .libs. ! ! 1996-11-16 Gordon Matzigkeit ! ! * ltmain.sh.in (install): Just plunge ahead with the ! installation... don't try to enforce dependencies. ! ! 1996-11-15 Gordon Matzigkeit ! ! * ltmain.sh.in: Fix up $libdir to be $dest in install mode. ! ! 1996-11-10 Gordon Matzigkeit ! ! * ltmain.sh: Finished rewrite of compile, link, and install ! modes. ! ! * New ChangeLog file for libtool-0.7, since I've totally rewritten ! libtool. ! ! 1996-03-15 Gord Matzigkeit ! ! * For historical reasons: this is when I started writing libtool. --- 1,633 ---- ! 1999-04-29 Alexandre Oliva ! * configure.in: Bumped to 1.3. ! * NEWS: Summarize news since 1.2. ! * ltmain.in: Save exit status of link_command before removing ! symbol table object file. ! 1999-04-29 Gary V. Vaughan ! * doc/PLATFORMS: updated my hpux-10.20 and cygwin box entries. ! 1999-04-29 Thomas Tanner ! * doc/libtool.texi (inter-library dependencies): ! libtool 1.4 will have full inter-library dependencies support ! ! 1999-04-29 Alexandre Oliva ! * NEWS: Improved support for DU and IRIX too. ! * config.sub, config.guess: Updated from GNU common. ! * mdemo/configure.in: Move AC_LIBLTDL_CONVENIENCE before ! AM_PROG_LIBTOOL, as suggested by autoconf. ! * doc/libtool.texi (Distributing libltdl): Document that -static ! may cause the same problems on libltdl as -all-static. ! * TODO: We might want to fix this in the future. ! * doc/libtool.texi: Clear up overfull hbox. ! * libltdl/Makefile.am (ltdl.lo): Add dependencies. ! * libltdl/configure.in: Clean up some duplicate defines. ! * libltdl/acconfig.h: New file. Add #undefs for defines that ! would be duplicated. ! 1999-04-29 Gary V. Vaughan ! * libtool.m4 (cygwin*|mingw*, DLLTOOL, OBJDUMP, AS): Only expand the ! code that makes these configure time checks on hosts that need the ! tools *and* if the AC_LIBTOOL_WIN32_DLL macro is used. ! 1999-04-29 Alexandre Oliva ! * ltmain.in (nlist, SYMFILE): Use outputname instead of output for ! names within output_objdir. ! 1999-04-28 Alexandre Oliva ! * libtool.m4 (AC_ENABLE_SHARED, AC_ENABLE_STATIC, ! AC_ENABLE_FAST_INSTALL): Do not call AC_BEFORE here, they're ! AC_REQUIREd by AC_LIBTOOL_SETUP. ! (AC_DISABLE_SHARED, AC_DISABLE_STATIC, AC_DISABLE_FAST_INSTALL): ! Call AC_BEFORE here, and now with two arguments, since these do ! change the default. ! (AC_LIBLTDL_CONVENIENCE, AC_LIBLTDL_INSTALLABLE): Fix calls to ! AC_BEFORE. ! 1999-04-28 Gary V. Vaughan ! * libtool.m4 (ltconfig_enable_win32_dll): pass --enable-win32-dll to ! ltconfig if this is set. ! (AC_LIBTOOL_WIN32_DLL): New macro required for libtool to attempt ! a dll build on win32 hosts. ! * ltconfig.in (--enable-win32-dll): new flag for the cli. ! (cygwin*|mingw*|os2*, ltconfig_enable_win32_dll): if this is not set ! to yes, then do not attempt to build shared libraries. ! * doc/libtool.texi: document AC_LIBTOOL_WIN32_DLL. ! * NEWS: noted new macro. ! 1999-04-27 Alexandre Oliva ! * libtool.m4 (AC_LIBTOOL_DLOPEN, AC_ENABLE_SHARED, ! AC_ENABLE_STATIC, AC_ENABLE_FAST_INSTALL, AC_LIBLTDL_CONVENIENCE, ! AC_LIBLTDL_INSTALLABLE): Warn if they appear after ! AC_PROG_LIBTOOL. AC_LIBTOOL_SETUP, actually. ! (AC_LIBTOOL_SETUP): Check whether DLOPEN support is to be enabled ! at autoconf time, not configure time. Simplify code and ! improve (?) help message about --disable-libtool-lock. ! 1999-04-27 Thomas Tanner ! * ltconfig.in: set need_version=no on OSF (reported by ! Marcus Sundberg ) ! * ltmain.in: allow absolute non-existant -L paths, ! always use output_objdir instead of objdir for temporary files ! and create the directory before generating symbol lists, ! delete generated temporary symbol lists, ! don't add .la twice in the pseudo-library header ! * ltmain.in (help uninstall): added a missing backslash ! after echo (reported by Ossama Othman) ! ! 1999-04-27 Alexandre Oliva ! * ltmain.in (old_archive_cmds): Iterate on oldobjs to find out ! which links to object files we must create. Do not test for empty ! pic_flag to create such links. Use objext when searching for ! object files extracted from convenience library. ! * ltconfig.in (compiler_c_o): Make sure the compiler does not ! create temporaries in the current directory when output should go ! elsewhere. We must perform locking if it does. ! 1999-04-27 Gary V. Vaughan ! * ltmain.in (old_archive_cmds): Ensure that there are always .o ! objects available before running old_archive_cmds. ! 1999-04-26 Erez Zadok ! * doc/PLATFORMS: Updates for netbsd 1.3.3 and 1.4. ! 1999-04-26 Alexandre Oliva ! * ltconfig.in (aix4.[01], always_export_symbols): The case pattern ! would never match; fixed. ! Reported by Stephan Kulow ! 1999-04-25 Alexandre Oliva ! * libtool.m4 (OBJDUMP): Pass it to ltconfig. ! * configure.in: AC_SUBST DLLTOOL, OBJDUMP and AS. ! * Makefile.am (libtool, clibtool): Pass them to ltconfig. ! * doc/libtool.texi (Invoking ltconfig): Document OBJDUMP. ! 1999-04-25 Frank Ch. Eigler ! ! * libtool.m4 (cygwin*): Look for target objdump tool. ! * ltconfig.in (cygwin*, file_magic_cmd): Use autoconf-located target ! objdump tool. Track OBJDUMP like DLLTOOL and AS. ! ! * ltconfig.in (cygwin*, deplibs_check_method): Accept ! "architecture: i386" as optional suffix, for it is printed on a ! separate line sometimes. ! ! * ltmain.in (cygwin*, ltdll.c): Wrap DllMain declaration in extern "C". ! ! * ltmain.in (deplibs_check_method=file_magic): Redirect stderr to ! /dev/null, to suppress error messages from target objdump. ! ! 1999-04-25 Alexandre Oliva ! * ltconfig.in (irix*, soname_spec, library_names_spec): Missing ! dots before $versuffix and $major. ! * ltconfig.in (solaris*, whole_archive_flag_spec): Use -z ! allextract/defaultextract from Solaris 2.6 on. ! Reported by Brian Ford ! * ltconfig.in (beos*, allow_undefined_flag): Do not build shared ! libraries with undefined symbols. ! * ltconfig.in (aix4*, allow_undefined_flag): Set to -berok. ! (aix4*, shared_flag): Set to -shared or ${wl}-bM:SRE. ! (aix4*, archive_cmds): Use -bexpall. ! (aix4*, archive_cmds, archive_expsym_cmds): Use shared_flag and ! allow_undefined_flag. ! (aix4*, always_export_symbols): Set to yes up to AIX 4.1.*, ! because -bexpall is supported from 4.2 on. ! Reported by Greg Wooledge ! ! * ltconfig.in (hpux*, hardcode_minus_L): Set to yes. ! (hpux*, hardcode_libdir_flag_spec): Do not use +s by default. ! (hpux*, shlibpath_overrides_runpath): Set to no. ! * ltconfig.in (irix*, osf*, archive_cmds): Write so_locations ! within objdir. ! * ltconfig.in (irix*, soname_spec): Append $major. ! (irix*, library_names_spec): Add new soname. ! Reported by David Kaelbling ! ! * ltconfig.in (irix*, sys_lib_dlsearch_path_spec): /usr/local/lib ! is not searched by default. /usr/lib is searched before /lib. ! * ltconfig.in (irix*, sys_lib_search_path_spec): /usr/lib is ! searched before /lib. ! * ltconfig.in (irix5*, need_lib_prefix, need_version): Set to no, ! by unifying with irix6*. ! * ltconfig.in (irix*, osf*, deplibs_check_method): Use pass_all. ! * ltconfig.in (old_LDFLAGS, old_LIBS): Save and write to comments ! in output file. ! * ltmain.in (prefer_static_libs): New variable, set to no by ! default, but set to yes by -static and -all-static. Used instead ! of build_libtool_libs to decide whether to use a shared or static ! version of a library, when both versions are available. ! 1999-04-25 Boyd Lynn Gerber ! * ltconfig.in (sco3.2v5*): Use LD_RUN_PATH for hard-coding. ! 1999-04-25 Pavel Roskin ! * Makefile.am (uninstall-local): Remove installed libltdl tree. ! 1999-04-25 Alexandre Oliva ! * demo/Makefile.am (hc-direct, hc-libflag, hc-libpath, hc-minusl): ! Added CFLAGS to link commands; SCO OSR needs it for -belf. ! * TODO: -Wl and -Wc options. ! 1999-04-12 Alexandre Oliva ! * libltdl/ltdl.c: Remove trivial warnings. ! 1999-04-12 John David Anglin ! * libltdl/ltdl.c (shl_close): shl_t was correct here... ! (shl_sym): ... but we have to pass the handle by reference here. ! 1999-04-12 Alexandre Oliva ! * doc/libtool.texi (Invoking ltconfig): Document environment ! variables used. ! * doc/libtool.texi (Invoking ltconfig): Document --cache-file. ! * doc/libtool.texi (Invoking ltconfig): Document ! --disable-fast-install, --enable-dlopen, --with-gnu-ld and ! --disable-lock. ! 1999-04-11 Thomas Tanner ! * libltdl/configure.in: check for shl_load in libdld ! * libltdl/ltdl.c (shl_close, shl_sym): use (shl_t *) instead of shl_t ! * ltconfig.in (check for gcc): removed a bogus line, ! check for shl_load in libdld ! * ltmain.in: added a warning to the header of the .la file ! to warn users against deleting the file. ! 1999-04-10 Alexandre Oliva ! * libtool.m4 (AC_PROG_LD, AC_PROG_NM): When looking for programs, ! try $ac_exeext too, so that they're found on DJGPP/MS-DOS. ! * ltconfig.in: Likewise. ! Reported by Robert S. Maier ! * ltconfig.in (Usage): Removed --enable-dlopen-self. ! Reported by Pavel Roskin ! * ltconfig.in: Moved sysv4 before sysv4.*. ! (symcode): Brian's overrider is specific to sysv4, not sysv4*. ! 1999-04-09 Thomas Tanner ! * NEWS, README: Motorola System V 4 support ! * doc/PLATFORMS: added mk88-motorola-sysv4 ! * ltconfig.in: installed patch from Brian Ford ! to support mk88-motorola-sysv4 ! * doc/libtool.texi: some cleanups in the libltdl documentation ! 1999-04-07 Alexandre Oliva ! * ltconfig.in (--fallback-echo): Do not put an inline document and ! an exec in the same if construct; otherwise the inline document ! may not be removed. ! * ltmain.in (--fallback-echo): Likewise. ! Reported by John David Anglin ! * dryrun.test: It would still fail at random times, because `cp' ! and `mv' are not guaranteed to preserve the timestamps of the ! installed files. Instead of preserving them, just remove them ! before the dry uninstall test. Redirect dry-run output to stderr, ! so that it can be easily separated from the regular output. ! 1999-04-07 Thomas Tanner ! * libtool.m4: another DJGPP fix ! 1999-04-07 Alexandre Oliva ! * doc/PLATFORMS: Updated to 1.3 for all platforms I've got. I'll ! make sure 1.3 won't be released unless it passes all tests on ! those platforms. ! * doc/libtool.texi (Compile mode): Document potential problem and ! work-around for `-c -o dir/foo.lo'. ! * tests/dryrun.test: The constant modifications of libtool would ! cause main.o to be updated at the wrong time; the new approach is ! to modify the libtool script so that it enables dry run depending ! on whether an environment variable is set or not. I've also moved ! `after' and `before' to a directory deep within $objdir, instead ! of creating it in ../tests. ! * tests/Makefile.am (CLEANFILES): Removed. ! 1999-04-06 Alexandre Oliva ! * tests/dryrun.test: We cannot rely on setting LIBTOOL, because ! automake may use sub-makes, and the setting will not be propagated ! to them on some makes. Instead, create a dry version of libtool ! and switch between it and the original one before and after dry ! runs. ! * tests/Makefile.am (CLEANFILES): Added libtool-*, created by ! dryrun.test. ! * tests/dryrun.test: Use cmp instead of diff. ! (before, after): Create them within ../tests. ! (libtool): Set to `/bin/sh ./libtool' by default, but use LIBTOOL, ! SHELL and top_builddir from the environment if available. For dry ! runs, use "$libtool -n". ! * tests/Makefile.am (CLEANFILES): Added before and after. ! * ltmain.in: Do not create links to object files in dry runs. ! 1999-04-06 Thomas Tanner ! * NEWS: improved DJGPP support ! * libtool.m4: some DJGPP fixes ! * ltconfig.in: ditto, reverted one of my previous patches: we need ! to check for NM ! * ltmain.in: some DJGPP fixes ! 1999-04-05 Alexandre Oliva ! * ltconfig.in (netbsd*, GNU ld): Support a.out shared libraries ! * Makefile.am (CVS): allow command-line overriding of cvs ! * ltconfig.in (exclude_expsyms): Exclude _GLOBAL_OFFSET_TABLE_ by ! default, as most a.out platforms use it, and end up in trouble if ! we preload it, so it's safer to rule it out by default, and ! special case its removal from exclude_expsyms if someone ever ! complains. ! 1999-04-05 Thomas Tanner ! * doc/libtool.texi: reorder tests to reflect execution order, ! documented dryrun.test ! * ltmain.in (lt_preloaded_symbols): dry-run mode bugfix ! * tests/dryrun.test: new test to check whether the dry-run ! mode works properly ! * demo/run.test: removed the unnecessary test ! * demo/Makefile.am: ditto ! 1999-04-04 Alexandre Oliva ! * ltconfig.in (sunos4*, GNU ld): -Bstatic is not enough for ! deplibs.test to work with GNU ld; -Bshareable is needed here. ! * ltconfig.in (ld_shlibs, amigaos*): Disable shared libs with ! native ld too. ! * ltconfig.in (sunos4*, GNU ld): Reordered. ! * ltconfig.in (archive_cmds, sunos4*): Revert to -Bstatic; the ! native linker doesn't even support -Bshareable, only GNU ld does. ! Do not use `gcc -shared' in archive_cmds, it breaks deplibs.test. ! * ltconfig.in: if ld_shlibs=no, set can_build_shared=no too, ! otherwise it will just be disregarded. This would cause ! netbsd/m68k with GNU ld a.out, and certainly many other platforms, ! to incorrectly believe that shared libraries were supported, while ! archive_cmds was empty, causing shared libraries not to be created ! 1999-04-03 Alexandre Oliva ! * NEWS: improved support for AIX and HP/UX ! 1999-04-03 Thomas Tanner ! * NEWS: updated ! * libtool.m4: check for main in libm instead of cos ! * ltmain.in: cosmetic fixes ! 1999-04-02 Alexandre Oliva ! * ltmain.in (convenience): fixed race condition when more than one ! library was linked with the same convenience library by ! uniquifying the extract directory. It is now named after the new ! library *and* the old one, and lives in the objdir of the new one. ! * ltmain.in (-L*): do not abort just because a directory specified ! with -L does not exist; just warn and discard it ! * ltconfig.in (archive_cmds, sunos4*): where we used -Bstatic, we ! should have been using -Bshareable ! * demo/Makefile.am (CLEANFILES): clean EXTRA_* from deplibs-check ! * libtool.m4 (LDFLAGS, LIBS): pass them to ltconfig, for the tests ! that involve linking ! * Makefile.am (LDFLAGS, LIBS, libtool, clibtool): ditto ! * tests/Makefile.am (CFLAGS, CPPFLAGS, LDFLAGS, LIBS): set ! (LDFLAGS, LIBS, TESTS_ENVIRONMENT): pass them down ! 1999-04-02 Erez Zadok ! * doc/PLATFORMS: 1.2f ok on various versions of hpux cc ! 1999-04-01 Thomas Tanner ! * doc/libtool.texi: documented deplibs.test ! * demo/Makefile.am: moved testsuite specific declarations to the end, ! the deplibs check is now optional ! * libltdl/configure.in: read libtool --config only once, ! merged AC_SYS_SYMBOL_UNDERSCORE+AC_SYS_NM_PARSE from libtool.m4 ! * libtool.m4: AC_SYS_SYMBOL_UNDERSCORE+AC_SYS_NM_PARSE were not ! used, lt_dlopen and silent may be empty, AC_SYS_LIBTOOL_CYGWIN ! no longer necessary ! * ltconfig.in: NM is already checked in libtool.m4, ! * tests/Makefile.am: added deplibs.test ! * tests/demo-exec.test, demo-inst.test: removed hell0 ! * tests/deplibs.test: new test to test the deplibs_check_method ! 1999-03-31 Thomas Tanner ! * mdemo/Makefile.am: test -export-symbols-regex ! 1999-03-30 Thomas Tanner ! * doc/libtool.texi: fixed a typo ! * libtoolize.in: add the libtool scripts to libltdl.tar.gz ! * libtool.m4: don't AC_SUBST(USE_SYMBOL_UNDERSCORE), ! AC_CHECK_LIBM sets LIBM, AC_LIBLTDL_INSTALLABLE doesn't work ! when libltdl is already installed ! * *demo/Makefile.am: use LIBM ! * *demo/configure.in: AC_SUBST LIBM ! * libltdl/configure.in: use ac_cv_sys_symbol_underscore instead of ! USE_SYMBOL_UNDERSCORE ! 1999-03-30 Alexandre Oliva ! * ltconfig.in (aix4*, collect2name): make sure collect2 exists ! before running string on it, to avoid errors on old gccs ! Reported by Erez Zadok ! * ltconfig.in (aix4*, hardcode_libdir_flag_spec): unless we're ! using gcc with old collect2, use -b libpath to hardcode the ! library search path ! * ltmain.in, ltconfig.in: reverted most of the quoting changes ! from 1999-03-25; Gary's delay_variable_subst patch from 1999-02-19 ! obviates it. Keep only quoting of $PATH, for uniformity with ! other systems that already did it ! * TODO: comments on hardcoding paths into libraries; problem ! with shell meta-characters in filenames ! 1999-03-29 Gary V. Vaughan ! * libltdl/ltdl.c (lt_dladdsearchdir): Forgot to mallocate the ! extra byte of memory for the teminating NUL, and forgot to ! strcpy the original path in to the new memory before appending ! the new path compononent. ! 1999-03-27 Thomas Tanner ! * NEWS: updated ! * README: updated (BeOS support, no longer shared libraries ! support for AmigaOS), cleanups, we have now two mailing lists ! * REAMDE-alpha: autogen -> bootstrap, we have now two mailing lists ! * THANKS: added Xavier Pianet ! * doc/PLATFORMS: BeOS works ! * doc/libtool.texi: we have now to two mailing lists, ! updated -dlopen self documentation, documented libltdl's license, ! put each author in a separate line, cleanups and minor corrections ! * libltdl/COPYING.LIB: new file ! * libltdl/ltdl.[ch]: added special exception to the LGPL license ! * libtool.spec: removed, it was outdated ! * Makefile.am: removed libtool.spec ! * ltmain.in: use TMPDIR when possible, create a subdirectory ! in the temporary directory, added -export-symbols-regex to the help, ! don't regenerate the .lai file if it was removed - it should not ! happen ! 1999-03-25 Alexandre Oliva ! * demo/Makefile.am: create a static library, link two libtool ! archives with it, then link the program hell0 with both ! * demo/hell1.c, demo/hell2.c: dummy files used to create the ! libtool archives without introducing symbol conflicts ! * tests/demo-exec.test, tests/demo-inst.test: run the new program ! * ltconfig.in (irix5*, irix6*, deplibs_check_method): pass_all ! * ltmain.in ($PATH): instead of modifying the PATH, better prevent ! its expansion the first time *_cmds variables are eval'ed. Modify ! $show within loops that eval them so as to expand variables ! * ltconfig.in (*_cmds): quote $ so that they're not expanded by ! the first eval ! 1999-03-25 Gary V. Vaughan ! * ltmain.in ($PATH): Expand any tildes in the users path to the ! contents of $HOME to avoid problems with *_cmds splitting and ! evaluation. ! ! 1999-03-24 Thomas Tanner ! * doc/PLATFORMS: Erez Zadok reported that libtool works on bsdi 4.0.1 ! * doc/libtool.texi (libltdl): libltdl supports BeOS ! * libltdl/ltdl.c: partially reverted my previous patch: BeOS will ! automatically search in ADDON_PATH ! * ltmain.in: only accept -L paths that exist, support relative ! -L paths, removed offensive warnings/comments ! 1999-03-24 Alexandre Oliva ! * ltconfig.in (ld_shlibs, amigaos*): disable shared libraries ! 1999-03-23 Thomas Tanner ! * libltdl/ltdl.c: shlib_ext was declared even if LTDL_SHLIB_EXT ! didn't exist ! * ltmain.in: don't allow relative run-paths, fixed a typo in a warning, ! ignore -dlopen self for libraries and objects ! 1999-03-23 Gary V. Vaughan ! * libltdl/configure.in: the sed expression for finding the shared ! library extension used to think the . in [.] for the cygwin ! shared_library_names_spec was the start of the extension!! We now ! remove anything in square brackets (assuming that the square ! brackets delimit a sed or expr expression which is not part of the ! extension) before looking for the extension. ! 1999-03-21 Alexandre Oliva ! * tests/build-relink.test: if we relink and have hardcode_direct, ! removing an uninstalled library breaks an uninstalled program ! * doc/libtool.texi: documented convenience libraries ! * TODO: removed entry about it ! * tests/*-unst.test: if directory is not configured, skip it ! * tests/demo.test, tests/mdemo.test: unused, removed ! 1999-03-20 Thomas Tanner ! * 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 ! * ltconfig.in (sunos4*, with_gnu_ld, hardcode_minus_L): remove, we ! have -rpath ! (aix4*, without_gnu_ld, hardcode_shlibpath_var): unsupported is ! default ! (hpux9*, hpux10*, hpux11*, archive_cmds): drop +s, unneeded here ! (hpux9*, hpux10*, hpux11*, hardcode_libdir_flag_spec): add +s ! before +b ! (hpux9*, hpux10*, hpux11*, shlibpath_overrides_runpath): since +s ! appears before +b, set it to yes ! (hardcode_shlibpath_var, hardcode_action): do not use ! shlibpath_var to specify the compile-time search path; it loses, ! and we may end up linking with pre-installed older versions of ! libraries instead of yet-to-be-installed ones ! (*, hardcode_direct, hardcode_minus_L): remove entries that set ! them to no, that is default ! * demo/Makefile.am (hc-direct, hc-libpath, hc-minusL): link with ! $$hardcode_libdir_flag_spec, if available, with libdir=$(libdir), ! to make sure the hardcode_* variables will produce the expected ! results even in the presence of a hardcoding flag; depend on ! libhello.la having been installed already ! (hc-libflag): link with the installed library, but try to ! hard-code the uninstalled one ! * doc/libtool.texi: document the changes ! * tests/*.test: when a test fails, skip tests that depend on it. ! If a certain configuration is not supported, skip all its tests. ! * doc/libtool.texi: reorder tests to reflect execution order ! * tests/noinst-link.test: new test ! * tests/Makefile.am (TESTS): added noinst-link.test ! * doc/libtool.texi: document it ! 1999-03-18 Thomas Tanner ! * NEWS: improved support for BeOS and Cygwin ! * libltdl/ltdl.c: added two new error messages (cannot_open_error, ! cannot_close_error), use them where approriate, ! BeOS support (thanks to Xavier Pianet), on BeOS search modules ! additionally in ADDON_PATH ! * libtool.m4: rewrote AC_CHECK_LIBM: BeOS and Cygwin don't have ! libm and *-ncr-sysv4.3* requires libmw ! * ltconfig.in: don't check for LoadLibrary, hardcode dlopen ! configuration for BeOS and Cygwin ! * ltmain.in: ignore -lm on BeOS and Cygwin, always ignore -lc ! ! 1999-03-17 Alexandre Oliva ! * ltconfig.in (hpux*, hardcode_minus_L): should be no, we have +b ! (hpux*, hardcode_libdir_separator): set to colon ! * doc/PLATFORMS: egcs is gcc; updates from Erez Zadok ! 1999-03-16 Alexandre Oliva ! * ltmain.in (deplibs, beos*): don't append -lc ! Reported by Xavier Pianet ! * tests/build-relink.test (hardcode_action): when set to relink, ! skip the test with lt-hell ! * Makefile.am (EXTRA_DIST): add mkstamp ! Reported by Xavier Pianet ! * Makefile.am (EXTRA_DIST): add ChangeLog.0 ! 1999-03-16 Thomas Tanner ! * doc/libtool.texi: some minor corrections to the "-dlopen self" ! documentation ! * tests/Makefile.am: sorted by name, added assign.test ! * ChangeLog: started new file ! * ltconfig.in: some cosmetical changes ! * ltmain.in: ditto ! Continued in ChangeLog.0 ! $Revision: 1.385.2.117 $ $Date: 1999/04/29 13:07:13 $ Index: libtool/ChangeLog.0 diff -c /dev/null libtool/ChangeLog.0:1.1.2.1 *** /dev/null Thu Apr 29 16:10:59 1999 --- libtool/ChangeLog.0 Tue Mar 16 22:24:20 1999 *************** *** 0 **** --- 1,4567 ---- + 1999-03-15 Alexandre Oliva + + * configure.in, libtool.spec, NEWS: bump to 1.2g + + * configure.in, libtool.spec: bump to 1.2f + * doc/PLATFORMS: ditto + * NEWS: libtool 1.2f released + + * ltmain.in: silence ``unbug'' :-) detected by sh.test + + 1999-03-14 Alexandre Oliva + + * TODO: we now use full pathnames for `file' + + 1999-03-14 Thomas Tanner + + * TODO: libltdl is now documented + * doc/libltdl.texi (linking with installed libtool libraries): + fixed typo + * doc/libltdl.texi (libltdl): added documentation for building + libtool modules and examples how to embed libltdl + * ltmain.in: don't ignore user-specified run-paths (fixed it + at the right place) + + 1999-03-14 Alexandre Oliva + + * ltmain.in (deplibs_check_method=none): discard -L and -R + switches when testing whether deplibs contains some library + + 1999-03-14 Erez Zadok + + * config.sub: recognize hppa2.0w, yet to be installed at GNU + + * config.guess: minor update for FreeBSD-elf, yet to be installed + at GNU + + 1999-03-14 Alexandre Oliva + + * ltconfig.in (bsdi4*, sys_lib_search_path_spec, + sys_lib_dlsearch_path_spec): fix thinko in variable names; add + standard directories + + * ltmain.in (exclude_expsyms): exclude symbols before sorting, + otherwise only the sorted list will have them excluded + + * ltconfig.in (file_magic_cmd, file_magic_test_file, freebsd-elf*, + bsdi4*): use full pathnames when possible + + * Makefile.am (all-recursive): depend on ACINCLUDE_M4_LIST + (all-local, check-local): remove, unused + + * doc/PLATFORMS: updated platforms tested on 1.2f-pre; clean up; + reorder; untabify + + * config.guess, config.sub: updated from GNU common + + * doc/libtool.texi: notes on thread-safety problems of + libltdl/dlopen on GNU/Linux and FreeBSD + + * ltconfig.in (aix3*, aix4*): GNU ld on AIX is very broken: it + cannot create working shared libraries. Print a warning + suggesting the user not to use it and disable shared libraries. + + 1999-03-13 Alexandre Oliva + + * ltconfig.in (global_symbol_to_cdecl): was reset before trying + `symprfx=_', rendering the test with `_' useless + + * doc/libtool.texi (AM_PROG_LIBTOOL): eliminate overfull boxes + + * doc/libtool.texi: complete dlopening/libltdl documentation + + * ltconfig.in (osf3*, osf4*, deplibs_check_method): pass_all does + not really work; use file_magic instead. + (osf3*, osf4*): customize sys_lib_[dl]search_path_spec + + * ltconfig.in (file_magic_test_file): new variable; if set, it + will be used as an argument for $file_magic_cmd to test whether + the regex in deplibs_check_method matches its output + (file_magic_cmd): use full pathnames whenever possible + + * ltconfig.in (sys_lib_dlsearch_path_spec): new variable, that + lists the system *run-time* search path. Listed directories are + not implicitly hard-coded into executables. + * ltmain.in: use it, but *never* discard -R flags + * doc/libtool.texi: document it + * NEWS: ditto + Reported by Bob Friesenhahn + + * tests/sh.test: look for `$Xsed' without `$echo "X...' + * ltconfig.in, ltmain.in: fixed a few such occurrences + + * ltmain.in (-static, -all-static): revert March 11's patch, I was + barking up the wrong tree + + 1999-03-12 Thomas Tanner + + * libltdl/ltdl.c: removed FILENAME_MAX since LTDL_FILENAME_MAX + is sufficient and doesn't break HP/UX + + 1999-03-11 Alexandre Oliva + + * ltconfig.in: (global_symbol_pipe) extract symbol tag from the + output of NM too + (global_symbol_to_cdecl): new variable; convert the output of + global_symbol_pipe to valid C declarations; on HP/UX, convert + text symbols to function declarations + * libtool.m4: similar modifications + * doc/libtool.texi: document new variable + * ltmain.in: use global_symbol_to_cdecl to generate lt_dlpreopened + symbols; avoid extracting symbol lists from dlpreopened files + twice; do not filter symbols from dlpreopened libraries + * TODO: fixed HP/UX dlpreopening problem + + * ltmain.in (-static, -all-static): set dlopen_self to + $dlopen_self_static regardless of link_static_flag or pic_flag + + * ltmain.in: FreeBSD bug that needs symbol table compiled with + -fPIC is fixed in release 3.1; use it only for 2.* and 3.0 + + 1999-03-11 Thomas Tanner + + * ltmain.in: when building a library it doesn't make + sense to remove a relinked program ("lt-" prefix) + + 1999-03-11 Alexandre Oliva + + * mdemo/main.c (main, test_dl, test_dlself): propagate error + conditions better, to avoid false positives + + * */configure.in: AC_SUBST(LIBTOOL_DEPS) + * */Makefile.am $(OBJECTS): depend on libtool + (libtool): rebuild automatically + + * ltconfig.in: set dlopen_* variables to unknown when appropriate + * ltmain.in: only emit warning about lack of AC_LIBTOOL_DLOPEN if + *all* dlopen_* variables are set to unknown + + 1999-03-11 Thomas Tanner + + * ltmain.in: delete the old output files (incl. the relinked binary) + before linking. + + * ltconfig.in: replaced `configure' with $progname and all + line numbers with @LINENO@ + + 1999-03-11 Alexandre Oliva + + * libltdl/ltdl.c (strdup): cannot return str when it's NULL + because of const correctness + + 1999-03-10 Alexandre Oliva + + * libltdl/ltdl.c (strdup): always use our own, because the + standard strdup won't use lt_dlmalloc + + * ltconfig.in (dlfcn.h): function definition may cause warnings; + define variable instead + + * ltmain.in: properly create an export file for a program, + avoiding error messages about not finding it + + * TODO: need to document AC_LIBLTDL_*; static self dlopening + problem fixed + + * libtool.m4 (AC_LIBTOOL_DLOPEN): just set lt_dlopen=yes + (AC_LIBTOOL_SETUP): if lt_dlopen=yes, add --enable-dlopen to + libtool_flags; drop --enable-dlopen-self + * ltconfig.in: perform all the dirty work of testing for dlopening + support, because we need platform-dependent equivalents for + -export-dynamic, for self dlopening, and -static, for static self + dlopening + (dlopen_self_static): new configuration variable that is set to + yes only if static programs can dlopen themselves + * ltmain.in (-static, -all-static): dlopen_self=dlopen_self_static + + * libltdl/configure.in (libltdl_cv_need_uscore): do not assume + dlfcn.h and LTDL_LAZY exist; use LTDL_GLOBAL and LTDL_LAZY_OR_NOW. + This test is likely to fail if self-dlopening does not work, + especially because we do not link the program with + -export-dynamic. Let's just hope that platforms whose symbol + names start with underscores will also accept underscores for + dlopen. We should probably use libtool to compile and link this + test, so that we can use -export-dynamic. + + * mdemo/Makefile.am (@LIBLTDL@): depend on ../libltdl/config.h + + * configure.in: fix AC_OUTPUT_COMMANDS for ltconfig and ltmain.sh + so that they work if srcdir is relative too + + * libtool.m4 (AC_LIBLTDL_INSTALLABLE, AC_LIBLTDL_CONVENIENCE): + avoid introducing multiple --enable options when re-running + config.status + * libltdl/configure.in: if enable_ltdl_* is not set, assume no + * configure.in: if enable_ltdl_install is not set, enable it + + * libltdl/configure.in: only assume implicit installation if + libltdl was libtoolized. If not, print a warning message + suggesting the use of --enable-ltdl-install or of one of the + AC_LIBLTDL_* macros. + + * libtool.m4 (AC_LIBTOOL_SETUP): new macro, that does all the + configure-work that AC_PROG_LIBTOOL used to do; add + --cache-file=$cache_file to libtool_flags + (AC_PROG_LIBTOOL): call AC_LIBTOOL_SETUP, save the cache, run + ltconfig and reload the cache + * configure.in: run AC_LIBTOOL_SETUP, then set LIBTOOL_FLAGS to + libtool_flags + * ltconfig.in: support --cache-file switch. If it is used, load + the cache in the beginning and save it just before terminating + + * tests/Makefile.am (TESTS): run demo-nofast before demo-shared + + * configure.in: create ltconfig and ltmain.sh at the end of + config.status, if they do not exist. This fixes the bootstrap + problem reported by Erez Zadok + + 1999-03-10 Thomas Tanner + + * NEWS: sorted by importance + * Makefile.am: set LIBTOOL_FLAGS when generating libtool + * configure.in: check for dlopen support and set LIBTOOL_FLAGS + accordingly + + * configure.in: fix spacing for --disable-ltdl-install, + always configure libltdl, add libltdl/acinclude.m4 to + ACINCLUDE_M4_LIST, disable installation of libltdl if necessary + * libltdl/Makefile.am: set version info for libltdl.la + * libltdl/configure.in: don't check whether + enable_ltdl_convenience/install was set so that libltdl + can be used as independent package (libltdl.tar.gz) without + the need to use --enable-ltdl* + * libltdl/ltdl.c: minor cleanups, allocate the line cache + dynamically (lt_dlopen) + + 1999-03-10 Alexandre Oliva + + * libltdl/ltdl.c (lt_dlopen): some preprocessors choke if the `#' + of `#define' is not in column 1; let's go back to fortran! :-) + Add #undefs too, to avoid potential warnings or errors. + + 1999-03-09 Alexandre Oliva + + * libtool.m4 (AC_LIBLTDL_INSTALLABLE, AC_LIBLTDL_CONVENIENCE): + renamed convenience libltdl, dropped toinst hack for installable + * libltdl/Makefile.am: ditto + * libltdl/configure.in: ditto; abort if none of the macros is used + + * ltmain.in: $output_objdir/$objdir/ -> $output_objdir/lt- + + 1999-03-09 Thomas Tanner + + * libltdl/ltdl.c (lt_dlopen): don't hardcode the length of the + constant strings + + 1999-03-09 Alexandre Oliva + + * Makefile.am (install-data-hook): install libltdl as a directory, + not as a tar-file, so that we do not modify the build tree at make + install time + * libtoolize.in (ltdl, ltdl_tar): update + + * configure.in, Makefile.am, NEWS: install libltdl by default + + * libtool.m4 (AC_LIBLTDL_INSTALLABLE, AC_LIBLTDL_CONVENIENCE): + new macros + * NEWS: ditto + * libltdl/configure.in: if none of the new macros or configure + arguments are used, warn and build convenience library only + * libltdl/Makefile.am: conditionally build convenience libltdl.la + * mdemo/configure.in: use AC_LIBLTDL_CONVENIENCE + * mdemo/Makefile.am: refer to @LIBLTDL@ + + 1999-03-09 Gary V. Vaughan + + * NEWS: updated. + + 1999-03-08 Alexandre Oliva + + * ltmain.in: extract symbols from program objects to nlist first, + then translate them to the export_symbols format. Now it works, + but it appears to be needlessly extracting the symbol list from + dlpreopened libraries twice + + * ltmain.in: temporarily disable dlopen_self when linking with + -static or -all-static, until we figure out how to test whether it + works at configure time + + * TODO: remember to fix this later + + * tests/build-relink.test: when hell is expected to fail, run it + within a subshell and redirect stderr to stdout, so that dynamic + linker errors are only printed in verbose mode + + * ltmain.in (hardcode_libdir_separator, compile_rpath, + finalize_rpath): only substitute hardcode_libdir_flag_spec if + hardcode_libdirs is non-empty + + * libtool.m4 (AC_LIBTOOL_DLOPEN): do not depend on the existence + of dlfcn.h nor on the definition of RTLD_LAZY + + * tests/build-relink.test: hellT was renamed to lt-hell + + * libltdl/Makefile.am (@TOINST@/libltdl.la): do not hide the + command that creates the TOINST directory; remove `-o $@' from the + LINK command, $(LINK) already contains it. + + 1999-03-08 Thomas Tanner + + * doc/libtool.texi (tests): documented demo-nofast.test and + renamed cdemo* to demo* + + 1999-03-08 Alexandre Oliva + + * libltdl/Makefile.am, libltdl/configure.in, mdemo/Makefile.am: + libltdl must not be renamed; if there's a problem with the install + option, let's fix it, not just work around it by breaking code of + users of the convenience library + + * tests/build-relink.test: link broken libhello.la with at least + one libtool object + + 1999-03-08 Thomas Tanner + + * TODO: updated (libltdl build problem fixed) + * doc/libtool.texi (libltdl interface): removed the line which + promised that lt_dlopen will return NULL if it can't resolve all + symbols + * libltdl/Makefile.am, libltdl/configure.in: fixed build problem: + renamed the convenience library to libltdlc.la and the + installed version to libltdl.la + * ltmain.in (wrapper script): replaced the "T" suffix of the program + file name with a "lt-" prefix + * mdemo/Makefile.am: use libltdlc.la + * tests/Makefile.am, tests/demo-nofast.test: added demo to + test --enable-fast-install=no + + 1999-03-07 Alexandre Oliva + + * tests/Makefile.am (TESTS): run hardcode before build-relink + trashes libhello.la + * tests/hardcode.test (need_prefix): set to yes so that _inst is + not removed + + * ltmain.in (compile_command): append finalize search path to + compile search path + + * tests/build-relink.test: new; check shlibpath_overrides_runpath + * tests/Makefile.am (TESTS): add build-relink.test; remove + hardcode.test duplicates + * doc/libtool.texi: document it + + * ltmain.in (relink_command): do not prepend cd `pwd` to it, the + scripts already enters the correct directory, and expanding the + pathname would prevent the build tree from moving + + * ltconfig.in (enable_fast_install): force it to no only if we + need relink; in the other cases, set it to needless + * ltmain.in (fast_install): if needless, set relink_command empty + * doc/libtool.texi (fast_install, shlibpath_overrides_runpath): + document the new behavior + + * ltconfig.in (enable_fast_install): test whether it can be forced + off after shlibpath_overrides_runpath and enable_shared are set + + 1999-03-07 Thomas Tanner + + * TODO: updated + * NEWS: updated + + * TODO: scheduled some items for next release/future + * demo/configure.in: use AC_LIBTOOL_DLOPEN + * libtool.m4: added AC_ENABLE/DISABLE_FAST_INSTALL macro + * ltconfig.in: added --disable-fast-install flag + * ltmain.in: partially reverted Alexandre's patch and implemented + on-demand linking in such a way that the old developer-friendly + linking style is optional, + don't hardcode library paths that are in the system search path, + fixed a typo in lib_search_path, + implemented -export-symbols-regex for programs + + 1999-03-06 Alexandre Oliva + + * libltdl/ltdl.c (LTDL_LAZY_OR_NOW): renamed from LTDL_NOW; prefer + LAZY loading because it's much faster and NOW is apparently + partially broken on FreeBSD + Reported by Archie Cobbs + + * ltconfig.in (archive_expsym_cmds, solaris, without_gnu_ld): + $lib.exp already starts with $objdir/ + Reported by Godmar Back + + * ltmain.in (freebsd): compile symbol table file with pic_flag + only on FreeBSD and when not static linking; it's been causing + trouble on platforms such as OpenBSD. + + 1999-02-26 Gary V. Vaughan + + * libtool.m4 (cygwin): s/\\(mingw\\|cygwin\\)32/\\1/g. Must've + missed this file when I changed to cygnus' new sanction name. + + * ltconfig.in (sub_uncdrive): removed. This won't work with + the next version of cygwin. + (sub_uncdir): removed. We use :/path/to/executable now. + * libtool.m4 (AC_PROG_LD): removed sub_uncdrive and sub_uncdir. + + 1999-02-25 Thomas Tanner + + * TODO: added items for next alpha release, ILD etc. + * libltdl/ltdl.c: removed unnecessary check from presym_sym, + fixed bug in lt_dlclose, allow lt_dlopenext(NULL), + set deplibs for lt_dlopen(NULL) + + 1999-02-24 Alexandre Oliva + + * ltmain.in (file_magic_regex): sed `10q' is faster than `11,$d' + + 1999-02-22 Thomas Tanner + + * ltconfig.in (dlopen, dlopen_self): default is unknown + * ltmain.in: fixed -dlopen self, print a warning + if -dlopen is used without AC_LIBTOOL_DLOPEN + * mdemo/Makefile.am: use -dlopen self + + 1999-02-22 Alexandre Oliva + + * ltmain.in: added missing mkdir $progdir for on-demand executable + + * ltmain.in: create on-demand executable as $progdir/$$-$program, + and rename it to $progdir/$program only when it's finished, to + avoid race conditions. We can still get the program linked + multiple times, if multiple instances are started simultaneously + and the program does not exist, but they are very unlikely to + interfere with each other. There's still a possibility that one + process removes the $program another has just created, and doesn't + replace it before the other tries to run it, in a system whose + `mv' is not atomic, so it will $rm then $mv, but so what? :-) + Locking files have been avoided to prevent dead-locks in case they + are left over after a reboot or crash. + + * TODO: removed ILD, soon to be merged, and added convenience + libraries docs + + * ltconfig.in (irix5*, irix6*, shlibpath_overides_runpath): yes + + * ltmain.in: remove on-demand executable in the proper place, and + just warn if it can't be removed; add wrapper code to test whether + the install-executable is newer than the build-executable, to + relink it when it appears to be out-of-date + + * libltdl/configure.in: check for dld.h + * libltdl/ltdl.c: include dld.h + (dld_open) it's spelled memory_error, not no_memory_error + Reported by Stefan Burstroem + + * ltmain.in: fix typos in my last change (s/ocmpile/compile/) + + 1999-02-21 Thomas Tanner + + * libltdl/ltdl.c (lt_dlopen): use newhandle instead of handle + when dlopening the executable + * libtool.m4 (AC_LIBTOOL_DLOPEN): removed the redundant "yes: " + prefix for lt_cv_dlopen, renamed lt_cv_dlopen_LIBS + to lt_cv_dlopen_libs (more consistent) + * ltmain.in: implemented -dl[pre]open self, necessary for + lt_dlopen(NULL), generation of exported symbols was broken + + 1999-02-20 Alexandre Oliva + + * ltmain.in: avoid duplication of -L switches, it sometimes breaks + IRIX 5.2's linker + + * ltconfig.in (freebsd*, finish_cmds): expand objformat here + Reported by Vladimir Kushnir + + 1999-02-20 Vladimir Kushnir + + * ltconfig.in (freebsd-elf*, need_version, need_lib_prefix): no + (freebsd-elf*, library_names_spec): add $libname.so instead of + $libname.so$versuffix; add $libname$release.so + + 1999-02-20 Alexandre Oliva + + * doc/libtool.texi: remove ticks from menu items; it breaks TeX + Reported by Erez Zadok + + * ltmain.in: fixes for export-symbols dry-run + + * ltconfig.in (shlibpath_overrides_runpath): new variable; + determines whether LD_LIBRARY_PATH or equivalent can be used to + override a hard-coded library search path; default to unknown + (linux-gnu*): set it to no + (solaris*, sunos4*): set it to yes + * ltmain.in (build_libdirs_flags, build_libdirs, build_rpath): if + shlibpath_overrides_runpath is not yes, arrange that wrapper + scripts create, on demand, programs that use uninstalled libraries + + * doc/libtool.texi: document it + + * libtool.m4 (AC_LIBTOOL_DLOPEN): check for dlopen in libc before + trying in dl. Add the actual dlopening type to lt_cv_dlopen, and + add any needed libraries to lt_cv_dlopen_LIBS. Add test for + MS-Windows' LoadLibrary. Check whether a program can dlopen + itself only if we really have dlopen(), not some equivalent + function, but leave room for testing with other mechanisms. + (AC_PROG_LIBTOOL): assume some form of dlopen, but not + dlopen(NULL), is available if AC_LIBTOOL_DLOPEN is not used, for + backward compatibility. + + 1999-02-20 Archie Cobbs + + * libltdl/ltdl.c (lt_dlopen): use newhandle instead of handle + where appropriate, when dlopening a non-libtool library + + 1999-02-19 Gary V. Vaughan + + * ltconfig.in (export_symbols_cmds): renamed from + export_symbols_cmd. + (cygwin, mingw): Be sure to compile the ltdll.c object before + extracting the exported symbol list. Extract only the names + of the exported symbols from the def file [otherwise we might + run into trouble with -export-symbols-regex]. + (archive_expsym_cmds): Regenerate the def file from the symbol + export list. + (delay_variable_subst): New sed expression to allow us to delay + evaluation of $foo in a double_quote_subst evaluated variable by + using \$. + * ltmain.in (export_symbols_cmds): evaluate each ~ delimitted cmd + separately. + * doc/libtool.texi (libtool script contents): new paragraph to + explain the difference between _cmd and _cmds suffixes for + variable names. + (export_symbols_cmds): renamed from export_symbols_cmd. + + 1999-02-18 Alexandre Oliva + + * ltconfig.in (ld_shlibs): move -soname and similar flags to the + end of archive_cmds and archive_expsym_cmds, so as to prevent + gcc's collect2 from inserting an object file between -soname and + the library name + + * ltconfig.in (openbsd*, netbsd*, library_names_spec): append + alternate name without ${release}, otherwise build fails when + -release is used + + 1999-02-18 Gary V. Vaughan + + * ltconfig.in (archive{,_sym}_commands): Be careful not to + re-export the dll entry points DllMain@12, _cygwin_dll_entry@12 and + _cygwin_noncygwin_dll_entry@12 to avoid bugs with the wrong entry + function being called with inter-dll dependencies. + Reported by DJ Delorie + * THANKS: Added DJ Delorie, since his code inspired the impgen.c + program and because he has patiently answered all of the + irritating dll and win32 questions I have fired at him. + + * ltmain.in (version_type): Oops. Irix versioning implies that + major version numbers are 1 based (not zero based). Fixed. + + * ltmain.in (version_type): Implement irix versioning. + * ltconfig.in (irix{5,6}*): Use new irix shared object versioning. + * TODO: remove irix versioning from TODO list. + + * ltmain.in (impgen.c): Added a new embedded C file that can be + used under win32 to extract a def file (symbol export list) from a + dll that has none. Code to use it might need to wait for the ILD + merge before it will be useful... + + 1999-02-18 Thomas Tanner + + * TODO: updated + * autogen: only libltdl needs autoheader + * doc/libtool.texi (link mode): documented -export-symbols-regex + and updated -export-symbols + * doc/libtool.texi (script contents): documented + always_export_symbols, export_symbols_cmd, exclude_expsyms, + include_expsyms, dlopen and dlopen_self + more detailed description of need_lib_prefix + * ltconfig.in: a "'" was missing in the default value + of export_symbols_cmd + * ltmain.in: implemented -export-symbols-regex + + 1999-02-17 Alexandre Oliva + + * ltconfig.in: (freebsd2*, sunos4*, exclude_expsyms): exclude + _GLOBAL_OFFSET_TABLE_ + * ltmain.in: implement exclude_expsyms with egrep + + * libltdl/ltdl.c (lt_dlmalloc, lt_dlfree): SunOS' cc can't cope + with argument lists, we __P even in the definition + + 1999-02-15 Thomas Tanner + + * cdemo/Makefile.am: renamed *foo1 to *foo, removed $(MATH_LIB) + * cdemo/foo1.c: renamed to foo.c + * libltdl/ltdl.c: eliminated lt_dltype, in presym_open(): + search for @PROGRAM@ if filename == 0, in lt_dlopen(): + fixed bug for filename == 0 + * libltdl/ltdl.h: use __P macro for lt_dlmalloc/free + * libtool.m4: new macro AC_LIBTOOL_DLOPEN: checks for dlopen + and dlopen(NULL) support + * ltconfig.in: added new variables dlopen and dlopen_self, + --enable-dlopen[-self] flags for AC_LIBTOOL_DLOPEN + * ltmain.in: use dlopen[_self], dlpreopen files if there's no + dlopen support, build lt_preloaded_symbols only if + -dl[pre]open was used, include program symbols if -export-dynamic + was specified and there's no dlopen(NULL) support + * mdemo/configure.in: use AC_LIBTOOL_DLOPEN + * mdemo/main.c: demonstrate lt_dlopen(0) + + 1999-02-15 Gary V. Vaughan + + * demo/dlmain.c (_WIN32): The lt_symlist structure is now const, + so my original horrible temporary win32 hack no longer worked. + Here is a new horrible temporary hack to prevent helldl from SEGVing + on win32. I will fix this properly when we figure out how to do + data exports from dlls. + + 1999-02-14 Alexandre Oliva + + * libtool.m4 (AC_CHECK_LIBM): do not set MATHLIB or AC_SUBST it, + this has a negative side-effect of causing automake to add MATHLIB + to every single Makefile. Let's use plain AC_CHECK_LIB, so that + LIBS get set, until we find a better alternative + * *demo/Makefile.am: remove $(MATHLIB) + + * libltdl/configure.in: add a DESCRIPTION argument to AC_DEFINEs + where appropriate, so as to get rid of acconfig.h + * libltdl/acconfig.h: removed + + 1999-02-13 Thomas Tanner + + * *demo/Makefile.am: use $(MATHLIB) + * *demo/configure.in: use AC_CHECK_LIBM + * doc/libtool.texi: renamed file_magic_command to file_magic_cmd, + renamed archive_sym_cmds to archive_expsym_cmds + * ltconfig.in: ditto + * ltmain.in: ditto + * libltdl/ltdl.c: use lt_dlmalloc/free + * libltdl/ltdl.h: define lt_dlmalloc/free + * libtool.m4: added AC_CHECK_LIBM macro + * ltconfig.in: renamed archive_sym_cmds to archive_expsym_cmds, + added always_export_symbols, export_symbols_cmd, exclude_expsyms, + include_expsyms, removed archive_cmds for cygwin/mingw and AIX, + on Solaris store the exported symbols list in objdir + * ltmain.in: allow -export-symbols for modules, use thread_safe flag, + add include_expsyms to the exported symbols + + 1999-02-12 Gary V. Vaughan + + * libltdl/ltdl.h (_LTDLL_EXTERN): libltdl is no longer linked as a + shared library, so the _declspec's were preventing the linker from + resolving symbols on win32. They have been removed now. + + 1999-02-12 Alexandre Oliva + + * ltmain.in: don't try to read objdir/libname.la before it is + created! + + * ltmain.in: create libname.lai at link time, not at install time, + but still create it at install time if it is missing + Reported by Akim Demaille + + * libltdl/ltdl.c (tryall_dlopen): strcmp filenames was reversed + + 1999-02-11 Thomas Tanner + + * autogen: libltdl needs autoheader + * demo/Makefile.am: renamed hell.debug to hell.static + (we're demonstrating static linking, not debugging) + * tests/demo*: ditto + * doc/libtool.texi (libltdl): documented new lt_dlopen(NULL) + feature + * libltdl/acconfig.h: required for config.h + * libltdl/configure.in: use config.h + * libltdl/ltdl.c: use config.h, support lt_dlopen(NULL) + (returns a handle for the program itself) + * ltconfig.in: minor reformatting + * ltmain.in: in lt_preloaded_symbols always define + the program's symbols first, for -export-dynamic list all + program symbols together, -export-symbols was broken for + programs, minor reformatting + * mdemo/Makefile.am: renamed mdemo.debug to mdemo.static + * tests/mdemo*: ditto, mdemo.test was completely broken + + 1999-02-10 Alexandre Oliva + + * ltconfig.in (irix5*, irix6*, osf3*, osf4*): do not use + -set_version in archive_cmds if verstring is empty + (irix6*, shlibpath_var, sys_lib_search_path-spec, + deplibs_check_method): set appropriate values depending on + selected ABI, -32, -n32 or -64, as set in LD by libtool.m4 + (uts4*): remove dot between .so and versuffix + + 1999-02-08 Alexandre Oliva + + * ltconfig.in (irix5*, irix6*, deplibs_check_method): use + file_magic for inter-library dependency tracking + + * ltconfig.in (irix5*, hardcode_libdir_separator): set it to a + colon, because on IRIX 5 only the last -rpath switch prevails, and + it can be a list of colon-separated directories. This change will + affect irix6 too, but that's not a problem. + + * ltconfig.in (irix5*, library_names_spec): add soname_spec, + otherwise we can't dlopen + + 1999-02-08 Thomas Tanner + + * ltconfig.in: according to Marcus Sundberg + HP/UX, IRIX, OpenBSD, Digital Unix and SunOS support + need_version=no and need_lib_prefix=no, + fixed a bug in Solaris' archive_sym_cmds + + 1999-02-04 Alexandre Oliva + + * libtool.m4 (ac_cv_sys_global_symbol_pipe): accept TAB in + addition to space as separator, and allow more than one space + between the symbol code and the symbol name; HP/UX's nm, for + example, uses two spaces + * ltconfig.in (global_symbol_pipe): ditto + (bsdi4, deplibs_check_method): variable name was misspelled + * libltdl/configure.in (libltdl_cv_preloaded_symbols): rewrite + test, so as not to depend on the way global_symbol_pipe is + initialized; the current test would get false positives, as + global_symbol_pipe was initialized `x=""', not `x=' + + * libltdl/ltdl.c (find_module): initialize filename if dir is NULL + Reported by Godmar Back + + 1999-02-04 Godmar Back + + * libltdl/ltdl.c (lt_dlopenext): missing space for terminator when + allocating memory for shlib_ext + + 1999-02-03 Alexandre Oliva + + * libltdl/ltdl.c (lt_dlopenext): tmp would be trashed if shlib_ext + was longer than 3 characters + + 1999-02-02 Gary V. Vaughan + + * ltconfig.in: new config.guess returns *-*-cygwin now instead of + *-*-cygwin32. sed -e 's%\(cygwin\|mingw\)32%\1%g' ltconfig.in + * ltmain.in: sed -e 's%\(cygwin\|mingw\)32%\1%g' ltmain.in + + * ltconfig.in (hardcode_libdir_flag_spec, allow_undefined_flag, + archive_cmds, archive_sym_cmds, old_archive_from_new_cmds): + removed duplication of config by assuming that `test $with_gcc = + yes' implies gnu ld, otherwise MSVC++ (which I haven't tested + since I inheritted the code from Ian Lance Taylor btw!) is implied. + + 1999-01-28 Gary V. Vaughan + + * ltmain.in: Reverted this change of Alexandre's from the + 1999-01-25; "don't try to use .o instead of .lo just because + there's no PIC flag. It loses if --disable-static, and there's + not much point if we're referring to the same file anyway...", + because not all linkers will accept .lo object names. + * ltmain.in: In the case where --disable-static is specified (as + noted in Alexandre's log entry), we just link some .o files to + prevent the original error. + Reported by Andrey Slepuhin + + 1999-01-27 Alexandre Oliva + + * libtoolize.in: search for A[MC]_PROG_LIBTOOL, not + AM_PROG_LIBTOOL + Reported by Jeff Garzik + + 1999-01-27 Gary V. Vaughan + + * THANKS: Now that we have a policy, applied it to the existing + list. This in no way demeans the work of those people removed + from the THANKS file, who are still credited in the ChangeLogs and + without who's work, libtool would not work so well on many + platforms, but serves to highlight the outstanding and continued + contribution the remaining people have made. And I quote, "We + reserve THANKS for people who have made major contributions, and + leave the credit to the others for the ChangeLog only." + + * THANKS: added Sam Vilain. + * ltconfig.in ($echo): When using printf to replace echo the shell + expands %s\n to %sn. Changed to use "%s\n" (with quotes). + Reported by Sam Vilain + + 1999-01-27 Alexandre Oliva + + * libltdl/ltdl.c (find_file): fix endless loop condition + (find_module): filename allocation was off by 1 + + * libltdl/Makefile.am (distclean-local): renamed from + distclean-hook, that didn't work + + * libltdl/ltdl.c (lt_dlopen, non-.la): find_file now returns 0 on + failure + + * Makefile.am (ltconfig, ltmain.sh): some broken makes don't like + macros in targets; replace $(srcdir) with @srcdir@ + * configure.in (ACINCLUDE_M4_LIST): same problem; expand $srcdir + + * libltdl/Makefile.am (@TOINST@/libltdl.la): if installation is + enabled, create to-be-installed libltdl.la within @TOINST@ + directory + (noinst_LTLIBRARIES): even if installation is enabled, build + convenience libltdl.la, otherwise builds of random packages may + fail if the user happens to enable installation + (distclean-hook): wipe out $(TOINST) + * libltdl/configure.in: set TOINST and LIBLIBS as appropriate; + don't set NOINSTLIBS any more + * mdemo/Makefile.am: use libltdl.la + + * libltdl/ltdl.c (find_file): oops, filenamesize was miscomputed + + * libltdl/ltdl.c (find_file): allocate filename dynamically + + * libltdl/configure.in (AC_PROG_LIBTOOL): automake does not + recognize it and fail, better keep using AM_PROG_LIBTOOL until the + next release of automake + * demo/configure.in, cdemo/configure.in: ditto + * depdemo/configure.in, mdemo/configure.in: ditto + + * libltdl/ltdl.c: make all global strings char[], not char*; check + that all calls to malloc() are properly cast + (strdup, strchr, strrchr, trim, free_vars): declare as inline + (find_module): allocate filename dynamically; support null dir + (free_vars): free dir and name only if non-null + (lt_dlopen): keep dir as NULL if not given; fix expression that + calculated the size of name; only free and name if non-null + (lt_dlopenext): allocate tmp dynamically + + * configure.in (pkgdatadir): expand ${PACKAGE} at configure-time, + just like automake does + + * configure.in (pkgdatadir): define pkgdatadir explicitly, and + comment that automake does not need it, but libtoolize does + + * Makefile.am (aclocaldir): do not set it explicitly, automake + does already + + * configure.in (TIMESTAMP): use mkstamp here too + + 1999-01-27 Thomas Tanner + + * cdemo/configure.in: renamed AM_PROG_LIBTOOL to AC_PROG_LIBTOOL + * demo/configure.in: likewise + * depdemo/configure.in: likewise + * libltdl/configure.in: likewise + * mdemo/configure.in: likewise + * libltdl/ltdl.c: in find_module() check whether libdir is defined, + tryall_dlopen(): move deallocation of an already opened handle + to lt_dlopen(), allocate the directory in lt_dlopen() dynamically, + minor cleanups, fixed memory leak (name) + * libtool.m4: renamed all AM_ macros to AC_ and added aliases for + compatibilty, updated AC_SYS_NM_PARSE (no undefined symbols, + don't count the symbols) + * ltconfig.in: added thread_safe_flag_spec (not used yet), + added generic variable for linker options "linkopts" in + all archive_cmds + * ltmain.in: added -thread-safe flag (unused) + + 1999-01-26 Alexandre Oliva + + * ltconfig.in (LTCONFIG_VERSION): damn!, adding TIMESTAMP doesn't + always work, because then different ChangeLog timestamps fail to + pass the version test. Instead of forcing both ltconfig and + ltmain.sh to be updated every time ChangeLog changes, better + revert it + + * ltconfig.in (LTCONFIG_VERSION): add TIMESTAMP, remove + explicit quotes and add it to the list of variables to quote + + * ltmain.in: reworded `dropped inter-library dependencies' + message, and added a warning about inter-library dependencies even + for non-module builds + + 1999-01-26 Gary V. Vaughan + + * Makefile.am (install-data-hook): Don't show the if expression + that tests for gzip with a conditional error message; just do it + quietly and show the error if it fails, or the next action if it + succeeds. + + * configure.in: It seems Alexandre accidentally removed the + AC_SUBST(pkgdatadir) line recently which breaks libtoolize. + Reverted that small change. + + 1999-01-25 Alexandre Oliva + + * libltdl/ltdl.c (find_module): test old_name and dlname for NULL, + not len==0 + + * libltdl/configure.in (libltdl_cv_objdir): yes, appending the "/" + in configure.in was much simpler + * libltdl/ltdl.c (objdir): ditto + + * libltdl/ltdl.c (objdir): string collation isn't portable; strcat + "/" explicitly. Or should this be moved to configure.in? + + 1999-01-25 Thomas Tanner + + * libltdl/ltdl.c: allocate the variables in lt_dlopen() dynamically + + 1999-01-25 Alexandre Oliva + + * ltmain.in (file_magic): use egrep instead of expr to support + more general regular expressions + (file_regex): remove it; the name is misleading, it's not used + anywhere, and probably will never be + * ltconfig.in, doc/libtool.texi: ditto + * ltconfig.in (linux-gnu*, deplibs_check_method): extend regex to + support `LSB dynamic lib' in the output of `file' + Reported by Scott D. Heavner + + * ltmain.in (dependency_libs, xrpath): add -R switches to + dependency_libs only just before creating the .la file; they + should not be passed to the C compiler or linker at + library-creation time, since we don't know whether it is supported + + * ltconfig.in (freebsd2.2*, hardcode_minus_L): for FreeBSD 2.2.6, + this must be `no' + + * mkstamp: move the sed script to extract revision and date + information into a separate shell-script, so that we can break + lines between commands; FreeBSD's sed doesn't like `;' after `t' + Reported by Axel Thimm + * Makefile.am: use mkstamp + * THANKS: added Axel Thimm + + * ltmain.in: don't try to use .o instead of .lo just because + there's no PIC flag. It loses if --disable-static, and there's + not much point if we're referring to the same file anyway... + + * ltmain.in (pass_all=none, droppeddeps): set only if deplibs was + non-empty + + 1999-01-24 Thomas Tanner + + * libltdl/ltdl.c: minor bugfixes, append a "/" the search + directory only if necessary + * ltconfig.in: added support for FreeBSD >= 3.0 + (patch from Kurt D. Zeilenga) + * THANKS: added Kurt D. Zeilenga + + 1999-01-24 Thomas Tanner + + * doc/libtool.texi (libltdl): list supported dlopen mechanisms, + added function lt_dlopenext(), removed reference to + LTDL_PRELOADED_SYMBOLS in LTDL_SET_PRELOADED_SYMBOLS + * libltdl/ltdl.c: partially reverted Alexandre's dynamic string + allocation change (it was not necessary and the code was unreadable), + cleanups, removed usr_search_path_size, renamed usr_search_path + to user_search_path, in find_module() also check for moved + modules, merged find_file() and find_library(), + added lt_dlopenext(), in lt_dladdsearchdir() no longer reset + the search path if 'search_dir' == NULL and don't use realloc() + (might not be available on all platforms), + removed __P((void)) in the declaration of lt_dlgetsearchpath() + * libltdl/ltdl.h: added lt_dlopenext() + * ltconfig.in: AIX archive commands were broken, + fixed a MAJOR bug in global_symbol_pipe which caused + "demo-shared.test;demo-make.test" to fail (libtool must not extract + undefined symbols of libraries, i.e. symcode must not contain 'U') + * tests/Makefile.am (clean-local): "make distclean" in cdemo, too + + 1999-01-22 Alexandre Oliva + + * Makefile.am (ltconfig, ltmain.sh): add ChangeLog Revision to + TIMESTAMP + * configure.in: get values of PACKAGE and VERSION set by + AM_INIT_AUTOMAKE, and extract only TIMESTAMP from the ChangeLog + + * libltdl/ltdl.c (lt_dlopen): if we're reusing a previously opened + handle, don't reset its name nor add it to the list, and free the + name we have allocated + Reported by Edouard G. Parmelan + + * Makefile.am (ltconfig, ltmain.sh, TIMESTAMP): let's not assume + anything about the format of the date, just that it does not + contain `$' + + 1999-01-22 Gary V. Vaughan + + * configure.in (date): echo the version number during + configuration, and show $date for cvs versions. + + * Makefile.am ($(srcdir)/ltconfig): Oops. cvs co keyword + expansion ate the sed expression! Changed sed separator to '%' + because there are '/' in the date. Added missing '\(' to search + expression. Inserted a null string to stop cvs from expanding it + next time =)O| + ($(srcdir)/ltmain.sh): ditto. + + 1999-01-22 Alexandre Oliva + + * Makefile.am (TSDEPS_DIST): dist-time dependencies for timestamps + (timestamps, update-timestamps): check whether TSDEPS_DIST are + up-to-date and update ltconfig and ltmain.sh if needed + (ltconfig, ltmain.sh): depend on TSDEPS; replace @TIMESTAMP@ with + the Date tag in the ChangeLog + (TSDEPS): empty unless overridden by update-timestamps + * ltconfig.in, ltmain.in (TIMESTAMP): append timestamp to most + references to VERSION + + 1999-01-22 Gary V. Vaughan + + * ltmain.in (ild): Revert the change which allowed libtool to + link libraries with dependencies on .la libs. + * NEWS: Removed reference to win32, incase 1.3 ships before + ild is ready. + * doc/PLATFORMS: Removed i686-pc-cygwin32, for the same reason. + * doc/libtool.texi: Removed win32 refs, for the same reason. + + 1999-01-22 Alexandre Oliva + + * ltmain.in (Xsed): add 1 to Xsed definition that goes into + temporary wrapper scripts + * libtool.m4: we don't have Xsed here, expand it manually + Reported by Pavel Roskin + + 1999-01-22 Edouard G. Parmelan + + * ltmain.in (finalize_hardcode_libdirs, finalize_rpath): in + platforms that use -rpath, programs must be finalized at + installation time, otherwise build-tree programs will + prefer installed libraries over build-tree ones + + 1999-01-22 Alexandre Oliva + + * mdemo/Makefile.am (../libltdl/libtool): if it does not exist, + the sub-make for libltdlc.la will take care of it, but we must at + least provide an empty rule for it, otherwise the sub-make will + never run + + * demo/configure.in, demo/Makefile.am (DLPREOPEN): reverted; it + didn't make any difference. + + 1999-01-21 Gary V. Vaughan + + * THANKS: Added Chris Laas + + From Chris Laas + * ltmain.in (compile): corrected a typo in compile mode which + caused "gcc: unrecognized option -c-fPIC" errors due to a missing + space. + + 1999-01-21 Alexandre Oliva + + * libltdl/configure.in: reintroduce code to detect native library + extension + * libltdl/ltdl.c (lt_dlopen): if a .la file name is given, that's + all. Otherwise, lt_dlopen now tries to append .la first. If this + fails, it tries the given filename, and, at last, tries to append + the native library extension to the given filename. + * doc/libtool.texi (lt_dlopen): explain new lookup strategy + + * libltdl/ltdl.c: major rewrite to avoid almost all fixed-size + buffers; only `tmp' in lt_dlopen remained. But the code got ugly + :-( + + * ltconfig.in (linux-gnu*, finish_cmds): remove erroneous backslash + + * demo/configure.in: set DLPREOPEN to -dlopen if we don't have + shared libraries + * demo/Makefile.am (DLPREOPEN): use instead of -dlpreopen + (STATIC): use $(STATIC), not @STATIC@ + * mdemo/Makefile.am (STATIC): ditto + + * tests/demo-shared.test, tests/demo-static.test: new tests + * tests/mdemo-shared.test, tests/mdemo-static.test: ditto + * tests/Makefile.am: ditto + * doc/libtool.texi: document them + * demo/Makefile.am, mdemo/Makefile.am (STATIC): do not use + -static unconditionally, it can't work with --disable-static + * demo/configure.in, mdemo/configure.in: check whether libtool was + configured to build static libraries and, if not, set STATIC to an + empty string + + 1999-01-20 Alexandre Oliva + + * ltmain.in (module, droppeddeps): if libtool could not satisfy + all dependencies of a module, it will only build a static version + of it, and display a warning message + + 1999-01-20 Erez Zadok + + * ltconfig.in (aix4*, with_gcc, archive_cmds): fix typo in Andrey + Slepuhin's last patch + + 1999-01-20 Alexandre Oliva + + * Makefile.am (@DIST_MAKEFILE_LIST@): work around Ultrix /bin/sh bug + * tests/nomode.test (must specify a MODE): ditto + Reported by Rainer Orth + * THANKS: Added Rainer Orth + + 1999-01-20 Rainer Orth + + * ltconfig.in: No known version of Solaris 2 hardcoded -L paths. + + 1999-01-20 Erez Zadok + + * ltmain.in: s/n\'t/ not/ + * doc/PLATFORMS: updates for sunos4/m68k and aix + + 1999-01-20 Andrey Slepuhin + + * ltconfig.in (aix4*): check for reworked collect2, always pass + -bnoentry option to linker when building a shared library + + 1999-01-20 Alexandre Oliva + + * ltmain.in (file_magic): follow soft-links before running `file' + on the candidate library; try to avoid entering endless loop + Suggested by Nix + + * ltconfig.in (linux*, solaris*, bsdi4*, sys_lib_search_path): + remove expansion of $LD_LIBRARY_PATH + * ltmain.in (lib_search_path): append the expansion of $shlibpath_var + * doc/libtool.texi: document it + + * THANKS: Added Steven Schultz + + 1999-01-20 Steven M. Schultz + + * ltconfig.in (bsdi4*, check_shared_deplibs_method): file_magic + (bsdi4*, sys_lib_search_path): add /shlib and other dirs + + 1999-01-20 Alexandre Oliva + + * cdemo/main.c (main): use K&R definition syntax + * mdemo/main.c (test_dl, main): ditto + (test_dl): casts return value of lt_dlsym to appropriate types + + * ltmain.in (dlsyms): #define const to nothing if not __STDC__ + + * ltconfig.in (global_symbol_pipe): #define const to nothing if + not __STDC__ + + * demo/dlmain.c (main): cast s->address to the appropriate pointer + types, otherwise StunOS4's cc refuses to compile it + + * ltconfig.in (sunos4*, without_gnu_ld, with_gcc, archive_cmds): + add -fPIC, because libgcc is multilibbed, and we want the PIC + version of it for shared libraries, otherwise ld complains + + * demo/dlmain.c (main): add missing const to declaration of name + + * libltdl/ltdl.c (find_module): remove the libdir argument, and + try to open library only as old_name and dir/dlname + (lt_dlopen): use `installed' variable in .la file to decide + whether to use libdir or objdir + + * demo/configure.in (AC_C_CONST): added, for portability + * mdemo/configure.in (AC_C_CONST): ditto + * libltdl/configure.in (AC_C_CONST, AC_C_INLINE): ditto + * libltdl/ltdl.c (LTDL_FILENAME_MAX): use FILENAME_MAX if defined + (FILENAME_MAX): replace all explicit uses with LTDL_FILENAME_MAX + (presym_free_symlists, trim): don't return void, for portability + (lt_dlgetsearchpath): replace (void) with __P((void)) + + * ltmain.in (compile): when compiling both PIC and non-PIC, write + the PIC object to .libs/.lo and only rename it to .lo after + compiling the .o, to avoid fooling make dependencies + + * mdemo/main.c (LTDL_PREOPENED_SYMBOLS): remove + + 1999-01-20 Gary V. Vaughan + + * TODO: Added inter-library deps for ltlibs. + + * THANKS: Added Vladimir Kushnir. + + 1999-01-20 Vladimir Kushnir + + * ltconfig.in (freebsd3*): Define `deplibs_check_method' and + `file_magic_command' for freebsd-elf. + + 1999-01-20 Alexandre Oliva + + * TODO: should we also build a `static' copy of a convenience + library out of .o files? + + * ltconfig.in (bsdi4*, netbsd*, uts4*, library_names_spec, + soname_spec): removed duplicate dot before $major + Reported by Steven M. Schultz (bsdi4*) + + * THANKS: added Manfred Weichel + + 1999-01-20 Manfred Weichel + + * ltconfig.in (sysv5*): same as sysv4.3* + + 1999-01-20 Alexandre Oliva + + * libltdl/ltdl.c (lt_dlopen): properly detect error condition when + full pathname of non-libtool library is provided + + * libltdl/configure.in (libltdl_cv_preloaded_symbols, + HAVE_PRELOADED_SYMBOLS): test whether we support -dl*open + * libltdl/ltdl.c (!HAVE_PRELOADED_SYMBOLS, lt_preloaded_symbols): + define it to an empty list if libtool won't generate it, so as to + avoid link errors. This will cause silent dlopening failures, but + maybe this is better than failing to link the program... + + * libltdl/ltdl.h (LTDL_PRELOADED_SYMBOLS): remove it; better to + declare lt_preloaded_symbols + * doc/libtool.texi (LTDL_PRELOADED_SYMBOLS): ditto + + * ltmain.in (dlpredeps): removed, reverting 1999-01-17's change + + 1999-01-19 Alexandre Oliva + + * libltdl/Makefile.am (Makefile): depend on libtool + + * ltmain.in (lt_preloaded_setup): function added to symbol list + source file to work around FreeBSD problem + + * Makefile.am (check-local): depend on libltdl/Makefile + + * mdemo/Makefile.am (mdemo_LDFLAGS, mdemo_LDADD): moved -dlopen + flags to LDADD + * doc/libtool.texi (Using Automake): how to add -dlopen to LDADD + + 1999-01-19 Gary V. Vaughan + + From Andrey Slepuhin + * ltmain.in (hardcode_action) Oops, misapplied the patch! + + * ltconfig.in (compile_dependencylbs): removed this + variable and pick up the library dependencies from $deplibs. + * ltmain.in (compile_dependencylibs): removed this + variable, use deplibs to hold these dependencies. + + From Andrey Slepuhin + * ltmain.in (hardcode_action) make sure deplibs is set to include + all the extra libs added to compile_command. + + 1999-01-18 Alexandre Oliva + + * libtool.m4 (LIBTOOL_DEPS): set it + * libltdl/configure.in (LIBTOOL_DEPS): AC_SUBST it + * libltdl/Makefile.am (libtool): use it + * doc/libtool.texi (AM_PROG_LIBTOOL): document it + + * Makefile.am (libltdl.tar.gz): don't create it as part of the + build, since it is likely to become stale if we do + (install-data-hook): create and install libltdl.tar.gz, without + depending on GNU tar + Reported by Manfred Weichel + + 1999-01-17 Thomas Tanner + + * Makefile.am: added libltdl.tar.gz to CLEANFILES + * ChangeLog: some reformatting + * TODO: documentation updates + * doc/libtool.texi: added preliminary libltdl documentation, + updated dlopen and -module documentation, + renamed -avoid-versioning to -avoid-version + documented the libtool script variables compiler_c_o, + compiler_o_lo, need_locks, old_postuninstall_cmds, + postuninstall_cmds, sys_lib_search_path_spec, + fix_srcfile_path, objdir, objext, libext, + documented the two new flags (--ltdl[-tar]) of libtoolize + * libltdl/Makefile.am: incremented the version, removed + libtool dependency so that it can be build independently + * libltdl/configure.in: removed LTDL_SHLIB_EXT hack, + set version to 1.0, use AM_MAINTAINER_MODE, + DLPREOPEN is always supported, check for libtool's objdir variable + (LTDL_OBJDIR) + * libltdl/ltdl.c: some cleanups (moved constants to the beginning + of the file and prefixed all of them with LTDL_, minor optimizations + in find_file() and find_module()), renamed lt_dlpreopen* to + lt_dlpreload* for consistency, removed LTDL_SHLIB_EXT hack, + we don't need unistd.h, DLPREOPEN is _always_ supported, + reverted Alexandre's lt_dlpreopen_default_ change, + try to open the not-installed module before the installed one, + replaced lt_dlsearchpath() with lt_dladdsearchdir(), + lt_dlsetsearchpath() and lt_dlgetsearchpath() + * libltdl/ltdl.h: renamed lt_dlpreopen* to lt_dlpreload* + for consistency, removed the declaration of lt_preloaded_symbols + (should be imported by programs), + reverted Alexandre's lt_dlpreopen_default_ change and added + two new macros LTDL_PRELOADED_SYMBOLS and + LTDL_SET_PRELOADED_SYMBOLS(), + added lt_dladdsearchdir(), lt_dlsetsearchpath() and + lt_dlgetsearchpath() + * libtool.m4: some reformatting + * libtoolize.in: implemented --ltdl, bugfix when checking for + the libtool package directory + * ltconfig.in: removed $thread_safe_flags from Andrey Slepuhin's + AIX patch, renamed sys_lib_search_path to sys_lib_search_path_spec, + some reformatting, fixed typo in deplibs_check_method (unkwnon) + * ltmain.in: documented -o for compile mode, some reformatting, + renamed -avoid-versioning to -avoid-version + renamed sys_lib_search_path to sys_lib_search_path_spec + * mdemo/Makefile.am: use -avoid-version + * mdemo/main.c: use LTDL_PRELOADED_SYMBOLS and + LTDL_SET_PRELOADED_SYMBOLS() + + 1999-01-17 Alexandre Oliva + + * ltconfig.in (wlarc): set to either '${wl}' or an empty string, + depending on whether archive_cmds runs CC or LD + (gnu_ld=yes, whole_archive_flag_spec): "$wlarc" instead of '${wl}' + + * mdemo/Makefile.am (../libltdl/libltdlc.la): depend on + ../libtool, because ../libltdl/libtool depends on it + (mdemo_debug_*): copy from mdemo_*, adding -static to LDFLAGS + + * ltmain.in (dlpredeps): append dependencies from dlopened modules + (but not dlpreopened ones) after all explicitly linked libraries + + * ltconfig.in (need_lib_prefix, need_version, + deplibs_check_method): default to unknown, so that we're + remembered that this needs porting; unknown is interpreted as yes, + yes and none, respectively + (freebsd2*, freebsd3*, sunos4*, need_version): set to yes + (freebsd2*, freebsd3*, library_names_spec): libraries without a + version number are not used by `ld'; add $versuffix; + Reported by Ben Jackson + * ltmain.in (deplibs_check_method): alias unknown to none + (need_version): if vinfo was not provided and release info was, + zero out versuffix only if we don't need_version. + * doc/libtool.texi: document what `unknown' means + + * libltdl/ltdl.h (lt_dlpreopen_default): reverted to a macro + without arguments, that calls lt_dlpreopen_default_ with + lt_dlpreloaded_symbols + * libltdl/ltdl.c (lt_dlpreopen_default_): renamed from + lt_dlpreopen_default + (find_module) tryall_dlopen old_name first, so that we don't + override statically linked symbols with dlopened ones + + 1999-01-15 Gary V. Vaughan + + From Andrey Slepuhin + * libtoolize.in (cd $pkgdatadir): Make sure we return the the + working directory when this is done. + + From Andrey Slepuhin + * ltconfig.in (aix): Use shared library support correctly on + aix4*, and tweak the config for aix3. + * NEWS: added aix3 and aix4 to list of hosts with improved + support. + * THANKS: added Andrey Slepuhin . + + 1999-01-15 Thomas Tanner + + * Makefile.am (@DIST_MAKEFILE_LIST@): added a second '$' + before abs_scrdir, removed ltconfig and ltmain.sh from + EXTRA_DIST (automake distributes them by default) + + 1999-01-14 Thomas Tanner + + * autogen: moved faking of the libtool scripts before + the call of automake, so that ltconfig and ltmain.sh + are included in the distribution + * ltconfig.in: when checking whether PIC is supported assume + only on HP/UX that warnings during compilation mean that + PIC is not supported (Thanks to Ron O'Hara) + * THANKS: added Ron O'Hara + + 1999-01-14 Alexandre Oliva + + * Makefile.am: Moved ltconfig and ltmain.sh back into srcdir, and + add them to the distribution. Added work-around if `mv -f' fails. + fix @AINCLUDE_M4_LIST@ and @DIST_MAKEFILE_LIST@ for relative and + absolute specifications of srcdir + + 1999-01-14 Thomas Tanner + + * libltdl/ltdl.c: added variable symbol prefix, added user-defined + library search path (can be set using lt_dlsearchpath()), + added default_preloaded_symbols which are independent of + lt_dlinit/exit + * libltdl/ltdl.h: added lt_dlsearchpath() and + lt_dlpreopen_default() + * mdemo/Makefile.am: use -export-dynamic until libtool + and libltdl are able to handle module dependencies + + 1999-01-14 Gary V. Vaughan + + * THANKS: added Mark Elbrecht. + * ltconfig.in (PATH_SEPARATOR): new variable to hold valid $PATH + separator characters for the build host, to support DJGPP + environment. + * ltconfig.in: Use PATH_SEPARATOR instead of hardcoded `:'. + Reported by Mark Elbrecht + + * cdemo/README: typo: mdemo->cdemo + + 1999-01-14 Thomas Tanner + + * autogen: fake the libtool scripts to help fixing + the bootstrapping problem + * Makefile.am: always configure libltdl, however after building + the libtool scripts, + build the libtool scripts in builddir, not srcdir + (unfortunately this breaks building when srcdir!=objdir, + but it was just plain wrong - needs to be fixed), + build and install libltdl.tar.gz, + copy acinclude.m4 instead of linking them, so that we + can 'make dist' in libltdl, + fixed configuring of subdirectories + * configure.in: removed --enable-ltdl-install - libltdl is supposed + to be installed by packages, not by libtool itself + * libtoolize.in: new flags --ltdl and --ltdl-tar to install libltdl + in packages (--ltdl doesn't work yet), + install only the necessary libtool scripts, not just all + files in pkgdatadir + * mdemo/Makefile.am: removed the rule for libltdl configuration + + 1999-01-13 Alexandre Oliva + + * mdemo/Makefile.am (../libltdl/libtool): mkdir and configure + ../libltdl + + 1999-01-13 Thomas Tanner + + * demo/dlmain.c, libltdl/ltdl.c, ltconfig.in, ltmain.in, + doc/libtool.texi: renamed dld_preloaded_symbols to + lt_preloaded_symbols, symbol lists are 'const' + * cdemo/configure.in: don't check for string.h + * demo/dlmain.c: renamed dld_symlist to lt_symlist, + preloaded symbols are 'const', use lt_ptr_t instead of void* + * demo/foo.h: define lt_ptr_t + * doc/libtool.texi: document lt_preloaded_symbols correctly + * libltdl/Makefile.am, mdemo/Makefile.am: renamed libtest to libltdlc + * libltdl/ltdl.c: fixed some minor typos, renamed dldpre to presym, + bugfix: search in search_path only if we have no directory + and a search_path, in lt_dlsym() check whether symbol != 0 + * libltdl/ltdl.h: removed lt_dlpreopen_default() + * ltconfig.in (dlpreopen): removed dld_preloaded_symbol_count + * ltmain.in: added help for -avoid-versioning, -export-symbols, + -module, add @SYMFILE@ if one of -export-dynamic, -dlopen or + -dlpreopen is used + * mail/deplibs.html: added Gordon Matzigkeit's inter-library + dependencies article + * mdemo/Makefile.am: removed -export-dynamic from LDFLAGS + (no longer necessary, since libtool defines lt_preloaded_symbols + when -dlopen is used), initialize with lt_preloaded_symbols + + 1999-01-13 Alexandre Oliva + + * doc/libtool.texi (Test descriptions): cdemo-static works, thanks + to Edouard Parmelan! + + * THANKS: added Sebastian Wilhelmi + + * ltconfig.in (solaris): define `need_version' to no + + 1999-01-13 Sebastian Wilhelmi + + * ltconfig.in (solaris): Define `deplibs_check_method', + `file_magic_command', `need_lib_prefix' and `sys_lib_search_path' + * ltmain.in (file_magic_regex): Add space before matching pattern, + such that it works on solaris (solaris has a tab between the + library name (including the colon) and the `ELF' and such the + `ELF' will never be matched). + + 1999-01-13 Edouard G. Parmelan + + * ltconfig.in (NM): PATH search was not updated like in + libtool.m4, in last Alexandre Oliva's change to it + (sysv4*, ncr): pass all library dependencies + * ltmain.in (dependency_libs, -R): use `deplib' instead of `arg' to + iterate, otherwise we'd overwrite `arg' + (convenience, old_libs): if --disable-shared, convenience + libraries are just old archives, as .lo's are of no use + * tests/cdemo-static.test: print --disable-shared here + + 1999-01-13 Alexandre Oliva + + * libltdl/configure.in (libltdl_cv_shlibext, LTDL_SHLIB_EXT): + system-dependent extension of shared libraries + (libltdl_cv_shlibpath_var, LTDL_SHLIBPATH_VAR): system-dependent + run-time shared library search path + * libltdl/ltdl.c (dldpre_init, dldpre_exit): unrelate init/exit + from add/remove symlists, so one may add dld_preloaded_symbols + from main(), when only a library will call dldpre_init + (lt_dlopen): use LTDL_SHLIBPATH_VAR, if defined, as secondary + search path. Also, if a requested .la file cannot be found, try + with the LTDL_SHLIB_EXTension instead. + + * ltmain.in (old_archives, oldobjs): use find to SYMDEF here too + + * Makefile.am (@DIST_MAKEFILE_LIST@): `$' must be doubled + + * configure.in (AC_CONFIG_DIRS): configure only libltdl, and then, + only if --enable-ltdl-install + (CONF_SUBDIRS): list directories that are configured on demand, + but that must be included in the distribution + (ACINCLUDE_M4_LIST, DIST_MAKEFILE_LIST): generated from CONF_SUBDIRS + * Makefile.am (AUTOMAKE_OPTIONS): added version 1.3e and + readme-alpha, to handle README-alpha automatically + (EXTRA_DIST): removed README-alpha + (BUILD_SUBDIRS): subdirectories that are always built + (SUBDIRS): BUILD_SUBDIRS plus BUILD_LTDL + (DIST_SUBDIRS): BUILD_SUBDIRS plus CONF_SUBDIRS, from configure + (all-local, check-local): depend on $(ACINCLUDE_M4_LIST), from + configure, and libtool, so that it is built before subdirs + (configure-subdirs): new target + (configure-subdirs, distdir): depend on $(DIST_MAKEFILE_LIST), + from configure + (@DIST_MAKEFILE_LIST@): create subdir if needed, then run + configure. + On-demand configuration of subdirs at distribution time was + suggested by Gary V. Vaughan + + * libtool.m4, ltconfig.in (NM): search for NM in PATH before + /usr/ccs/bin, /usr/ucb and /bin. However, if the found one isn't + BSD-compat keep searching. If no BSD-compat is found, use the + first we found. + + * THANKS: added Raffaele Sena + + 1999-01-13 Raffaele Sena + + * libltdl/ltdl.c: replaced RTDL with RTLD + + 1999-01-13 Manish Singh + + * ltconfig.in (osf3*, osf4*, irix6*): include + ${libname}{release}.so for library_names_spec + + 1999-01-13 Alexandre Oliva + + * configure.in (AC_CONFIG_SUBDIRS): added cdemo + * Makefile.am (DIST_SUBDIRS): ditto + (ACINCLUDE_M4_LIST): ditto + * tests/Makefile.am (TESTS): added cdemo-shared.test + * tests/cdemo-static.test: disable shared libraries here + * tests/cdemo-shared.test: disable static libraries here + * doc/libtool.texi (Test descriptions): added cdemo tests + * THANKS: added Edouard G. Parmelan + + 1999-01-13 Edouard G. Parmelan + + * ltmain.in: fix convenience libraries when static libraries + are disables. + * cdemo/README, cdemo/Makefile.am, cdemo/configure.in, cdemo/foo.h, + cdemo/foo1.c, cdemo/main.c, cdemo/.cvsignore, test/cdemo-conf.test, + test/cdemo-make.test, test/cdemo-exec.test, test/cdemo-static.test: + new tests for convenience libraries. + * autogen, Makefile.am, test/Makefile.am: ditto. + + * ltconfig.in, doc/PLATFORMS: Added support for NCR MP-RAS + (i586-ncr-sysv4.3*) with native compiler. + * README, doc/libtool.texi: Added note for NCR MP-RAS compiler. + + 1999-01-12 Thomas Tanner + + * ltmain.in: before using LN_S remove the symlink + * libltdl/ltdl.c: support multiple symbol lists, moved library- + and file searching to separate functions, renamed "preload_libs" + to "dl_dependency_libs", set the LT_SYMBOL_OVERHEAD to the correct + value (7), fix to support lt_dlsym() for not-libtool modules again, + check for invalid handles, when using strdup() check whether + it fails + * libltdl/ltdl.h: declare the lt_dlsymlist type for lt_dlpreopen() + * mdemo/README: rewritten + * mdemo/configure.in: check only for math.h (string.h is no longer + necessary) + + 1999-01-12 Gary V. Vaughan + + * configure.in (ltdl-install): Fixed up the indentation so that + `configure --help' is pretty again. + + 1999-01-11 Alexandre Oliva + + * ltmain.in, NEWS, doc/libtool.texi: Added support for -R flag + * ltmain.in, doc/libtool.texi: documented that -rpath is the same + as -R for programs + * ltmain.in: softened the instructions for linking with installed + libraries, and noted that libtool can be used to link with them; + documented that -rpath is not required for convenience libraries + + * ltconfig.in (symxfrm): don't print $pipe_works twice, once for + each $ac_symprfx + Reported by Godmar Back + + * ltmain.in (convenience, libobjs): get only .o and .lo files from + the files extract from the convenience library. Some systems, + such as FreeBSD2, will add a SYMDEF file, that is not an object + file, and therefore should not be fed to the linker + + * libtool.m4 (AM_SYS_NM_PARSE): while we are at it, we may well + cache the value of ac_cv_sys_symbol_underscore + + * libtool.m4 (AM_SYS_NM_PARSE): need for underscore prefix is now + auto-detected, by trying first without, then with it. + + * ltconfig.in: ditto + + 1999-01-10 Alexandre Oliva + + * configure.in (AC_CONFIG_SUBDIRS): add libltdl, demo, mdemo and + depdemo commented out, so that `dist' works before `check' + (BUILD_LTDL): will contain libltdl if --enable-ltdl-install + * Makefile.am (DIST_SUBDIRS): expand SUBDIRS and add depdemo, + commented out + (SUBDIRS): add $(BUILT_LTDL) + * libltdl/Makefile.am (EXTRA_LTLIBRARIES): add libtest.la, the + same as libltdl but always a convenience library. Not built by + default. Both libraries now depend on the libtool script, that + depends on ../libtool and is rebuilt when needed + * mdemo/Makefile.am (mdemo, mdemo.debug): depend on and link with + ../libltdl/libtest.la, that is rebuilt if needed + (mdemo_LDADD): removed $(LIBADD_M), to avoid silent failures + (foo1.la): renamed from libfoo1.la; test removing the lib prefix + * mdemo/foo1.c: renamed libfoo1_LTX symbols to foo1_LTX + * mdemo/main.c: don't include string.h nor math.h, nor refer to + sin nor cos + * tests/mdemo-exec.test: renamed libfoo1.la to foo1.la + * tests/mdemo-inst.test: ditto + + * libltdl/ltdl.c (FILENAME_MAX): use it instead of MAX_FILENAME, + and don't redefine it if already defined; default to 1024, as on + most systems + (LT_SYMBOL_LENGTH): renamed from MAX_SYMBOL_LENGTH + (LT_SYMBOL_OVERHEAD): new macro, that accounts for the size of + the _LTX_ separator and the initial underscore + (lt_dlsym): sym now points to a stack buffer (lsym) if possible, + or is dynamically allocated. If allocation fails, a + buffer_overflow_error is returned. + + 1999-01-10 Thomas Tanner + + * ltmain.in: define dld_preloaded_symbols if at least one of + -export-dynamic, -dlopen or -dlpreopen was specified, + do not include program objects in the symbol list + if -export-dynamic was not enabled + * libltdl/ltdl.c: limit symbols to max. 256 bytes + * mdemo/Makefile.am: build libltdl in a subdirectory, + do not use -export-dynamic for mdemo and mdemo.debug + * tests/mdemo-conf.test,tests/mdemo-make.test,tests/mdemo-inst.test: + do not check for libltdl + + 1999-01-09 Alexandre Oliva + + * libltdl/ltdl.c (lt_dlopen): missing strlen in bound test + + 1999-01-09 Thomas Tanner + + * NEWS: support for BSD/OS 4.x was not documented + * demo/Makefile.am: link against libm only if available + * mdemo/Makefile.am: likewise, use -avoid-versioning flag + instead of -avoid-version (typo) + * demo/configure.in: check for libm, string.h and math.h + * mdemo/configure.in: likewise + * depdemo/configure.in: check for libm and math.h + * libltdl/configure.in: check for dlerror + * libltdl/ltdl.c: check for buffer overflows, implemented + dlerror, fixed a severe bug which occured when opening + non-libtool modules, dlopen with the flags GLOBAL and NOW + * mdemo/main.c: report the error using lt_dlerror() + + 1999-01-08 Gary V. Vaughan + + * doc/libtool.texi (old_archive_from_new_commands): Documented + this ltcofig variable. + + 1999-01-07 Gary V. Vaughan + + * ltmain.sh (cygwin, allow_undefined): Unfortunately, there are + problems with this variable when trying to make a dll which has + undefined symbols, in which case not even a static library is + built. For now, we need to specify -no-undefined on the libtool + link line when we can be certain that all symbols are satisfied, + otherwise we get a static library. + + 1999-01-06 Thomas Tanner + + * ChangeLog: merged in tests/ChangeLog + * tests/ChangeLog: deleted + * libltdl/ltdl.c: assigned copyright to the FSF + * libltdl/ltdl.h, mdemo/foo*,main.c: likewise + + 1999-01-06 Gary V. Vaughan + + * ltmain.in (dllsearchpath): add absolute directory paths to + dllsearchpath so that the wrapper scripts can be called from any + directory (e.g. tests) on cygwin. + + * ltconfig.in (cygwin, library_names_spec): revert Alexandre's + change from yesterday to use `-dll.a' suffix. That change caused + $libname-dll.a to be a symlink to $soname, which isn't even an + `ar' archive. Before the import library suffix can be changed, we + need to figure out how to handle building objects differently for + linking with an import library versus an equivalent static library. + + * TODO: Added details of a Linux wrapper script bug. + Reported by Jeff Garzik . + + 1999-01-05 Alexandre Oliva + + * ltmain.in (libobjs_save, oldobjs): when building an + old-fashioned archive, use a copy of libobjs saved before + convenience libraries are appended + + * libltdl/ltdl.h (_LTDLL_EXPORT, _LTDLL_IMPORT): use cygwin or + unix library import/export primitives; this may be convenient for + people willing to create DLLs + (_LTDLL_EXTERN): select _LTDLL_EXPORT or _LTDLL_IMPORT depending + on _LTDL_COMPILE_ + * libltdl/ltdl.h, libltdl/ltdl.c (lt_dlpreopen): new function, + that replaces the current preloaded_symbols list with its + argument, and returns the old value, initially NULL + (dldpre_init): don't refer to dld_preloaded_symbols any more + (dldpre_open, dldpre_sym): search preloaded_symbols + (lt_dlpreopen_default): call lt_dlpreopen with + dld_preloaded_symbols, that is declared as extern; it should be + called from the main program or from some static library without + -no-undefined + (lt_dlerror): new function, that returns the error message for the + last error occurred; the error message is kept in the static + variable last_error + * libltdl/configure.in (enable-ltdl-install): moved back from + enable-install; other packages might use enable-install already, + better have fine grained control over this. + * libltdl/Makefile.am (libltdls.la): discarded + + 1999-01-05 Thomas Tanner + + * configure.in: do not configure libltdl by default + * Makefile.am: do not build libltdl by default + * libltdl/Makefile.am: ltdls.lo depends on libtool + * tests/Makefile.am: before starting the tests + make sure that libtool was build + * tests/mdemo-conf.test: configure libltdl + * tests/mdemo-make.test: build libltdl + + 1999-01-05 Alexandre Oliva + + * ltmain.in (SP2NL, NL2SP): Don't delete empty lines, as this + would lose for files with embedded blanks. + + * ltconfig.in (cygwin, archive_cmds, archive_sym_cmds): Moved + ltdll.c into ltmain.in, to avoid its duplication, and added a sed + script to extract it. Also, create def and base files in $objdir, + and don't remove them after the compilation. + (cygwin, library_names_spec): Create static part of the dll with + suffix -dll.a, to avoid conflicts with actual static libraries. + * ltmain.in: Added ltdll.c, as commented out text + + 1999-01-01 Thomas Tanner + + * NEWS: new BeOS support + * THANKS: added Joseph Beckenbach + * libltdl/ltdl.h: use dllimport/export on Win32 + + 1998-12-31 Joseph Beckenbach III + + * ltconfig.in: added support for BeOS + * ltmain.in (shlibpath_var): added a workaround for + an odd bug in the BeOS R4 sed + + 1998-12-31 Thomas Tanner + + * verified all copyright notices + and updated them to 1999 + * TODO: added some things that need to documented + * doc/libtool.texi: -export-symbols is not + supported on all platforms + * doc/PLATFORMS: added a few new platforms + + 1998-12-30 Thomas Tanner + + * NEWS: updated + * THANKS: added Todd Vierling + + 1998-12-30 Todd Vierling + + * ltconfig.in: improved shared object handling on both + a.out and ELF platforms for NetBSD + + 1998-12-29 Thomas Tanner + + * ltconfig.in: do not rely on a leading space when concatenating + variables as suggested by Erez Zadok + * ltmain.in: likewise + * doc/PLATFORMS: updated and reformatted + (thanks to Erez Zadok for the testing) + + 1998-12-27 Thomas Tanner + + * THANKS: added Erez Zadok + + 1998-12-26 Erez Zadok + + * ltconfig.in: support i486-ncr-sysv4.3.03 + shared libraries. + + * ltmain.in: before every ln -s, remove the link name + + 1998-12-25 Thomas Tanner + + * depdemo/configure.in: removed last relics of demo + * depdemo/sysdep.h: ditto + * mdemo/Makefile.am: ditto + * libltdl/Makefile.am: fixed the version number, build libltdls if + -enable-install and -enable-dlpreopen are enabled + * libltdl/configure.in: libltdl is version 0.1, not 1.0, + renamed -enable-ltdl-install to -enable-install, + conditionals for libltdls, check for strchr and index, + replaced NULL with 0 + * libltdl/ltdl.c: replaced NULL with 0, dlpreopen only if + USE_DLPREOPEN was defined, integrated shl_load code from GModule + (still untested) + + 1998-12-24 Gary V. Vaughan + + * libltdl/configure.in: fixup spacing in --enable-ltdl-install + help string so that it lines up nicely for configure --help. + + * ltmain.in (dllsearchpath): keep track of what the dll search path + will need to be in the wrapper scripts as deplibs are calculated. + Make sure the wrapper script doesn't end in `.exr', which makes + win32 try to execute it as a binary! + Add the contents of dllsearchpath to $PATH in the wrapper script. + Use the relative path to the wrapped program so that the dll + search path is calculated properly by win32 OSes. + * TODO: removed the item for making wrapper scripts work on win32. + + * TODO: removed the reference to making libltdl and demo work on + win32. They *do* work now that wrapper scripts are functioning. + + * ltmain.in (file_magic_command): It turns out that if the + file_magic_command generates huge output (e.g. running `objdump + -f' over a large import lib [say libX11.a]) the expr to check it + against the file_magic_regex blows up. There is now an optimistic + heuristic, to save only the first 10 lines of running + file_magic_command which (at risk of sounding like Bill) should be + enough for anyone =)O|. + + * ltmain.in: Set the compile_dependencylibs and dllsearchpath for + non-libtool libs, or else libdeps only works between ltlibs for + cygwin32. + + 1998-12-23 Alexandre Oliva + + * ltmain.in (SP2NL, NL2SP): use `tr' magic to avoid passing very + long lines to sed + * doc/libtool.texi (sed): very long lines are no longer a problem + + * libltdl/Makefile.am: install libltdl conditionally... + * libltdl/configure.in: ... if --enable-ltdl-install is issued + * libltdl/ltdl.c: removed #ifdef DEBUG + * mdemo/Makefile.am (mdemo_debug_LDADD, mdemo_debug_DEPENDENCIES): + use libltdl.la + + 1998-12-23 Gary V. Vaughan + + * doc/PLATFORMS: added my cygwin32 box (i686-pc-cygwin32). + + * TODO: remind myself of the win32 tasks remaining. + + * ltconfig.in (archive_cmds, archive_sym_cmds, + old_archive_from_new_cmds): Fixed a bug which left an a.exe in the + build directory. Fixed a bug where $soname-def was never deleted. + + * ltconfig.in (file_magic_command): new variable holds the command + (including any args) to run to generate the string to match + against the regex in $file_magic. Use the variable where + necessary. Added to libtool header output. + (deplibs_check_method): use file_magic for win32, but compare the + output of `objdump -f' with the regex (see below). + (archive_cmds, archive_sym_cmds): use compile_dependencylibs for + each $CC invokation (see below). + + * ltmain.in: Set allow_undefined to `no' for win32 variants by + default, otherwise it is impossible to link a dll without forcing + the makefile maintainer to figure out whether to pass + --no-undefined at every libtool invokation. + (compile_dependencylibs): save the list of dependency library + flags needed for a deplib build on win32. + (link_against_libtool_libs): commented out the check for this; if + it is left in, then ltlibs (i.e. *.la files) cannot be deplibs for + subsequent links. + Don't add -lc to the deplibs line for win32 platforms (which don't + have a libc as such). + (file_magic_command): use this to get some output to compare with + the file_magic regex (instead of hardcoding `file' which doesn't + exist on win32. + * doc/libtool.texi (Porting inter-library dependencies): Updated + to document the changes above. + + * ltconfig.in (deplibs_check_method): Changed the file_magic regex + to match more linux variants. This is less lenient than Thomas + Tanner's commit to fix the same problem below. + Reported by Joel Klecker + * THANKS: added Joel Klecker + + 1998-12-23 Thomas Tanner + + * ltconfig.in: fixed file-magic for Linux shared libraries + * ltmain.in: removed the unused -force-static flag + * libltdl/ltdl.c: added strchr, search modules in LTDL_LIBRARY_PATH, + check whether actual module was already dlopened, + read in preload_libs rather than dependency_libs + + 1998-12-23 Thomas Tanner + + * libltdl/Makefile.am: build two versions of libltdl: + libltdl (support native dlopen if available, otherwise dlpreopen), + libltdls (like libltdl, but always support for dlpreopen) + * libltdl/ltdl.c: ditto + * libltdl/configure.in: warn if dlopen is not supported + * mdemo/Makefile.am (mdemo.debug): use libltdls + + 1998-12-22 Gary V. Vaughan + + * ltconfig.in: revert Thomas Tanners change to create all + libraries without the `lib' prefix on win32, otherwise `gcc foo.c + -lbar' can't find libbar.a. + + 1998-12-22 Alexandre Oliva + + * Makefile.am (SUBDIRS): prepend `.' to avoid am-recursive + dependency hack + + 1998-12-21 Thomas Tanner + + * ltconfig.in: indentation is now 8 character wide tabs + * ltmain.in: ditto + * ChangeLog: ditto + * ltmain.in: renamed check_shared_deplibs_method to + deplibs_check_method (we_dont_want_too_long_variable_names :) + * doc/libtool.texi (Porting inter-library dependencies): ditto + * depdemo/.cvsignore: renamed hell* to depdemo*, added *.lo,*.la + * mdemo/.cvsignore: ditto + + 1998-12-21 Gary V. Vaughan + + * libtool.m4 (AM_SYS_NM_PARSE): apparently __ptr_t is predefined + on some systems - use lt_ptr_t instead. + * ltconfig.in: ditto. + * ltmain.in: ditto. + + * libtool.m4 (AM_SYS_SYMBOL_UNDERSCORE): use an AC_SUBST to pass + the result of this into the compile rather than AC_DEFINE which + breaks when building with older versions of autoconf. + * ltconfig.in (symxfrm): Don't put the leading underscore back + with the global_symbol_pipe. + * demo/dlmain.c (main): No need to specialcase underscores in + dld_preloaded_symbols - it is fixed by symxfrm above! + * libltdl/configure.in: use AM_SYS_SYMBOL_UNDERSCORE from + libtool.m4 rather than reinvent the wheel here =)O| + + * ltmain.in: Fix deplibs methods to not rely on a.out (cygwin + uses a.exe!). + + * libltdl/configure.in: Cleanups - fix header comment and emacs + local-vars. + + * demo/dlmain.c (win32_force_data_import_address): a nasty hack + to force the address of imported data symbols into + dld_preloaded_symbols on win32, which does data imports + differently to function imports (sheesh!). This functionality + needs to be moved into the dld_preloaded_symbols generation code. + demo/helldl with static linking is broken on win32 by this change, + probably until after libtool-1.3 =(O| + * demo/foo.h: make sure __CYGWIN32__ is always defined on cygwin32 + systems. Use the correct __declspec macro for lib exports/imports + on cygwin32. + * demo/foo.c, demo/hello.c: Make sure we tell foo.h that these + sources are inside libfoo, and want to export symbols. + + 1998-12-20 Thomas Tanner + + * autogen: configure demo, depdemo, libltdl and mdemo + * tests/mdemo-exec.test: renamed hell* to mdemo* + * tests/mdemo-inst.test: ditto + + 1998-12-19 Thomas Tanner + + * libltdl/Makefile.am: build a normal libtool library + * libltdl/ltdl.c: get LTDL_LIBRARY_PATH but don't make use of it yet, + some reformatting + * ltmain.in: fixed a bug which listed symbols in + dld_preloaded_symbols twice + * TODO: removed symbol export lists and deplibs + + 1998-12-18 Thomas Tanner + + * ltconfig.in: added need_lib_prefix and need_version, + which determine whether we must prefix modules with 'lib' + and whether versioning is required for libraries. + * ltmain.in: allow modules names without 'lib' prefix, + new -avoid-versioning option + * doc/libtool.texi (link flags): updated documentation for -module, + added -avoid-versioning + * doc/libtool.texi (libtool script contents): + documented the two new flags and archive_sym_cmds + * doc/libtool.texi (tests): + added (partially very short) documentation for assign.test, + nomode.test, quote.test, sh.test + * libltdl/ltdl.c: canonicalize module names, + some cleanups and bugfixes, __ptr_t is predefined on + some systems - use lt_ptr_t instead + * mdemo/: renamed hell* to mdemo* (hell is already used in + demo), updated the documentation, import sin and cos in main + program rather than linking libfoo1 statically + + 1998-12-17 Gary V. Vaughan + + * libtool.m4 (AM_PROG_LIBTOOL): Added AC_PREREQ(2.12) to prevent + people using libtool with old autoconfs that don't provide the + features we need. + + 1998-12-16 Alexandre Oliva + + * NEWS, configure.in, libtool.spec: Bumped to 1.2e for CVS + + * NEWS, configure.in, libtool.spec: Bumped to 1.2d for release + + * Makefile.am (cvs-dist): our release tags are in lower case + (cvs-diff): ditto + (EXTRA_DIST): added README-alpha + * README-alpha: minor adaptations + * demo/Makefile.am, mdemo/Makefile.am, depdemo/Makefile.am: + removed comment about special needs for distribution + * depdemo/Makefile.am: don't generate dependencies + * depdemo/configure.in: modified version number + + * ltmain.in (-force-static, force_static): removed + * libltdl/Makefile.am (CFLAGS): ditto + * libltdl/configure.in: check for memory.h, rindex() and + dlpreopening. Fixed NEED_USCORE caching policy. + * libltdl/ltdl.h (lt_dlsym): make the name argument const + * libltdl/ltdl.c (types): new variable: head of list of available + dlopening mechanisms + (lt_dltype_t): interface of a dlopening mechanism, with pointers + to functions for init, exit, open, close and sym + (lt_dlhandle_t): added pointer to interface type + (strdup): don't name it strdup; it can be troublesome + (strrchr): ditto; use rindex if available + (LIBTOOL_STATIC): check HAVE_DLPREOPEN instead, and move to the + end of the file, so that it becomes the header of the list + (all): renamed all interface-implementation functions, to avoid + name clashes, and created lt_dltype_t nodes for all of them + (lt_dlinit): initialize all available interfaces; remove those + that fail from the list. Return failure only if no interfaces + could be initialized. + (lt_dlexit): return number of failures + (tryall_dlopen): try to open the library with all available + interfaces + (lt_dlopen): use tryall_dlopen; increased size of fixed buffers. + We should probably make these bound-checked or dynamically + allocated for the final release! Fix bug when filename did not + contain slashes; should we check for `\\' too? Try old_library if + everything else fails. + (lt_dlclose): use the interface type for closing + (lt_dlsym): make `symbol' const, use interface type for looking up + * mdemo/Makefile.am: moved mdemo/modules/* back into mdemo + (SUBDIRS): removed + (libfoo2_la_LDFLAGS): added -static; nice test. However, since it + causes -lm to linked into hell*, it causes tests that should fail + to pass + (noinst_HEADERS): no need to install foo.h + * mdemo/configure.in: remove modules/Makefile + tests/mdemo-exec.test: updated accordingly + + * NEWS: Added Thomas Tanner and Gary V. Vaughan to the list of new + maintainers. Detailed expected failures of libtldl+mdemo. Listed + recent ports. Added full URL for the home page. Note that + libtool C program is unusable. + + 1998-12-16 Bruno Haible + + * doc/libtool.texi (Tested platforms): broken `sed' programs + + 1998-12-16 Alexandre Oliva + + * THANKS: added Stephan Kulow; removed Gary V. Vaughan and Thomas + Tanner, now that they're AUTHORS + + 1998-12-16 Stephan Kulow + + * ltmain.in (freebsd-aout, freebsd-elf): added missing dot to + versuffix + + 1998-12-16 Alexandre Oliva + + * libltdl/Makefile.am (EXTRA_DIST): removed, nothing needed + (libtool): automatically update + + * libltdl/configure.in (stdlib.h, unistd.h, stdio.h): check + * libltdl/ltdl.c: include them + + * demo/configure.in (BINARY_HELLDL): test whether dlopen is + supported at configure time + * demo/Makefile.am (helldl): use automake conditionals to build + helldl as a script or as a binary program + + * tests/Makefile.am (EXTRA_DIST): remove ltdl-*.test + (clean-local): don't clean libltdl any more + * tests/ltdl-conf.test: removed + * tests/ltdl-inst.test: ditto + * tests/ltdl-make.test: ditto + * tests/ltdl-unst.test: ditto + * tests/mdemo-make.test: updated accordingly + * tests/mdemo-inst.test: ditto + * tests/mdemo-unst.test: ditto + * doc/libtool.texi: ditto + + * ltmain.in (-DSTATIC): changed to -DLIBTOOL_STATIC, and defined + only for -force-static; it should be removed soon, before people + start to use it + + * configure.in (AC_CONFIG_SUBDIRS): added libltdl + * Makefile.am (SUBDIRS): build libltdl by default + (DIST_SUBDIRS): simplify distribution of demo and mdemo + (libtool, clibtool, libtoolize, ltconfig, ltmain.sh): add + srcdir where appropriate + (ACINCLUDE_M4_LIST): new rule for maintaining links from + acinclude.m4 to libtool.m4 + (*demo/Makefile.in): don't update autoconf/automake files any + more; make check is needed + + 1998-12-14 Gary V. Vaughan + + * ltconfig.in (archive_cmds): tweaked for cygwin b18->b20.1 + compatibility and fixed a bug with generating the export + definitions file. This is only tested on b20.1, but should + work back to b18 at least. + + 1998-12-11 Thomas Tanner + + * ltmain.in: -module implies now -export-dynamic, + dlpreopen files if we're linking statically + * doc/libtool.texi (link flags): added documentation for -module + and the tests for mdemo and libltdl + * mdemo/Makefile.am: replaced -dlpreopen with -dlopen + + 1998-12-09 Alexandre Oliva + + * PORTING: removed the text Akim Demaille converted to .texi + + 1998-12-09 Akim Demaille + + * doc/libtool.texi: converted inter-library dependencies + instructions from PORTING + + 1998-12-09 Alexandre Oliva + + * ltmain.in (convenience, deplibs): propagate dependencies + * libltdl/Makefile.am (noinst_HEADERS): don't install ltdl.h yet + (noinst_LTLIBRARIES): ditto for libltdl.la + + 1998-12-08 Gary V. Vaughan + + * README-alpha: adapted the release procedure from + automake/HACKING. + * Makefile.am: adapted the cvs-dist and cvs-diff rules from + automake/Makefile.am. I guess this is probably safe to use + already, but I didn't test it as it tags the CVS tree. If + it needs tweaking, we'll find out come 1.2d. + + 1998-12-08 Thomas Tanner + + * ltconfig.in: fixed some typos in archive_sym_cmds + * ltmain.in: replaced basename with a sed expression + + 1998-12-07 Alexandre Oliva + + * configure.in: we no longer use PRCS + + * doc/libtool.texi (author): listed all the AUTHORS + (Dlopen issues): added reference to libltdl, still undocumented + (C++ libraries): it's not *that* simple, after all :-( + (Inter-library dependencies): they're back! + + 1998-12-04 Alexandre Oliva + + * libtool.m4 (ac_cv_sys_symbol_underscore): `test a == b' doesn't + work, use `test a = b' instead + + * Makefile.am (mdemo_distfiles): libfoo[12].sym no longer exist + + * ltconfig.in (solaris): do not use $CC for linking if GNU ld is + not available + + 1998-12-04 Manfred Weichel + + * ltconfig.in: Port to SCO UnixWare 7.x. + + 1998-12-03 Thomas Tanner + + * ChangeLog: converted CR/LF back to CR format + * ltconfig.in: new variable sys_lib_search_path for searching + of installed libraries, export archive_sym_cmds and + sys_lib_search_path + * ltmain.in: use sys_lib_search_path, removed extradeplibs + (they're not portable) + + 1998-12-02 Gary V. Vaughan + + * libltdl/configure.in: look for string.h or else strings.h, and + also check for ANSI strrchr() function. Fix `undescore before + symbols' macro to not rely on a.out (cygwin uses a.exe!). Fix + `underscore for dlsym' to set cache variable properly, not just in + environment of AC_DEFINE(NEED_USCORE). + * libltdl/ltdl.h (__ptr_t): for K&R compatibility using char*. + * libltdl/ltdl.c (strrchr): fallback function incase none is + defined in libc. + (trim, ltdlopen): replace rindex with ANSI strrchr. + Add static function declarations so that we get type checking with + ANSI compilers. Use __ptr_t instead of void*. + + 1998-12-01 Thomas Tanner + + * ltconfig.in: added -export-symbols support for GNU ld and + Solaris (untested), archive_sym_cmds for -export-symbols + * doc/libtool.texi, ltmain.in: -export-symbols is now + independent from -export-dynamic and does not work for modules + anymore + * ltmain.in: added some checks for -export-symbols + * mdemo/modules/Makefile.am: replaced -export-symbols with + -export-dynamic since it doesn't work for modules + + 1998-12-01 Gary V. Vaughan + + * README: Updated homepage pointer to gnu libtool page. + + * ltconfig.in (ltdll.c): update the ltdll.c file for cygwinb20. + Based on code from Mumit Khan . + (archive_cmds): correct typo libtool.c->ltdll.c. Update shell + commands for cygwin32. + + * libtool.m4 (AM_SYS_SYMBOL_UNDERSCORE): New macro; find out + whether compiled symbols have an extra leading underscore. + (AM_SYS_NM_PARSE): New macro (converted to m4 from ltconfig.in); + find a sed expression to parse global symbols from the output of + $NM. + (AM_PROG_LIBTOOL): require AM_SYS_NM_PARSE and + AM_SYS_SYMBOL_UNDERSCORE. + * demo/dlmain.c (main): Remove a single leading underscore from + compiled symbol names if necessary. + + 1998-12-01 Alexandre Oliva + + * config.guess, config.sub: imported from autoconf pre-2.13 + + 1998-11-27 Gary V. Vaughan + + * libtool (AM_PROG_LD): Oops... we need to know the host_os for + the changes below. I'm not sure whether mingw32 and os2 support + UNC paths, if they did we wouldn't need the check, we could use + UNC paths on all three; or if the bug with $LD not being + shell-meta escaped was fixed, we could use '\\' separators on all + three. AC_REQUIRE'ed AC_CANONICAL_HOST. + + * libtool.m4 (AM_PROG_LD): Cannonicalize the absolute path for the + ld program; The order is funny to provide canonicalization to + paths with '\\' separators as well as '/'. + * ltconfig.in: ditto. + + * AUTHORS: Added myself as a co-maintainer. + + * ltconfig.in (archive_cmds): The `;\' in a compound statement is + expanded wrongly for cygwin32, mingw32, aix3 and aix4. Changed to + `;'. + + 1998-11-25 Alexandre Oliva + + * libtool.spec (URL): point to www.gnu.org + (Source): point to ftp.gnu.org + + * Makefile.am (EXTRA_DIST): removed libtool.prj + Reported by Akim Demaille + + 1998-11-24 Alexandre Oliva + + * ltconfig.in (echo): avoid shell error messages when we're + testing for large command line support + Reported by Axel Thimm + + * doc/PLATFORMS: updated last-tested release for platforms I've + got access to + + * THANKS: added Chris P. Ross + + 1998-11-24 Chris P. Ross + + * ltconfig.in: added recognition of the dynamic linker on BSD/OS 4.x + * README: added BSD/OS 4.x to the list of supported platforms + * doc/PLATFORMS: added BSD/OS 4.x support for various host id's + + 1998-11-24 David Heine + + * ltmain.in (pass_all): actively pass the flags + + 1998-11-24 Thomas Tanner + + * depdemo: added inter-library dependencies demo (doesn't work yet!) + * AUTHORS: added myself to the list of maintainers + + 1998-11-22 Thomas Tanner + + * libltdl: added support for .la files, LGPL license, + K&R compatibility, some API changes and bugfixes + * ltmain.in: renamed -module flag (for compiling) to -force-static, + define -DSTATIC when compiling static .o files, + do not include directories in dld_preloaded_symbols + * mdemo: modified mdemo to work with the new libltdl + * tests/mdemo-exec.test, tests/mdemo-inst.test: use .la files + + 1998-11-21 Alexandre Oliva + + * libltdl/ltdl.c: replace NULL with 0, so that we don't depend on + header files defining it. + + * ltconfig.in (archive_cmds, osf3, osf4, solaris, sunos4): create + libraries with gcc -shared if using gcc without GNU ld. + + * ltconfig.in: replaced occurrences of solaris2 with solaris, to + prepare for Solaris 7 + + 1998-11-19 Alexandre Oliva + + * mdemo/Makefile.am (hell_debug_LDFLAGS): -dlpreopen -> -dlopen + (hell_LDFLAGS): added -export-dynamic and -dlopen + (SUBDIRS, INCLUDES): added modules directory + (foo1.c, foo2.c, foo.h, libfoo1.sym, libfoo2.sym): moved to modules + * Makefile.am: ditto + * tests/mdemo-exec.test, tests/mdemo-inst.test: libraries moved + * mdemo/modules/Makefile.am: new file + + * */Makefile.am (AUTOMAKE_OPTIONS): added no-dependencies + + * ltmain.in: missing `test' between `&&' and `"$module"' + + * ltconfig.in (echo_test_string): the whole ltconfig script was + too much for DU4.0's ksh, but the first 50 lines will be enough. + + * ltmain.in (installed): new variable defined within a .la file, + so that libtool can now link already-installed libraries into a + program. + * NEWS: ditto + * doc/libtool.texi (Linking executables): document it + + * ltmain.in (output_objdir): compute it from $output, not $arg + + * tests/mdemo-inst.test (libltdl): install it + * tests/mdemo-unst.test (libltdl): uninstall it + * tests/Makefile.am (TESTS): list ltdl-unst.test before mdemo-conf.test + + 1998-11-18 Alexandre Oliva + + * NEWS: -module and libtldl + * mdemo/Makefile.am: ../libltdl is within $(srcdir) + + 1998-11-18 Thomas Tanner + + * libltdl, Makefile.am: added libltdl (a system independent + dlopen wrapper library extracted from mdemo) + * ltmain.in: added -module flag for compiling and linking of + modules. If enabled it compiles always both .o (with -DLT_RENAME) + and .lo files + * mdemo: modified mdemo to work with libltdl + * tests/ltdl*: added tests for libltdl + + 1998-11-16 Steve Price + + * ltconfig.in: when $host_os is freebsd[23]* determine whether + the current linker format is a.out or ELF + * ltmain.in: add two new $version_type's, freebsd-aout and + freebsd-elf, to support above change + + 1998-11-16 Stephan Kulow + + * ltconfig.in: extent no_builtin_flag to contain -fno-rtti and + -fno-exceptions in case we compile with a gcc, that supports + this options (egcs and gcc >= 2.8) + + 1998-11-16 Alexandre Oliva + + * ltmain.in (C_compiler): copy $CC before it is overwritten with + command-line compiler, so that we can use it to compile C sources + generated during the build. This fixes the problem that showed up + with -export-dynamic of C++ programs in egcs 1.1. + * NEWS: ditto + + 1998-11-12 Alexandre Oliva + + * PORTING: Porting instructions are in the libtool manual already + + * NEWS: Mention -export-symbols and new dlpreopen + + 1998-11-11 Alexandre Oliva + + * ltmain.in (IFS): revert Gary's patch when parsing version + information; we still use `:' here :-) + + * NEWS: updated + * PORTING: new file, with general instructions and inter-library + dependencies tips + + 1998-11-11 Gary V. Vaughan + + * ltconfig.in: make use of '~' field separator in reload_cmds, + old_archive_from_new_cmds, old_archive_cmds, archive_cmds, + old_postinstall_cmds, postinstall_cmds, old_postuninstall_cmds, + postuninstall_cmds and finish_cmds, so that the semi-colons inside + if/then/else/fi and for/do/done etc. do not break the eval loop in + ltmain.in (below). + * ltmain.in: changed all of the eval loops to use an IFS of `~', + to allow differentiation between the end-of-statement-; + (now `~' is used) and end-of-substatement-; (still `;'). This + fixes AIX and win32 at least. + + 1998-11-11 Alexandre Oliva + + * ltconfig.in (sunos*, sympat, symxfrm): remove underscore + prepended by the compiler + + 1998-11-10 Toshio Kuratomi + + * ltconfig.in: re-enable deplibs + * ltmain.in: support deplibs, at least for GNU/Linux/x86 + Updated to current libtool by Thomas Tanner + + 1998-11-10 Gordon Matzigkeit + + * ltmain.in (link): Make the relink warning less harsh. + + 1998-11-07 William M. Perry + + * ltconfig.in (aix3, aix4): uniquify symbol names in archive_cmds + + 1998-11-07 Alexandre Oliva + + * ltconfig.in: add --falback-echo, to be used if everything else + fails. The tests now check the behavior of $echo for very large + strings, because some echo commands would just core dump (e.g., + Solaris' printf). If too large strings fail, smaller ones are + tested. + (ltecho): arrange that, if the --fallback-echo method is selected, + echo will be defined in the libtool script so as to re-run itself, + not ltconfig + * ltmain.in: add --fallback-echo + (qecho) ensure that, if --falback-echo is being used, qecho is + defined with the full pathname of the libtool script + + * tests/sh.test (test X): ensure that the double-quote supposed to be + reported is really reported + + 1998-11-07 Thomas Tanner + + * mdemo/main.c: removed hardcoded library names; link against -lm + * tests/mdemo-exec, tests/mdemo-inst: pass the library names + to the program + + 1998-11-07 Marc J. Fraioli + + * README: Added DG/UX + * doc/PLATFORMS: ditto + + 1998-11-04 Michael Tiemann + + * ltconfig.in (irix6): it's a little bit different from irix5 + + 1998-11-04 Alexandre Oliva + + * THANKS: Added Thomas Tanner and Gary V. Vaughan + + * ltconfig.in, ltmain.in: updated and fixed the patches below + + 1998-11-04 Thomas Tanner + + * mdemo/*: added new demo to demonstrate building of dlopenend + modules + * tests/Makefile.am, tests/mdemo*: added some tests for mdemo + + 1998-11-04 Gary V. Vaughan + + * demo/configure.in: added AC_EXEEXT macro so that the tests can + work on cywin32/mingw32 hosts. This requires the current CVS + autoconf + + 1998-11-04 Thomas Tanner + + * ltmain.in: New flag -export-symbols; new dlpreopen system + * demo/dlmain.c: removed dld_preloaded_symbol_count + + 1998-11-04 Ian Lance Taylor + + * ltmain.in: On installation, don't get confused if the same name + appears more than once in the list of library names. + + 1998-11-04 Ian Lance Taylor + + * ltconfig.in: Add objext and libext variables. Check for object + suffix. Check for mingw32* as well as cygwin32*. Use objext when + testing compiler. Add support for Visual C++ on cygwin32 when not + using gcc. Add objext, libext, and fix_srcfile_path to generated + libtool script. + * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path + if it is set. Check for .obj as well as for .o, and for .lib as + well as for .a. Use .${libext} rather than .a when creating old + libraries. + * libtoolize.in: Change initial /bin/sh to @SHELL@. + * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for + AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the + AC_REQUIRE in AC_CHECK_TOOL. + + 1998-11-04 Ian Lance Taylor + + * ltconfig.in: Look in the right directory for libtool.c in + archive_cmds for cygwin32. + + 1998-11-04 Ian Lance Taylor + + * ltconfig.in: Fix cygwin32 support to avoid using a double + extension, to delete the def file, to set version_type to windows, + and to include versuffix in the DLL name. + * ltmain.in: Add support for a version_type of windows. + + 1998-11-04 Ian Lance Taylor + + * ltconfig.in: Add cygwin32 support. + * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a + cygwin32 host. Pass DLLTOOL and AS to ltconfig. + (AM_SYS_LIBTOOL_CYGWIN32): New macro. + + 1998-11-04 Alexandre Oliva + + * libtool.m4 (sco): fix typo + + 1998-11-04 Ian Lance Taylor + + * ltconfig.in: On AIX, don't treat GNU ld specially. + + 1998-11-04 Alexandre Oliva + + * ltconfig.in (hardcode_minus_L): Revert Ian's patch for + ltconfig.in. Although -L hardcoding is not used with GNU ld, it + does happen, so hardcode_minus_L must be set to yes. + + * ltconfig.in (compiler_o_lo): check whether we can write directly + to a .lo + + * ltmain.in (compiler_o_lo): if not, write to .o and rename it + + 1998-11-04 Ian Lance Taylor + + * ltconfig.in: For sunos4 using GNU ld, set hardcode_minus_L to + no. + * ltmain.in: Add some hacks to make SunOS --enable-shared work + when using GNU ld. + + 1998-11-04 Alexandre Oliva + + * THANKS: Added Marc J. Fraioli + + 1998-11-04 Marc J. Fraioli + + * ltconfig.in (dgux): new supported platforms + + 1998-11-04 Alexandre Oliva + + * ltconfig.in (need_locks): if neither `-c -o' nor hard links are + available, fallback to not so safe mechanism, by setting + need_locks to warn + * ltmain.in (need_locks): when need_locks is set to warn, use the + lockfile to try to fail in case of incorrect concurrent builds + + * THANKS: Added Eric Estievenart + + 1998-11-04 Eric Estievenart + + * doc/libtool.texi (Compile mode): Document that -o is fully + supported. + + * libtool.m4 (libtool-lock): new ARG_ENABLE; sets (need_locks) + * ltconfig.in (disable-lock): control need_locks + (hard_links): check whether hard-links can be used for locking + * ltmain.in (need_locks): use $output_obj.lock for locking + + 1998-11-03 Alexandre Oliva + + * ltmain.in: correctly create libraries and programs with + directory components in their names + + 1998-11-03 Eric Estievenart + + * ltmain.in (output_obj): typo + + 1998-11-02 Ian Lance Taylor + + * ltconfig.in: For sunos4, add ${libname}.so$versuffix to + library_names_spec. + * ltmain.in: For version_type of sunos, set versuffix even if + -version-info was not used. + + 1998-11-02 Alexandre Oliva + + * ltmain.in (libobj): default value must not contain directory + components + + 1998-11-02 Eric Estievenart + + * ltconfig.in (compiler): detect if the compiler supports + -c and -o flags, create a variable compiler_c_o. Also issue + a big warning if it is not supported + + * ltmain.in (compile): enable the -o option as input for libtool. + The objects are not moved if the compiler supports -o with -c. + Sources and objects can contain relative directories. + (link): enable the linking of executables into relative directories + + 1998-11-02 Alexandre Oliva + + * AUTHORS: added myself as a co-maintainer + * THANKS: and removed my name from here + + * autogen: new script; run it to bootstrap libtool after checking + it out from CVS + + * libtool.m4 (CFLAGS): check whether -belf is needed on SCO, as + suggested by Robert Lipe + + 1998-10-31 Gordon Matzigkeit + + * demo/Makefile.am (hc-libpath): Use parameters from the libtool + in the top build directory, since the one in the demo directory is + not guaranteed to exist. + + 1998-10-27 Alexandre Oliva + + * demo/Makefile.am (objdir): there are no longer quotes around + objdir in the libtool script + + 1998-10-27 Gordon Matzigkeit + + * ltconfig.in (dynamic_linker): Echo the result to fd 6, so that + --silent works correctly. From William M. Perry. + + 1998-09-24 Gordon Matzigkeit + + * ltmain.in (link): Fix problems when building only static + libraries. From Owen Taylor. + + 1998-08-20 Gordon Matzigkeit + + * ltmain.in (install): When library_names_spec has redundancies, + avoid deleting the main library when installing symlinks. From + Jeff Dairiki. + (link): Get rid of backticks in a here doc comment. + This causes segfaults on Solaris 2. From Aleksandar Bakic. + (finish): Don't display messages + + * ltconfig.in (archive_cmds): On HP-UX 9, make sure we don't try + to move a file to itself. From Jeff Dairiki. + + 1998-08-19 Gordon Matzigkeit + + * ltconfig.in: Make changes to accomodate ltmain.c. + + * Makefile.am (clibtool): New target for the C version of libtool. + + * ltmain.c: Experimental C version of libtool. + + 1998-07-10 Ian Lance Taylor + + * ltmain.in (install): Test against both $SHELL and /bin/sh. + + 1998-06-30 Gordon Matzigkeit + + * ltmain.in: Convenience archive support. From Ulrich Drepper. + + * ltconfig.in (postinstall_commands): Change libraries to be + executable on Solaris in order to prevent ldd from moaning. From + Julian Gosnell. + (whole_archive_flag_spec): New variable to shortcut convenience + archive expansion. From Ulrich Drepper. + + 1998-06-11 Gordon Matzigkeit + + * ltconfig.in, ltmain.in: Change globs to accept forward slashes + in absolute directory names used on DOS-like systems. From Robert + S. Maier. + + Thu May 28 18:59:08 1998 Ian Lance Taylor + + * ltconfig.in: Use $SHELL when invoking shell scripts. + + 1998-05-21 Gordon Matzigkeit + + * ltmain.in (compile): Don't have `-static' turn off libtool + libraries, so that people can use it just to guarantee that `.o' + files exist. Suggested by David Mosberger-Tang. + + 1998-05-18 Gordon Matzigkeit + + * ltmain.in (link): Possibly reexec the shell from within the + wrapper script. + Allow `-version-info' and `-release' to coexist again. If people + want to shoot themselves in the foot, I'd better let them do so, + so that people who are smart enough not to can squeeze out another + ounce of functionality. From Tim Janik. + (version_vars): Delete dead variable. + + * ltconfig.in (hardcode_minus_L): FreeBSD 3.0 doesn't hardcode, at + last. Reported by Jason Nordwick. + + * libtoolize.in, ltconfig.in, ltmain.in: Change a bunch of `if + test ...; then : ; else ...' constructs to `if test ! ...; then + ...', for clarity. + + 1998-05-17 Gordon Matzigkeit + + * ltmain.in (LC_ALL, LANG): Save these values and restore them + during execute mode. From Pavel Kankovsky. + (mode): Accept strace and truss as programs that throw us into + execute mode. From Pavel Kankovsky. + + 1998-05-07 Ian Lance Taylor + + * ltconfig.in: Don't use .$versuffix or .$major. Instead, assume + the variable will include any required prefix. + * ltmain.in: If no -version-info option was used, produce empty + version strings rather than 0.0.0. When making library symlinks, + avoid making a symlink if the name would be the same. + + 1998-04-27 Gordon Matzigkeit + + * ltmain.in (link): Support `unsupported' as a hardcode_action. + Reported by Lars Hecking. + (lib_linked): Do some sanity checking to make sure that we + actually do link libtool libraries into the program to prevent the + above problem from happening again. + + 1998-04-20 Gordon Matzigkeit + + * ltmain.in: Maybe reexec under $SHELL, if $echo doesn't work. + Reported by Lars Hecking. + + 1998-04-19 Gordon Matzigkeit + + * Makefile.am (maintainer-rekey): New rule to force us to change + Project-Version after we make a release. This keeps all version + numbers in sync, rather than branching just before the release. + (maintainer-release, maintainer-checkin): Use maintainer-rekey. + + * ltmain.in (finish): Notice when a finish command fails, so that + we can add it to the list of recommendations. + + 1998-04-17 Gordon Matzigkeit + + * libtool.m4 (AM_PROG_LIBTOOL): Append file descriptor 5 to + config.log, so that configure doesn't clobber the messages that + ltconfig put there. From David Taylor. + + 1998-04-15 Gordon Matzigkeit + + * ltconfig.in (archive_cmds): Try using `$CC -shared' when + configuring for GCC under irix5 and irix6. From Wolfram Gloger. + (ofile): Add `--output' flag to change the name of the generated + libtool. Suggested by Wolfram Gloger. + + 1998-04-14 Gordon Matzigkeit + + * ltmain.in: Remove all hardcoded references to ltmain.in in + favour of $PACKAGE and $PROGRAM. + (install): Compute the installation name for programs, in case we + install a relinked file which has a different name. Reported by + Pieter Schoenmakers. + + * ltconfig.in (echo): Try using the ksh(1) `print -r' builtin + command, before reverting to printf(1). + + * Makefile.am (libtool): Use $(SHELL) when invoking ltconfig. + + * ltconfig.in (echo): Rewrite the test for a working echo so that + we win on Solaris by avoiding printf(1), if possible. + + * tests/quote.test (echo): Update the echo test from ../ltconfig.in. + + 1998-04-13 Ian Lance Taylor + + * libtool.m4 (AM_PROG_NM): Don't override NM in the environment. + + 1998-04-13 Gordon Matzigkeit + + * ltmain.in: New `--config' flag to print out all configured + variables. + + * libtool.m4: Pass ltconfig the undocumented --no-reexec flag, + since we call it explicitly using CONFIG_SHELL. + + * ltconfig.in: Restart the script under a different shell if + CONFIG_SHELL is not /bin/sh. This way, people can use Bash if + they don't have a working echo program. + + * ltmain.in, ltconfig.in: Use $SHELL instead of /bin/sh when + generating executable scripts. + + * libtoolize.in, ltconfig.in, ltmain.in: Implement the `--debug' + flag to begin shell tracing. + + * ltconfig.in (archive_cmds): Don't use `gcc -shared', even if we + have GNU ld. Reported by Robert S. Maier. + + 1998-04-06 Gordon Matzigkeit + + * ltconfig.in (pic_flag): Create more than just a null C file, so + that the SunPRO 4.2 cc doesn't complain. From Bob Friesenhahn. + (gnu_ld_acts_native): Delete this variable. There is just too + much version skew to try to pretend GNU ld is the same as the + system ld. Reported by Ian Lance Taylor. + (hardcode_action): Don't bother relinking or aborting on systems + that are too dynamic to have a consistent hardcode method. + Reported by Doug Winterburn. + + 1998-03-24 Gordon Matzigkeit + + * doc/libtool.texi: A little proofreading. From Albert + Chin-A-Young. + + 1998-03-23 Gordon Matzigkeit + + * ltconfig.in: Treat HP-UX 11 just like HP-UX 10. From Jeff Law. + + 1998-03-21 Gordon Matzigkeit + + * ltconfig.in (reload_flag): Correct a tiny bug where `--silent' + would still print out the reload flag. From Stephan Kulow. + + 1998-03-20 Ian Lance Taylor + + * libtool.m4: Use changequote to avoid problems with square + bracket patterns. + + 1998-03-20 Gordon Matzigkeit + + * Release 1.2. + + 1998-03-18 Gordon Matzigkeit + + * ltmain.in: Rearrange some of the echos to make them more + consistent. + + 1998-03-14 Gordon Matzigkeit + + * ltmain.in: Break up an echo command that causes Solaris printf + to dump core. Apparently the Solaris people hardcoded a 2110-byte + buffer into their printf(1). Feh. From John Judge. + + 1998-03-11 Gordon Matzigkeit + + * ltconfig.in: Change the test for the PIC compiler flag so that + we assume it doesn't work if there are any warning messages. This + fixes a bug using old GCC's on HP-UX. Reported by Akim Demaille. + + 1998-03-10 Andreas Schwab + + * Makefile.am ($(srcdir)/ltconfig): Remove bogus command to create + a file ltconfig in the build directory. + + 1998-03-09 Andreas Schwab + + * ltmain.in: Avoid unnecessary use of command substitution, + replacing foo=`eval \\$echo \"$mumble\"` by eval foo=\"$mumble\". + + (link): Use ${1+"$@"} in wrapper scripts in order to pass + arguments safely to a program. + + * ltconfig.in: Use -fpic instead of -fPIC if $host_cpu matches + m68*. + + 1998-03-08 Gordon Matzigkeit + + * Release 1.1. + + * ltmain.in: I like `here documents' a lot, but apparently + they are so badly handled by old and buggy /bin/sh's, that + replacing `cat < + + * ltconfig.in: Copy the contents of ltmain.sh into the generated + libtool. This should more than halve the execution times on old + or buggy /bin/sh systems, such as HP-UX 9 and SunOS 4.1.4. From + Tom Lane. + + 1998-03-05 Gordon Matzigkeit + + * libtool.m4 (AM_ENABLE_SHARED, AM_ENABLE_STATIC): Add support for + the `default' package, so that people can control unnamed + packages. + (LD): Only add an ABI flag under IRIX 6.x, since IRIX 5.x doesn't + support them. From Alexandre Oliva. + + 1998-03-01 Gordon Matzigkeit + + * ltconfig.in: Port to UnixWare 2.x. From Christopher Olsen. + + 1998-02-25 Gordon Matzigkeit + + * ltmain.in (compile): For consistency, honour the `-static' flag + during compilation. + + 1998-02-23 Brendan Kehoe + + * libtool.m4 (AM_ENABLE_SHARED, AM_ENABLE_STATIC): For + --enable-shared, heed the value of $PACKAGE from AM_INIT_AUTOMAKE + if given as the argument for the library to be built shared. + + 1998-02-20 Gordon Matzigkeit + + * libtool.m4, ltconfig.in (NM): Fix up a typo confusion between + $ac_dir and $dir. Reported by Akim Demaille. + + * ltmain.in (link): Don't allow both `-version-info' and + `-release'. Reported by Danny Backx. + + 1998-02-18 Gordon Matzigkeit + + * Makefile.am (noinst_SCRIPTS): Remove lineno from distribution. + + * lineno: Remove from distribution, as it is no longer needed. + + * Makefile.am ($(srcdir)/ltconfig.in, $(srcdir)/ltmain.sh): + Rewrite these rules not to use config.status or lineno. This + makes things simpler, and reduces dependencies, so that the + scripts are rebuilt and installed in srcdir only when necessary. + Reported by Stephan Kulow. + + * tests/sh.test (scripts): Remove the lineno script, since it is no + longer distributed. + + * tests/assign.test, if.test, test-e.test: Even though 15 tests looks + impressive, these are now redundant. Remove them from the + distribution. + + * tests/sh.test: Do what assign.test, if.test, and test-e.test used to + do. + + 1998-02-16 Gordon Matzigkeit + + * libtool.m4, ltmain.in, ltconfig.in: Correctly identify absolute + directory names on MS-DOS. Suggested by Bob Friesenhahn. + + * ltconfig.in, ltmain.in, libtool.m4: Change a bunch of `sed N!d' + commands to `sed Nq', for efficiency. + + * ltmain.in: Only egrep the first few lines of files in order to + determine if they were libtool-generated. This prevents egrep(1) + from taking forever to look at a 10MB binary on Solaris. From + Stephan Kulow. + + * tests/defs: Correctly identify absolute directory names on MS-DOS. + Suggested by Bob Friesenhahn. + + 1998-02-11 Gordon Matzigkeit + + * ltconfig.in (no_undefined_flag): Add a flag to declare under + Solaris that the library should not have any undefined + references. Suggested by Bob Friesenhahn. + + * ltmain.in (mkdir): Fix one more mkdir race. From H.J. Lu. + + 1998-02-08 Gordon Matzigkeit + + * ltconfig.in, ltmain.in (striplib, old_striplib): Ditto. + + * ltconfig.in (profile_flag_pattern): Get rid of dead code. + + 1998-02-07 Gordon Matzigkeit + + * libtool.m4 (AM_ENABLE_SHARED, AM_ENABLE_STATIC): New macros to + modify the `--enable-shared' and `--enable-static' defaults in the + configure script. This works a lot better than the old + `enable_shared' and `enable_static' variables did. Reported by + Bob Friesenhahn. + + * tests/suffix.test (extensions): Added GNAT (GNU Ada Translator) + suffices, `.ada', `.ads', `.adb'. From Samuel Tardieu. + + 1998-02-07 Samuel Tardieu + + * ltmain.in: Recognize .ada, .ads and .adb as known suffixes (they + are used by GNAT, the GNU Ada compiler). + + 1998-02-06 Gordon Matzigkeit + + * ltconfig.in: Turn on IRIX shared libraries again! + + * libtool.m4 (LD): Use file(1) to discover which ABI we're using + on IRIX, and propagate the correct linker flag. From Jim Wilson. + + * ltconfig.in, ltmain.in (Xsed): `arg=-n; echo "$arg" | sed ...' + gives problems, because the `-n' is interpreted as an option to + echo(1). So, use `echo "X$arg" | sed -e 's/^X//' ...' everywhere, + via the $Xsed convenience variable. Suggested by H.J. Lu. + + 1998-02-02 Gordon Matzigkeit + + * ltconfig.in: Turn off IRIX shared library support until 32-bit + and 64-bit ABI differences can be resolved. + + 1998-01-28 Gordon Matzigkeit + + * libtool.m4 (LD): Reverse yesterday's change because `-old_ld' + isn't accepted by GCC. + + 1998-01-27 Gordon Matzigkeit + + * ltconfig.in (soname_spec): Add in user-specified release numbers + for every host system that supports an soname that differs from + the linkname. + + * libtool.m4 (LD): Add `-old_ld' to the list of flags that need to + be passed through on SGI. Reported by Chris Lee. + + * ltmain.in (release): Prepend a hyphen to the release number, and + fix a typo because `-version-info' takes only 3 args. From + H.J. Lu. + + 1998-01-25 Gordon Matzigkeit + + * ltconfig.in (library_names_spec): On Linux, use the + user-specified release. + + * ltmain.in (link): Allow the user to specify a release number for + the library using the `-release' flag. Suggested by H.J. Lu and + Ian Lance Taylor. + + 1998-01-23 Gordon Matzigkeit + + * tests/Makefile.am (TESTS_ENVIRONMENT): Export some important + environment variables. Reported by Ian Haggard. + + 1998-01-19 Gordon Matzigkeit + + * ltconfig.in (old_postuninstall_cmds): Reorder so that chmod + happens after ranlib. From Markus F.X.J. Oberhumer. + + * ltmain.in (mode): Added `gcc*' and `*-gcc*' to the patterns that + recognize compilers. From Pieter Schoenmakers. + (link): Recognize `.a' files again. Suggested by Pieter + Schoenmakers. + + 1998-01-18 Gordon Matzigkeit + + * ltmain.in (compile): Recognize `.asm' extension, for use with + the nasm assembler. From Markus F.X.J. Oberhumer. + + * tests/suffix.test (extensions): Recognize `.asm'. From Markus + F.X.J. Oberhumer. + + 1998-01-12 Gordon Matzigkeit + + * ltconfig.in (runpath_var): Use instead of + `hardcode_runpath_var'. + + 1998-01-11 Gordon Matzigkeit + + * ltmain.in (finish): Add a better --finish message. Suggested by + Kenneth Albanowski. + + * ltconfig.in, ltmain.in: Fix a few typos. + + 1998-01-03 Gordon Matzigkeit + + * ltmain.in (link): Quote the definition of $echo in the wrapper + script. + + * ltconfig.in (export_dynamic_flag_spec): Use `--export-dynamic' + instead of `-export-dynamic', which is not accepted by all GNU + ld's. From Eiichi Takamori. + + * ltmain.in (install): Don't print silly `library stripping' + warnings. Reported by François Pinard. + + 1997-12-19 Gordon Matzigkeit + + * ltmain.in: Don't forget to quote the CDPATH substitution. From + Tor Lillqvist. + + 1997-12-18 Gordon Matzigkeit + + * ltconfig.in, ltmain.in (CDPATH): Unset this environment variable + so that HP-UX shells, at least, don't print out the directory name + after a `cd' command. From Tor Lillqvist. + + 1997-12-10 Gordon Matzigkeit + + * demo/Makefile.am (hardcode): Change a bunch of references to + `$(LIBS)' to `-lm', since we no longer put -lm in LIBS. + + * demo/configure.in: Delete the test for libm, since it is + standard on every system. + + * demo/Makefile.am (libhello_la_LDFLAGS): Change to include -lm, + in accordance with new inter-library dependency code. + + * ltmain.in (dependency_libs): Added to help people link programs + without having to explicitly specify inter-library dependencies. + + * ltconfig.in (COLLECT_NAMES): Oops... I forgot to apply the AIX 3 + restriction to the generated libtool script. Reported by Stefan + Westerfeld. + + 1997-12-05 Gordon Matzigkeit + + * ltconfig.in (thisdir): Quote $echo in the generated libtool + script for HP-UX. From Markus F.X.J. Oberhumer. + + * ltmain.in (link): Recognize the `.s' suffix. From Markus + F.X.J. Oberhumer. + + * ltconfig.in (link_static_flag): Don't quote ${wl} on HP-UX + because link_static_flag is never evaled. From Eric Backus. + + * tests/suffix.test (extensions): Recognize `.s'. From Markus + F.X.J. Oberhumer. + + 1997-12-01 Gordon Matzigkeit + + * demo/Makefile.am (helldl_DEPENDENCIES): Add `libhello.la' to our + dependencies so that parallel builds work correctly. From Jim + Meyering. + + * Makefile.am ($(srcdir)/ltconfig, $(srcdir)/ltmain.sh): Rewrite + these rules so that they are parallelizable. Reported by Jim + Meyering. + + * ltconfig.in (ltecho): We need special handling to quote the + `echo' variable itself. From Alexandre Oliva. + + 1997-11-29 Gordon Matzigkeit + + * ltconfig.in (COLLECT_NAMES): Enable this workaround for a broken + collect2 only on AIX 3. This avoids problems on other AIX + versions. Reported by Stefan Westerfeld. + + * ltmain.in, ltconfig.in (finish_eval): Variable like finish_cmds, + except it is a single command which is evaled, and not shown. + + * ltconfig.in: Port to AmigaOS. From Joop van de Wege. + + * ltmain.in (echo): Delete preamble to check for a working echo, + since we just use the one included in the generated libtool. + + * ltconfig.in (echo): Include this definition in the generated + libtool script. + + 1997-11-28 Gordon Matzigkeit + + * ltconfig.in, libtool.m4 (NM): Add /usr/ccs/bin to the PATH + before checking. From Kaveh R. Ghazi. + (NM): Delete an extraneous egrep from ltconfig. + + * ltconfig.in (finish_cmds): Change back to using `ldconfig -n'. + This makes Linux behave like other systems, which is more in line + with what libtool needs. + + 1997-11-27 Gordon Matzigkeit + + * ltmain.in: Change a whole bunch of `progname' variables to + `modename'. This is for clarity, and to fix a tiny typo in finish + mode. + + * libtool.spec (Name, Version): Ditto. + + * configure.in (AM_INIT_AUTOMAKE): Use PRCS to automatically generate + the proper package name and version number. + + * ltconfig.in (gnu_ld_acts_native): Treat GNU ld like the native + linker on SunOS 4.x. Suggested by Alexandre Oliva. + (deplibs): Change the defaults all over, since most systems cannot + handle inter-library dependencies. + + * libtool.m4, ltconfig.in (NM): Only look at the first line of the + output from NM when determining whether it supports a command line + option. This prevents false positives on OSes which ignore + invalid flags, like HP-UX, which prints `nm: unknown option "B" + ignored'. Reported by Kaveh R. Ghazi. + + * ltconfig.in (finish_cmds): On Linux, update ld.so.cache by + removing the `-n' flag from ldconfig. Suggested by Kenneth + Albanowski. + + * Makefile.am (maintainer-checkin, maintainer-release): New + commands to reap the full benefit of using PRCS to maintain + libtool version numbers. + + * ltconfig.in, ltmain.in (global_symbol_pipe): Explicitly cast all + addresses to __ptr_t. This fixes a bug due to a strict IRIX + compiler. Suggested by Kaveh R. Ghazi. + + 1997-11-23 Gordon Matzigkeit + + * ltmain.in (echo): For aesthetics, avoid using `$echo' when + `echo' will do *exactly* the same thing. This prevents ugly + `printf %s\n timestamp > some.lo' commands from appearing in the + libtool output. + (link): Delete the `-allow-undefined' flag because it is now the + default. Make `-no-undefined' in order for people to declare that + a library is entirely self-contained. This prevents maintainers + from accidentally creating shared libraries that won't work on + AIX. Reported by Stefan Westerfeld and Danny Backx. + + * ltconfig.in (echo): Use an echo variable, just as in ltmain.in, + because we need it for quoting substitutions. For most of the + script, though, use the default echo, just like Autoconf does. + Without this patch, character \001 ends up in global_symbol_pipe. + Reported by Lars Hecking and Jürgen Fluk. + + * ltmain.in (echo): Set default to `echo=echo'. Ooops. That's + what you get for testing obscure code paths and forgetting to + revert to the original version. Reported by Danny Backx. + + 1997-11-14 Gordon Matzigkeit + + * ltconfig.in (hardcode_libdir_flag_spec): Set to `-R' for FreeBSD + 2.2. From Sean Kelly. + (postuninstall_cmds, old_postuninstall_cmds): Commands to run + after uninstall mode deletes the libraries. Suggested by Joop van + de Wege. + (export_dynamic_flag_spec): On HP-UX, add the `${wl}-E' + export_dynamic_flag_spec. Reported by Matthias Hoelzer. + + 1997-11-11 Gordon Matzigkeit + + * ltconfig.in, ltmain.in (sed_quote_subst): Oops. We forgot to + quote backticks. Reported by Joop van de Wege. + + * tests/quote.test: Add backticks to the backslashify test. + + 1997-11-09 Gordon Matzigkeit + + * ltconfig.in (symcode): On IRIX, don't extract undefined + symbols. When a function is inlined by G++, references to it are + still marked as undefined in the object file. This means that our + symbol file causes undefined references, because there are + actually no matching global symbols. Reported by Paul Kendall. + + 1997-11-08 Gordon Matzigkeit + + * ltconfig.in: Don't forget to redirect the COLLECT_NAMES libtool + script fragment to the generated libtool, rather than to stdout. + + 1997-11-07 Gordon Matzigkeit + + * libtool.m4 (LD): Add a more sophisticated test to determine the + ABI flag on IRIX 6. Suggested by Lars Hecking and Ian Lance + Taylor. + + * ltconfig.in, ltmain.in (COLLECT_NAMES): Only export this + variable if we are running under AIX. Otherwise, we tickle a g++ + bug under IRIX. From Paul Kendall. + + * Change bug reporting address to . + + * ltconfig.in (allow_undefined_flag): OSF/1 3.x also requires a + wildcard argument to `-expect_unresolved'. From Stephan Kulow. + + 1997-11-06 Gordon Matzigkeit + + * ltmain.in (link): Use libname_spec. + + * ltconfig.in (pic_flag): Somehow, the HP-UX pic_flag (`+Z') was + dropped between libtool-1.0 and now. Add it back in. Reported by + Akim Demaille. + Integrated more patches for OS/2. From Jeff Freedman. + (libname_spec): New variable for OSes that don't require their + libraries to look like `libNAME.a'. + + * ltmain.in (link): Only use global_symbol_pipe if it has been + defined. From Stephan Kulow. + + * ltconfig.in (global_symbol_pipe): Protect C fragment under C++ + compilers. From Stephan Kulow. + + * Makefile.am ($(srcdir)/acinclude.m4, + $(srcdir)/demo/acinclude.m4): Change rules to use LN_S so that + they can be run on any system. + + * ltconfig.in (archive_cmds): For NetBSD, don't include deplibs. + From Dieter Baron. + + * ltmain.in (mkdir): Check that the directory doesn't exist before + we exit with error, so that we don't get races during parallel + builds. From H.J. Lu. + (fbsd_hideous_sh_bug): Apparently, some FreeBSD /bin/sh's have a + bug that will empty base_compile unless we do this dummy + assignment. From Marc van Kempen. + + 1997-10-22 Gordon Matzigkeit + + * libtool.m4 (libtool_shared, libtool_static): Fixed logic error + to reenable override of libtool's defaults by setting + enable_shared or enable_static in configure.in. Reported by Tom + Tromey and Stephan Kulow. + + * ltmain.in (link): Add explicit support for compiler options that + begin with `+'. Reported by Aubert Pierre. + + 1997-10-20 Gordon Matzigkeit + + * ltmain.in: Silly me. Change a bunch of occurances of "* $dir *" + into *" $dir "*. + + * ltconfig.in (pic_flag): PIC is the default for AIX. From Mark + Kettenis. It is also the default for OSF/1. + + * demo/Makefile.am (objdir): Quote double-quotes. From Mark + Kettenis. + + * ltconfig.in (global_symbol_pipe): This variable is not + double-evaled, so it should not be double quoted. From Mark + Kettenis. + + 1997-10-19 Gordon Matzigkeit + + * ltconfig.in (LD): Same as below. + + * libtool.m4 (LD): Set LD if we discover an absolute path to GNU + ld. This prevents breakage when `$CC -print-prog-name=ld' returns + an absolute directory name. Reported by Ulrich Drepper. + + * ltconfig.in: Port to OS/2 using EMX. From Jeff Freedman. + + * ltmain.in (link): Use old_archive_from_new_cmds. + + * ltconfig.in (old_archive_from_new_cmds): New variable to + support DLL libraries. + + * ltmain.in (link): Only `eval' export_dynamic_flag_spec if it is + not empty. Reported by Stephan Kulow. + + 1997-10-18 Gordon Matzigkeit + + * ltconfig.in (objdir): Use the .libs directory on all systems for + which that name is valid, and _libs on the others (like MS-DOS). + Suggested by Juergen Erhard. + + 1997-10-14 Gordon Matzigkeit + + * ltmain.in (link): Added a bit more inter-language support to the + symbol file generation process. + Instead of complaining about unrecognized argument suffices, pass + them to the linker. This prevents libtool from barfing on + mandatory arguments to linker flags. Reported by Michael + Tiemann. + + 1997-10-09 Gordon Matzigkeit + + * ltmain.in (link): Change the wrapper script to follow symlinks + in order to find thisdir. This should put the final nail in the + coffin for problems with wrapper scripts. From Ian Lance Taylor. + + 1997-10-07 Gordon Matzigkeit + + * ltmain.in: Change a few `$echo' commands into `$show' to make + --silent mode behave as advertised. + + * ltconfig.in (allow_undefined_flag): On OSF/1 4.x, use + `-expect_unresolved \*'. From Christian Mondrup. + + * ltmain.in (install): Change install mode to allow a specified + /bin/sh argument at the beginning of the install_prog. Also, + specify the shell to run when invoking libtool recursively for + finish mode. From Chris Provenzano. + + * libtool.m4 (LIBTOOL): Change definition to include $(SHELL). + From Chris Provenzano. + + * ltconfig.in: Port to UTS 4.x. From Alistair Crooks. + + * demo/Makefile.am (hc-libflag): Add rules to make this binary for + hardcode.test. + + * tests/hardcode.test (hardcode_libdir_flag_spec): Check the hardcoding + properties of the flag_spec, too. + + 1997-09-24 Gordon Matzigkeit + + * ltconfig.in (LD): As with libtool.m4, don't override LD. + Do a whole bunch of ac_t quoting. + + 1997-09-24 Ian Lance Taylor + + * libtool.m4 (AM_PROG_LD): Don't override LD in the environment. + + 1997-09-21 Gordon Matzigkeit + + * libtool.m4, ltconfig.in (NM): Arguments to the for loop must be + whitespace separated. This fixes a bug under FreeBSD's /bin/sh. + From George Scott. + + * tests/defs, tests/Makefile.am (clean-local): Change =inst to + _inst to fix portability on MS-DOS. From Robert Hoehne. + + 1997-09-20 Gordon Matzigkeit + + * ltmain.in (deplibs): When building shared libraries, always add + -lc to deplibs. Reported by Andreas Jellinghaus. + + 1997-09-15 Gordon Matzigkeit + + * ltconfig.in, ltmain.in (COLLECT_NAMES): If the COLLECT_NAMES + environment variable has not been set, set it to empty. This + apparently fixes the AIX bug with GCC's collect2. Reported by + Mark Kettenis. + + * demo/Makefile.am, ltmain.in, tests/hardcode.test (objdir): + Changed objdir variable .libs to _libs. This is another MS-DOS + portability fix. Suggested by Robert Hoehne. + + * tests/hardcode.test (objdir): New variable to simplify change from + .libs to _libs (MS-DOS portability fix). + + 1997-09-13 Gordon Matzigkeit + + * ltconfig.in, ltmain.in (hardcode_minusL): Fix typo by renaming + hardcode_minusL to hardcode_minus_L. Also add FreeBSD + hardcode_libdir_flag_spec. From Paul Traina. + + * ltmain.in (link): Honour multiple `-rpath' flags when linking + programs. Suggested by Bengt Martensson. + Quote appearances of $echo in the wrapper script. From Alexandre + Oliva. + + * Makefile.am, configure.in, tests/tlibtool: Use ltmain.in instead + of ltmain.sh.in. + + * ltmain.in: Rename ltmain.sh.in to ltmain.in. This fixes a + portability problem (on MS-DOS, of all places!). From Robert + Hoehne. + + 1997-09-11 Gordon Matzigkeit + + * ltmain.sh.in (link): Do not transform libtool objects to regular + objects if we did not build old libs. Reported by Tomas Hiller. + + 1997-09-05 Gordon Matzigkeit + + * demo/Makefile.am (hell_debug_LDFLAGS): Change hell.static to + hell.debug in order to reflect the new static linking semantics. + + * ltmain.sh.in (link): Add new `-all-static' flag to prevent all + dynamic linking. The old `-static' flag just prevents dynamic + linking against libtool libraries. Suggested by Bengt + Martensson. + + * ltconfig.in (with_gnu_ld): Add a test to make sure that we are + actually using GNU ld. This fixes an inconsistency when running + ltconfig without using libtool.m4. Reported by Ulrich Drepper. + (global_symbol_pipe): Delete symbols that are not valid C + identifiers. Reported by Johan Danielsson and Bengt Martensson. + + * tests/demo-exec.test, tests/demo-inst.test: Change references from + hell.static to hell.debug. + + * tests/quote.test (echo): Add the same Digital Unix echo test fixes as + the ones to ltmain.sh.in from Todd Kover. + + * tests/if.test, tests/test-e.test (scripts): Add ../lineno to + the scripts we check. + * tests/if.test: Check for accidental use of test X$something rather + than test "X$something". + + 1997-09-04 Gordon Matzigkeit + + * ltmain.sh.in (echo): Quote all the uses of `echo' in all eval + statements. Reported by Bengt Martensson and Alexandre Oliva. + (echo): Need to surround test args with double quotes, or the echo + test fails on Digital Unix 4.0. From Todd Kover. + + 1997-08-28 Gordon Matzigkeit + + * ltmain.sh.in (echo): Change test to one that uses printf. + This works on AIX, which has the same problems that Solaris does, + but no working echo program. + + * tests/quote.test (echo): Change test to version that uses printf. + Be less strict about return results. + + 1997-08-27 Gordon Matzigkeit + + * ltmain.sh.in (link): Make sure that compile_command and + finalize_command are always evaled. Quote any unknown linker + flags we need to pass through. + (compile): Use quoting for flags we pass. + (echo): I hate Sun! The /usr/bin/echo on Solaris handles + backslash sequences, which makes it impossible to do backslash + quoting using echo and sed. So, we search for an echo that obeys + the `echo '\t'` = '\t' equality. Then we use `$echo' everywhere + in ltmain.sh. + Put tabs back into the ${IFS= } sequences. Emacs untabify is + libtool bane. + + * ltconfig.in: Quote all variable values that may contain + metacharacters creating the libtool script. This provides + complete protection, so that even single-quotes may appear inside + a libtool variable value. + + * ltmain.sh.in (link): Quote finalize_command before putting it in + the wrapper script. + + * tests/quote.test (echo): Add the test for a non-backslash-mangling + echo. + + 1997-08-26 Gordon Matzigkeit + + * ltmain.sh.in (sed_quote_subst): Change the quoting procedure + again. I think that the new one is robust for *all* characters, + including whitespace and metacharacters. + + * tests/quote.test: New torture test for libtool metacharacter quoting. + + 1997-08-25 Gordon Matzigkeit + + * ltmain.sh.in: Change quoting procedure because some shells + cannot handle `]' in scan sets. From Ian Dall. + + 1997-08-22 Gordon Matzigkeit + + * ltmain.sh.in (execute): Added -dlopen flag handling. Suggested + by Alexandre Oliva. + + 1997-08-21 Gordon Matzigkeit + + * ltmain.sh.in (link): Change executable wrapper to fix up value + of thisdir, as well as progdir, if the $0 path doesn't work. This + guarantees that shlibpath_var is set correctly. Add support for + execute mode. + + * ltmain.sh.in (execute): New mode to automatically set + shlibpath_var, which allows easy debugging of uninstalled + executables and libraries. Suggested by Kenneth Albanowski. + + 1997-08-20 Gordon Matzigkeit + + * Makefile.am ($(srcdir)/ltconfig): Use lineno. + + * configure.in: Add AM_PROG_AWK for lineno. + + * lineno: New program to automatically put line numbers in + ltconfig. + + * libtool.m4, ltconfig.in (AM_PROG_LD): Yet Another Rewrite, which + incorporates the results of `gcc -print-program-name=ld'. + Suggested by Alexandre Oliva. + + 1997-08-14 Gordon Matzigkeit + + * ltmain.sh.in: Accept `--quiet' and `--silent' flags to turn off + command echoing. From Juergen A. Erhard. + + (compile): Recognize the Objective C `.m' extension. From Juergen + A. Erhard. + + (compile): Suppress error output from the second compilation (if + any) so that we don't get those frustrating duplicate error + messages. + + * tests/suffix.test (extensions): Added Objective C extension, `.m'. + + 1997-08-12 Gordon Matzigkeit + + * ltconfig.in: Added messages to config.log to describe what sort + of test we are running. + (pic_flag): Added a sanity check for pic_flag. This should fix + bugs reported using the cc bundled with HP-UX 10. Suggested by + Bruno Haible and Akim Demaille. + + 1997-08-01 Gordon Matzigkeit + + * ltmain.sh.in (link): Add -dlopen and -dlpreopen support for + libtool objects. This means that dlopened modules no longer need + to be shared libraries. + + * ltconfig.in (pic_flag): GCC on IRIX 6 always builds PIC. + Reported by Ian Lance Taylor. + + * libtool.m4 (LD): Always add `-n32' to the linker if we are using + GCC on IRIX 6. Reported by Ian Lance Taylor. + + 1997-07-30 Gordon Matzigkeit + + * libtool.m4 (AM_PROG_LIBTOOL): Explicitly check enable_shared and + enable_static rather than just enableval. This allows + configure.in scripts to set their own defaults. Suggested by + Tommy Reilly. + + 1997-07-29 Gordon Matzigkeit + + * ltmain.sh.in: Add NLS environment variable handling copied from + ltconfig.in. Reported by Akim Demaille. + (link): If allow_undefined_flag is not supported, then turn on old + libraries. Reported by Akim Demaille. + + * demo/dlmain.c (main): Use dld_preloaded_symbol_count to display + a message about the sortedness of the symbol table. + + * ltconfig.in (nlist): Use an nlist convenience variable, so that + code can be shared directly with ltmain.sh.in. + + * ltconfig.in, ltmain.sh.in (dld_preloaded_symbol_count): Count up + the number of symbols in the dld_preloaded_symbols. Set to `-1' + if the list wasn't both sorted and counted. This allows + applications to do a quick binary search, if they are so inclined. + + 1997-07-25 Gordon Matzigkeit + + * ltmain.sh.in (link): Remove code for `-version-file', since it + has been long-deprecated. + + Disable static linking if hardcode_direct is unsupported and there + is no working link_static_flag. This provides correct behaviour + for all cases on AIX 3, regardless of whether collect2 is broken + or not. Reported by Mark Kettenis. + + * ltconfig.in: Fix typo in test polarity. From Mark Kettenis. + + 1997-07-24 Gordon Matzigkeit + + * ltconfig.in (hardcode_direct): Set to `unsupported' if aix3 uses + a broken collect2. Adapted out of test results from Mark + Kettenis. + (link_static_flag): Make sure the link_static_flag actually works + with a trivial binary. + + * ltmain.sh.in, ltconfig.in (export_dynamic_flag_spec): Renamed + from export_dynamic_flag because we eval it in ltmain.sh. + + * ltmain.sh.in (link_static): Don't eval link_static_flag. + + * demo/dlmain.c (main): Change function prototype to be KNR + compatible. From Kaveh R. Ghazi. + + * ltmain.sh.in (link): Use no_builtin_flag. This works around + conflicting definitions of builtin functions with at least GCC. + Reported by Kazuhiro Sasayama. + + * ltconfig.in (no_builtin_flag): New flag to turn off builtin + functions when compiling an object file. + (pipe_works): Use it. + + * tests/demo-exec.test (status): Use status variables so that we try to + execute all the programs. + + 1997-07-23 Gordon Matzigkeit + + * ltconfig.in (pic_flag): According to the libg++ 2.7.2 configure + script, DEC alpha CPUs are PIC-only, as well. Reported by Kevin + Jacobs. + + 1997-07-21 Gordon Matzigkeit + + * ltconfig.in, ltmain.sh.in: Replace all occurances of "sed 'X; + Y'" with "sed -e 'X' -e 'Y'". + + * ltmain.sh.in (link): Finish full integration for `-dlopen' and + `-dlpreopen'. + + Fix two silly typos where I used a compile_command in place of a + finalize_command, and vice versa. + + Change the wrapper script to check a hardcoded path only if the + argv[0] method fails. This is a compromise for the previous two + patches, and should solve the majority of problems with wrapper + scripts. From Kenneth Albanowski. + + (link): Change a reference to hardcode_libdir_colon_separated to + use the new hardcode_libdir_separator variable. + + * demo/Makefile.am (helldl_LDFLAGS): Add `-export-dynamic' and + `-dlpreopen' for building helldl. + + * demo/dlmain.c (main): Succeed, even if none of the libhello + symbols have been preloaded. + + 1997-07-20 Gordon Matzigkeit + + * ltconfig.in (global_symbol_pipe): Add `U' to the accepted global + symbol types. This means that we will get duplicate symbols, but + we'll also be sure to get all global symbols used by the program. + + * ltconfig.in (pipe_works), ltmain.sh.in (link): Sort and make + symbol output unique. + + 1997-07-19 Gordon Matzigkeit + + * ltconfig.in (pipe_works): Check to make sure our guessed + global_symbol_pipe actually works. + + * ltmain.sh.in (link): Revert change from Kenneth Albanowski. The + wrapper scripts are more reliable when they just use the argv[0] + value. Generally, when the argv[0] method doesn't work, the user + is trying to do something weird with an uninstalled binary, and + should try a different approach. + + * ltconfig.in, ltmain.sh.in (CC): Always use `$CC' instead of + `$cc'. This fixes a FreeBSD bug. Reported by Chuck Robey, and + others. + + 1997-07-14 Gordon Matzigkeit + + * ltmain.sh.in (link): In wrapper scripts, hardcode the current + directory to prevent phony argv[0] values from screwing up our + program. From Kenneth Albanowski. + + 1997-07-13 Gordon Matzigkeit + + * Makefile.am (demo_distfiles): Add demo/dlmain.c to the + distribution. + + 1997-07-12 Gordon Matzigkeit + + * demo/Makefile.am: Add helldl, made from dlmain.c, to demostrate + `-dlopen' usage. + + * demo/dlmain.c: New file to demonstrate preloaded modules. + + * ltmain.sh.in (link): Add `-dlopen' flag to preload dynamic + modules, even on static platforms. Use `$NM' and + `$global_symbol_cmd' to extract symbols from required files. + (dlname): Delete dlname mode entirely. It is rendered obsolete + because the `.la' file format is now a public interface. + + * ltconfig.in (NM): New variable for BSD-compatible nm program. + (global_symbol_cmd): Pipeline to extract global symbols from the + nm output. + + * ltmain.sh.in: The .la file header should depend on `ltmain.sh', + not `$PROGRAM'. + (link): Make sure $export_dynamic_flag is eval'ed before it is + used. + + * tests/demo-exec.test, tests/demo-inst.test: Check the new + helldl program, too. + + 1997-07-11 Gordon Matzigkeit + + * libtool.spec: New Red Hat Package Manager specification file in + order to help people prepare distributions of libtool for Linux. + + * ltmain.sh.in: Eliminate two accidental uses of the NONE magic + value. These were breaking libtool's behaviour when no mode is + specified. + + * tests/nomode.test: New test to make sure there is correct behaviour + when we don't specify a mode. + + 1997-07-08 Gordon Matzigkeit + + * Release 1.0. + + * ltconfig.in: On SunOS, append /usr/etc to the PATH before + running ldconfig; on *BSD, append /sbin. This was done in line + with the Linux change suggested by Kenneth Albanowski. + + * demo/Makefile.am (hardcode_tests): Aesthetic change to + alphabetize order of compiling the hardcode tests. + + * Makefile.am (EXTRA_DIST): Delete README-automake. + + * README-automake: Remove from distribution. + + 1997-07-02 Gordon Matzigkeit + + * ltmain.sh.in (link): In the executable wrapper, strip trailing + colons from the shlibpath_var because some ld.so's, notably + OpenBSD 2.0's (!), don't parse colon-terminated values correctly. + From Tim Pierce. + + 1997-07-01 Gordon Matzigkeit + + * ltmain.sh.in, ltconfig.in: Eliminate uses of the NONE magic + variable value. Use an empty variable instead. + + * ltconfig.in (with_gcc, with_gnu_ld): Do the tests for the C + compiler and linker if the variables are unset, or if they are not + GNU C and ld. + (RANLIB): Eliminate redundant `if' statement. + + * configure.in: Use AM_PROG_LD. + + * libtool.m4 (AM_PROG_LD_GNU): New macro to determine if LD is GNU + ld. + (AM_PROG_LD): Rename AM_PATH_PROG_LD to AM_PROG_LD. Parameterize + so that the user can specify `--with-gnu-ld' or `--without-gnu-ld' + to indicate his preference. + (AM_PROG_LIBTOOL): Use it. + + 1997-06-30 Gordon Matzigkeit + + * ltconfig.in: Append /sbin to the path before running ldconfig on + Linux. This helps superusers who haven't set their PATH + correctly. Suggested by Kenneth Albanowski. + + * tests/if.test: New test to make sure that we haven't forgotten to + follow an `if' statement with a `test' command. This should avoid + the majority of hard-to-track bugs. + + 1997-06-29 Gordon Matzigkeit + + * ltmain.sh.in: Change all the `eval "$run ..."' sequences to + `$run "eval ..."'. + + Change all `$ln_s ...' sequences to use `(cd /dir && $LN_S ...)'. + This is the sequence recommended by the Autoconf manual, and + should avoid any problems on older machines. Eliminate all uses + of `cp -p'. Reported by Akim Demaille. + + (install): Use `test $# -gt 0' instead of `test -n "$1"'. + + * ltconfig.in (LN_S): Add test to see if `ln -s' works. + + * libtool.m4: Increment serial number, and require AC_PROG_LN_S. + + 1997-06-26 Gordon Matzigkeit + + * ltmain.sh.in (link): Add missing `test' statement. Reported by + Akim Demaille. + + 1997-06-24 Gordon Matzigkeit + + * libtool.m4 (LD): Consistently use ac_cv_path_ld instead of + am_cv_path_ld. From Tim Pierce. + + 1997-06-20 Gordon Matzigkeit + + * ltmain.sh.in: Redo two robustness fixes. Alexandre had the + correct approach, but I botched them. + + * ltconfig.in (dynamic_linker): Disable shared libraries on + MkLinux unless GNU libc is in use. Reported by Akim Demaille. + + 1997-06-19 Gordon Matzigkeit + + * ltmain.sh.in (install): Add a missing `test' command. Reported + by Joel Weber. + Miscellaneous fixes to improve robustness. From Alexandre Oliva. + + * tests/demo-conf.test (CONFIG_SITE): Set to /dev/null, so that the + config.site file doesn't mess up our prefix. Reported by Joel + Weber. + + * tests/demo-inst.test: Always run both hell.static and hell. + + * tests/demo-conf.test: Always remove the local config.cache, but run + `make distclean' only if the Makefile exists. Otherwise, the demo + directory is not cleaned up if a user uses their own config.cache. + Reported by Joel Weber. + + 1997-06-14 Gordon Matzigkeit + + * ltmain.sh.in (link): Create invalid libtool objects when partial + linking if we don't have PIC. From Jeff Dairiki. + (install): Fix bug if libtool object is installed to a file name + without directory components. From Jeff Dairiki. + + 1997-06-13 Gordon Matzigkeit + + * Makefile.am (demo/configure): Fix up rules to run autoconf. + (aclocal.m4): Now we depend on our own libtool.m4. + + * configure.in (AM_PATH_PROG_LD): Use it. + + * libtool.m4 (AM_PATH_PROG_LD): New macro to find the linker used + by the C compiler. + (AM_PROG_LIBTOOL): Use it. + + * ltmain.sh.in (install, uninstall): Support installing and + uninstalling `.lo' files. From Jeff Dairiki. + + 1997-06-11 Gordon Matzigkeit + + * Makefile.am (ltconfig, ltmain.sh): Only move if $(srcdir) is not + the current directory. Don't regenerate every time the package is + reconfigured. Reported by Tom Tromey. + (MAINTAINERCLEANFILES): Added ltconfig, ltmain.sh, so that + $(srcdir) is not messed with during a regular clean. + + 1997-06-10 Gordon Matzigkeit + + * Makefile.am (ltconfig, ltmain.sh): Be sure to move these files + into $(srcdir) once they are created. + + * ltmain.sh.in (link): Disable building static libraries. + People should use their favourite AR and RANLIB commands. + Disable building old-style objects if `--disable-static' is + given. Suggested by Tom Lees and Stephan Kulow. + + 1997-06-08 Gordon Matzigkeit + + * ltconfig.in (host_cpu, host_vendor, host_os): Patch up + definitions, to allow for the fact that the host_os may contain + hyphens (as in linux-gnu). From Scott Goehring. + + * ltmain.sh.in (link): Move the `dlname' setting closer to the top + of the file. Suggested by David Mosberger-Tang. + Symlink the libtool archive into the `.libs' directory so that it + can be found by programs that want to find a library's dlname by + searching LD_LIBRARY_PATH. Reported by David Mosberger-Tang. + + 1997-06-06 Gordon Matzigkeit + + * Tell people to report bugs to the new libtool mailing list, + . + + 1997-06-05 Gordon Matzigkeit + + * ltconfig.in (allow_undefined_flag): New variable that implements + `-allow-undefined'. + (archive_cmds): Enable C++ constructors for FreeBSD 2.2. From + David Nugent. + + * ltmain.sh.in (link): Accept new `-allow-undefined' flag when + building libtool libraries. This tells libtool to allow + unresolved symbols to exist in shared libraries. Basically, this + turns off shared libraries on AIX. Suggested by Ian Lance Taylor. + + 1997-05-26 Gordon Matzigkeit + + * libtool.m4 (LD): On at least IRIX, many different flags need to + be propagated to the linker if they are part of the compiler + command line. Reported by Anthony Green. + + 1997-05-10 Gordon Matzigkeit + + * ltconfig.in: Trivial port to FreeBSD 3. From David Nugent. + + 1997-04-25 Gordon Matzigkeit + + * ltmain.sh.in (link): Remove all traces of `-whole-archive', + `-no-whole-archive', and libtool convenience libraries. They were + more trouble than they're worth. If these are ever reimplemented, + they need more careful attention to make portable. + + * libtool.m4, ltconfig.in: Added a `--disable-static' flag to turn + off static library creation. From Tom Lees (who finally convinced + me that it was the Right Thing to do). + + 1997-04-22 Gordon Matzigkeit + + * ltmain.sh.in (hardcode_runpath_var, runpath_var): Use them, if + the linker has no -rpath flag. + Quote the values we use to set runpath_var and shlibpath_var. + (link): Use libobjlibs for libtool convenience libraries. + + * ltconfig.in (hardcode_runpath_var, runpath_var): Add new + variables to describe linkers that honour `LD_RUN_PATH'. + (host_cpu, host_os): Use these more specific variables, rather + than the full canonical host system name. + + * ltmain.sh.in (dlname): Distinguish between missing + `-export-dynamic' and when the library is only statically linked. + + 1997-04-21 Gordon Matzigkeit + + * ltconfig.in: Trivial port to OpenBSD by making it an alias for + NetBSD. From Tim Pierce. + + 1997-04-16 Gordon Matzigkeit + + * ltconfig.in: Temporary measures to check for a broken collect2 + program. Right now, we just see if we're using GCC on AIX 3. + + * tests/hardcode.test: AIX also has arbitrary limits on the line length + of input to fgrep(1), so we need to translate NUL characters to + newlines in order to properly detect embedded `.libs'. From Bruno + Haible. + Also redirect stderr to /dev/null, so that AIX users don't get + worried by `fgrep: Maximum line length of 2048 exceeded.'. + + 1997-04-13 Gordon Matzigkeit + + * ltmain.sh.in (mode): Use `egrep -e' when inferring the operation + mode. + + 1997-04-12 Gordon Matzigkeit + + * ltconfig.in (linker): Some GNU ld's don't accept `--version', + but do accept `-v'. From Jukka Honkela. + (ld_shlibs): AIX lossage may be settling down. AIX 3.2.5 ld does + *not* hardcode direct libraries, but AIX 4.1.[45] ld does. + + 1997-04-07 Gordon Matzigkeit + + * ltconfig.in (hardcode_action): Fix silly logic error. From + Bruno Haible. + + 1997-04-05 Gordon Matzigkeit + + * ltmain.sh.in (install): Relink if hardcode_action is `relink', + rather than using complex conditionals based on the other + hardcode variables. + + * ltconfig.in (hardcode_action): Set to `relink', not `immediate', + if we can only hardcode existing directories. Rearrange + conditionals to make the intent clearer, otherwise this can be one + hellish piece of code for the already-dizzy libtool maintainer. + + 1997-04-02 Gordon Matzigkeit + + * replfunc.m4: Delete from the distribution. Documentation now + describes how to set LTALLOCA and LTLIBOBJS in your own + configure.in. + + * ltmain.sh.in (link): Make sure a libtool library only counts as + a shared library if its library_names are non-null. + Use timestamps for .lo's when PIC is turned off, rather than + symlinking to the real object. This helps invalid mixtures of PIC + and non-PIC to fail. + + 1997-04-01 Gordon Matzigkeit + + * Makefile.am (EXTRA_DIST): Distribute libtool.prj. + + * Shameless plug: Changed source code management system from CVS + to PRCS. + + * libtool.scm: Initial Guile implementation of libtool. + + * ltmain.sh.in: An unexpected inconsistency in my whole approach + to shared libraries has proven that libtool needs to be completely + rewritten if I'm going to give full shared library support for + platforms that don't use the GNU C library version 2 (which to my + knowledge currently only works on GNU Hurd and Linux/GNU systems). + Porting the GNU C library should not be difficult, though. + + Platforms that don't have the dlopen(3) family of functions will + need to install GNU DLD version 4 in order to build any kind of + libraries at all. Unfortunately, DLD 4 won't be released for a + while, because I maintain it, and I'm too busy working on libtool. + + I'll keep the old ltconfig/ltmain.sh implementation around for as + long as I can, and continue applying bug fixes, so that I'll have + a reasonable starting point for this new libtool implementation. + + It looks like this implementation will be even more complex than + the original (pre-0.7) libtool. Initial estimates show that it + may be up to 3 times slower, and 5 times larger than libtool-0.9. + I'll probably have to rewrite it in Guile to get reasonable + performance, which will severely limit its portability for a + while. + + That will also introduce a bootstrapping issue, since the next + release of Guile will use libtool to build shared libraries. So, + if users want to have shared Guile libraries, they will have to + configure Guile with `--disable-shared', compile it, install it, + then reconfigure Guile with `--enable-shared' and repeat. + + I was hoping to get libtool 1.0 out the door by early April, but + now it looks like it will take at least another year before it'll + be usable by the public at large. April fools. libtool.scm + doesn't exist yet, either. + + * ltconfig.in (verify_host): Remove redundant `Transform *-*-linux* + to *-*-linux-gnu*'. From Bruno Haible. + + * tests/hardcode.test: AIX 3 doesn't have strings(1) so we need to do a + funny tr and pipe the output to fgrep. From Bruno Haible. + + 1997-03-31 Gordon Matzigkeit + + * Makefile.am: Use the new AUTOMAKE and ACLOCAL variables. + + * ltmain.sh.in (link): Only fail if a convenience library doesn't + exist, and the user specified -whole-archive. + Fix shell quoting that was breaking @OUTPUT@ substitution. + + 1997-03-28 Gordon Matzigkeit + + * ltmain.sh.in (link): Use the hardcode_libdir_separator. + Convenience libraries are libtool objects if we're not building + libtool libs. + + * ltconfig.in (hardcode_libdir_separator): Added in case the + linker only honours the last of the -rpath flags (but it can + contain multiple colon-separated directories), such as on OSF/1. + Reported by Carl D. Roth. + + * ltmain.sh.in (link): Set the dlname if -export-dynamic is given. + (install, uninstall): Handle the dlname file separately. + + * ltconfig.in (export_dynamic_flag): Added to allow programs to + use reflexive dlopens. + + * ltmain.sh.in: Include the mode name in any help messages. + (dlname): New mode to give the name to be used with dlopen(3). + + * ltconfig.in (AR): Allow AR to be set by the user, and export it + to ltmain.sh. + + * ltmain.sh.in: Remove broken profiled library support. + Added `-whole-archive' and `-no-whole-archive' to manipulate + convenience libraries. + + 1997-03-27 Gordon Matzigkeit + + * ltmain.sh.in (link): Allow the creation of static convenience + libraries made of libtool objects. Suggested by David + Mosberger-Tang. + + 1997-03-25 Gordon Matzigkeit + + * ltconfig.in: On AIX, libtool also needs to look for `B' symbols + in nm output. These are global variable definitions. + + * ltmain.sh.in: Linking with -static should link against the + linklib if old_library is empty (like it is on AIX). + + * ltconfig.in: Change the order of OS detection, so that + linux-gnu* is detected before gnu*. + + * Makefile.am (libtool): Use the correct CC, RANLIB, LD, when + generating libtool. From Carl D. Roth. + + * configure.in: Find out the user-supplied CC, LD, RANLIB. From + Carl D. Roth. + + 1997-03-24 Gordon Matzigkeit + + * ltmain.sh.in: Linking with -static should link against the old + library, not linklib. + + * README-automake: Updated to point to Automake 1.1m. + + 1997-03-15 Gordon Matzigkeit + + * demo/main.c: Use it. + + * demo/foo.h: Declare it. + + * demo/foo.c: Added definition of `nothing' so that we have an + global variable definition, as well as functions. + + 1997-03-12 Gordon Matzigkeit + + * ltconfig.in: Make sure either enable_shared or enable_static is + configured. Reported by Tom Tromey. + + * ltmain.sh.in: Bomb out if no library types are configured. + + 1997-02-22 Gordon Matzigkeit + + * ltconfig.in, ltmain.sh.in (hardcode_libdir_flag_spec): Renamed + from `hardcode_libdir_flag'. + (library_names_spec): Renamed from `lib_names'. + + * ltconfig.in, ltmain.sh.in (hardcode_action): Change value from + `rpath' to `immediate'. + + * replfunc.m4: Add AM_FUNC_ALLOCA, AM_FUNC_MEMCMP, and + AM_STRUCT_ST_BLOCKS. + + 1997-02-18 Gordon Matzigkeit + + * ltconfig.in: Transform *-*-linux* to *-*-linux-gnu* to support + old-style config.guess scripts. + + 1997-02-17 Gordon Matzigkeit + + * ltmain.sh.in: Create objdir *before* linking a program into it. + + 1997-02-12 Gordon Matzigkeit + + * ltconfig.in: Any ld --version that returns GNU is probably a GNU + ld. From Marcus Daniels. + + * libtool.m4: Added AM_REPLACE_FUNCS. + + 1997-02-11 Gordon Matzigkeit + + * ltconfig.in: Trivial port to *-*-osf4. From Bruno Haible. + + 1997-02-10 Gordon Matzigkeit + + * ltconfig.in: AIX 3 and 4 ld only hardcodes LIBPATH if -L is not + specified. This behaviour is the same with both xlc and gcc. + + 1997-02-07 Gordon Matzigkeit + + * doc/platforms.texi: Yaay! We found a workaround for HP-UX + /bin/sh buffer overflows. From Eric Backus. + + 1997-02-03 Gordon Matzigkeit + + * Release 0.9. + + * PLATFORMS, doc/platforms.texi, Makefile.am, doc/Makefile.am: + Move PLATFORMS to doc/platforms.texi. + + * ltmain.sh.in (link): Use hardcode_libdir_flag to get a library + directory into the resulting binary. + Use hardcode_action, and make many simplifying changes to have + compilation and finalization be consistent with each other. + + * ltconfig.in: Not so amazing! It's AIX cc that hardcodes direct + libraries... gcc doesn't, though. + (link_rpath_flag): Change link_rpath_flag to be + hardcode_libdir_flag. + (hardcode_action): New variable to simplify ltmain.sh. + + * tests/Makefile.am (TESTS): Do the full make sequence with + --disable-shared, then without. + + * tests/demo-sttc.test: Configure the demo directory with + --disable-shared. + + 1997-01-29 Gordon Matzigkeit + + * ltmain.sh.in: Change to take advantage of linkers that don't + hardcode direct libraries. + + * ltconfig.in: Amazing! AIX 3 linker doesn't hardcode direct + libraries, which makes it less buggy than AIX 4. Reported by Mark + Kettenis. + + * demo/configure.in: Check for the math library. + + * demo/foo.c (foo): Change to use the `cos' function, so that we + need to link against another library. + + * tests/hardcode.test: Rewrite to use fgrep on output from ``strings + -a'' if using fgrep directly on the binary files fails. From Mark + Kettenis. + + 1997-01-28 Gordon Matzigkeit + + * ltmain.sh.in (link): Export the PATH variable in order to find + the program, rather than giving a full path. This helps give the + program a less confusing value for argv[0]. + + * tests/hardcode.test: Make sure that ../demo/libhello.la really is a + shared library before running hardcoding tests. + + 1997-01-26 Gordon Matzigkeit + + * Release 0.8. + + 1997-01-24 Gordon Matzigkeit + + * Makefile.am (demo_distfiles): Add demo/acinclude.m4 to the + distribution. + + 1997-01-22 Gordon Matzigkeit + + * libtool.m4: For IRIX 6, ld needs -n32 if cc uses it. Reported + by Bruno Haible. + + * ltconfig.in: IRIX ld does not hardcode direct libraries. + Reported by Bruno Haible. + + 1997-01-18 Gordon Matzigkeit + + * ltconfig.in, ltmain.sh.in (hardcode_shlibpath_var): Allow new + value, `unsupported', since most linkers do not allow you to use + shlibpath_var for initial linking. + + * ltconfig.in: Lots of bug fixes from Bruno Haible. Set wl on + OSF/1, fix definitions of hardcode_* variables. + (archive_cmds): Fix not to use +h on HP-UX 9.x. Reported by Bruno + Haible. + + * tests/demo-conf.test: Use the CONFIG_SHELL environment variable when + running configure in the demo directory. From Bruno Haible. + + * tests/Makefile.am (clean-local): Make distclean in the demo directory, + so that ``make clean; env CC=cc make check'' works as one would + expect. + + * tests/demo-make.test: Fix typo (use $make instead of make). Reported + by Akim Demaille. + + 1997-01-17 Gordon Matzigkeit + + * libtoolize.in: Handle explicit AC_CONFIG_AUX_DIR settings. + Suggested by Akim Demaille. + + * libtool.m4: Change ltconfig line to use $CONFIG_SHELL when it is + specified. Reported by Bruno Haible. + + 1997-01-16 Gordon Matzigkeit + + * demo/Makefile.am (hc-direct): Do better searching for the proper + name to do a direct link. + (hc-libpath): Make allowances if shlibpath_var cannot be used + to find libraries at link time, such as on AIX. + + * Makefile.am (demo_distfiles): Remove ansi2knr.1 and ansi2knr.c. + + * demo/foo.c, demo/hello.c, demo/main.c: Change ANSI prototypes to + KNR form, for better portability, and less ansi2knr hair. + + * demo/configure.in: Remove AM_FUNC_PROTOTYPES. + + * demo/Makefile.am: Remove ansi2knr from the AUTOMAKE_OPTIONS. + + * demo/ansi2knr.1, demo/ansi2knr.c: Removed these files. + + * ltmain.sh.in: Use 1>&2 consistently to direct errors and + warnings to stderr. + (compile): Fix missing single quote. + + * ltconfig.in (hardcode_direct): On Solaris at least, using + DIR/libNAME.so does not hardcode DIR, so introduce a new hardcode + variable to reflect that. + + * ltmain.sh.in (link): If linking with $link_static_flag fails, + then retry without it, but still use the .a versions of + uninstalled libtool archives. + + * tests/tlibtool: Rewrote to grab all the settings from the generated + libtool script. + + * tests/hardcode.test: Make allowances if shlibpath_var cannot be used + to find libraries at link time, such as on AIX. + + 1997-01-15 Gordon Matzigkeit + + * ltmain.sh.in (link): Eval $link_static_flag. Reported by Bruno + Haible. + + * PLATFORMS: Add to distribution. Suggested by Bruno Haible. + + 1997-01-14 Gordon Matzigkeit + + * tests/demo-conf.test, tests/demo-inst.test, tests/demo-unst.test, + tests/hardcode.test: + Use $make instead of make. + + * tests/defs (make): Add definition of $make that uses the $MAKE + environment variable, if set. Suggested by Bruno Haible. + + * tests/demo-unst.test (leftovers): Change the find command to ignore + files beginning with a dot, as egrep -v doesn't seem to do the + trick. Reported by Bruno Haible. + + 1997-01-13 Gordon Matzigkeit + + * ltconfig.in: Add support for SCO OpenServer 5.x. From + Christopher Olsen. + + (can_build_shared): Initialize at the top of the file, so that + shared libraries aren't built on platforms that don't support + them. + + * tests/hardcode.test: Added a test to make sure that libtool's idea of + hardcoding system linkers is correct. + + 1997-01-11 Gordon Matzigkeit + + * ltmain.sh.in, ltconfig.in, libtoolize.in, doc/libtool.texi: + Update the copyright completion years. + + 1997-01-08 Gordon Matzigkeit + + * ltconfig.in: Port to IRIX 5.3, 6.2. + + 1997-01-06 Gordon Matzigkeit + + * ltconfig.in: HP-UX 9 support is the same as HP-UX 10, so the + port is trivial. + + * libtoolize.in: Add --dry-run option, -n for short. + + 1997-01-03 Gordon Matzigkeit + + * ltmain.sh.in (link): On at least SunOS, /bin/sh doesn't + understand "export something=val". From Bruno Haible. + + * tests/Makefile.am (distclean-local): Remove all files that the tests + may have created. Reported by Bruno Haible. + + * For all tests, discover srcdir when running from the command + line. + + * tests/demo-unst.test: Don't fail if make uninstall doesn't delete + files beginning with a dot, since spurious .nfsXXX files may be + present when running NFS. Reported by Bruno Haible. + + 1997-01-02 Gordon Matzigkeit + + * ltmain.sh.in (compile): Recognize valid source file suffixes for + Fortran and C++. + + * tests/suffix.test: New test to guarantee that libtool compile + recognizes valid source file suffices. + + 1996-12-17 Gordon Matzigkeit + + * ltmain.sh.in (link): Don't allow *._o and *.l_o to be valid + object type suffixes, in spite of Automake's current ansi2knr + implementation. Not all compilers allow non-`.o' suffixes. + + 1996-12-16 Gordon Matzigkeit + + * ltmain.sh.in (link): Delete the `libtool' version type. + + 1996-12-12 Gordon Matzigkeit + + * ltconfig.in: Use the full autoconf syntax when checking for GNU + C. Delete library stripping program, until we have a correct + test. + + 1996-12-11 Gordon Matzigkeit + + * ltconfig.in: On AIX 3, use /usr/ucb/nm, not /ucb/nm. From Mark + Kettenis. + + 1996-12-09 Gordon Matzigkeit + + Reported by Charles Kerr: + * doc/libtool.texi (Creating Object Files): Doc fix independant -> + independent. + + * ltconfig.in (ld_shlibs): SunOS 4 doesn't support shared library + dependencies. + + 1996-12-08 Gordon Matzigkeit + + * Release 0.7. + + * Makefile.am (EXTRA_DIST): Add README-automake to the + distribution. + + * ltmain.sh.in (link): When linking libtool libraries, use + standard objects if they are PIC. This prevents spurious warnings + about invalid suffixes on AIX. + + * demo/Makefile.am: Rename libhell to libhello, so that we're not + quite as offensive. + + * ltconfig.in: Remove unnecessary host validity checking. + + * ltmain.sh.in: Don't force people to use libNAME.la: SOMETHING.la + is good enough (for consistency with *.a handling). + + * tests/demo.test: Break up into demo-conf.test, demo-make.test, + demo-exec.test, demo-inst.test, and demo-unst.test, so that passes + and failures are reported more quickly. + + * tests/link-2.test: Test to make sure that .lo files don't get built + directly into programs. + + 1996-12-07 Gordon Matzigkeit + + * ltmain.sh.in (link): Accept files ending in .a as standard + object files. Reported by Ulrich Drepper. + Remove support for creating profiled libraries (for now). + Transform all library objects into standard objects when linking a + program. + + * ltconfig.in (thisdir): How embarrassing! An error in the regexp + for finding the directory component of the script path. + + * tests/tlibtool: A typically-configured libtool script, that uses + ../ltmain.sh.in for its backend. + + * tests/link.test: Make sure that it is legal to link against .a files. + + 1996-12-05 Gordon Matzigkeit + + * ltmain.sh.in (compile): Support `.S' (preprocessed assembler) + files. Reported by Anthony Green. + + * libtoolize.in: Give clearer instrutions for how to update + aclocal.m4. + + * ltconfig.in, ltmain.sh.in (link): Add support for creating + reloadable objects. + + 1996-12-04 Gordon Matzigkeit + + * ltmain.sh.in (install): Fix passing -n flag to `libtool + --finish'. + (compile): Compile `.lo' and `.o' objects at the same time so that + non-PIC objects (if they are available) can be used for linking + into programs and creating static archives. Suggested by Ulrich + Drepper. + + 1996-12-03 Gordon Matzigkeit + + * ltmain.sh.in (link): Give the full path to the libtool library + when sourcing it. + + * ltconfig.in (old_striplib): Do a configuration test to determine + if old-style libraries actually can be stripped or not. + + 1996-12-02 Gordon Matzigkeit + + * tests/demo.test: Try compiling the ../demo subdirectory, with no + special options. + + * test-e.test: Check that we haven't used `test -e' anywhere in + our portable shell scripts. + + 1996-12-02 Gordon Matzigkeit + + * ltconfig.in: Delete reference to ABOUT-LIBS. + + * tests: Added new subdirectory. + + * doc/libtool.texi: Doc fixes, and finished up the Configuring + chapter. + + * ltmain.sh.in (link): Allow *._o and *.l_o to be valid object + file suffixes, for Automake's ansi2knr implementation. + New option -version-info replaces -version-file. + + [help]: Give a pointer to mode-specific help when appropriate. + + * ltconfig.in: Changed messages to correspond to AM_PROG_CC_STDC. + + * demo: Also test Automake's ansi2knr support. + + 1996-11-19 Gordon Matzigkeit + + * ltconfig.in: Bug fixes for AIX 4, and for static platforms. + + * ltmain.sh.in (install): Fix for loops over arguments. + Need to quote ${IFS= } -> "${IFS= }". + (link): Fix soname_spec bug. Create objdir whether or not we have + shared libraries. + + * ltconfig.in: Check for library stripping program. + Use test -f instead of test -e. + + 1996-11-18 Gordon Matzigkeit + + * ltconfig.in: Don't run the RANLIB test unless RANLIB wasn't + set. + Be verbose about the environment variables we were configured + with. + + * ltmain.sh.in (objdir): change to .libs. + + 1996-11-16 Gordon Matzigkeit + + * ltmain.sh.in (install): Just plunge ahead with the + installation... don't try to enforce dependencies. + + 1996-11-15 Gordon Matzigkeit + + * ltmain.sh.in: Fix up $libdir to be $dest in install mode. + + 1996-11-10 Gordon Matzigkeit + + * ltmain.sh: Finished rewrite of compile, link, and install + modes. + + * New ChangeLog file for libtool-0.7, since I've totally rewritten + libtool. + + 1996-03-15 Gordon Matzigkeit + + * For historical reasons: this is when I started writing libtool. Index: libtool/Makefile.am diff -c libtool/Makefile.am:1.1.1.38 libtool/Makefile.am:1.37.2.9 *** libtool/Makefile.am:1.1.1.38 Fri Mar 20 08:58:42 1998 --- libtool/Makefile.am Sun Apr 25 21:05:55 1999 *************** *** 1,122 **** ! ## Process Makefile.am with automake to create Makefile.in. -*-Makefile-*- ! ## Gordon Matzigkeit , 1996 ! AUTOMAKE_OPTIONS = gnits ! SUBDIRS = doc tests # We need to export these variables when we run ltconfig. CFLAGS = @CFLAGS@ CPPLAGS = @CPPFLAGS@ aclocal_macros = libtool.m4 EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.in \ ! libtool.spec libtool.prj ! CLEANFILES = libtool libtoolize ! MAINTAINERCLEANFILES = ltconfig ltmain.sh ! ! # Files in the demo subdirectory that go in the distribution. ! demo_distfiles = demo/Makefile.in demo/Makefile.am demo/README \ ! demo/acinclude.m4 demo/aclocal.m4 \ ! demo/configure demo/configure.in demo/foo.c demo/foo.h \ ! demo/dlmain.c demo/hello.c demo/main.c demo/run.test # These are required by libtoolize. pkgdata_SCRIPTS = config.guess config.sub ltconfig pkgdata_DATA = ltmain.sh # This macro file should be visible to Automake's aclocal. - aclocaldir = @aclocaldir@ aclocal_DATA = $(aclocal_macros) # The standalone libtool script, and the libtool distributor. bin_SCRIPTS = libtool libtoolize ! libtool: ltconfig ltmain.sh CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ ! LD="$(LD)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ ! $(srcdir)/ltconfig --srcdir=$(srcdir) $(srcdir)/ltmain.sh ! libtoolize: libtoolize.in $(top_builddir)/config.status CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status chmod +x libtoolize ! # Do line number substitution, as well as PACKAGE and VERSION. # Line numbering transliterated from a section in autoconf (Autoconf 2.12). ! $(srcdir)/ltconfig: ltconfig.in $(top_srcdir)/configure.in $(AWK) '/@LINENO@/ { printf "%d:", NR } { print }' $(srcdir)/ltconfig.in | \ sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \ ! -e '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' > ltconfig.T chmod +x ltconfig.T ! mv -f ltconfig.T $@ ! $(srcdir)/ltmain.sh: ltmain.in $(top_srcdir)/configure.in ! sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' $(srcdir)/ltmain.in > ltmain.shT ! mv -f ltmain.shT $@ ! ! # Distribute the demo subdirectory. ! dist-hook: $(demo_distfiles) ! mkdir $(distdir)/demo ! -chmod 755 $(distdir)/demo ! here=`pwd`; distdir=`cd $(distdir) && pwd` \ ! && cd $(srcdir)/demo \ ! && $(AUTOMAKE) --include-deps --build-dir=$$here/demo --srcdir-name=$(srcdir)/demo --output-dir=$$distdir/demo ! @for file in $(demo_distfiles); do \ ! d=$(srcdir); \ ! test -f $(distdir)/$$file \ ! || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ ! || cp -p $$d/$$file $(distdir)/$$file; \ ! done # All our rules should depend on these demo files. ! all: demo/Makefile.in demo/configure ! # We use our own libtool.m4. ! $(srcdir)/acinclude.m4: libtool.m4 ! rm -f $(srcdir)/acinclude.m4 ! cd $(srcdir) && $(LN_S) libtool.m4 acinclude.m4 ! $(srcdir)/demo/acinclude.m4: libtool.m4 ! rm -f $(srcdir)/demo/acinclude.m4 ! cd $(srcdir)/demo && $(LN_S) ../libtool.m4 acinclude.m4 ! ! # Rules for rebuilding some of the demo source files. ! $(srcdir)/demo/Makefile.in: demo/Makefile.am demo/configure.in demo/aclocal.m4 ! cd $(srcdir)/demo && $(AUTOMAKE) ! ! $(srcdir)/demo/configure: demo/configure.in demo/aclocal.m4 ! cd $(srcdir)/demo && $(AUTOCONF) ! ! $(srcdir)/demo/aclocal.m4: demo/configure.in demo/acinclude.m4 ! cd $(srcdir)/demo && $(ACLOCAL) ! ! ###################################################################### ! # These commands really help my life as a maintainer who uses PRCS. ! # Feel free to copy them to your own project. I just run a ! # maintainer-checkin whenever I feel like it, then I run a maintainer-release ! # after changing the project major version number in my project file. ! # ! # This works because of the special `$Format: ...$' string I have in my ! # `configure.in'. ! PRCS = prcs ! ! .PHONY: maintainer-checkin maintainer-check-versions maintainer-release ! maintainer-checkin: ! cd $(top_srcdir) && $(PRCS) checkin -f $(PACKAGE) ! ! maintainer-check-versions: ! @newver=`grep '^(Project-Version[ ]' $(srcdir)/$(PACKAGE).prj | \ ! sed 's/^.*[ ]\+\([^ ]\+\)[ ]\+[0-9]\+).*$$/\1/'`; \ ! if test "X$$newver" = "X$(VERSION)"; then \ ! echo "Project-Version major \`$$newver' is the same as the released version." 1>&2; \ ! echo "You must change Project-Version in $(top_srcdir)/$(PACKAGE).prj before releasing." 1>&2; \ ! exit 1; \ ! fi ! ! maintainer-release: maintainer-check-versions distcheck ! cd $(top_srcdir) && $(PRCS) checkin -f $(PACKAGE) ! cd $(top_srcdir) && $(PRCS) rekey -f $(PACKAGE) configure.in libtool.spec ! @echo "============================="; \ ! echo "Congratulations! $(PACKAGE)-$(VERSION) is now complete."; \ ! echo; \ ! echo "Distribute \`$(PACKAGE)-$(VERSION).tar.gz' to the masses, and don't forget"; \ ! echo "any other details you need to complete this release."; \ ! echo "=============================" --- 1,134 ---- ! ## Process this file with automake to produce Makefile.in + AUTOMAKE_OPTIONS = 1.3e gnits readme-alpha + + BUILD_SUBDIRS = . libltdl doc tests + SUBDIRS = $(BUILD_SUBDIRS) + DIST_SUBDIRS = $(BUILD_SUBDIRS) $(CONF_SUBDIRS) + # We need to export these variables when we run ltconfig. CFLAGS = @CFLAGS@ CPPLAGS = @CPPFLAGS@ + LDFLAGS = @LDFLAGS@ + LIBS= @LIBS@ aclocal_macros = libtool.m4 EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.in \ ! mkstamp ChangeLog.0 ! CLEANFILES = libtool libtoolize ltconfig.T ltmain.shT # These are required by libtoolize. pkgdata_SCRIPTS = config.guess config.sub ltconfig pkgdata_DATA = ltmain.sh # This macro file should be visible to Automake's aclocal. aclocal_DATA = $(aclocal_macros) # The standalone libtool script, and the libtool distributor. bin_SCRIPTS = libtool libtoolize ! libtool: $(srcdir)/ltmain.sh $(srcdir)/ltconfig CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ ! LD="$(LD)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \ ! LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ ! DLLTOOL="$(DLLTOOL)" OBJDUMP="$(OBJDUMP)" AS="$(AS)" \ ! $(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \ ! --output=$@ $(srcdir)/ltmain.sh ! # Experimental C version of libtool. ! clibtool: $(srcdir)/ltmain.c $(srcdir)/ltconfig ! CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ ! LD="$(LD)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \ ! LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ ! DLLTOOL="$(DLLTOOL)" OBJDUMP="$(OBJDUMP)" AS="$(AS)" \ ! $(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \ ! --output=$@ $(srcdir)/ltmain.c ! ! libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status chmod +x libtoolize + + # TSDEPS will be defined to TSDEPS_DIST at `make dist' time + TSDEPS = + TSDEPS_DIST = ChangeLog libtool.m4 + CVS = cvs # set it to `:' to avoid CVS operations + + .PHONY: timestamps update-timestamps + timestamps distdir: update-timestamps + update-timestamps: + @if (cd $(srcdir) && test -d CVS && \ + $(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \ + echo "Cannot make dist before commit"; exit 1; else :; fi + $(MAKE) TSDEPS="$(TSDEPS_DIST)" $(srcdir)/ltconfig $(srcdir)/ltmain.sh ! # Do line number substitution, as well as PACKAGE, VERSION and TIMESTAMP. # Line numbering transliterated from a section in autoconf (Autoconf 2.12). ! @srcdir@/ltconfig: $(srcdir)/ltconfig.in $(top_srcdir)/configure.in $(TSDEPS) ! rm -f ltconfig.T ! date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \ $(AWK) '/@LINENO@/ { printf "%d:", NR } { print }' $(srcdir)/ltconfig.in | \ sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \ ! -e "s%@""TIMESTAMP@%$$date%" \ ! -e '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' \ ! > ltconfig.T chmod +x ltconfig.T ! mv -f ltconfig.T $@ || \ ! (rm -f $@ && cp ltconfig.T $@ && rm -f ltconfig.T) ! @srcdir@/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in $(TSDEPS) ! rm -f ltmain.shT ! date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \ ! sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \ ! -e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT ! mv -f ltmain.shT $@ || \ ! (rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT) # All our rules should depend on these demo files. ! all-recursive: $(ACINCLUDE_M4_LIST) ! @ACINCLUDE_M4_LIST@: $(srcdir)/libtool.m4 ! rm -f $@ ! cp $(srcdir)/libtool.m4 $@ ! ! .PHONY: configure-subdirs ! configure-subdirs distdir: $(DIST_MAKEFILE_LIST) ! @DIST_MAKEFILE_LIST@: ! dir=`echo $@ | sed 's,^[^/]*$$,.,;s,/[^/]*$$,,'`; \ ! test -d $$dir || mkdir $$dir || exit 1; \ ! abs_srcdir=`cd $(top_srcdir) && pwd`; \ ! (cd $$dir && $$abs_srcdir/$$dir/configure) || exit 1 ! ! # Create and install libltdl ! install-data-hook: ! cd libltdl && $(MAKE) distdir distdir=$(DESTDIR)$(pkgdatadir)/libltdl ! ! # Uninstall libltdl ! uninstall-local: ! -rm -rf $(DESTDIR)$(pkgdatadir)/libltdl ! ! ################################################################ ! ## ! ## Everything past here is useful to the maintainer, but probably not ! ## to anybody else (snarfed from automake/Makefile.am). ! ## ! ! # Tag before making distribution. Also, don't make a distribution if ! # checks fail. Also, make sure the NEWS file is up-to-date. ! cvs-dist: distcheck ! @if sed '1,2d;3q' $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \ ! echo "NEWS not updated; not releasing" 1>&2; \ ! exit 1; \ ! fi ! cd $(srcdir) && \ ! $(CVS) -q tag `echo "release-$(VERSION)" | sed 's/\./-/g'` ! $(MAKE) dist ! ! cvs-diff: ! thisver=`echo "release-$(VERSION)" | sed 's/\./-/g'`; \ ! if test -z "$$OLDVERSION"; then \ ! prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \ ! else prevno="$$OLDVERSION"; fi; \ ! prevver=release-`echo $$prevno | sed 's/\./-/g'`; \ ! $(CVS) -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \ ! > $(PACKAGE)-$$prevno-$(VERSION).diff Index: libtool/NEWS diff -c libtool/NEWS:1.1.1.60 libtool/NEWS:1.24.2.11 *** libtool/NEWS:1.1.1.60 Fri Mar 20 08:58:42 1998 --- libtool/NEWS Thu Apr 29 14:47:37 1999 *************** *** 1,10 **** NEWS - list of user-visible changes between releases of GNU Libtool New in 1.2 - 1998-03-20, Gordon Matzigkeit: * Minor bug fixes to provide a stable public release. * Libtool no longer causes Solaris printf to barf due to silly 2110-byte static buffers. ! New in 1.1 - 1998-03-08, Gordon Matzigkeit: * Bug fixes. * http://www.profitpress.com/libtool/ is libtool's homepage. --- 1,136 ---- NEWS - list of user-visible changes between releases of GNU Libtool + New in 1.3: 1999-04-29, Libtool team: + * This is just a summary of the changes since 1.2. + See the news of intermediate alpha releases below for details. + * Support for convenience archives. + * New maintainers. Anonymous CVS and home page at gnu.org. + * Portable dlopening interface with libltdl, new -module flag. + * Correctly link installed libtool libraries into programs and other + libtool libraries. Linking of uninstalled libtool libraries into + libraries is under development for 1.4. + * Do not drop library dependencies on platforms that allow them. + * Linking with uninstalled libraries no longer picks installed ones by + mistake. + * Use libraries from the build tree when running uninstalled + executables (may require double linking). + * Allow developers to optimize for build-tree executions. + * Support -export-symbols-regex for controlled symbol exporting. + * Support -R to hardcode directories in library search paths. + * New ports, demos and tests. Lots of improvements and bug fixes. + + New in CVS version 1.2g, Libtool team: + * AM_PROG_LIBTOOL is smaller and faster + * AC_LIBTOOL_WIN32_DLL is required in configure.in for libtool to + attempt to build dlls on win32 hosts + * Shared libraries on AmigaOS up to version 4 are now disabled + since they don't meet libtool's requirements for shared libraries + * -L supports now relative directories + * Libltdl has a new license: LGPL with a special exception + * Libltdl can be used as stand-alone package + * dlopen support for BeOS + * Partial support for Motorola System V 4 + * Improved support for AIX, BeOS, Cygwin, DJGPP, DU, IRIX and HP/UX + * Documentation updates + * New tests + * Bugfixes + + New in 1.2f: 1999-03-15; CVS version 1.2e, Libtool team: + * libtool will correctly link uninstalled libraries into programs + and prefer uninstalled libraries to installed ones + * Library paths that are in the system default run-time search path + are no longer hardcoded into executables. + * New fast installation mode, which links the final executable + in order to avoid relinking during installation. + Programs in the build-tree are relinked when executed. + * New AC_DISABLE_FAST_INSTALL macro to set the default for + the fast-install mode to disabled + * New -export-symbols-regex flag, to export symbols selectively by + a regular expression + * Support -R for specifying run-time path of programs and library dependencies + * New -avoid-version option to avoid versioning for libraries + * libtool module names no longer need to have a "lib" prefix + (requires automake 1.4). + * New -thread-safe flag, to build thread-safe libraries + * Major improvements in libltdl: API documentation, installable version, + support for module search paths, support for lt_dlopen(0), + can be embedded into packages as a tar file (libltdl.tar.gz), + dynamic buffer allocation and buffer overflow checks, + new macro LTDL_SET_PRELOADED_SYMBOLS() which must be used in the + main program, dynamic memory allocation functions are user-defineable + * New AC_LIBLTDL_CONVENIENCE and AC_LIBLTDL_INSTALLABLE macros, to select + convenience and/or installable versions of libltdl. + * libltdl is now built and installed unless --disable-ltdl-install + * New "-dlopen self" flag for dlopening the executable itself + * New AC_LIBTOOL_DLOPEN macro to check for dlopen support, + required if you use -dlopen or -dlpreopen + * If libtool could not satisfy all dependencies of a module + it will only build a static version of it + * dld_preloaded_symbols was renamed to lt_preloaded_symbols + * Support for BeOS + * Improved support for FreeBSD, AIX, IRIX, OSF, SysV 4.3, HP/UX, DJGPP + BSD/OS 4.x and NetBSD + * In order for libtool to attempt to link a shared library (dll) on win32 + platforms, you must pass the -no-undefined flag to libtool in link mode. + * The path to GNU ld now works on cygwin-b18 to cygwin-b20.2 at least. + * Support for IRIX library versioning. + * New demos and tests + * Various bugfixes + + New in 1.2d: 1998-12-16; CVS version 1.2c, Libtool team: + * libtool will correctly link already-installed libraries into programs. + * New -module flag, to create loadable modules. + * New libltdl, a small library for portable dlopening of modules. + It is still undocumented, but you can already find some examples in: + * New mdemo directory, with tests of -module and dlopening examples. + Be aware that libltdl is only known to work on a few platforms such as + GNU/Linux and Solaris2. Some mdemo tests are known to FAIL on several + other platforms; please ignore these failures by now (or work to fix + them :-). + * Inter-library dependencies patch finally integrated, but there's + still much porting to do. See PORTING for details (some plans for the + future in mail/deplibs in the CVS tree). + * New option -export-symbols to control symbol exporting when possible. + * Fixed -export-dynamic problem with C++ programs in egcs 1.1. + * New dlpreopen structure. + * libtool now supports `-c -o' and subdirectories in sources and + target object names even in platforms whose compilers do not support + this. In this case, file locking occurs to avoid problems with + parallel builds. + * New `echo' variant that should fix most problems with long command + lines and broken printf programs. + * Support for DG/UX, UnixWare 7.x and FreeBSD 3.0, and improved + support for Microsoft Windows + * Various bugfixes + * We now have anonymous CVS access to GNU libtool. CVSROOT is + :pserver:anoncvs@anoncvs.gnu.org:/gd/gnu/anoncvsroot. The password + is empty. The directory is libtool. Check our home-page at + http://www.gnu.org/software/libtool/libtool.html for details. + * Alexandre Oliva, Thomas Tanner and Gary V. Vaughan have taken over + the maintenance of libtool. + * Arguments to ltconfig have been changed to allow creation of a + libtool C program, totally unusable as of this release. + + New in 1.2b - 1998-07-01, Gordon Matzigkeit: + * Libtool needs a new maintainer, since Gordon Matzigkeit has quit. + If you think you can do the job, send mail to bug-libtool@gnu.org. + * Bug fixes. + * Support for libtool convenience archives. + + New in 1.2a - 1998-04-19, Gordon Matzigkeit: + * Bug fixes. + * ltconfig accepts an `--output' option to specify the name of the + generated libtool. + * New `--debug' flag to turn on shell script tracing for libtool, + libtoolize, and ltconfig. + * Added `libtool --config' to print out all configuration variables. + * Support for *-*-hpux11*. + New in 1.2 - 1998-03-20, Gordon Matzigkeit: * Minor bug fixes to provide a stable public release. * Libtool no longer causes Solaris printf to barf due to silly 2110-byte static buffers. ! New in 1.1 - 1998-03-08, Gordon Matzigkeit: * Bug fixes. * http://www.profitpress.com/libtool/ is libtool's homepage. Index: libtool/PACKAGES diff -c libtool/PACKAGES:1.1.1.8 libtool/PACKAGES:removed *** libtool/PACKAGES:1.1.1.8 Fri Nov 14 19:04:44 1997 --- libtool/PACKAGES Thu Apr 29 16:11:00 1999 *************** *** 1,23 **** - Packages using libtool: - - Free: - ===== - http://www.ens.fr/~laburthe/claire.html - ftp://ftp.x.org/contrib/widgets/motif/spinbox/ - The GNU Guile project. - GTK+ and GIMP (GNU Image Manipulation Program). - http://www.xcf.berkeley.edu/~gimp/gimp.html - SANE (Scanner Access Now Easy): http://www.azstarnet.com/~davidm/ - PalmOS/Pilot pilot-link: ftp://ryeham.ee.ryerson.ca/pub/PalmOS/ - Gnans (stochastic and deterministic dynamic systems solver): - http://www.mathematik.uni-bremen.de/~bengt/ - Amanda (The Advanced Maryland Automatic Network Disk Archiver): - http://www.amanda.org/ - - Nonfree: - ======== - KDE (K Desktop Environment): http://www.kde.org/ - - Possible: - ========= - OmniBroker (CORBA tool): http://www.ooc.com/ob.html --- 0 ---- Index: libtool/PORTING diff -c /dev/null libtool/PORTING:1.3 *** /dev/null Thu Apr 29 16:11:00 1999 --- libtool/PORTING Wed Dec 9 13:37:31 1998 *************** *** 0 **** --- 1,6 ---- + In order to port libtool to a new platform, start by reading the node + `New ports' in the info document (i.e., the libtool manual). + + If you find that any porting documentation is missing, please + complain! :-) Complaints with patches and improvements to the + documentation, or to libtool itself, are more than welcome. :-) :-) Index: libtool/README diff -c libtool/README:1.1.1.22 libtool/README:1.6.4.2 *** libtool/README:1.1.1.22 Fri Mar 20 08:58:42 1998 --- libtool/README Fri Apr 9 20:50:14 1999 *************** *** 9,40 **** Libtool supports building static libraries on all platforms. Shared library support has been implemented for these platforms: ! AIX 3.x (*-*-aix3*) ! AIX 4.x (*-*-aix4*) ! AmigaOS (*-*-amigaos*) Digital/UNIX 3.x, 4.x, a.k.a. OSF/1 (*-*-osf3*, *-*-osf4*) ! FreeBSD 2.x, 3.x (*-*-freebsd2*, *-*-freebsd3*) GNU/Linux ELF (*-*-linux-gnu*, except aout, coff, and oldld) ! HP-UX 9.x, 10.x (*-*-hpux9*, *-*-hpux10*) [see note] IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*) NetBSD 1.x (*-*-netbsd*) OpenBSD 2.x (*-*-openbsd*) OS/2 using EMX (*-*-os2*) SCO OpenServer 5.x (*-*-sco3.2v5*) Solaris 2.x (*-*-solaris2*) SunOS 4.x, a.k.a. Solaris 1.x (*-*-sunos4*) UnixWare 2.x (*-*-sysv4.2uw2*) UTS 4.x (*-*-uts4*) All ELF targets that use both the GNU C compiler (gcc) and GNU ld ! NOTE: The vendor-distributed HP-UX sed(1) programs are horribly broken, ! and cannot handle libtool's requirements, so users may report unusual ! problems. There is no workaround except to install a working sed ! (such as GNU sed) on these systems. Libtool's home page is: ! http://www.profitpress.com/libtool/ See the file NEWS for a description of recent changes to libtool. --- 9,54 ---- Libtool supports building static libraries on all platforms. Shared library support has been implemented for these platforms: ! AIX 3.x, 4.x (*-*-aix3*, *-*-aix4*) ! BeOS (*-*-beos*) ! BSD/OS 2.1, 3.x, 4.x (*-*-bsdi2.1, *-*-bsdi3*, *-*-bsdi4*) Digital/UNIX 3.x, 4.x, a.k.a. OSF/1 (*-*-osf3*, *-*-osf4*) ! DG/UX R4.11, R4.12, R4.20 (*-*-dguxR411*, *-*-dguxR412*, *-*-dguxR420*) ! FreeBSD 2.x, 3.x, 4.x (*-*-freebsd2*, *-*-freebsd3*, *-*-freebsd4*) GNU/Linux ELF (*-*-linux-gnu*, except aout, coff, and oldld) ! HP-UX 9.x, 10.x, 11.x (*-*-hpux9*, *-*-hpux10*, *-*-hpux11*) [see note] IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*) + NCR MP-RAS 3.x (*-ncr-sysv4.3*) [see note] + Motorola System V 4 (mk88-motorola-sysv4) [see note] NetBSD 1.x (*-*-netbsd*) OpenBSD 2.x (*-*-openbsd*) OS/2 using EMX (*-*-os2*) SCO OpenServer 5.x (*-*-sco3.2v5*) + SCO UnixWare 7.x (*-*-sysv5*) Solaris 2.x (*-*-solaris2*) SunOS 4.x, a.k.a. Solaris 1.x (*-*-sunos4*) UnixWare 2.x (*-*-sysv4.2uw2*) UTS 4.x (*-*-uts4*) All ELF targets that use both the GNU C compiler (gcc) and GNU ld ! NOTE: Some HP-UX sed programs are horribly broken, and cannot handle ! libtool's requirements, so users may report unusual problems. There ! is no workaround except to install a working sed (such as GNU sed) on ! these systems. ! ! NOTE: The vendor-distributed NCR MP-RAS cc programs emits copyright ! on standard error that confuse tests on size of conftest.err. The ! workaround is to specify CC when run configure with CC='cc -Hnocopyr'. + NOTE: Due to a bug in autoconf cc isn't supported on Motorola System V 4. + You can only use gcc. This bug will hopefully be fixed in autoconf 2.14. + + NOTE: Any earlier DG/UX system with ELF executables, such as R3.10 or + R4.10, is also likely to work, but hasn't been explicitly tested. + Libtool's home page is: ! http://www.gnu.org/software/libtool/libtool.html See the file NEWS for a description of recent changes to libtool. *************** *** 47,52 **** If you have any suggestions or bug reports, or you wish to port libtool to a new platform, please send electronic mail to the libtool ! mailing list . Don't forget to mention the ! version of libtool that you are currently using (by typing `ltconfig ! --version'). --- 61,66 ---- If you have any suggestions or bug reports, or you wish to port libtool to a new platform, please send electronic mail to the libtool ! mailing list or bug reports to . ! Don't forget to mention the version of libtool that you are currently ! using (by typing `ltconfig --version'). Index: libtool/README-alpha diff -c libtool/README-alpha:1.1.1.12 libtool/README-alpha:1.5.2.2 *** libtool/README-alpha:1.1.1.12 Thu Mar 5 17:22:50 1998 --- libtool/README-alpha Thu Apr 29 12:48:23 1999 *************** *** 1,69 **** ! This is an alpha testing release of GNU Libtool. ! Please do not send any bug reports or questions about it to public ! forums (such as GNU newsgroups), send them directly to the libtool ! mailing list . ! ! ! global_symbol_pipe ! ****************** ! ! CALL FOR HELP: In order to implement dlopening even on archictectures ! that don't have shared libraries, I am collecting `NM' and ! `global_symbol_pipe' values for every known operating system. ! ! If ltconfig on your system says that it found the command to parse NM ! output, then you don't need to look any further: ! ! checking command to parse /usr/bin/nm output... yes ! ! Otherwise, I would very much appreciate hearing about the combination ! of `NM' and `global_symbol_pipe' that ltconfig needs to use in order ! to pass this test. ! ! `NM' is set by ltconfig to be an nm program that gives BSD-compatible ! symbol output, such as: ! ! $ nm assert-perr.o ! U _IO_stderr_ ! 00000000 T __assert_perror_fail ! U __assert_program_name ! U abort ! U fflush ! U fprintf ! U strerror ! ! If your OS's nm cannot produce output like this, that's still okay, ! but, for simplicity, I prefer using this kind of output. ! ! Then, global_symbol_pipe is a command that takes all exported symbols, ! including undefined ones, and produces a two-column list of them. The ! contents of the first column are the raw symbol name, and the second ! column contains the name needed to access the symbols from a C ! program. ! ! So, on most OSes, this will be a command like: ! ! $ nm assert-perr.o | \ ! sed -e '/^.* [BCDEGRSTU] \([_A-Za-z][_A-Za-z0-9]*\)$/!d' ! -e 's/^.* [BCDEGRSTU] \([_A-Za-z][_A-Za-z0-9]*\)$/\1 \1/' ! _IO_stderr_ _IO_stderr_ ! __assert_perror_fail __assert_perror_fail ! __assert_program_name __assert_program_name ! abort abort ! fflush fflush ! fprintf fprintf ! strerror strerror ! ! On some OSes, the C symbols will need to strip a leading underscore: ! ! $ nm assert-perr.o | \ ! sed -e '/^.* [BCDEGRSTU] _\([_A-Za-z][_A-Za-z0-9]*\)$/!d' ! -e 's/^.* [BCDEGRSTU] _\([_A-Za-z][_A-Za-z0-9]*\)$/_\1 \1/' ! __IO_stderr_ _IO_stderr_ ! ___assert_perror_fail __assert_perror_fail ! ___assert_program_name __assert_program_name ! _abort abort ! _fflush fflush ! _fprintf fprintf ! _strerror strerror --- 1,76 ---- ! This is an alpha testing release of GNU Libtool. To get the latest ! CVS version of this package, do: ! cvs -d :pserver:anoncvs@anoncvs.gnu.org:/gd/gnu/anoncvsroot login ! [Hit return when prompted for the password] ! cvs -d :pserver:anoncvs@anoncvs.gnu.org:/gd/gnu/anoncvsroot checkout libtool ! cd libtool ! ./bootstrap ! ! The `bootstrap' script sets up the source directory for you to hack. To ! use it, you need a recent (maybe yet to be released) version of both ! Autoconf and Automake. ! ! If you have any suggestions or bug reports, or you wish to port ! libtool to a new platform, please send electronic mail to the libtool ! mailing list or bug reports to . ! Don't forget to mention the version of libtool that you are currently ! using (by typing `ltconfig --version'). ! ! ================================================================ ! = Administrivia ! ! * If you incorporate a change from somebody on the net: ! If it is a large change, you must make sure they have signed the ! appropriate paperwork, and be sure to add their name and email ! address to THANKS ! ! * If a change fixes a test, mention the test in the ChangeLog entry. ! ! * If somebody reports a new bug, mention his name in the ChangeLog entry ! and in the test case you write. ! ! * The correct response to most actual bugs is to write a new test case ! which demonstrates the bug. Then fix the bug, re-run the test suite, ! and check everything in. ! ! * Some files in the libtool package are not owned by libtool. These ! files should never be edited here. These files are COPYING, INSTALL, ! config.guess, config.sub, install-sh, mdate-sh, mkinstalldirs, ! texinfo.tex. ! ! * Changes other than bug fixes must be mentioned in NEWS ! ! ================================================================ ! = Test suite ! ! * Use "make check" liberally, on as many platforms as you can. Use as ! many compilers and linkers you can. ! ! ! ================================================================ ! = Release procedure ! ! * Fetch new versions of the files that are maintained by the FSF. ! The most important ones are available for anonymous CVS in the ! `common' directory, sibling of the libtool CVS tree: ! cvs -d :pserver:anoncvs@anoncvs.gnu.org:/gd/gnu/anoncvsroot checkout common ! ! * Update NEWS. ! ! * Update the version number in configure.in. ! (The idea is that every other alpha number will be a net release. ! The repository will always have its own "odd" number so we can easily ! distinguish net and repo versions.) ! ! * Configure, build, and install. ! ! * Commit ! ! * Run `make cvs-dist' ! ! * Put new release on ftp site and send announcement. ! (If not an alpha, announcement must also go to FSF.) ! ! * Update version number in configure.in to next alpha number. ! Commit. Index: libtool/THANKS diff -c libtool/THANKS:1.1.1.12 libtool/THANKS:1.26.2.1 *** libtool/THANKS:1.1.1.12 Thu Feb 12 06:45:15 1998 --- libtool/THANKS Sat Mar 27 17:51:36 1999 *************** *** 2,28 **** these people: Everybody who was kind enough to spend time testing libtool, use it in ! their packages and report bugs. The following people made especially gracious contributions of their time and energy in helping to track down bugs, port to new systems, and generally assist in the libtool maintainership process: Akim Demaille ! Alexandre Oliva Bruno Haible Carl D. Roth ! Charles S. Kerr H.J. Lu Ian Lance Taylor - Joel Cannon Joel N. Weber II ! Karl Berry Kenneth Albanowski Mark Kettenis ! Mimi Burbank ! Oliver Guntermann ! Thomas Esser Tom Tromey Ulrich Drepper ! Volker Kuhlmann --- 2,37 ---- these people: Everybody who was kind enough to spend time testing libtool, use it in ! their packages and report bugs, who are too numerous to mention here. ! Many people who have kindly submitted bug reports and small patches ! are credited for their contributions in the ChangeLogs. The following people made especially gracious contributions of their time and energy in helping to track down bugs, port to new systems, and generally assist in the libtool maintainership process: Akim Demaille ! Andrey Slepuhin Bruno Haible Carl D. Roth ! Chris P. Ross ! DJ Delorie ! Edouard G. Parmelan ! Eric Estievenart ! Erez Zadok H.J. Lu Ian Lance Taylor Joel N. Weber II ! Joseph Beckenbach III Kenneth Albanowski + Kurt D. Zeilenga + Manfred Weichel + Marc J. Fraioli Mark Kettenis ! Sebastian Wilhelmi ! Stephan Kulow ! Steven M. Schultz ! Todd Vierling Tom Tromey Ulrich Drepper ! Xavier Pianet Index: libtool/TODO diff -c libtool/TODO:1.1.1.43 libtool/TODO:1.21.2.5 *** libtool/TODO:1.1.1.43 Fri Mar 20 08:58:42 1998 --- libtool/TODO Thu Apr 29 11:58:40 1999 *************** *** 1,30 **** ! For next public release: ! ************************ ! * Remove references to `ltmain.sh' in generated files, because it's ! name really is an internal implementation detail. ! * Inter-library dependencies should be fully tracked by libtool. ! Reminded by Alexandre Oliva. This requires looking up installed ! libtool libraries for transparent support. ! * Get rid of the sections that try to change behaviour for GNU ld. We ! really should make our shared library support just depend on the ! compiler type. - * Alexandre Oliva suggests that we hardcode paths into libraries, as - well as binaries: `... -Wl,-soname -Wl,/tmp/libtest.so.0 ...'. - - * Tom Lane adds that HP-UX's linker, at least (I've also found this on - AIX 4), distinguishes between global function and global variable - references. This means that we cannot declare every symbol as `extern - char'. Find a workaround. - - * Maybe show other maintainers my nasty ~/bin/libtool trick. - In the future: ************** * If not cross-compiling, have the static flag test run the resulting binary to make sure everything works. --- 1,57 ---- ! In the near future: ! ******************** ! * check whether the version of libtool.m4 is compatible ! with ltconfig/ltmain.sh ! * Inter-library dependencies should be fully tracked by libtool and ! need to work for ltlibraries too. This requires looking up installed ! libtool libraries for transparent support. Support for this feature ! is under development, and is expected to be available in libtool 1.4. ! ! * We could have an option to hardcode paths into libraries, as well as ! binaries: `... -Wl,-soname -Wl,/tmp/libtest.so.0 ...'. This is not ! possible on all platforms, and is in part obviated by the ability of ! linking libtool libraries specified with -lname, but it might still ! be desirable. ! * Lists of exported symbols should be stored in the pseudo library ! so that the size of lt_preloaded_symbols can be reduced. In the future: ************** + * Godmar Back writes: + libltdl uses such stdio functions as fopen, fgets, feof, fclose, and others. + These functions are not async-signal-safe. While this does not make + libltdl unusable, it restricts its usefulness and puts an + unnecessary burden on the user. + + As a remedy, I'd recommend to replace those functions with functions + that POSIX says are async-signal-safe, such as open, read, close. + This will require you to handle interrupted system calls and implement + fgets, but the former isn't hard and there's plenty of implementations + out from which you can steal the latter. + + I believe relying on async-signal-safe functions to the greatest extent + possible would greatly improve libltdl's ability to be embedded in and + used by other systems. + + * Fix */demo on win32. + This may require resolving some of the items below. + + * Figure out how to use data items in dlls with win32. + The difficult part is compiling each object which will be linked with an + import lib differently than if it will be linked with a static lib. This will + almost definitely require that automake pass some hints about linkage in to + each object compilation line. + + * Resolve the name clash between import libs and static libs on win32. + Probably the best way to do this is to create lib$name-dll.a for the import + library, and continue to use lib$name.a for the static lib. libtool + --mode=link can then favour -dll.a over .a if there is a choice. No point in + doing this until we can export data items (above). + * If not cross-compiling, have the static flag test run the resulting binary to make sure everything works. *************** *** 42,47 **** --- 69,83 ---- Jean Daniel Fekete Thomas Hiller + * We need some mechanism to allow users to pass flags to the linker + and/or to the compiler, when creating libtool archives. We could + recognize linker flags such as `-Wl,flag' and `-Xlinker flag' in + libtool's command line, and passing them down to the linker, if "$wl" + is `-Wl,', or stripping the `-Wl,' part if we're calling `ld' + directly. We could also introduce `-Wc,flag' and `-Xcompiler flag' to + allow unrecognized flags to be passed to the compiler, after stripping + by libtool. + * Another form of convenience library, suggested by Alexandre Oliva, is to have undocumented utility libraries, where only the shared version is installed. *************** *** 50,60 **** symbols to be included in a libtool archive. This would require some sort of -whole-archive option, as well. ! * Somehow we need to make sure that static libraries never appear in ! $deplibs. This, will probably require that libtool discover exactly ! which files would be linked from which directories when somebody says ! `-lsomething'. This adds a lot of complexity, but I see no other way ! around it. * Need to finalize the documentation, and give a specification of `.la' files so that people can depend on their format. This also --- 86,104 ---- symbols to be included in a libtool archive. This would require some sort of -whole-archive option, as well. ! * Currently, convenience libraries (.al) are built from .lo objects, ! except when --disable-shared. When we can build both shared and ! static libraries, we should probably create a .al out of .lo objects ! and also a .a out of .o objects. The .al would only be used to ! create shared libraries, whereas the .a would be used for creating ! static libraries and programs. ! ! * Try to find a work-around for -[all-]static and libltdl on platforms ! that will fail to find dlopening functions in this case, such as AIX ! 4.3.2.0. Maybe creating an alternate libltdl that provides only for ! dlpreopening, or creating an additional static library to provide ! dummy implementations of the functions that can't be linked ! statically. This could hardly be made completely transparent, though. * Need to finalize the documentation, and give a specification of `.la' files so that people can depend on their format. This also *************** *** 62,67 **** --- 106,114 ---- archives. This would be a good thing to put before the maintainance notes. + * Filenames containing shell meta-characters are not properly handled + by libtool. Compiling a file named "a;b.c", for example, fails. + Things to think about: ********************** *************** *** 75,82 **** * Maybe implement full support for other orthogonal library types (libhello_g, libhello_p, 64 vs 32-bit ABI's, etc). Make these types configurable. - - * Add support for windoze DLL's, and maybe other jumptable libs. - Check out Lesstif and Tcl configuration again (maybe they would be - interested in libtool by now?). The Cygnus win32 project may also be - of value, though it still seems pretty rudimentary right now. --- 122,124 ---- Index: libtool/bootstrap diff -c /dev/null libtool/bootstrap:1.1.2.1 *** /dev/null Thu Apr 29 16:11:00 1999 --- libtool/bootstrap Thu Mar 25 10:04:01 1999 *************** *** 0 **** --- 1,29 ---- + #! /bin/sh + + # helps bootstrapping libtool, when checked out from CVS + # requires GNU autoconf and GNU automake + # this is not meant to go into the distributions + + rm -f acinclude.m4 + ln -s libtool.m4 acinclude.m4 + # fake the libtool scripts + touch ltconfig + touch ltmain.sh + touch libtoolize + aclocal + automake --gnits --add-missing + autoconf + + for sub in demo libltdl mdemo cdemo; do + cd $sub + rm -f acinclude.m4 + cp ../libtool.m4 acinclude.m4 + aclocal + test "$sub" = libltdl && autoheader + automake --gnits --add-missing + autoconf + cd .. + done + rm -f ltconfig ltmain.sh libtoolize + + exit 0 Index: libtool/commit diff -c /dev/null libtool/commit:1.13 *** /dev/null Thu Apr 29 16:11:00 1999 --- libtool/commit Wed Jan 27 15:50:02 1999 *************** *** 0 **** --- 1,233 ---- + #! /bin/sh + + # commit version 0.9.2 + + # Copyright (C) 1999, Free Software Foundation + + # This script is Free Software, and it can be copied, distributed and + # modified as defined in the GNU General Public License. A copy of + # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html + + # Originally by Gary V. Vaughan + # Heavily modified by Alexandre Oliva + + # This scripts eases checking in changes to CVS-maintained projects + # with ChangeLog files. It will check that there have been no + # conflicting commits in the CVS repository and print which files it + # is going to commit to stderr. A list of files to compare and to + # check in can be given in the command line. If it is not given, all + # files in the current directory (and below, unless `-l' is given) are + # considered for check in. + + # The commit message will be extracted from the differences between + # the local ChangeLog and the one in the repository (unless a message + # was specified with `-m' or `-F'). An empty message is not accepted + # (but a blank line is). If the message is acceptable, it will be + # presented for verification (and possible edition) using the $PAGER + # environment variable (or `more', if it is not set, or `cat', if the + # `-f' switch is given). If $PAGER exits successfully, the modified + # files (at that moment) are checked in, unless `-n' was specified, in + # which case nothing is checked in. + + # usage: commit [-v] [-h] [-f] [-l] [-n] [-q] [-z N] + # [-m msg|-F msg_file] [--] [file|dir ...] + + # -f --fast don't check (unless *followed* by -n), and just + # --force display commit message instead of running $PAGER + # -l --local don't descend into subdirectories + # -m msg --message=msg set commit message + # --msg=msg same as -m + # -F file --file=file read commit message from file + # -n --dry-run don't commit anything + # -q --quiet run cvs in quiet mode + # -zN --compress=N set compression level (0-9, 0=none, 9=max) + # -v --version print version information + # -h,-? --help print short or long help message + + name=commit + cvsopt= + updateopt= + commitopt= + dry_run=false + commit=: + update=: + log_file="${TMPDIR-/tmp}/commitlog.$$" + + rm -f "$log_file" + trap 'rm -f "$log_file"; exit 1' 1 2 15 + + # this just eases exit handling + main_repeat=":" + while $main_repeat; do + + repeat="test $# -gt 0" + while $repeat; do + case "$1" in + -f|--force|--fast) + update=false + PAGER=cat + shift + ;; + -l|--local) + updateopt="$updateopt -l" + commitopt="$commitopt -l" + shift + ;; + -m|--message|--msg) + if test $# = 1; then + echo "$name: missing argument for $1" >&2 + break + fi + if test -f "$log_file"; then + echo "$name: you can have at most one of -m and -F" >&2 + break + fi + shift + echo "$1" > "$log_file" + shift + ;; + -F|--file) + if test -f "$log_file"; then + echo "$name: you can have at most one of -m and -F" >&2 + break + fi + if test $# = 1; then + echo "$name: missing argument for $1" >&2 + break + fi + shift + if cat < "$1" > "$log_file"; then :; else + break + fi + shift + ;; + -n|--dry-run) + commit=false + update=true + shift + ;; + -q|--quiet) + cvsopt="$cvsopt -q" + shift + ;; + -z|--compress) + if test $# = 1; then + echo "$name: missing argument for $1" >&2 + break + fi + case "$2" in + [0-9]) :;; + *) echo "$name: invalid argument for $1" >&2 + break + ;; + esac + cvsopt="$cvsopt -z$2" + shift + shift + ;; + + -m*|-F*|-z*) + opt=`echo "$1" | sed '1s/^\(..\).*$/\1/;q'` + arg=`echo "$1" | sed '1s/^-[a-zA-Z0-9]//'` + shift + set -- "$opt" "$arg" ${1+"$@"} + ;; + --message=*|--msg=*|--file=*|--compress=*) + opt=`echo "$1" | sed '1s/^\(--[^=]*\)=.*/\1/;q'` + arg=`echo "$1" | sed '1s/^--[^=]*=//'` + shift + set -- "$opt" "$arg" ${1+"$@"} + ;; + + -v|--version) + sed '/^# '$name' version /,/^# Heavily modified by/ { s/^# //; p; }; d' < $0 + exit 0 + ;; + -\?|-h) + sed '/^# usage:/,/# -h/ { s/^# //; p; }; d' < $0 && + echo + echo "run \`$name --help | more' for full usage" + exit 0 + ;; + --help) + sed '/^# '$name' version /,/^[^#]/ { /^[^#]/ d; s/^# //; p; }; d' < $0 + exit 0 + ;; + --) + shift + repeat=false + ;; + -*) + echo "$name: invalid flag $1" >&2 + break + ;; + *) + repeat=false + ;; + esac + done + # might have used break 2 within the previous loop, but so what + $repeat && break + + $update && \ + if echo "$name: checking for conflicts..." >&2 + (cvs $cvsopt -q -n update $updateopt ${1+"$@"} 2>/dev/null \ + | while read line; do + echo "$line" + echo "$line" >&3 + done | grep '^C') 3>&1 >/dev/null; then + echo "$name: some conflicts were found, aborting..." >&2 + break + fi + + if test ! -f "$log_file"; then + echo "$name: checking commit message..." >&2 + cvs $cvsopt diff -u ChangeLog \ + | while read line; do + case "$line" in + "--- ChangeLog"*) :;; + "-"*) + echo "$name: *** Warning: the following line in ChangeLog diff is suspicious:" >&2 + echo "$line" | sed 's/^.//' >&2;; + "+ "*) + echo "$name: *** Warning: lines should start with tabs, not spaces; ignoring line:" >&2 + echo "$line" | sed 's/^.//' >&2;; + "+") echo;; + "+ "*) echo "$line";; + esac + done \ + | sed -e 's,\+ ,,' -e '/./p' -e '/./d' -e '1d' -e '$d' > "$log_file" \ + || break + # The sed script above removes "+TAB" from the beginning of a line, then + # deletes the first and/or the last line, when they happen to be empty + fi + + if grep '[^ ]' < "$log_file" > /dev/null; then :; else + echo "$name: empty commit message, aborting" >&2 + break + fi + + if grep '^$' < "$log_file" > /dev/null; then + echo "$name: *** Warning: blank lines should not appear within a commit messages." >&2 + echo "$name: *** They should be used to separate distinct commits." >&2 + fi + + ${PAGER-more} "$log_file" || break + + sleep 1 # give the user some time for a ^C + + # Do not check for empty $log_file again, even though the user might have + # zeroed it out. If s/he did, it was probably intentional. + + if $commit; then + cvs $cvsopt commit $commitopt -F $log_file ${1+"$@"} || break + fi + + main_repeat=false + done + + rm -f "$log_file" + + # if main_repeat was not set to `false', we failed + $main_repeat && exit 1 + exit 0 Index: libtool/config.guess diff -c /dev/null libtool/config.guess:1.3.2.1 *** /dev/null Thu Apr 29 16:11:00 1999 --- libtool/config.guess Thu Apr 29 12:43:48 1999 *************** *** 0 **** --- 1,1034 ---- + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. + # + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + # Written by Per Bothner . + # The master version of this file is at the FSF in /home/gd/gnu/lib. + # Please send patches to the Autoconf mailing list . + # + # This script attempts to guess a canonical system name similar to + # config.sub. If it succeeds, it prints the system name on stdout, and + # exits with 0. Otherwise, it exits with 1. + # + # The plan is that this can be called by configure scripts if you + # don't specify an explicit system type (host/target name). + # + # Only a few systems have been added to this list; please add others + # (but try to keep the structure clean). + # + + # Use $HOST_CC if defined. $CC may point to a cross-compiler + if test x"$CC_FOR_BUILD" = x; then + if test x"$HOST_CC" != x; then + CC_FOR_BUILD="$HOST_CC" + else + if test x"$CC" != x; then + CC_FOR_BUILD="$CC" + else + CC_FOR_BUILD=cc + fi + fi + fi + + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi@noc.rutgers.edu 8/24/94.) + if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH + fi + + UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown + UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown + UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown + UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + + dummy=dummy-$$ + trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 + + # Note: order is significant - the case branches are not exclusive. + + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .globl main + .ent main + main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main + EOF + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + arm32:NetBSD:*:*) + echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + SR2?01:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + macppc:NetBSD:*:*) + echo powerpc-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c + #ifdef __cplusplus + int main (int argc, char *argv[]) { + #else + int main (argc, argv) int argc; char *argv[]; { + #endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } + EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ + -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } + EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[136790] | 9000/892 ) + sed 's/^ //' << EOF >$dummy.c + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } + EOF + ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + rm -f $dummy.c $dummy + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } + EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE*:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*T3E:*:*:*) + echo t3e-cray-unicosmk${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | i?86:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + if test -x /usr/bin/objformat; then + if test "elf" = "`/usr/bin/objformat`"; then + echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` + exit 0 + fi + fi + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:Linux:*:*) + # uname on the ARM produces all sorts of strangeness, and we need to + # filter it out. + case "$UNAME_MACHINE" in + armv*) UNAME_MACHINE=$UNAME_MACHINE ;; + arm* | sa110*) UNAME_MACHINE="arm" ;; + esac + + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_help_string=`cd /; ld --help 2>&1` + ld_supported_emulations=`echo $ld_help_string \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; + i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; + sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + sed 's/^ //' <$dummy.s + .globl main + .ent main + main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main + EOF + LIBC="" + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 + elif test "${UNAME_MACHINE}" = "mips" ; then + cat >$dummy.c </dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + else + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" + test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c < + #ifdef __cplusplus + int main (int argc, char *argv[]) { + #else + int main (argc, argv) int argc; char *argv[]; { + #endif + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); + # else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + # endif + # else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + # endif + #else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); + #endif + return 0; + } + EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + fi ;; + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions + # are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i?86:UnixWare:*:*) + if /bin/uname -X 2>/dev/null >/dev/null ; then + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + fi + echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} + exit 0 ;; + pc:*:*:*) + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:*:6*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 + #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + + cat >$dummy.c < + # include + #endif + main () + { + #if defined (sony) + #if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); + #else + #include + printf ("m68k-sony-newsos%s\n", + #ifdef NEWSOS4 + "4" + #else + "" + #endif + ); exit (0); + #endif + #endif + + #if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); + #endif + + #if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); + #endif + + #if defined (NeXT) + #if !defined (__ARCHITECTURE__) + #define __ARCHITECTURE__ "m68k" + #endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); + #endif + + #if defined (MULTIMAX) || defined (n16) + #if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); + #else + #if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); + #else + printf ("ns32k-encore-bsd\n"); exit (0); + #endif + #endif + #endif + + #if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); + #endif + + #if defined (sequent) + #if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); + #endif + #if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); + #endif + #endif + + #if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + + #endif + + #if defined (vax) + #if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); + #else + printf ("vax-dec-ultrix\n"); exit (0); + #endif + #endif + + #if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); + #endif + + exit (1); + } + EOF + + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + + # Apollos put the system type in the environment. + + test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + + # Convex versions that predate uname can use getsysinfo(1) + + if [ -x /usr/convex/getsysinfo ] + then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac + fi + + #echo '(Unable to guess system type)' 1>&2 + + exit 1 Index: libtool/config.sub diff -c /dev/null libtool/config.sub:1.3.2.1 *** /dev/null Thu Apr 29 16:11:00 1999 --- libtool/config.sub Thu Apr 29 12:43:48 1999 *************** *** 0 **** --- 1,993 ---- + #! /bin/sh + # Configuration validation subroutine script, version 1.1. + # Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software + # can handle that machine. It does not imply ALL GNU software can. + # + # This file is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, + # Boston, MA 02111-1307, USA. + + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. + # Each package is responsible for reporting which valid configurations + # it does not support. The user should be able to distinguish + # a failure to support a valid configuration from a meaningless + # configuration. + + # The goal of this file is to map all the various variations of a given + # machine specification into a single specification in the form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM + # or in some cases, the newer four-part form: + # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + # It is wrong to echo any other type of specification. + + if [ x$1 = x ] + then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 + fi + + # First pass through any local machine types. + case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; + esac + + # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; + esac + + ### Let's recognize common machines as not being operating systems so + ### that things like config.sub decstation-3100 work. We also + ### recognize some manufacturers as not being operating systems, so we + ### can provide default operating systems below. + case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + esac + + # Decode aliases for certain CPU-COMPANY combinations. + case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w \ + | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ + | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp11 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | sparc | sparclet | sparclite | sparc64 | v850) + basic_machine=$basic_machine-unknown + ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[34567]86) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | xmp-* | ymp-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67] \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mipstx39-* | mipstx39el-* \ + | f301-* | armv*-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigaos | amigados) + basic_machine=m68k-cbm + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + os=-mpeix + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + os=-mpeix + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; + # I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netwinder) + basic_machine=armv4l-corel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | k6 | 6x86) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | nexen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | k6-* | 6x86-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + *mint | *MiNT) + basic_machine=m68k-atari + os=-mint + ;; + none) + basic_machine=none-none + os=-none + ;; + + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + esac + + # Here we canonicalize certain aliases for manufacturers. + case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; + esac + + # Decode manufacturer-specific aliases for certain operating systems. + + if [ x"$os" != x"" ] + then + case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \ + | -openstep* | -mpeix* | -oskit*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -*mint | -*MiNT) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; + esac + else + + # Here we handle the default operating systems that come with various machines. + # The value should be what the vendor currently ships out the door with their + # machine or put another way, the most popular os provided with the machine. + + # Note that if you're going to try to match "-MANUFACTURER" here (say, + # "-sun"), then you have to tell the case statement up towards the top + # that MANUFACTURER isn't an operating system. Otherwise, code above + # will signal an error saying that MANUFACTURER isn't an operating + # system, and we'll never get to this point. + + case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-corel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; + esac + fi + + # Here we handle the case where we know the os, and the CPU type, but not the + # manufacturer. We pick the logical manufacturer. + vendor=unknown + case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -*mint | -*MiNT) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; + esac + + echo $basic_machine$os Index: libtool/configure.in diff -c libtool/configure.in:1.1.1.40 libtool/configure.in:1.26.2.3 *** libtool/configure.in:1.1.1.40 Thu Nov 27 17:57:00 1997 --- libtool/configure.in Thu Apr 29 15:07:13 1999 *************** *** 1,15 **** dnl Process this file with autoconf to create configure. AC_INIT(ltmain.in) ! dnl This little magic works with my `maintainer-release' rule in the toplevel ! dnl `Makefile.am.' It uses PRCS, which is like CVS, except better... get ! dnl `prcs.README' from your nearest GNU mirror. ! dnl $Format: "AM_INIT_AUTOMAKE($Project$,$ProjectMajorVersion$)"$ ! AM_INIT_AUTOMAKE(libtool,1.2) ! pkgdatadir='${datadir}/libtool' ! AC_SUBST(pkgdatadir) aclocaldir='${datadir}/aclocal' AC_SUBST(aclocaldir) --- 1,31 ---- dnl Process this file with autoconf to create configure. + AC_INIT(ltmain.in) ! AM_INIT_AUTOMAKE(libtool, 1.3) ! # This is a sanity check so we can see which version is used in bug reports. ! # It is assumed that we only want to see the date extension for cvs libtool ! # versions (i.e. "odd" letters) and not actual alpha releases. ! case "$VERSION" in ! changequote(,) ! *[acegikmoqsuwy]) ! changequote([,]) ! TIMESTAMP=`${CONFIG_SHELL} ${srcdir}/mkstamp < ${srcdir}/ChangeLog` ! banner="Configuring $PACKAGE $VERSION$TIMESTAMP" ! dashes=`echo "$banner" | sed 's/./-/g'` ! ! # Display an obvious version banner ! echo ! echo $dashes ! echo "$banner" ! echo $dashes ! echo ! ;; ! esac ! pkgdatadir='${datadir}'"/${PACKAGE}" ! AC_SUBST(pkgdatadir) dnl automake does not need this, but libtoolize does aclocaldir='${datadir}/aclocal' AC_SUBST(aclocaldir) *************** *** 23,28 **** --- 39,80 ---- dnl For the `lineno' script (which puts line numbers into `ltconfig'). AC_PROG_AWK + dnl Check for dlopen support + AC_LIBTOOL_DLOPEN + AC_LIBTOOL_SETUP + AC_SUBST(DLLTOOL) + AC_SUBST(OBJDUMP) + AC_SUBST(AS) + + LIBTOOL_FLAGS="$libtool_flags" + AC_SUBST(LIBTOOL_FLAGS) + + AC_ARG_ENABLE(ltdl-install, + [ --disable-ltdl-install do not install libltdl]) + if test x"${enable_ltdl_install+set}" != xset; then + enable_ltdl_install=yes + ac_configure_args="$ac_configure_args --enable-ltdl-install" + fi + AC_CONFIG_SUBDIRS(libltdl) + + dnl all subdirectories that are configured on demand, but that must be + dnl included in the distribution + CONF_SUBDIRS="cdemo demo mdemo" + AC_SUBST(CONF_SUBDIRS) + + ACINCLUDE_M4_LIST="${srcdir}/acinclude.m4 ${srcdir}/libltdl/acinclude.m4 " + DIST_MAKEFILE_LIST= + for dir in $CONF_SUBDIRS; do + ACINCLUDE_M4_LIST="$ACINCLUDE_M4_LIST${srcdir}/$dir/acinclude.m4 " + DIST_MAKEFILE_LIST="$DIST_MAKEFILE_LIST$dir/Makefile " + done + AC_SUBST(ACINCLUDE_M4_LIST) + AC_SUBST(DIST_MAKEFILE_LIST) + + AC_OUTPUT_COMMANDS([ + test -f ${saved_top_srcdir}/ltconfig || ${MAKE-make} ${saved_top_srcdir}/ltconfig + test -f ${saved_top_srcdir}/ltmain.sh || ${MAKE-make} ${saved_top_srcdir}/ltmain.sh + ], [saved_top_srcdir=${srcdir}]) AC_OUTPUT([Makefile doc/Makefile tests/Makefile]) # Local Variables: Index: libtool/libtool.m4 diff -c libtool/libtool.m4:1.1.1.25 libtool/libtool.m4:1.35.2.16 *** libtool/libtool.m4:1.1.1.25 Mon Mar 9 06:34:02 1998 --- libtool/libtool.m4 Thu Apr 29 10:13:34 1999 *************** *** 1,6 **** ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ! ## Copyright (C) 1996-1998 Free Software Foundation, Inc. ! ## Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by --- 1,6 ---- ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ! ## Copyright (C) 1996-1999 Free Software Foundation, Inc. ! ## Originally by Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by *************** *** 21,48 **** ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. ! # serial 24 AM_PROG_LIBTOOL ! AC_DEFUN(AM_PROG_LIBTOOL, ! [AC_REQUIRE([AM_ENABLE_SHARED])dnl ! AC_REQUIRE([AM_ENABLE_STATIC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_PROG_CC])dnl ! AC_REQUIRE([AM_PROG_LD])dnl ! AC_REQUIRE([AM_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl dnl - # Always use our own libtool. - LIBTOOL='$(SHELL) $(top_builddir)/libtool' - AC_SUBST(LIBTOOL)dnl # Check for any special flags to pass to ltconfig. ! libtool_flags= test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" ! test "$silent" = yes && libtool_flags="$libtool_flags --silent" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" # Some flags need to be propagated to the compiler or linker for good # libtool support. --- 21,86 ---- ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. ! # serial 39 AC_PROG_LIBTOOL ! AC_DEFUN(AC_PROG_LIBTOOL, ! [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl ! ! # Save cache, so that ltconfig can load it ! AC_CACHE_SAVE ! ! # Actually configure libtool. ac_aux_dir is where install-sh is found. ! CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ ! LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ ! LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ ! DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ! ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ ! $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ ! || AC_MSG_ERROR([libtool configure failed]) ! ! # Reload cache, that may have been modified by ltconfig ! AC_CACHE_LOAD ! ! # This can be used to rebuild libtool when needed ! LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" ! ! # Always use our own libtool. ! LIBTOOL='$(SHELL) $(top_builddir)/libtool' ! AC_SUBST(LIBTOOL)dnl ! ! # Redirect the config.log output again, so that the ltconfig log is not ! # clobbered by the next message. ! exec 5>>./config.log ! ]) ! ! AC_DEFUN(AC_LIBTOOL_SETUP, ! [AC_PREREQ(2.13)dnl ! AC_REQUIRE([AC_ENABLE_SHARED])dnl ! AC_REQUIRE([AC_ENABLE_STATIC])dnl ! AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_PROG_CC])dnl ! AC_REQUIRE([AC_PROG_LD])dnl ! AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl dnl # Check for any special flags to pass to ltconfig. ! libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" ! test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" + ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], + [libtool_flags="$libtool_flags --enable-dlopen"]) + ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], + [libtool_flags="$libtool_flags --enable-win32-dll"]) + AC_ARG_ENABLE(libtool-lock, + [ --disable-libtool-lock avoid locking (might break parallel builds)]) + test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" + test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. *************** *** 68,97 **** *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. CFLAGS="$CFLAGS -belf" ;; - esac ! # Actually configure libtool. ac_aux_dir is where install-sh is found. ! CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ ! LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ ! ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ ! $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ ! || AC_MSG_ERROR([libtool configure failed]) ]) ! # AM_ENABLE_SHARED - implement the --enable-shared flag ! # Usage: AM_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. ! AC_DEFUN(AM_ENABLE_SHARED, ! [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl ! << --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT] changequote([, ])dnl - [ --enable-shared=PKGS only build shared libraries if the current package - appears as an element in the PKGS list], [p=${PACKAGE-default} case "$enableval" in yes) enable_shared=yes ;; --- 106,147 ---- *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi ;; ! ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ! [*-*-cygwin* | *-*-mingw*) ! AC_CHECK_TOOL(DLLTOOL, dlltool, false) ! AC_CHECK_TOOL(AS, as, false) ! AC_CHECK_TOOL(OBJDUMP, objdump, false) ! ;; ! ]) ! esac ]) + + # AC_LIBTOOL_DLOPEN - enable checks for dlopen support + AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) + + # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's + AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) ! # AC_ENABLE_SHARED - implement the --enable-shared flag ! # Usage: AC_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. ! AC_DEFUN(AC_ENABLE_SHARED, [dnl ! define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl ! << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_shared=yes ;; *************** *** 108,136 **** IFS="$ac_save_ifs" ;; esac], ! enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl ]) ! # AM_DISABLE_SHARED - set the default shared flag to --disable-shared ! AC_DEFUN(AM_DISABLE_SHARED, ! [AM_ENABLE_SHARED(no)]) ! # AM_DISABLE_STATIC - set the default static flag to --disable-static ! AC_DEFUN(AM_DISABLE_STATIC, ! [AM_ENABLE_STATIC(no)]) ! ! # AM_ENABLE_STATIC - implement the --enable-static flag ! # Usage: AM_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. ! AC_DEFUN(AM_ENABLE_STATIC, ! [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl ! << --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT] changequote([, ])dnl - [ --enable-static=PKGS only build shared libraries if the current package - appears as an element in the PKGS list], [p=${PACKAGE-default} case "$enableval" in yes) enable_static=yes ;; --- 158,180 ---- IFS="$ac_save_ifs" ;; esac], ! enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ]) ! # AC_DISABLE_SHARED - set the default shared flag to --disable-shared ! AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_SHARED(no)]) ! # AC_ENABLE_STATIC - implement the --enable-static flag ! # Usage: AC_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. ! AC_DEFUN(AC_ENABLE_STATIC, [dnl ! define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl ! << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_static=yes ;; *************** *** 147,172 **** IFS="$ac_save_ifs" ;; esac], ! enable_static=AM_ENABLE_STATIC_DEFAULT)dnl ]) ! # AM_PROG_LD - find the path to the GNU or non-GNU linker ! AC_DEFUN(AM_PROG_LD, [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) ! AC_REQUIRE([AC_PROG_CC]) ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in ! # Accept absolute paths. ! /* | [A-Za-z]:\\*) ! test -z "$LD" && LD="$ac_prog" ! ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld --- 191,263 ---- IFS="$ac_save_ifs" ;; esac], ! enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ]) + # AC_DISABLE_STATIC - set the default static flag to --disable-static + AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_ENABLE_STATIC(no)]) + ! # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag ! # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] ! # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to ! # `yes'. ! AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl ! define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl ! AC_ARG_ENABLE(fast-install, ! changequote(<<, >>)dnl ! << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], ! changequote([, ])dnl ! [p=${PACKAGE-default} ! case "$enableval" in ! yes) enable_fast_install=yes ;; ! no) enable_fast_install=no ;; ! *) ! enable_fast_install=no ! # Look at the argument we got. We use all the common list separators. ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," ! for pkg in $enableval; do ! if test "X$pkg" = "X$p"; then ! enable_fast_install=yes ! fi ! done ! IFS="$ac_save_ifs" ! ;; ! esac], ! enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl ! ]) ! ! # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install ! AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! AC_ENABLE_FAST_INSTALL(no)]) ! ! # AC_PROG_LD - find the path to the GNU or non-GNU linker ! AC_DEFUN(AC_PROG_LD, [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) ! AC_REQUIRE([AC_PROG_CC])dnl ! AC_REQUIRE([AC_CANONICAL_HOST])dnl ! AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in ! # Accept absolute paths. ! changequote(,)dnl ! [\\/]* | [A-Za-z]:[\\/]*) ! re_direlt='/[^/][^/]*/\.\./' ! changequote([,])dnl ! # Canonicalize the path of ld ! ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` ! while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ! ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` ! done ! test -z "$LD" && LD="$ac_prog" ! ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld *************** *** 183,192 **** fi AC_CACHE_VAL(ac_cv_path_LD, [if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. ! if test -f "$ac_dir/$ac_prog"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. --- 274,283 ---- fi AC_CACHE_VAL(ac_cv_path_LD, [if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. ! if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. *************** *** 194,200 **** if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else ! test "$with_gnu_ld" != yes && break fi fi done --- 285,291 ---- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else ! test "$with_gnu_ld" != yes && break fi fi done *************** *** 210,219 **** fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_SUBST(LD) ! AM_PROG_LD_GNU ]) ! AC_DEFUN(AM_PROG_LD_GNU, [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then --- 301,310 ---- fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_SUBST(LD) ! AC_PROG_LD_GNU ]) ! AC_DEFUN(AC_PROG_LD_GNU, [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then *************** *** 223,259 **** fi]) ]) ! # AM_PROG_NM - find the path to a BSD-compatible name lister ! AC_DEFUN(AM_PROG_NM, [AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(ac_cv_path_NM, ! [case "$NM" in ! /* | [A-Za-z]:\\*) ! ac_cv_path_NM="$NM" # Let the user override the test with a path. ! ;; ! *) ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ! for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/nm; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! ac_cv_path_NM="$ac_dir/nm -B" elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! ac_cv_path_NM="$ac_dir/nm -p" else ! ac_cv_path_NM="$ac_dir/nm" fi - break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm ! ;; ! esac]) NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) AC_SUBST(NM) ]) --- 314,424 ---- fi]) ]) ! # AC_PROG_NM - find the path to a BSD-compatible name lister ! AC_DEFUN(AC_PROG_NM, [AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(ac_cv_path_NM, ! [if test -n "$NM"; then ! # Let the user override the test. ! ac_cv_path_NM="$NM" ! else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" ! for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! ac_cv_path_NM="$ac_dir/nm -B" ! break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! ac_cv_path_NM="$ac_dir/nm -p" ! break else ! ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but ! continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm ! fi]) NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) AC_SUBST(NM) ]) + + # AC_CHECK_LIBM - check for math library + AC_DEFUN(AC_CHECK_LIBM, + [AC_REQUIRE([AC_CANONICAL_HOST])dnl + LIBM= + case "$host" in + *-*-beos* | *-*-cygwin*) + # These system don't have libm + ;; + *-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") + ;; + *) + AC_CHECK_LIB(m, main, LIBM="-lm") + ;; + esac + ]) + + # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for + # the libltdl convenience library, adds --enable-ltdl-convenience to + # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor + # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed + # to be `${top_builddir}/libltdl'. Make sure you start DIR with + # '${top_builddir}/' (note the single quotes!) if your package is not + # flat, and, if you're not using automake, define top_builddir as + # appropriate in the Makefiles. + AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case "$enable_ltdl_convenience" in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la + ]) + + # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for + # the libltdl installable library, and adds --enable-ltdl-install to + # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor + # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed + # to be `${top_builddir}/libltdl'. Make sure you start DIR with + # '${top_builddir}/' (note the single quotes!) if your package is not + # flat, and, if you're not using automake, define top_builddir as + # appropriate in the Makefiles. + # In the future, this macro may have to be called after AC_PROG_LIBTOOL. + AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, main, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + fi + ]) + + dnl old names + AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl + AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl + AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl + AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl + AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl + AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl + AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl + + dnl This is just to quiet aclocal about the macro not being used + if(a,b,[AC_DISABLE_FAST_INSTALL])dnl Index: libtool/libtool.prj diff -c libtool/libtool.prj:1.1.1.88 libtool/libtool.prj:removed *** libtool/libtool.prj:1.1.1.88 Fri Oct 16 23:22:58 1998 --- libtool/libtool.prj Thu Apr 29 16:11:00 1999 *************** *** 1,94 **** - ;; -*- Lisp -*- - (Created-By-Prcs-Version 1 2 1) - (Project-Description "GNU Libtool library support script") - (Project-Version libtool 1.2 1) - (Parent-Version libtool 1.0j 4) - (Version-Log "More little bug fixes.") - (New-Version-Log "") - (Checkin-Time "Fri, 20 Mar 1998 00:58:42 -0700") - (Checkin-Login gord) - (Populate-Ignore ("~$" "Makefile$" "Makefile\\.in$" "aclocal\\.m4$" - "configure$" "config\\.status$" "config\\.cache$" - "\\.log" "\\.dvi$" "\\.ps$" - "\\.cps$" "\\.pg$" "\\.ky$" "\\.tp$" "\\.vr$" - "\\.fn$" "\\.cp$" "\\.toc$" "\\.aux$" - "\\.o$" "\\.a$" "\\.lo$" "\\.la$" "\\.tar\\.gz$" - "\\.deps/" "\\.libs/" "_libs/" - "stamp-" "^doc/libtool\\.info" "^doc/version\\.texi$" - "^demo/hc-" "^demo/hell$" "^demo/hell\\.debug$" - "^demo/helldl$" - "libtool$" "^libtoolize$" "^ltconfig$" "^ltmain\\.sh$" - "^lt\\.diff$")) - (Project-Keywords) - (Files - ;; Administrivia. - (AUTHORS (libtool/21_AUTHORS 1.1 664)) - (ChangeLog (libtool/20_ChangeLog 1.4.1.75 664)) - (NEWS (libtool/19_NEWS 1.4.1.55 664)) - (PACKAGES (libtool/42_PACKAGES 1.8 664)) - (README (libtool/17_README 1.22 664)) - (README-alpha (libtool/16_README-alp 1.12 664)) - (TODO (libtool/14_TODO 1.3.1.39 664)) - (THANKS (libtool/15_THANKS 1.12 664)) - (libtool.spec (libtool/46_libtool.sp 1.7 664)) - - ;; Top directory. - (Makefile.am (libtool/18_Makefile.a 1.38 664)) - (configure.in (libtool/13_configure. 1.4.1.29 664)) - (ltmain.in (libtool/2_ltmain.sh. 1.4.1.60 664)) - (ltconfig.in (libtool/3_ltconfig.i 1.4.1.61 775)) - (libtoolize.in (libtool/4_libtoolize 1.6 664)) - - ;; aclocal additions. - (libtool.m4 (libtool/12_libtool.m4 1.25 664)) - - ;; Documentation subdirectory. - (doc/Makefile.am (libtool/1_Makefile.a 1.6 664)) - (doc/PLATFORMS (libtool/41_platforms. 1.16 664)) - (doc/libtool.texi (libtool/0_libtool.te 1.3.1.36 664)) - - ;; Demonstration subdirectory. - (demo/README (libtool/28_README 1.3 664)) - (demo/Makefile.am (libtool/11_Makefile.a 1.24 664)) - (demo/configure.in (libtool/10_configure. 1.5 664)) - (demo/run.test (libtool/27_run.test 1.1 775)) - (demo/dlmain.c (libtool/48_dlmain.c 1.5 664)) - (demo/main.c (libtool/5_main.c 1.5 664)) - (demo/hello.c (libtool/7_hello.c 1.4 664)) - (demo/foo.h (libtool/8_foo.h 1.7 664)) - (demo/foo.c (libtool/9_foo.c 1.2.1.5 664)) - - ;; Tests subdirectory. - (tests/ChangeLog (libtool/26_ChangeLog 1.27 664)) - (tests/Makefile.am (libtool/25_Makefile.a 1.16 664)) - (tests/defs (libtool/24_defs 1.6 664)) - - ;; The actual tests. - (tests/demo-unst.test (libtool/32_demo-unst. 1.3 775)) - (tests/demo-make.test (libtool/33_demo-make. 1.3 775)) - (tests/demo-inst.test (libtool/34_demo-inst. 1.9 775)) - (tests/demo-exec.test (libtool/35_demo-exec. 1.8 775)) - (tests/demo-conf.test (libtool/36_demo-conf. 1.6 775)) - (tests/hardcode.test (libtool/39_hardcode.t 1.9 775)) - (tests/link.test (libtool/30_link.test 1.3 775)) - (tests/link-2.test (libtool/31_link-2.tes 1.3 775)) - (tests/nomode.test (libtool/47_nomode.tes 1.1 775)) - (tests/quote.test (libtool/50_quote.test 1.4 775)) - (tests/sh.test (libtool/45_if.test 1.3 775)) - (tests/suffix.test (libtool/38_suffix.tes 1.5 775)) - - ;; Installed automatically. - (config.sub (/local/share/automake/config.sub) :symlink) - (config.guess (/local/share/automake/config.guess) :symlink) - (COPYING (/local/share/automake/COPYING) :symlink) - (INSTALL (/local/share/automake/INSTALL) :symlink) - (missing (/local/share/automake/missing) :symlink) - (mkinstalldirs (/local/share/automake/mkinstalldirs) :symlink) - (install-sh (/local/share/automake/install-sh) :symlink) - (acinclude.m4 (libtool.m4) :symlink) - (demo/acinclude.m4 (../libtool.m4) :symlink) - (doc/texinfo.tex (/local/share/automake/texinfo.tex) :symlink) - (doc/mdate-sh (/local/share/automake/mdate-sh) :symlink) - ) - (Merge-Parents) - (New-Merge-Parents) --- 0 ---- Index: libtool/libtool.spec diff -c libtool/libtool.spec:1.1.1.12 libtool/libtool.spec:removed *** libtool/libtool.spec:1.1.1.12 Mon Mar 9 06:34:02 1998 --- libtool/libtool.spec Thu Apr 29 16:11:00 1999 *************** *** 1,48 **** - Summary: GNU Libtool - shared library support for source packages - # $Format: "Name: $Project$"$ - Name: libtool - # $Format: "Version: $ProjectMajorVersion$"$ - Version: 1.2 - Release: 1 - Copyright: GPL - Group: Development/Build - Source: ftp://prep.ai.mit.edu/pub/gnu/libtool-%{PACKAGE_VERSION}.tar.gz - URL: http://www.profitpress.com/libtool/ - BuildRoot: /tmp/libtool.root - - %description - This is GNU Libtool, a generic library support script. Libtool hides - the complexity of using shared libraries behind a consistent, portable - interface. - - To use libtool, add the new generic library building commands to your - Makefile, Makefile.in, or Makefile.am. See the documentation for - details. - - %prep - %setup - - %build - ./configure --prefix=/usr - make - - %install - rm -rf $RPM_BUILD_ROOT - make install prefix=$RPM_BUILD_ROOT/usr - gzip -9nf $RPM_BUILD_ROOT/usr/info/libtool.info* - - %clean - rm -rf $RPM_BUILD_ROOT - - %files - %attr(0644, root, root) %doc AUTHORS COPYING ChangeLog NEWS README - %attr(0644, root, root) %doc THANKS TODO doc/PLATFORMS - - %attr(0755, root, root) /usr/bin/libtool - %attr(0755, root, root) /usr/bin/libtoolize - %attr(0644, root, root) /usr/info/libtool.info* - %attr(0755, root, root) /usr/share/libtool/config.guess - %attr(0755, root, root) /usr/share/libtool/config.sub - %attr(0755, root, root) /usr/share/libtool/ltconfig - %attr(0644, root, root) /usr/share/libtool/ltmain.sh - %attr(0644, root, root) /usr/share/aclocal/libtool.m4 --- 0 ---- Index: libtool/libtoolize.in diff -c libtool/libtoolize.in:1.1.1.6 libtool/libtoolize.in:1.7.2.2 *** libtool/libtoolize.in:1.1.1.6 Tue Apr 1 21:02:08 1997 --- libtool/libtoolize.in Tue Mar 30 21:25:27 1999 *************** *** 1,8 **** #! /bin/sh # libtoolize - Prepare a package to use libtool. # @configure_input@ ! # Copyright (C) 1996, 1997 Free Software Foundation, Inc. ! # Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by --- 1,8 ---- #! /bin/sh # libtoolize - Prepare a package to use libtool. # @configure_input@ ! # Copyright (C) 1996-1999 Free Software Foundation, Inc. ! # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by *************** *** 44,54 **** --- 44,57 ---- rm="rm -f" ln_s="ln -s" cp="cp -f" + mkdir="mkdir" # Global variables. automake= copy= force= + ltdl= + ltdl_tar= status=0 for arg *************** *** 62,70 **** --- 65,76 ---- --automake work silently, and assume that Automake is in use -c, --copy copy files rather than symlinking them + --debug enable verbose shell tracing -n, --dry-run print commands rather than running them -f, --force replace existing files --help display this message and exit + --ltdl install libltdl in a subdirectory + --ltdl-tar install the libltdl tarball --version print version information and exit You must \`cd' to the top directory of your package before you run *************** *** 86,97 **** --- 92,109 ---- ln_s= ;; + --debug) + echo "$progname: enabling shell trace mode" + set -x + ;; + -n | --dry-run) if test "$dry_run" != yes; then dry_run=yes rm="echo $rm" test -n "$ln_s" && ln_s="echo $ln_s" cp="echo $cp" + mkdir="echo mkdir" fi ;; *************** *** 99,104 **** --- 111,124 ---- force=yes ;; + --ltdl) + ltdl=yes + ;; + + --ltdl-tar) + ltdl_tar=yes + ;; + -*) echo "$progname: unrecognized option \`$arg'" 1>&2 echo "$help" 1>&2 *************** *** 113,130 **** esac done ! if test -f configure.in; then : ! else echo "$progname: \`configure.in' does not exist" 1>&2 echo "$help" 1>&2 exit 1 fi files=`cd $pkgdatadir && ls` if test -z "$files"; then echo "$progname: cannot list files in \`$pkgdatadir'" 1>&2 exit 1 fi auxdir=. auxdirline=`egrep '^AC_CONFIG_AUX_DIR' configure.in 2>/dev/null` --- 133,151 ---- esac done ! if test ! -f configure.in; then echo "$progname: \`configure.in' does not exist" 1>&2 echo "$help" 1>&2 exit 1 fi + files=`cd $pkgdatadir && ls` if test -z "$files"; then echo "$progname: cannot list files in \`$pkgdatadir'" 1>&2 exit 1 fi + files='config.guess config.sub ltconfig ltmain.sh' auxdir=. auxdirline=`egrep '^AC_CONFIG_AUX_DIR' configure.in 2>/dev/null` *************** *** 162,168 **** fi if test -z "$automake"; then ! if egrep '^AM_PROG_LIBTOOL' configure.in >/dev/null 2>&1; then : else echo "Remember to add \`AM_PROG_LIBTOOL' to \`configure.in'." fi --- 183,189 ---- fi if test -z "$automake"; then ! if egrep '^A[MC]_PROG_LIBTOOL' configure.in >/dev/null 2>&1; then : else echo "Remember to add \`AM_PROG_LIBTOOL' to \`configure.in'." fi *************** *** 177,196 **** updatemsg="add the contents of \`$libtool_m4' to \`aclocal.m4'" fi ! if egrep '^AC_DEFUN\(AM_PROG_LIBTOOL' aclocal.m4 >/dev/null 2>&1; then # Check the version number on libtool.m4 and the one used in aclocal.m4. ! instserial=`grep '^# serial ' $libtool_m4 | grep 'AM_PROG_LIBTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` if test -z "$instserial"; then echo "$progname: warning: no serial number on \`$libtool_m4'" 1>&2 else # If the local macro has no serial number, we assume it's ancient. ! localserial=`grep '^# serial ' aclocal.m4 | grep 'AM_PROG_LIBTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` test -z "$localserial" && localserial=0 if test "$localserial" -lt "$instserial"; then ! echo "You should $updatemsg." elif test "$localserial" -gt "$instserial"; then echo "$progname: \`$libtool_m4' is serial $instserial, less than $localserial in \`aclocal.m4'" 1>&2 if test -z "$force"; then --- 198,217 ---- updatemsg="add the contents of \`$libtool_m4' to \`aclocal.m4'" fi ! if egrep '^AC_DEFUN\(A[MC]_PROG_LIBTOOL' aclocal.m4 >/dev/null 2>&1; then # Check the version number on libtool.m4 and the one used in aclocal.m4. ! instserial=`grep '^# serial ' $libtool_m4 | grep 'A[MC]_PROG_LIBTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` if test -z "$instserial"; then echo "$progname: warning: no serial number on \`$libtool_m4'" 1>&2 else # If the local macro has no serial number, we assume it's ancient. ! localserial=`grep '^# serial ' aclocal.m4 | grep 'A[MC]_PROG_LIBTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` test -z "$localserial" && localserial=0 if test "$localserial" -lt "$instserial"; then ! echo "You should $updatemsg." elif test "$localserial" -gt "$instserial"; then echo "$progname: \`$libtool_m4' is serial $instserial, less than $localserial in \`aclocal.m4'" 1>&2 if test -z "$force"; then *************** *** 205,217 **** fi fi ! # Change to the auxillary directory. if test "$auxdir" != .; then test -z "$automake" && echo "Putting files in AC_CONFIG_AUX_DIR, \`$auxdir'." cd $auxdir || exit 1 fi - for file in $files; do if test -f "$file" && test -z "$force"; then --- 226,289 ---- fi fi + + if test "x$ltdl" = xyes; then + test -d libltdl || $mkdir libltdl + ltdlfiles=`cd $pkgdatadir && ls libltdl/*` + else + ltdlfiles= + fi + + for file in $ltdlfiles; do + if test -f "$file" && test -z "$force"; then + test -z "$automake" && echo "$progname: \`$file' exists: use \`--force' to overwrite" 1>&2 + continue + fi + + $rm $file + if test -n "$ln_s" && $ln_s $pkgdatadir/$file $file; then : + elif $cp $pkgdatadir/$file $file; then : + else + echo "$progname: cannot copy \`$pkgdatadir/$file' to \`$file'" 1>&2 + status=1 + fi + done + + if test "x$ltdl_tar" = x"yes"; then + if test "x$dry_run" = x"yes"; then + echo "tar -cf - libltdl | gzip --best > libltdl.tar.gz" + elif test -f libltdl.tar.gz && test -z "$force"; then + test -z "$automake" && echo "$progname: \`libltdl.tar.gz' exists: use \`--force' to overwrite" 1>&2 + else + test -d libltdl && ${rm}r libltdl + $mkdir libltdl + ltdlfiles=`cd $pkgdatadir && ls libltdl/*` + for file in $ltdlfiles; do + if $cp $pkgdatadir/$file $file; then : + else + echo "$progname: cannot copy \`$pkgdatadir/$file' to \`$file'" 1>&2 + status=1 + break + fi + done + for file in $files; do + if $cp $pkgdatadir/$file libltdl/$file; then : + else + echo "$progname: cannot copy \`$pkgdatadir/$file' to \`libltdl/$file'" 1>&2 + status=1 + break + fi + done + tar -cf - libltdl | gzip --best > libltdl.tar.gz + ${rm}r libltdl + fi + fi ! # Change to the auxiliary directory. if test "$auxdir" != .; then test -z "$automake" && echo "Putting files in AC_CONFIG_AUX_DIR, \`$auxdir'." cd $auxdir || exit 1 fi for file in $files; do if test -f "$file" && test -z "$force"; then Index: libtool/lineno diff -c /dev/null libtool/lineno:1.2 *** /dev/null Thu Apr 29 16:11:00 1999 --- libtool/lineno Thu Dec 31 12:25:14 1998 *************** *** 0 **** --- 1,98 ---- + #! /bin/sh + # lineno - Replace instances of @LINENO@ with the file's current line number + # Gordon Matzigkeit , 1997 + + # Copyright (C) 1992-1999 Free Software Foundation, Inc. + + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2, or (at your option) + # any later version. + + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + # 02111-1307, USA. + + AWK=${AWK-awk} + delete=no + files= + progname=`echo "$0" | sed 's%^.*/%%'` + + for arg + do + case "$arg" in + --delete) delete=yes ;; + + --help) + cat <&2 + exit 1 + ;; + + *) files="$files $arg" ;; + esac + done + + if test -z "$files"; then + echo "$progname: no FILES specified" 1>&2 + exit 1 + fi + + # Manage a temp file. + tmpfile="$progname.$$" + trap "rm -f $tmpfile; exit 1" 1 2 15 + + status=0 + for file in $files; do + if test -f "$file"; then : + else + status=1 + echo "$progname: \`$file' is not a file" 1>&2 + fi + + # Skip empty files. + test -s "$file" || continue + + # Transliterated from a section in autoconf (Autoconf 2.12). + $AWK ' + /@LINENO@/ { printf "%d:", NR } + { print } + ' $file | sed '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' > $tmpfile + + if test -s "$tmpfile"; then + cp $tmpfile $file && continue + fi + + if test "$delete" = yes; then + echo "$progname: deleting \`$file'" 1>&2 + rm -f $file + fi + done + + rm -f $tmpfile + exit $status Index: libtool/ltconfig.in diff -c libtool/ltconfig.in:1.1.1.66 libtool/ltconfig.in:1.125.2.49 *** libtool/ltconfig.in:1.1.1.66 Fri Mar 20 08:58:42 1998 --- libtool/ltconfig.in Thu Apr 29 10:03:40 1999 *************** *** 1,8 **** #! /bin/sh # ltconfig - Create a system-specific libtool. ! # Copyright (C) 1996-1998 Free Software Foundation, Inc. ! # Gordon Matzigkeit , 1996 # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by --- 1,8 ---- #! /bin/sh # ltconfig - Create a system-specific libtool. ! # Copyright (C) 1996-1999 Free Software Foundation, Inc. ! # Originally by Gordon Matzigkeit , 1996 # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by *************** *** 25,54 **** # A lot of this script is taken from autoconf-2.10. # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi ! echo=echo ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : ! else ! # The Solaris and AIX default echo program unquotes backslashes. ! # This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' ! # So, we emulate echo with printf '%s\n' ! echo="printf %s\\n" ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : ! else ! # Oops. We have no working printf. Try to find a not-so-buggy echo. ! echo=echo ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" ! for dir in $PATH /usr/ucb; do ! if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then ! echo="$dir/echo" ! break fi ! done ! IFS="$save_ifs" fi fi --- 25,153 ---- # A lot of this script is taken from autoconf-2.10. + # Check that we are running under the correct shell. + SHELL=${CONFIG_SHELL-/bin/sh} + echo=echo + if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : + elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : + else + # Restart under the correct shell. + exec "$SHELL" "$0" --no-reexec ${1+"$@"} + fi + + if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null`} + case X$UNAME in + *-DOS) PATH_SEPARATOR=';' ;; + *) PATH_SEPARATOR=':' ;; + esac + fi + # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi ! if test "X${echo_test_string+set}" != "Xset"; then ! # find a string as large as possible, as long as the shell can cope with it ! for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do ! # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... ! if (echo_test_string="`eval $cmd`") 2>/dev/null && ! echo_test_string="`eval $cmd`" && ! (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then ! break ! fi ! done ! fi ! ! if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || ! test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then ! # The Solaris, AIX, and Digital Unix default echo programs unquote ! # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' ! # ! # So, first we look for a working echo in the user's PATH. ! ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" ! for dir in $PATH /usr/ucb; do ! if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && ! test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && ! test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then ! echo="$dir/echo" ! break ! fi ! done ! IFS="$save_ifs" ! ! if test "X$echo" = Xecho; then ! # We didn't find a better echo, so look for alternatives. ! if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && ! test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then ! # This shell has a builtin print -r that does the trick. ! echo='print -r' ! elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && ! test "X$CONFIG_SHELL" != X/bin/ksh; then ! # If we have ksh, try running ltconfig again with it. ! ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" ! export ORIGINAL_CONFIG_SHELL ! CONFIG_SHELL=/bin/ksh ! export CONFIG_SHELL ! exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} ! else ! # Try using printf. ! echo='printf "%s\n"' ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ! test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then ! # Cool, printf works ! : ! elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && ! test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then ! CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" ! export CONFIG_SHELL ! SHELL="$CONFIG_SHELL" ! export SHELL ! echo="$CONFIG_SHELL $0 --fallback-echo" ! elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && ! test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then ! echo="$CONFIG_SHELL $0 --fallback-echo" ! else ! # maybe with a smaller string... ! prev=: ! ! for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do ! if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then ! break ! fi ! prev="$cmd" ! done ! ! if test "$prev" != 'sed 50q "$0"'; then ! echo_test_string=`eval $prev` ! export echo_test_string ! exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} ! else ! # Oops. We lost completely, so just stick with echo. ! echo=echo ! fi fi ! fi fi fi *************** *** 60,65 **** --- 159,168 ---- # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + # Sed substitution to delay expansion of an escaped shell variable in a + # double_quote_subst'ed string. + delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + # The name of this program. progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` *************** *** 67,72 **** --- 170,176 ---- PROGRAM=ltconfig PACKAGE=@PACKAGE@ VERSION=@VERSION@ + TIMESTAMP="@TIMESTAMP@" ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' rm="rm -f" *************** *** 74,83 **** --- 178,191 ---- help="Try \`$progname --help' for more information." # Global variables: + default_ofile=libtool can_build_shared=yes enable_shared=yes # All known linkers require a `.a' archive for static linking. enable_static=yes + enable_fast_install=yes + enable_dlopen=unknown + enable_win32_dll=no ltmain= silent= srcdir= *************** *** 85,102 **** --- 193,221 ---- ac_config_sub= host= nonopt= + ofile="$default_ofile" verify_host=yes with_gcc=no with_gnu_ld=no + need_locks=yes + ac_ext=c + objext=o + libext=a + cache_file= old_AR="$AR" old_CC="$CC" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" + old_LDFLAGS="$LDFLAGS" old_LD="$LD" old_LN_S="$LN_S" + old_LIBS="$LIBS" old_NM="$NM" old_RANLIB="$RANLIB" + old_DLLTOOL="$DLLTOOL" + old_OBJDUMP="$OBJDUMP" + old_AS="$AS" # Parse the command line options. args= *************** *** 117,161 **** case "$option" in --help) cat <&2 echo "$help" 1>&2 --- 236,305 ---- case "$option" in --help) cat <&2 echo "$help" 1>&2 *************** *** 185,192 **** exit 1 fi ! if test -f "$ltmain"; then : ! else echo "$progname: \`$ltmain' does not exist" 1>&2 echo "$help" 1>&2 exit 1 --- 329,335 ---- exit 1 fi ! if test ! -f "$ltmain"; then echo "$progname: \`$ltmain' does not exist" 1>&2 echo "$help" 1>&2 exit 1 *************** *** 227,232 **** --- 370,380 ---- if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LANG+set}" = set; then LANG=C; export LANG; fi + if test -n "$cache_file" && test -r "$cache_file"; then + echo "loading cache $cache_file within ltconfig" + . $cache_file + fi + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then *************** *** 240,247 **** fi if test -z "$srcdir"; then ! # Assume the source directory is the same one as the path to ltmain.sh. ! srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=. fi --- 388,395 ---- fi if test -z "$srcdir"; then ! # Assume the source directory is the same one as the path to LTMAIN. ! srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=. fi *************** *** 264,270 **** ac_config_sub=$ac_aux_dir/config.sub # Make sure we can run config.sub. ! if $ac_config_sub sun4 >/dev/null 2>&1; then : else echo "$progname: cannot run $ac_config_sub" 1>&2 echo "$help" 1>&2 --- 412,418 ---- ac_config_sub=$ac_aux_dir/config.sub # Make sure we can run config.sub. ! if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : else echo "$progname: cannot run $ac_config_sub" 1>&2 echo "$help" 1>&2 *************** *** 276,289 **** host_alias=$host case "$host_alias" in "") ! if host_alias=`$ac_config_guess`; then : else echo "$progname: cannot guess host type; you must specify one" 1>&2 echo "$help" 1>&2 exit 1 fi ;; esac ! host=`$ac_config_sub $host_alias` echo "$ac_t$host" 1>&6 # Make sure the host verified. --- 424,437 ---- host_alias=$host case "$host_alias" in "") ! if host_alias=`$SHELL $ac_config_guess`; then : else echo "$progname: cannot guess host type; you must specify one" 1>&2 echo "$help" 1>&2 exit 1 fi ;; esac ! host=`$SHELL $ac_config_sub $host_alias` echo "$ac_t$host" 1>&6 # Make sure the host verified. *************** *** 327,341 **** # Set a sane default for `AR'. test -z "$AR" && AR=ar # If RANLIB is not set, then run the test. if test "${RANLIB+set}" != "set"; then result=no echo $ac_n "checking for ranlib... $ac_c" 1>&6 ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" for dir in $PATH; do test -z "$dir" && dir=. ! if test -f $dir/ranlib; then RANLIB="ranlib" result="ranlib" break --- 475,492 ---- # Set a sane default for `AR'. test -z "$AR" && AR=ar + # Set a sane default for `OBJDUMP'. + test -z "$OBJDUMP" && OBJDUMP=objdump + # If RANLIB is not set, then run the test. if test "${RANLIB+set}" != "set"; then result=no echo $ac_n "checking for ranlib... $ac_c" 1>&6 ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH; do test -z "$dir" && dir=. ! if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then RANLIB="ranlib" result="ranlib" break *************** *** 347,366 **** fi if test -n "$RANLIB"; then ! old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" ! old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds" fi # Check to see if we are using GCC. if test "$with_gcc" != yes || test -z "$CC"; then # If CC is not set, then try to find GCC or a usable CC. if test -z "$CC"; then echo $ac_n "checking for gcc... $ac_c" 1>&6 ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" for dir in $PATH; do - IFS="$save_ifs" test -z "$dir" && dir=. ! if test -f $dir/gcc; then CC="gcc" break fi --- 498,521 ---- fi if test -n "$RANLIB"; then ! old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" ! old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" fi + # Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. + test -z "$DLLTOOL" && DLLTOOL=dlltool + test -z "$OBJDUMP" && OBJDUMP=objdump + test -z "$AS" && AS=as + # Check to see if we are using GCC. if test "$with_gcc" != yes || test -z "$CC"; then # If CC is not set, then try to find GCC or a usable CC. if test -z "$CC"; then echo $ac_n "checking for gcc... $ac_c" 1>&6 ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH; do test -z "$dir" && dir=. ! if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then CC="gcc" break fi *************** *** 377,387 **** # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". if test -z "$CC"; then echo $ac_n "checking for cc... $ac_c" 1>&6 ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" cc_rejected=no for dir in $PATH; do test -z "$dir" && dir=. ! if test -f $dir/cc; then if test "$dir/cc" = "/usr/ucb/cc"; then cc_rejected=yes continue --- 532,542 ---- # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". if test -z "$CC"; then echo $ac_n "checking for cc... $ac_c" 1>&6 ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" cc_rejected=no for dir in $PATH; do test -z "$dir" && dir=. ! if test -f $dir/cc || test -f $dir/cc$ac_exeext; then if test "$dir/cc" = "/usr/ucb/cc"; then cc_rejected=yes continue *************** *** 440,445 **** --- 595,622 ---- set dummy $CC compiler="$2" + echo $ac_n "checking for object suffix... $ac_c" 1>&6 + $rm conftest* + echo 'int i = 1;' > conftest.c + echo "$progname:@LINENO@: checking for object suffix" >& 5 + if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done + else + cat conftest.err 1>&5 + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + $rm conftest* + echo "$ac_t$objext" 1>&6 + echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 pic_flag= special_shlib_compile_flags= *************** *** 450,462 **** if test "$with_gcc" = yes; then wl='-Wl,' link_static_flag='-static' - no_builtin_flag=' -fno-builtin' case "$host_os" in ! aix3* | aix4* | irix5* | irix6* | osf3* | osf4*) # PIC is the default for these OSes. ;; ! os2*) # We can build DLLs from non-PIC. ;; amigaos*) --- 627,647 ---- if test "$with_gcc" = yes; then wl='-Wl,' link_static_flag='-static' case "$host_os" in ! beos* | irix5* | irix6* | osf3* | osf4*) # PIC is the default for these OSes. ;; ! aix*) ! # Below there is a dirty hack to force normal static linking with -ldl ! # The problem is because libdl dynamically linked with both libc and ! # libC (AIX C++ library), which obviously doesn't included in libraries ! # list by gcc. This cause undefined symbols with -static flags. ! # This hack allows C programs to be linked with "-static -ldl", but ! # we not sure about C++ programs. ! link_static_flag="$link_static_flag ${wl}-lC" ! ;; ! cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; amigaos*) *************** *** 477,483 **** link_static_flag='-bnso -bI:/lib/syscalls.exp' ;; ! hpux9* | hpux10*) # Is there a better link_static_flag that works with the bundled CC? wl='-Wl,' link_static_flag="${wl}-a ${wl}archive" --- 662,668 ---- link_static_flag='-bnso -bI:/lib/syscalls.exp' ;; ! hpux9* | hpux10* | hpux11*) # Is there a better link_static_flag that works with the bundled CC? wl='-Wl,' link_static_flag="${wl}-a ${wl}archive" *************** *** 490,496 **** # PIC (with -KPIC) is the default. ;; ! os2*) # We can build DLLs from non-PIC. ;; --- 675,681 ---- # PIC (with -KPIC) is the default. ;; ! cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; *************** *** 506,512 **** special_shlib_compile_flags='-belf' ;; ! solaris2*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' --- 691,697 ---- special_shlib_compile_flags='-belf' ;; ! solaris*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' *************** *** 518,524 **** wl='-Qoption ld ' ;; ! sysv4.2uw2*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' --- 703,709 ---- wl='-Qoption ld ' ;; ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' *************** *** 541,565 **** # Check to make sure the pic_flag actually works. echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 $rm conftest* ! echo > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pic_flag -DPIC" echo "$progname:@LINENO@: checking if $compiler PIC flag $pic_flag works" >&5 ! if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then # Append any warnings to the config.log. cat conftest.err 1>&5 ! ! # On HP-UX, both CC and GCC only warn that PIC is supported... then they ! # create non-PIC objects. So, if there were any warnings, we assume that ! # PIC is not supported. ! if test -s conftest.err; then ! echo "$ac_t"no 1>&6 ! can_build_shared=no ! pic_flag= ! else echo "$ac_t"yes 1>&6 pic_flag=" $pic_flag" ! fi else # Append any errors to the config.log. cat conftest.err 1>&5 --- 726,758 ---- # Check to make sure the pic_flag actually works. echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 $rm conftest* ! echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pic_flag -DPIC" echo "$progname:@LINENO@: checking if $compiler PIC flag $pic_flag works" >&5 ! if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then # Append any warnings to the config.log. cat conftest.err 1>&5 ! ! case "$host_os" in ! hpux9* | hpux10* | hpux11*) ! # On HP-UX, both CC and GCC only warn that PIC is supported... then they ! # create non-PIC objects. So, if there were any warnings, we assume that ! # PIC is not supported. ! if test -s conftest.err; then ! echo "$ac_t"no 1>&6 ! can_build_shared=no ! pic_flag= ! else ! echo "$ac_t"yes 1>&6 ! pic_flag=" $pic_flag" ! fi ! ;; ! *) echo "$ac_t"yes 1>&6 pic_flag=" $pic_flag" ! ;; ! esac else # Append any errors to the config.log. cat conftest.err 1>&5 *************** *** 573,578 **** --- 766,901 ---- echo "$ac_t"none 1>&6 fi + # Check to see if options -o and -c are simultaneously supported by compiler + echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + $rm conftest* + echo "int some_variable = 0;" > conftest.c + mkdir out + # According to Tom Tromey, Ian Lance Taylor reported there are C compilers + # that will create temporary files in the current directory regardless of + # the output directory. Thus, making CWD read-only will cause this test + # to fail, enabling locking or at least warning the user not to do parallel + # builds. + chmod -w . + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -o out/conftest2.o" + echo "$progname:@LINENO@: checking if $compiler supports -c -o file.o" >&5 + if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s out/conftest.err; then + echo "$ac_t"no 1>&6 + compiler_c_o=no + else + echo "$ac_t"yes 1>&6 + compiler_c_o=yes + fi + else + # Append any errors to the config.log. + cat out/conftest.err 1>&5 + compiler_c_o=no + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + chmod u+w . + $rm conftest* out/* + rmdir out + cd .. + rmdir conftest + $rm -r conftest 2>/dev/null + + if test x"$compiler_c_o" = x"yes"; then + # Check to see if we can write to a .lo + echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -c -o conftest.lo" + echo "$progname:@LINENO@: checking if $compiler supports -c -o file.lo" >&5 + if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + compiler_o_lo=no + else + echo "$ac_t"yes 1>&6 + compiler_o_lo=yes + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + compiler_o_lo=no + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* + else + compiler_o_lo=no + fi + + # Check to see if we can do hard links to lock some files if needed + hard_links="nottested" + if test "$compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$ac_t$hard_links" 1>&6 + $rm conftest* + if test "$hard_links" = no; then + echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 + need_locks=warn + fi + else + need_locks=no + fi + + if test "$with_gcc" = yes; then + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler + echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" + echo "$progname:@LINENO@: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + compiler_rtti_exceptions=no + else + echo "$ac_t"yes 1>&6 + compiler_rtti_exceptions=yes + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + compiler_rtti_exceptions=no + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* + + if test "$compiler_rtti_exceptions" = "yes"; then + no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' + else + no_builtin_flag=' -fno-builtin' + fi + + fi + # Check for any special shared library compilation flags. if test -n "$special_shlib_compile_flags"; then echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 *************** *** 601,609 **** if test -z "$LN_S"; then # Check to see if we can use ln -s, or we need hard links. echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 ! $rm conftestdata ! if ln -s X conftestdata 2>/dev/null; then ! $rm conftestdata LN_S="ln -s" else LN_S=ln --- 924,932 ---- if test -z "$LN_S"; then # Check to see if we can use ln -s, or we need hard links. echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 ! $rm conftest.dat ! if ln -s X conftest.dat 2>/dev/null; then ! $rm conftest.dat LN_S="ln -s" else LN_S=ln *************** *** 625,631 **** ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. ! /* | [A-Za-z]:\\*) test -z "$LD" && LD="$ac_prog" ;; "") --- 948,960 ---- ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. ! [\\/]* | [A-Za-z]:[\\/]*) ! re_direlt='/[^/][^/]*/\.\./' ! # Canonicalize the path of ld ! ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` ! while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ! ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` ! done test -z "$LD" && LD="$ac_prog" ;; "") *************** *** 646,655 **** fi if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. ! if test -f "$ac_dir/$ac_prog"; then LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. --- 975,984 ---- fi if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. ! if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. *************** *** 691,738 **** allow_undefined_flag= no_undefined_flag= archive_cmds= old_archive_from_new_cmds= export_dynamic_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= case "$host_os" in ! amigaos* | sunos4*) ! # On these operating systems, we should treat GNU ld like the system ld. ! gnu_ld_acts_native=yes ! ;; ! *) ! gnu_ld_acts_native=no ;; esac ld_shlibs=yes ! if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then # See if GNU ld supports shared libraries. ! if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then ! archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' ! runpath_var=LD_RUN_PATH ! ld_shlibs=yes ! else ld_shlibs=no ! fi if test "$ld_shlibs" = yes; then hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' fi else # PORTME fill in a description of your system's linker (not GNU ld) case "$host_os" in aix3*) allow_undefined_flag=unsupported ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes --- 1020,1186 ---- allow_undefined_flag= no_undefined_flag= + need_lib_prefix=unknown + need_version=unknown + # when you set need_version to no, make sure it does not cause -set_version + # flags to be left without arguments archive_cmds= + archive_expsym_cmds= old_archive_from_new_cmds= export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an egrep regular expression of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. case "$host_os" in ! cygwin* | mingw*) ! # FIXME: the MSVC++ port hasn't been tested in a loooong time ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! if test "$with_gcc" != yes; then ! with_gnu_ld=no ! fi ;; + esac ld_shlibs=yes ! if test "$with_gnu_ld" = yes; then ! # If archive_cmds runs LD, not CC, wlarc should be empty ! wlarc='${wl}' # See if GNU ld supports shared libraries. ! case "$host_os" in ! aix3* | aix4*) ! # On AIX, the GNU linker is very broken ld_shlibs=no ! cat <&2 ! ! *** Warning: the GNU linker, at least up to release 2.9.1, is reported ! *** to be unable to reliably create shared libraries on AIX. ! *** Therefore, libtool is disabling shared libraries support. If you ! *** really care for shared libraries, you may want to modify your PATH ! *** so that a non-GNU linker is found, and then restart. + EOF + ;; + + amigaos*) + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=yes + + # Extract the symbol export list from an `--export-all' def file, + # then regenerate the def file from the symbol export list, so that + # the compiled dll only exports the symbol export list. + export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~ + sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ + (cd $objdir && $CC -c $soname-ltdll.c)~ + $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~ + sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols' + + archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ + _lt_hint=1; + for symbol in `cat $export_symbols`; do + echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def; + _lt_hint=`expr 1 + \$_lt_hint`; + done~ + $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ + $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ + $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' + + old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' + ;; + + netbsd*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' + # can we support soname and/or expsyms with a.out? -oliva + fi + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = yes; then + runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi else # PORTME fill in a description of your system's linker (not GNU ld) case "$host_os" in aix3*) allow_undefined_flag=unsupported ! always_export_symbols=yes ! archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes *************** *** 744,821 **** ;; aix4*) ! allow_undefined_flag=unsupported ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname' ! hardcode_direct=yes ! hardcode_minus_L=yes ! ;; amigaos*) ! archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) ! archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes - hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) ! archive_cmds='$LD -Bshareable -o $lib$libobjs' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; ! # FreeBSD 3, at last, uses gcc -shared to do shared libraries. ! freebsd3*) ! archive_cmds='$CC -shared -o $lib$libobjs' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes - hardcode_minus_L=yes hardcode_shlibpath_var=no ;; ! hpux9*) ! archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib' ! hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ! hardcode_direct=yes ! hardcode_minus_L=yes ! export_dynamic_flag_spec='${wl}-E' ! ;; ! ! hpux10*) ! archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs' hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_direct=yes ! hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6*) ! archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ;; netbsd*) ! # Tested with NetBSD 1.2 ld ! archive_cmds='$LD -Bshareable -o $lib$libobjs' ! hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; openbsd*) ! archive_cmds='$LD -Bshareable -o $lib$libobjs' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no --- 1192,1323 ---- ;; aix4*) ! hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' ! hardcode_libdir_separator=':' ! if test "$with_gcc" = yes; then ! collect2name=`${CC} -print-prog-name=collect2` ! if test -f "$collect2name" && \ ! strings "$collect2name" | grep resolve_lib_name >/dev/null ! then ! # We have reworked collect2 ! hardcode_direct=yes ! else ! # We have old collect2 ! hardcode_direct=unsupported ! # It fails to find uninstalled libraries when the uninstalled ! # path is not listed in the libpath. Setting hardcode_minus_L ! # to unsupported forces relinking ! hardcode_minus_L=yes ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_libdir_separator= ! fi ! shared_flag='-shared' ! else ! shared_flag='${wl}-bM:SRE' ! hardcode_direct=yes ! fi ! allow_undefined_flag=' ${wl}-berok' ! archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' ! archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' ! case "$host_os" in aix4.[01]|aix4.[01].*) ! # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on ! always_export_symbols=yes ;; ! esac ! ;; amigaos*) ! archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no ;; + cygwin* | mingw*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs' + fix_srcfile_path='`cygpath -w $srcfile`' + ;; + + freebsd1*) + ld_shlibs=no + ;; + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) ! archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) ! archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; ! # FreeBSD 3 and greater uses gcc -shared to do shared libraries. ! freebsd*) ! archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; ! hpux9* | hpux10* | hpux11*) ! case "$host_os" in ! hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; ! *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; ! esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: hardcode_direct=yes ! hardcode_minus_L=yes # Not in the search PATH, but as the default ! # location of the library. export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6*) ! if test "$with_gcc" = yes; then ! archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' ! else ! archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' ! fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: ;; netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out ! else ! archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF ! fi ! hardcode_libdir_flag_spec='${wl}-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; openbsd*) ! archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no *************** *** 825,912 **** hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported ! archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def' old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' ;; osf3* | osf4*) ! allow_undefined_flag=' -expect_unresolved \*' ! archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; sco3.2v5*) ! archive_cmds='$LD -G -o $lib$libobjs' ! hardcode_direct=yes ;; ! solaris2*) no_undefined_flag=' -z text' ! archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no - - # Solaris 2 before 2.5 hardcodes -L paths. case "$host_os" in ! solaris2.[0-4]*) ! hardcode_minus_L=yes ! ;; esac ;; sunos4*) ! if test "$with_gcc" = yes; then ! archive_cmds='$CC -shared -o $lib$libobjs' ! else ! archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' ! fi ! ! if test "$with_gnu_ld" = yes; then ! export_dynamic_flag_spec='${wl}-export-dynamic' ! fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; uts4*) ! archive_cmds='$LD -G -h $soname -o $lib$libobjs' hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=no - hardcode_minus_L=no hardcode_shlibpath_var=no ;; *) ld_shlibs=no - can_build_shared=no ;; esac fi echo "$ac_t$ld_shlibs" 1>&6 if test -z "$NM"; then echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 case "$NM" in ! /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path. *) ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ! for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/nm; then ! # Check to see if the nm accepts a BSD-compat flag. ! # Adding the `sed 1q' prevents false positives on HP-UX, which says: ! # nm: unknown option "B" ignored ! if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! NM="$ac_dir/nm -B" ! elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! NM="$ac_dir/nm -p" else ! NM="$ac_dir/nm" fi - break fi done IFS="$ac_save_ifs" --- 1327,1434 ---- hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported ! archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' ;; osf3* | osf4*) ! if test "$with_gcc" = yes; then ! allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' ! archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' ! else ! allow_undefined_flag=' -expect_unresolved \*' ! archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' ! fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; sco3.2v5*) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' ! hardcode_shlibpath_var=no ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ;; ! solaris*) no_undefined_flag=' -z text' ! # $CC -shared without GNU ld will not create a library from C++ ! # object files and a static libstdc++, better avoid it by now ! archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' ! archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case "$host_os" in ! solaris2.[0-5] | solaris2.[0-5].*) ;; ! *) # Supported since Solaris 2.6 (maybe 2.5.1?) ! whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac ;; sunos4*) ! archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; + sysv4) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + uts4*) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_shlibpath_var=no ! ;; ! ! dgux*) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$ac_t$ld_shlibs" 1>&6 + test "$ld_shlibs" = no && can_build_shared=no if test -z "$NM"; then echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 case "$NM" in ! [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. *) ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" ! for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then ! # Check to see if the nm accepts a BSD-compat flag. ! # Adding the `sed 1q' prevents false positives on HP-UX, which says: ! # nm: unknown option "B" ignored ! if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! NM="$ac_dir/nm -B" ! break ! elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! NM="$ac_dir/nm -p" ! break else ! NM=${NM="$ac_dir/nm"} # keep the first match, but ! continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" *************** *** 923,962 **** # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. ! symcode='[BCDEGRSTU]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. ! symxfrm='\1 \1' # Define system-specific variables. case "$host_os" in aix*) ! symcode='[BCDTU]' ;; irix*) - # Cannot use undefined symbols on IRIX because inlined functions mess us up. symcode='[BCDEGRST]' ;; ! solaris2*) ! symcode='[BDTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then ! symcode='[ABCDGISTUW]' fi ! # Write the raw and C identifiers. ! global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'" ! # Check to see that the pipe works correctly. ! pipe_works=no ! $rm conftest* ! cat > conftest.c <&1 | egrep '(GNU|with BFD)' > /dev/null; then ! symcode='[ABCDGISTW]' fi ! # Try without a prefix undercore, then with it. ! for ac_symprfx in "" "_"; do ! # Write the raw and C identifiers. ! global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" ! ! # Check to see that the pipe works correctly. ! pipe_works=no ! $rm conftest* ! cat > conftest.c <&5 ! if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then ! # Now try to grab the symbols. ! nlist=conftest.nm ! if { echo "$progname:@LINENO@: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then ! ! # Try sorting and uniquifying the output. ! if sort "$nlist" | uniq > "$nlist"T; then ! mv -f "$nlist"T "$nlist" ! wcout=`wc "$nlist" 2>/dev/null` ! count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` ! (test "$count" -ge 0) 2>/dev/null || count=-1 ! else ! rm -f "$nlist"T ! count=-1 ! fi ! # Make sure that we snagged all the symbols we need. ! if egrep ' nm_test_var$' "$nlist" >/dev/null; then ! if egrep ' nm_test_func$' "$nlist" >/dev/null; then ! cat < conftest.c #ifdef __cplusplus extern "C" { #endif EOF ! # Now generate the symbol file. ! sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c ! cat <> conftest.c #if defined (__STDC__) && __STDC__ ! # define __ptr_t void * #else ! # define __ptr_t char * #endif - /* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ - int dld_preloaded_symbol_count = $count; - /* The mapping between symbol names and symbols. */ ! struct { ! char *name; ! __ptr_t address; } ! dld_preloaded_symbols[] = { EOF ! sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c ! cat <<\EOF >> conftest.c ! {0, (__ptr_t) 0} }; #ifdef __cplusplus } #endif EOF ! # Now try linking the two files. ! mv conftest.o conftestm.o ! save_LIBS="$LIBS" ! save_CFLAGS="$CFLAGS" ! LIBS='conftestm.o' ! CFLAGS="$CFLAGS$no_builtin_flag" ! if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ! pipe_works=yes ! else ! echo "$progname: failed program was:" >&5 ! cat conftest.c >&5 ! fi ! LIBS="$save_LIBS" else ! echo "cannot find nm_test_func in $nlist" >&5 fi else ! echo "cannot find nm_test_var in $nlist" >&5 fi else ! echo "cannot run $global_symbol_pipe" >&5 fi else ! echo "$progname: failed program was:" >&5 ! cat conftest.c >&5 fi - $rm conftest* ! # Do not use the global_symbol_pipe unless it works. ! echo "$ac_t$pipe_works" 1>&6 ! test "$pipe_works" = yes || global_symbol_pipe= # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 --- 1504,1603 ---- main(){nm_test_var='a';nm_test_func();return(0);} EOF ! echo "$progname:@LINENO@: checking if global_symbol_pipe works" >&5 ! if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then ! # Now try to grab the symbols. ! nlist=conftest.nm ! if { echo "$progname:@LINENO@: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then ! ! # Try sorting and uniquifying the output. ! if sort "$nlist" | uniq > "$nlist"T; then ! mv -f "$nlist"T "$nlist" ! else ! rm -f "$nlist"T ! fi ! # Make sure that we snagged all the symbols we need. ! if egrep ' nm_test_var$' "$nlist" >/dev/null; then ! if egrep ' nm_test_func$' "$nlist" >/dev/null; then ! cat < conftest.c #ifdef __cplusplus extern "C" { #endif EOF ! # Now generate the symbol file. ! eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' ! cat <> conftest.c #if defined (__STDC__) && __STDC__ ! # define lt_ptr_t void * #else ! # define lt_ptr_t char * ! # define const #endif /* The mapping between symbol names and symbols. */ ! const struct { ! const char *name; ! lt_ptr_t address; } ! lt_preloaded_symbols[] = { EOF ! sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c ! cat <<\EOF >> conftest.c ! {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF ! # Now try linking the two files. ! mv conftest.$objext conftstm.$objext ! save_LIBS="$LIBS" ! save_CFLAGS="$CFLAGS" ! LIBS="conftstm.$objext" ! CFLAGS="$CFLAGS$no_builtin_flag" ! if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ! pipe_works=yes ! else ! echo "$progname: failed program was:" >&5 ! cat conftest.c >&5 ! fi ! LIBS="$save_LIBS" ! else ! echo "cannot find nm_test_func in $nlist" >&5 ! fi else ! echo "cannot find nm_test_var in $nlist" >&5 fi else ! echo "cannot run $global_symbol_pipe" >&5 fi + else + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + $rm conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break else ! global_symbol_pipe= fi + done + if test "$pipe_works" = yes; then + echo "${ac_t}ok" 1>&6 else ! echo "${ac_t}failed" 1>&6 fi ! if test -z "$global_symbol_pipe"; then ! global_symbol_to_cdecl= ! fi # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 *************** *** 1063,1097 **** test -n "$runpath_var"; then # We can hardcode non-existant directories. ! if test "$hardcode_direct" != no && \ ! test "$hardcode_minus_L" != no && \ ! test "$hardcode_shlibpath_var" != no; then ! # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi - elif test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" != yes; then - # We cannot hardcode anything. - hardcode_action=unsupported else ! # We can only hardcode existing directories. ! hardcode_action=relink fi echo "$ac_t$hardcode_action" 1>&6 - test "$hardcode_action" = unsupported && can_build_shared=no reload_flag= reload_cmds='$LD$reload_flag -o $output$reload_objs' echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 ! # PORTME Some linker may need a different reload flag. reload_flag='-r' ! echo "$ac_t$reload_flag" test -n "$reload_flag" && reload_flag=" $reload_flag" # PORTME Fill in your ld.so characteristics --- 1606,1637 ---- test -n "$runpath_var"; then # We can hardcode non-existant directories. ! if test "$hardcode_direct" != no && ! # If the only mechanism to avoid hardcoding is shlibpath_var, we ! # have to relink, otherwise we might link with an installed library ! # when we should be linking with a yet-to-be-installed one ! ## test "$hardcode_shlibpath_var" != no && ! test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else ! # We cannot hardcode anything, or else we can only hardcode existing ! # directories. ! hardcode_action=unsupported fi echo "$ac_t$hardcode_action" 1>&6 reload_flag= reload_cmds='$LD$reload_flag -o $output$reload_objs' echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 ! # PORTME Some linkers may need a different reload flag. reload_flag='-r' ! echo "$ac_t$reload_flag" 1>&6 test -n "$reload_flag" && reload_flag=" $reload_flag" # PORTME Fill in your ld.so characteristics *************** *** 1103,1158 **** finish_cmds= finish_eval= shlibpath_var= version_type=none dynamic_linker="$host_os ld.so" ! echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 case "$host_os" in ! aix3* | aix4*) version_type=linux ! library_names_spec='${libname}${release}.so.$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. ! soname_spec='${libname}${release}.so.$major' ;; ! amigaos*) ! library_names_spec='$libname.ixlibrary $libname.a' ! # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; ! freebsd2* | freebsd3*) ! version_type=sunos ! library_names_spec='${libname}${release}.so.$versuffix $libname.so' ! finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; gnu*) ! version_type=sunos ! library_names_spec='${libname}${release}.so.$versuffix' shlibpath_var=LD_LIBRARY_PATH ;; ! hpux9* | hpux10*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. dynamic_linker="$host_os dld.sl" version_type=sunos shlibpath_var=SHLIB_PATH ! library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl' ! soname_spec='${libname}${release}.sl.$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6*) ! version_type=osf ! soname_spec='${libname}${release}.so' ! library_names_spec='${libname}${release}.so.$versuffix $libname.so' ! shlibpath_var=LD_LIBRARY_PATH ;; # No shared lib support for Linux oldld, aout, or coff. --- 1643,1814 ---- finish_cmds= finish_eval= shlibpath_var= + shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" ! sys_lib_dlsearch_path_spec="/lib /usr/lib" ! sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" ! file_magic_cmd= ! file_magic_test_file= ! deplibs_check_method='unknown' ! # Need to set the preceding variable on all platforms that support ! # interlibrary dependencies. ! # 'none' -- dependencies not supported. ! # `unknown' -- same as none, but documents that we really don't know. ! # 'pass_all' -- all dependencies passed with no checks. ! # 'test_compile' -- check by making test program. ! # 'file_magic [regex]' -- check by looking for files in library path ! # which responds to the $file_magic_cmd with a given egrep regex. ! # If you have `file' or equivalent on your system and you're not sure ! # whether `pass_all' will *always* work, you probably want this one. echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 case "$host_os" in ! aix3*) version_type=linux ! library_names_spec='${libname}${release}.so$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. ! soname_spec='${libname}${release}.so$major' ;; ! aix4*) ! version_type=linux ! # AIX has no versioning support, so currently we can not hardcode correct ! # soname into executable. Probably we can add versioning support to ! # collect2, so additional links can be useful in future. ! # We preserve .a as extension for shared libraries though AIX4.2 ! # and later linker supports .so ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' ! shlibpath_var=LIBPATH ! deplibs_check_method=pass_all ! ;; ! ! amigaos*) ! library_names_spec='$libname.ixlibrary $libname.a' ! # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; ! beos*) ! library_names_spec='${libname}.so' ! dynamic_linker="$host_os ld.so" ! shlibpath_var=LIBRARY_PATH ! lt_cv_dlopen="load_add_on" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! ;; ! ! bsdi4*) ! version_type=linux ! library_names_spec='${libname}.so$major ${libname}.so' ! soname_spec='${libname}.so' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH + deplibs_check_method='file_magic ELF 32-bit LSB shared object' + file_magic_cmd=/usr/bin/file + file_magic_test_file=/shlib/libc.so + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs ;; + cygwin* | mingw*) + version_type=windows + if test "$with_gcc" = yes; then + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' + else + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' + fi + dynamic_linker='Win32 ld.exe' + deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + file_magic_cmd='${OBJDUMP} -f' + need_lib_prefix=no + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + freebsd1*) + dynamic_linker=no + ;; + + freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case "$version_type" in + freebsd-elf*) + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /usr/lib/libc.so*` + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + deplibs_check_method=unknown + library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' + need_version=yes + ;; + esac + finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + gnu*) ! version_type=linux ! library_names_spec='${libname}${release}.so$versuffix ${libname}.so' shlibpath_var=LD_LIBRARY_PATH ;; ! hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. dynamic_linker="$host_os dld.sl" version_type=sunos + need_lib_prefix=no + need_version=no shlibpath_var=SHLIB_PATH ! shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ! library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' ! soname_spec='${libname}${release}.sl$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6*) ! version_type=irix ! need_lib_prefix=no ! need_version=no ! soname_spec='${libname}${release}.so.$major' ! library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' ! case "$host_os" in ! irix5*) ! libsuff= shlibsuff= ! # this will be overridden with pass_all, but let us keep it just in case ! deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ! ;; ! *) ! case "$LD" in # libtool.m4 will add one of these switches to LD ! *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; ! *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; ! *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; ! *) libsuff= shlibsuff= libmagic=never-match;; ! esac ! # this will be overridden with pass_all, but let us keep it just in case ! deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ! ;; ! esac ! shlibpath_var=LD_LIBRARY${shlibsuff}_PATH ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ! sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ! file_magic_cmd=/usr/bin/file ! file_magic_test_file=`echo /lib${libsuff}/libc.so*` ! deplibs_check_method='pass_all' ;; # No shared lib support for Linux oldld, aout, or coff. *************** *** 1163,1172 **** # This must be Linux ELF. linux-gnu*) version_type=linux ! library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' ! soname_spec='${libname}${release}.so.$major' ! finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH if test -f /lib/ld.so.1; then dynamic_linker='GNU ld.so' --- 1819,1834 ---- # This must be Linux ELF. linux-gnu*) version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` if test -f /lib/ld.so.1; then dynamic_linker='GNU ld.so' *************** *** 1179,1193 **** fi ;; ! netbsd* | openbsd*) version_type=sunos ! library_names_spec='${libname}${release}.so.$versuffix' ! finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; os2*) libname_spec='$name' library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH --- 1841,1874 ---- fi ;; ! netbsd*) version_type=sunos ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! dynamic_linker='NetBSD (a.out) ld.so' ! else ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' ! soname_spec='${libname}${release}.so$major' ! dynamic_linker='NetBSD ld.elf_so' ! fi shlibpath_var=LD_LIBRARY_PATH ;; + openbsd*) + version_type=sunos + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + need_version=no + fi + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + os2*) libname_spec='$name' + need_lib_prefix=no library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH *************** *** 1195,1237 **** osf3* | osf4*) version_type=osf soname_spec='${libname}${release}.so' ! library_names_spec='${libname}${release}.so.$versuffix $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; sco3.2v5*) version_type=osf ! soname_spec='${libname}${release}.so.$major' ! library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; ! solaris2*) version_type=linux ! library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' ! soname_spec='${libname}${release}.so.$major' shlibpath_var=LD_LIBRARY_PATH ;; sunos4*) version_type=sunos ! library_names_spec='${libname}${release}.so.$versuffix' ! finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH ;; ! sysv4.2uw2*) version_type=linux ! library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' ! soname_spec='${libname}${release}.so.$major' shlibpath_var=LD_LIBRARY_PATH ;; uts4*) version_type=linux ! library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' ! soname_spec='${libname}${release}.so.$major' shlibpath_var=LD_LIBRARY_PATH ;; --- 1876,1962 ---- osf3* | osf4*) version_type=osf + need_version=no soname_spec='${libname}${release}.so' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' shlibpath_var=LD_LIBRARY_PATH + # this will be overridden with pass_all, but let us keep it just in case + deplibs_check_method='file_magic COFF format alpha shared library' + file_magic_cmd=/usr/bin/file + file_magic_test_file=/shlib/libc.so + deplibs_check_method='pass_all' + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf ! soname_spec='${libname}${release}.so$major' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; ! solaris*) version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" + file_magic_cmd=/usr/bin/file + file_magic_test_file=/lib/libc.so ;; sunos4*) version_type=sunos ! library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' ! finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes ;; ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH + case "$host_vendor" in + ncr) + deplibs_check_method='pass_all' + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + esac ;; uts4*) version_type=linux ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! dgux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; *************** *** 1239,1263 **** dynamic_linker=no ;; esac ! echo "$ac_t$dynamic_linker" test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in ! aix*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then ! archive_cmds="$archive_cmds;\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; esac echo "$ac_t$enable_shared" 1>&6 --- 1964,2027 ---- dynamic_linker=no ;; esac ! echo "$ac_t$dynamic_linker" 1>&6 test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 + # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in + # configure.in, otherwise build static only libraries. + case "$host_os" in + cygwin* | mingw* | os2*) + if test x$can_build_shared = xyes; then + test x$enable_win32_dll = xno && can_build_shared=no + echo "checking if package supports dlls... $can_build_shared" 1>&6 + fi + ;; + esac + + if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + + *** Warning: the command libtool uses to detect shared libraries, + *** $file_magic_cmd, produces output that libtool cannot recognize. + *** The result is that libtool may fail to recognize shared libraries + *** as such. This will affect the creation of libtool libraries that + *** depend on shared libraries, but programs linked with such libtool + *** libraries will work regardless of this problem. Nevertheless, you + *** may want to report the problem to your system manager and/or to + *** bug-libtool@gnu.org + + EOF + fi ;; + esac + fi + echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in ! aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then ! archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; + + aix4*) + test "$enable_shared" = yes && enable_static=no + ;; esac echo "$ac_t$enable_shared" 1>&6 *************** *** 1267,1272 **** --- 2031,2045 ---- echo "checking whether to build static libraries... $enable_static" 1>&6 + if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no + elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless + fi + echo $ac_n "checking for objdir... $ac_c" 1>&6 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null *************** *** 1279,1324 **** rmdir .libs 2>/dev/null echo "$ac_t$objdir" 1>&6 # Copy echo and quote the copy, instead of the original, because it is # used later. ltecho="$echo" ! # Now quote all the things that may contain metacharacters. ! for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ ! old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \ ! link_static_flag no_builtin_flag export_dynamic_flag_spec \ ! libname_spec library_names_spec soname_spec RANLIB \ ! old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ ! old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \ ! allow_undefined_flag no_undefined_flag \ ! finish_cmds finish_eval global_symbol_pipe \ ! hardcode_libdir_flag_spec hardcode_libdir_separator; do ! ! case "$var" in ! reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ ! old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \ ! postinstall_cmds | postuninstall_cmds | finish_cmds) ! # Double-quote double-evaled strings. ! eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`" ! ;; ! *) ! eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`" ;; esac - done ! ofile=libtool ! trap "$rm $ofile; exit 1" 1 2 15 ! echo creating $ofile ! $rm $ofile ! cat < $ofile ! #! /bin/sh ! # libtool - Provide generalized library-building support services. ! # Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. # ! # Copyright (C) 1996-1998 Free Software Foundation, Inc. # Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify --- 2052,2548 ---- rmdir .libs 2>/dev/null echo "$ac_t$objdir" 1>&6 + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown + else + if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then + lt_cv_dlopen=no lt_cv_dlopen_libs= + echo $ac_n "checking for dlopen""... $ac_c" 1>&6 + echo "$progname:@LINENO@: checking for dlopen" >&5 + if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char dlopen(); + + int main() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_dlopen) || defined (__stub___dlopen) + choke me + #else + dlopen(); + #endif + + ; return 0; } + EOF + if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dlopen=no" + fi + rm -f conftest* + fi + + if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 + echo "$progname:@LINENO@: checking for dlopen in -ldl" >&5 + ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-ldl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 + echo "$progname:@LINENO@: checking for dld_link in -ldld" >&5 + ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-ldld $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for shl_load""... $ac_c" 1>&6 + echo "$progname:@LINENO@: checking for shl_load" >&5 + if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char shl_load(); + + int main() { + + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_shl_load) || defined (__stub___shl_load) + choke me + #else + shl_load(); + #endif + + ; return 0; } + EOF + if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shl_load=yes" + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shl_load=no" + fi + rm -f conftest* + fi + + if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 + echo "$progname:@LINENO@: checking for shl_load in -ldld" >&5 + ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-ldld $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" + else + echo "$ac_t""no" 1>&6 + fi + + + fi + + + fi + + + fi + + + fi + + fi + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + fi + + case "$lt_cv_dlopen" in + dlopen) + for ac_hdr in dlfcn.h; do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 + echo "$progname:@LINENO@: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + int fnord = 0; + EOF + ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out" + { (eval echo $progname:@LINENO@: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + else + echo "$ac_err" >&5 + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + fi + rm -f conftest* + fi + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + done + + if test "x$ac_cv_header_dlfcn_h" = xyes; then + CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + fi + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 + echo "$progname:@LINENO@: checking whether a program can dlopen itself" >&5 + if test "${lt_cv_dlopen_self+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test "$cross_compiling" = yes; then + lt_cv_dlopen_self=cross + else + cat > conftest.c < + #endif + + #include + + #ifdef RTLD_GLOBAL + # define LTDL_GLOBAL RTLD_GLOBAL + #else + # ifdef DL_GLOBAL + # define LTDL_GLOBAL DL_GLOBAL + # else + # define LTDL_GLOBAL 0 + # endif + #endif + + /* We may have to define LTDL_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ + #ifndef LTDL_LAZY_OR_NOW + # ifdef RTLD_LAZY + # define LTDL_LAZY_OR_NOW RTLD_LAZY + # else + # ifdef DL_LAZY + # define LTDL_LAZY_OR_NOW DL_LAZY + # else + # ifdef RTLD_NOW + # define LTDL_LAZY_OR_NOW RTLD_NOW + # else + # ifdef DL_NOW + # define LTDL_LAZY_OR_NOW DL_NOW + # else + # define LTDL_LAZY_OR_NOW 0 + # endif + # endif + # endif + # endif + #endif + + fnord() { int i=42;} + main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); + if(ptr1 || ptr2) exit(0); } exit(1); } + + EOF + if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null + then + lt_cv_dlopen_self=yes + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + lt_cv_dlopen_self=no + fi + rm -fr conftest* + fi + + fi + + echo "$ac_t""$lt_cv_dlopen_self" 1>&6 + + if test "$lt_cv_dlopen_self" = yes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 + echo "$progname:@LINENO@: checking whether a statically linked program can dlopen itself" >&5 + if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test "$cross_compiling" = yes; then + lt_cv_dlopen_self_static=cross + else + cat > conftest.c < + #endif + + #include + + #ifdef RTLD_GLOBAL + # define LTDL_GLOBAL RTLD_GLOBAL + #else + # ifdef DL_GLOBAL + # define LTDL_GLOBAL DL_GLOBAL + # else + # define LTDL_GLOBAL 0 + # endif + #endif + + /* We may have to define LTDL_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ + #ifndef LTDL_LAZY_OR_NOW + # ifdef RTLD_LAZY + # define LTDL_LAZY_OR_NOW RTLD_LAZY + # else + # ifdef DL_LAZY + # define LTDL_LAZY_OR_NOW DL_LAZY + # else + # ifdef RTLD_NOW + # define LTDL_LAZY_OR_NOW RTLD_NOW + # else + # ifdef DL_NOW + # define LTDL_LAZY_OR_NOW DL_NOW + # else + # define LTDL_LAZY_OR_NOW 0 + # endif + # endif + # endif + # endif + #endif + + fnord() { int i=42;} + main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); + if(ptr1 || ptr2) exit(0); } exit(1); } + + EOF + if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null + then + lt_cv_dlopen_self_static=yes + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + lt_cv_dlopen_self_static=no + fi + rm -fr conftest* + fi + + fi + + echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 + fi + ;; + esac + + case "$lt_cv_dlopen_self" in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case "$lt_cv_dlopen_self_static" in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac + fi + # Copy echo and quote the copy, instead of the original, because it is # used later. ltecho="$echo" + if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ltecho="$CONFIG_SHELL \$0 --fallback-echo" + fi + LTSHELL="$SHELL" ! LTCONFIG_VERSION="$VERSION" ! ! # Only quote variables if we're using ltmain.sh. ! case "$ltmain" in ! *.sh) ! # Now quote all the things that may contain metacharacters. ! for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ ! old_LD old_LDFLAGS old_LIBS \ ! old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ ! AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ ! reload_flag reload_cmds wl \ ! pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ ! thread_safe_flag_spec whole_archive_flag_spec libname_spec \ ! library_names_spec soname_spec \ ! RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ ! old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ ! file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ ! finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ ! hardcode_libdir_flag_spec hardcode_libdir_separator \ ! sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ ! compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do ! ! case "$var" in ! reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ ! old_postinstall_cmds | old_postuninstall_cmds | \ ! export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ ! postinstall_cmds | postuninstall_cmds | \ ! finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) ! # Double-quote double-evaled strings. ! eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ! ;; ! *) ! eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ! ;; ! esac ! done ! ! case "$ltecho" in ! *'\$0 --fallback-echo"') ! ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac ! trap "$rm \"$ofile\"; exit 1" 1 2 15 ! echo "creating $ofile" ! $rm "$ofile" ! cat < "$ofile" ! #! $SHELL ! # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. ! # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. # ! # Copyright (C) 1996-1999 Free Software Foundation, Inc. # Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify *************** *** 1340,1355 **** # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. - # This program was configured as follows, - # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - # - # CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\ - # LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\ - # $0$ltconfig_args - # - # Compiler and other test output produced by $progname, useful for - # debugging $progname, is in ./config.log if it exists. - # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="sed -e s/^X//" --- 2564,2569 ---- *************** *** 1357,1475 **** # if CDPATH is set. if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi ! # An echo program that does not interpret backslashes. ! echo="$ltecho" # The version of $progname that generated this script. ! LTCONFIG_VERSION="$VERSION" # Shell to use when invoking shell scripts. ! SHELL=${CONFIG_SHELL-/bin/sh} ! # Whether or not to build libtool libraries. build_libtool_libs=$enable_shared ! # Whether or not to build old-style libraries. build_old_libs=$enable_static # The host system. ! host_alias="$host_alias" ! host="$host" # The archiver. ! AR="$AR" # The default C compiler. ! CC="$CC" # The linker used to build libraries. ! LD="$LD" # Whether we need hard or soft links. ! LN_S="$LN_S" # A BSD-compatible nm program. ! NM="$NM" # The name of the directory that contains temporary libtool files. ! objdir="$objdir" # How to create reloadable object files. ! reload_flag="$reload_flag" ! reload_cmds="$reload_cmds" # How to pass a linker flag through the compiler. ! wl="$wl" # Additional compiler flags for building library objects. ! pic_flag="$pic_flag" # Compiler flag to prevent dynamic linking. ! link_static_flag="$link_static_flag" # Compiler flag to turn off builtin functions. ! no_builtin_flag="$no_builtin_flag" # Compiler flag to allow reflexive dlopens. ! export_dynamic_flag_spec="$export_dynamic_flag_spec" # Library versioning type. version_type=$version_type # Format of library name prefix. ! libname_spec="$libname_spec" # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. ! library_names_spec="$library_names_spec" # The coded name of the library, if different from the real name. ! soname_spec="$soname_spec" # Commands used to build and install an old-style archive. ! RANLIB="$RANLIB" ! old_archive_cmds="$old_archive_cmds" ! old_postinstall_cmds="$old_postinstall_cmds" ! old_postuninstall_cmds="$old_postuninstall_cmds" # Create an old-style archive from a shared archive. ! old_archive_from_new_cmds="$old_archive_from_new_cmds" # Commands used to build and install a shared archive. ! archive_cmds="$archive_cmds" ! postinstall_cmds="$postinstall_cmds" ! postuninstall_cmds="$postuninstall_cmds" # Flag that allows shared libraries with undefined symbols to be built. ! allow_undefined_flag="$allow_undefined_flag" # Flag that forces no undefined symbols. ! no_undefined_flag="$no_undefined_flag" # Commands used to finish a libtool library installation in a directory. ! finish_cmds="$finish_cmds" # Same as above, but a single script fragment to be evaled but not shown. ! finish_eval="$finish_eval" # Take the output of nm and produce a listing of raw symbols and C names. ! global_symbol_pipe="$global_symbol_pipe" # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. ! hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec" # Whether we need a single -rpath flag with a separated argument. ! hardcode_libdir_separator="$hardcode_libdir_separator" # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. --- 2571,2787 ---- # if CDPATH is set. if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi ! ### BEGIN LIBTOOL CONFIG ! EOF ! cfgfile="$ofile" ! ;; ! ! *) ! # Double-quote the variables that need it (for aesthetics). ! for var in old_CC old_CFLAGS old_CPPFLAGS \ ! old_LD old_LDFLAGS old_LIBS \ ! old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do ! eval "$var=\\\"\$var\\\"" ! done ! ! # Just create a config file. ! cfgfile="$ofile.cfg" ! trap "$rm \"$cfgfile\"; exit 1" 1 2 15 ! echo "creating $cfgfile" ! $rm "$cfgfile" ! cat < "$cfgfile" ! # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. ! # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) ! EOF ! ;; ! esac + cat <> "$cfgfile" + # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + # + # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ + # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ + # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ + # DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ + # $0$ltconfig_args + # + # Compiler and other test output produced by $progname, useful for + # debugging $progname, is in ./config.log if it exists. + # The version of $progname that generated this script. ! LTCONFIG_VERSION=$LTCONFIG_VERSION # Shell to use when invoking shell scripts. ! SHELL=$LTSHELL ! # Whether or not to build shared libraries. build_libtool_libs=$enable_shared ! # Whether or not to build static libraries. build_old_libs=$enable_static + # Whether or not to optimize for fast installation. + fast_install=$enable_fast_install + # The host system. ! host_alias=$host_alias ! host=$host + # An echo program that does not interpret backslashes. + echo=$ltecho + # The archiver. ! AR=$AR # The default C compiler. ! CC=$CC # The linker used to build libraries. ! LD=$LD # Whether we need hard or soft links. ! LN_S=$LN_S # A BSD-compatible nm program. ! NM=$NM ! ! # Used on cygwin: DLL creation program. ! DLLTOOL="$DLLTOOL" + # Used on cygwin: object dumper. + OBJDUMP="$OBJDUMP" + + # Used on cygwin: assembler. + AS="$AS" + # The name of the directory that contains temporary libtool files. ! objdir=$objdir # How to create reloadable object files. ! reload_flag=$reload_flag ! reload_cmds=$reload_cmds # How to pass a linker flag through the compiler. ! wl=$wl ! ! # Object file suffix (normally "o"). ! objext="$objext" ! ! # Old archive suffix (normally "a"). ! libext="$libext" # Additional compiler flags for building library objects. ! pic_flag=$pic_flag + # Does compiler simultaneously support -c and -o options? + compiler_c_o=$compiler_c_o + + # Can we write directly to a .lo ? + compiler_o_lo=$compiler_o_lo + + # Must we lock files when doing compilation ? + need_locks=$need_locks + + # Do we need the lib prefix for modules? + need_lib_prefix=$need_lib_prefix + + # Do we need a version for libraries? + need_version=$need_version + + # Whether dlopen is supported. + dlopen=$enable_dlopen + + # Whether dlopen of programs is supported. + dlopen_self=$enable_dlopen_self + + # Whether dlopen of statically linked programs is supported. + dlopen_self_static=$enable_dlopen_self_static + # Compiler flag to prevent dynamic linking. ! link_static_flag=$link_static_flag # Compiler flag to turn off builtin functions. ! no_builtin_flag=$no_builtin_flag # Compiler flag to allow reflexive dlopens. ! export_dynamic_flag_spec=$export_dynamic_flag_spec ! ! # Compiler flag to generate shared objects directly from archives. ! whole_archive_flag_spec=$whole_archive_flag_spec + # Compiler flag to generate thread-safe objects. + thread_safe_flag_spec=$thread_safe_flag_spec + # Library versioning type. version_type=$version_type # Format of library name prefix. ! libname_spec=$libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. ! library_names_spec=$library_names_spec # The coded name of the library, if different from the real name. ! soname_spec=$soname_spec # Commands used to build and install an old-style archive. ! RANLIB=$RANLIB ! old_archive_cmds=$old_archive_cmds ! old_postinstall_cmds=$old_postinstall_cmds ! old_postuninstall_cmds=$old_postuninstall_cmds # Create an old-style archive from a shared archive. ! old_archive_from_new_cmds=$old_archive_from_new_cmds # Commands used to build and install a shared archive. ! archive_cmds=$archive_cmds ! archive_expsym_cmds=$archive_expsym_cmds ! postinstall_cmds=$postinstall_cmds ! postuninstall_cmds=$postuninstall_cmds ! ! # Method to check whether dependent libraries are shared objects. ! deplibs_check_method=$deplibs_check_method ! ! # Command to use when deplibs_check_method == file_magic. ! file_magic_cmd=$file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. ! allow_undefined_flag=$allow_undefined_flag # Flag that forces no undefined symbols. ! no_undefined_flag=$no_undefined_flag # Commands used to finish a libtool library installation in a directory. ! finish_cmds=$finish_cmds # Same as above, but a single script fragment to be evaled but not shown. ! finish_eval=$finish_eval # Take the output of nm and produce a listing of raw symbols and C names. ! global_symbol_pipe=$global_symbol_pipe + # Transform the output of nm in a proper C declaration + global_symbol_to_cdecl=$global_symbol_to_cdecl + # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var + # Is shlibpath searched before the hard-coded library search path? + shlibpath_overrides_runpath=$shlibpath_overrides_runpath + # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. ! hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec # Whether we need a single -rpath flag with a separated argument. ! hardcode_libdir_separator=$hardcode_libdir_separator # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. *************** *** 1483,1493 **** # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var EOF ! case "$host_os" in ! aix3*) ! cat <<\EOF >> $ofile # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. --- 2795,2831 ---- # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var + # Compile-time system search path for libraries + sys_lib_search_path_spec=$sys_lib_search_path_spec + + # Run-time system search path for libraries + sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec + + # Fix the shell variable \$srcfile for the compiler. + fix_srcfile_path="$fix_srcfile_path" + + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols + + # The commands to list exported symbols. + export_symbols_cmds=$export_symbols_cmds + + # Symbols that should not be listed in the preloaded symbols. + exclude_expsyms=$exclude_expsyms + + # Symbols that must always be exported. + include_expsyms=$include_expsyms + EOF ! case "$ltmain" in ! *.sh) ! echo '### END LIBTOOL CONFIG' >> "$ofile" ! echo >> "$ofile" ! case "$host_os" in ! aix3*) ! cat <<\EOF >> "$ofile" ! # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. *************** *** 1495,1509 **** COLLECT_NAMES= export COLLECT_NAMES fi - EOF ;; esac ! # Append the ltmain.sh script. ! cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1) - chmod +x $ofile exit 0 # Local Variables: --- 2833,2905 ---- COLLECT_NAMES= export COLLECT_NAMES fi EOF + ;; + esac + + # Append the ltmain.sh script. + cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) + + chmod +x "$ofile" ;; + + *) + # Compile the libtool program. + echo "FIXME: would compile $ltmain" + ;; esac ! test -n "$cache_file" || exit 0 ! ! # AC_CACHE_SAVE ! trap '' 1 2 15 ! cat > confcache <<\EOF ! # This file is a shell script that caches the results of configure ! # tests run on this system so they can be shared between configure ! # scripts and configure runs. It is not useful on other systems. ! # If it contains results you don't want to keep, you may remove or edit it. ! # ! # By default, configure uses ./config.cache as the cache file, ! # creating it if it does not exist already. You can give configure ! # the --cache-file=FILE option to use a different cache file; that is ! # what configure does when it calls configure scripts in ! # subdirectories, so they share the cache. ! # Giving --cache-file=/dev/null disables caching, for debugging configure. ! # config.status only pays attention to the cache file if you give it the ! # --recheck option to rerun configure. ! # ! EOF ! # The following way of writing the cache mishandles newlines in values, ! # but we know of no workaround that is simple, portable, and efficient. ! # So, don't put newlines in cache variables' values. ! # Ultrix sh set writes to stderr and can't be redirected directly, ! # and sets the high bit in the cache file unless we assign to the vars. ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote substitution ! # turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! -e "s/'/'\\\\''/g" \ ! -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ! ;; ! esac >> confcache ! if cmp -s $cache_file confcache; then ! : ! else ! if test -w $cache_file; then ! echo "updating cache $cache_file" ! cat confcache > $cache_file ! else ! echo "not updating unwritable cache $cache_file" ! fi ! fi ! rm -f confcache exit 0 # Local Variables: Index: libtool/ltmain.c diff -c /dev/null libtool/ltmain.c:1.2 *** /dev/null Thu Apr 29 16:11:01 1999 --- libtool/ltmain.c Thu Dec 31 12:25:18 1998 *************** *** 0 **** --- 1,35 ---- + /* ltmain.c - C implementation of GNU Libtool + * Copyright (C) 1998-1999 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + * + * As a special exception to the GNU General Public License, if you + * distribute this file as part of a program that contains a + * configuration script generated by Autoconf, you may include it under + * the same distribution terms that you use for the rest of that program. + */ + + #include /* printf */ + #include /* exit */ + + int + main (argc, argv) + int argc; + char **argv; + { + printf ("hello, world!\n"); + exit (0); + } Index: libtool/ltmain.in diff -c libtool/ltmain.in:1.1.1.21 libtool/ltmain.in:1.135.2.25 *** libtool/ltmain.in:1.1.1.21 Fri Mar 20 08:58:42 1998 --- libtool/ltmain.in Thu Apr 29 14:01:59 1999 *************** *** 1,8 **** # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun ltconfig. # ! # Copyright (C) 1996-1998 Free Software Foundation, Inc. ! # Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by --- 1,8 ---- # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun ltconfig. # ! # Copyright (C) 1996-1999 Free Software Foundation, Inc. ! # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by *************** *** 23,28 **** --- 23,52 ---- # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Check that we have a working $echo. + if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : + elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : + else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$0" --no-reexec ${1+"$@"} + fi + + if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 --- 66,87 ---- # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' + SP2NL='tr \040 \012' + NL2SP='tr \012 \040' # NLS nuisances. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). ! # We save the old values to restore during execute mode. ! if test "${LC_ALL+set}" = set; then ! save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL ! fi ! if test "${LANG+set}" = set; then ! save_LANG="$LANG"; LANG=C; export LANG ! fi if test "$LTCONFIG_VERSION" != "$VERSION"; then echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 *************** *** 72,77 **** --- 104,111 ---- show="$echo" show_help= execute_dlfiles= + lo2o="s/\\.lo\$/.${objext}/" + o2lo="s/\\.${objext}\$/.lo/" # Parse our command line options once, thoroughly. while test $# -gt 0 *************** *** 107,116 **** ;; --version) ! echo "$PROGRAM (GNU $PACKAGE) $VERSION" exit 0 ;; --dry-run | -n) run=: ;; --- 141,160 ---- ;; --version) ! echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" ! exit 0 ! ;; ! ! --config) ! sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; + --debug) + echo "$progname: enabling shell trace mode" + set -x + ;; + --dry-run | -n) run=: ;; *************** *** 172,186 **** mode=link for arg do ! case "$arg" in ! -c) ! mode=compile ! break ! ;; ! esac done ;; ! *db | *dbx) mode=execute ;; *install*|cp|mv) --- 216,230 ---- mode=link for arg do ! case "$arg" in ! -c) ! mode=compile ! break ! ;; ! esac done ;; ! *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) *************** *** 195,205 **** # Just use the default operation mode. if test -z "$mode"; then ! if test -n "$nonopt"; then ! $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 ! else ! $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 ! fi fi ;; esac --- 239,249 ---- # Just use the default operation mode. if test -z "$mode"; then ! if test -n "$nonopt"; then ! $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 ! else ! $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 ! fi fi ;; esac *************** *** 227,249 **** srcfile="$nonopt" suppress_output= for arg do # Accept any command-line options. case "$arg" in -o) ! $echo "$modename: you cannot specify the output filename with \`-o'" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ;; -static) - build_libtool_libs=no build_old_libs=yes continue ;; esac # Accept the current argument as the source file. lastarg="$srcfile" srcfile="$arg" --- 271,309 ---- srcfile="$nonopt" suppress_output= + user_target=no for arg do # Accept any command-line options. case "$arg" in -o) ! if test "$user_target" != "no"; then ! $echo "$modename: you cannot specify \`-o' more than once" 1>&2 ! exit 1 ! fi ! user_target=next ;; -static) build_old_libs=yes continue ;; esac + case "$user_target" in + next) + # The next one is the -o target name + user_target=yes + continue + ;; + yes) + # We got the output file + user_target=set + libobj="$arg" + continue + ;; + esac + # Accept the current argument as the source file. lastarg="$srcfile" srcfile="$arg" *************** *** 272,282 **** fi done ! # Get the name of the library object. ! libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` # Recognize several different file suffixes. ! xform='[cCFSfms]' case "$libobj" in *.ada) xform=ada ;; *.adb) xform=adb ;; --- 332,353 ---- fi done ! case "$user_target" in ! set) ! ;; ! no) ! # Get the name of the library object. ! libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ! ;; ! *) ! $echo "$modename: you must specify a target with \`-o'" 1>&2 ! exit 1 ! ;; ! esac # Recognize several different file suffixes. ! # If the user specifies -o file.o, it is replaced with file.lo ! xform='[cCFSfmso]' case "$libobj" in *.ada) xform=ada ;; *.adb) xform=adb ;; *************** *** 293,301 **** libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case "$libobj" in ! *.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;; *) ! $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2 exit 1 ;; esac --- 364,372 ---- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case "$libobj" in ! *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) ! $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit 1 ;; esac *************** *** 308,318 **** # Delete any leftover library objects. if test "$build_old_libs" = yes; then ! $run $rm $obj $libobj ! trap "$run $rm $obj $libobj; exit 1" 1 2 15 else ! $run $rm $libobj ! trap "$run $rm $libobj; exit 1" 1 2 15 fi # Only build a PIC object if we are building libtool libraries. --- 379,432 ---- # Delete any leftover library objects. if test "$build_old_libs" = yes; then ! removelist="$obj $libobj" else ! removelist="$libobj" ! fi ! ! $run $rm $removelist ! trap "$run $rm $removelist; exit 1" 1 2 15 ! ! # Calculate the filename of the output object if compiler does ! # not support -o with -c ! if test "$compiler_c_o" = no; then ! output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} ! lockfile="$output_obj.lock" ! removelist="$removelist $output_obj $lockfile" ! trap "$run $rm $removelist; exit 1" 1 2 15 ! else ! need_locks=no ! lockfile= ! fi ! ! # Lock this critical section if it is needed ! # We use this script file to make the link, it avoids creating a new file ! if test "$need_locks" = yes; then ! until ln "$0" "$lockfile" 2>/dev/null; do ! $show "Waiting for $lockfile to be removed" ! sleep 2 ! done ! elif test "$need_locks" = warn; then ! if test -f "$lockfile"; then ! echo "\ ! *** ERROR, $lockfile exists and contains: ! `cat $lockfile 2>/dev/null` ! ! This indicates that another process is trying to use the same ! temporary object file, and libtool could not work around it because ! your compiler does not support \`-c' and \`-o' together. If you ! repeat this compilation, it may succeed, by chance, but you had better ! avoid parallel builds (make -j) in this platform, or get a better ! compiler." ! ! $run $rm $removelist ! exit 1 ! fi ! echo $srcfile > "$lockfile" ! fi ! ! if test -n "$fix_srcfile_path"; then ! eval srcfile=\"$fix_srcfile_path\" fi # Only build a PIC object if we are building libtool libraries. *************** *** 321,364 **** fbsd_hideous_sh_bug=$base_compile # All platforms use -DPIC, to notify preprocessed assembler code. ! $show "$base_compile$pic_flag -DPIC $srcfile" ! if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then : else ! test -n "$obj" && $run $rm $obj ! exit 1 fi ! # If we have no pic_flag, then copy the object into place and finish. ! if test -z "$pic_flag"; then ! $show "$LN_S $obj $libobj" ! $run $LN_S $obj $libobj ! exit $? fi ! # Just move the object, then go on to compile the next one ! $show "$mv $obj $libobj" ! $run $mv $obj $libobj || exit 1 # Allow error messages only from the first compilation. suppress_output=' >/dev/null 2>&1' fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then # Suppress compiler output if we already did a PIC compilation. ! $show "$base_compile $srcfile$suppress_output" ! if $run eval "$base_compile \$srcfile$suppress_output"; then : else ! $run $rm $obj $libobj ! exit 1 fi fi ! # Create an invalid libtool object if no PIC, so that we do not ! # accidentally link it into a program. ! if test "$build_libtool_libs" != yes; then ! $show "echo timestamp > $libobj" ! $run eval "echo timestamp > \$libobj" || exit $? fi exit 0 --- 435,608 ---- fbsd_hideous_sh_bug=$base_compile # All platforms use -DPIC, to notify preprocessed assembler code. ! command="$base_compile $pic_flag -DPIC $srcfile" ! if test "$build_old_libs" = yes; then ! lo_libobj="$libobj" ! dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` ! if test "X$dir" = "X$libobj"; then ! dir="$objdir" ! else ! dir="$dir/$objdir" ! fi ! libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` ! ! if test -d "$dir"; then ! $show "$rm $libobj" ! $run $rm $libobj ! else ! $show "$mkdir $dir" ! $run $mkdir $dir ! status=$? ! if test $status -ne 0 && test ! -d $dir; then ! exit $status ! fi ! fi ! fi ! if test "$compiler_o_lo" = yes; then ! output_obj="$libobj" ! command="$command -o $output_obj" ! elif test "$compiler_c_o" = yes; then ! output_obj="$obj" ! command="$command -o $output_obj" ! fi ! ! $show "$command" ! if $run eval "$command"; then : else ! test -n "$output_obj" && $run $rm $removelist ! exit 1 fi ! if test "$need_locks" = warn && ! test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then ! echo "\ ! *** ERROR, $lockfile contains: ! `cat $lockfile 2>/dev/null` ! ! but it should contain: ! $srcfile ! ! This indicates that another process is trying to use the same ! temporary object file, and libtool could not work around it because ! your compiler does not support \`-c' and \`-o' together. If you ! repeat this compilation, it may succeed, by chance, but you had better ! avoid parallel builds (make -j) in this platform, or get a better ! compiler." ! ! $run $rm $removelist ! exit 1 ! fi ! ! # Just move the object if needed, then go on to compile the next one ! if test x"$output_obj" != x"$libobj"; then ! $show "$mv $output_obj $libobj" ! if $run $mv $output_obj $libobj; then : ! else ! error=$? ! $run $rm $removelist ! exit $error ! fi fi ! # If we have no pic_flag, then copy the object into place and finish. ! if test -z "$pic_flag" && test "$build_old_libs" = yes; then ! # Rename the .lo from within objdir to obj ! if test -f $obj; then ! $show $rm $obj ! $run $rm $obj ! fi ! ! $show "$mv $libobj $obj" ! if $run $mv $libobj $obj; then : ! else ! error=$? ! $run $rm $removelist ! exit $error ! fi + # Now arrange that obj and lo_libobj become the same file + $show "$LN_S $obj $lo_libobj" + if $run $LN_S $obj $lo_libobj; then + exit 0 + else + error=$? + $run $rm $removelist + exit $error + fi + fi + # Allow error messages only from the first compilation. suppress_output=' >/dev/null 2>&1' fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then + command="$base_compile $srcfile" + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + output_obj="$obj" + fi + # Suppress compiler output if we already did a PIC compilation. ! command="$command$suppress_output" ! $show "$command" ! if $run eval "$command"; then : else ! $run $rm $removelist ! exit 1 ! fi ! ! if test "$need_locks" = warn && ! test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then ! echo "\ ! *** ERROR, $lockfile contains: ! `cat $lockfile 2>/dev/null` ! ! but it should contain: ! $srcfile ! ! This indicates that another process is trying to use the same ! temporary object file, and libtool could not work around it because ! your compiler does not support \`-c' and \`-o' together. If you ! repeat this compilation, it may succeed, by chance, but you had better ! avoid parallel builds (make -j) in this platform, or get a better ! compiler." ! ! $run $rm $removelist ! exit 1 fi + + # Just move the object if needed + if test x"$output_obj" != x"$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Create an invalid libtool object if no PIC, so that we do not + # accidentally link it into a program. + if test "$build_libtool_libs" != yes; then + $show "echo timestamp > $libobj" + $run eval "echo timestamp > \$libobj" || exit $? + else + # Move the .lo from within objdir + $show "$mv $libobj $lo_libobj" + if $run $mv $libobj $lo_libobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi fi ! # Unlock the critical section if it was locked ! if test "$need_locks" != no; then ! $rm "$lockfile" fi exit 0 *************** *** 367,394 **** # libtool link mode link) modename="$modename: link" CC="$nonopt" ! allow_undefined=yes compile_command="$CC" finalize_command="$CC" compile_shlibpath= finalize_shlibpath= deplibs= dlfiles= dlprefiles= export_dynamic=no ! hardcode_libdirs= libobjs= link_against_libtool_libs= ltlibs= objs= prev= prevarg= release= rpath= perm_rpath= temp_rpath= vinfo= # We need to know -static, to get the right output filenames. --- 611,842 ---- # libtool link mode link) modename="$modename: link" + C_compiler="$CC" # save it, to compile generated C sources CC="$nonopt" ! case "$host" in ! *-*-cygwin* | *-*-mingw* | *-*-os2*) ! # It is impossible to link a dll without this setting, and ! # we shouldn't force the makefile maintainer to figure out ! # which system we are compiling for in order to pass an extra ! # flag for every libtool invokation. ! # allow_undefined=no ! ! # FIXME: Unfortunately, there are problems with the above when trying ! # to make a dll which has undefined symbols, in which case not ! # even a static library is built. For now, we need to specify ! # -no-undefined on the libtool link line when we can be certain ! # that all symbols are satisfied, otherwise we get a static library. ! allow_undefined=yes ! ! # This is a source program that is used to create dlls on Windows ! # Don't remove nor modify the starting and closing comments ! # /* ltdll.c starts here */ ! # #define WIN32_LEAN_AND_MEAN ! # #include ! # #undef WIN32_LEAN_AND_MEAN ! # #include ! # ! # #ifdef __cplusplus ! # extern "C" { ! # #endif ! # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); ! # #ifdef __cplusplus ! # } ! # #endif ! # ! # #include ! # DECLARE_CYGWIN_DLL( DllMain ); ! # HINSTANCE __hDllInstance_base; ! # ! # BOOL APIENTRY ! # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) ! # { ! # __hDllInstance_base = hInst; ! # return TRUE; ! # } ! # /* ltdll.c ends here */ ! # This is a source program that is used to create import libraries ! # on Windows for dlls which lack them. Don't remove nor modify the ! # starting and closing comments ! # /* impgen.c starts here */ ! # /* Copyright (C) 1999 Free Software Foundation, Inc. ! # ! # This file is part of GNU libtool. ! # ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2 of the License, or ! # (at your option) any later version. ! # ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! # ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! # */ ! # ! # #include /* for printf() */ ! # #include /* for open(), lseek(), read() */ ! # #include /* for O_RDONLY, O_BINARY */ ! # #include /* for strdup() */ ! # ! # static unsigned int ! # pe_get16 (fd, offset) ! # int fd; ! # int offset; ! # { ! # unsigned char b[2]; ! # lseek (fd, offset, SEEK_SET); ! # read (fd, b, 2); ! # return b[0] + (b[1]<<8); ! # } ! # ! # static unsigned int ! # pe_get32 (fd, offset) ! # int fd; ! # int offset; ! # { ! # unsigned char b[4]; ! # lseek (fd, offset, SEEK_SET); ! # read (fd, b, 4); ! # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); ! # } ! # ! # static unsigned int ! # pe_as32 (ptr) ! # void *ptr; ! # { ! # unsigned char *b = ptr; ! # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); ! # } ! # ! # int ! # main (argc, argv) ! # int argc; ! # char *argv[]; ! # { ! # int dll; ! # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; ! # unsigned long export_rva, export_size, nsections, secptr, expptr; ! # unsigned long name_rvas, nexp; ! # unsigned char *expdata, *erva; ! # char *filename, *dll_name; ! # ! # filename = argv[1]; ! # ! # dll = open(filename, O_RDONLY|O_BINARY); ! # if (!dll) ! # return 1; ! # ! # dll_name = filename; ! # ! # for (i=0; filename[i]; i++) ! # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') ! # dll_name = filename + i +1; ! # ! # pe_header_offset = pe_get32 (dll, 0x3c); ! # opthdr_ofs = pe_header_offset + 4 + 20; ! # num_entries = pe_get32 (dll, opthdr_ofs + 92); ! # ! # if (num_entries < 1) /* no exports */ ! # return 1; ! # ! # export_rva = pe_get32 (dll, opthdr_ofs + 96); ! # export_size = pe_get32 (dll, opthdr_ofs + 100); ! # nsections = pe_get16 (dll, pe_header_offset + 4 +2); ! # secptr = (pe_header_offset + 4 + 20 + ! # pe_get16 (dll, pe_header_offset + 4 + 16)); ! # ! # expptr = 0; ! # for (i = 0; i < nsections; i++) ! # { ! # char sname[8]; ! # unsigned long secptr1 = secptr + 40 * i; ! # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); ! # unsigned long vsize = pe_get32 (dll, secptr1 + 16); ! # unsigned long fptr = pe_get32 (dll, secptr1 + 20); ! # lseek(dll, secptr1, SEEK_SET); ! # read(dll, sname, 8); ! # if (vaddr <= export_rva && vaddr+vsize > export_rva) ! # { ! # expptr = fptr + (export_rva - vaddr); ! # if (export_rva + export_size > vaddr + vsize) ! # export_size = vsize - (export_rva - vaddr); ! # break; ! # } ! # } ! # ! # expdata = (unsigned char*)malloc(export_size); ! # lseek (dll, expptr, SEEK_SET); ! # read (dll, expdata, export_size); ! # erva = expdata - export_rva; ! # ! # nexp = pe_as32 (expdata+24); ! # name_rvas = pe_as32 (expdata+32); ! # ! # printf ("EXPORTS\n"); ! # for (i = 0; i&2 ! fi ! build_libtool_libs=no build_old_libs=yes ! break ! ;; esac done --- 844,866 ---- do case "$arg" in -all-static | -static) ! 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 ! prefer_static_libs=yes ! break ! ;; esac done *************** *** 410,453 **** test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. ! for arg ! do # If the previous option needs an argument, assign it. if test -n "$prev"; then ! case "$prev" in ! output) ! compile_command="$compile_command @OUTPUT@" ! finalize_command="$finalize_command @OUTPUT@" ! ;; ! esac ! ! case "$prev" in ! dlfiles|dlprefiles) ! case "$arg" in ! *.la | *.lo) ;; # We handle these cases below. ! *) ! dlprefiles="$dlprefiles $arg" ! test "$prev" = dlfiles && dlfiles="$dlfiles $arg" ! prev= ! ;; ! esac ! ;; release) release="-$arg" prev= continue ;; ! rpath) ! rpath="$rpath $arg" prev= continue ;; ! *) ! eval "$prev=\"\$arg\"" ! prev= ! continue ! ;; ! esac fi prevarg="$arg" --- 868,966 ---- test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. ! while test $# -gt 0; do ! arg="$1" ! shift ! # If the previous option needs an argument, assign it. if test -n "$prev"; then ! case "$prev" in ! output) ! compile_command="$compile_command @OUTPUT@" ! finalize_command="$finalize_command @OUTPUT@" ! ;; ! esac ! ! case "$prev" in ! dlfiles|dlprefiles) ! if test "$preload" = no; then ! # Add the symbol object into the linking commands. ! compile_command="$compile_command @SYMFILE@" ! finalize_command="$finalize_command @SYMFILE@" ! preload=yes ! fi ! case "$arg" in ! *.la | *.lo) ;; # We handle these cases below. ! self) ! if test "$prev" = dlprefiles; then ! dlself=yes ! elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then ! dlself=yes ! else ! dlself=needless ! export_dynamic=yes ! fi ! prev= ! continue ! ;; ! *) ! if test "$prev" = dlfiles; then ! dlfiles="$dlfiles $arg" ! else ! dlprefiles="$dlprefiles $arg" ! fi ! prev= ! ;; ! esac ! ;; ! expsyms) ! export_symbols="$arg" ! if test ! -f "$arg"; then ! $echo "$modename: symbol file \`$arg' does not exist" ! exit 1 ! fi ! prev= ! continue ! ;; ! expsyms_regex) ! export_symbols_regex="$arg" ! prev= ! continue ! ;; release) release="-$arg" prev= continue ;; ! rpath | xrpath) ! # We need an absolute path. ! case "$arg" in ! [\\/]* | [A-Za-z]:[\\/]*) ;; ! *) ! $echo "$modename: only absolute run-paths are allowed" 1>&2 ! exit 1 ! ;; ! 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 ;; ! *) ! eval "$prev=\"\$arg\"" ! prev= ! continue ! ;; ! esac fi prevarg="$arg" *************** *** 455,464 **** case "$arg" in -all-static) if test -n "$link_static_flag"; then ! compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" ! fi ! continue ;; -allow-undefined) --- 968,977 ---- case "$arg" in -all-static) if test -n "$link_static_flag"; then ! compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" ! fi ! continue ;; -allow-undefined) *************** *** 467,512 **** continue ;; -dlopen) ! prev=dlfiles ! continue ! ;; -dlpreopen) ! prev=dlprefiles ! continue ! ;; -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 ! # Add the symbol object into the linking commands. ! compile_command="$compile_command @SYMFILE@" ! finalize_command="$finalize_command @SYMFILE@" ! fi ! ;; -L*) ! dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'` ! case "$dir" in ! /* | [A-Za-z]:\\*) ! # Add the corresponding hardcode_libdir_flag, if it is not identical. ! ;; ! *) ! $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2 ! exit 1 ! ;; ! esac ! deplibs="$deplibs $arg" ! ;; ! -l*) deplibs="$deplibs $arg" ;; -no-undefined) allow_undefined=no --- 980,1075 ---- continue ;; + -avoid-version) + avoid_version=yes + continue + ;; + -dlopen) ! prev=dlfiles ! continue ! ;; -dlpreopen) ! prev=dlprefiles ! continue ! ;; -export-dynamic) ! export_dynamic=yes ! continue ! ;; ! -export-symbols | -export-symbols-regex) ! if test -n "$export_symbols" || test -n "$export_symbols_regex"; then ! $echo "$modename: not more than one -exported-symbols argument allowed" ! exit 1 ! fi ! if test "X$arg" = "X-export-symbols"; then ! prev=expsyms ! else ! prev=expsyms_regex ! fi ! continue ! ;; -L*) ! dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` ! # 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 " $deplibs " in ! *" $arg "*) ;; ! *) deplibs="$deplibs $arg";; ! esac ! case " $lib_search_path " in ! *" $dir "*) ;; ! *) lib_search_path="$lib_search_path $dir";; ! esac ! case "$host" in ! *-*-cygwin* | *-*-mingw* | *-*-os2*) ! dllsearchdir=`cd "$dir" && pwd || echo "$dir"` ! case ":$dllsearchpath:" in ! ::) dllsearchpath="$dllsearchdir";; ! *":$dllsearchdir:"*) ;; ! *) dllsearchpath="$dllsearchpath:$dllsearchdir";; ! esac ! ;; ! esac ! ;; ! ! -l*) ! 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*) ! # These systems don't actually have math library (as such) ! continue ! ;; ! esac ! fi ! deplibs="$deplibs $arg" ! ;; ! -module) ! module=yes ! continue ! ;; -no-undefined) allow_undefined=no *************** *** 521,543 **** ;; -rpath) ! prev=rpath ! continue ! ;; -static) # If we have no pic_flag, then this is the same as -all-static. 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" ! fi continue ;; -version-info) ! prev=vinfo ! continue ! ;; # Some other compiler flag. -* | +*) --- 1084,1133 ---- ;; -rpath) ! prev=rpath ! continue ! ;; ! ! -R) ! prev=xrpath ! continue ! ;; + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case "$dir" in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + -static) # If we have no pic_flag, then this is the same as -all-static. 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" ! fi continue ;; + -thread-safe) + thread_safe=yes + continue + ;; + -version-info) ! prev=vinfo ! continue ! ;; # Some other compiler flag. -* | +*) *************** *** 549,566 **** arg="\"$arg\"" ;; esac ! ;; ! *.o | *.a) ! # A standard object. ! objs="$objs $arg" ! ;; *.lo) ! # A library object. if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" ! if test "$build_libtool_libs" = yes; then prev= continue else --- 1139,1156 ---- arg="\"$arg\"" ;; esac ! ;; ! *.o | *.obj | *.a | *.lib) ! # A standard object. ! objs="$objs $arg" ! ;; *.lo) ! # A library object. if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" ! if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then prev= continue else *************** *** 571,762 **** if test "$prev" = dlprefiles; then # Preload the old-style object. ! dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'` prev= fi libobjs="$libobjs $arg" ! ;; *.la) ! # A libtool-controlled library. ! dlname= ! libdir= ! library_names= ! old_library= ! ! # Check to see that this really is a libtool archive. ! if (sed -e '2q' $arg | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : ! else ! $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 ! exit 1 ! fi ! ! # If there is no directory component, then add one. ! case "$arg" in ! */* | *\\*) . $arg ;; ! *) . ./$arg ;; ! esac ! ! if test -z "$libdir"; then ! $echo "$modename: \`$arg' contains no -rpath information" 1>&2 ! exit 1 ! fi ! ! # Get the name of the library we link against. ! linklib= ! for l in $old_library $library_names; do ! linklib="$l" ! done ! ! if test -z "$linklib"; then ! $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 ! exit 1 ! fi ! ! # Find the relevant object directory and library name. ! name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` ! dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` ! if test "X$dir" = "X$arg"; then ! dir="$objdir" ! else ! dir="$dir/$objdir" ! fi ! ! # This library was specified with -dlopen. ! if test "$prev" = dlfiles; then ! dlfiles="$dlfiles $arg" ! if test -z "$dlname"; then ! # If there is no dlname, we need to preload. ! prev=dlprefiles ! else ! # We should not create a dependency on this library, but we # may need any libraries it requires. compile_command="$compile_command$dependency_libs" finalize_command="$finalize_command$dependency_libs" ! prev= ! continue ! fi ! fi ! ! # The library was specified with -dlpreopen. ! if test "$prev" = dlprefiles; then ! # Prefer using a static library (so that no silly _DYNAMIC symbols ! # are required to link). ! if test -n "$old_library"; then ! dlprefiles="$dlprefiles $dir/$old_library" ! else ! dlprefiles="$dlprefiles $dir/$linklib" ! fi ! prev= ! fi ! ! if test "$build_libtool_libs" = yes && test -n "$library_names"; then ! link_against_libtool_libs="$link_against_libtool_libs $arg" ! if test -n "$shlibpath_var"; then ! # Make sure the rpath contains only unique directories. ! case "$temp_rpath " in ! *" $dir "*) ;; ! *) temp_rpath="$temp_rpath $dir" ;; ! esac ! fi # This is the magic to use -rpath. ! if test -n "$hardcode_libdir_flag_spec"; then ! if test -n "$hardcode_libdir_separator"; then ! if test -z "$hardcode_libdirs"; then ! # Put the magic libdir with the hardcode flag. ! hardcode_libdirs="$libdir" ! libdir="@HARDCODE_LIBDIRS@" ! else ! # Just accumulate the unique libdirs. ! case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in ! *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ! ;; ! *) ! hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ! ;; ! esac ! libdir= ! fi ! fi ! ! if test -n "$libdir"; then ! eval flag=\"$hardcode_libdir_flag_spec\" ! ! compile_command="$compile_command $flag" ! finalize_command="$finalize_command $flag" ! fi ! elif test -n "$runpath_var"; then ! # Do the same for the permanent run path. ! case "$perm_rpath " in ! *" $libdir "*) ;; ! *) perm_rpath="$perm_rpath $libdir" ;; ! esac ! fi ! ! ! case "$hardcode_action" in ! immediate) ! if test "$hardcode_direct" = no; then ! compile_command="$compile_command $dir/$linklib" ! elif test "$hardcode_minus_L" = no; then ! compile_command="$compile_command -L$dir -l$name" ! elif test "$hardcode_shlibpath_var" = no; then ! compile_shlibpath="$compile_shlibpath$dir:" ! compile_command="$compile_command -l$name" ! fi ! ;; ! ! relink) ! # 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 ! ! if test "$hardcode_direct" = yes; then ! compile_command="$compile_command $dir/$linklib" ! elif test "$hardcode_minus_L" = yes; then ! compile_command="$compile_command -L$dir -l$name" ! elif test "$hardcode_shlibpath_var" = yes; then ! compile_shlibpath="$compile_shlibpath$dir:" ! compile_command="$compile_command -l$name" ! fi ! ;; ! ! *) ! $echo "$modename: \`$hardcode_action' is an unknown hardcode action" 1>&2 ! exit 1 ! ;; ! esac ! ! # Finalize command for both is simple: just hardcode it. ! if test "$hardcode_direct" = yes; then ! finalize_command="$finalize_command $libdir/$linklib" ! elif test "$hardcode_minus_L" = yes; then ! finalize_command="$finalize_command -L$libdir -l$name" ! elif test "$hardcode_shlibpath_var" = yes; then ! finalize_shlibpath="$finalize_shlibpath$libdir:" ! finalize_command="$finalize_command -l$name" ! else ! # We cannot seem to hardcode it, guess we'll fake it. ! finalize_command="$finalize_command -L$libdir -l$name" ! fi ! else ! # Transform directly to old archives if we don't build new libraries. ! if test -n "$pic_flag" && test -z "$old_library"; then ! $echo "$modename: cannot find static library for \`$arg'" 1>&2 ! exit 1 ! fi # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. --- 1161,1431 ---- if test "$prev" = dlprefiles; then # Preload the old-style object. ! dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` prev= fi libobjs="$libobjs $arg" ! ;; *.la) ! # A libtool-controlled library. ! dlname= ! libdir= ! library_names= ! old_library= ! ! # Check to see that this really is a libtool archive. ! if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : ! else ! $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 ! exit 1 ! fi ! ! # If the library was installed with an old release of libtool, ! # it will not redefine variable installed. ! installed=yes ! ! # Read the .la file ! # If there is no directory component, then add one. ! case "$arg" in ! */* | *\\*) . $arg ;; ! *) . ./$arg ;; ! esac ! ! # Get the name of the library we link against. ! linklib= ! for l in $old_library $library_names; do ! linklib="$l" ! done ! ! if test -z "$linklib"; then ! $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 ! exit 1 ! fi ! ! # Find the relevant object directory and library name. ! name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` ! ! if test "X$installed" = Xyes; then ! dir="$libdir" ! else ! dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` ! if test "X$dir" = "X$arg"; then ! dir="$objdir" ! else ! dir="$dir/$objdir" ! fi ! fi ! ! if test -n "$dependency_libs"; then ! # Extract -R from dependency_libs ! temp_deplibs= ! for deplib in $dependency_libs; do ! case "$deplib" in ! -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` ! case " $rpath $xrpath " in ! *" $temp_xrpath "*) ;; ! *) xrpath="$xrpath $temp_xrpath";; ! esac;; ! -L*) case "$compile_command $temp_deplibs " in ! *" $deplib "*) ;; ! *) temp_deplibs="$temp_deplibs $deplib";; ! esac;; ! *) temp_deplibs="$temp_deplibs $deplib";; ! esac ! done ! dependency_libs="$temp_deplibs" ! fi ! ! if test -z "$libdir"; then ! # It is a libtool convenience library, so add in its objects. ! convenience="$convenience $dir/$old_library" ! old_convenience="$old_convenience $dir/$old_library" ! deplibs="$deplibs$dependency_libs" ! compile_command="$compile_command $dir/$old_library$dependency_libs" ! finalize_command="$finalize_command $dir/$old_library$dependency_libs" ! continue ! fi ! ! # This library was specified with -dlopen. ! if test "$prev" = dlfiles; then ! dlfiles="$dlfiles $arg" ! if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then ! # If there is no dlname, no dlopen support or we're linking statically, ! # we need to preload. ! prev=dlprefiles ! else ! # We should not create a dependency on this library, but we # may need any libraries it requires. compile_command="$compile_command$dependency_libs" finalize_command="$finalize_command$dependency_libs" ! prev= ! continue ! fi ! fi ! ! # The library was specified with -dlpreopen. ! if test "$prev" = dlprefiles; then ! # Prefer using a static library (so that no silly _DYNAMIC symbols ! # are required to link). ! if test -n "$old_library"; then ! dlprefiles="$dlprefiles $dir/$old_library" ! else ! dlprefiles="$dlprefiles $dir/$linklib" ! fi ! prev= ! fi ! ! if test -n "$library_names" && ! { test "$prefer_static_libs" = no || test -z "$old_library"; }; then ! link_against_libtool_libs="$link_against_libtool_libs $arg" ! if test -n "$shlibpath_var"; then ! # Make sure the rpath contains only unique directories. ! case "$temp_rpath " in ! *" $dir "*) ;; ! *) temp_rpath="$temp_rpath $dir" ;; ! esac ! fi + # We need an absolute path. + case "$dir" in + [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + exit 1 + fi + ;; + esac + # This is the magic to use -rpath. ! # Skip directories that are in the system default run-time ! # search path, unless they have been requested with -R. ! case " $sys_lib_dlsearch_path " in ! *" $absdir "*) ;; ! *) ! case "$compile_rpath " in ! *" $absdir "*) ;; ! *) compile_rpath="$compile_rpath $absdir" ! esac ! ;; ! esac ! ! case " $sys_lib_dlsearch_path " in ! *" $libdir "*) ;; ! *) ! case "$finalize_rpath " in ! *" $libdir "*) ;; ! *) finalize_rpath="$finalize_rpath $libdir" ! esac ! ;; ! esac ! ! lib_linked=yes ! case "$hardcode_action" in ! immediate | unsupported) ! if test "$hardcode_direct" = no; then ! compile_command="$compile_command $dir/$linklib" ! deplibs="$deplibs $dir/$linklib" ! case "$host" in ! *-*-cygwin* | *-*-mingw* | *-*-os2*) ! dllsearchdir=`cd "$dir" && pwd || echo "$dir"` ! if test -n "$dllsearchpath"; then ! dllsearchpath="$dllsearchpath:$dllsearchdir" ! else ! dllsearchpath="$dllsearchdir" ! fi ! ;; ! esac ! elif test "$hardcode_minus_L" = no; then ! case "$host" in ! *-*-sunos*) ! compile_shlibpath="$compile_shlibpath$dir:" ! ;; ! esac ! case "$compile_command " in ! *" -L$dir "*) ;; ! *) compile_command="$compile_command -L$dir";; ! esac ! compile_command="$compile_command -l$name" ! deplibs="$deplibs -L$dir -l$name" ! elif test "$hardcode_shlibpath_var" = no; then ! case ":$compile_shlibpath:" in ! *":$dir:"*) ;; ! *) compile_shlibpath="$compile_shlibpath$dir:";; ! esac ! compile_command="$compile_command -l$name" ! deplibs="$deplibs -l$name" ! else ! lib_linked=no ! fi ! ;; ! ! relink) ! if test "$hardcode_direct" = yes; then ! compile_command="$compile_command $absdir/$linklib" ! deplibs="$deplibs $absdir/$linklib" ! elif test "$hardcode_minus_L" = yes; then ! case "$compile_command " in ! *" -L$absdir "*) ;; ! *) compile_command="$compile_command -L$absdir";; ! esac ! compile_command="$compile_command -l$name" ! deplibs="$deplibs -L$absdir -l$name" ! elif test "$hardcode_shlibpath_var" = yes; then ! case ":$compile_shlibpath:" in ! *":$absdir:"*) ;; ! *) compile_shlibpath="$compile_shlibpath$absdir:";; ! esac ! compile_command="$compile_command -l$name" ! deplibs="$deplibs -l$name" ! else ! lib_linked=no ! fi ! ;; + *) + lib_linked=no + ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit 1 + fi + + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + finalize_command="$finalize_command $libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + case "$finalize_command " in + *" -L$libdir "*) ;; + *) finalize_command="$finalize_command -L$libdir";; + esac + finalize_command="$finalize_command -l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case ":$finalize_shlibpath:" in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:";; + esac + finalize_command="$finalize_command -l$name" + else + # We cannot seem to hardcode it, guess we'll fake it. + case "$finalize_command " in + *" -L$dir "*) ;; + *) finalize_command="$finalize_command -L$libdir";; + esac + finalize_command="$finalize_command -l$name" + fi + else + # Transform directly to old archives if we don't build new libraries. + if test -n "$pic_flag" && test -z "$old_library"; then + $echo "$modename: cannot find static library for \`$arg'" 1>&2 + exit 1 + fi + # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. *************** *** 765,780 **** compile_command="$compile_command $dir/$linklib" finalize_command="$finalize_command $dir/$linklib" else ! compile_command="$compile_command -L$dir -l$name" ! finalize_command="$finalize_command -L$dir -l$name" fi ! fi # Add in any libraries that this one depends upon. compile_command="$compile_command$dependency_libs" finalize_command="$finalize_command$dependency_libs" continue ! ;; # Some other compiler argument. *) --- 1434,1457 ---- compile_command="$compile_command $dir/$linklib" finalize_command="$finalize_command $dir/$linklib" else ! case "$compile_command " in ! *" -L$dir "*) ;; ! *) compile_command="$compile_command -L$dir";; ! esac ! compile_command="$compile_command -l$name" ! case "$finalize_command " in ! *" -L$dir "*) ;; ! *) finalize_command="$finalize_command -L$dir";; ! esac ! finalize_command="$finalize_command -l$name" fi ! fi # Add in any libraries that this one depends upon. compile_command="$compile_command$dependency_libs" finalize_command="$finalize_command$dependency_libs" continue ! ;; # Some other compiler argument. *) *************** *** 786,792 **** arg="\"$arg\"" ;; esac ! ;; esac # Now actually substitute the argument into the commands. --- 1463,1469 ---- arg="\"$arg\"" ;; esac ! ;; esac # Now actually substitute the argument into the commands. *************** *** 802,815 **** exit 1 fi ! if test -n "$vinfo" && test -n "$release"; then ! $echo "$modename: you cannot specify both \`-version-info' and \`-release'" 1>&2 ! $echo "$help" 1>&2 ! exit 1 fi - oldlib= - oldobjs= case "$output" in "") $echo "$modename: you must specify an output file" 1>&2 --- 1479,1495 ---- 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%^.*/%%'` + libobjs_save="$libobjs" case "$output" in "") $echo "$modename: you must specify an output file" 1>&2 *************** *** 817,1115 **** exit 1 ;; ! */* | *\\*) ! $echo "$modename: output file \`$output' must have no directory components" 1>&2 ! exit 1 ! ;; - *.a) # Now set the variables for building old libraries. build_libtool_libs=no ! build_old_libs=yes ! oldlib="$output" ! $show "$rm $oldlib" ! $run $rm $oldlib ;; *.la) # Make sure we only generate libraries of the form `libNAME.la'. ! case "$output" in ! lib*) ;; *) ! $echo "$modename: libtool library \`$arg' must begin with \`lib'" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ;; esac ! name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'` ! eval libname=\"$libname_spec\" ! ! # All the library-specific variables (install_libdir is set above). ! library_names= ! old_library= ! dlname= ! current=0 ! revision=0 ! age=0 if test -n "$objs"; then ! $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 ! exit 1 fi # How the heck are we supposed to write a wrapper for a shared library? if test -n "$link_against_libtool_libs"; then ! $echo "$modename: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2 ! exit 1 fi ! if test -n "$dlfiles$dlprefiles"; then ! $echo "$modename: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2 ! # Nullify the symbol file. ! compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` ! finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi - if test -z "$rpath"; then - $echo "$modename: you must specify an installation directory with \`-rpath'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - set dummy $rpath if test $# -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" ! # Parse the version information argument. ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' ! set dummy $vinfo ! IFS="$save_ifs" ! if test -n "$5"; then ! $echo "$modename: too many parameters to \`-version-info'" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! fi ! test -n "$2" && current="$2" ! test -n "$3" && revision="$3" ! test -n "$4" && age="$4" ! ! # Check that each of the things are valid numbers. ! case "$current" in ! 0 | [1-9] | [1-9][0-9]*) ;; ! *) ! $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 ! $echo "$modename: \`$vinfo' is not valid version information" 1>&2 ! exit 1 ! ;; ! esac ! case "$revision" in ! 0 | [1-9] | [1-9][0-9]*) ;; ! *) ! $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 ! $echo "$modename: \`$vinfo' is not valid version information" 1>&2 ! exit 1 ! ;; ! esac ! case "$age" in ! 0 | [1-9] | [1-9][0-9]*) ;; ! *) ! $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 ! $echo "$modename: \`$vinfo' is not valid version information" 1>&2 ! exit 1 ! ;; ! esac ! if test $age -gt $current; then ! $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 ! $echo "$modename: \`$vinfo' is not valid version information" 1>&2 ! exit 1 ! fi ! ! # Calculate the version variables. ! version_vars="version_type current age revision" ! case "$version_type" in ! none) ;; ! ! linux) ! version_vars="$version_vars major versuffix" ! major=`expr $current - $age` ! versuffix="$major.$age.$revision" ! ;; ! ! osf) ! version_vars="$version_vars versuffix verstring" ! major=`expr $current - $age` ! versuffix="$current.$age.$revision" ! verstring="$versuffix" ! ! # Add in all the interfaces that we are compatible with. ! loop=$age ! while test $loop != 0; do ! iface=`expr $current - $loop` ! loop=`expr $loop - 1` ! verstring="$verstring:${iface}.0" ! done ! ! # Make executables depend on our current version. ! verstring="$verstring:${current}.0" ! ;; ! ! sunos) ! version_vars="$version_vars major versuffix" ! major="$current" ! versuffix="$current.$revision" ! ;; ! *) ! $echo "$modename: unknown library version type \`$version_type'" 1>&2 ! echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 ! exit 1 ! ;; ! esac # Create the output directory, or remove our outputs if we need to. ! if test -d $objdir; then ! $show "$rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*" ! $run $rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.* else ! $show "$mkdir $objdir" ! $run $mkdir $objdir status=$? ! if test $status -eq 0 || test -d $objdir; then : ! else exit $status fi fi ! # Check to see if the archive will have undefined symbols. ! if test "$allow_undefined" = yes; then ! if test "$allow_undefined_flag" = unsupported; then ! $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 ! build_libtool_libs=no ! build_old_libs=yes ! fi ! else ! # Don't allow undefined symbols. ! allow_undefined_flag="$no_undefined_flag" fi ! # Add libc to deplibs on all systems. ! dependency_libs="$deplibs" ! deplibs="$deplibs -lc" if test "$build_libtool_libs" = yes; then ! # Get the real and link names of the library. ! eval library_names=\"$library_names_spec\" ! set dummy $library_names ! realname="$2" ! shift; shift ! ! if test -n "$soname_spec"; then ! eval soname=\"$soname_spec\" ! else ! soname="$realname" ! fi ! lib="$objdir/$realname" for link do linknames="$linknames $link" done ! # Use standard objects if they are PIC. ! test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'` ! # Do each of the archive commands. ! eval cmds=\"$archive_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? ! done ! IFS="$save_ifs" ! ! # Create links to the real library. ! for linkname in $linknames; do ! $show "(cd $objdir && $LN_S $realname $linkname)" ! $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $? ! done ! ! # If -export-dynamic was specified, set the dlname. ! if test "$export_dynamic" = yes; then ! # On all known operating systems, these are identical. ! dlname="$soname" ! fi ! fi ! # Now set the variables for building old libraries. ! oldlib="$objdir/$libname.a" ;; ! *.lo | *.o) if test -n "$link_against_libtool_libs"; then ! $echo "$modename: error: cannot link libtool libraries into reloadable objects" 1>&2 ! exit 1 fi if test -n "$deplibs"; then ! $echo "$modename: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2 fi ! if test -n "$dlfiles$dlprefiles"; then ! $echo "$modename: warning: \`-dlopen' is ignored while creating objects" 1>&2 ! # Nullify the symbol file. ! compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` ! finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test -n "$rpath"; then ! $echo "$modename: warning: \`-rpath' is ignored while creating objects" 1>&2 fi if test -n "$vinfo"; then ! $echo "$modename: warning: \`-version-info' is ignored while creating objects" 1>&2 fi if test -n "$release"; then ! $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2 fi case "$output" in *.lo) ! if test -n "$objs"; then ! $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 ! exit 1 ! fi ! libobj="$output" ! obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'` ! ;; *) ! libobj= ! obj="$output" ! ;; esac # Delete the old objects. $run $rm $obj $libobj # Create the old-style object. ! reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` output="$obj" eval cmds=\"$reload_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? done IFS="$save_ifs" --- 1497,2198 ---- exit 1 ;; ! *.a | *.lib) ! if test -n "$link_against_libtool_libs"; then ! $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 ! exit 1 ! fi ! ! if test -n "$deplibs"; then ! $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ! fi ! ! if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then ! $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 ! fi ! ! if test -n "$rpath"; then ! $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 ! fi ! ! if test -n "$xrpath"; then ! $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 ! fi ! ! if test -n "$vinfo"; then ! $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 ! fi ! ! if test -n "$release"; then ! $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 ! fi ! ! if test -n "$export_symbols" || test -n "$export_symbols_regex"; then ! $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 ! fi # Now set the variables for building old libraries. build_libtool_libs=no ! oldlibs="$output" ;; *.la) # Make sure we only generate libraries of the form `libNAME.la'. ! case "$outputname" in ! lib*) ! name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` ! eval libname=\"$libname_spec\" ! ;; *) ! if test "$module" = no; then ! $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! fi ! if test "$need_lib_prefix" != no; then ! # Add the "lib" prefix for modules if required ! name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` ! eval libname=\"$libname_spec\" ! else ! libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` ! fi ;; esac ! output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` ! if test "X$output_objdir" = "X$output"; then ! output_objdir="$objdir" ! else ! output_objdir="$output_objdir/$objdir" ! fi if test -n "$objs"; then ! $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 ! exit 1 fi # How the heck are we supposed to write a wrapper for a shared library? if test -n "$link_against_libtool_libs"; then ! $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 ! exit 1 fi ! if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then ! $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test $# -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" ! oldlibs= ! if test -z "$rpath"; then ! if test "$build_libtool_libs" = yes; then ! # Building a libtool convenience library. ! libext=al ! oldlibs="$output_objdir/$libname.$libext $oldlibs" ! build_libtool_libs=convenience ! build_old_libs=yes ! fi ! dependency_libs="$deplibs" ! if test -n "$vinfo"; then ! $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 ! fi ! if test -n "$release"; then ! $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 ! fi ! else ! # Parse the version information argument. ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' ! set dummy $vinfo 0 0 0 ! IFS="$save_ifs" ! ! if test -n "$8"; then ! $echo "$modename: too many parameters to \`-version-info'" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! fi ! current="$2" ! revision="$3" ! age="$4" ! ! # Check that each of the things are valid numbers. ! case "$current" in ! 0 | [1-9] | [1-9][0-9]*) ;; ! *) ! $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 ! $echo "$modename: \`$vinfo' is not valid version information" 1>&2 ! exit 1 ! ;; ! esac ! case "$revision" in ! 0 | [1-9] | [1-9][0-9]*) ;; ! *) ! $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 ! $echo "$modename: \`$vinfo' is not valid version information" 1>&2 ! exit 1 ! ;; ! esac ! case "$age" in ! 0 | [1-9] | [1-9][0-9]*) ;; ! *) ! $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 ! $echo "$modename: \`$vinfo' is not valid version information" 1>&2 ! exit 1 ! ;; ! esac + if test $age -gt $current; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case "$version_type" in + none) ;; + + irix) + major=`expr $current - $age + 1` + versuffix="$major.$revision" + verstring="sgi$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test $loop != 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="sgi$major.$iface:$verstring" + done + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test $loop != 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + windows) + # Like Linux, but with '-' rather than '.', since we only + # want one extension on Windows 95. + major=`expr $current - $age` + versuffix="-$major-$age-$revision" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + verstring="0.0" + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + dependency_libs="$deplibs" + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *) + # Add libc to deplibs on all other systems. + deplibs="$deplibs -lc" + ;; + esac + fi + # Create the output directory, or remove our outputs if we need to. ! if test -d $output_objdir; then ! $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" ! $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* else ! $show "$mkdir $output_objdir" ! $run $mkdir $output_objdir status=$? ! if test $status -ne 0 && test ! -d $output_objdir; then exit $status fi fi ! # Now set the variables for building old libraries. ! if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then ! oldlibs="$oldlibs $output_objdir/$libname.$libext" ! ! # Transform .lo files to .o files. ! oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi ! if test "$build_libtool_libs" = yes; then ! # Transform deplibs into only deplibs that can be linked in shared. ! name_save=$name ! libname_save=$libname ! release_save=$release ! versuffix_save=$versuffix ! major_save=$major ! # I'm not sure if I'm treating the release correctly. I think ! # release should show up in the -l (ie -lgmp5) so we don't want to ! # add it in twice. Is that correct? ! release="" ! versuffix="" ! major="" ! newdeplibs= ! droppeddeps=no ! case "$deplibs_check_method" in ! pass_all) ! # Don't check for shared/static. Everything works. ! # This might be a little naive. We might want to check ! # whether the library exists or not. But this is on ! # osf3 & osf4 and I'm not really sure... Just ! # implementing what was already the behaviour. ! newdeplibs=$deplibs ! ;; ! test_compile) ! # This code stresses the "libraries are programs" paradigm to its ! # limits. Maybe even breaks it. We compile a program, linking it ! # against the deplibs as a proxy for the library. Then we can check ! # whether they linked in statically or dynamically with ldd. ! $rm conftest.c ! cat > conftest.c </dev/null` ! for potent_lib in $potential_libs; do ! # Follow soft links. ! if ls -lLd "$potlib" 2>/dev/null \ ! | grep " -> " >/dev/null; then ! continue ! fi ! # The statement above tries to avoid entering an ! # endless loop below, in case of cyclic links. ! # We might still enter an endless loop, since a link ! # loop can be closed while we follow links, ! # but so what? ! potlib="$potent_lib" ! while test -h "$potlib" 2>/dev/null; do ! potliblink=`ls -ld $potlib | sed 's/.* -> //'` ! case "$potliblink" in ! [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; ! *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; ! esac ! done ! if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ ! | sed 10q \ ! | egrep "$file_magic_regex" > /dev/null; then ! newdeplibs="$newdeplibs $a_deplib" ! a_deplib="" ! break 2 ! fi ! done ! done ! if test -n "$a_deplib" ; then ! droppeddeps=yes ! echo ! echo "*** Warning: This library needs some functionality provided by $a_deplib." ! echo "*** I have the capability to make that library automatically link in when" ! echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have." ! fi ! else ! # Add a -L argument. ! newdeplibs="$newdeplibs $a_deplib" ! fi ! done # Gone through all deplibs. ! ;; ! none | unknown | *) ! newdeplibs="" ! if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ ! -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | ! grep . >/dev/null; then ! echo ! if test "X$deplibs_check_method" = "Xnone"; then ! echo "*** Warning: inter-library dependencies are not supported in this platform." ! else ! echo "*** Warning: inter-library dependencies are not known to be supported." ! fi ! echo "*** All declared inter-library dependencies are being dropped." ! droppeddeps=yes ! fi ! ;; ! esac ! versuffix=$versuffix_save ! major=$major_save ! release=$release_save ! libname=$libname_save ! name=$name_save ! ! if test "$droppeddeps" = yes; then ! if test "$module" = yes; then ! echo ! echo "*** Warning: libtool could not satisfy all declared inter-library" ! echo "*** dependencies of module $libname. Therefore, libtool will create" ! echo "*** a static module, that should work as long as the dlopening" ! echo "*** application is linked with the -dlopen flag." ! if test -z "$global_symbol_pipe"; then ! echo ! echo "*** However, this would only work if libtool was able to extract symbol" ! echo "*** lists from a program, using \`nm' or equivalent, but libtool could" ! echo "*** not find such a program. So, this module is probably useless." ! echo "*** \`nm' from GNU binutils and a full rebuild may help." ! fi ! if test "$build_old_libs" = no; then ! oldlibs="$output_objdir/$libname.$libext" ! build_libtool_libs=module ! build_old_libs=yes ! else ! build_libtool_libs=no ! fi ! 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 + # 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 ! # Get the real and link names of the library. ! eval library_names=\"$library_names_spec\" ! set dummy $library_names ! realname="$2" ! shift; shift ! if test -n "$soname_spec"; then ! eval soname=\"$soname_spec\" ! else ! soname="$realname" ! fi ! ! lib="$output_objdir/$realname" for link do linknames="$linknames $link" done ! # Ensure that we have .o objects for linkers which dislike .lo ! # (e.g. aix) incase we are running --disable-static ! for obj in $libobjs; do ! oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"` ! if test ! -f $oldobj; then ! $show "${LN_S} $obj $oldobj" ! $run ${LN_S} $obj $oldobj || exit $? ! fi ! done ! # Use standard objects if they are pic ! test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` ! if test -n "$whole_archive_flag_spec"; then ! if test -n "$convenience"; then ! eval libobjs=\"\$libobjs $whole_archive_flag_spec\" ! fi ! else ! gentop="$output_objdir/${outputname}x" ! $show "${rm}r $gentop" ! $run ${rm}r "$gentop" ! $show "mkdir $gentop" ! $run mkdir "$gentop" ! status=$? ! if test $status -ne 0 && test ! -d "$gentop"; then ! exit $status ! fi ! generated="$generated $gentop" ! ! for xlib in $convenience; do ! # Extract the objects. ! case "$xlib" in ! [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; ! *) xabs=`pwd`"/$xlib" ;; ! esac ! xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` ! xdir="$gentop/$xlib" ! ! $show "${rm}r $xdir" ! $run ${rm}r "$xdir" ! $show "mkdir $xdir" ! $run mkdir "$xdir" ! status=$? ! if test $status -ne 0 && test ! -d "$xdir"; then ! exit $status ! fi ! $show "(cd $xdir && $AR x $xabs)" ! $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? ! ! libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` ! done ! fi ! ! if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then ! eval flag=\"$thread_safe_flag_spec\" ! linkopts="$linkopts $flag" ! fi ! ! # Prepare the list of exported symbols ! if test -z "$export_symbols"; then ! if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then ! $show "generating symbol list for \`$libname.la'" ! export_symbols="$output_objdir/$libname.exp" ! $run $rm $export_symbols ! eval cmds=\"$export_symbols_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? ! done ! IFS="$save_ifs" ! if test -n "$export_symbols_regex"; then ! $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" ! $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' ! $show "$mv \"${export_symbols}T\" \"$export_symbols\"" ! $run eval '$mv "${export_symbols}T" "$export_symbols"' ! fi ! fi ! fi ! ! if test -n "$export_symbols" && test -n "$include_expsyms"; then ! $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' ! fi ! ! # Do each of the archive commands. ! if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then ! eval cmds=\"$archive_expsym_cmds\" ! else ! eval cmds=\"$archive_cmds\" ! fi ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? ! done ! IFS="$save_ifs" ! ! # Create links to the real library. ! for linkname in $linknames; do ! if test "$realname" != "$linkname"; then ! $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" ! $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? ! fi ! done ! ! # If -module or -export-dynamic was specified, set the dlname. ! if test "$module" = yes || test "$export_dynamic" = yes; then ! # On all known operating systems, these are identical. ! dlname="$soname" ! fi ! fi ;; ! *.lo | *.o | *.obj) if test -n "$link_against_libtool_libs"; then ! $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 ! exit 1 fi if test -n "$deplibs"; then ! $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi ! if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then ! $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then ! $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 ! fi ! ! if test -n "$xrpath"; then ! $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then ! $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then ! $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case "$output" in *.lo) ! if test -n "$objs"; then ! $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 ! exit 1 ! fi ! libobj="$output" ! obj=`$echo "X$output" | $Xsed -e "$lo2o"` ! ;; *) ! libobj= ! obj="$output" ! ;; esac # Delete the old objects. $run $rm $obj $libobj # Create the old-style object. ! reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` output="$obj" eval cmds=\"$reload_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? done IFS="$save_ifs" *************** *** 1117,1469 **** test -z "$libobj" && exit 0 if test "$build_libtool_libs" != yes; then ! # Create an invalid libtool object if no PIC, so that we don't ! # accidentally link it into a program. ! $show "echo timestamp > $libobj" ! $run eval "echo timestamp > $libobj" || exit $? ! exit 0 fi if test -n "$pic_flag"; then ! # Only do commands if we really have different PIC objects. ! reload_objs="$libobjs" ! output="$libobj" ! eval cmds=\"$reload_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? ! done ! IFS="$save_ifs" else ! # Just create a symlink. ! $show "$LN_S $obj $libobj" ! $run $LN_S $obj $libobj || exit 1 fi exit 0 ;; *) if test -n "$vinfo"; then ! $echo "$modename: warning: \`-version-info' is ignored while linking programs" 1>&2 fi if test -n "$release"; then ! $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2 fi ! if test -n "$rpath"; then # If the user specified any rpath flags, then add them. ! for libdir in $rpath; do ! if test -n "$hardcode_libdir_flag_spec"; then ! if test -n "$hardcode_libdir_separator"; then ! if test -z "$hardcode_libdirs"; then ! # Put the magic libdir with the hardcode flag. ! hardcode_libdirs="$libdir" ! libdir="@HARDCODE_LIBDIRS@" ! else ! # Just accumulate the unique libdirs. ! case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in ! *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ! ;; ! *) ! hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ! ;; ! esac ! libdir= ! fi ! fi ! ! if test -n "$libdir"; then ! eval flag=\"$hardcode_libdir_flag_spec\" ! ! compile_command="$compile_command $flag" ! finalize_command="$finalize_command $flag" ! fi ! elif test -n "$runpath_var"; then ! case "$perm_rpath " in ! *" $libdir "*) ;; ! *) perm_rpath="$perm_rpath $libdir" ;; ! esac ! fi done fi - - # Substitute the hardcoded libdirs into the compile commands. - if test -n "$hardcode_libdir_separator"; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` - fi - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` - finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` - fi ! if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then ! dlsyms="${output}S.c" else ! dlsyms= fi ! if test -n "$dlsyms"; then ! # Add our own program objects to the preloaded list. ! dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` ! # Discover the nlist of each of the dlfiles. ! nlist="$objdir/${output}.nm" ! if test -d $objdir; then ! $show "$rm $nlist ${nlist}T" ! $run $rm "$nlist" "${nlist}T" else ! $show "$mkdir $objdir" ! $run $mkdir $objdir ! status=$? ! if test $status -eq 0 || test -d $objdir; then : ! else ! exit $status ! fi fi ! ! for arg in $dlprefiles; do ! $show "extracting global C symbols from \`$arg'" ! $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" ! done ! ! # Parse the name list into a source file. ! $show "creating $objdir/$dlsyms" ! if test -z "$run"; then ! # Make sure we at least have an empty file. ! test -f "$nlist" || : > "$nlist" ! ! # Try sorting and uniquifying the output. ! if sort "$nlist" | uniq > "$nlist"T; then ! mv -f "$nlist"T "$nlist" ! wcout=`wc "$nlist" 2>/dev/null` ! count=`echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` ! (test "$count" -ge 0) 2>/dev/null || count=-1 ! else ! $rm "$nlist"T ! count=-1 ! fi ! case "$dlsyms" in ! "") ;; ! *.c) ! $echo > "$objdir/$dlsyms" "\ ! /* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */ ! /* Generated by $PROGRAM - GNU $PACKAGE $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ ! #define dld_preloaded_symbol_count some_other_symbol ! #define dld_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " ! if test -f "$nlist"; then ! sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms" else ! echo '/* NONE */' >> "$objdir/$dlsyms" fi ! $echo >> "$objdir/$dlsyms" "\ ! #undef dld_preloaded_symbol_count ! #undef dld_preloaded_symbols #if defined (__STDC__) && __STDC__ ! # define __ptr_t void * #else ! # define __ptr_t char * #endif - /* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ - int dld_preloaded_symbol_count = $count; - /* The mapping between symbol names and symbols. */ ! struct { ! char *name; ! __ptr_t address; } ! dld_preloaded_symbols[] = {\ " ! if test -f "$nlist"; then ! sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms" ! fi ! $echo >> "$objdir/$dlsyms" "\ ! {0, (__ptr_t) 0} }; #ifdef __cplusplus } #endif\ " ! ;; ! *) ! $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 ! exit 1 ! ;; esac - fi ! # Now compile the dynamic symbol file. ! $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")" ! $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $? ! ! # Transform the symbol file into the correct name. ! compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` ! finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` ! elif test "$export_dynamic" != yes; then ! test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2 else ! # We keep going just in case the user didn't refer to ! # dld_preloaded_symbols. The linker will fail if global_symbol_pipe ! # really was required. ! $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 ! ! # Nullify the symbol file. ! compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` ! finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then ! # Replace the output file specification. ! compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` ! finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` ! ! # We have no uninstalled library dependencies, so finalize right now. ! $show "$compile_command" ! $run eval "$compile_command" ! exit $? ! fi ! ! # Replace the output file specification. ! compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'` ! finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'` ! ! # Create the binary in the object directory, then wrap it. ! if test -d $objdir; then : ! else ! $show "$mkdir $objdir" ! $run $mkdir $objdir status=$? ! if test $status -eq 0 || test -d $objdir; then : ! else ! exit $status fi fi if test -n "$shlibpath_var"; then ! # We should set the shlibpath_var ! rpath= ! for dir in $temp_rpath; do ! case "$dir" in ! /* | [A-Za-z]:\\*) ! # Absolute path. ! rpath="$rpath$dir:" ! ;; ! *) ! # Relative path: add a thisdir entry. ! rpath="$rpath\$thisdir/$dir:" ! ;; ! esac ! done ! temp_rpath="$rpath" fi - - # Delete the old output file. - $run $rm $output ! if test -n "$compile_shlibpath"; then ! compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then ! finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi ! if test -n "$runpath_var" && test -n "$perm_rpath"; then ! # We should set the runpath_var. ! rpath= ! for dir in $perm_rpath; do ! rpath="$rpath$dir:" ! done ! compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command" ! finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command" ! fi ! ! case "$hardcode_action" in ! relink) ! # AGH! Flame the AIX and HP-UX people for me, will ya? ! $echo "$modename: warning: using a buggy system linker" 1>&2 ! $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2 ! ;; ! esac ! $show "$compile_command" ! $run eval "$compile_command" || exit $? # Now create the wrapper script. $show "creating $output" ! # Quote the finalize command for shipping. ! finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"` # Quote $echo for shipping. ! qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` # Only actually do things if our run command is non-null. if test -z "$run"; then ! $rm $output ! trap "$rm $output; exit 1" 1 2 15 ! $echo > $output "\ ! #! /bin/sh ! # $output - temporary wrapper script for $objdir/$output ! # Generated by ltmain.sh - GNU $PACKAGE $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # ! # This wrapper script should never be moved out of \``pwd`'. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed='sed -e s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then ! # install mode needs the following variables: link_against_libtool_libs='$link_against_libtool_libs' - finalize_command=\"$finalize_command\" else # When we are sourced in execute mode, \$file and \$echo are already set. ! if test \"\$libtool_execute_magic\" = \"$magic\"; then : ! else echo=\"$qecho\" file=\"\$0\" fi\ " ! $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` --- 2200,2715 ---- test -z "$libobj" && exit 0 if test "$build_libtool_libs" != yes; then ! # Create an invalid libtool object if no PIC, so that we don't ! # accidentally link it into a program. ! $show "echo timestamp > $libobj" ! $run eval "echo timestamp > $libobj" || exit $? ! exit 0 fi if test -n "$pic_flag"; then ! # Only do commands if we really have different PIC objects. ! reload_objs="$libobjs" ! output="$libobj" ! eval cmds=\"$reload_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? ! done ! IFS="$save_ifs" else ! # Just create a symlink. ! $show $rm $libobj ! $run $rm $libobj ! $show "$LN_S $obj $libobj" ! $run $LN_S $obj $libobj || exit $? fi exit 0 ;; + # Anything else should be a program. *) if test -n "$vinfo"; then ! $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then ! $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi ! if test "$preload" = yes; then ! if test "$dlopen" = unknown && test "$dlopen_self" = unknown && ! test "$dlopen_self_static" = unknown; then ! $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." ! fi ! fi ! ! if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. ! for libdir in $rpath $xrpath; do ! # This is the magic to use -rpath. ! case "$compile_rpath " in ! *" $libdir "*) ;; ! *) compile_rpath="$compile_rpath $libdir" ;; ! esac ! case "$finalize_rpath " in ! *" $libdir "*) ;; ! *) finalize_rpath="$finalize_rpath $libdir" ;; ! esac done fi ! # Now hardcode the library paths ! rpath= ! hardcode_libdirs= ! for libdir in $compile_rpath $finalize_rpath; do ! if test -n "$hardcode_libdir_flag_spec"; then ! if test -n "$hardcode_libdir_separator"; then ! if test -z "$hardcode_libdirs"; then ! hardcode_libdirs="$libdir" ! else ! # Just accumulate the unique libdirs. ! case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in ! *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ! ;; ! *) ! hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ! ;; ! esac ! fi ! else ! eval flag=\"$hardcode_libdir_flag_spec\" ! rpath="$rpath $flag" ! fi ! elif test -n "$runpath_var"; then ! case "$perm_rpath " in ! *" $libdir "*) ;; ! *) perm_rpath="$perm_rpath $libdir" ;; ! esac ! fi ! done ! # Substitute the hardcoded libdirs into the rpath. ! if test -n "$hardcode_libdir_separator" && ! test -n "$hardcode_libdirs"; then ! libdir="$hardcode_libdirs" ! eval rpath=\" $hardcode_libdir_flag_spec\" ! fi ! compile_rpath="$rpath" ! ! rpath= ! hardcode_libdirs= ! for libdir in $finalize_rpath; do ! if test -n "$hardcode_libdir_flag_spec"; then ! if test -n "$hardcode_libdir_separator"; then ! if test -z "$hardcode_libdirs"; then ! hardcode_libdirs="$libdir" ! else ! # Just accumulate the unique libdirs. ! case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in ! *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ! ;; ! *) ! hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ! ;; ! esac ! fi ! else ! eval flag=\"$hardcode_libdir_flag_spec\" ! rpath="$rpath $flag" ! fi ! elif test -n "$runpath_var"; then ! case "$finalize_perm_rpath " in ! *" $libdir "*) ;; ! *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; ! esac ! fi ! done ! # Substitute the hardcoded libdirs into the rpath. ! if test -n "$hardcode_libdir_separator" && ! test -n "$hardcode_libdirs"; then ! libdir="$hardcode_libdirs" ! eval rpath=\" $hardcode_libdir_flag_spec\" ! fi ! finalize_rpath="$rpath" ! ! output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` ! if test "X$output_objdir" = "X$output"; then ! output_objdir="$objdir" else ! output_objdir="$output_objdir/$objdir" fi ! # Create the binary in the object directory, then wrap it. ! if test ! -d $output_objdir; then ! $show "$mkdir $output_objdir" ! $run $mkdir $output_objdir ! status=$? ! if test $status -ne 0 && test ! -d $output_objdir; then ! exit $status ! fi ! fi ! if test -n "$libobjs" && test "$build_old_libs" = yes; then ! # Transform all the library objects into standard objects. ! compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` ! finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` ! fi ! dlsyms= ! if test -n "$dlfiles$dlprefiles" || test "$dlself" = yes; then ! if test -n "$NM" && test -n "$global_symbol_pipe"; then ! dlsyms="${outputname}S.c" else ! $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi ! fi ! if test -n "$dlsyms"; then ! case "$dlsyms" in ! "") ;; ! *.c) ! # Discover the nlist of each of the dlfiles. ! nlist="$output_objdir/${outputname}.nm" ! ! $show "$rm $nlist ${nlist}S ${nlist}T" ! $run $rm "$nlist" "${nlist}S" "${nlist}T" ! ! # Parse the name list into a source file. ! $show "creating $output_objdir/$dlsyms" ! ! test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ ! /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ ! /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ ! #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" ! test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" ! ! # Add our own program objects to the symbol list. ! progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` ! for arg in $progfiles; do ! $show "extracting global C symbols from \`$arg'" ! $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" ! done ! ! if test -n "$exclude_expsyms"; then ! $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' ! $run eval '$mv "$nlist"T "$nlist"' ! fi ! ! if test -n "$export_symbols_regex"; then ! $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' ! $run eval '$mv "$nlist"T "$nlist"' ! fi ! ! # Prepare the list of exported symbols ! if test -z "$export_symbols"; then ! export_symbols="$output_objdir/$output.exp" ! $run $rm $export_symbols ! $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' ! else ! $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' ! $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' ! $run eval 'mv "$nlist"T "$nlist"' ! fi ! fi ! ! for arg in $dlprefiles; do ! $show "extracting global C symbols from \`$arg'" ! name=`echo "$arg" | sed -e 's%^.*/%%'` ! $run eval 'echo ": $name " >> "$nlist"' ! $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" ! done ! ! if test -z "$run"; then ! # Make sure we have at least an empty file. ! test -f "$nlist" || : > "$nlist" ! ! if test -n "$exclude_expsyms"; then ! egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T ! $mv "$nlist"T "$nlist" ! fi ! ! # Try sorting and uniquifying the output. ! if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then ! : else ! grep -v "^: " < "$nlist" > "$nlist"S fi ! if test -f "$nlist"S; then ! eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' ! else ! echo '/* NONE */' >> "$output_objdir/$dlsyms" ! fi ! $echo >> "$output_objdir/$dlsyms" "\ + #undef lt_preloaded_symbols + #if defined (__STDC__) && __STDC__ ! # define lt_ptr_t void * #else ! # define lt_ptr_t char * ! # define const #endif /* The mapping between symbol names and symbols. */ ! const struct { ! const char *name; ! lt_ptr_t address; } ! lt_preloaded_symbols[] = {\ " ! sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ ! -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ ! < "$nlist" >> "$output_objdir/$dlsyms" ! $echo >> "$output_objdir/$dlsyms" "\ ! {0, (lt_ptr_t) 0} }; + /* This works around a problem in FreeBSD linker */ + #ifdef FREEBSD_WORKAROUND + static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; + } + #endif + #ifdef __cplusplus } #endif\ " ! fi ! pic_flag_for_symtable= ! case "$host" in ! # compiling the symbol table file with pic_flag works around ! # a FreeBSD bug that causes programs to crash when -lm is ! # linked before any other PIC object. But we must not use ! # pic_flag when linking with -static. The problem exists in ! # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. ! *-*-freebsd2*|*-*-freebsd3.0*) ! case "$compile_command " in ! *" -static "*) ;; ! *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; ! esac esac ! # Now compile the dynamic symbol file. ! $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" ! $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? ! ! # Clean up the generated files. ! $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" ! $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" ! ! # Transform the symbol file into the correct name. ! compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ! finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ! ;; ! *) ! $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 ! exit 1 ! ;; ! esac else ! # We keep going just in case the user didn't refer to ! # lt_preloaded_symbols. The linker will fail if global_symbol_pipe ! # really was required. ! ! # Nullify the symbol file. ! compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` ! finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then ! # Replace the output file specification. ! compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` ! link_command="$compile_command$compile_rpath" ! ! # We have no uninstalled library dependencies, so finalize right now. ! $show "$link_command" ! $run eval "$link_command" status=$? ! ! # Delete the generated files. ! if test -n "$dlsyms"; then ! $show "$rm $output_objdir/${outputname}S.${objext}" ! $run $rm "$output_objdir/${outputname}S.${objext}" fi + + exit $status fi if test -n "$shlibpath_var"; then ! # We should set the shlibpath_var ! rpath= ! for dir in $temp_rpath; do ! case "$dir" in ! [\\/]* | [A-Za-z]:[\\/]*) ! # Absolute path. ! rpath="$rpath$dir:" ! ;; ! *) ! # Relative path: add a thisdir entry. ! rpath="$rpath\$thisdir/$dir:" ! ;; ! esac ! done ! temp_rpath="$rpath" fi ! if test -n "$compile_shlibpath$finalize_shlibpath"; then ! compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then ! finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi ! compile_var= ! finalize_var= ! if test -n "$runpath_var"; then ! if test -n "$perm_rpath"; then ! # We should set the runpath_var. ! rpath= ! for dir in $perm_rpath; do ! rpath="$rpath$dir:" ! done ! compile_var="$runpath_var=\"$rpath\$$runpath_var\" " ! fi ! if test -n "$finalize_perm_rpath"; then ! # We should set the runpath_var. ! rpath= ! for dir in $finalize_perm_rpath; do ! rpath="$rpath$dir:" ! done ! finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " ! fi ! fi ! if test "$hardcode_action" = relink; then ! # Fast installation is not supported ! link_command="$compile_var$compile_command$compile_rpath" ! relink_command="$finalize_var$finalize_command$finalize_rpath" ! ! $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 ! $echo "$modename: \`$output' will be relinked during installation" 1>&2 ! else ! if test "$fast_install" != no; then ! link_command="$finalize_var$compile_command$finalize_rpath" ! if test "$fast_install" = yes; then ! relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` ! else ! # fast_install is set to needless ! relink_command= ! fi ! else ! link_command="$compile_var$compile_command$compile_rpath" ! relink_command="$finalize_var$finalize_command$finalize_rpath" ! fi ! fi ! ! # Replace the output file specification. ! link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` ! ! # Delete the old output files. ! $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + $show "$link_command" + $run eval "$link_command" || exit $? + # Now create the wrapper script. $show "creating $output" ! # Quote the relink command for shipping. ! if test -n "$relink_command"; then ! relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` ! fi # Quote $echo for shipping. ! if test "X$echo" = "X$SHELL $0 --fallback-echo"; then ! case "$0" in ! [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; ! *) qecho="$SHELL `pwd`/$0 --fallback-echo";; ! esac ! qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` ! else ! qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` ! fi # Only actually do things if our run command is non-null. if test -z "$run"; then ! # win32 will think the script is a binary if it has ! # a .exe suffix, so we strip it off here. ! case $output in ! *.exe) output=`echo $output|sed 's,.exe$,,'` ;; ! esac ! $rm $output ! trap "$rm $output; exit 1" 1 2 15 ! $echo > $output "\ ! #! $SHELL ! # $output - temporary wrapper script for $objdir/$outputname ! # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # ! # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed='sed -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi + relink_command=\"$relink_command\" + # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then ! # install mode needs the following variable: link_against_libtool_libs='$link_against_libtool_libs' else # When we are sourced in execute mode, \$file and \$echo are already set. ! if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi fi\ " ! $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` *************** *** 1477,1483 **** # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in ! /* | [A-Za-z]:\\*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi --- 2723,2729 ---- # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in ! [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi *************** *** 1489,1523 **** # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" progdir=\"\$thisdir/$objdir\" ! program='$output' if test -f \"\$progdir/\$program\"; then" ! # Export our shlibpath_var if we have one. ! if test -n "$shlibpath_var" && test -n "$temp_rpath"; then ! $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var ! $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\` export $shlibpath_var " ! fi ! $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. ! # Export the path to the program. PATH=\"\$progdir:\$PATH\" export PATH exec \$program \${1+\"\$@\"} ! \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit 1 fi --- 2735,2831 ---- # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" + " + + if test "$fast_install" = yes; then + echo >> $output "\ + program=lt-'$outputname' + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if (cd \"\$thisdir\" && eval \$relink_command); then : + else + $rm \"\$progdir/\$file\" + exit 1 + fi + fi + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + echo >> $output "\ + program='$outputname' progdir=\"\$thisdir/$objdir\" ! " ! fi + echo >> $output "\ + if test -f \"\$progdir/\$program\"; then" ! # Export our shlibpath_var if we have one. ! if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then ! $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var ! # The second colon is a workaround for a bug in BeOS R4 sed ! $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var + " + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH " ! fi ! $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. ! " ! case $host in ! *-*-cygwin* | *-*-mingw | *-*-os2*) ! # win32 systems need to use the prog path for dll ! # lookup to work ! $echo >> $output "\ ! exec \$progdir\\\\\$program \${1+\"\$@\"} ! " ! ;; ! *) ! $echo >> $output "\ # Export the path to the program. PATH=\"\$progdir:\$PATH\" export PATH exec \$program \${1+\"\$@\"} ! " ! ;; ! esac ! $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit 1 fi *************** *** 1530,1574 **** fi fi\ " ! chmod +x $output fi exit 0 ;; esac # See if we need to build an old-fashioned archive. ! if test "$build_old_libs" = "yes"; then ! # Transform .lo files to .o files. ! oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then eval cmds=\"$old_archive_from_new_cmds\" else eval cmds=\"$old_archive_cmds\" fi ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Now create the libtool archive. case "$output" in *.la) old_library= ! test "$build_old_libs" = yes && old_library="$libname.a" ! $show "creating $output" # Only create the output if not a dry run. if test -z "$run"; then ! $echo > $output "\ ! # $output - a libtool library file ! # Generated by ltmain.sh - GNU $PACKAGE $VERSION # The name that we can dlopen(3). dlname='$dlname' --- 2838,2965 ---- fi fi\ " ! chmod +x $output fi exit 0 ;; esac # See if we need to build an old-fashioned archive. ! for oldlib in $oldlibs; do ! ! if test "$build_libtool_libs" = convenience; then ! oldobjs="$libobjs_save" ! addlibs="$convenience" ! build_libtool_libs=no ! else ! if test "$build_libtool_libs" = module; then ! oldobjs="$libobjs_save" ! build_libtool_libs=no ! else ! oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` ! fi ! addlibs="$old_convenience" ! fi ! ! if test -n "$addlibs"; then ! gentop="$output_objdir/${outputname}x" ! $show "${rm}r $gentop" ! $run ${rm}r "$gentop" ! $show "mkdir $gentop" ! $run mkdir "$gentop" ! status=$? ! if test $status -ne 0 && test ! -d "$gentop"; then ! exit $status ! fi ! generated="$generated $gentop" ! ! # Add in members from convenience archives. ! for xlib in $addlibs; do ! # Extract the objects. ! case "$xlib" in ! [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; ! *) xabs=`pwd`"/$xlib" ;; ! esac ! xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` ! xdir="$gentop/$xlib" ! ! $show "${rm}r $xdir" ! $run ${rm}r "$xdir" ! $show "mkdir $xdir" ! $run mkdir "$xdir" ! status=$? ! if test $status -ne 0 && test ! -d "$xdir"; then ! exit $status ! fi ! $show "(cd $xdir && $AR x $xabs)" ! $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? ! ! oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` ! done ! fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then eval cmds=\"$old_archive_from_new_cmds\" else + # Ensure that we have .o objects in place incase we decided + # not to build a shared library, and have fallen back to building + # static libs even though --disable-static was passed! + for oldobj in $oldobjs; do + if test ! -f $oldobj; then + obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"` + $show "${LN_S} $obj $oldobj" + $run ${LN_S} $obj $oldobj || exit $? + fi + done + eval cmds=\"$old_archive_cmds\" fi ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? done IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated fi # Now create the libtool archive. case "$output" in *.la) old_library= ! test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" + if test -n "$xrpath"; then + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + done + dependency_libs="$temp_xrpath $dependency_libs" + fi + # Only create the output if not a dry run. if test -z "$run"; then ! 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 "\ ! # $outputname - a libtool library file ! # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP ! # ! # Please DO NOT delete this file! ! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$dlname' *************** *** 1587,1601 **** age=$age revision=$revision # Directory that this library needs to be installed in: libdir='$install_libdir'\ " fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. ! $show "(cd $objdir && $LN_S ../$output $output)" ! $run eval "(cd $objdir && $LN_S ../$output $output)" || exit 1 ;; esac exit 0 --- 2978,2996 ---- age=$age revision=$revision + # Is this an already installed library? + installed=$installed + # Directory that this library needs to be installed in: libdir='$install_libdir'\ " + done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. ! $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" ! $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? ;; esac exit 0 *************** *** 1605,1613 **** install) modename="$modename: install" ! # There may be an optional /bin/sh argument at the beginning of # install_prog (especially on Windows NT). ! if test "$nonopt" = "$SHELL"; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case "$arg" in --- 3000,3008 ---- install) modename="$modename: install" ! # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). ! if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case "$arg" in *************** *** 1639,1652 **** opts= prev= install_type= ! isdir= stripme= for arg do if test -n "$dest"; then ! files="$files $dest" ! dest="$arg" ! continue fi case "$arg" in --- 3034,3047 ---- opts= prev= install_type= ! isdir=no stripme= for arg do if test -n "$dest"; then ! files="$files $dest" ! dest="$arg" ! continue fi case "$arg" in *************** *** 1656,1675 **** -m) prev="-m" ;; -o) prev="-o" ;; -s) ! stripme=" -s" ! continue ! ;; -*) ;; *) ! # If the previous option needed an argument, then skip it. ! if test -n "$prev"; then ! prev= ! else ! dest="$arg" ! continue ! fi ! ;; esac # Aesthetically quote the argument. --- 3051,3070 ---- -m) prev="-m" ;; -o) prev="-o" ;; -s) ! stripme=" -s" ! continue ! ;; -*) ;; *) ! # If the previous option needed an argument, then skip it. ! if test -n "$prev"; then ! prev= ! else ! dest="$arg" ! continue ! fi ! ;; esac # Aesthetically quote the argument. *************** *** 1696,1704 **** if test -z "$files"; then if test -z "$dest"; then ! $echo "$modename: no file or destination specified" 1>&2 else ! $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit 1 --- 3091,3099 ---- if test -z "$files"; then if test -z "$dest"; then ! $echo "$modename: no file or destination specified" 1>&2 else ! $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit 1 *************** *** 1709,1715 **** # Check to see that the destination is a directory. test -d "$dest" && isdir=yes ! if test -n "$isdir"; then destdir="$dest" destname= else --- 3104,3110 ---- # Check to see that the destination is a directory. test -d "$dest" && isdir=yes ! if test "$isdir" = yes; then destdir="$dest" destname= else *************** *** 1720,1742 **** # Not a directory, so check to see that there is only one file specified. set dummy $files if test $# -gt 2; then ! $echo "$modename: \`$dest' is not a directory" 1>&2 ! $echo "$help" 1>&2 ! exit 1 fi fi case "$destdir" in ! /* | [A-Za-z]:\\*) ;; *) for file in $files; do ! case "$file" in ! *.lo) ;; ! *) ! $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! ;; ! esac done ;; esac --- 3115,3137 ---- # Not a directory, so check to see that there is only one file specified. set dummy $files if test $# -gt 2; then ! $echo "$modename: \`$dest' is not a directory" 1>&2 ! $echo "$help" 1>&2 ! exit 1 fi fi case "$destdir" in ! [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do ! case "$file" in ! *.lo) ;; ! *) ! $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! ;; ! esac done ;; esac *************** *** 1752,1960 **** # Do each installation. case "$file" in ! *.a) ! # Do the static libraries later. ! staticlibs="$staticlibs $file" ! ;; *.la) ! # Check to see that this really is a libtool archive. ! if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : ! else ! $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! fi ! ! library_names= ! old_library= ! # If there is no directory component, then add one. ! case "$file" in ! */* | *\\*) . $file ;; ! *) . ./$file ;; ! esac ! ! # Add the libdir to current_libdirs if it is the destination. ! if test "X$destdir" = "X$libdir"; then ! case "$current_libdirs " in ! *" $libdir "*) ;; ! *) current_libdirs="$current_libdirs $libdir" ;; ! esac ! else ! # Note the libdir as a future libdir. ! case "$future_libdirs " in ! *" $libdir "*) ;; ! *) future_libdirs="$future_libdirs $libdir" ;; ! esac ! fi ! ! dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" ! test "X$dir" = "X$file/" && dir= ! dir="$dir$objdir" ! ! # See the names of the shared library. ! set dummy $library_names ! if test -n "$2"; then ! realname="$2" ! shift ! shift ! ! # Install the shared library and build the symlinks. ! $show "$install_prog $dir/$realname $destdir/$realname" ! $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? ! test "X$dlname" = "X$realname" && dlname= ! ! if test $# -gt 0; then ! # Delete the old symlinks. ! rmcmd="$rm" ! for linkname ! do ! rmcmd="$rmcmd $destdir/$linkname" ! done ! $show "$rmcmd" ! $run $rmcmd ! ! # ... and create new ones. ! for linkname ! do ! test "X$dlname" = "X$linkname" && dlname= ! $show "(cd $destdir && $LN_S $realname $linkname)" ! $run eval "(cd $destdir && $LN_S $realname $linkname)" ! done ! fi ! ! if test -n "$dlname"; then ! # Install the dynamically-loadable library. ! $show "$install_prog $dir/$dlname $destdir/$dlname" ! $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $? ! fi ! ! # Do each command in the postinstall commands. ! lib="$destdir/$realname" ! eval cmds=\"$postinstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? ! done ! IFS="$save_ifs" ! fi ! ! # Install the pseudo-library for information purposes. ! name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` ! $show "$install_prog $file $destdir/$name" ! $run eval "$install_prog $file $destdir/$name" || exit $? ! ! # Maybe install the static library, too. ! test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ! ;; *.lo) ! # Install (i.e. copy) a libtool object. ! # Figure out destination file name, if it wasn't already specified. ! if test -n "$destname"; then ! destfile="$destdir/$destname" ! else ! destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` ! destfile="$destdir/$destfile" ! fi ! ! # Deduce the name of the destination old-style object file. ! case "$destfile" in ! *.lo) ! staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'` ! ;; ! *.o) ! staticdest="$destfile" ! destfile= ! ;; ! *) ! $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! ;; ! esac ! ! # Install the libtool object if requested. ! if test -n "$destfile"; then ! $show "$install_prog $file $destfile" ! $run eval "$install_prog $file $destfile" || exit $? ! fi ! ! # Install the old object if enabled. ! if test "$build_old_libs" = yes; then ! # Deduce the name of the old-style object file. ! staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'` ! ! $show "$install_prog $staticobj $staticdest" ! $run eval "$install_prog \$staticobj \$staticdest" || exit $? ! fi ! exit 0 ! ;; *) ! # Do a test to see if this is really a libtool program. ! if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then ! link_against_libtool_libs= ! finalize_command= ! ! # If there is no directory component, then add one. ! case "$file" in ! */* | *\\*) . $file ;; ! *) . ./$file ;; ! esac ! ! # Check the variables that should have been set. ! if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then ! $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 ! exit 1 ! fi ! ! finalize=yes ! for lib in $link_against_libtool_libs; do ! # Check to see that each library is installed. ! libdir= ! if test -f "$lib"; then ! # If there is no directory component, then add one. ! case "$lib" in ! */* | *\\*) . $lib ;; ! *) . ./$lib ;; ! esac ! fi ! libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" ! if test -z "$libdir"; then ! $echo "$modename: warning: \`$lib' contains no -rpath information" 1>&2 ! elif test -f "$libfile"; then : ! else ! $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 ! finalize=no ! fi ! done ! ! if test "$hardcode_action" = relink; then ! if test "$finalize" = yes; then ! $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2 ! $show "$finalize_command" ! if $run eval "$finalize_command"; then : ! else ! $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ! continue ! fi ! file="$objdir/$file"T ! else ! $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2 ! fi ! else ! # Install the binary that we compiled earlier. file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` ! fi ! fi ! $show "$install_prog$stripme $file $dest" ! $run eval "$install_prog\$stripme \$file \$dest" || exit $? ! ;; esac done --- 3147,3368 ---- # Do each installation. case "$file" in ! *.a | *.lib) ! # Do the static libraries later. ! staticlibs="$staticlibs $file" ! ;; *.la) ! # Check to see that this really is a libtool archive. ! if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : ! else ! $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! fi ! ! library_names= ! old_library= ! # If there is no directory component, then add one. ! case "$file" in ! */* | *\\*) . $file ;; ! *) . ./$file ;; ! esac ! ! # Add the libdir to current_libdirs if it is the destination. ! if test "X$destdir" = "X$libdir"; then ! case "$current_libdirs " in ! *" $libdir "*) ;; ! *) current_libdirs="$current_libdirs $libdir" ;; ! esac ! else ! # Note the libdir as a future libdir. ! case "$future_libdirs " in ! *" $libdir "*) ;; ! *) future_libdirs="$future_libdirs $libdir" ;; ! esac ! fi ! ! dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" ! test "X$dir" = "X$file/" && dir= ! dir="$dir$objdir" ! ! # See the names of the shared library. ! set dummy $library_names ! if test -n "$2"; then ! realname="$2" ! shift ! shift ! ! # Install the shared library and build the symlinks. ! $show "$install_prog $dir/$realname $destdir/$realname" ! $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? ! test "X$dlname" = "X$realname" && dlname= ! ! if test $# -gt 0; then ! # Delete the old symlinks, and create new ones. ! for linkname ! do ! test "X$dlname" = "X$linkname" && dlname= ! if test "$linkname" != "$realname"; then ! $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" ! $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" ! fi ! done ! fi ! ! if test -n "$dlname"; then ! # Install the dynamically-loadable library. ! $show "$install_prog $dir/$dlname $destdir/$dlname" ! $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $? ! fi + # Do each command in the postinstall commands. + lib="$destdir/$realname" + eval cmds=\"$postinstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + *.lo) ! # Install (i.e. copy) a libtool object. ! ! # Figure out destination file name, if it wasn't already specified. ! if test -n "$destname"; then ! destfile="$destdir/$destname" ! else ! destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` ! destfile="$destdir/$destfile" ! fi ! ! # Deduce the name of the destination old-style object file. ! case "$destfile" in ! *.lo) ! staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ! ;; ! *.o | *.obj) ! staticdest="$destfile" ! destfile= ! ;; ! *) ! $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! ;; ! esac ! ! # Install the libtool object if requested. ! if test -n "$destfile"; then ! $show "$install_prog $file $destfile" ! $run eval "$install_prog $file $destfile" || exit $? ! fi ! ! # Install the old object if enabled. ! if test "$build_old_libs" = yes; then ! # Deduce the name of the old-style object file. ! staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` ! $show "$install_prog $staticobj $staticdest" ! $run eval "$install_prog \$staticobj \$staticdest" || exit $? ! fi ! exit 0 ! ;; *) ! # Figure out destination file name, if it wasn't already specified. ! if test -n "$destname"; then ! destfile="$destdir/$destname" ! else ! destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` ! destfile="$destdir/$destfile" ! fi ! ! # Do a test to see if this is really a libtool program. ! if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then ! link_against_libtool_libs= ! relink_command= ! ! # If there is no directory component, then add one. ! case "$file" in ! */* | *\\*) . $file ;; ! *) . ./$file ;; ! esac ! ! # Check the variables that should have been set. ! if test -z "$link_against_libtool_libs"; then ! $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 ! exit 1 ! fi ! ! finalize=yes ! for lib in $link_against_libtool_libs; do ! # Check to see that each library is installed. ! libdir= ! if test -f "$lib"; then ! # If there is no directory component, then add one. ! case "$lib" in ! */* | *\\*) . $lib ;; ! *) . ./$lib ;; ! esac ! fi ! libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" ! if test -n "$libdir" && test ! -f "$libfile"; then ! $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 ! finalize=no ! fi ! done ! ! outputname= ! if test "$fast_install" = no && test -n "$relink_command"; then ! if test "$finalize" = yes && test -z "$run"; then ! tmpdir="/tmp" ! test -n "$TMPDIR" && tmpdir="$TMPDIR" ! tmpdir="$tmpdir/libtool-$$" ! if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : ! else ! $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 ! continue ! fi ! outputname="$tmpdir/$file" ! # Replace the output file specification. ! relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` ! ! $show "$relink_command" ! if $run eval "$relink_command"; then : ! else ! $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ! ${rm}r "$tmpdir" ! continue ! fi ! file="$outputname" ! else ! $echo "$modename: warning: cannot relink \`$file'" 1>&2 ! fi ! else ! # Install the binary that we compiled earlier. file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` ! fi ! fi ! $show "$install_prog$stripme $file $destfile" ! $run eval "$install_prog\$stripme \$file \$destfile" || exit $? ! test -n "$outputname" && ${rm}r "$tmpdir" ! ;; esac done *************** *** 1969,1979 **** # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? done IFS="$save_ifs" done --- 3377,3387 ---- # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? done IFS="$save_ifs" done *************** *** 1996,2038 **** finish) modename="$modename: finish" libdirs="$nonopt" if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do ! libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. eval cmds=\"$finish_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" ! done ! IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" ! $run eval "$cmds" fi done fi ! echo "------------------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do echo " $libdir" done echo ! echo "To link against installed libraries in a given directory, LIBDIR," ! echo "you must use the \`-LLIBDIR' flag during linking." ! echo ! echo " You will also need to do one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" --- 3404,3452 ---- finish) modename="$modename: finish" libdirs="$nonopt" + admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do ! libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. eval cmds=\"$finish_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || admincmds="$admincmds ! $cmd" ! done ! IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" ! $run eval "$cmds" || admincmds="$admincmds ! $cmds" fi done fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 ! echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do echo " $libdir" done echo ! echo "If you ever happen to want to link against installed libraries" ! echo "in a given directory, LIBDIR, you must either use libtool, and" ! echo "specify the full pathname of the library, or use \`-LLIBDIR'" ! echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" *************** *** 2047,2059 **** echo " - use the \`$flag' linker flag" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" echo "more information, such as the ld(1) and ld.so(8) manual pages." ! echo "------------------------------------------------------------------------------" exit 0 ;; --- 3461,3476 ---- echo " - use the \`$flag' linker flag" fi + if test -n "$admincmds"; then + echo " - have your system administrator run these commands:$admincmds" + fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" echo "more information, such as the ld(1) and ld.so(8) manual pages." ! echo "----------------------------------------------------------------------" exit 0 ;; *************** *** 2071,2078 **** # Handle -dlopen flags immediately. for file in $execute_dlfiles; do ! if test -f "$file"; then : ! else $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit 1 --- 3488,3494 ---- # Handle -dlopen flags immediately. for file in $execute_dlfiles; do ! if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit 1 *************** *** 2081,2102 **** dir= case "$file" in *.la) ! # Check to see that this really is a libtool archive. ! if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : ! else ! $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! fi # Read the libtool library. dlname= library_names= ! # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; ! *) . ./$file ;; esac # Skip this library if it cannot be dlopened. --- 3497,3518 ---- dir= case "$file" in *.la) ! # Check to see that this really is a libtool archive. ! if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : ! else ! $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! fi # Read the libtool library. dlname= library_names= ! # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; ! *) . ./$file ;; esac # Skip this library if it cannot be dlopened. *************** *** 2125,2131 **** *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 ! continue ;; esac --- 3541,3547 ---- *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 ! continue ;; esac *************** *** 2152,2159 **** case "$file" in -*) ;; *) ! # Do a test to see if this is really a libtool program. ! if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; --- 3568,3575 ---- case "$file" in -*) ;; *) ! # Do a test to see if this is really a libtool program. ! if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; *************** *** 2163,2169 **** # Transform arg to wrapped name. file="$progdir/$program" fi ! ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` --- 3579,3585 ---- # Transform arg to wrapped name. file="$progdir/$program" fi ! ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` *************** *** 2174,2179 **** --- 3590,3603 ---- # Export the shlibpath_var. eval "export $shlibpath_var" + # Restore saved enviroment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + # Now actually exec the command. eval "exec \$cmd$args" *************** *** 2217,2233 **** case "$name" in *.la) ! # Possibly a libtool archive, so verify it. ! if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then ! . $dir/$name ! ! # Delete the libtool libraries and symlinks. ! for n in $library_names; do ! rmfiles="$rmfiles $dir/$n" ! test "X$n" = "X$dlname" && dlname= ! done ! test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname" ! test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" $show "$rm $rmfiles" $run $rm $rmfiles --- 3641,3657 ---- case "$name" in *.la) ! # Possibly a libtool archive, so verify it. ! if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then ! . $dir/$name ! ! # Delete the libtool libraries and symlinks. ! for n in $library_names; do ! rmfiles="$rmfiles $dir/$n" ! test "X$n" = "X$dlname" && dlname= ! done ! test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname" ! test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" $show "$rm $rmfiles" $run $rm $rmfiles *************** *** 2235,2241 **** if test -n "$library_names"; then # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" --- 3659,3665 ---- if test -n "$library_names"; then # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" *************** *** 2244,2253 **** IFS="$save_ifs" fi ! if test -n "$old_library"; then # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" --- 3668,3677 ---- IFS="$save_ifs" fi ! if test -n "$old_library"; then # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" *************** *** 2256,2276 **** IFS="$save_ifs" fi ! # FIXME: should reinstall the best remaining shared library. ! fi ! ;; *.lo) ! if test "$build_old_libs" = yes; then ! oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'` ! rmfiles="$rmfiles $dir/$oldobj" ! fi $show "$rm $rmfiles" $run $rm $rmfiles ! ;; *) ! $show "$rm $rmfiles" $run $rm $rmfiles ;; esac --- 3680,3700 ---- IFS="$save_ifs" fi ! # FIXME: should reinstall the best remaining shared library. ! fi ! ;; *.lo) ! if test "$build_old_libs" = yes; then ! oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` ! rmfiles="$rmfiles $dir/$oldobj" ! fi $show "$rm $rmfiles" $run $rm $rmfiles ! ;; *) ! $show "$rm $rmfiles" $run $rm $rmfiles ;; esac *************** *** 2297,2304 **** Provide generalized library-building support services. -n, --dry-run display commands without modifying any files ! --features display configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --- 3721,3730 ---- Provide generalized library-building support services. + --config show all configuration variables + --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files ! --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] *************** *** 2326,2331 **** --- 3752,3762 ---- Compile a source file into a libtool library object. + This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -static always build a \`.o' file suitable for static linking + COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. *************** *** 2392,2409 **** The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime ! -dlpreopen FILE link in FILE and add its symbols to dld_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] ! specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. --- 3823,3847 ---- The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime ! -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] ! specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. *************** *** 2411,2428 **** treated as uninstalled libtool libraries, other files are standard or library object files. ! If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only ! library objects (\`.lo' files) may be specified, and \`-rpath' is required. ! If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar' ! and \`ranlib'. ! If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is ! created, otherwise an executable program is created." ;; uninstall) ! $echo "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. --- 3849,3867 ---- treated as uninstalled libtool libraries, other files are standard or library object files. ! If the OUTPUT-FILE ends in \`.la', then a libtool library is created, ! only library objects (\`.lo' files) may be specified, and \`-rpath' is ! required, except when creating a convenience library. ! If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created ! using \`ar' and \`ranlib', or on Windows using \`lib'. ! If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file ! is created, otherwise an executable program is created." ;; uninstall) ! $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. Index: libtool/mkstamp diff -c /dev/null libtool/mkstamp:1.1 *** /dev/null Thu Apr 29 16:11:01 1999 --- libtool/mkstamp Mon Jan 25 07:57:48 1999 *************** *** 0 **** --- 1,37 ---- + #! /bin/sh + + # mkstamp - extract data from Revision and Date RCS tags in a file + # Copyright (C) 1999 Free Software Foundation, Inc. + # Alexandre Oliva + # + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + # This script expects to find a line containing both Revision and Date + # tags, and it edits this line so that it looks line ` ($rev $date)' + + # Command-line arguments are passed down to sed; additional -e cmd + # arguments are acceptable. If no input filename is specified in the + # command line, sed will read from stdin. + + exec sed -e ' + s%.*\$''Revision: \([^$]*\) \$.*\$''Date: \([^$]*\) \$.*% (\1 \2)% + t end + d + : end' ${1+"$@"} Index: libtool/cdemo/.cvsignore diff -c /dev/null libtool/cdemo/.cvsignore:1.2 *** /dev/null Thu Apr 29 16:15:52 1999 --- libtool/cdemo/.cvsignore Sun Mar 14 06:42:50 1999 *************** *** 0 **** --- 1,13 ---- + .deps + .libs + Makefile + Makefile.in + acinclude.m4 + aclocal.m4 + configure + config.* + conftest* + libtool + *.lo + *.la + cdemo Index: libtool/cdemo/Makefile.am diff -c /dev/null libtool/cdemo/Makefile.am:1.4.2.2 *** /dev/null Thu Apr 29 16:15:52 1999 --- libtool/cdemo/Makefile.am Tue Mar 30 21:25:32 1999 *************** *** 0 **** --- 1,21 ---- + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = no-dependencies foreign + + EXTRA_DIST = acinclude.m4 + + noinst_LTLIBRARIES = libfoo.la + + libfoo_la_SOURCES = foo.c + libfoo_la_LIBADD = $(LIBM) + + noinst_HEADERS = foo.h + + bin_PROGRAMS = cdemo + + cdemo_SOURCES = main.c + cdemo_LDADD = libfoo.la + + $(OBJECTS): libtool + libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status --recheck Index: libtool/cdemo/README diff -c /dev/null libtool/cdemo/README:1.2 *** /dev/null Thu Apr 29 16:15:52 1999 --- libtool/cdemo/README Thu Jan 14 14:05:21 1999 *************** *** 0 **** --- 1,4 ---- + This is cdemo, an example package that uses GNU libtool with an + Automake-generated environment to build two simple libraries and programs. + + It demonstrates how to build convenience libraries Index: libtool/cdemo/configure.in diff -c /dev/null libtool/cdemo/configure.in:1.6.2.2 *** /dev/null Thu Apr 29 16:15:52 1999 --- libtool/cdemo/configure.in Tue Mar 30 21:25:32 1999 *************** *** 0 **** --- 1,17 ---- + dnl Process this file with autoconf to create configure. + + AC_INIT(main.c) + AM_INIT_AUTOMAKE(cdemo,0.1) + + AC_PROG_CC + AC_EXEEXT + AM_PROG_LIBTOOL + AC_SUBST(LIBTOOL_DEPS) + + AC_CHECK_HEADERS(math.h) + + AC_CHECK_LIBM + AC_SUBST(LIBM) + + dnl Output the makefile + AC_OUTPUT(Makefile) Index: libtool/cdemo/foo.c diff -c /dev/null libtool/cdemo/foo.c:1.1 *** /dev/null Thu Apr 29 16:15:52 1999 --- libtool/cdemo/foo.c Mon Feb 15 17:48:24 1999 *************** *** 0 **** --- 1,40 ---- + /* foo.c -- trivial test library + Copyright (C) 1998-1999 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "foo.h" + #include + + #ifdef HAVE_MATH_H + #include + #endif + + int + foo() + { + printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0)); + return FOO_RET; + } + + int + hello() + { + printf ("** This is libfoo **\n"); + return HELLO_RET; + } Index: libtool/cdemo/foo.h diff -c /dev/null libtool/cdemo/foo.h:1.1 *** /dev/null Thu Apr 29 16:15:52 1999 --- libtool/cdemo/foo.h Wed Jan 13 09:28:30 1999 *************** *** 0 **** --- 1,29 ---- + /* foo.h -- interface to the libfoo* libraries + Copyright (C) 1998-1999 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + /* Only include this header file once. */ + #ifndef _FOO_H_ + #define _FOO_H_ 1 + + /* Silly constants that the functions return. */ + #define HELLO_RET 0xe110 + #define FOO_RET 0xf00 + + #endif /* !_FOO_H_ */ Index: libtool/cdemo/main.c diff -c /dev/null libtool/cdemo/main.c:1.3 *** /dev/null Thu Apr 29 16:15:52 1999 --- libtool/cdemo/main.c Mon Feb 15 17:46:47 1999 *************** *** 0 **** --- 1,43 ---- + /* main.c -- cdemo test program + Copyright (C) 1998-1999 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "foo.h" + #include + + + int + main (argc,argv) + int argc; + char **argv; + { + int value; + + printf ("Welcome GNU libtool cdemo!\n"); + + value = hello(); + printf ("hello returned: %i\n", value); + if (value == HELLO_RET) + printf("hello is ok!\n"); + + if (foo () == FOO_RET) + printf("foo is ok!\n"); + + return 0; + } Index: libtool/demo/.cvsignore diff -c /dev/null libtool/demo/.cvsignore:1.2.2.1 *** /dev/null Thu Apr 29 16:15:52 1999 --- libtool/demo/.cvsignore Wed Mar 17 07:53:17 1999 *************** *** 0 **** --- 1,19 ---- + .deps + .libs + Makefile + Makefile.in + acinclude.m4 + aclocal.m4 + configure + config.* + conftest* + hc-direct + hc-libflag + hc-libpath + hc-minusL + libtool + *.lo + *.la + hell + hell.static + helldl Index: libtool/demo/Makefile.am diff -c libtool/demo/Makefile.am:1.1.1.24 libtool/demo/Makefile.am:1.14.2.8 *** libtool/demo/Makefile.am:1.1.1.24 Thu Feb 12 06:45:15 1998 --- libtool/demo/Makefile.am Sun Apr 25 10:35:26 1999 *************** *** 1,43 **** ! # A brief demonstration of using Automake with Libtool. -*-Makefile-*- ! # ! # NOTE: Don't forget that in the libtool distribution, files in this ! # directory are distributed by the demo_distfiles variable in the top ! # level Makefile. ! AUTOMAKE_OPTIONS = foreign ! EXTRA_DIST = $(TESTS) acinclude.m4 ! hardcode_tests = hc-direct hc-libflag hc-libpath hc-minusL ! CLEANFILES = $(hardcode_tests) # Build a libtool library, libhello.la for installation in libdir. lib_LTLIBRARIES = libhello.la libhello_la_SOURCES = hello.c foo.c ! libhello_la_LDFLAGS = -version-info 3:12:1 -lm include_HEADERS = foo.h ! bin_PROGRAMS = hell hell.debug helldl # Build hell from main.c and libhello.la hell_SOURCES = main.c hell_LDADD = libhello.la ! # Create an easier-to-debug version of hell. ! hell_debug_SOURCES = main.c ! hell_debug_LDADD = libhello.la ! hell_debug_LDFLAGS = -static # Create a version of hell that does a preloaded dlopen. helldl_SOURCES = dlmain.c helldl_LDFLAGS = -export-dynamic -dlpreopen libhello.la ! helldl: libhello.la # Unfortunately, in order to test libtool thoroughly, we need access # to its private directory. ! objdir = `sed -n -e 's/^objdir=\"\(.*\)\"$$/\1/p' ./libtool` ! ! TESTS = run.test # The following rules are only for the libtool demo and tests. # Regenerate our acinclude.m4 only if it doesn't exist. --- 1,66 ---- ! ## Process this file with automake to produce Makefile.in ! AUTOMAKE_OPTIONS = no-dependencies foreign ! EXTRA_DIST = acinclude.m4 # Build a libtool library, libhello.la for installation in libdir. lib_LTLIBRARIES = libhello.la libhello_la_SOURCES = hello.c foo.c ! libhello_la_LIBADD = $(LIBM) ! libhello_la_LDFLAGS = -version-info 3:12:1 include_HEADERS = foo.h ! if BINARY_HELLDL ! BUILD_helldl = helldl ! else ! BUILD_helldl = ! endif + bin_PROGRAMS = hell hell.static $(BUILD_helldl) + # Build hell from main.c and libhello.la hell_SOURCES = main.c hell_LDADD = libhello.la + + # Create a statically linked version of hell. + hell_static_SOURCES = main.c + hell_static_LDADD = libhello.la + hell_static_LDFLAGS = $(STATIC) ! if BINARY_HELLDL # Create a version of hell that does a preloaded dlopen. helldl_SOURCES = dlmain.c helldl_LDFLAGS = -export-dynamic -dlpreopen libhello.la ! helldl_DEPENDENCIES = libhello.la ! ! else ! ! bin_SCRIPTS = helldl ! # create a script that says that -dlopen is not supported ! helldl: ! rm -f $@ ! echo '#! /bin/sh' > $@ ! echo '-dlopen is unsupported' >> $@ ! chmod +x $@ ! endif ! ! $(OBJECTS): libtool ! libtool: $(LIBTOOL_DEPS) ! $(SHELL) ./config.status --recheck ! ! #---------------------------------------------------------------------- ! # The following declarations are only used in the testsuite: ! #---------------------------------------------------------------------- ! ! hardcode_tests = hc-direct hc-libflag hc-libpath hc-minusL ! CLEANFILES = $(hardcode_tests) # Unfortunately, in order to test libtool thoroughly, we need access # to its private directory. ! objdir = `sed -n -e 's/^objdir=\(.*\)$$/\1/p' ../libtool` # The following rules are only for the libtool demo and tests. # Regenerate our acinclude.m4 only if it doesn't exist. *************** *** 45,69 **** rm -f $(srcdir)/acinclude.m4 cd $(srcdir) && $(LN_S) ../libtool.m4 acinclude.m4 - # Don't build helldl on unsupported platforms. - helldl: $(helldl_OBJECTS) $(helldl_DEPENDENCIES) - @rm -f helldl helldlT - @eval "`egrep '^global_symbol_pipe=' libtool`"; \ - if test -z "$$global_symbol_pipe"; then \ - echo 'creating helldl (-dlopen is unsupported)'; \ - echo "#! /bin/sh" > helldlT; \ - echo "echo '-dlopen is unsupported'" >> helldlT; \ - chmod +x helldlT; \ - mv -f helldlT helldl; \ - else \ - echo '$(LINK) $(helldl_LDFLAGS) $(helldl_OBJECTS) $(helldl_LDADD)'; \ - $(LINK) $(helldl_LDFLAGS) $(helldl_OBJECTS) $(helldl_LDADD); \ - fi # Test programs to see what gets hardcoded. .PHONY: hardcode hardcode: $(hardcode_tests) ! hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) @rm -f hc-direct @echo "You may ignore any linking errors from the following command:" @shlib=./$(objdir)/libhello.a; \ --- 68,78 ---- rm -f $(srcdir)/acinclude.m4 cd $(srcdir) && $(LN_S) ../libtool.m4 acinclude.m4 # Test programs to see what gets hardcoded. .PHONY: hardcode hardcode: $(hardcode_tests) ! hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la @rm -f hc-direct @echo "You may ignore any linking errors from the following command:" @shlib=./$(objdir)/libhello.a; \ *************** *** 71,108 **** for lib in $$library_names; do \ shlib="./$(objdir)/$$lib"; \ done; \ ! echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib -lm || echo unsupported > $@"; \ ! eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib -lm || echo unsupported > $@" ! # We need to create an alias for $(objdir) so that this test works regardless ! # of $hardcode_minus_L ! hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) ! rm -rf hc-libflag _hclibs ! mkdir _hclibs ! objdir=$(objdir); cd _hclibs && for lib in ../$$objdir/libhello*; do \ ! $(LN_S) $$lib `echo "$$lib" | sed 's%^.*/%%'` || exit 1; \ ! done ! @eval `egrep -e '^(hardcode_.*|wl)=' ./libtool`; \ libdir=`pwd`/$(objdir); \ flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ if test -z "$$flag"; then \ echo "echo unsupported > $@"; \ echo unsupported > $@ || status="$$?"; \ else \ ! echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L./_hclibs -lhello -lm"; \ ! $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L./_hclibs -lhello -lm || status="$$?"; \ fi; \ - echo "rm -rf _hclibs"; \ - rm -rf _hclibs; \ exit $$status ! hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) @rm -f hc-libpath @echo "You may ignore any linking errors from the following command:" ! @eval `egrep -e '^shlibpath_var=' ./libtool`; \ ! echo "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello -lm || echo unsupported > $@"; \ ! eval "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello -lm || echo unsupported > $@" hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES) @rm -f hc-minusL ! $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello -lm --- 80,138 ---- for lib in $$library_names; do \ shlib="./$(objdir)/$$lib"; \ done; \ ! eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \ ! libdir=$(libdir); \ ! flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ ! echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \ ! eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $(LIBM) $$flag || echo unsupported > $@" ! hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la ! @eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \ libdir=`pwd`/$(objdir); \ flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ if test -z "$$flag"; then \ echo "echo unsupported > $@"; \ echo unsupported > $@ || status="$$?"; \ else \ ! echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello $(LIBS) $(LIBM)"; \ ! $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello $(LIBS) $(LIBM) || status="$$?"; \ fi; \ exit $$status ! hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la @rm -f hc-libpath @echo "You may ignore any linking errors from the following command:" ! @eval `egrep -e '^(shlibpath_var|hardcode_.*|wl)=' libtool`; \ ! libdir=$(libdir); \ ! flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ ! echo "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \ ! eval "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$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) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \ ! eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@" ! ! # This is one of the essential tests for deplibs_check_method=pass_all. ! # If this one passes with pass_all, it is likely that pass_all works ! EXTRA_LIBRARIES = libhell0.a ! libhell0_a_SOURCES = hello.c foo.c ! EXTRA_LTLIBRARIES += libhell1.la libhell2.la ! libhell1_la_SOURCES = hell1.c ! libhell1_la_LIBADD = -L. -lhell0 ! libhell1_la_LDFLAGS = -rpath $(libdir) ! libhell1_la_DEPENDENCIES = libhell0.a ! libhell2_la_SOURCES = hell2.c ! libhell2_la_LIBADD = -L. -lhell0 ! libhell2_la_LDFLAGS = -rpath $(libdir) ! libhell2_la_DEPENDENCIES = libhell0.a ! EXTRA_PROGRAMS += hell0 ! hell0_SOURCES = main.c ! hell0_LDADD = libhell1.la libhell2.la $(LIBM) ! ! CLEANFILES += $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS) ! ! deplibs-check: hell0 Index: libtool/demo/configure.in diff -c libtool/demo/configure.in:1.1.1.5 libtool/demo/configure.in:1.13.2.2 *** libtool/demo/configure.in:1.1.1.5 Sun Jan 25 20:35:11 1998 --- libtool/demo/configure.in Tue Mar 30 21:25:35 1999 *************** *** 1,9 **** ! dnl Initialize the hell package. AC_INIT(hello.c) AM_INIT_AUTOMAKE(hell,1.0) AC_PROG_CC AM_PROG_LIBTOOL dnl Output the makefile AC_OUTPUT(Makefile) --- 1,29 ---- ! dnl Process this file with autoconf to create configure. ! AC_INIT(hello.c) AM_INIT_AUTOMAKE(hell,1.0) AC_PROG_CC + AC_C_CONST + AC_EXEEXT + AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL + AC_SUBST(LIBTOOL_DEPS) + + if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then + STATIC=-static + else + STATIC= + fi + AC_SUBST(STATIC) + + AM_CONDITIONAL(BINARY_HELLDL, [dnl + grep '^global_symbol_pipe=..*$' ./libtool >/dev/null]) + + AC_CHECK_HEADERS(string.h math.h) + + AC_CHECK_LIBM + AC_SUBST(LIBM) dnl Output the makefile AC_OUTPUT(Makefile) Index: libtool/demo/dlmain.c diff -c libtool/demo/dlmain.c:1.1.1.5 libtool/demo/dlmain.c:1.10 *** libtool/demo/dlmain.c:1.1.1.5 Tue Jul 29 20:31:08 1997 --- libtool/demo/dlmain.c Mon Feb 15 15:23:02 1999 *************** *** 1,5 **** /* dlmain.c -- hello test program that uses simulated dynamic linking ! Copyright (C) 1996 Free Software Foundation, Inc. This file is part of GNU Libtool. This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* dlmain.c -- hello test program that uses simulated dynamic linking ! Copyright (C) 1996-1999 Free Software Foundation, Inc. This file is part of GNU Libtool. This program is free software; you can redistribute it and/or modify *************** *** 19,65 **** #include "foo.h" #include #include ! struct dld_symlist { ! char *name; ! void *address; }; ! extern struct dld_symlist dld_preloaded_symbols[]; ! extern int dld_preloaded_symbol_count; int main (argc, argv) int argc; char **argv; { ! struct dld_symlist *s; int (*pfoo)() = 0; int (*phello)() = 0; int *pnothing = 0; printf ("Welcome to *modular* GNU Hell!\n"); - if (dld_preloaded_symbol_count < 0) - printf ("Sorry, the symbol list is not sorted and unique.\n"); - else - printf ("Yippee! The symbol list is both sorted and unique.\n"); - /* Look up the symbols we require for this demonstration. */ ! s = dld_preloaded_symbols; while (s->name) { ! /* FIXME: we are simplistic about leading underscores. */ ! printf ("found symbol: %s\n", s->name); ! if (!strcmp ("hello", s->name)) ! phello = s->address; ! else if (!strcmp ("foo", s->name)) ! pfoo = s->address; ! else if (!strcmp ("nothing", s->name)) ! pnothing = s->address; ! s ++; } --- 19,70 ---- #include "foo.h" #include + + #ifdef HAVE_STRING_H #include + #endif ! struct lt_symlist { ! const char *name; ! lt_ptr_t address; }; ! extern const struct lt_symlist lt_preloaded_symbols[]; int main (argc, argv) int argc; char **argv; { ! const struct lt_symlist *s; int (*pfoo)() = 0; int (*phello)() = 0; int *pnothing = 0; printf ("Welcome to *modular* GNU Hell!\n"); /* Look up the symbols we require for this demonstration. */ ! s = lt_preloaded_symbols; while (s->name) { ! if (s->address) { ! const char *name = s->name; ! printf ("found symbol: %s\n", name); ! if (!strcmp ("hello", name)) ! phello = (int(*)())s->address; ! else if (!strcmp ("foo", name)) ! pfoo = (int(*)())s->address; ! else if (!strcmp ("nothing", name)) ! #ifndef _WIN32 ! /* In an ideal world we could do this... */ ! pnothing = (int*)s->address; ! #else /* !_WIN32 */ ! /* In an ideal world a shared lib would be able to export data */ ! pnothing = (int*)¬hing; ! #endif ! } else ! printf ("found file: %s\n", s->name); s ++; } Index: libtool/demo/foo.c diff -c libtool/demo/foo.c:1.1.1.7 libtool/demo/foo.c:1.5 *** libtool/demo/foo.c:1.1.1.7 Thu Jul 3 20:20:39 1997 --- libtool/demo/foo.c Sun Mar 7 23:02:47 1999 *************** *** 1,5 **** /* foo.c -- trivial test function for libfoo ! Copyright (C) 1996 Free Software Foundation, Inc. Gordon Matzigkeit , 1996 This file is part of GNU Libtool. --- 1,5 ---- /* foo.c -- trivial test function for libfoo ! Copyright (C) 1996-1999 Free Software Foundation, Inc. Gordon Matzigkeit , 1996 This file is part of GNU Libtool. *************** *** 18,29 **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "foo.h" #include #include /* Give a global variable definition. */ ! int nothing; int foo () --- 18,35 ---- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ + #define _LIBFOO_COMPILATION_ #include "foo.h" + #undef _LIBFOO_COMPILATION_ + #include + + #ifdef HAVE_MATH_H #include + #endif /* Give a global variable definition. */ ! int nothing = FOO_RET; int foo () Index: libtool/demo/foo.h diff -c libtool/demo/foo.h:1.1.1.7 libtool/demo/foo.h:1.4 *** libtool/demo/foo.h:1.1.1.7 Thu Jul 3 20:20:39 1997 --- libtool/demo/foo.h Wed Jan 13 22:39:08 1999 *************** *** 1,5 **** /* foo.h -- interface to the libfoo library ! Copyright (C) 1996 Free Software Foundation, Inc. Gordon Matzigkeit , 1996 This file is part of GNU Libtool. --- 1,5 ---- /* foo.h -- interface to the libfoo library ! Copyright (C) 1996-1999 Free Software Foundation, Inc. Gordon Matzigkeit , 1996 This file is part of GNU Libtool. *************** *** 22,27 **** --- 22,37 ---- #ifndef _FOO_H_ #define _FOO_H_ 1 + /* At some point, cygwin will stop defining __CYGWIN32__, but b19 and + * earlier do not define __CYGWIN__. This snippit allows us to check + * for __CYGWIN32__ reliably for both old and (probable) future releases. + */ + #ifdef __CYGWIN__ + # ifndef __CYGWIN32__ + # define __CYGWIN32__ + # endif + #endif + /* __BEGIN_DECLS should be used at the beginning of your declarations, so that C++ compilers don't mangle their names. Use __END_DECLS at the end of C declarations. */ *************** *** 39,59 **** that don't understand ANSI C prototypes still work, and ANSI C compilers can issue warnings about type mismatches. */ #undef __P ! #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) # define __P(protos) protos #else # define __P(protos) () #endif /* Silly constants that the functions return. */ #define HELLO_RET 0xe110 #define FOO_RET 0xf00 /* Declarations. Note the wonderful use of the above macros. */ __BEGIN_DECLS int foo __P((void)); int hello __P((void)); ! extern int nothing; __END_DECLS #endif /* !_FOO_H_ */ --- 49,82 ---- that don't understand ANSI C prototypes still work, and ANSI C compilers can issue warnings about type mismatches. */ #undef __P ! #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN32__) || defined(__cplusplus) # define __P(protos) protos + # define lt_ptr_t void* #else # define __P(protos) () + # define lt_ptr_t char* + #endif + + #ifdef __CYGWIN32__ + # ifdef _LIBFOO_COMPILATION_ + # define EXTERN __declspec(dllexport) + # else + # define EXTERN extern __declspec(dllimport) + # endif + #else + # define EXTERN extern #endif /* Silly constants that the functions return. */ #define HELLO_RET 0xe110 #define FOO_RET 0xf00 + /* Declarations. Note the wonderful use of the above macros. */ __BEGIN_DECLS int foo __P((void)); int hello __P((void)); ! EXTERN int nothing; __END_DECLS #endif /* !_FOO_H_ */ Index: libtool/demo/hell1.c diff -c /dev/null libtool/demo/hell1.c:1.1.2.1 *** /dev/null Thu Apr 29 16:15:52 1999 --- libtool/demo/hell1.c Fri Mar 26 01:08:38 1999 *************** *** 0 **** --- 1 ---- + int hell1() { return 1; } Index: libtool/demo/hell2.c diff -c /dev/null libtool/demo/hell2.c:1.1.2.1 *** /dev/null Thu Apr 29 16:15:52 1999 --- libtool/demo/hell2.c Fri Mar 26 01:08:38 1999 *************** *** 0 **** --- 1 ---- + int hell2() { return 2; } Index: libtool/demo/hello.c diff -c libtool/demo/hello.c:1.1.1.4 libtool/demo/hello.c:1.3 *** libtool/demo/hello.c:1.1.1.4 Thu Jul 3 20:20:39 1997 --- libtool/demo/hello.c Thu Dec 31 12:25:30 1998 *************** *** 1,5 **** /* hello.c -- trivial test function for libfoo ! Copyright (C) 1996 Free Software Foundation, Inc. This file is part of GNU Libtool. This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* hello.c -- trivial test function for libfoo ! Copyright (C) 1996-1999 Free Software Foundation, Inc. This file is part of GNU Libtool. This program is free software; you can redistribute it and/or modify *************** *** 18,24 **** --- 18,27 ---- USA. */ /* Written by Gordon Matzigkeit */ + #define _LIBFOO_COMPILATION #include "foo.h" + #undef _LIBFOO_COMPILATION + #include int Index: libtool/demo/main.c diff -c libtool/demo/main.c:1.1.1.5 libtool/demo/main.c:1.2 *** libtool/demo/main.c:1.1.1.5 Thu Jul 3 20:20:39 1997 --- libtool/demo/main.c Thu Dec 31 12:25:31 1998 *************** *** 1,5 **** /* main.c -- trivial hello test program ! Copyright (C) 1996 Free Software Foundation, Inc. This file is part of GNU Libtool. This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* main.c -- trivial hello test program ! Copyright (C) 1996-1999 Free Software Foundation, Inc. This file is part of GNU Libtool. This program is free software; you can redistribute it and/or modify Index: libtool/demo/run.test diff -c libtool/demo/run.test:1.1.1.1 libtool/demo/run.test:removed *** libtool/demo/run.test:1.1.1.1 Tue Apr 1 20:29:23 1997 --- libtool/demo/run.test Thu Apr 29 16:15:52 1999 *************** *** 1,21 **** - #! /bin/sh - # run.test - Check that hell is viable. - - if test -z "$srcdir"; then - srcdir=. - test "${VERBOSE+set}" != "set" && VERBOSE=yes - fi - - # See how redirections should work. - if test -z "$VERBOSE"; then - exec > /dev/null 2>&1 - fi - - echo "=== Running test $0" - - # Attempt to execute the program we built. - if ./hell | grep 'GNU Hell' > /dev/null; then - exit 0 - else - exit 1 - fi --- 0 ---- Index: libtool/depdemo/.cvsignore diff -c /dev/null libtool/depdemo/.cvsignore:1.4 *** /dev/null Thu Apr 29 16:19:07 1999 --- libtool/depdemo/.cvsignore Sun Mar 14 06:42:56 1999 *************** *** 0 **** --- 1,14 ---- + .deps + .libs + Makefile + Makefile.in + acinclude.m4 + aclocal.m4 + configure + config.* + conftest* + libtool + *.lo + *.la + depdemo + depdemo.static Index: libtool/depdemo/Makefile.am diff -c /dev/null libtool/depdemo/Makefile.am:1.7.2.2 *** /dev/null Thu Apr 29 16:19:07 1999 --- libtool/depdemo/Makefile.am Sat Mar 20 23:04:28 1999 *************** *** 0 **** --- 1,24 ---- + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = no-dependencies foreign + + SUBDIRS = l1 l2 l3 l4 + + EXTRA_DIST = sysdep.h + + bin_PROGRAMS = depdemo depdemo.static + + depdemo_SOURCES = main.c + depdemo_LDADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la \ + $(top_builddir)/l4/libl4.la + depdemo_DEPENDENCIES = $(top_builddir)/l1/libl1.la \ + $(top_builddir)/l2/libl2.la $(top_builddir)/l4/libl4.la + + depdemo_static_SOURCES = $(depdemo_SOURCES) + depdemo_static_LDADD = $(depdemo_LDADD) + depdemo_static_DEPENDENCIES = $(depdemo_DEPENDENCIES) + depdemo_static_LDFLAGS = $(STATIC) + + $(OBJECTS): libtool + libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status --recheck Index: libtool/depdemo/README diff -c /dev/null libtool/depdemo/README:1.1.1.1 *** /dev/null Thu Apr 29 16:19:07 1999 --- libtool/depdemo/README Tue Nov 24 21:32:39 1998 *************** *** 0 **** --- 1,11 ---- + This is depdemo, an example package that uses GNU libtool with an + Automake-generated environment to build many interdependent libraries + and a test program. + + There are four libraries: l1, l2, l3 and l4. + l1 depends on nothing. + l2 depends on l1. + l3 depends on l1 and l2. + l4 depends on l3 and libm. + + The test program uses l1, l2 and l4. \ No newline at end of file Index: libtool/depdemo/configure.in diff -c /dev/null libtool/depdemo/configure.in:1.9.2.1 *** /dev/null Thu Apr 29 16:19:07 1999 --- libtool/depdemo/configure.in Sat Mar 20 23:04:29 1999 *************** *** 0 **** --- 1,29 ---- + dnl Process this file with autoconf to create configure. + + AC_INIT(main.c) + AM_INIT_AUTOMAKE(depdemo,0.1) + + AC_PROG_CC + AC_EXEEXT + AM_PROG_LIBTOOL + AC_SUBST(LIBTOOL_DEPS) + + if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then + STATIC=-static + else + STATIC= + fi + AC_SUBST(STATIC) + + AC_CHECK_HEADERS(math.h) + + AC_CHECK_LIBM + + dnl Output the makefile + AC_OUTPUT( + Makefile + l1/Makefile + l2/Makefile + l3/Makefile + l4/Makefile + ) Index: libtool/depdemo/main.c diff -c /dev/null libtool/depdemo/main.c:1.3 *** /dev/null Thu Apr 29 16:19:07 1999 --- libtool/depdemo/main.c Sat Mar 13 18:34:07 1999 *************** *** 0 **** --- 1,34 ---- + /* main.c -- inter-library dependency test program + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "l1/l1.h" + #include "l2/l2.h" + #include "l4/l4.h" + #include + #include + + int + main (int argc, char **argv) + { + printf("dependencies:\n"); + func_l1(0); + func_l2(0); + func_l4(0); + return 0; + } Index: libtool/depdemo/sysdep.h diff -c /dev/null libtool/depdemo/sysdep.h:1.3 *** /dev/null Thu Apr 29 16:19:07 1999 --- libtool/depdemo/sysdep.h Thu Dec 31 12:25:41 1998 *************** *** 0 **** --- 1,47 ---- + /* sysdep.h -- system dependent declarations + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + /* Only include this header file once. */ + #ifndef _SYSDEP_H_ + #define _SYSDEP_H_ 1 + + /* __BEGIN_DECLS should be used at the beginning of your declarations, + so that C++ compilers don't mangle their names. Use __END_DECLS at + the end of C declarations. */ + #undef __BEGIN_DECLS + #undef __END_DECLS + #ifdef __cplusplus + # define __BEGIN_DECLS extern "C" { + # define __END_DECLS } + #else + # define __BEGIN_DECLS /* empty */ + # define __END_DECLS /* empty */ + #endif + + /* __P is a macro used to wrap function prototypes, so that compilers + that don't understand ANSI C prototypes still work, and ANSI C + compilers can issue warnings about type mismatches. */ + #undef __P + #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) + # define __P(protos) protos + #else + # define __P(protos) () + #endif + + #endif /* !_SYSDEP_H_ */ Index: libtool/doc/.cvsignore diff -c /dev/null libtool/doc/.cvsignore:1.1.4.1 *** /dev/null Thu Apr 29 16:19:07 1999 --- libtool/doc/.cvsignore Fri Mar 26 00:43:31 1999 *************** *** 0 **** --- 1,19 ---- + Makefile + Makefile.in + mdate-sh + texinfo.tex + stamp-vti + version.texi + *.log + *.dvi + *.aux + *.toc + *.cp + *.fn + *.vr + *.tp + *.ky + *.pg + *.cps + *.info* + *.ps Index: libtool/doc/Makefile.am diff -c libtool/doc/Makefile.am:1.1.1.6 libtool/doc/Makefile.am:1.1.1.6.4.1 *** libtool/doc/Makefile.am:1.1.1.6 Thu Feb 12 06:45:15 1998 --- libtool/doc/Makefile.am Sat Mar 20 23:04:31 1999 *************** *** 1,10 **** ! ## 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 AUTOMAKE_OPTIONS = gnits info_TEXINFOS = libtool.texi libtool_TEXINFOS = PLATFORMS --- 1,5 ---- ! ## Process this file with automake to produce Makefile.in ! AUTOMAKE_OPTIONS = gnits info_TEXINFOS = libtool.texi libtool_TEXINFOS = PLATFORMS Index: libtool/doc/PLATFORMS diff -c libtool/doc/PLATFORMS:1.1.1.2 libtool/doc/PLATFORMS:1.13.2.8 *** libtool/doc/PLATFORMS:1.1.1.2 Fri Mar 20 08:58:42 1998 --- libtool/doc/PLATFORMS Thu Apr 29 13:44:46 1999 *************** *** 1,44 **** ! -------------------------------------------------------- ! canonical host name compiler libtool results ! release ! -------------------------------------------------------- ! alpha-dec-osf3.2 cc 0.8 ok ! alpha-dec-osf3.2 gcc 0.8 ok ! alpha-dec-osf4.0 cc 1.0f ok ! alpha-dec-osf4.0 gcc 1.0f ok ! alpha-unknown-linux-gnu gcc 0.9h ok ! hppa1.1-hp-hpux9.07 cc 1.0f ok ! hppa1.1-hp-hpux9.07 gcc 1.0f ok ! hppa1.1-hp-hpux10.10 cc 0.9h ok ! hppa1.1-hp-hpux10.10 gcc 0.9h ok ! i386-unknown-freebsd2.1.5 gcc 0.5 ok ! i386-unknown-gnu0.0 gcc 0.5 ok ! i386-unknown-netbsd1.2 gcc 0.9g ok ! i586-pc-linux-gnulibc1 gcc 1.0i ok ! i586-pc-linux-gnu gcc 1.0i ok ! mips-sgi-irix5.2 gcc 1.0i ok ! mips-sgi-irix5.3 cc 0.8 ok ! mips-sgi-irix5.3 gcc 0.8 ok ! mips-sgi-irix6.2 cc 0.9 ok ! mips-sgi-irix6.3 cc 1.0f ok ! mips-sgi-irix6.3 gcc 1.0i ok ! mips-sgi-irix6.3 irix5-gcc 1.0f ok ! mipsel-unknown-openbsd2.1 gcc 1.0 ok ! powerpc-ibm-aix4.1.4.0 xlc 1.0i ok ! powerpc-ibm-aix4.1.4.0 gcc 1.0 ok ! rs6000-ibm-aix3.2.5 xlc 1.0i ok ! rs6000-ibm-aix3.2.5 gcc 1.0i ok* ! sparc-sun-linux-gnu2.1.23 gcc 0.9h ok ! sparc-sun-sunos4.1.3 gcc 1.0i ok ! sparc-sun-sunos4.1.4 cc 1.0f ok ! sparc-sun-sunos4.1.4 gcc 1.0f ok ! sparc-sun-solaris2.4 cc 1.0a ok ! sparc-sun-solaris2.4 gcc 1.0a ok ! sparc-sun-solaris2.5 cc 1.0f ok ! sparc-sun-solaris2.5 gcc 1.0i ok ! sparc-sun-solaris2.6 gcc 1.0i ok ! -------------------------------------------------------- ! * Some versions of GCC's collect2 linker program cannot link trivial ! static binaries on AIX 3. For these configurations, libtool's `-static' ! flag has no effect. --- 1,126 ---- ! ------------------------------------------------------- ! canonical host name compiler libtool results ! (tools versions) release ! ------------------------------------------------------- ! alpha-dec-osf4.0* gcc 1.3 ok ! (egcs-1.1.2) ! alpha-dec-osf4.0* cc 1.3 ok ! alpha-dec-osf3.2 gcc 0.8 ok ! alpha-dec-osf3.2 cc 0.8 ok ! alpha-dec-osf2.1 gcc 1.2f NS ! alpha*-unknown-linux-gnu gcc 1.3 ok ! (egcs-1.1.2, GNU ld 2.9.1.0.15) ! hppa2.0w-hp-hpux11.00 cc 1.2f ok ! hppa2.0-hp-hpux10.20 cc 1.3 ok ! hppa1.1-hp-hpux10.20 gcc 1.2f ok ! hppa1.1-hp-hpux10.20 cc 1.2f ok ! hppa1.1-hp-hpux10.10 gcc 1.2f ok ! hppa1.1-hp-hpux10.10 cc 1.2f ok ! hppa1.1-hp-hpux9.07 gcc 1.2f ok ! hppa1.1-hp-hpux9.07 cc 1.2f ok ! hppa1.1-hp-hpux9.05 gcc 1.2f ok ! hppa1.1-hp-hpux9.05 cc 1.2f ok ! hppa1.1-hp-hpux9.01 gcc 1.2f ok ! hppa1.1-hp-hpux9.01 cc 1.2f ok ! i*86-*-beos gcc 1.2f ok ! i*86-*-bsdi4.0 gcc 1.2f ok ! i*86-*-bsdi4.0.1 gcc 1.2f ok ! i*86-*-bsdi3.1 gcc 1.2e NS ! i*86-*-bsdi3.0 gcc 1.2e NS ! i*86-*-bsdi2.1 gcc 1.2e NS ! i*86-pc-cygwin gcc 1.3 NS ! (egcs-1.1 stock b20.1 compiler) ! i*86-*-dguxR4.20MU01 gcc 1.2 ok ! i*86-*-freebsdelf4.0 gcc 1.2f ok ! i*86-*-freebsdelf3.1 gcc 1.2f ok ! i*86-*-freebsd3.0 gcc 1.2e ok ! i*86-*-freebsd2.2.8 gcc 1.2f ok ! i*86-*-freebsd2.2.6 gcc 1.3 ok ! (egcs-1.1 & gcc-2.7.2.1, native ld) ! i*86-*-freebsd2.1.5 gcc 0.5 ok ! i*86-*-gnu0.3 gcc 1.2b ok ! i*86-*-netbsd1.4 gcc 1.3 ok ! (egcs-1.1.1) ! i*86-*-netbsd1.3.3 gcc 1.3 ok ! (gcc-2.7.2.2) ! i*86-*-netbsd1.3.2 gcc 1.2e ok ! i*86-*-netbsd1.3I gcc 1.2e ok ! (egcs 1.1?) ! i*86-*-netbsd1.2 gcc 0.9g ok ! i*86-*-linux-gnu gcc 1.3 ok ! (egcs-1.1.2, GNU ld 2.9.1) ! i*86-*-linux-gnulibc1 gcc 1.2f ok ! i*86-*-openbsd2.4 gcc 1.2f ok ! i*86-*-solaris2.7 gcc 1.3 ok ! (egcs-1.1.2, native ld) ! i*86-*-solaris2.6 gcc 1.2f ok ! i*86-*-solaris2.5.1 gcc 1.2f ok ! i*86-ncr-sysv4.3.03 gcc 1.2f ok ! i*86-ncr-sysv4.3.03 cc 1.2e ok ! (cc -Hnocopyr) ! m68k-next-nextstep3 gcc 1.2f NS ! m68k-sun-sunos4.1.1 gcc 1.2f NS ! (gcc-2.5.7) ! m88k-dg-dguxR4.12TMU01 gcc 1.2 ok ! m88k-motorola-sysv4 gcc 1.3 ok ! (egcs-1.1.2) ! mips-sgi-irix6.5 gcc 1.2f ok ! (gcc-2.8.1) ! mips-sgi-irix6.4 gcc 1.2f ok ! mips-sgi-irix6.3 gcc 1.3 ok ! (egcs-1.1.2, native ld) ! mips-sgi-irix6.3 cc 1.3 ok ! (cc 7.0) ! mips-sgi-irix6.2 gcc 1.2f ok ! mips-sgi-irix6.2 cc 0.9 ok ! mips-sgi-irix5.3 gcc 1.2f ok ! (egcs-1.1.1) ! mips-sgi-irix5.3 gcc 1.2f NS ! (gcc-2.6.3) ! mips-sgi-irix5.3 cc 0.8 ok ! mips-sgi-irix5.2 gcc 1.3 ok ! (egcs-1.1.2, native ld) ! mips-sgi-irix5.2 cc 1.3 ok ! (cc 3.18) ! mipsel-unknown-openbsd2.1 gcc 1.0 ok ! powerpc-ibm-aix4.3.1.0 gcc 1.2f ok ! (egcs-1.1.1) ! powerpc-ibm-aix4.2.1.0 gcc 1.2f ok ! (egcs-1.1.1) ! powerpc-ibm-aix4.1.5.0 gcc 1.2f ok ! (egcs-1.1.1) ! powerpc-ibm-aix4.1.5.0 gcc 1.2f NS ! (gcc-2.8.1) ! powerpc-ibm-aix4.1.4.0 gcc 1.0 ok ! powerpc-ibm-aix4.1.4.0 xlc 1.0i ok ! rs6000-ibm-aix4.1.5.0 gcc 1.2f ok ! (gcc-2.7.2) ! rs6000-ibm-aix4.1.4.0 gcc 1.2f ok ! (gcc-2.7.2) ! rs6000-ibm-aix3.2.5 gcc 1.0i ok ! rs6000-ibm-aix3.2.5 xlc 1.0i ok ! sparc-sun-solaris2.7 gcc 1.2f ok ! sparc-sun-solaris2.6 gcc 1.3 ok ! (egcs-1.1.2, GNU ld 2.9.1 & native ld) ! sparc-sun-solaris2.5.1 gcc 1.2f ok ! sparc-sun-solaris2.5 gcc 1.3 ok ! (egcs-1.1.2, GNU ld 2.9.1 & native ld) ! sparc-sun-solaris2.5 cc 1.3 ok ! (SC 3.0.1) ! sparc-sun-solaris2.4 gcc 1.0a ok ! sparc-sun-solaris2.4 cc 1.0a ok ! sparc-sun-solaris2.3 gcc 1.2f ok ! sparc-sun-sunos4.1.4 gcc 1.2f ok ! sparc-sun-sunos4.1.4 cc 1.0f ok ! sparc-sun-sunos4.1.3_U1 gcc 1.2f ok ! sparc-sun-sunos4.1.3C gcc 1.2f ok ! sparc-sun-sunos4.1.3 gcc 1.3 ok ! (egcs-1.1.2, GNU ld 2.9.1 & native ld) ! sparc-sun-sunos4.1.3 cc 1.3 ok ! sparc-unknown-bsdi4.0 gcc 1.2c ok ! sparc-unknown-linux-gnulibc1 gcc 1.2f ok ! sparc64-unknown-linux-gnu gcc 1.2f ok ! Notes: ! - "ok" means "all tests passed". ! - "NS" means "Not Shared", but OK for static libraries Index: libtool/doc/libtool.texi diff -c libtool/doc/libtool.texi:1.1.1.40 libtool/doc/libtool.texi:1.47.2.22 *** libtool/doc/libtool.texi:1.1.1.40 Fri Mar 20 08:58:42 1998 --- libtool/doc/libtool.texi Thu Apr 29 13:03:30 1999 *************** *** 7,13 **** @c %**end of header @include version.texi ! @set BUGADDR the libtool mailing list @email{} @set objdir .libs @dircategory GNU programming tools --- 7,14 ---- @c %**end of header @include version.texi ! @set BUGADDR the libtool bug reporting address @email{bug-libtool@@gnu.org} ! @set MAILLIST the libtool mailing list @email{libtool@@gnu.org} @set objdir .libs @dircategory GNU programming tools *************** *** 23,29 **** @ifinfo This file documents GNU Libtool @value{VERSION} ! Copyright (C) 1996-1998 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are --- 24,30 ---- @ifinfo This file documents GNU Libtool @value{VERSION} ! Copyright (C) 1996-1999 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are *************** *** 52,68 **** @title GNU Libtool @subtitle For version @value{VERSION}, @value{UPDATED} @author Gordon Matzigkeit @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1996-1998 Free Software Foundation, Inc. ! @sp 2 ! This is the first edition of the GNU Libtool documentation,@* ! and is consistent with GNU Libtool @value{VERSION}.@* ! @sp 2 ! Published by the Free Software Foundation @* ! 59 Temple Place, Suite 330, @* ! Boston, MA 02111-1307 USA @* Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are --- 53,65 ---- @title GNU Libtool @subtitle For version @value{VERSION}, @value{UPDATED} @author Gordon Matzigkeit + @author Alexandre Oliva + @author Thomas Tanner + @author Gary V. Vaughan @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1996-1999 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are *************** *** 82,87 **** --- 79,85 ---- @c Put everything in one index (arbitrarily chosen to be the concept index). @syncodeindex vr cp @syncodeindex fn cp + @syncodeindex tp cp @synindex pg cp @ifinfo *************** *** 106,118 **** * Library tips:: Tips for library interface design. * Inter-library dependencies:: Libraries that depend on other libraries. * Dlopened modules:: @code{dlopen}ing libtool-created libraries. * Other languages:: Using libtool without a C compiler. * Troubleshooting:: When libtool doesn't work as advertised. * Maintaining:: Information used by the libtool maintainer. * Index:: Full index. ! @detailmenu ! --- The Detailed Node Listing --- Introduction --- 104,116 ---- * Library tips:: Tips for library interface design. * Inter-library dependencies:: Libraries that depend on other libraries. * Dlopened modules:: @code{dlopen}ing libtool-created libraries. + * Using libltdl:: Libtool's portable @code{dlopen} wrapper library. * Other languages:: Using libtool without a C compiler. * Troubleshooting:: When libtool doesn't work as advertised. * Maintaining:: Information used by the libtool maintainer. * Index:: Full index. ! @detailmenu --- The Detailed Node Listing --- Introduction *************** *** 140,146 **** * Finish mode:: Completing a library installation. * Uninstall mode:: Removing executables and libraries. ! Integrating libtool with your own packages * Makefile rules:: Writing @file{Makefile} rules for libtool. * Using Automake:: Automatically supporting libtool. --- 138,144 ---- * Finish mode:: Completing a library installation. * Uninstall mode:: Removing executables and libraries. ! Integrating libtool with your package * Makefile rules:: Writing @file{Makefile} rules for libtool. * Using Automake:: Automatically supporting libtool. *************** *** 154,160 **** * ltconfig example:: Manually configuring a @code{libtool}. * AM_PROG_LIBTOOL:: Configuring @code{libtool} in @file{configure.in}. ! Including libtool with your package * Invoking libtoolize:: @code{libtoolize} command line options. * Autoconf .o macros:: Autoconf macros that set object file names. --- 152,158 ---- * ltconfig example:: Manually configuring a @code{libtool}. * AM_PROG_LIBTOOL:: Configuring @code{libtool} in @file{configure.in}. ! Including libtool in your package * Invoking libtoolize:: @code{libtoolize} command line options. * Autoconf .o macros:: Autoconf macros that set object file names. *************** *** 174,182 **** * Building modules:: Creating dlopenable objects and libraries. * Dlpreopening:: Dlopening that works on static platforms. ! * Finding the dlname:: Choosing the right file to @code{dlopen(3)}. * Dlopen issues:: Unresolved problems that need your attention. Using libtool with other languages * C++ libraries:: --- 172,186 ---- * Building modules:: Creating dlopenable objects and libraries. * Dlpreopening:: Dlopening that works on static platforms. ! * Finding the dlname:: Choosing the right file to @code{dlopen}. * Dlopen issues:: Unresolved problems that need your attention. + Using libltdl + + * Libltdl interface:: How to use libltdl in your programs. + * Modules for libltdl:: Creating modules that can be @code{dlopen}ed. + * Distributing libltdl:: How to distribute libltdl with your package. + Using libtool with other languages * C++ libraries:: *************** *** 197,202 **** --- 201,212 ---- * Tested platforms:: When libtool was last tested. * Platform quirks:: Information about different library systems. * libtool script contents:: Configuration information that libtool uses. + * Cheap tricks:: Making libtool maintainership easier. + + Porting libtool to new systems + + * Information sources:: Where to find relevant documentation + * Porting inter-library dependencies:: Implementation details explained Platform quirks *************** *** 253,260 **** @node Motivation @section Motivation for writing libtool ! @cindex Motivation for writing libtool ! @cindex Design philosophy Since early 1995, several different GNU developers have recognized the importance of having shared library support for their packages. The primary motivation for such a change is to encourage modularity and --- 263,270 ---- @node Motivation @section Motivation for writing libtool ! @cindex motivation for writing libtool ! @cindex design philosophy Since early 1995, several different GNU developers have recognized the importance of having shared library support for their packages. The primary motivation for such a change is to encourage modularity and *************** *** 262,277 **** Such a demand means that the way libraries are built in GNU packages needs to be general, to allow for any library type the package installer ! might want. ! The problem is compounded by the absence of a standard procedure for ! creating shared libraries on different platforms. The following sections outline the major issues facing shared library ! support in GNU, and how I propose that shared library support could be ! standardized with libtool. ! @cindex Specifications for libtool ! @cindex Libtool specifications The following specifications were used in developing and evaluating this system: --- 272,286 ---- Such a demand means that the way libraries are built in GNU packages needs to be general, to allow for any library type the package installer ! might want. The problem is compounded by the absence of a standard ! procedure for creating shared libraries on different platforms. The following sections outline the major issues facing shared library ! support in GNU, and how shared library support could be standardized ! with libtool. ! @cindex specifications for libtool ! @cindex libtool specifications The following specifications were used in developing and evaluating this system: *************** *** 292,299 **** @node Issues @section Implementation issues ! @cindex Tricky design issues ! @cindex Design issues The following issues need to be addressed in any reusable shared library system, specifically libtool: --- 301,308 ---- @node Issues @section Implementation issues ! @cindex tricky design issues ! @cindex design issues The following issues need to be addressed in any reusable shared library system, specifically libtool: *************** *** 304,310 **** @item It can be tricky to run dynamically linked programs whose libraries have ! not yet been installed. @var{LD_LIBRARY_PATH} must be set properly (if it is supported), or programs fail to run. @item --- 313,319 ---- @item It can be tricky to run dynamically linked programs whose libraries have ! not yet been installed. @code{LD_LIBRARY_PATH} must be set properly (if it is supported), or programs fail to run. @item *************** *** 329,345 **** @item The install @file{Makefile} target should warn the package installer to set ! the proper environment variables (@var{LD_LIBRARY_PATH} or equivalent), ! or run @code{ldconfig(8)}. @end enumerate @node Other implementations @section Other implementations ! I have investigated several different implementations of systems that ! build shared libraries as part of a free software package. At first, I ! made notes on the features of each of these packages for comparison ! purposes. Now it is clear that none of these packages have documented the details of shared library systems that libtool requires. So, other packages --- 338,353 ---- @item The install @file{Makefile} target should warn the package installer to set ! the proper environment variables (@code{LD_LIBRARY_PATH} or equivalent), ! or run @code{ldconfig}. @end enumerate @node Other implementations @section Other implementations ! Even before libtool was developed, many free software packages built and ! installed their own shared libraries. At first, these packages were ! examined to avoid reinventing existing features. Now it is clear that none of these packages have documented the details of shared library systems that libtool requires. So, other packages *************** *** 348,395 **** @node Postmortem @section A postmortem analysis of other implementations ! @cindex Other implementations, flaws in ! @cindex Reusability of library systems ! In all fairness, each of the implementations that I examined do the job ! that they were intended to do, for a number of different host systems. ! However, none of these solutions seem to function well as a generalized, ! reusable component. ! ! @cindex Complexity of library systems ! Most were too complex for me to use (much less modify) without ! understanding exactly what the implementation does, and they were ! generally not documented. ! ! I think the main problem is that different vendors have different views ! of what libraries are, and none of the packages I examined seemed to be ! confident enough to settle on a single paradigm that just @emph{works}. Ideally, libtool would be a standard that would be implemented as series of extensions and modifications to existing library systems to make them ! work consistently. However, I don't have the time or power to convince ! operating system developers to mend their evil ways, and I want to build ! shared libraries right now, even on buggy, broken, confused operating ! systems. ! For this reason, I have designed libtool as an independent shell script. It isolates the problems and inconsistencies in library building that ! plague @file{Makefile} writers by wrapping the compiler suite on different ! platforms with a consistent, powerful interface. ! I hope that libtool will be useful to and used by the GNU community, and ! that the lessons I've learned in writing it will be taken up and ! implemented by designers of library systems. @node Libtool paradigm @chapter The libtool paradigm At first, libtool was designed to support an arbitrary number of library ! object types. After porting libtool to more platforms, I discovered a ! new paradigm for describing the relationship between libraries and ! programs. ! @cindex Definition of libraries ! @cindex Libraries, definition of In summary, ``libraries are programs with multiple entry points, and more formally defined interfaces.'' --- 356,404 ---- @node Postmortem @section A postmortem analysis of other implementations ! @cindex other implementations, flaws in ! @cindex reusability of library systems ! In all fairness, each of the implementations that were examined do the ! job that they were intended to do, for a number of different host ! systems. However, none of these solutions seem to function well as a ! generalized, reusable component. ! ! @cindex complexity of library systems ! Most were too complex to use (much less modify) without understanding ! exactly what the implementation does, and they were generally not ! documented. ! ! The main difficulty is that different vendors have different views of ! what libraries are, and none of the packages which were examined seemed ! to be confident enough to settle on a single paradigm that just ! @emph{works}. Ideally, libtool would be a standard that would be implemented as series of extensions and modifications to existing library systems to make them ! work consistently. However, it is not an easy task to convince ! operating system developers to mend their evil ways, and people want to ! build shared libraries right now, even on buggy, broken, confused ! operating systems. ! For this reason, libtool was designed as an independent shell script. It isolates the problems and inconsistencies in library building that ! plague @file{Makefile} writers by wrapping the compiler suite on ! different platforms with a consistent, powerful interface. ! With luck, libtool will be useful to and used by the GNU community, and ! that the lessons that were learned in writing it will be taken up by ! designers of future library systems. @node Libtool paradigm @chapter The libtool paradigm At first, libtool was designed to support an arbitrary number of library ! object types. After libtool was ported to more platforms, a new ! paradigm gradually developed for describing the relationship between ! libraries and programs. ! @cindex definition of libraries ! @cindex libraries, definition of In summary, ``libraries are programs with multiple entry points, and more formally defined interfaces.'' *************** *** 405,412 **** @node Using libtool @chapter Using libtool ! @cindex Examples of using libtool ! @cindex Libtool examples It makes little sense to talk about using libtool in your own packages until you have seen how it makes your life simpler. The examples in this chapter introduce the main features of libtool by comparing the --- 414,421 ---- @node Using libtool @chapter Using libtool ! @cindex examples of using libtool ! @cindex libtool examples It makes little sense to talk about using libtool in your own packages until you have seen how it makes your life simpler. The examples in this chapter introduce the main features of libtool by comparing the *************** *** 430,440 **** library, @file{libhello}, out of the files @file{foo.c} and @file{hello.c}. ! Note that the @file{foo.c} source file uses the @code{cos(3)} math library function, which is usually found in the standalone math library, and not ! the C library. So, we need to add @kbd{-lm} to the end of ! the link line whenever we link @file{foo.o} or @file{foo.lo} into an ! executable or a library (@pxref{Inter-library dependencies}). The same rule applies whenever you use functions that don't appear in the standard C library@dots{} you need to add the appropriate --- 439,450 ---- library, @file{libhello}, out of the files @file{foo.c} and @file{hello.c}. ! Note that the @file{foo.c} source file uses the @code{cos} math library function, which is usually found in the standalone math library, and not ! the C library (@pxref{Trig Functions, , Trigonometric Functions, libc, ! The GNU C Library Reference Manual}). So, we need to add @kbd{-lm} to ! the end of the link line whenever we link @file{foo.o} or @file{foo.lo} ! into an executable or a library (@pxref{Inter-library dependencies}). The same rule applies whenever you use functions that don't appear in the standard C library@dots{} you need to add the appropriate *************** *** 457,464 **** @node Creating object files @section Creating object files ! @cindex Compiling object files ! @cindex Object files, compiling To create an object file from a source file, the compiler is invoked with the `-c' flag (and any other desired flags): --- 467,474 ---- @node Creating object files @section Creating object files ! @cindex compiling object files ! @cindex object files, compiling To create an object file from a source file, the compiler is invoked with the `-c' flag (and any other desired flags): *************** *** 480,495 **** burger$ @end example ! @cindex Position-independent code @cindex PIC (position-independent code) Shared libraries, however, may only be built from @dfn{position-independent code} (PIC). So, special flags must be passed to the compiler to tell it to generate PIC rather than the standard position-dependent code. ! @cindex Library object file @cindex @samp{.lo} files ! @cindex Object files, library Since this is a library implementation detail, libtool hides the complexity of PIC compiler flags by using separate library object files (which end in @samp{.lo} instead of @samp{.o}). On systems without shared --- 490,505 ---- burger$ @end example ! @cindex position-independent code @cindex PIC (position-independent code) Shared libraries, however, may only be built from @dfn{position-independent code} (PIC). So, special flags must be passed to the compiler to tell it to generate PIC rather than the standard position-dependent code. ! @cindex library object file @cindex @samp{.lo} files ! @cindex object files, library Since this is a library implementation detail, libtool hides the complexity of PIC compiler flags by using separate library object files (which end in @samp{.lo} instead of @samp{.o}). On systems without shared *************** *** 503,519 **** @example a23$ @kbd{libtool gcc -g -O -c foo.c} gcc -g -O -c foo.c ! ln -s foo.o foo.lo a23$ @kbd{libtool gcc -g -O -c hello.c} gcc -g -O -c hello.c ! ln -s hello.o hello.lo a23$ @end example ! Note that libtool creates two object files for each invocation. The ! @samp{.lo} file is a library object, and the @samp{.o} file is a ! standard object file. On @samp{a23}, these files are identical, because ! only static libraries are supported. On shared library systems, libtool automatically inserts the PIC generation flags into the compilation command, so that the library --- 513,530 ---- @example a23$ @kbd{libtool gcc -g -O -c foo.c} gcc -g -O -c foo.c ! echo timestamp > foo.lo a23$ @kbd{libtool gcc -g -O -c hello.c} gcc -g -O -c hello.c ! echo timestamp > hello.lo a23$ @end example ! Note that libtool creates two files for each invocation. The @samp{.lo} ! file is a library object, which may be built into a shared library, and ! the @samp{.o} file is a standard object file. On @samp{a23}, the ! library objects are just timestamps, because only static libraries are ! supported. On shared library systems, libtool automatically inserts the PIC generation flags into the compilation command, so that the library *************** *** 523,536 **** burger$ @kbd{libtool gcc -g -O -c foo.c} gcc -g -O -c -fPIC -DPIC foo.c mv -f foo.o foo.lo ! gcc -g -O -c foo.c burger$ @kbd{libtool gcc -g -O -c hello.c} gcc -g -O -c -fPIC -DPIC hello.c mv -f hello.o hello.lo ! gcc -g -O -c hello.c burger$ @end example @node Linking libraries @section Linking libraries --- 534,550 ---- burger$ @kbd{libtool gcc -g -O -c foo.c} gcc -g -O -c -fPIC -DPIC foo.c mv -f foo.o foo.lo ! gcc -g -O -c foo.c >/dev/null 2>&1 burger$ @kbd{libtool gcc -g -O -c hello.c} gcc -g -O -c -fPIC -DPIC hello.c mv -f hello.o hello.lo ! gcc -g -O -c hello.c >/dev/null 2>&1 burger$ @end example + Notice that the second run of GCC has its output discarded. This is + done so that compiler warnings aren't annoyingly duplicated. + @node Linking libraries @section Linking libraries *************** *** 558,564 **** shared libraries, libtool simply acts as a wrapper for the system @code{ar} (and possibly @code{ranlib}) commands. ! @cindex Libtool libraries @cindex @samp{.la} files Again, the libtool library name differs from the standard name (it has a @samp{.la} suffix instead of a @samp{.a} suffix). The arguments to libtool are --- 572,578 ---- shared libraries, libtool simply acts as a wrapper for the system @code{ar} (and possibly @code{ranlib}) commands. ! @cindex libtool libraries @cindex @samp{.la} files Again, the libtool library name differs from the standard name (it has a @samp{.la} suffix instead of a @samp{.a} suffix). The arguments to libtool are *************** *** 566,597 **** @file{libhello.la} with your compiler (@pxref{Link mode}): @example ! burger$ @kbd{libtool gcc -g -O -o libhello.la foo.o hello.o} libtool: cannot build libtool library `libhello.la' from non-libtool \ objects ! burger$ @end example Aha! Libtool caught a common error@dots{} trying to build a library from standard objects instead of library objects. This doesn't matter for static libraries, but on shared library systems, it is of great importance. - - So, let's try again, this time with the library object - files:@footnote{Remember that we need to add @kbd{-lm} to the link - command line because @file{foo.c} uses the @code{cos(3)} math library - function. @xref{Using libtool}.} - - @example - a23$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo -lm} - libtool: you must specify an installation directory with `-rpath' - a23$ - @end example ! Argh. Another complication in building shared libraries is that we need ! to specify the path to the directory in which they (eventually) will be ! installed. So, we try again, with an @code{rpath} setting of ! @file{/usr/local/lib}: @example a23$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \ --- 580,606 ---- @file{libhello.la} with your compiler (@pxref{Link mode}): @example ! a23$ @kbd{libtool gcc -g -O -o libhello.la foo.o hello.o} libtool: cannot build libtool library `libhello.la' from non-libtool \ objects ! a23$ @end example Aha! Libtool caught a common error@dots{} trying to build a library from standard objects instead of library objects. This doesn't matter for static libraries, but on shared library systems, it is of great importance. ! So, let's try again, this time with the library object files. Remember ! also that we need to add @kbd{-lm} to the link command line because ! @file{foo.c} uses the @code{cos} math library function (@pxref{Using ! libtool}). ! ! Another complication in building shared libraries is that we need to ! specify the path to the directory in which they (eventually) will be ! installed (in this case, @file{/usr/local/lib})@footnote{If you don't ! specify an @code{rpath}, then libtool builds a libtool convenience ! archive, not a shared library (@pxref{Static libraries}).}: @example a23$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \ *************** *** 620,628 **** @code{ld} command to create a shared library, as well as the static library. ! @c FIXME: TeX cannot handle @value{objdir} in an index entry ! @cindex @file{.libs} subdirectory ! @c @cindex @file{@value{objdir}} subdirectory Note how libtool creates extra files in the @file{@value{objdir}} subdirectory, rather than the current directory. This feature is to make it easier to clean up the build directory, and to help ensure that --- 629,635 ---- @code{ld} command to create a shared library, as well as the static library. ! @cindex @file{@value{objdir}} subdirectory Note how libtool creates extra files in the @file{@value{objdir}} subdirectory, rather than the current directory. This feature is to make it easier to clean up the build directory, and to help ensure that *************** *** 632,651 **** @node Linking executables @section Linking executables ! @cindex Linking against installed libraries If you choose at this point to @dfn{install} the library (put it in a permanent location) before linking executables against it, then you don't need to use libtool to do the linking. Simply use the appropriate @samp{-L} and @samp{-l} flags to specify the library's location. ! @cindex Buggy system linkers Some system linkers insist on encoding the full directory name of each shared library in the resulting executable. Libtool has to work around this misfeature by special magic to ensure that only permanent directory names are put into installed executables. ! @cindex Security problems with buggy linkers ! @cindex Bugs, subtle ones caused by buggy linkers The importance of this bug must not be overlooked: it won't cause programs to crash in obvious ways. It creates a security hole, and possibly even worse, if you are modifying the library source code --- 639,658 ---- @node Linking executables @section Linking executables ! @cindex linking against installed libraries If you choose at this point to @dfn{install} the library (put it in a permanent location) before linking executables against it, then you don't need to use libtool to do the linking. Simply use the appropriate @samp{-L} and @samp{-l} flags to specify the library's location. ! @cindex buggy system linkers Some system linkers insist on encoding the full directory name of each shared library in the resulting executable. Libtool has to work around this misfeature by special magic to ensure that only permanent directory names are put into installed executables. ! @cindex security problems with buggy linkers ! @cindex bugs, subtle ones caused by buggy linkers The importance of this bug must not be overlooked: it won't cause programs to crash in obvious ways. It creates a security hole, and possibly even worse, if you are modifying the library source code *************** *** 655,661 **** So, if you want to link programs against the library before you install it, you must use libtool to do the linking. ! @cindex Linking against uninstalled libraries Here's the old way of linking against an uninstalled library: @example --- 662,668 ---- So, if you want to link programs against the library before you install it, you must use libtool to do the linking. ! @cindex linking against uninstalled libraries Here's the old way of linking against an uninstalled library: @example *************** *** 689,705 **** burger$ @end example ! @cindex Wrapper scripts for programs ! @cindex Program wrapper scripts Notice that the executable, @code{hell}, was actually created in the @file{@value{objdir}} subdirectory. Then, a wrapper script was created in the current directory. On NetBSD 1.2, libtool encodes the installation directory of ! @file{libhello}, by using the @samp{-R/usr/local/lib} compiler ! flag. Then, the wrapper script guarantees that the executable finds the ! correct shared library (the one in @file{./@value{objdir}}) until it is properly ! installed. Let's compare the two different programs: --- 696,746 ---- burger$ @end example ! @cindex linking with installed libtool libraries ! ! Now assume @file{libhello.la} had already been installed, and you want ! to link a new program with it. You could figure out where it lives by ! yourself, then run: ! ! @example ! burger$ @kbd{gcc -g -O -o test test.o -L/usr/local/lib -lhello} ! @end example ! ! However, unless @file{/usr/local/lib} is in the standard library search ! path, you won't be able to run @code{test}. However, if you use libtool ! to link the already-installed libtool library, it will do The Right ! Thing (TM) for you: ! ! @example ! burger$ @kbd{libtool gcc -g -O -o test test.o /usr/local/lib/libhello.la} ! gcc -g -O -o @value{objdir}/test test.o -Wl,--rpath ! -Wl,/usr/local/lib /usr/local/lib/libhello.a -lm ! creating test ! burger$ ! @end example ! ! Note that libtool added the necessary run-time path flag, as well as ! @samp{-lm}, the library libhello.la depended upon. Nice, huh? ! ! Since libtool created a wrapper script, you should use libtool to ! install it and debug it too. However, since the program does not depend ! on any uninstalled libtool library, it is probably usable even without ! the wrapper script. Libtool could probably be made smarter to avoid the ! creation of the wrapper script in this case, but this is left as an ! exercise for the reader. ! ! ! @cindex wrapper scripts for programs ! @cindex program wrapper scripts Notice that the executable, @code{hell}, was actually created in the @file{@value{objdir}} subdirectory. Then, a wrapper script was created in the current directory. On NetBSD 1.2, libtool encodes the installation directory of ! @file{libhello}, by using the @samp{-R/usr/local/lib} compiler flag. ! Then, the wrapper script guarantees that the executable finds the ! correct shared library (the one in @file{./@value{objdir}}) until it is ! properly installed. Let's compare the two different programs: *************** *** 747,762 **** If @file{hell} was a complicated program, you would certainly want to test and debug it before installing it on your system. In the above ! section, you saw how it the libtool wrapper script makes it possible to ! run the program directly, but unfortunately, it interferes with the ! debugger: @example burger$ @kbd{gdb hell} GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. ! There is absolutely no warranty for GDB; type "show warranty" for details. ! GDB 4.16 (i386-unknown-netbsd), Copyright 1996 Free Software Foundation, Inc... "hell": not in executable format: File format not recognized --- 788,803 ---- If @file{hell} was a complicated program, you would certainly want to test and debug it before installing it on your system. In the above ! section, you saw how the libtool wrapper script makes it possible to run ! the program directly, but unfortunately, this mechanism interferes with ! the debugger: @example burger$ @kbd{gdb hell} GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. ! There is no warranty for GDB; type "show warranty" for details. ! GDB 4.16 (i386-unknown-netbsd), (C) 1996 Free Software Foundation, Inc. "hell": not in executable format: File format not recognized *************** *** 764,780 **** burger$ @end example ! Sad. It doesn't work because GDB isn't doesn't know where the ! executable lives. So, let's try again, by invoking GDB directly on the ! executable: @example burger$ @kbd{gdb @value{objdir}/hell} trick:/home/src/libtool/demo$ gdb .libs/hell GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. ! There is absolutely no warranty for GDB; type "show warranty" for details. ! GDB 4.16 (i386-unknown-netbsd), Copyright 1996 Free Software Foundation, Inc... (gdb) @kbd{break main} Breakpoint 1 at 0x8048547: file main.c, line 29. (gdb) @kbd{run} --- 805,820 ---- burger$ @end example ! Sad. It doesn't work because GDB doesn't know where the executable ! lives. So, let's try again, by invoking GDB directly on the executable: @example burger$ @kbd{gdb @value{objdir}/hell} trick:/home/src/libtool/demo$ gdb .libs/hell GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. ! There is no warranty for GDB; type "show warranty" for details. ! GDB 4.16 (i386-unknown-netbsd), (C) 1996 Free Software Foundation, Inc. (gdb) @kbd{break main} Breakpoint 1 at 0x8048547: file main.c, line 29. (gdb) @kbd{run} *************** *** 796,803 **** burger$ @kbd{libtool gdb hell} GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. ! There is absolutely no warranty for GDB; type "show warranty" for details. ! GDB 4.16 (i386-unknown-netbsd), Copyright 1996 Free Software Foundation, Inc... (gdb) @kbd{break main} Breakpoint 1 at 0x8048547: file main.c, line 29. (gdb) @kbd{run} --- 836,843 ---- burger$ @kbd{libtool gdb hell} GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. ! There is no warranty for GDB; type "show warranty" for details. ! GDB 4.16 (i386-unknown-netbsd), (C) 1996 Free Software Foundation, Inc. (gdb) @kbd{break main} Breakpoint 1 at 0x8048547: file main.c, line 29. (gdb) @kbd{run} *************** *** 846,854 **** a23# @end example ! Note that the libtool library @file{libhello.la} is also installed, for ! informational purposes, and to help libtool with uninstallation ! (@pxref{Uninstall mode}). Here is the shared library example: --- 886,895 ---- a23# @end example ! Note that the libtool library @file{libhello.la} is also installed, to ! help libtool with uninstallation (@pxref{Uninstall mode}) and linking ! (@pxref{Linking executables}) and to help programs with dlopening ! (@pxref{Dlopened modules}). Here is the shared library example: *************** *** 861,868 **** burger# @end example ! @cindex Stripping libraries ! @cindex Libraries, stripping It is safe to specify the @samp{-s} (strip symbols) flag if you use a BSD-compatible install program when installing libraries. Libtool will either ignore the @samp{-s} flag, or will run a program --- 902,909 ---- burger# @end example ! @cindex stripping libraries ! @cindex libraries, stripping It is safe to specify the @samp{-s} (strip symbols) flag if you use a BSD-compatible install program when installing libraries. Libtool will either ignore the @samp{-s} flag, or will run a program *************** *** 873,890 **** make sure that where the library is installed actually agrees with the @samp{-rpath} flag you used to build it. ! @cindex Postinstallation ! @cindex Installation, finishing ! @cindex Libraries, finishing installation Then, running @samp{libtool -n --finish @var{libdir}} can give you further hints on what to do (@pxref{Finish mode}): @example burger# @kbd{libtool -n --finish /usr/local/lib} ! ldconfig -m /usr/local/lib ! To link against installed libraries in LIBDIR, users may have to: ! - add LIBDIR to their `LD_LIBRARY_PATH' environment variable ! - use the `-LLIBDIR' linker flag burger# @end example --- 914,945 ---- make sure that where the library is installed actually agrees with the @samp{-rpath} flag you used to build it. ! @cindex postinstallation ! @cindex installation, finishing ! @cindex libraries, finishing installation Then, running @samp{libtool -n --finish @var{libdir}} can give you further hints on what to do (@pxref{Finish mode}): @example burger# @kbd{libtool -n --finish /usr/local/lib} ! PATH="$PATH:/sbin" ldconfig -m /usr/local/lib ! ----------------------------------------------------------------- ! Libraries have been installed in: ! /usr/local/lib ! ! To link against installed libraries in a given directory, LIBDIR, ! you must use the `-LLIBDIR' flag during linking. ! ! You will also need to do one of the following: ! - add LIBDIR to the `LD_LIBRARY_PATH' environment variable ! during execution ! - add LIBDIR to the `LD_RUN_PATH' environment variable ! during linking ! - use the `-RLIBDIR' linker flag ! ! See any operating system documentation about shared libraries for ! more information, such as the ld and ld.so manual pages. ! ----------------------------------------------------------------- burger# @end example *************** *** 920,939 **** @node Static libraries @section Linking static libraries ! @cindex Static linking ! @cindex Convenience libraries Why return to @code{ar} and @code{ranlib} silliness when you've had a taste of libtool? Well, sometimes it is desirable to create a static archive that can never be shared. The most frequent case is when you ! have a ``convenience library'' that is a collection of related object ! files without a really nice interface. - To do this, you should ignore libtool entirely, and just use the old - @code{ar} and @code{ranlib} commands to create a static library. - - If you want to install the library (but you probably don't), then you - may use libtool if you want: - @example burger$ @kbd{libtool ./install-sh -c libhello.a /local/lib/libhello.a} ./install-sh -c libhello.a /local/lib/libhello.a --- 975,999 ---- @node Static libraries @section Linking static libraries ! @cindex static linking ! @cindex convenience libraries Why return to @code{ar} and @code{ranlib} silliness when you've had a taste of libtool? Well, sometimes it is desirable to create a static archive that can never be shared. The most frequent case is when you ! have a set of object files that you use to build several different ! programs. You can create a ``convenience library'' out of those ! objects, and link programs with the library, instead of listing all ! object files for every program. This technique is often used to ! overcome GNU automake's lack of support for linking object files from ! other directories, because it supports linking with libraries from other ! directories. ! ! If you just want to link this convenience library into programs, then ! you could just ignore libtool entirely, and use the old @code{ar} and ! @code{ranlib} commands (or the corresponding GNU automake ! @samp{_LIBRARIES} rules). You can even install a convenience library ! (but you probably don't want to) using libtool: @example burger$ @kbd{libtool ./install-sh -c libhello.a /local/lib/libhello.a} ./install-sh -c libhello.a /local/lib/libhello.a *************** *** 944,951 **** Using libtool for static library installation protects your library from being accidentally stripped (if the installer used the @samp{-s} flag), as well as automatically running the correct @code{ranlib} command. ! @cindex Standalone binaries Another common situation where static linking is desirable is in creating a standalone binary. Use libtool to do the linking and add the @samp{-all-static} flag. --- 1004,1034 ---- Using libtool for static library installation protects your library from being accidentally stripped (if the installer used the @samp{-s} flag), as well as automatically running the correct @code{ranlib} command. + + But libtool libraries are more than just collections of object files: + they can also carry library dependency information, which old archives + do not. If you want to create a libtool static convenience library, you + can omit the @samp{-rpath} flag and use @samp{-static} to indicate that + you're only interested in a static library. When you link a program + with such a library, libtool will actually link all object files and + dependency libraries into the program. + + If you omit both @samp{-rpath} and @samp{-static}, libtool create a + libtool convenience library that can be used to create other libtool + libraries, even shared ones. Just like in the static case, the library + behaves as an alias to a set of object files and dependency libraries, + but in this case the object files are suitable for inclusion in shared + libraries. But be careful not to link a single convenience library, + directly or indirectly, into a single program or library, otherwise you + may get errors about symbol redefinitions. + + As a rule of thumb, link a libtool convenience library into at most one + libtool library, and never into a program, and link libtool static + convenience libraries only into programs, and only if you need to carry + library dependency information to the user of the static convenience + library. ! @cindex standalone binaries Another common situation where static linking is desirable is in creating a standalone binary. Use libtool to do the linking and add the @samp{-all-static} flag. *************** *** 954,981 **** @chapter Invoking @code{libtool} @pindex libtool @cindex libtool command options ! @cindex Options, libtool command ! @cindex Command options, libtool The @code{libtool} program has the following synopsis: @example ! libtool [@var{option}]@dots{} [@var{mode-arg}]... @end example @noindent and accepts the following options: @table @samp @item -n @itemx --dry-run Don't create, modify, or delete any files, just show what commands would be executed by libtool. @item --features ! Display libtool configuration information and exit. This provides a way ! for packages to determine whether shared or static libraries will be ! built. @item --finish Same as @samp{--mode=finish}. --- 1037,1071 ---- @chapter Invoking @code{libtool} @pindex libtool @cindex libtool command options ! @cindex options, libtool command ! @cindex command options, libtool The @code{libtool} program has the following synopsis: @example ! libtool [@var{option}]@dots{} [@var{mode-arg}]@dots{} @end example @noindent and accepts the following options: @table @samp + @item --config + Display libtool configuration variables and exit. + + @item --debug + Dump a trace of shell script execution to standard output. This + produces a lot of output, so you may wish to pipe it to @code{less} (or + @code{more}) or redirect to a file. + @item -n @itemx --dry-run Don't create, modify, or delete any files, just show what commands would be executed by libtool. @item --features ! Display basic configuration options. This provides a way for packages ! to determine whether shared or static libraries will be built. @item --finish Same as @samp{--mode=finish}. *************** *** 987,993 **** @item --mode=@var{mode} Use @var{mode} as the operation mode. By default, the operation mode is ! inferred from the contents of @var{mode-args}. If @var{mode} is specified, it must be one of the following: --- 1077,1083 ---- @item --mode=@var{mode} Use @var{mode} as the operation mode. By default, the operation mode is ! inferred from the @var{mode-args}. If @var{mode} is specified, it must be one of the following: *************** *** 1016,1021 **** --- 1106,1115 ---- Print libtool version information and exit. @end table + The @var{mode-args} are a variable number of arguments, depending on the + selected operation mode. In general, each @var{mode-arg} is interpreted + by programs libtool invokes, rather than libtool itself. + @menu * Compile mode:: Creating library object files. * Link mode:: Generating executables and libraries. *************** *** 1027,1039 **** @node Compile mode @section Compile mode ! @cindex Mode, compile ! @cindex Compile mode ! For @samp{compile} mode, @var{mode-args} is a compiler command to be ! used in creating a `standard' object file. These arguments should begin ! with the name of the C compiler, and contain the @samp{-c} compiler flag ! so that only an object file is created. Libtool determines the name of the output file by removing the directory component from the source file name, then substituting the C source code --- 1121,1133 ---- @node Compile mode @section Compile mode ! @cindex mode, compile ! @cindex compile mode ! For @dfn{compile} mode, @var{mode-args} is a compiler command to be used ! in creating a `standard' object file. These arguments should begin with ! the name of the C compiler, and contain the @samp{-c} compiler flag so ! that only an object file is created. Libtool determines the name of the output file by removing the directory component from the source file name, then substituting the C source code *************** *** 1041,1058 **** If shared libraries are being built, any necessary PIC generation flags are substituted into the compilation command. ! Note that the @samp{-o} option is not supported for compile mode, ! because it cannot be implemented properly for all platforms. It is far ! easier just to change your Makefiles to create all the output files in ! the current working directory. @node Link mode @section Link mode ! @cindex Link mode ! @cindex Mode, link ! @samp{link} mode links together object files (including library objects) to form another library or to create an executable program. @var{mode-args} consist of a command using the C compiler to create an --- 1135,1173 ---- If shared libraries are being built, any necessary PIC generation flags are substituted into the compilation command. + + If the @samp{-static} option is given, then a @samp{.o} file is built, + even if libtool was configured with @samp{--disable-static}. ! Note that the @samp{-o} option is now fully supported. It is emulated ! on the platforms that don't support it (by locking and moving the ! objects), so it is really easy to use libtool, just with minor ! modifications to your Makefiles. Typing for example ! @example ! libtool gcc -c foo/x.c -o foo/x.lo ! @end example ! will do what you expect. ! ! Note, however, that, if the compiler does not support @samp{-c} and ! @samp{-o}, it is impossible to compile @file{foo/x.c} without ! overwriting an existing @file{./x.o}. Therefore, if you do have a ! source file @file{./x.c}, make sure you introduce dependencies in your ! @file{Makefile} to make sure @file{./x.o} (or @file{./x.lo}) is ! re-created after any sub-directory's @file{x.lo}: ! @example ! x.o x.lo: foo/x.lo bar/x.lo ! @end example ! This will also ensure that make won't try to use a temporarily corrupted ! @file{x.o} to create a program or library. It may cause needless ! recompilation on platforms that support @samp{-c} and @samp{-o} ! together, but it's the only way to make it safe for those that don't. @node Link mode @section Link mode ! @cindex link mode ! @cindex mode, link ! @dfn{Link} mode links together object files (including library objects) to form another library or to create an executable program. @var{mode-args} consist of a command using the C compiler to create an *************** *** 1061,1086 **** The following components of @var{mode-args} are treated specially: @table @samp ! @cindex Undefined symbols, allowing ! @cindex Unresolved symbols, allowing @item -all-static If @var{output-file} is a program, then do not link it against any shared libraries at all. If @var{output-file} is a library, then only create a static library. @item -dlopen @var{file} Same as @samp{-dlpreopen @var{file}}, if native dlopening is not ! supported on the host platform (@pxref{Dlopened modules}). Otherwise, ! no effect. @item -dlpreopen @var{file} Link @var{file} into the output program, and add its symbols to ! @var{dld_preloaded_symbols} (@pxref{Dlpreopening}). @item -export-dynamic ! Allow symbols from @var{output-file} to be resolved with @code{dlsym(3)} (@pxref{Dlopened modules}). @item -L@var{libdir} Search @var{libdir} for required libraries that have already been installed. --- 1176,1222 ---- The following components of @var{mode-args} are treated specially: @table @samp ! @cindex undefined symbols, allowing ! @cindex unresolved symbols, allowing @item -all-static If @var{output-file} is a program, then do not link it against any shared libraries at all. If @var{output-file} is a library, then only create a static library. + @item -avoid-version + Tries to avoid versioning (@pxref{Versioning}) for libraries and modules, + i.e. no version information is stored and no symbolic links are created. + If the platform requires versioning, this option has no effect. + @item -dlopen @var{file} Same as @samp{-dlpreopen @var{file}}, if native dlopening is not ! supported on the host platform (@pxref{Dlopened modules}) or if ! the program is linked with @samp{-static} or @samp{-all-static}. ! Otherwise, no effect. If @var{file} is @code{self} libtool will make ! sure that the program can @code{dlopen} itself, either by enabling ! @code{-export-dynamic} or by falling back to @samp{-dlpreopen self}. @item -dlpreopen @var{file} Link @var{file} into the output program, and add its symbols to ! @var{lt_preloaded_symbols} (@pxref{Dlpreopening}). If @var{file} is ! @code{self}, the symbols of the program itself will be added to ! @var{lt_preloaded_symbols}. @item -export-dynamic ! Allow symbols from @var{output-file} to be resolved with @code{dlsym} (@pxref{Dlopened modules}). + @item -export-symbols @var{symfile} + Tells the linker to export only the symbols listed in @var{symfile}. + The symbol file should end in @samp{.sym} and must contain the name of one + symbol per line. This option has no effect on some platforms. + By default all symbols are exported. + + @item -export-symbols-regex @var{regex} + Same as @samp{-export-symbols}, except that only symbols matching + the regular expression @var{regex} are exported. + By default all symbols are exported. + @item -L@var{libdir} Search @var{libdir} for required libraries that have already been installed. *************** *** 1090,1095 **** --- 1226,1238 ---- This option is required even when @var{output-file} is not an executable. + @item -module + Creates a library that can be dlopenend (@pxref{Dlopened modules}). + 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. + @item -no-undefined Declare that @var{output-file} does not depend on any other libraries. Some platforms cannot create shared libraries that depend on other *************** *** 1103,1114 **** package, so that users can easily tell which versions are newer than others. Be warned that no two releases of your package will be binary compatible if you use this flag. If you want binary compatibility, use ! the @samp{-version-info} flag (@pxref{Versioning}). @item -rpath @var{libdir} If @var{output-file} is a library, it will eventually be installed in ! @var{libdir}. @item -static If @var{output-file} is a program, then do not link it against any uninstalled shared libtool libraries. If @var{output-file} is a --- 1246,1264 ---- package, so that users can easily tell which versions are newer than others. Be warned that no two releases of your package will be binary compatible if you use this flag. If you want binary compatibility, use ! the @samp{-version-info} flag instead (@pxref{Versioning}). @item -rpath @var{libdir} If @var{output-file} is a library, it will eventually be installed in ! @var{libdir}. If @var{output-file} is a program, add @var{libdir} to ! the run-time path of the program. + @item -R @var{libdir} + If @var{output-file} is a program, add @var{libdir} to its run-time + path. If @var{output-file} is a library, add -R@var{libdir} to its + @var{dependency_libs}, so that, whenever the library is linked into a + program, @var{libdir} will be added to its run-time path. + @item -static If @var{output-file} is a program, then do not link it against any uninstalled shared libtool libraries. If @var{output-file} is a *************** *** 1130,1137 **** If the @var{output-file} ends in @samp{.a}, then a standard library is created using @code{ar} and possibly @code{ranlib}. ! @cindex Partial linking ! @cindex Linking, partial If @var{output-file} ends in @samp{.o} or @samp{.lo}, then a reloadable object file is created from the input files (generally using @samp{ld -r}). This method is often called @dfn{partial linking}. --- 1280,1287 ---- If the @var{output-file} ends in @samp{.a}, then a standard library is created using @code{ar} and possibly @code{ranlib}. ! @cindex partial linking ! @cindex linking, partial If @var{output-file} ends in @samp{.o} or @samp{.lo}, then a reloadable object file is created from the input files (generally using @samp{ld -r}). This method is often called @dfn{partial linking}. *************** *** 1140,1149 **** @node Execute mode @section Execute mode ! @cindex Execute mode ! @cindex Mode, execute ! For @samp{execute} mode, the library path is automatically set, then a program is executed. The first of the @var{mode-args} is treated as a program name, with the --- 1290,1299 ---- @node Execute mode @section Execute mode ! @cindex execute mode ! @cindex mode, execute ! For @dfn{execute} mode, the library path is automatically set, then a program is executed. The first of the @var{mode-args} is treated as a program name, with the *************** *** 1165,1174 **** @node Install mode @section Install mode ! @cindex Install mode ! @cindex Mode, install ! In @samp{install} mode, libtool interprets @var{mode-args} as an installation command beginning with @code{cp}, or a BSD-compatible @code{install} program. --- 1315,1324 ---- @node Install mode @section Install mode ! @cindex install mode ! @cindex mode, install ! In @dfn{install} mode, libtool interprets @var{mode-args} as an installation command beginning with @code{cp}, or a BSD-compatible @code{install} program. *************** *** 1180,1190 **** @node Finish mode @section Finish mode ! @cindex Finish mode ! @cindex Mode, finish ! @samp{finish} mode helps system administrators install libtool ! libraries so that they can be located and linked into user programs. Each @var{mode-arg} is interpreted as the name of a library directory. Running this command may require superuser privileges, so the --- 1330,1340 ---- @node Finish mode @section Finish mode ! @cindex finish mode ! @cindex mode, finish ! @dfn{Finish} mode helps system administrators install libtool libraries ! so that they can be located and linked into user programs. Each @var{mode-arg} is interpreted as the name of a library directory. Running this command may require superuser privileges, so the *************** *** 1192,1201 **** @node Uninstall mode @section Uninstall mode ! @cindex Uninstall mode ! @cindex Mode, uninstall ! This mode deletes installed libraries (and other files). The first @var{mode-arg} is the name of the program to use to delete files (typically @file{/bin/rm}). --- 1342,1351 ---- @node Uninstall mode @section Uninstall mode ! @cindex uninstall mode ! @cindex mode, uninstall ! @dfn{Uninstall} mode deletes installed libraries (and other files). The first @var{mode-arg} is the name of the program to use to delete files (typically @file{/bin/rm}). *************** *** 1204,1210 **** (beginning with a `-'), or the names of files to delete. @node Integrating libtool ! @chapter Integrating libtool with your own packages This chapter describes how to integrate libtool with your packages so that your users can install hassle-free shared libraries. --- 1354,1360 ---- (beginning with a `-'), or the names of files to delete. @node Integrating libtool ! @chapter Integrating libtool with your package This chapter describes how to integrate libtool with your packages so that your users can install hassle-free shared libraries. *************** *** 1271,1276 **** --- 1421,1456 ---- hell_debug_LDFLAGS = -static @end example + The flags @samp{-dlopen} or @samp{-dlpreopen} (@pxref{Link mode}) would + fit better in the @var{program_LDADD} variable. Unfortunately, GNU + automake, up to release 1.4, doesn't accept these flags in a + @var{program_LDADD} variable, so you have the following alternatives: + + @itemize @bullet + @item + add them to @var{program_LDFLAGS}, and list the libraries in + @var{program_DEPENDENCIES}, then wait for a release of GNU automake that + accepts these flags where they belong; + + @item + surround the flags between quotes, but then you must set + @var{program_DEPENDENCIES} too: + + @example + program_LDADD = "-dlopen" libfoo.la + program_DEPENDENCIES = libfoo.la + @end example + + @item + set and @samp{AC_SUBST} variables @var{DLOPEN} and @var{DLPREOPEN} in + @file{configure.in} and use @samp{@@DLOPEN@@} and @samp{@@DLPREOPEN@@} + as replacements for the explicit flags @samp{-dlopen} and + @samp{-dlpreopen} in @samp{program_LDADD}. Automake will discard + @samp{AC_SUBST}ed variables from dependencies, so it will behave exactly + as we expect it to behave when it accepts these flags in + @samp{program_LDADD}. But hey!, this is ugly! + @end itemize + You may use the @samp{program_LDFLAGS} variable to stuff in any flags you want to pass to libtool while linking @samp{program} (such as @samp{-static} to avoid linking uninstalled shared libtool libraries). *************** *** 1294,1300 **** @node Configuring @section Configuring libtool ! @cindex Configuring libtool Libtool requires intimate knowledge of your compiler suite and operating system in order to be able to create shared libraries and link against --- 1474,1480 ---- @node Configuring @section Configuring libtool ! @cindex configuring libtool Libtool requires intimate knowledge of your compiler suite and operating system in order to be able to create shared libraries and link against *************** *** 1325,1332 **** @subsection Invoking @code{ltconfig} @pindex ltconfig @cindex ltconfig command options ! @cindex Options, ltconfig command ! @cindex Command options, ltconfig @code{ltconfig} runs a series of configuration tests, then creates a system-specific @code{libtool} in the current directory. The --- 1505,1512 ---- @subsection Invoking @code{ltconfig} @pindex ltconfig @cindex ltconfig command options ! @cindex options, ltconfig command ! @cindex command options, ltconfig @code{ltconfig} runs a series of configuration tests, then creates a system-specific @code{libtool} in the current directory. The *************** *** 1340,1345 **** --- 1520,1530 ---- and accepts the following options: @table @samp + @item --debug + Dump a trace of shell script execution to standard output. This + produces a lot of output, so you may wish to pipe it to @code{less} (or + @code{more}) or redirect to a file. + @item --disable-shared Create a @code{libtool} that only builds static libraries. *************** *** 1348,1353 **** --- 1533,1550 ---- available. If only static libraries can be built, then this flag has no effect. + @item --disable-fast-install + On platforms in which installable executables, that are created by + default, are not suitable for execution in the build directory, create a + @code{libtool} that links executables that search for uninstalled + libraries by default, and relinks them at install time. It is ignored + on platforms in which a single executable is enough. + + @item --enable-dlopen + Test whether some dlopening mechanism is supported. If this flag is not + given, or no working dlopening mechanism is found, create a + @code{libtool} that performs dlpreopening of all dlopened modules. + @item --help Display a help message and exit. *************** *** 1355,1360 **** --- 1552,1564 ---- Do not use @code{config.sub} to verify that @var{host} is a valid canonical host system name. + @item --output=@var{file} + @item -o @var{file} + Instead of creating a libtool script called @code{libtool}, create one + called @var{file}. This can be useful if you want to create libtool + scripts for cross-compilers, or you want to have more than one libtool + in the same directory. + @item --quiet @itemx --silent Do not print informational messages when running configuration tests. *************** *** 1368,1373 **** --- 1572,1590 ---- @item --with-gcc Assume that the GNU C compiler will be used when invoking the created @code{libtool} to compile and link object files. + + @item --with-gnu-ld + Assume that the C compiler uses the GNU linker. + + @item --disable-lock + Create a @code{libtool} that does not perform locking to ensure proper + parallel compilation if the C compiler does not support @samp{-c} and + @samp{-o} together. + + @item --cache-file=@var{file} + Use this @var{file} as a cache for results of a few tests. This is + usually @file{config.cache} used by @code{configure}. By default, no + cache file is used. @end table @var{ltmain} is the @code{ltmain.sh} shell script fragment that provides *************** *** 1379,1408 **** @code{ltconfig} also recognizes the following environment variables: @defvar CC ! The C compiler that will be used by the generated @code{libtool}. @end defvar @defvar CFLAGS ! Compiler flags used to generate standard object files. @end defvar @defvar CPPFLAGS ! C preprocessor flags. @end defvar @defvar LD The system linker to use (if the generated @code{libtool} requires one). @end defvar @defvar RANLIB Program to use rather than checking for @code{ranlib}. @end defvar @node ltconfig example @subsection Using @code{ltconfig} Here is a simple example of using @code{ltconfig} to configure libtool ! on my NetBSD/i386 1.2 system: @example burger$ @kbd{./ltconfig ltmain.sh} --- 1596,1670 ---- @code{ltconfig} also recognizes the following environment variables: @defvar CC ! The C compiler that will be used by the generated @code{libtool}. If ! this is not set, @code{ltconfig} will look for @code{gcc} or @code{cc}. @end defvar @defvar CFLAGS ! Compiler flags used to generate standard object files. If this is not ! set, @code{ltconfig} will not use any such flags. It affects only the ! way @code{ltconfig} runs tests, not the produced @code{libtool}. @end defvar @defvar CPPFLAGS ! C preprocessor flags. If this is not set, @code{ltconfig} will not use ! any such flags. It affects only the way @code{ltconfig} runs tests, not ! the produced @code{libtool}. @end defvar @defvar LD The system linker to use (if the generated @code{libtool} requires one). + If this is not set, @code{ltconfig} will try to find out what is the + linker used by @var{CC}. + @end defvar + + @defvar LDFLAGS + The flags to be used by @code{ltconfig} when it links a program. If + this is not set, @code{ltconfig} will not use any such flags. It + affects only the way @code{ltconfig} runs tests, not the produced + @code{libtool}. + @end defvar + + @defvar LIBS + The libraries to be used by @code{ltconfig} when it links a program. If + this is not set, @code{ltconfig} will not use any such flags. It + affects only the way @code{ltconfig} runs tests, not the produced + @code{libtool}. + @end defvar + + @defvar NM + Program to use rather than checking for @code{nm}. @end defvar @defvar RANLIB Program to use rather than checking for @code{ranlib}. @end defvar + @defvar LN_S + A command that creates a link of a program, a soft-link if possible, a + hard-link otherwise. + @end defvar + + @defvar DLLTOOL + Program to use rather than checking for @code{dlltool}. Only meaningful + for Cygwin/MS-Windows. + @end defvar + + @defvar OBJDUMP + Program to use rather than checking for @code{objdump}. Only meaningful + for Cygwin/MS-Windows. + @end defvar + + @defvar AS + Program to use rather than checking for @code{as}. Only meaningful for + Cygwin/MS-Windows. + @end defvar + @node ltconfig example @subsection Using @code{ltconfig} Here is a simple example of using @code{ltconfig} to configure libtool ! on a NetBSD/i386 1.2 system: @example burger$ @kbd{./ltconfig ltmain.sh} *************** *** 1463,1505 **** 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 setting calling either the ! @code{AM_DISABLE_SHARED} or @code{AM_DISABLE_STATIC} macros: @example ! # Turn off shared libraries during beta-testing, since they make the ! # build process take too long. ! AM_DISABLE_SHARED AM_PROG_LIBTOOL @end example ! The user may specify a modified form of @samp{--enable-shared} and ! @samp{--enable-static} to choose whether shared or static libraries are ! built based on the name of the package. For example, to have shared ! @samp{bfd} and @samp{gdb} libraries built, but not shared @samp{libg++}, ! you can run all three @code{configure} scripts as follows: @example trick$ ./configure --enable-shared=bfd,gdb @end example In general, specifying @samp{--enable-shared=@var{pkgs}} is the same as ! specifying @samp{--enable-shared} to every package named in the ! @var{pkgs} list, and @samp{--disable-shared} to every other package. ! The @samp{--enable-static=@var{pkgs}} flag behaves similarly, except it ! translates into @samp{--enable-static} and @samp{--disable-static}. The package name @samp{default} matches any packages which have not set their name in the @code{PACKAGE} environment variable. @end defmac ! @defmac 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 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}. --- 1725,1824 ---- 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{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. ! AC_DISABLE_SHARED AM_PROG_LIBTOOL @end example ! The user may specify modified forms of the configure flags ! @samp{--enable-shared} and @samp{--enable-static} to choose whether ! shared or static libraries are built based on the name of the package. ! For example, to have shared @samp{bfd} and @samp{gdb} libraries built, ! but not shared @samp{libg++}, you can run all three @code{configure} ! scripts as follows: @example trick$ ./configure --enable-shared=bfd,gdb @end example In general, specifying @samp{--enable-shared=@var{pkgs}} is the same as ! 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}. 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. + + This macro also sets the shell variable @var{LIBTOOL_DEPS}, that you can + use to automatically update the libtool script if it becomes + out-of-date. In order to do that, add to your @file{configure.in}: + + @example + AM_PROG_LIBTOOL + AC_SUBST(LIBTOOL_DEPS) + @end example + + and, to @file{Makefile.in} or @file{Makefile.am}: + + @example + LIBTOOL_DEPS = @@LIBTOOL_DEPS@@ + libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status --recheck + @end example + + If you are using GNU automake, you can omit the assignment, as automake + will take care of it. You'll obviously have to create some dependency + on @file{libtool}. + + @end defmac + + @defmac AC_LIBTOOL_DLOPEN + Enable checking for dlopen support. This macro should be used if + the package makes use of the @samp{-dlopen} and @samp{-dlpreopen} flags, + otherwise libtool will assume that the system does not support dlopening. + The macro must be called @strong{before} @code{AM_PROG_LIBTOOL}. @end defmac ! @defmac AC_LIBTOOL_WIN32_DLL ! This macro should be used if the package has been ported to build clean ! dlls on win32 platforms. Usually this means that any library data items ! are exported with @code{__declspec(dllexport)} and imported with ! @code{__declspec(dllimport)}. If this macro is not used, libtool will ! assume that the package libraries are not dll clean and will build only ! static libraries on win32 hosts. ! ! @code{AM_PROG_LIBTOOL} must be called @strong{after} this macro, and ! provision must be made to pass @samp{-no-undefined} to @code{libtool} ! in link mode from the package @code{Makefile}. Naturally, passing ! @samp{-no-undefined} means that all the library symbols @strong{really are} ! defined at link time! ! @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, depending on platform support, 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 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}. *************** *** 1513,1519 **** @code{configure} script. @node Distributing ! @section Including libtool with your package In order to use libtool, you need to include the following files with your package: --- 1832,1838 ---- @code{configure} script. @node Distributing ! @section Including libtool in your package In order to use libtool, you need to include the following files with your package: *************** *** 1550,1557 **** @subsection Invoking @code{libtoolize} @pindex libtoolize @cindex libtoolize command options ! @cindex Command options, libtoolize ! @cindex Options, libtoolize command The @code{libtoolize} program provides a standard way to add libtool support to your package. In the future, it may implement better usage --- 1869,1876 ---- @subsection Invoking @code{libtoolize} @pindex libtoolize @cindex libtoolize command options ! @cindex command options, libtoolize ! @cindex options, libtoolize command The @code{libtoolize} program provides a standard way to add libtool support to your package. In the future, it may implement better usage *************** *** 1579,1584 **** --- 1898,1908 ---- Copy files from the libtool data directory rather than creating symlinks. + @item --debug + Dump a trace of shell script execution to standard output. This + produces a lot of output, so you may wish to pipe it to @code{less} (or + @code{more}) or redirect to a file. + @item --dry-run @itemx -n Don't run any commands that modify the file system, just print them *************** *** 1592,1597 **** --- 1916,1927 ---- @item --help Display a help message and exit. + @item --ltdl + Install libltdl in a subdirectory of your package. + + @item --ltdl-tar + Add the file libltdl.tar.gz to your package. + @item --version Print @code{libtoolize} version information and exit. @end table *************** *** 1644,1675 **** @node Static-only libraries @section Static-only libraries ! @cindex Debugging libraries ! @cindex Developing libraries ! @cindex Double-compilation, avoiding ! @cindex Avoiding shared libraries ! @cindex Eliding shared libraries ! @cindex Using shared libraries, not ! @cindex Shared libraries, not using ! @cindex Time, saving ! @cindex Saving time When you are developing a package, it is often worthwhile to configure your package with the @samp{--disable-shared} flag, or to override the ! defaults for @code{AM_PROG_LIBTOOL} by using the @code{AM_DISABLE_SHARED} ! Autoconf macro (@pxref{AM_PROG_LIBTOOL}). This prevents libtool from ! building shared libraries, which has several advantages: @itemize @bullet @item ! compilation is twice as fast, which can speed up your development cycle @item debugging is easier because you don't need to deal with any complexities ! added by shared libraries @item ! you can see how libtool behaves on static-only platforms @end itemize You may want to put a small note in your package @file{README} to let --- 1974,2006 ---- @node Static-only libraries @section Static-only libraries ! @cindex debugging libraries ! @cindex developing libraries ! @cindex double-compilation, avoiding ! @cindex avoiding shared libraries ! @cindex eliding shared libraries ! @cindex using shared libraries, not ! @cindex shared libraries, not using ! @cindex time, saving ! @cindex saving time When you are developing a package, it is often worthwhile to configure your package with the @samp{--disable-shared} flag, or to override the ! defaults for @code{AM_PROG_LIBTOOL} by using the ! @code{AM_DISABLE_SHARED} Autoconf macro (@pxref{AM_PROG_LIBTOOL, , The ! @code{AM_PROG_LIBTOOL} macro}). This prevents libtool from building ! shared libraries, which has several advantages: @itemize @bullet @item ! compilation is twice as fast, which can speed up your development cycle, @item debugging is easier because you don't need to deal with any complexities ! added by shared libraries, and @item ! you can see how libtool behaves on static-only platforms. @end itemize You may want to put a small note in your package @file{README} to let *************** *** 1688,1702 **** @node Versioning @chapter Library interface versions ! @cindex Dynamic dependencies ! @cindex Dependency versioning ! @cindex Shared library versions The most difficult issue introduced by shared libraries is that of creating and resolving runtime dependencies. Dependencies on programs and libraries are often described in terms of a single name, such as ! @code{sed}. So, I may say ``libtool depends on sed,'' and that is good ! enough for most purposes. However, when an interface changes regularly, we need to be more specific: ``Gnus 5.1 requires Emacs 19.28 or above.'' Here, the --- 2019,2033 ---- @node Versioning @chapter Library interface versions ! @cindex dynamic dependencies ! @cindex dependency versioning ! @cindex shared library versions The most difficult issue introduced by shared libraries is that of creating and resolving runtime dependencies. Dependencies on programs and libraries are often described in terms of a single name, such as ! @code{sed}. So, one may say ``libtool depends on sed,'' and that is ! good enough for most purposes. However, when an interface changes regularly, we need to be more specific: ``Gnus 5.1 requires Emacs 19.28 or above.'' Here, the *************** *** 1721,1727 **** @node Interfaces @section What are library interfaces? ! @cindex Library interfaces Interfaces for libraries may be any of the following (and more): --- 2052,2058 ---- @node Interfaces @section What are library interfaces? ! @cindex library interfaces Interfaces for libraries may be any of the following (and more): *************** *** 1744,1752 **** @node Libtool versioning @section Libtool's versioning system ! @cindex Libtool library versions ! @cindex Formal versioning ! @cindex Versioning, formal Libtool has its own formal versioning system. It is not as flexible as some, but it is definitely the simplest of the more powerful versioning --- 2075,2083 ---- @node Libtool versioning @section Libtool's versioning system ! @cindex libtool library versions ! @cindex formal versioning ! @cindex versioning, formal Libtool has its own formal versioning system. It is not as flexible as some, but it is definitely the simplest of the more powerful versioning *************** *** 1831,1837 **** @item If the library source code has changed at all since the last update, then increment @var{revision} (@samp{@var{c}:@var{r}:@var{a}} becomes ! @samp{@var{c}:@var{r+1}:@var{a}}). @item If any interfaces have been added, removed, or changed since the last --- 2162,2168 ---- @item If the library source code has changed at all since the last update, then increment @var{revision} (@samp{@var{c}:@var{r}:@var{a}} becomes ! @samp{@var{c}:@math{r+1}:@var{a}}). @item If any interfaces have been added, removed, or changed since the last *************** *** 1849,1857 **** @strong{@emph{Never}} try to set the interface numbers so that they correspond to the release number of your package. This is an abuse that only fosters misunderstanding of the purpose of library versions. ! Instead, use the @samp{-release} flag (@pxref{Release numbers}), but be warned ! that every release of your package will not be binary compatibility with ! any other release. @node Release numbers @section Managing release information --- 2180,2188 ---- @strong{@emph{Never}} try to set the interface numbers so that they correspond to the release number of your package. This is an abuse that only fosters misunderstanding of the purpose of library versions. ! Instead, use the @samp{-release} flag (@pxref{Release numbers}), but be ! warned that every release of your package will not be binary compatible ! with any other release. @node Release numbers @section Managing release information *************** *** 1859,1865 **** Often, people want to encode the name of the package release into the shared library so that it is obvious to the user which package their programs are linked against. This convention is used especially on ! Linux: @example trick$ @kbd{ls /usr/lib/libbfd*} --- 2190,2196 ---- Often, people want to encode the name of the package release into the shared library so that it is obvious to the user which package their programs are linked against. This convention is used especially on ! GNU/Linux: @example trick$ @kbd{ls /usr/lib/libbfd*} *************** *** 1868,1875 **** trick$ @end example ! On @samp{trick}, @file{/usr/lib/libbfd.so} is just a symbolic link to ! @file{/usr/lib/libbfd.so.2.7.0.2}, which was distributed as a part of @samp{binutils-2.7.0.2}. Unfortunately, this convention conflicts directly with libtool's idea of --- 2199,2206 ---- trick$ @end example ! On @samp{trick}, @file{/usr/lib/libbfd.so} is a symbolic link to ! @file{libbfd.so.2.7.0.2}, which was distributed as a part of @samp{binutils-2.7.0.2}. Unfortunately, this convention conflicts directly with libtool's idea of *************** *** 1881,1909 **** flag in order to set release information for libraries which you do not want to use @samp{-version-info}. For the @file{libbfd} example, the next release which uses libtool should be built with @samp{-release ! 2.9.0}, which will produce the following files on Linux: @example trick$ @kbd{ls /usr/lib/libbfd*} ! /usr/lib/libbfd-2.9.0.so.0 /usr/lib/libbfd.so ! /usr/lib/libbfd-2.9.0.so.0.0.0 /usr/lib/libbfd.a trick$ @end example In this case, @file{/usr/lib/libbfd.so} is a symbolic link to ! @file{/usr/lib/libbfd-2.9.0.so.0.0.0}. This makes it obvious that the ! user is dealing with @samp{binutils-2.9.0}, without compromising ! libtool's idea of interface versions. ! ! Note that this option actually causes a modification of the library ! name, so do not use it if unless you want to break binary compatibility ! with any past library releases. In general, you should only use ! @samp{-release} for libraries whose interfaces change very frequently. @node Library tips @chapter Tips for interface design ! @cindex Library interfaces, design ! @cindex Design of library interfaces Writing a good library interface takes a lot of practice and thorough understanding of the problem that the library is intended to solve. --- 2212,2241 ---- flag in order to set release information for libraries which you do not want to use @samp{-version-info}. For the @file{libbfd} example, the next release which uses libtool should be built with @samp{-release ! 2.9.0}, which will produce the following files on GNU/Linux: @example trick$ @kbd{ls /usr/lib/libbfd*} ! /usr/lib/libbfd-2.9.0.so /usr/lib/libbfd.a ! /usr/lib/libbfd.so trick$ @end example In this case, @file{/usr/lib/libbfd.so} is a symbolic link to ! @file{libbfd-2.9.0.so}. This makes it obvious that the user is dealing ! with @samp{binutils-2.9.0}, without compromising libtool's idea of ! interface versions. ! ! Note that this option causes a modification of the library name, so do ! not use it unless you want to break binary compatibility with any past ! library releases. In general, you should only use @samp{-release} for ! package-internal libraries or for ones whose interfaces change very ! frequently. @node Library tips @chapter Tips for interface design ! @cindex library interfaces, design ! @cindex design of library interfaces Writing a good library interface takes a lot of practice and thorough understanding of the problem that the library is intended to solve. *************** *** 1921,1927 **** delete entry points very often. @item Avoid interface changes ! @cindex Renaming interface functions Some people love redesigning and changing entry points just for the heck of it (note: @emph{renaming} a function is considered changing an entry point). Don't be one of those people. If you must redesign an --- 2253,2259 ---- delete entry points very often. @item Avoid interface changes ! @cindex renaming interface functions Some people love redesigning and changing entry points just for the heck of it (note: @emph{renaming} a function is considered changing an entry point). Don't be one of those people. If you must redesign an *************** *** 1929,1935 **** users don't need to rewrite their existing code. @item Use opaque data types ! @cindex Opaque data types The fewer data type definitions a library user has access to, the better. If possible, design your functions to accept a generic pointer (which you can cast to an internal data type), and provide access --- 2261,2267 ---- users don't need to rewrite their existing code. @item Use opaque data types ! @cindex opaque data types The fewer data type definitions a library user has access to, the better. If possible, design your functions to accept a generic pointer (which you can cast to an internal data type), and provide access *************** *** 1942,1955 **** inheritance in an object-oriented system. @item Use header files ! @cindex Header files If you are careful to document each of your library's global functions and variables in header files, and include them in your library source files, then the compiler will let you know if you make any interface changes by accident (@pxref{C header files}). @item Use the @code{static} keyword (or equivalent) whenever possible ! @cindex Global functions The fewer global functions your library has, the more flexibility you'll have in changing them. Static functions and variables may change forms as often as you like@dots{} your users cannot access them, so they --- 2274,2287 ---- inheritance in an object-oriented system. @item Use header files ! @cindex header files If you are careful to document each of your library's global functions and variables in header files, and include them in your library source files, then the compiler will let you know if you make any interface changes by accident (@pxref{C header files}). @item Use the @code{static} keyword (or equivalent) whenever possible ! @cindex global functions The fewer global functions your library has, the more flexibility you'll have in changing them. Static functions and variables may change forms as often as you like@dots{} your users cannot access them, so they *************** *** 1962,1970 **** @node C header files @section Writing C header files ! @cindex Portable C headers @cindex C header files, portable ! @cindex Include files, portable Writing portable C header files can be difficult, since they may be read by different types of compilers: --- 2294,2302 ---- @node C header files @section Writing C header files ! @cindex portable C headers @cindex C header files, portable ! @cindex include files, portable Writing portable C header files can be difficult, since they may be read by different types of compilers: *************** *** 2068,2075 **** @node Inter-library dependencies @chapter Inter-library dependencies ! @cindex Dependencies between libraries ! @cindex Inter-library dependencies By definition, every shared library system provides a way for executables to depend on libraries, so that symbol resolution is --- 2400,2407 ---- @node Inter-library dependencies @chapter Inter-library dependencies ! @cindex dependencies between libraries ! @cindex inter-library dependencies By definition, every shared library system provides a way for executables to depend on libraries, so that symbol resolution is *************** *** 2077,2084 **** An @dfn{inter-library dependency} is one in which a library depends on other libraries. For example, if the libtool library @file{libhello} ! uses the @code{cos(3)} function, then it has an inter-library dependency ! on @file{libm}, the math library that implements @code{cos(3)}. Some shared library systems provide this feature in an internally-consistent way: these systems allow chains of dependencies of --- 2409,2416 ---- An @dfn{inter-library dependency} is one in which a library depends on other libraries. For example, if the libtool library @file{libhello} ! uses the @code{cos} function, then it has an inter-library dependency ! on @file{libm}, the math library that implements @code{cos}. Some shared library systems provide this feature in an internally-consistent way: these systems allow chains of dependencies of *************** *** 2095,2132 **** @code{-l@var{name}} option to the link line when you create your library.@footnote{Unfortunately, as of libtool version @value{VERSION}, there is no way to specify inter-library dependencies on libtool ! libraries that have not yet been installed.} To make an example of our ! @file{libhello} that depends on @file{libm}: @example burger$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \ -rpath /usr/local/lib -lm} burger$ @end example - - In order to link a program against @file{libhello}, you need to specify - the same @samp{-l} options, in order to guarantee that all the required - libraries are found. This restriction is only necessary to preserve - compatibility with static library systems and simple dynamic library - systems. ! Some platforms, such as AIX, do not even allow you this flexibility. In ! order to build a shared library, it must be entirely self-contained ! (that is, have no references to external symbols), and you need to ! specify the @var{-no-undefined} flag to allow a shared library to be ! built. By default, libtool builds only static libraries on these kinds ! of platforms. @node Dlopened modules @chapter Dlopened modules ! @findex dlopen(3) ! @findex dlsym(3) ! @findex dlclose(3) ! @findex shl_load(3) ! @cindex Dynamic linking, applications @cindex dlopening modules ! @cindex Modules, dynamic ! @cindex Application-level dynamic linking It can sometimes be confusing to discuss @dfn{dynamic linking}, because the term is used to refer to two different concepts: --- 2427,2474 ---- @code{-l@var{name}} option to the link line when you create your library.@footnote{Unfortunately, as of libtool version @value{VERSION}, there is no way to specify inter-library dependencies on libtool ! libraries that have not yet been installed. Libtool 1.4 will support ! this feature.} To make an example of our @file{libhello} ! that depends on @file{libm}: @example burger$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \ -rpath /usr/local/lib -lm} burger$ @end example ! When you link a program against @file{libhello}, you don't need to ! specify the same @samp{-l} options again: libtool will do that for you, ! in order to guarantee that all the required libraries are found. This ! restriction is only necessary to preserve compatibility with static ! library systems and simple dynamic library systems. ! ! Some platforms, such as AIX, do not even allow you this ! flexibility. In order to build a shared library, it must be entirely ! self-contained (that is, have references only to symbols that are found ! in the @samp{.lo} files or the specified @samp{-l} libraries), and you ! need to specify the @var{-no-undefined} flag. By default, libtool ! builds only static libraries on these kinds of platforms. ! ! The simple-minded inter-library dependency tracking code of libtool ! releases prior to 1.2 was disabled because it was not clear when it was ! possible to link one library with another, and complex failures would ! occur. A more complex implementation of this concept was re-introduced ! before release 1.3, but it has not been ported to all platforms that ! libtool supports. The default, conservative behavior is to avoid ! linking one library with another, introducing their inter-dependencies ! only when a program is linked with them. @node Dlopened modules @chapter Dlopened modules ! @findex dlopen ! @findex dlsym ! @findex dlclose ! @findex shl_load ! @cindex dynamic linking, applications @cindex dlopening modules ! @cindex modules, dynamic ! @cindex application-level dynamic linking It can sometimes be confusing to discuss @dfn{dynamic linking}, because the term is used to refer to two different concepts: *************** *** 2138,2148 **** process, dynamic linking is transparent to the application. @item ! The application calling functions such as ! @code{dlopen(3)},@footnote{HP-UX, to be different, uses a function named ! @code{shl_load(3)}.} which load arbitrary, user-specified modules at ! runtime. This type of dynamic linking is explicitly controlled by the ! application. @end enumerate To mitigate confusion, this manual refers to the second type of dynamic --- 2480,2489 ---- process, dynamic linking is transparent to the application. @item ! The application calling functions such as @code{dlopen},@footnote{HP-UX, ! to be different, uses a function named @code{shl_load}.} which load ! arbitrary, user-specified modules at runtime. This type of dynamic ! linking is explicitly controlled by the application. @end enumerate To mitigate confusion, this manual refers to the second type of dynamic *************** *** 2154,2174 **** language interpreters to provide an efficient way to extend the language. ! As of version @value{VERSION}, libtool provides experimental support for ! dlopened modules, which does not radically simplify the development of ! dlopening applications. However, this support is designed to be a ! portable foundation for generic, higher-level dlopen functions. ! ! This chapter discusses the preliminary support that libtool offers, and ! how you as a dlopen application developer might use libtool to generate ! dlopen-accessible modules. It is important to remember that these are ! experimental features, and not to rely on them for easy answers to the ! problems associated with dlopened modules. @menu * Building modules:: Creating dlopenable objects and libraries. * Dlpreopening:: Dlopening that works on static platforms. ! * Finding the dlname:: Choosing the right file to @code{dlopen(3)}. * Dlopen issues:: Unresolved problems that need your attention. @end menu --- 2495,2514 ---- language interpreters to provide an efficient way to extend the language. ! As of version @value{VERSION}, libtool provides support for dlopened ! modules. However, you should indicate that your package is willing to ! use such support, by using the macro @samp{AC_LIBTOOL_DLOPEN} in ! @file{configure.in}. If this macro is not used (or it is used ! @emph{after} @samp{AM_PROG_LIBTOOL}), libtool will assume no dlopening ! mechanism is available, and will try to simulate it. + This chapter discusses how you as a dlopen application developer might + use libtool to generate dlopen-accessible modules. + @menu * Building modules:: Creating dlopenable objects and libraries. * Dlpreopening:: Dlopening that works on static platforms. ! * Finding the dlname:: Choosing the right file to @code{dlopen}. * Dlopen issues:: Unresolved problems that need your attention. @end menu *************** *** 2176,2203 **** @section Building modules to dlopen On some operating systems, a program symbol must be specially declared ! in order to be dynamically resolved with the @code{dlsym(3)} (or equivalent) function. ! Libtool provides the @samp{-export-dynamic} link flag (@pxref{Link ! mode}), which does this declaration. You need to use this flag if you ! are linking an application program that dlopens other modules or a ! libtool library that will also be dlopened. For example, if we wanted to build a shared library, @file{libhello}, that would later be dlopened by an application, we would add ! @samp{-export-dynamic} to the other link flags: @example ! burger$ @kbd{libtool gcc -export-dynamic -o libhello.la foo.lo \ hello.lo -rpath /usr/local/lib -lm} burger$ @end example ! Another situation where you would use @samp{-export-dynamic} is if ! symbols from your @emph{executable} are needed to satisfy unresolved ! references in a library you want to dlopen. In this case, you should ! use @samp{-export-dynamic} while linking the executable that calls dlopen: @example --- 2516,2543 ---- @section Building modules to dlopen On some operating systems, a program symbol must be specially declared ! in order to be dynamically resolved with the @code{dlsym} (or equivalent) function. ! Libtool provides the @samp{-export-dynamic} and @samp{-module} ! link flags (@pxref{Link mode}), which do this declaration. ! You need to use these flags if you are linking an application program that ! dlopens other modules or a libtool library that will also be dlopened. For example, if we wanted to build a shared library, @file{libhello}, that would later be dlopened by an application, we would add ! @samp{-module} to the other link flags: @example ! burger$ @kbd{libtool gcc -module -o libhello.la foo.lo \ hello.lo -rpath /usr/local/lib -lm} burger$ @end example ! If symbols from your @emph{executable} are needed to satisfy unresolved ! references in a library you want to dlopen you will have to use the flag ! @samp{-export-dynamic}. ! You should use @samp{-export-dynamic} while linking the executable that calls dlopen: @example *************** *** 2210,2216 **** Libtool provides special support for dlopening libtool object and libtool library files, so that their symbols can be resolved @emph{even ! on platforms without any @code{dlopen(3)} and @code{dlsym(3)} functions.}. Consider the following alternative ways of loading code into your --- 2550,2556 ---- Libtool provides special support for dlopening libtool object and libtool library files, so that their symbols can be resolved @emph{even ! on platforms without any @code{dlopen} and @code{dlsym} functions.}. Consider the following alternative ways of loading code into your *************** *** 2241,2287 **** without crashing. @end enumerate ! Libtool emulates @samp{-export-dynamic} on static platforms by linking ! objects into the program at compile time, and creating data structures ! that represent the program's symbol table. In order to use this feature, you must declare the objects you want your application to dlopen by using the @samp{-dlopen} or @samp{-dlpreopen} flags when you link your program (@pxref{Link mode}). ! @deftp {Structure} dld_symbol name address ! The @var{name} attribute is a 0-terminated character string of the symbol name, such as @code{"fprintf"}. The @var{address} attribute is a ! generic pointer to the appropriate object, which is @code{&fprintf} in ! this example. ! @end deftp ! @deftypevr {Variable} {dld_symbol *} dld_preloaded_symbols ! An array of @var{dld_symbol} structures, representing all the preloaded ! symbols linked into the program. The last element has a @var{name} of ! @code{0}. ! @end deftypevr ! ! @deftypevr {Variable} int dld_preloaded_symbol_count ! The number of elements in @var{dld_preloaded_symbols}, if it is sorted ! in ascending order by @var{name}. Otherwise, @code{-1}, to indicate ! that the application needs to sort and count @var{dld_preloaded_symbols} ! itself, or search it linearly. ! @end deftypevr Some compilers may allow identifiers which are not valid in ANSI C, such as dollar signs. Libtool only recognizes valid ANSI C symbols (an initial ASCII letter or underscore, followed by zero or more ASCII letters, digits, and underscores), so non-ANSI symbols will not appear ! in @var{dld_preloaded_symbols}. @node Finding the dlname @section Finding the correct name to dlopen ! @cindex Names of dynamic modules ! @cindex Dynamic modules, names ! After a library has been linked with @samp{-export-dynamic}, it can be ! dlopened. Unfortunately, because of the variation in library names, your package needs to determine the correct file to dlopen. The most straightforward and flexible implementation is to determine the --- 2581,2622 ---- without crashing. @end enumerate ! Libtool emulates @samp{-dlopen} on static platforms by linking objects ! into the program at compile time, and creating data structures that ! represent the program's symbol table. In order to use this feature, you must declare the objects you want your application to dlopen by using the @samp{-dlopen} or @samp{-dlpreopen} flags when you link your program (@pxref{Link mode}). ! @deftypefn {Structure} {struct} lt_dlsymlist @{ @w{const char *@var{name};} @w{lt_ptr_t @var{address};} @} ! The @var{name} attribute is a null-terminated character string of the symbol name, such as @code{"fprintf"}. The @var{address} attribute is a ! generic pointer to the appropriate object, such as @code{&fprintf}. ! @end deftypefn ! @deftypevar {const lt_dlsymlist *} lt_preloaded_symbols ! An array of @var{lt_symbol} structures, representing all the preloaded ! symbols linked into the program. For each @samp{-dlpreloaded} file ! there is an element with the @var{name} of the file and a @var{address} ! of @code{0}, followed by all symbols exported from this file. ! For the executable itself the special name @@PROGRAM@@ is used. ! The last element has a @var{name} and @var{address} of @code{0}. ! @end deftypevar Some compilers may allow identifiers which are not valid in ANSI C, such as dollar signs. Libtool only recognizes valid ANSI C symbols (an initial ASCII letter or underscore, followed by zero or more ASCII letters, digits, and underscores), so non-ANSI symbols will not appear ! in @var{lt_preloaded_symbols}. @node Finding the dlname @section Finding the correct name to dlopen ! @cindex names of dynamic modules ! @cindex dynamic modules, names ! After a library has been linked with @samp{-module}, it can be dlopened. ! Unfortunately, because of the variation in library names, your package needs to determine the correct file to dlopen. The most straightforward and flexible implementation is to determine the *************** *** 2289,2295 **** it for the following lines: @example ! # The name that we can @code{dlopen(3)}. dlname='@var{dlname}' @end example --- 2624,2630 ---- it for the following lines: @example ! # The name that we can @code{dlopen}. dlname='@var{dlname}' @end example *************** *** 2300,2307 **** dlopened. If your program uses this approach, then it should search the ! directories listed in the @var{LD_LIBRARY_PATH}@footnote{@var{LIBPATH} ! on AIX, and @var{SHLIB_PATH} on HP-UX.} environment variable, as well as the directory where libraries will eventually be installed. Searching this variable (or equivalent) will guarantee that your program can find its dlopened modules, even before installation, provided you have linked --- 2635,2642 ---- dlopened. If your program uses this approach, then it should search the ! directories listed in the @code{LD_LIBRARY_PATH}@footnote{@code{LIBPATH} ! on AIX, and @code{SHLIB_PATH} on HP-UX.} environment variable, as well as the directory where libraries will eventually be installed. Searching this variable (or equivalent) will guarantee that your program can find its dlopened modules, even before installation, provided you have linked *************** *** 2309,2317 **** @node Dlopen issues @section Unresolved dlopen issues ! @cindex Pitfalls with dlopen ! @cindex Dlopening, pitfalls ! @cindex Trouble with dlopen The following problems are not solved by using libtool's dlopen support: --- 2644,2652 ---- @node Dlopen issues @section Unresolved dlopen issues ! @cindex pitfalls with dlopen ! @cindex dlopening, pitfalls ! @cindex trouble with dlopen The following problems are not solved by using libtool's dlopen support: *************** *** 2319,2349 **** @item Dlopen functions are generally only available on shared library platforms. If you want your package to be portable to static platforms, ! you have to develop your own alternatives to dlopening dynamic code. Most reasonable solutions involve writing wrapper functions for the ! @code{dlopen(3)} family, which do package-specific tricks when dlopening is unsupported or not available on a given platform. @item ! There are major differences in implementations of the @code{dlopen(3)} family of functions. Some platforms do not even use the same function ! names (notably HP-UX, with its @samp{shl_load(3)} family). @item The application developer must write a custom search function in order ! to discover the correct module filename to supply to @code{dlopen(3)}. @end itemize ! Each of these limitations will be addressed in GNU DLD ! 4.@footnote{Unfortunately, the DLD maintainer is also the libtool ! maintainer, so time spent on one of these projects takes time away from ! the other. When libtool is reasonably stable, DLD 4 development will ! proceed.} @node Other languages @chapter Using libtool with other languages @cindex C, not using ! @cindex Languages, non-C @cindex C++, using Libtool was first implemented in order to add support for writing shared --- 2654,3101 ---- @item Dlopen functions are generally only available on shared library platforms. If you want your package to be portable to static platforms, ! you have to use either libltdl (@pxref{Using libltdl}) or develop your ! own alternatives to dlopening dynamic code. Most reasonable solutions involve writing wrapper functions for the ! @code{dlopen} family, which do package-specific tricks when dlopening is unsupported or not available on a given platform. @item ! There are major differences in implementations of the @code{dlopen} family of functions. Some platforms do not even use the same function ! names (notably HP-UX, with its @code{shl_load} family). @item The application developer must write a custom search function in order ! to discover the correct module filename to supply to @code{dlopen}. @end itemize + + @node Using libltdl + @chapter Using libltdl + @findex libltdl + @findex dlopen + @findex dlsym + @findex dlclose + @findex dlerror + @findex shl_load + @cindex dynamic linking, applications + @cindex dlopening modules + @cindex modules, dynamic + @cindex application-level dynamic linking + + Libtool provides a small library, called @file{libltdl}, that aims at + hiding the various difficulties of dlopening libraries from programmers. + It consists of a header-file and a small C source file that can be + distributed with applications that need dlopening functionality. On + some platforms, whose dynamic linkers are too limited for a simple + implementation of @file{libltdl} services, it requires GNU DLD, or it + will only emulate dynamic linking with libtool's dlpreopening mechanism. + + @noindent + libltdl supports currently the following dynamic linking mechanisms: + + @itemize @bullet + @item + @code{dlopen} (Solaris, Linux and various BSD flavors) + @item + @code{shl_load} (HP-UX) + @item + @code{LoadLibrary} (Win16 and Win32) + @item + @code{load_add_on} (BeOS) + @item + GNU DLD (emulates dynamic linking for static libraries) + @item + libtool's dlpreopen (see @pxref{Dlpreopening}) + @end itemize + + @noindent + libltdl is licensed under the terms of the GNU Library General Public License, + with the following exception: + + @quotation + As a special exception to the GNU Library General Public License, + if you distribute this file as part of a program that uses GNU libtool + to create libraries and programs, you may include it under the same + distribution terms that you use for the rest of that program. + @end quotation + + @menu + * Libltdl interface:: How to use libltdl in your programs. + * Modules for libltdl:: Creating modules that can be @code{dlopen}ed. + * Distributing libltdl:: How to distribute libltdl with your package. + @end menu + + @node Libltdl interface + @section How to use libltdl in your programs + + @noindent + The libltdl API is similar to the dlopen interface of Solaris and Linux, + which is very simple but powerful. + + @noindent + To use libltdl in your program you have to include the header file @file{ltdl.h}: + + @example + #include + @end example + + @noindent + Note that libltdl is not threadsafe, i.e. a multithreaded application + has to use a mutex for libltdl. It was reported that GNU/Linux's glibc + 2.0's @code{dlopen} with @samp{RTLD_LAZY} (which libltdl uses by + default) is not thread-safe, but this problem is supposed to be fixed in + glibc 2.1. On the other hand, @samp{RTLD_NOW} was reported to introduce + problems in multi-threaded applications on FreeBSD. Working around + these problems is left as an exercise for the reader; contributions are + certainly welcome. + + @noindent + The following types are defined in @file{ltdl.h}: + + @deftp {Type} lt_ptr_t + @code{lt_ptr_t} is a generic pointer. + @end deftp ! @deftp {Type} lt_dlhandle ! @code{lt_dlhandle} is a module "handle". ! Every dlopened module has a handle associated with it. ! @end deftp ! ! @deftp {Type} lt_dlsymlist ! @code{lt_dlsymlist} is a symbol list for dlpreopened modules. ! This structure is described in @pxref{Dlpreopening}. ! @end deftp ! ! @page ! @noindent ! libltdl provides the following functions: + @deftypefun int lt_dlinit (void) + Initialize libltdl. + This function must be called before using libltdl + and may be called several times. + Return 0 on success, otherwise the number of errors. + @end deftypefun + + @deftypefun int lt_dlexit (void) + Shut down libltdl and close all modules. + This function will only then shut down libltdl when it was called as + many times as @code{lt_dlinit} has been successfully called. + Return 0 on success, otherwise the number of errors. + @end deftypefun + + @deftypefun lt_dlhandle lt_dlopen (const char *@var{filename}) + Open the module with the file name @var{filename} and return a + handle for it. @code{lt_dlopen} is able to open libtool dynamic + modules, preloaded static modules, the program itself and + native dynamic libraries. + + Unresolved symbols in the module are resolved using its dependency + libraries (not implemented yet) and previously dlopened modules. If the + executable using this module was linked with the @code{-export-dynamic} + flag, then the global symbols in the executable will also be used to + resolve references in the module. + + If @var{filename} is NULL and the program was linked with + @code{-export-dynamic} or @code{-dlopen self}, @code{lt_dlopen} will + return a handle for the program itself, which can be used to access its + symbols. + + If libltdl cannot find the library and the file name @var{filename} does + not have a directory component it will additionally search in the + following search paths for the module (in the order as follows): + + @enumerate 1 + @item user-defined search path: + This search path can be set by the program using the + functions @code{lt_dlsetsearchpath} and @code{lt_dladdsearchdir}. + + @item libltdl's search path: + This search path is the value of the environment variable + @var{LTDL_LIBRARY_PATH}. + + @item system library search path: + The system dependent library search path + (e.g. on Linux it is @var{LD_LIBRARY_PATH}). + @end enumerate + + Each search path must be a colon-separated list of absolute directories, + for example, @code{"/usr/lib/mypkg:/lib/foo"}. + + If the same module is loaded several times, the same handle is returned. + If @code{lt_dlopen} fails for any reason, it returns NULL. + @end deftypefun + + @deftypefun lt_dlhandle lt_dlopenext (const char *@var{filename}) + The same as @code{lt_dlopen}, except that it tries to append + different file name extensions to the file name. + If the file with the file name @var{filename} cannot be found + libltdl tries to append the following extensions: + + @enumerate 1 + @item the libtool archive extension @samp{.la} + @item the extension used for native dynamic libraries on the host platform, + e.g., @samp{.so}, @samp{.sl}, etc. + @end enumerate + + This lookup strategy was designed to allow programs that don't + have knowledge about native dynamic libraries naming conventions + to be able to @code{dlopen} such libraries as well as libtool modules + transparently. + @end deftypefun + + @deftypefun int lt_dlclose (lt_dlhandle @var{handle}) + Decrement the reference count on the module @var{handle}. + If it drops to zero and no other module depends on this module, + then the module is unloaded. + Return 0 on success. + @end deftypefun + + @deftypefun lt_ptr_t lt_dlsym (lt_dlhandle @var{handle}, const char *@var{name}) + Return the address in the module @var{handle}, where the symbol given + by the null terminated string @var{name} is loaded. + If the symbol cannot be found, NULL is returned. + @end deftypefun + + @deftypefun {const char *} lt_dlerror (void) + Return a human readable string describing the most + recent error that occurred from any of libltdl's functions. + Return NULL if no errors have occurred since initialization + or since it was last called. + @end deftypefun + + @deftypefun int lt_dlpreload (const lt_dlsymlist *@var{preloaded}) + Register the list of preloaded modules @var{preloaded}. + If @var{preloaded} is NULL, then all previously registered + symbol lists, except the list set by @code{lt_dlpreload_default}, + are deleted. Return 0 on success. + @end deftypefun + + @deftypefun int lt_dlpreload_default (const lt_dlsymlist *@var{preloaded}) + Set the default list of preloaded modules to @var{preloaded}, which + won't be deleted by @code{lt_dlpreload}. Note that this function does + @emph{not} require libltdl to be initialized using @code{lt_dlinit} and + can be used in the program to register the default preloaded modules. + Instead of calling this function directly, most programs will use the + macro @code{LTDL_SET_PRELOADED_SYMBOLS}. + + Return 0 on success. + @end deftypefun + + @defmac LTDL_SET_PRELOADED_SYMBOLS() + Set the default list of preloaded symbols. + Should be used in your program to initialize libltdl's + list of preloaded modules. + + @example + #include + + int main() @{ + /* ... */ + LTDL_SET_PRELOADED_SYMBOLS(); + /* ... */ + @} + @end example + @end defmac + + @deftypefun int lt_dladdsearchdir (const char *@var{search_dir}) + Add the search directory @var{search_dir} to the user-defined library + search path. Return 0 on success. + @end deftypefun + + @deftypefun int lt_dlsetsearchpath (const char *@var{search_path}) + Replace the current user-defined library search path with + @var{search_path}, which must be a colon-separated list of absolute + directories. Return 0 on success. + @end deftypefun + + @deftypefun {const char *} lt_dlgetsearchpath (void) + Return the current user-defined library search path. + @end deftypefun + + @deftypevar {lt_ptr_t (*} lt_dlmalloc ) (size_t size) + @deftypevarx {void (*} lt_dlfree ) (lt_ptr_t ptr) + These variables are set to @code{malloc} and @code{free}, by default, + but you can set them to any other functions that provides equivalent + functionality. However, you must not modify their values after calling + any libltdl function other than @code{lt_dlpreopen_default} or the macro + @code{LTDL_SET_PRELOADED_SYMBOLS}. + @end deftypevar + + @node Modules for libltdl + @section Creating modules that can be @code{dlopen}ed + + Libtool modules are like normal libtool libraries with a few exceptions: + + You have to link the module with libtool's @samp{-module} switch, + and you should link any program that is intended to dlopen the module with + @samp{-dlopen modulename.la} so that libtool can dlpreopen the module + on platforms which don't support dlopening. If the module depends on any + other libraries, make sure you specify them either when you link the module + or when you link programs that dlopen it. + If you want to disable @pxref{Versioning} for a specific module + you should link it with the @samp{-avoid-version} switch. + Note that libtool modules don't need to have a "lib" prefix. + However, automake 1.4 or higher is required to build such modules. + + Usually a set of modules provide the same interface, i.e, exports the same + symbols, so that a program can dlopen them without having to know more + about their internals. + In order to avoid symbol conflicts all exported symbols must be prefixed + with "modulename_LTX_" (@samp{modulename} is the name of the module). + Internal symbols must be named in such a way that they won't conflict + with other modules, for example, by prefixing them with "_modulename_". + Although some platforms support having the same symbols defined more than + once it is generally not portable and it makes it impossible to dlpreopen + such modules. libltdl will automatically cut the prefix off to get + the real name of the symbol. Additionally, it supports modules which + don't use a prefix so that you can also dlopen non-libtool modules. + + @file{foo1.c} gives an example of a portable libtool module. + Exported symbols are prefixed with "foo1_LTX_", internal symbols + with "_foo1_". Aliases are defined at the beginning so that the code + is more readable. + + @example + /* aliases for the exported symbols */ + #define foo foo1_LTX_foo + #define bar foo1_LTX_bar + + /* a global variable definition */ + int bar = 1; + + /* a private function */ + int _foo1_helper() @{ + return bar; + @} + + /* an exported function */ + int foo() @{ + return _foo_helper(); + @} + @end example + + @noindent + The @file{Makefile.am} contains the necessary rules to build the + module @file{foo1.la}: + + @example + ... + lib_LTLIBRARIES = foo1.la + + foo1_la_SOURCES = foo1.c + foo1_la_LDFLAGS = -module + ... + @end example + + @node Distributing libltdl + @section How to distribute libltdl with your package + + Even though libltdl is installed together with libtool, you may wish to + include libltdl in the distribution of your package, for the convenience + of users of your package that don't have libtool or libltdl installed. + In this case, you may decide which flavor of libltdl you want to use: a + convenience library or an installable libtool library. + + One advantage of the convenience library is that it is not installed, so + the fact that you use libltdl will not be apparent to the user, and it + will not overwrite a pre-installed version of libltdl a user might have. + On the other hand, if you want to upgrade libltdl for any reason + (e.g. a bugfix) you'll have to recompile your package instead of just + replacing an installed version of libltdl. + However, if your programs or libraries are linked with other libraries + that use such a pre-installed version of libltdl, you may get linker + errors or run-time crashes. Another problem is that you cannot link the + convenience library into more than one libtool library, then link a + single program with these libraries, because you may get duplicate + symbols. In general you can safely use the convenience library in programs + which don't depend on other libraries that might use libltdl too. + In order to enable this flavor of libltdl, you should add the + line @samp{AC_LIBLTDL_CONVENIENCE} to your @file{configure.in}, + @emph{after} @samp{AM_PROG_LIBTOOL}. + + In order to select the installable version of libltdl, you should add a + call of the macro @samp{AC_LIBLTDL_INSTALLABLE} to your + @file{configure.in} @emph{after} @samp{AM_PROG_LIBTOOL}. This macro + will check whether libltdl is already installed and, if not, request the + libltdl embedded in your package to be built and installed. Note, + however, that no version checking is performed. The user may override + the test and determine that the libltdl embedded must be installed, + regardless of the existence of another version, using the configure + switch @samp{--enable-ltdl-install}. + + In order to embed libltdl into your package, just add @samp{--ltdl} to + the @code{libtoolize} command line. It will copy the libltdl sources + to a subdirectory @samp{libltdl} in your package. + Both macros accept an optional argument to specify the location + of the @samp{libltdl} directory. By the default both macros assume that it + is @samp{$@{top_builddir@}/libltdl}. + + Whatever macro you use, it is up to you to ensure that your + @file{configure.in} will configure libltdl, using + @samp{AC_CONFIG_SUBDIRS}, and that your @file{Makefile}s will start + sub-makes within libltdl's directory, using automake's @var{SUBDIRS}, + for example. Both macros define the shell variable @var{LIBLTDL} to + the link flag that you should use to link with libltdl. It is up to you + to use @samp{AC_SUBST} to ensure that this variable will be available in + @file{Makefile}s. + + If you're using the convenience libltdl, it will be the pathname for the + convenience version of libltdl, starting with @samp{$@{top_builddir@}/}. + Otherwise, if an installed version of libltdl is found, @var{LIBLTDL} + will be set to @samp{-lltdl}. If an installable version of libltdl must + be built, its pathname, starting with @samp{$@{top_builddir@}/}, will be + stored in @var{LIBLTDL}. So, when you want to link a program with + libltdl, just link it with @samp{$(LIBLTDL)}. + + You should probably also add @samp{AC_LIBTOOL_DLOPEN} to your + @file{configure.in} @emph{before} @samp{AM_PROG_LIBTOOL}, otherwise + libtool will assume no dlopening mechanism is supported, and revert to + dlpreopening, which is probably not what you want. + + Avoid using the @code{-static} or @code{-all-static} switches when + linking programs with libltdl. This will not work on all plaforms, + because the dlopening functions may not be available for static linking. + + The following example shows you how to embed the convenience libltdl + in your package. In order to use the installable variant just replace + AC_LIBLTDL_CONVENIENCE with AC_LIBLTDL_INSTALLABLE. We assume that + libltdl was embedded using @samp{libtoolize --ltdl}. + + configure.in: + @example + ... + dnl Check for dlopen support + AC_LIBTOOL_DLOPEN + dnl Configure libtool + AM_PROG_LIBTOOL + dnl Enable building of the convenience library + dnl and set LIBLTDL accordingly + AC_LIBLTDL_CONVENIENCE + dnl Substitute LIBLTDL in the Makefiles + AC_SUBST(LIBLTDL) + dnl Configure libltdl + AC_CONFIG_SUBDIRS(libltdl) + ... + @end example + + Makefile.am: + @example + ... + SUBDIRS = libltdl + + myprog_LDFLAGS = -export-dynamic + # The quotes around -dlopen below fool automake into accepting it + myprog_LDADD = $(LIBLTDL) "-dlopen" self "-dlopen" libfoo.la + myprog_DEPENDENCIES = $(LIBLTDL) libfoo.la + ... + @end example + @node Other languages @chapter Using libtool with other languages @cindex C, not using ! @cindex languages, non-C @cindex C++, using Libtool was first implemented in order to add support for writing shared *************** *** 2361,2372 **** @node C++ libraries @section Writing libraries for C++ @c FIXME: in the TOC, the ++ is too large (seems to be math mode) ! @cindex Trouble with C++ ! @cindex Pitfalls using C++ @cindex C++, pitfalls ! Creating libraries of C++ code is a fairly straightforward process, and ! differs from C code in only two ways: @enumerate 1 @item --- 3113,3124 ---- @node C++ libraries @section Writing libraries for C++ @c FIXME: in the TOC, the ++ is too large (seems to be math mode) ! @cindex trouble with C++ ! @cindex pitfalls using C++ @cindex C++, pitfalls ! Creating libraries of C++ code should be a fairly straightforward ! process, because its object files differ from C ones in only two ways: @enumerate 1 @item *************** *** 2375,2401 **** C++ in order to protect users from conflicting implementations of features such as constructors, exception handling, and RTTI. @item ! On some systems, notably SunOS 4, the dynamic linker does not call ! non-constant initializers. This can lead to hard-to-pinpoint bugs in ! your library. GCC 2.7 and later versions work around this problem, but ! previous versions and other compilers do not. @end enumerate ! This second issue is complex. Basically, you should avoid any global or ! static variable initializations that would cause an ``initializer ! element is not constant'' error if you compiled them with a standard C ! compiler. There are other ways of working around this problem, but they are beyond the scope of this manual. @node Troubleshooting @chapter Troubleshooting ! @cindex Troubleshooting ! @cindex Problems, solving ! @cindex Solving problems ! @cindex Problems, blaming somebody else for Libtool is under constant development, changing to remain up-to-date with modern operating systems. If libtool doesn't work the way you --- 3127,3167 ---- C++ in order to protect users from conflicting implementations of features such as constructors, exception handling, and RTTI. + @item + On some systems, the C++ compiler must take special actions for the + dynamic linker to run dynamic (i.e., run-time) initializers. This means + that we should not call @file{ld} directly to link such libraries, and + we should use the C++ compiler instead. + @item ! C++ compilers will link some Standard C++ library in by default, but ! libtool does not know which are these libraries, so it cannot even run ! the inter-library dependence analyzer to check how to link it in. ! Therefore, running @file{ld} to link a C++ program or library is deemed ! to fail. However, running the C++ compiler directly may lead to ! problems related with inter-library dependencies. @end enumerate ! The conclusion is that libtool is not ready for general use for C++ ! libraries. You should avoid any global or static variable ! initializations that would cause an ``initializer element is not ! constant'' error if you compiled them with a standard C compiler. There are other ways of working around this problem, but they are beyond the scope of this manual. + Furthermore, you'd better find out, at configure time, what are the C++ + Standard libraries that the C++ compiler will link in by default, and + explicitly list them in the link command line. Hopefully, in the + future, libtool will be able to do this job by itself. + + @node Troubleshooting @chapter Troubleshooting ! @cindex troubleshooting ! @cindex problems, solving ! @cindex solving problems ! @cindex problems, blaming somebody else for Libtool is under constant development, changing to remain up-to-date with modern operating systems. If libtool doesn't work the way you *************** *** 2409,2415 **** @node Libtool test suite @section The libtool test suite ! @cindex Test suite Libtool comes with its own set of programs that test its capabilities, and report obvious bugs in the libtool program. These tests, too, are --- 3175,3181 ---- @node Libtool test suite @section The libtool test suite ! @cindex test suite Libtool comes with its own set of programs that test its capabilities, and report obvious bugs in the libtool program. These tests, too, are *************** *** 2431,2453 **** Here is a list of the current programs in the test suite, and what they test for: ! @table @code @item demo-conf.test @itemx demo-exec.test @itemx demo-inst.test @itemx demo-make.test @itemx demo-unst.test @pindex demo-conf.test @pindex demo-exec.test @pindex demo-inst.test @pindex demo-make.test @pindex demo-unst.test These programs check to see that the @file{demo} subdirectory of the libtool distribution can be configured, built, installed, and uninstalled correctly. The @file{demo} subdirectory contains a demonstration of a trivial ! package that uses libtool. @item hardcode.test @pindex hardcode.test --- 3197,3268 ---- Here is a list of the current programs in the test suite, and what they test for: ! @table @file ! ! @item cdemo-conf.test ! @itemx cdemo-exec.test ! @itemx cdemo-make.test ! @itemx cdemo-static.test ! @itemx cdemo-shared.test ! @pindex cdemo-conf.test ! @pindex cdemo-exec.test ! @pindex cdemo-make.test ! @pindex cdemo-static.test ! @pindex cdemo-shared.test ! These programs check to see that the @file{cdemo} subdirectory of the ! libtool distribution can be configured and built correctly. ! ! The @file{cdemo} subdirectory contains a demonstration of libtool ! convenience libraries, a mechanism that allows build-time static ! libraries to be created, in a way that their components can be later ! linked into programs or other libraries, even shared ones. ! ! The tests @file{cdemo-make.test} and @file{cdemo-exec.test} are executed ! three times, under three different libtool configurations: ! @file{cdemo-conf.test} configures @file{cdemo/libtool} to build both ! static and shared libraries (the default for platforms that support ! both), @file{cdemo-static.test} builds only static libraries ! (@samp{--disable-shared}), and @file{cdemo-shared.test} builds only ! shared libraries (@samp{--disable-static}). ! @item demo-conf.test @itemx demo-exec.test @itemx demo-inst.test @itemx demo-make.test @itemx demo-unst.test + @itemx demo-static.test + @itemx demo-shared.test + @itemx demo-nofast.test @pindex demo-conf.test @pindex demo-exec.test @pindex demo-inst.test @pindex demo-make.test @pindex demo-unst.test + @pindex demo-static.test + @pindex demo-shared.test + @pindex demo-nofast.test These programs check to see that the @file{demo} subdirectory of the libtool distribution can be configured, built, installed, and uninstalled correctly. The @file{demo} subdirectory contains a demonstration of a trivial ! package that uses libtool. The tests @file{demo-make.test}, ! @file{demo-exec.test}, @file{demo-inst.test} and ! @file{demo-unst.test} are executed four times, under four different ! libtool configurations: @file{demo-conf.test} configures ! @file{demo/libtool} to build both static and shared libraries, ! @file{demo-static.test} builds only static libraries ! (@samp{--disable-shared}), and @file{demo-shared.test} builds only ! shared libraries (@samp{--disable-static}). ! @file{demo-nofast.test} configures @file{demo/libtool} to ! disable the fast-install mode (@samp{--enable-fast-install=no}. ! ! @item deplibs.test ! @pindex deplibs.test ! Many systems cannot link static libraries into shared libraries. ! libtool uses a @code{deplibs_check_method} to prevent such cases. ! This tests checks whether libtool's @code{deplibs_check_method} ! works properly. @item hardcode.test @pindex hardcode.test *************** *** 2457,2462 **** --- 3272,3329 ---- linker hardcodes the library location, and guarantees that they correspond to libtool's own notion of how your linker behaves. + @item build-relink.test + @pindex build-relink.test + Checks whether variable @var{shlibpath_overrides_runpath} is properly + set. If the test fails and @var{VERBOSE} is set, it will indicate what + the variable should have been set to. + + @item noinst-link.test + @pindex noinst-link.test + Checks whether libtool will not try to link with a previously installed + version of a library when it should be linking with a just-built one. + + @item mdemo-conf.test + @itemx mdemo-exec.test + @itemx mdemo-inst.test + @itemx mdemo-make.test + @itemx mdemo-unst.test + @itemx mdemo-static.test + @itemx mdemo-shared.test + @pindex mdemo-conf.test + @pindex mdemo-exec.test + @pindex mdemo-inst.test + @pindex mdemo-make.test + @pindex mdemo-unst.test + @pindex mdemo-static.test + @pindex mdemo-shared.test + These programs check to see that the @file{mdemo} subdirectory of the + libtool distribution can be configured, built, installed, and + uninstalled correctly. + + The @file{mdemo} subdirectory contains a demonstration of a package that + uses libtool and the system independent dlopen wrapper @file{libltdl} to + load modules. The library @file{libltdl} provides a dlopen wrapper for + various platforms (Linux, Solaris, HP/UX etc.) including support for + dlpreopened modules (@pxref{Dlpreopening}). + + The tests @file{mdemo-make.test}, @file{mdemo-exec.test}, + @file{mdemo-inst.test} and @file{mdemo-unst.test} are executed + three times, under three different libtool configurations: + @file{mdemo-conf.test} configures @file{mdemo/libtool} to build both + static and shared libraries, @file{mdemo-static.test} builds only static + libraries (@samp{--disable-shared}), and @file{mdemo-shared.test} builds + only shared libraries (@samp{--disable-static}). + + @item dryrun.test + @pindex dryrun.test + This test checks whether libtool's @code{--dry-run} mode works properly. + + @item assign.test + @pindex assign.test + Checks whether we don't put break or continue on the same + line as an assignment in the libtool script. + @item link.test @pindex link.test This test guarantees that linking directly against a non-libtool static *************** *** 2467,2472 **** --- 3334,3351 ---- This test makes sure that files ending in @samp{.lo} are never linked directly into a program file. + @item nomode.test + @pindex nomode.test + Check whether we can actually get help for libtool. + + @item quote.test + @pindex quote.test + This program checks libtool's metacharacter quoting. + + @item sh.test + @pindex sh.test + Checks whether a `test' command was forgotton in libtool. + @item suffix.test @pindex suffix.test When other programming languages are used with libtool (@pxref{Other *************** *** 2474,2490 **** This test validates that libtool can handle suffixes for all the file types that it supports, and that it fails when the suffix is invalid. - @item test-e.test - @pindex test-e.test - This program checks that the @code{test -e} construct is @emph{never} - used in the libtool scripts. Checking for the existence of a file can - only be done in a portable way by using @code{test -f}. @end table @node When tests fail @subsection When tests fail ! @cindex Failed tests ! @cindex Tests, failed Each of the above tests are designed to produce no output when they are run via @kbd{make check}. The exit status of each program tells the --- 3353,3364 ---- This test validates that libtool can handle suffixes for all the file types that it supports, and that it fails when the suffix is invalid. @end table @node When tests fail @subsection When tests fail ! @cindex failed tests ! @cindex tests, failed Each of the above tests are designed to produce no output when they are run via @kbd{make check}. The exit status of each program tells the *************** *** 2504,2512 **** @node Reporting bugs @section Reporting bugs ! @cindex Bug reports ! @cindex Reporting bugs ! @cindex Problem reports If you think you have discovered a bug in libtool, you should think twice: the libtool maintainer is notorious for passing the buck (or --- 3378,3386 ---- @node Reporting bugs @section Reporting bugs ! @cindex bug reports ! @cindex reporting bugs ! @cindex problem reports If you think you have discovered a bug in libtool, you should think twice: the libtool maintainer is notorious for passing the buck (or *************** *** 2515,2521 **** of the bugs in libtool are actually bugs in other operating systems. However, the libtool maintainer would definitely be happy to add support for somebody else's buggy operating system. [I wish there was a good ! way to do winking smiley-faces in texinfo.] Genuine bugs in libtool include problems with shell script portability, documentation errors, and failures in the test suite (@pxref{Libtool --- 3389,3395 ---- of the bugs in libtool are actually bugs in other operating systems. However, the libtool maintainer would definitely be happy to add support for somebody else's buggy operating system. [I wish there was a good ! way to do winking smiley-faces in Texinfo.] Genuine bugs in libtool include problems with shell script portability, documentation errors, and failures in the test suite (@pxref{Libtool *************** *** 2536,2544 **** ``libtool'' in the subject line, as well as the version number you are using (which can be found by typing @kbd{ltconfig --version}). - Please include the generated @code{libtool} script with your bug report, - so that I can see what values @code{ltconfig} guessed for your system. - @node Maintaining @chapter Maintenance notes for libtool --- 3410,3415 ---- *************** *** 2551,2576 **** * Tested platforms:: When libtool was last tested. * Platform quirks:: Information about different library systems. * libtool script contents:: Configuration information that libtool uses. @end menu @node New ports @section Porting libtool to new systems ! To port libtool to a new system, you'll generally need the following ! information: @table @asis ! @item man pages for @code{ld(1)} and @code{cc(1)} These generally describe what flags are used to generate PIC, to create shared libraries, and to link against only static libraries. You may need to follow some cross references to find the information that is required. ! @item man pages for @code{ld.so(8)}, @code{rtld(8)}, or equivalent These are a valuable resource for understanding how shared libraries are loaded on the system. ! @item man page for @code{ldconfig(8)}, or equivalent This page usually describes how to install shared libraries. @item output from @kbd{ls -l /lib /usr/lib} --- 3422,3469 ---- * Tested platforms:: When libtool was last tested. * Platform quirks:: Information about different library systems. * libtool script contents:: Configuration information that libtool uses. + * Cheap tricks:: Making libtool maintainership easier. @end menu @node New ports @section Porting libtool to new systems ! Before you embark on porting libtool to an unsupported system, it is ! worthwhile to send e-mail to @value{MAILLIST}, to make sure that you are ! not duplicating existing work. ! ! If you find that any porting documentation is missing, please complain! ! Complaints with patches and improvements to the documentation, or to ! libtool itself, are more than welcome. ! ! @menu ! * Information sources:: Where to find relevant documentation ! * Porting inter-library dependencies:: Implementation details explained ! @end menu ! ! @node Information sources ! @subsection Information sources + Once it is clear that a new port is necessary, you'll generally need the + following information: + @table @asis ! @item canonical system name ! You need the output of @code{config.guess} for this system, so that you ! can make changes to the libtool configuration process without affecting ! other systems. ! ! @item man pages for @code{ld} and @code{cc} These generally describe what flags are used to generate PIC, to create shared libraries, and to link against only static libraries. You may need to follow some cross references to find the information that is required. ! @item man pages for @code{ld.so}, @code{rtld}, or equivalent These are a valuable resource for understanding how shared libraries are loaded on the system. ! @item man page for @code{ldconfig}, or equivalent This page usually describes how to install shared libraries. @item output from @kbd{ls -l /lib /usr/lib} *************** *** 2582,2587 **** --- 3475,3568 ---- shared libraries. @end table + If you know how to program the Bourne shell, then you can complete the + port yourself; otherwise, you'll have to find somebody with the relevant + skills who will do the work. People on the libtool mailing list are + usually willing to volunteer to help you with new ports, so you can send + the information to them. + + To do the port yourself, you'll definitely need to modify the + @code{ltconfig} script in order to make platform-specific changes to the + configuration process. You should search the script for the + @code{PORTME} keyword, which will give you some hints on what you'll + need to change. In general, all that is involved is modifying the + appropriate configuration variables (@pxref{libtool script contents}). + + Your best bet is to find an already-supported system that is similar to + yours, and make your changes based on that. In some cases, however, + your system will differ significantly from every other supported system, + and it may be necessary to add new configuration variables, and modify + the @code{ltmain.sh} script accordingly. Be sure to write to the + mailing list before you make changes to @code{ltmain.sh}, since they may + have advice on the most effective way of accomplishing what you want. + + @node Porting inter-library dependencies + @subsection Porting inter-library dependencies support + @cindex inter-library dependency + @vindex deplibs_check_method + + Since version 1.2c, libtool has re-introduced the ability to do + inter-library dependency on some platforms, thanks to a patch by Toshio + Kuratomi @email{badger@@prtr-13.ucsc.edu}. Here's a shortened version + of the message that contained his patch: + + The basic architecture is this: in @file{ltconfig.in}, the person who + writes libtool makes sure @samp{$deplibs} is included in + @samp{$archive_cmds} somewhere and also sets the variable + @samp{$deplibs_check_method}, and maybe @samp{$file_magic_cmd} when + @samp{deplibs_check_method} is file_magic. + + @samp{deplibs_check_method} can be one of five things: + @table @samp + @item file_magic [@var{regex}] + @vindex file_magic + @vindex file_magic_cmd + @vindex file_magic_test_file + looks in the library link path for libraries that have the right + libname. Then it runs @samp{$file_magic_cmd} on the library and checks + for a match against @samp{regex} using @code{egrep}. When + @var{file_magic_test_file} is set in @file{ltconfig}, it is used as an + argument to @samp{$file_magic_cmd} in order to verify whether the + regular expression matches its output, and warn the user otherwise. + + @item test_compile + @vindex test_compile + just checks whether it is possible to link a program out of a list of + libraries, and checks which of those are listed in the output of + @code{ldd}. It is currently unused, and will probably be dropped in the + future. + + @item pass_all + @vindex pass_all + will pass everything without any checking. This may work on platforms + in which code is position-independent by default and inter-library + dependencies are properly supported by the dynamic linker, for example, + on DEC OSF/1 3 and 4. + + @item none + @vindex none + It causes deplibs to be reassigned deplibs="". That way + @samp{archive_cmds} can contain deplibs on all platforms, but not have + deplibs used unless needed. + + @item unkwnon + @vindex unknown + is the default for all systems unless overridden in @file{ltconfig.in}. + It is the same as @samp{none}, but it documents that we really don't + know what the correct value should be, and we welcome patches that + improve it. + @end table + + Then in @file{ltmain.in} we have the real workhorse: a litle + initialization and postprocessing (to setup/release variables for use + with eval echo libname_spec etc.) and a case statement that decides + which method is being used. This is the real code... I wish I could + condense it a little more, but I don't think I can without function + calls. I've mostly optimized it (moved things out of loops, etc) but + there is probably some fat left. I thought I should stop while I was + ahead, work on whatever bugs you discover, etc before thinking about + more than obvious optimizations. + @node Tested platforms @section Tested platforms *************** *** 2592,2607 **** @include PLATFORMS @end example @node Platform quirks @section Platform quirks ! This section is dedicated to the sanity of the libtool maintainer. It describes the programs that libtool uses, how they vary from system to system, and how to test for them. ! Because libtool is a shell script, it is difficult to understand just by ! reading it from top to bottom. This section helps show why libtool does ! things a certain way. After reading it, then reading the scripts themselves, you should have a better sense of how to improve libtool, or write your own. --- 3573,3598 ---- @include PLATFORMS @end example + Note: The vendor-distributed HP-UX @code{sed}(1) programs are horribly + broken, and cannot handle libtool's requirements, so users may report + unusual problems. There is no workaround except to install a working + @code{sed} (such as GNU @code{sed}) on these systems. + + Note: The vendor-distributed NCR MP-RAS @code{cc} programs emits + copyright on standard error that confuse tests on size of + @file{conftest.err}. The workaround is to specify @code{CC} + when run @code{configure} with @kbd{CC='cc -Hnocopyr'}. + @node Platform quirks @section Platform quirks ! This section is dedicated to the sanity of the libtool maintainers. It describes the programs that libtool uses, how they vary from system to system, and how to test for them. ! Because libtool is a shell script, it can be difficult to understand ! just by reading it from top to bottom. This section helps show why ! libtool does things a certain way. Combined with the scripts themselves, you should have a better sense of how to improve libtool, or write your own. *************** *** 2619,2625 **** @itemize @bullet @item ! SGI's IRIX Manual Pages, @url{http://techpubs.sgi.com/cgi-bin/infosrch.cgi?cmd=browse&db=man}. @item --- 3610,3616 ---- @itemize @bullet @item ! SGI's IRIX Manual Pages, which can be found at @url{http://techpubs.sgi.com/cgi-bin/infosrch.cgi?cmd=browse&db=man}. @item *************** *** 2644,2650 **** @item gcc This is the GNU C compiler, which is also the system compiler for many ! free operating systems (FreeBSD, GNU/Hurd, Linux/GNU, Lites, NetBSD, and OpenBSD, to name a few). The @samp{-fpic} or @samp{-fPIC} flags can be used to generate --- 3635,3641 ---- @item gcc This is the GNU C compiler, which is also the system compiler for many ! free operating systems (FreeBSD, GNU/Hurd, GNU/Linux, Lites, NetBSD, and OpenBSD, to name a few). The @samp{-fpic} or @samp{-fPIC} flags can be used to generate *************** *** 2702,2721 **** On all known systems, if there is a program named @code{ranlib}, then it must be used to ``bless'' the created library before linking against it, ! with the @kbd{ranlib lib@var{name}.a} command. @node libtool script contents @section @code{libtool} script contents ! @cindex Implementation of libtool @cindex libtool implementation The @code{libtool} script is generated by @code{ltconfig} ! (@pxref{Configuring}). Ever since libtool version 0.7, this script ! simply sets shell variables, then sources the libtool backend, ! @code{ltmain.sh}. ! Here is a listing of each of these variables, and how they are used ! within @code{ltmain.sh}: @defvar AR The name of the system library archiver. --- 3693,3722 ---- On all known systems, if there is a program named @code{ranlib}, then it must be used to ``bless'' the created library before linking against it, ! with the @kbd{ranlib lib@var{name}.a} command. Some systems, like Irix, ! use the @code{ar ts} command, instead. @node libtool script contents @section @code{libtool} script contents ! @cindex implementation of libtool @cindex libtool implementation The @code{libtool} script is generated by @code{ltconfig} ! (@pxref{Configuring}). From libtool version 0.7 to 1.0, this script ! simply set shell variables, then sourced the libtool backend, ! @code{ltmain.sh}. @code{ltconfig} from libtool version 1.1 and later ! inlines the contents of @code{ltmain.sh} into the generated ! @code{libtool}, which improves performance on many systems. ! ! The convention used for naming variables which hold shell commands for ! delayed evaluation, is to use the suffix @code{_cmd} where a single ! line of valid shell script is needed, and the suffix @code{_cmds} where ! multiple lines of shell script @strong{may} be delayed for later ! evaluation. By convention, @code{_cmds} variables delimit the ! evaluation units with the @code{~} character where necessary. ! Here is a listing of each of the configuration variables, and how they ! are used within @code{ltmain.sh}: @defvar AR The name of the system library archiver. *************** *** 2759,2767 **** aren't defined in that library. @end defvar @defvar archive_cmds @defvarx old_archive_cmds ! Commands used to create shared and static libraries, respectively. @end defvar @defvar build_libtool_libs --- 3760,3783 ---- aren't defined in that library. @end defvar + @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}. + @end defvar + @defvar archive_cmds + @defvarx archive_expsym_cmds @defvarx old_archive_cmds ! Commands used to create shared libraries, shared libraries with ! @samp{-export-symbols} and static libraries, respectively. ! @end defvar ! ! @defvar old_archive_from_new_cmds ! If the shared library depends on a static library, ! @samp{old_archive_from_new_cmds} contains the commands used to create that ! static library. If this variable is not empty, @samp{old_archive_cmds} is ! not used. @end defvar @defvar build_libtool_libs *************** *** 2774,2789 **** @samp{yes} or @samp{no}. @end defvar @defvar echo ! An @code{echo(1)} program which does not interpret backslashes as an escape character. @end defvar @defvar export_dynamic_flag_spec Compiler link flag that allows a dlopened shared library to reference symbols that are defined in the program. @end defvar @defvar finish_cmds Commands to tell the dynamic linker how to find shared libraries in a specific directory. --- 3790,3858 ---- @samp{yes} or @samp{no}. @end defvar + @defvar compiler_c_o + Whether the compiler supports the @code{-c} and @code{-o} options + simultaneously. Set to @samp{yes} or @samp{no}. + @end defvar + + @defvar compiler_o_lo + Whether the compiler supports compiling directly to a ".lo" file, + i.e whether object files do not have to have the suffix ".o". + Set to @samp{yes} or @samp{no}. + @end defvar + + @defvar dlopen + Whether @code{dlopen} is supported on the platform. + Set to @samp{yes} or @samp{no}. + @end defvar + + @defvar dlopen_self + Whether it is possible to @code{dlopen} the executable itself. + Set to @samp{yes} or @samp{no}. + @end defvar + + @defvar dlopen_self_static + Whether it is possible to @code{dlopen} the executable itself, when it + is linked statically (@samp{-all-static}). Set to @samp{yes} or + @samp{no}. + @end defvar + @defvar echo ! An @code{echo} program which does not interpret backslashes as an escape character. @end defvar + @defvar exclude_expsyms + List of symbols that should not be listed in the preloaded symbols. + @end defvar + @defvar export_dynamic_flag_spec Compiler link flag that allows a dlopened shared library to reference symbols that are defined in the program. @end defvar + @defvar export_symbols_cmds + Commands to extract exported symbols from @var{libobjs} to the + file @var{export_symbols}. + @end defvar + + @defvar fast_install + Determines whether libtool will privilege the installer or the + developer. The assumption is that installers will seldom run programs + in the build tree, and the developer will seldom install. This is only + meaningful on platforms in which @var{shlibpath_overrides_runpath} is + not @samp{yes}, so @var{fast_install} will be set to @samp{needless} in + this case. If @var{fast_install} set to @samp{yes}, libtool will create + programs that search for installed libraries, and, if a program is run + in the build tree, a new copy will be linked on-demand to use the + yet-to-be-installed libraries. If set to @samp{no}, libtool will create + programs that use the yet-to-be-installed libraries, and will link + a new copy of the program at install time. The default value is + @samp{yes} or @samp{needless}, depending on platform and configuration + flags, and it can be turned from @samp{yes} to @samp{no} with the + configure flag @samp{--disable-fast-install}. + @end defvar + @defvar finish_cmds Commands to tell the dynamic linker how to find shared libraries in a specific directory. *************** *** 2793,2812 **** Same as @var{finish_cmds}, except the commands are not displayed. @end defvar @defvar global_symbol_pipe A pipeline that takes the output of @var{NM}, and produces a listing of raw symbols followed by their C names. For example: @example ! $ @kbd{$NM | $global_symbol_pipe} ! @var{symbol1} @var{C-symbol1} ! @var{symbol2} @var{C-symbol2} ! @var{symbol3} @var{C-symbol3} @dots{} $ @end example @end defvar @defvar hardcode_action Either @samp{immediate} or @samp{relink}, depending on whether shared library paths can be hardcoded into executables before they are installed, --- 3862,3896 ---- Same as @var{finish_cmds}, except the commands are not displayed. @end defvar + @defvar fix_srcfile_path + Expression to fix the shell variable $srcfile for the compiler. + @end defvar + @defvar global_symbol_pipe A pipeline that takes the output of @var{NM}, and produces a listing of raw symbols followed by their C names. For example: @example ! $ @kbd{eval "$NM progname | $global_symbol_pipe"} ! D @var{symbol1} @var{C-symbol1} ! T @var{symbol2} @var{C-symbol2} ! C @var{symbol3} @var{C-symbol3} @dots{} $ @end example + + The first column contains the symbol type (used to tell data from code + on some platforms), but its meaning is system dependent. @end defvar + @defvar global_symbol_to_cdecl + A pipeline that translates the output of @var{global_symbol_pipe} into + proper C declarations. On platforms whose linkers differentiate code + from data, such as HP/UX, data symbols will be declared as such, and + code symbols will be declared as functions. On platforms that don't + care, everything is assumed to be data. + @end defvar + @defvar hardcode_action Either @samp{immediate} or @samp{relink}, depending on whether shared library paths can be hardcoded into executables before they are installed, *************** *** 2816,2827 **** @defvar hardcode_direct Set to @samp{yes} or @samp{no}, depending on whether the linker hardcodes directories if a library is directly specified on the command ! line (such as @samp{@var{dir}/lib@var{name}.a}). @end defvar @defvar hardcode_libdir_flag_spec Flag to hardcode a @var{libdir} variable into a binary, so that the dynamic linker searches @var{libdir} for shared libraries at runtime. @end defvar @defvar hardcode_libdir_separator --- 3900,3913 ---- @defvar hardcode_direct Set to @samp{yes} or @samp{no}, depending on whether the linker hardcodes directories if a library is directly specified on the command ! line (such as @samp{@var{dir}/lib@var{name}.a}) when ! @var{hardcode_libdir_flag_spec} is specified. @end defvar @defvar hardcode_libdir_flag_spec Flag to hardcode a @var{libdir} variable into a binary, so that the dynamic linker searches @var{libdir} for shared libraries at runtime. + If it is empty, libtool will try to use some other hardcoding mechanism. @end defvar @defvar hardcode_libdir_separator *************** *** 2833,2847 **** @defvar hardcode_minus_L Set to @samp{yes} or @samp{no}, depending on whether the linker hardcodes directories specified by @samp{-L} flags into the resulting ! executable. @end defvar @defvar hardcode_shlibpath_var Set to @samp{yes} or @samp{no}, depending on whether the linker hardcodes directories by writing the contents of @samp{$shlibpath_var} ! into the resulting executable. Set to @samp{unsupported} if directories ! specified by @samp{$shlibpath_var} are searched at run time, but not at ! link time. @end defvar @defvar host --- 3919,3933 ---- @defvar hardcode_minus_L Set to @samp{yes} or @samp{no}, depending on whether the linker hardcodes directories specified by @samp{-L} flags into the resulting ! executable when @var{hardcode_libdir_flag_spec} is specified. @end defvar @defvar hardcode_shlibpath_var Set to @samp{yes} or @samp{no}, depending on whether the linker hardcodes directories by writing the contents of @samp{$shlibpath_var} ! into the resulting executable when @var{hardcode_libdir_flag_spec} is ! specified. Set to @samp{unsupported} if directories specified by ! @samp{$shlibpath_var} are searched at run time, but not at link time. @end defvar @defvar host *************** *** 2850,2855 **** --- 3936,3949 ---- the system that libtool was configured for. @end defvar + @defvar include_expsyms + List of symbols that must always be exported when using @var{export_symbols}. + @end defvar + + @defvar libext + The standard old archive suffix (normally "a"). + @end defvar + @defvar libname_spec The format of a library name prefix. On all Unix systems, static libraries are called @samp{lib@var{name}.a}, but on some systems (such *************** *** 2867,2872 **** --- 3961,3989 ---- linking. @end defvar + @defvar need_lib_prefix + Whether libtool should automatically prefix module names with 'lib'. + Set to @samp{yes} or @samp{no}. By default, it is @samp{unknown}, which + means the same as @samp{yes}, but documents that we are not really sure + about it. + @samp{yes} means that it is possible both to @code{dlopen} and to + link against a library wihthout 'lib' prefix, + i.e. it requires @var{hardcode_direct} to be @samp{yes}. + @end defvar + + @defvar need_version + Whether versioning is required for libraries, i.e. whether the + dynamic linker requires a version suffix for all libraries. + Set to @samp{yes} or @samp{no}. By default, it is @samp{unknown}, which + means the same as @samp{yes}, but documents that we are not really sure + about it. + @end defvar + + @defvar need_locks + Whether files must be locked to prevent conflicts when compiling + simultaneously. Set to @samp{yes} or @samp{no}. + @end defvar + @defvar no_builtin_flag Compiler flag to disable builtin functions that conflict with declaring external global symbols as @code{char}. *************** *** 2878,2883 **** --- 3995,4008 ---- Empty, if no such flag is required. @end defvar + @defvar objdir + The name of the directory that contains temporary libtool files. + @end defvar + + @defvar objext + The standard object file suffix (normally "o"). + @end defvar + @defvar pic_flag Any additional compiler flags for building library object files. @end defvar *************** *** 2887,2892 **** --- 4012,4022 ---- Commands run after installing a shared or static library, respectively. @end defvar + @defvar postuninstall_cmds + @defvarx old_postuninstall_cmds + Commands run after uninstalling a shared or static library, respectively. + @end defvar + @defvar reload_cmds @defvarx reload_flag Commands to create a reloadable object. *************** *** 2897,2902 **** --- 4027,4042 ---- hardcode in the resulting executable. @end defvar + @defvar shlibpath_overrides_runpath + Indicates whether it is possible to override the hard-coded library + search path of a program with an environment variable. If this is set + to no, libtool may have to create two copies of a program in the build + tree, one to be installed and one to be run in the build tree only. + When each of these copies is created depends on the value of + @code{fast_install}. The default value is @samp{unknown}, which is + equivalent to @samp{no}. + @end defvar + @defvar shlibpath_var The environment variable that tells the dynamic linker where to find shared libraries. *************** *** 2907,2920 **** the file. @end defvar @defvar version_type The library version numbering type. One of @samp{libtool}, @samp{linux}, @samp{osf}, @samp{sunos}, or @samp{none}. @end defvar @defvar wl The C compiler flag that allows libtool to pass a flag directly to the ! linker. Used as: @samp{$@{wl@}@var{some-flag}}. @end defvar Variables ending in @samp{_cmds} or @samp{_eval} contain a --- 4047,4084 ---- the file. @end defvar + @defvar sys_lib_dlsearch_path_spec + Expression to get the run-time system library search path. Directories + that appear in this list are never hard-coded into executables. + @end defvar + + @defvar sys_lib_search_path_spec + Expression to get the compile-time system library search path. This + variable is used by libtool when it has to test whether a certain + library is shared or static. The directories listed in + @var{shlibpath_var} are automatically appended to this list, every time + libtool runs (i.e., not at configuration time), because some linkers use + 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}. @end defvar + @defvar whole_archive_flag_spec + Compiler flag to generate shared objects from convenience archives. + @end defvar + @defvar wl The C compiler flag that allows libtool to pass a flag directly to the ! linker. Used as: @code{$@{wl@}@var{some-flag}}. @end defvar Variables ending in @samp{_cmds} or @samp{_eval} contain a *************** *** 2924,2929 **** --- 4088,4137 ---- Variables ending in @samp{_spec} are @code{eval}ed before being used by libtool. + + @node Cheap tricks + @section Cheap tricks + + Here are a few tricks that you can use in order to make maintainership + easier: + + @itemize @bullet + @item + When people report bugs, ask them to use the @samp{--config}, + @samp{--debug}, or @samp{--features} flags, if you think they will help + you. These flags are there to help you get information directly, rather + than having to trust second-hand observation. + + @item + Rather than reconfiguring libtool every time I make a change to + @code{ltconfig.in} or @code{ltmain.in}, I keep a permanent + @code{libtool} script in my @var{PATH}, which sources @code{ltmain.in} + directly. + + The following steps describe how to create such a script, where + @code{/home/src/libtool} is the directory containing the libtool source + tree, @code{/home/src/libtool/libtool} is a libtool script that has been + configured for your platform, and @code{~/bin} is a directory in your + @var{PATH}: + + @example + trick$ @kbd{cd ~/bin} + trick$ @kbd{sed '/^# ltmain\.sh/q' /home/src/libtool/libtool > libtool} + trick$ @kbd{cat >> libtool + LTCONFIG_VERSION="@@VERSION@@" + . /home/src/libtool/ltmain.in + ^D} + trick$ @kbd{chmod +x libtool} + trick$ @kbd{libtool --version} + ltmain.sh (GNU @@PACKAGE@@) @@VERSION@@ + trick$ + @end example + @end itemize + + The output of the final @samp{libtool --version} command shows that the + @code{ltmain.in} script is being used directly. Now, modify + @code{~/bin/libtool} or @code{/home/src/libtool/ltmain.in} directly in + order to test new changes without having to rerun @code{ltconfig}. @page @node Index Index: libtool/libltdl/.cvsignore diff -c /dev/null libtool/libltdl/.cvsignore:1.3 *** /dev/null Thu Apr 29 16:20:23 1999 --- libtool/libltdl/.cvsignore Sun Mar 14 06:42:58 1999 *************** *** 0 **** --- 1,13 ---- + .deps + .libs + Makefile + Makefile.in + acinclude.m4 + aclocal.m4 + configure + config.* + conftest* + libtool + *.lo + *.la + stamp-h* Index: libtool/libltdl/COPYING.LIB diff -c /dev/null libtool/libltdl/COPYING.LIB:1.1.2.1 *** /dev/null Thu Apr 29 16:20:23 1999 --- libtool/libltdl/COPYING.LIB Sat Mar 27 17:54:40 1999 *************** *** 0 **** --- 1,481 ---- + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + Licenses are intended to guarantee your freedom to share and change + free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some + specially designated Free Software Foundation software, and to any + other libraries whose authors decide to use it. You can use it for + your libraries, too. + + When we speak of free software, we are referring to freedom, not + price. Our General Public Licenses are designed to make sure that you + have the freedom to distribute copies of free software (and charge for + this service if you wish), that you receive source code or can get it + if you want it, that you can change the software or use pieces of it + in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid + anyone to deny you these rights or to ask you to surrender the rights. + These restrictions translate to certain responsibilities for you if + you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis + or for a fee, you must give the recipients all the rights that we gave + you. You must make sure that they, too, receive or can get the source + code. If you link a program with the library, you must provide + complete object files to the recipients so that they can relink them + with the library, after making changes to the library and recompiling + it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright + the library, and (2) offer you this license which gives you legal + permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain + that everyone understands that there is no warranty for this free + library. If the library is modified by someone else and passed on, we + want its recipients to know that what they have is not the original + version, so that any problems introduced by others will not reflect on + the original authors' reputations. + + Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that companies distributing free + software will individually obtain patent licenses, thus in effect + transforming the program into proprietary software. To prevent this, + we have made it clear that any patent must be licensed for everyone's + free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary + GNU General Public License, which was designed for utility programs. This + license, the GNU Library General Public License, applies to certain + designated libraries. This license is quite different from the ordinary + one; be sure to read it in full, and don't assume that anything in it is + the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that + they blur the distinction we usually make between modifying or adding to a + program and simply using it. Linking a program with a library, without + changing the library, is in some sense simply using the library, and is + analogous to running a utility program or application program. However, in + a textual and legal sense, the linked executable is a combined work, a + derivative of the original library, and the ordinary General Public License + treats it as such. + + Because of this blurred distinction, using the ordinary General + Public License for libraries did not effectively promote software + sharing, because most developers did not use the libraries. We + concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the + users of those programs of all benefit from the free status of the + libraries themselves. This Library General Public License is intended to + permit developers of non-free programs to use free libraries, while + preserving your freedom as a user of such programs to change the free + libraries that are incorporated in them. (We have not seen how to achieve + this as regards changes in header files, but we have achieved it as regards + changes in the actual functions of the Library.) The hope is that this + will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and + modification follow. Pay close attention to the difference between a + "work based on the library" and a "work that uses the library". The + former contains code derived from the library, while the latter only + works together with the library. + + Note that it is possible for a library to be covered by the ordinary + General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which + contains a notice placed by the copyright holder or other authorized + party saying it may be distributed under the terms of this Library + General Public License (also called "this License"). Each licensee is + addressed as "you". + + A "library" means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work + which has been distributed under these terms. A "work based on the + Library" means either the Library or any derivative work under + copyright law: that is to say, a work containing the Library or a + portion of it, either verbatim or with modifications and/or translated + straightforwardly into another language. (Hereinafter, translation is + included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for + making modifications to it. For a library, complete source code means + all the source code for all modules it contains, plus any associated + interface definition files, plus the scripts used to control compilation + and installation of the library. + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of + running a program using the Library is not restricted, and output from + such a program is covered only if its contents constitute a work based + on the Library (independent of the use of the Library in a tool for + writing it). Whether that is true depends on what the Library does + and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's + complete source code as you receive it, in any medium, provided that + you conspicuously and appropriately publish on each copy an + appropriate copyright notice and disclaimer of warranty; keep intact + all the notices that refer to this License and to the absence of any + warranty; and distribute a copy of this License along with the + Library. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange for a + fee. + + 2. You may modify your copy or copies of the Library or any portion + of it, thus forming a work based on the Library, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Library, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based + on the Library, the distribution of the whole must be on the terms of + this License, whose permissions for other licensees extend to the + entire whole, and thus to each and every part regardless of who wrote + it. + + Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Library. + + In addition, mere aggregation of another work not based on the Library + with the Library (or with a work based on the Library) on a volume of + a storage or distribution medium does not bring the other work under + the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public + License instead of this License to a given copy of the Library. To do + this, you must alter all the notices that refer to this License, so + that they refer to the ordinary GNU General Public License, version 2, + instead of to this License. (If a newer version than version 2 of the + ordinary GNU General Public License has appeared, then you can specify + that version instead if you wish.) Do not make any other change in + these notices. + + Once this change is made in a given copy, it is irreversible for + that copy, so the ordinary GNU General Public License applies to all + subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of + the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or + derivative of it, under Section 2) in object code or executable form + under the terms of Sections 1 and 2 above provided that you accompany + it with the complete corresponding machine-readable source code, which + must be distributed under the terms of Sections 1 and 2 above on a + medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy + from a designated place, then offering equivalent access to copy the + source code from the same place satisfies the requirement to + distribute the source code, even though third parties are not + compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the + Library, but is designed to work with the Library by being compiled or + linked with it, is called a "work that uses the Library". Such a + work, in isolation, is not a derivative work of the Library, and + therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library + creates an executable that is a derivative of the Library (because it + contains portions of the Library), rather than a "work that uses the + library". The executable is therefore covered by this License. + Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file + that is part of the Library, the object code for the work may be a + derivative work of the Library even though the source code is not. + Whether this is true is especially significant if the work can be + linked without the Library, or if the work is itself a library. The + threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data + structure layouts and accessors, and small macros and small inline + functions (ten lines or less in length), then the use of the object + file is unrestricted, regardless of whether it is legally a derivative + work. (Executables containing this object code plus portions of the + Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section 6. + Any executables containing that work also fall under Section 6, + whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or + link a "work that uses the Library" with the Library to produce a + work containing portions of the Library, and distribute that work + under terms of your choice, provided that the terms permit + modification of the work for the customer's own use and reverse + engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered by + this License. You must supply a copy of this License. If the work + during execution displays copyright notices, you must include the + copyright notice for the Library among them, as well as a reference + directing the user to the copy of this License. Also, you must do one + of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the + Library" must include any data and utility programs needed for + reproducing the executable from it. However, as a special exception, + the source code distributed need not include anything that is normally + distributed (in either source or binary form) with the major + components (compiler, kernel, and so on) of the operating system on + which the executable runs, unless that component itself accompanies + the executable. + + It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you cannot + use both them and the Library together in an executable that you + distribute. + + 7. You may place library facilities that are a work based on the + Library side-by-side in a single library together with other library + facilities not covered by this License, and distribute such a combined + library, provided that the separate distribution of the work based on + the Library and of the other library facilities is otherwise + permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute + the Library except as expressly provided under this License. Any + attempt otherwise to copy, modify, sublicense, link with, or + distribute the Library is void, and will automatically terminate your + rights under this License. However, parties who have received copies, + or rights, from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Library or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Library (or any work based on the + Library), you indicate your acceptance of this License to do so, and + all its terms and conditions for copying, distributing or modifying + the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the + Library), the recipient automatically receives a license from the + original licensor to copy, distribute, link with or modify the Library + subject to these terms and conditions. You may not impose any further + restrictions on the recipients' exercise of the rights granted herein. + You are not responsible for enforcing compliance by third parties to + this License. + + 11. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot + distribute so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you + may not distribute the Library at all. For example, if a patent + license would not permit royalty-free redistribution of the Library by + all those who receive copies directly or indirectly through you, then + the only way you could satisfy both it and this License would be to + refrain entirely from distribution of the Library. + + If any portion of this section is held invalid or unenforceable under any + particular circumstance, the balance of the section is intended to apply, + and the section as a whole is intended to apply in other circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is willing + to distribute software through any other system and a licensee cannot + impose that choice. + + This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Library under this License may add + an explicit geographical distribution limitation excluding those countries, + so that distribution is permitted only in or among countries not thus + excluded. In such case, this License incorporates the limitation as if + written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new + versions of the Library General Public License from time to time. + Such new versions will be similar in spirit to the present version, + but may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the Library + specifies a version number of this License which applies to it and + "any later version", you have the option of following the terms and + conditions either of that version or of any later version published by + the Free Software Foundation. If the Library does not specify a + license version number, you may choose any version ever published by + the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free + programs whose distribution conditions are incompatible with these, + write to the author to ask for permission. For software which is + copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our + decision will be guided by the two goals of preserving the free status + of all derivatives of our free software and of promoting the sharing + and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. + EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR + OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE + LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME + THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY + AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU + FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE + LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING + RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A + FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF + SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest + possible use to the public, we recommend making it free software that + everyone can redistribute and change. You can do so by permitting + redistribution under these terms (or, alternatively, under the terms of the + ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is + safest to attach them to the start of each source file to most effectively + convey the exclusion of warranty; and each file should have at least the + "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + Also add information on how to contact you by electronic and paper mail. + + You should also get your employer (if you work as a programmer) or your + school, if any, to sign a "copyright disclaimer" for the library, if + necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + + That's all there is to it! Index: libtool/libltdl/Makefile.am diff -c /dev/null libtool/libltdl/Makefile.am:1.27.2.2 *** /dev/null Thu Apr 29 16:20:23 1999 --- libtool/libltdl/Makefile.am Thu Apr 29 10:08:04 1999 *************** *** 0 **** --- 1,28 ---- + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = no-dependencies foreign + + if INSTALL_LTDL + include_HEADERS = ltdl.h + lib_LTLIBRARIES = libltdl.la + else + noinst_HEADERS = ltdl.h + endif + + if CONVENIENCE_LTDL + noinst_LTLIBRARIES = libltdlc.la + endif + + libltdl_la_SOURCES = ltdl.c + libltdl_la_LDFLAGS = -version-info 1:1:1 + libltdl_la_LIBADD = $(LIBADD_DL) + + libltdlc_la_SOURCES = ltdl.c + libltdlc_la_LIBADD = $(LIBADD_DL) + + ## Because we do not have automatic dependency tracking: + ltdl.lo: ltdl.h config.h + + $(OBJECTS): libtool + libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status --recheck Index: libtool/libltdl/README diff -c /dev/null libtool/libltdl/README:1.1 *** /dev/null Thu Apr 29 16:20:23 1999 --- libtool/libltdl/README Wed Nov 18 08:29:29 1998 *************** *** 0 **** --- 1 ---- + This is GNU libltdl, a system independent dlopen wrapper for GNU libtool. Index: libtool/libltdl/acconfig.h diff -c /dev/null libtool/libltdl/acconfig.h:1.2.2.1 *** /dev/null Thu Apr 29 16:20:23 1999 --- libtool/libltdl/acconfig.h Thu Apr 29 10:08:04 1999 *************** *** 0 **** --- 1,12 ---- + /* Some of these are defined here, not in configure.in, because + they're AC_DEFINEd in two different places, which causes two + defines to appear. Some C compilers might now appreciate it... */ + + /* Define if you have the libdl library or equivalent. */ + #undef HAVE_LIBDL + + /* Define if you have the GNU dld library. */ + #undef HAVE_DLD + + /* Define if you have the shl_load function. */ + #undef HAVE_SHL_LOAD Index: libtool/libltdl/configure.in diff -c /dev/null libtool/libltdl/configure.in:1.38.2.7 *** /dev/null Thu Apr 29 16:20:23 1999 --- libtool/libltdl/configure.in Thu Apr 29 10:08:04 1999 *************** *** 0 **** --- 1,373 ---- + dnl Process this file with autoconf to create configure. + + AC_INIT(ltdl.c) + + if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then + if test -f ${srcdir}/ltconfig && test -f ${srcdir}/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 + else + AC_MSG_WARN([*** The top-level configure must select either]) + AC_MSG_WARN([*** [A""C_LIBLTDL_INSTALLABLE] or [A""C_LIBLTDL_CONVENIENCE].]) + AC_MSG_ERROR([*** Maybe you want to --enable-ltdl-install?]) + fi + fi + + AM_INIT_AUTOMAKE(libltdl,1.0,-) + AM_CONFIG_HEADER(config.h) + AM_MAINTAINER_MODE + + AC_PROG_CC + AC_C_CONST + AC_C_INLINE + AM_PROG_LIBTOOL + AC_SUBST(LIBTOOL_DEPS) + + AC_ARG_ENABLE(ltdl-install, + [ --enable-ltdl-install install libltdl]) + + AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) + AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) + + dnl Read the libtool configuration + rm -f conftest + ./libtool --config > conftest + . ./conftest + rm -f conftest + + AC_CACHE_CHECK([which extension is used for shared libraries], + libltdl_cv_shlibext, [dnl + ( + last= + for spec in $library_names_spec; do + last="$spec" + done + changequote(, ) + echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest + changequote([, ]) + ) + libltdl_cv_shlibext=`cat conftest` + rm -f conftest + ]) + if test -n "$libltdl_cv_shlibext"; then + AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", + [Define to the extension used for shared libraries, say, ".so". ]) + fi + + AC_CACHE_CHECK([which variable specifies run-time library path], + libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"]) + if test -n "$libltdl_cv_shlibpath_var"; then + AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", + [Define to the name of the environment variable that determines the dynamic library search path. ]) + fi + + AC_CACHE_CHECK([for objdir], + libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"]) + test -z "$libltdl_cv_objdir" && libltdl_cv_objdir=".libs" + AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries. ]) + + AC_HEADER_STDC + AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h) + AC_CHECK_HEADERS(string.h strings.h, break) + AC_CHECK_FUNCS(strchr index, break) + AC_CHECK_FUNCS(strrchr rindex, break) + + AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], + libltdl_cv_preloaded_symbols, [dnl + if test -n "$global_symbol_pipe"; then + libltdl_cv_preloaded_symbols=yes + else + libltdl_cv_preloaded_symbols=no + fi + ]) + if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then + AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, + [Define if libtool can extract symbol lists from object files. ]) + fi + + LIBADD_DL= + AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1)], + [AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1) LIBADD_DL="-ldl"], + [AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1) LIBADD_DL="-ldld"], + [AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1)], + [AC_CHECK_LIB(dld, shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1) LIBADD_DL="-ldld"])] + )])])]) + AC_SUBST(LIBADD_DL) + + if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = yes; then + LIBS_SAVE="$LIBS" + LIBS="$LIBS $LIBADD_DL" + AC_CHECK_FUNCS(dlerror) + LIBS="$LIBS_SAVE" + fi + + dnl Check for command to grab the raw symbol name followed + dnl by C symbol name from nm. + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([AC_PROG_NM])dnl + # Check for command to grab the raw symbol name followed by C symbol from nm. + AC_MSG_CHECKING([command to parse $NM output]) + AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe, + [# These are sane defaults that work on at least a few old systems. + # {They come from Ultrix. What could be older than Ultrix?!! ;)} + + changequote(,)dnl + # Character class describing NM global symbol codes. + ac_symcode='[BCDEGRST]' + + # Regexp to match symbols that can be accessed directly from C. + ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + + # Transform the above into a raw symbol and a C symbol. + ac_symxfrm='\1 \2\3 \3' + + # Transform an extracted symbol line into a proper C declaration + ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" + + # Define system-specific variables. + case "$host_os" in + aix*) + ac_symcode='[BCDT]' + ;; + cygwin* | mingw*) + ac_symcode='[ABCDGISTW]' + ;; + hpux*) + ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" + ;; + irix*) + ac_symcode='[BCDEGRST]' + ;; + solaris*) + ac_symcode='[BDT]' + ;; + esac + + # If we're using GNU nm, then use its standard symbol codes. + if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then + ac_symcode='[ABCDGISTW]' + fi + changequote([,])dnl + + # Try without a prefix undercore, then with it. + for ac_symprfx in "" "_"; do + + ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'" + + # Check to see that the pipe works correctly. + ac_pipe_works=no + rm -f conftest.$ac_ext + cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then + + # Try sorting and uniquifying the output. + if sort "$ac_nlist" | uniq > "$ac_nlist"T; then + mv -f "$ac_nlist"T "$ac_nlist" + else + rm -f "$ac_nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then + if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then + cat < conftest.c + #ifdef __cplusplus + extern "C" { + #endif + + EOF + # Now generate the symbol file. + eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c' + + cat <> conftest.c + #if defined (__STDC__) && __STDC__ + # define lt_ptr_t void * + #else + # define lt_ptr_t char * + # define const + #endif + + /* The mapping between symbol names and symbols. */ + const struct { + const char *name; + lt_ptr_t address; + } + changequote(,)dnl + lt_preloaded_symbols[] = + changequote([,])dnl + { + EOF + sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c + cat <<\EOF >> conftest.c + {0, (lt_ptr_t) 0} + }; + + #ifdef __cplusplus + } + #endif + EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + ac_save_LIBS="$LIBS" + ac_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$no_builtin_flag" + if AC_TRY_EVAL(ac_link) && test -s conftest; then + ac_pipe_works=yes + else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.c >&AC_FD_CC + fi + LIBS="$ac_save_LIBS" + CFLAGS="$ac_save_CFLAGS" + else + echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC + fi + else + echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC + fi + else + echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC + fi + else + echo "$progname: failed program was:" >&AC_FD_CC + cat conftest.c >&AC_FD_CC + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$ac_pipe_works" = yes; then + if test x"$ac_symprfx" = x"_"; then + ac_cv_sys_symbol_underscore=yes + else + ac_cv_sys_symbol_underscore=no + fi + break + else + ac_cv_sys_global_symbol_pipe= + fi + done + ]) + + ac_result=yes + if test -z "$ac_cv_sys_global_symbol_pipe"; then + ac_result=no + fi + AC_MSG_RESULT($ac_result) + + dnl does the compiler prefix global symbols with an underscore? + AC_MSG_CHECKING([for _ prefix in compiled symbols]) + AC_CACHE_VAL(ac_cv_sys_symbol_underscore, + [ac_cv_sys_symbol_underscore=no + cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then + # See whether the symbols have a leading underscore. + if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then + ac_cv_sys_symbol_underscore=yes + else + if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then + : + else + echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC + fi + fi + else + echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC + fi + else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.c >&AC_FD_CC + fi + rm -rf conftest* + ]) + AC_MSG_RESULT($ac_cv_sys_symbol_underscore) + + if test x"$ac_cv_sys_symbol_underscore" = xyes; then + if test x"$ac_cv_func_dlopen" = xyes || + test x"$ac_cv_lib_dl_dlopen" = xyes ; then + AC_CACHE_CHECK([whether we have to add an underscore for dlsym], + libltdl_cv_need_uscore, [dnl + AC_TRY_RUN([ + #if HAVE_DLFCN_H + #include + #endif + + #include + + #ifdef RTLD_GLOBAL + # define LTDL_GLOBAL RTLD_GLOBAL + #else + # ifdef DL_GLOBAL + # define LTDL_GLOBAL DL_GLOBAL + # else + # define LTDL_GLOBAL 0 + # endif + #endif + + /* We may have to define LTDL_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ + #ifndef LTDL_LAZY_OR_NOW + # ifdef RTLD_LAZY + # define LTDL_LAZY_OR_NOW RTLD_LAZY + # else + # ifdef DL_LAZY + # define LTDL_LAZY_OR_NOW DL_LAZY + # else + # ifdef RTLD_NOW + # define LTDL_LAZY_OR_NOW RTLD_NOW + # else + # ifdef DL_NOW + # define LTDL_LAZY_OR_NOW DL_NOW + # else + # define LTDL_LAZY_OR_NOW 0 + # endif + # endif + # endif + # endif + #endif + + fnord() { int i=42;} + main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); + if(ptr1 && !ptr2) exit(0); } exit(1); } + ], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes, + libltdl_cv_need_uscore=cross + )]) + fi + fi + + if test x"$libltdl_cv_need_uscore" = xyes; then + AC_DEFINE(NEED_USCORE, 1, + [Define if dlsym() requires a leading underscode in symbol names. ]) + fi + + dnl Output the makefile + AC_OUTPUT(Makefile) + + # Local Variables: + # mode:shell-script + # sh-indentation:2 + # End: Index: libtool/libltdl/ltdl.c diff -c /dev/null libtool/libltdl/ltdl.c:1.64.2.8 *** /dev/null Thu Apr 29 16:20:23 1999 --- libtool/libltdl/ltdl.c Mon Apr 12 21:41:19 1999 *************** *** 0 **** --- 1,1577 ---- + /* ltdl.c -- system independent dlopen wrapper + Copyright (C) 1998-1999 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + As a special exception to the GNU Library General Public License, + if you distribute this file as part of a program that uses GNU libtool + to create libraries and programs, you may include it under the same + distribution terms that you use for the rest of that program. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + #define _LTDL_COMPILE_ + + #if HAVE_CONFIG_H + #include + #endif + + #if HAVE_STRING_H + #include + #endif + + #if HAVE_STRINGS_H + #include + #endif + + #if HAVE_CTYPE_H + #include + #endif + + #if HAVE_MALLOC_H + #include + #endif + + #if HAVE_MEMORY_H + #include + #endif + + #if HAVE_STDLIB_H + #include + #endif + + #if HAVE_STDIO_H + #include + #endif + + #include "ltdl.h" + + /* max. filename length */ + #ifndef LTDL_FILENAME_MAX + #define LTDL_FILENAME_MAX 1024 + #endif + + #undef LTDL_READTEXT_MODE + /* fopen() mode flags for reading a text file */ + #ifdef _WIN32 + #define LTDL_READTEXT_MODE "rt" + #else + #define LTDL_READTEXT_MODE "r" + #endif + + #undef LTDL_SYMBOL_LENGTH + /* This is the maximum symbol size that won't require malloc/free */ + #define LTDL_SYMBOL_LENGTH 128 + + #undef LTDL_SYMBOL_OVERHEAD + /* This accounts for the _LTX_ separator */ + #define LTDL_SYMBOL_OVERHEAD 5 + + static const char objdir[] = LTDL_OBJDIR; + #ifdef LTDL_SHLIB_EXT + static const char shlib_ext[] = LTDL_SHLIB_EXT; + #endif + + static const char unknown_error[] = "unknown error"; + static const char dlopen_not_supported_error[] = "dlopen support not available"; + static const char file_not_found_error[] = "file not found"; + static const char no_symbols_error[] = "no symbols defined"; + static const char cannot_open_error[] = "can't open the module"; + static const char cannot_close_error[] = "can't close the module"; + static const char symbol_error[] = "symbol not found"; + static const char memory_error[] = "not enough memory"; + static const char invalid_handle_error[] = "invalid handle"; + static const char buffer_overflow_error[] = "internal buffer overflow"; + static const char shutdown_error[] = "library already shutdown"; + + #ifndef HAVE_PRELOADED_SYMBOLS + /* If libtool won't define it, we'd better do */ + const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } }; + #endif + + static const char *last_error = 0; + + lt_ptr_t (*lt_dlmalloc) __P((size_t size)) = (lt_ptr_t(*)__P((size_t)))malloc; + void (*lt_dlfree) __P((lt_ptr_t ptr)) = (void(*)__P((lt_ptr_t)))free; + + typedef struct lt_dltype_t { + struct lt_dltype_t *next; + const char *sym_prefix; /* prefix for symbols */ + int (*mod_init) __P((void)); + int (*mod_exit) __P((void)); + int (*lib_open) __P((lt_dlhandle handle, const char *filename)); + int (*lib_close) __P((lt_dlhandle handle)); + lt_ptr_t (*find_sym) __P((lt_dlhandle handle, const char *symbol)); + } lt_dltype_t; + + #define LTDL_TYPE_TOP 0 + + typedef struct lt_dlhandle_t { + struct lt_dlhandle_t *next; + lt_dltype_t *type; /* dlopening interface */ + char *filename; /* file name */ + char *name; /* module name */ + int usage; /* usage */ + int depcount; /* number of dependencies */ + lt_dlhandle *deplibs; /* dependencies */ + lt_ptr_t handle; /* system handle */ + lt_ptr_t system; /* system specific data */ + } lt_dlhandle_t; + + #undef strdup + #define strdup xstrdup + + static inline char * + strdup(str) + const char *str; + { + char *tmp; + + if (!str) + return 0; + tmp = (char*) lt_dlmalloc(strlen(str)+1); + if (tmp) + strcpy(tmp, str); + return tmp; + } + + #if ! HAVE_STRCHR + + # if HAVE_INDEX + + # define strchr index + + # else + + # define strchr xstrchr + + static inline const char* + strchr(str, ch) + const char *str; + int ch; + { + const char *p; + + for (p = str; *p != (char)ch && p != '\0'; p++) + /*NOWORK*/; + + return (*p == (char)ch) ? p : 0; + } + + # endif + + #endif + + #if ! HAVE_STRRCHR + + # if HAVE_RINDEX + + # define strrchr rindex + + # else + + # define strrchr xstrrchr + + static inline const char* + strrchr(str, ch) + const char *str; + int ch; + { + const char *p; + + for (p = str; p != '\0'; p++) + /*NOWORK*/; + + while (*p != (char)ch && p >= str) + p--; + + return (*p == (char)ch) ? p : 0; + } + + # endif + + #endif + + #if HAVE_LIBDL + + /* dynamic linking with dlopen/dlsym */ + + #if HAVE_DLFCN_H + # include + #endif + + #ifdef RTLD_GLOBAL + # define LTDL_GLOBAL RTLD_GLOBAL + #else + # ifdef DL_GLOBAL + # define LTDL_GLOBAL DL_GLOBAL + # else + # define LTDL_GLOBAL 0 + # endif + #endif + + /* We may have to define LTDL_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ + #ifndef LTDL_LAZY_OR_NOW + # ifdef RTLD_LAZY + # define LTDL_LAZY_OR_NOW RTLD_LAZY + # else + # ifdef DL_LAZY + # define LTDL_LAZY_OR_NOW DL_LAZY + # else + # ifdef RTLD_NOW + # define LTDL_LAZY_OR_NOW RTLD_NOW + # else + # ifdef DL_NOW + # define LTDL_LAZY_OR_NOW DL_NOW + # else + # define LTDL_LAZY_OR_NOW 0 + # endif + # endif + # endif + # endif + #endif + + static int + dl_init __P((void)) + { + return 0; + } + + static int + dl_exit __P((void)) + { + return 0; + } + + static int + dl_open (handle, filename) + lt_dlhandle handle; + const char *filename; + { + handle->handle = dlopen(filename, LTDL_GLOBAL | LTDL_LAZY_OR_NOW); + if (!handle->handle) { + #if HAVE_DLERROR + last_error = dlerror(); + #else + last_error = cannot_open_error; + #endif + return 1; + } + return 0; + } + + static int + dl_close (handle) + lt_dlhandle handle; + { + if (dlclose(handle->handle) != 0) { + #if HAVE_DLERROR + last_error = dlerror(); + #else + last_error = cannot_close_error; + #endif + return 1; + } + return 0; + } + + static lt_ptr_t + dl_sym (handle, symbol) + lt_dlhandle handle; + const char *symbol; + { + lt_ptr_t address = dlsym(handle->handle, symbol); + + if (!address) + #if HAVE_DLERROR + last_error = dlerror(); + #else + last_error = symbol_error; + #endif + return address; + } + + static + lt_dltype_t + #ifdef NEED_USCORE + dl = { LTDL_TYPE_TOP, "_", dl_init, dl_exit, + dl_open, dl_close, dl_sym }; + #else + dl = { LTDL_TYPE_TOP, 0, dl_init, dl_exit, + dl_open, dl_close, dl_sym }; + #endif + + #undef LTDL_TYPE_TOP + #define LTDL_TYPE_TOP &dl + + #endif + + #if HAVE_SHL_LOAD + + /* dynamic linking with shl_load (HP-UX) (comments from gmodule) */ + + #ifdef HAVE_DL_H + #include + #endif + + /* some flags are missing on some systems, so we provide + * harmless defaults. + * + * Mandatory: + * BIND_IMMEDIATE - Resolve symbol references when the library is loaded. + * BIND_DEFERRED - Delay code symbol resolution until actual reference. + * + * Optionally: + * BIND_FIRST - Place the library at the head of the symbol search order. + * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all unsatisfied + * symbols as fatal. This flag allows binding of unsatisfied code + * symbols to be deferred until use. + * [Perl: For certain libraries, like DCE, deferred binding often + * causes run time problems. Adding BIND_NONFATAL to BIND_IMMEDIATE + * still allows unresolved references in situations like this.] + * BIND_NOSTART - Do not call the initializer for the shared library when the + * library is loaded, nor on a future call to shl_unload(). + * BIND_VERBOSE - Print verbose messages concerning possible unsatisfied symbols. + * + * hp9000s700/hp9000s800: + * BIND_RESTRICTED - Restrict symbols visible by the library to those present at + * library load time. + * DYNAMIC_PATH - Allow the loader to dynamically search for the library specified + * by the path argument. + */ + + #ifndef DYNAMIC_PATH + #define DYNAMIC_PATH 0 + #endif /* DYNAMIC_PATH */ + #ifndef BIND_RESTRICTED + #define BIND_RESTRICTED 0 + #endif /* BIND_RESTRICTED */ + + #define LTDL_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | BIND_VERBOSE | DYNAMIC_PATH) + + static int + shl_init __P((void)) + { + return 0; + } + + static int + shl_exit __P((void)) + { + return 0; + } + + static int + shl_open (handle, filename) + lt_dlhandle handle; + const char *filename; + { + handle->handle = shl_load(filename, LTDL_BIND_FLAGS, 0L); + if (!handle->handle) { + last_error = cannot_open_error; + return 1; + } + return 0; + } + + static int + shl_close (handle) + lt_dlhandle handle; + { + if (shl_unload((shl_t) (handle->handle)) != 0) { + last_error = cannot_close_error; + return 1; + } + return 0; + } + + static lt_ptr_t + shl_sym (handle, symbol) + lt_dlhandle handle; + const char *symbol; + { + lt_ptr_t address; + + if (handle->handle && shl_findsym((shl_t*) &(handle->handle), + symbol, TYPE_UNDEFINED, &address) == 0) + if (address) + return address; + last_error = symbol_error; + return 0; + } + + static + lt_dltype_t + shl = { LTDL_TYPE_TOP, 0, shl_init, shl_exit, + shl_open, shl_close, shl_sym }; + + #undef LTDL_TYPE_TOP + #define LTDL_TYPE_TOP &shl + + #endif + + #if HAVE_DLD + + /* dynamic linking with dld */ + + #if HAVE_DLD_H + #include + #endif + + static int + dld_init __P((void)) + { + return 0; + } + + static int + dld_exit __P((void)) + { + return 0; + } + + static int + dld_open (handle, filename) + lt_dlhandle handle; + const char *filename; + { + handle->handle = strdup(filename); + if (!handle->handle) { + last_error = memory_error; + return 1; + } + if (dld_link(filename) != 0) { + last_error = cannot_open_error; + lt_dlfree(handle->handle); + return 1; + } + return 0; + } + + static int + dld_close (handle) + lt_dlhandle handle; + { + if (dld_unlink_by_file((char*)(handle->handle), 1) != 0) { + last_error = cannot_close_error; + return 1; + } + lt_dlfree(handle->filename); + return 0; + } + + static lt_ptr_t + dld_sym (handle, symbol) + lt_dlhandle handle; + const char *symbol; + { + lt_ptr_t address = dld_get_func(symbol); + + if (!address) + last_error = symbol_error; + return address; + } + + static + lt_dltype_t + dld = { LTDL_TYPE_TOP, 0, dld_init, dld_exit, + dld_open, dld_close, dld_sym }; + + #undef LTDL_TYPE_TOP + #define LTDL_TYPE_TOP &dld + + #endif + + #ifdef _WIN32 + + /* dynamic linking for Win32 */ + + #include + + static int + wll_init __P((void)) + { + return 0; + } + + static int + wll_exit __P((void)) + { + return 0; + } + + static int + wll_open (handle, filename) + lt_dlhandle handle; + const char *filename; + { + handle->handle = LoadLibrary(filename); + if (!handle->handle) { + last_error = cannot_open_error; + return 1; + } + return 0; + } + + static int + wll_close (handle) + lt_dlhandle handle; + { + if (FreeLibrary(handle->handle) != 0) { + last_error = cannot_close_error; + return 1; + } + return 0; + } + + static lt_ptr_t + wll_sym (handle, symbol) + lt_dlhandle handle; + const char *symbol; + { + lt_ptr_t address = GetProcAddress(handle->handle, symbol); + + if (!address) + last_error = symbol_error; + return address; + } + + static + lt_dltype_t + wll = { LTDL_TYPE_TOP, 0, wll_init, wll_exit, + wll_open, wll_close, wll_sym }; + + #undef LTDL_TYPE_TOP + #define LTDL_TYPE_TOP &wll + + #endif + + #ifdef __BEOS__ + + /* dynamic linking for BeOS */ + + #include + + static int + bedl_init __P((void)) + { + return 0; + } + + static int + bedl_exit __P((void)) + { + return 0; + } + + static int + bedl_open (handle, filename) + lt_dlhandle handle; + const char *filename; + { + image_id image = 0; + + if (filename) { + image = load_add_on(filename); + } else { + image_info info; + int32 cookie = 0; + if (get_next_image_info(0, &cookie, &info) == B_OK) + image = load_add_on(info.name); + } + if (image <= 0) { + last_error = cannot_open_error; + return 1; + } + handle->handle = (void*) image; + return 0; + } + + static int + bedl_close (handle) + lt_dlhandle handle; + { + if (unload_add_on((image_id)handle->handle) != B_OK) { + last_error = cannot_close_error; + return 1; + } + return 0; + } + + static lt_ptr_t + bedl_sym (handle, symbol) + lt_dlhandle handle; + const char *symbol; + { + lt_ptr_t address = 0; + image_id image = (image_id)handle->handle; + + if (get_image_symbol(image, symbol, B_SYMBOL_TYPE_ANY, + &address) != B_OK) { + last_error = symbol_error; + return 0; + } + return address; + } + + static + lt_dltype_t + bedl = { LTDL_TYPE_TOP, 0, bedl_init, bedl_exit, + bedl_open, bedl_close, bedl_sym }; + + #undef LTDL_TYPE_TOP + #define LTDL_TYPE_TOP &bedl + + #endif + + /* emulate dynamic linking using preloaded_symbols */ + + typedef struct lt_dlsymlists_t { + struct lt_dlsymlists_t *next; + const lt_dlsymlist *syms; + } lt_dlsymlists_t; + + static const lt_dlsymlist *default_preloaded_symbols = 0; + static lt_dlsymlists_t *preloaded_symbols = 0; + + static int + presym_init __P((void)) + { + preloaded_symbols = 0; + if (default_preloaded_symbols) + return lt_dlpreload(default_preloaded_symbols); + return 0; + } + + static int + presym_free_symlists __P((void)) + { + lt_dlsymlists_t *lists = preloaded_symbols; + + while (lists) { + lt_dlsymlists_t *tmp = lists; + + lists = lists->next; + lt_dlfree(tmp); + } + preloaded_symbols = 0; + return 0; + } + + static int + presym_exit __P((void)) + { + presym_free_symlists(); + return 0; + } + + static int + presym_add_symlist (preloaded) + const lt_dlsymlist *preloaded; + { + lt_dlsymlists_t *tmp; + lt_dlsymlists_t *lists = preloaded_symbols; + + while (lists) { + if (lists->syms == preloaded) + return 0; + lists = lists->next; + } + + tmp = (lt_dlsymlists_t*) lt_dlmalloc(sizeof(lt_dlsymlists_t)); + if (!tmp) { + last_error = memory_error; + return 1; + } + tmp->syms = preloaded; + tmp->next = 0; + if (!preloaded_symbols) + preloaded_symbols = tmp; + else { + /* append to the end */ + lists = preloaded_symbols; + while (lists->next) + lists = lists->next; + lists->next = tmp; + } + return 0; + } + + static int + presym_open (handle, filename) + lt_dlhandle handle; + const char *filename; + { + lt_dlsymlists_t *lists = preloaded_symbols; + + if (!lists) { + last_error = no_symbols_error; + return 1; + } + if (!filename) + filename = "@PROGRAM@"; + while (lists) { + const lt_dlsymlist *syms = lists->syms; + + while (syms->name) { + if (!syms->address && + strcmp(syms->name, filename) == 0) { + handle->handle = (lt_ptr_t) syms; + return 0; + } + syms++; + } + lists = lists->next; + } + last_error = file_not_found_error; + return 1; + } + + static int + presym_close (handle) + lt_dlhandle handle; + { + /* Just to silence gcc -Wall */ + handle = 0; + return 0; + } + + static lt_ptr_t + presym_sym (handle, symbol) + lt_dlhandle handle; + const char *symbol; + { + lt_dlsymlist *syms = (lt_dlsymlist*)(handle->handle); + + syms++; + while (syms->address) { + if (strcmp(syms->name, symbol) == 0) + return syms->address; + syms++; + } + last_error = symbol_error; + return 0; + } + + static + lt_dltype_t + presym = { LTDL_TYPE_TOP, 0, presym_init, presym_exit, + presym_open, presym_close, presym_sym }; + + #undef LTDL_TYPE_TOP + #define LTDL_TYPE_TOP &presym + + static char *user_search_path = 0; + static lt_dlhandle handles = 0; + static int initialized = 0; + + static lt_dltype_t *types = LTDL_TYPE_TOP; + #undef LTDL_TYPE_TOP + + int + lt_dlinit __P((void)) + { + /* initialize libltdl */ + lt_dltype_t **type = &types; + int typecount = 0; + + if (initialized) { /* Initialize only at first call. */ + initialized++; + return 0; + } + handles = 0; + user_search_path = 0; /* empty search path */ + + while (*type) { + if ((*type)->mod_init()) + *type = (*type)->next; /* Remove it from the list */ + else { + type = &(*type)->next; /* Keep it */ + typecount++; + } + } + if (typecount == 0) { + last_error = dlopen_not_supported_error; + return 1; + } + last_error = 0; + initialized = 1; + return 0; + } + + int + lt_dlpreload (preloaded) + const lt_dlsymlist *preloaded; + { + if (preloaded) + return presym_add_symlist(preloaded); + presym_free_symlists(); + if (default_preloaded_symbols) + return lt_dlpreload(default_preloaded_symbols); + return 0; + } + + int + lt_dlpreload_default (preloaded) + const lt_dlsymlist *preloaded; + { + default_preloaded_symbols = preloaded; + return 0; + } + + int + lt_dlexit __P((void)) + { + /* shut down libltdl */ + lt_dltype_t *type = types; + int errors; + + if (!initialized) { + last_error = shutdown_error; + return 1; + } + if (initialized != 1) { /* shut down only at last call. */ + initialized--; + return 0; + } + /* close all modules */ + errors = 0; + while (handles) { + /* FIXME: what if a module depends on another one? */ + if (lt_dlclose(handles)) + errors++; + } + initialized = 0; + while (type) { + if (type->mod_exit()) + errors++; + type = type->next; + } + return errors; + } + + static int + tryall_dlopen (handle, filename) + lt_dlhandle *handle; + const char *filename; + { + lt_dlhandle cur; + lt_dltype_t *type = types; + const char *saved_error = last_error; + + /* check whether the module was already opened */ + cur = handles; + while (cur) { + if (!cur->filename && !filename) + break; + if (cur->filename && filename && + strcmp(cur->filename, filename) == 0) + break; + cur = cur->next; + } + if (cur) { + cur->usage++; + *handle = cur; + return 0; + } + + cur = *handle; + if (filename) { + cur->filename = strdup(filename); + if (!cur->filename) { + last_error = memory_error; + return 1; + } + } else + cur->filename = 0; + while (type) { + if (type->lib_open(cur, filename) == 0) + break; + type = type->next; + } + if (!type) { + if (cur->filename) + lt_dlfree(cur->filename); + return 1; + } + cur->type = type; + last_error = saved_error; + return 0; + } + + static int + find_module (handle, dir, libdir, dlname, old_name, installed) + lt_dlhandle *handle; + const char *dir; + const char *libdir; + const char *dlname; + const char *old_name; + int installed; + { + int error; + char *filename; + /* try to open the old library first; if it was dlpreopened, + we want the preopened version of it, even if a dlopenable + module is available */ + if (old_name && tryall_dlopen(handle, old_name) == 0) + return 0; + /* try to open the dynamic library */ + if (dlname) { + /* try to open the installed module */ + if (installed && libdir) { + filename = (char*) + lt_dlmalloc(strlen(libdir)+1+strlen(dlname)+1); + if (!filename) { + last_error = memory_error; + return 1; + } + strcpy(filename, libdir); + strcat(filename, "/"); + strcat(filename, dlname); + error = tryall_dlopen(handle, filename) == 0; + lt_dlfree(filename); + if (error) + return 0; + } + /* try to open the not-installed module */ + if (!installed) { + filename = (char*) + lt_dlmalloc((dir ? strlen(dir) : 0) + + strlen(objdir) + strlen(dlname) + 1); + if (!filename) { + last_error = memory_error; + return 1; + } + if (dir) + strcpy(filename, dir); + else + *filename = 0; + strcat(filename, objdir); + strcat(filename, dlname); + + error = tryall_dlopen(handle, filename) == 0; + lt_dlfree(filename); + if (error) + return 0; + } + /* hmm, maybe it was moved to another directory */ + { + filename = (char*) + lt_dlmalloc((dir ? strlen(dir) : 0) + + strlen(dlname) + 1); + if (dir) + strcpy(filename, dir); + else + *filename = 0; + strcat(filename, dlname); + error = tryall_dlopen(handle, filename) == 0; + lt_dlfree(filename); + if (error) + return 0; + } + } + last_error = file_not_found_error; + return 1; + } + + static lt_ptr_t + find_file (basename, search_path, pdir, handle) + const char *basename; + const char *search_path; + char **pdir; + lt_dlhandle *handle; + { + /* when handle != NULL search a library, otherwise a file */ + /* return NULL on failure, otherwise the file/handle */ + + char *filename = 0; + int filenamesize = 0; + const char *next = search_path; + int lenbase = strlen(basename); + + if (!next || !*next) { + last_error = file_not_found_error; + return 0; + } + while (next) { + int lendir; + const char *cur = next; + + next = strchr(cur, ':'); + if (!next) + next = cur + strlen(cur); + lendir = next - cur; + if (*next == ':') + ++next; + else + next = 0; + if (lendir == 0) + continue; + if (lendir + 1 + lenbase >= filenamesize) { + if (filename) + lt_dlfree(filename); + filenamesize = lendir + 1 + lenbase + 1; + filename = (char*) lt_dlmalloc(filenamesize); + if (!filename) { + last_error = memory_error; + return 0; + } + } + strncpy(filename, cur, lendir); + if (filename[lendir-1] != '/') + filename[lendir++] = '/'; + strcpy(filename+lendir, basename); + if (handle) { + if (tryall_dlopen(handle, filename) == 0) { + lt_dlfree(filename); + return (lt_ptr_t) handle; + } + } else { + FILE *file = fopen(filename, LTDL_READTEXT_MODE); + if (file) { + if (*pdir) + lt_dlfree(*pdir); + filename[lendir] = '\0'; + *pdir = strdup(filename); + if (!*pdir) { + /* We could have even avoided the + strdup, but there would be some + memory overhead. */ + *pdir = filename; + } else + lt_dlfree(filename); + return (lt_ptr_t) file; + } + } + } + if (filename) + lt_dlfree(filename); + last_error = file_not_found_error; + return 0; + } + + static int + load_deplibs(handle, deplibs) + lt_dlhandle handle; + const char *deplibs; + { + /* FIXME: load deplibs */ + handle->depcount = 0; + handle->deplibs = 0; + /* Just to silence gcc -Wall */ + deplibs = 0; + return 0; + } + + static int + unload_deplibs(handle) + lt_dlhandle handle; + { + /* FIXME: unload deplibs */ + /* Just to silence gcc -Wall */ + handle = 0; + return 0; + } + + static inline int + trim (dest, str) + char **dest; + const char *str; + { + /* remove the leading and trailing "'" from str + and store the result in dest */ + char *tmp; + char *end = strrchr(str, '\''); + int len = strlen(str); + + if (*dest) + lt_dlfree(*dest); + if (len > 3 && str[0] == '\'') { + tmp = (char*) lt_dlmalloc(end - str); + if (!tmp) { + last_error = memory_error; + return 1; + } + strncpy(tmp, &str[1], (end - str) - 1); + tmp[len-3] = '\0'; + *dest = tmp; + } else + *dest = 0; + return 0; + } + + static inline int + free_vars(dir, name, dlname, oldname, libdir, deplibs) + char *dir; + char *name; + char *dlname; + char *oldname; + char *libdir; + char *deplibs; + { + if (dir) + lt_dlfree(dir); + if (name) + lt_dlfree(name); + if (dlname) + lt_dlfree(dlname); + if (oldname) + lt_dlfree(oldname); + if (libdir) + lt_dlfree(libdir); + if (deplibs) + lt_dlfree(deplibs); + return 0; + } + + lt_dlhandle + lt_dlopen (filename) + const char *filename; + { + lt_dlhandle handle, newhandle; + const char *basename, *ext; + const char *saved_error = last_error; + char *dir = 0, *name = 0; + + if (!filename) { + handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t)); + if (!handle) { + last_error = memory_error; + return 0; + } + handle->usage = 0; + handle->depcount = 0; + handle->deplibs = 0; + newhandle = handle; + if (tryall_dlopen(&newhandle, 0) != 0) { + lt_dlfree(handle); + return 0; + } + goto register_handle; + } + basename = strrchr(filename, '/'); + if (basename) { + basename++; + dir = (char*) lt_dlmalloc(basename - filename + 1); + if (!dir) { + last_error = memory_error; + return 0; + } + strncpy(dir, filename, basename - filename); + dir[basename - filename] = '\0'; + } else + basename = filename; + /* check whether we open a libtool module (.la extension) */ + ext = strrchr(basename, '.'); + if (ext && strcmp(ext, ".la") == 0) { + /* this seems to be a libtool module */ + FILE *file; + int i; + char *dlname = 0, *old_name = 0; + char *libdir = 0, *deplibs = 0; + char *line; + int error = 0; + /* if we can't find the installed flag, it is probably an + installed libtool archive, produced with an old version + of libtool */ + int installed = 1; + + /* extract the module name from the file name */ + name = (char*) lt_dlmalloc(ext - basename + 1); + if (!name) { + last_error = memory_error; + if (dir) + lt_dlfree(dir); + return 0; + } + /* canonicalize the module name */ + for (i = 0; i < ext - basename; i++) + if (isalnum((int)(basename[i]))) + name[i] = basename[i]; + else + name[i] = '_'; + name[ext - basename] = '\0'; + /* now try to open the .la file */ + file = fopen(filename, LTDL_READTEXT_MODE); + if (!file) + last_error = file_not_found_error; + if (!file && !dir) { + /* try other directories */ + file = (FILE*) find_file(basename, + user_search_path, + &dir, 0); + if (!file) + file = (FILE*) find_file(basename, + getenv("LTDL_LIBRARY_PATH"), + &dir, 0); + #ifdef LTDL_SHLIBPATH_VAR + if (!file) + file = (FILE*) find_file(basename, + getenv(LTDL_SHLIBPATH_VAR), + &dir, 0); + #endif + } + if (!file) { + if (name) + lt_dlfree(name); + if (dir) + lt_dlfree(dir); + return 0; + } + line = (char*) lt_dlmalloc(LTDL_FILENAME_MAX); + if (!line) { + fclose(file); + last_error = memory_error; + return 0; + } + /* read the .la file */ + while (!feof(file)) { + if (!fgets(line, LTDL_FILENAME_MAX, file)) + break; + if (line[0] == '\n' || line[0] == '#') + continue; + # undef STR_DLNAME + # define STR_DLNAME "dlname=" + if (strncmp(line, STR_DLNAME, + sizeof(STR_DLNAME) - 1) == 0) + error = trim(&dlname, + &line[sizeof(STR_DLNAME) - 1]); + else + # undef STR_OLD_LIBRARY + # define STR_OLD_LIBRARY "old_library=" + if (strncmp(line, STR_OLD_LIBRARY, + sizeof(STR_OLD_LIBRARY) - 1) == 0) + error = trim(&old_name, + &line[sizeof(STR_OLD_LIBRARY) - 1]); + else + # undef STR_LIBDIR + # define STR_LIBDIR "libdir=" + if (strncmp(line, STR_LIBDIR, + sizeof(STR_LIBDIR) - 1) == 0) + error = trim(&libdir, + &line[sizeof(STR_LIBDIR) - 1]); + else + # undef STR_DL_DEPLIBS + # define STR_DL_DEPLIBS "dl_dependency_libs=" + if (strncmp(line, STR_DL_DEPLIBS, + sizeof(STR_DL_DEPLIBS) - 1) == 0) + error = trim(&deplibs, + &line[sizeof(STR_DL_DEPLIBS) - 1]); + else + if (strcmp(line, "installed=yes\n") == 0) + installed = 1; + else + if (strcmp(line, "installed=no\n") == 0) + installed = 0; + if (error) + break; + } + fclose(file); + lt_dlfree(line); + /* allocate the handle */ + handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t)); + if (!handle || error) { + if (handle) + lt_dlfree(handle); + if (!error) + last_error = memory_error; + free_vars(name, dir, dlname, old_name, libdir, deplibs); + return 0; + } + handle->usage = 0; + if (load_deplibs(handle, deplibs) == 0) { + newhandle = handle; + /* find_module may replace newhandle */ + if (find_module(&newhandle, dir, libdir, + dlname, old_name, installed)) { + unload_deplibs(handle); + error = 1; + } + } else + error = 1; + if (error) { + lt_dlfree(handle); + free_vars(name, dir, dlname, old_name, libdir, deplibs); + return 0; + } + if (handle != newhandle) { + unload_deplibs(handle); + } + } else { + /* not a libtool module */ + handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t)); + if (!handle) { + last_error = memory_error; + if (dir) + lt_dlfree(dir); + return 0; + } + handle->usage = 0; + /* non-libtool modules don't have dependencies */ + handle->depcount = 0; + handle->deplibs = 0; + newhandle = handle; + if (tryall_dlopen(&newhandle, filename) + && (!dir + || (!find_file(basename, user_search_path, + 0, &newhandle) + && !find_file(basename, + getenv("LTDL_LIBRARY_PATH"), + 0, &newhandle) + #ifdef LTDL_SHLIBPATH_VAR + && !find_file(basename, + getenv(LTDL_SHLIBPATH_VAR), + 0, &newhandle) + #endif + ))) { + lt_dlfree(handle); + if (dir) + lt_dlfree(dir); + return 0; + } + } + register_handle: + if (newhandle != handle) { + lt_dlfree(handle); + handle = newhandle; + } + if (!handle->usage) { + handle->usage = 1; + handle->name = name; + handle->next = handles; + handles = handle; + } else if (name) + lt_dlfree(name); + if (dir) + lt_dlfree(dir); + last_error = saved_error; + return handle; + } + + lt_dlhandle + lt_dlopenext (filename) + const char *filename; + { + lt_dlhandle handle; + char *tmp; + int len; + const char *saved_error = last_error; + + if (!filename) + return lt_dlopen(filename); + len = strlen(filename); + if (!len) { + last_error = file_not_found_error; + return 0; + } + /* try the normal file name */ + handle = lt_dlopen(filename); + if (handle) + return handle; + /* try "filename.la" */ + tmp = (char*) lt_dlmalloc(len+4); + if (!tmp) { + last_error = memory_error; + return 0; + } + strcpy(tmp, filename); + strcat(tmp, ".la"); + handle = lt_dlopen(tmp); + if (handle) { + last_error = saved_error; + lt_dlfree(tmp); + return handle; + } + #ifdef LTDL_SHLIB_EXT + /* try "filename.EXT" */ + if (strlen(shlib_ext) > 3) { + lt_dlfree(tmp); + tmp = (char*) lt_dlmalloc(len + strlen(shlib_ext) + 1); + if (!tmp) { + last_error = memory_error; + return 0; + } + strcpy(tmp, filename); + } else + tmp[len] = '\0'; + strcat(tmp, shlib_ext); + handle = lt_dlopen(tmp); + if (handle) { + last_error = saved_error; + lt_dlfree(tmp); + return handle; + } + #endif + last_error = file_not_found_error; + lt_dlfree(tmp); + return 0; + } + + int + lt_dlclose (handle) + lt_dlhandle handle; + { + lt_dlhandle cur, last; + + /* check whether the handle is valid */ + last = cur = handles; + while (cur && handle != cur) { + last = cur; + cur = cur->next; + } + if (!cur) { + last_error = invalid_handle_error; + return 1; + } + handle->usage--; + if (!handle->usage) { + int error; + + if (handle != handles) + last->next = handle->next; + else + handles = handle->next; + error = handle->type->lib_close(handle); + error += unload_deplibs(handle); + if (handle->filename) + lt_dlfree(handle->filename); + if (handle->name) + lt_dlfree(handle->name); + lt_dlfree(handle); + return error; + } + return 0; + } + + lt_ptr_t + lt_dlsym (handle, symbol) + lt_dlhandle handle; + const char *symbol; + { + int lensym; + char lsym[LTDL_SYMBOL_LENGTH]; + char *sym; + lt_ptr_t address; + + if (!handle) { + last_error = invalid_handle_error; + return 0; + } + if (!symbol) { + last_error = symbol_error; + return 0; + } + lensym = strlen(symbol); + if (handle->type->sym_prefix) + lensym += strlen(handle->type->sym_prefix); + if (handle->name) + lensym += strlen(handle->name); + if (lensym + LTDL_SYMBOL_OVERHEAD < LTDL_SYMBOL_LENGTH) + sym = lsym; + else + sym = (char*) lt_dlmalloc(lensym + LTDL_SYMBOL_OVERHEAD + 1); + if (!sym) { + last_error = buffer_overflow_error; + return 0; + } + if (handle->name) { + /* this is a libtool module */ + if (handle->type->sym_prefix) { + strcpy(sym, handle->type->sym_prefix); + strcat(sym, handle->name); + } else + strcpy(sym, handle->name); + strcat(sym, "_LTX_"); + strcat(sym, symbol); + /* try "modulename_LTX_symbol" */ + address = handle->type->find_sym(handle, sym); + if (address) { + if (sym != lsym) + lt_dlfree(sym); + return address; + } + } + /* otherwise try "symbol" */ + if (handle->type->sym_prefix) { + strcpy(sym, handle->type->sym_prefix); + strcat(sym, symbol); + } else + strcpy(sym, symbol); + address = handle->type->find_sym(handle, sym); + if (sym != lsym) + lt_dlfree(sym); + return address; + } + + const char * + lt_dlerror __P((void)) + { + const char *error = last_error; + + last_error = 0; + return error; + } + + int + lt_dladdsearchdir (search_dir) + const char *search_dir; + { + if (!search_dir || !strlen(search_dir)) + return 0; + if (!user_search_path) { + user_search_path = strdup(search_dir); + if (!user_search_path) { + last_error = memory_error; + return 1; + } + } else { + char *new_search_path = (char*) + lt_dlmalloc(strlen(user_search_path) + + strlen(search_dir) + 2); /* ':' + '\0' == 2 */ + if (!new_search_path) { + last_error = memory_error; + return 1; + } + strcpy(new_search_path, user_search_path); + strcat(new_search_path, ":"); + strcat(new_search_path, search_dir); + lt_dlfree(user_search_path); + user_search_path = new_search_path; + } + return 0; + } + + int + lt_dlsetsearchpath (search_path) + const char *search_path; + { + if (user_search_path) + lt_dlfree(user_search_path); + user_search_path = 0; /* reset the search path */ + if (!search_path || !strlen(search_path)) + return 0; + user_search_path = strdup(search_path); + if (!user_search_path) + return 1; + return 0; + } + + const char * + lt_dlgetsearchpath __P((void)) + { + return user_search_path; + } Index: libtool/libltdl/ltdl.h diff -c /dev/null libtool/libltdl/ltdl.h:1.19.2.1 *** /dev/null Thu Apr 29 16:20:23 1999 --- libtool/libltdl/ltdl.h Sat Mar 27 17:52:00 1999 *************** *** 0 **** --- 1,91 ---- + /* ltdl.h -- generic dlopen functions + Copyright (C) 1998-1999 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + As a special exception to the GNU Library General Public License, + if you distribute this file as part of a program that uses GNU libtool + to create libraries and programs, you may include it under the same + distribution terms that you use for the rest of that program. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + /* Only include this header file once. */ + #ifndef _LTDL_H_ + #define _LTDL_H_ 1 + + /* __BEGIN_DECLS should be used at the beginning of your declarations, + so that C++ compilers don't mangle their names. Use __END_DECLS at + the end of C declarations. */ + #undef __BEGIN_DECLS + #undef __END_DECLS + #ifdef __cplusplus + # define __BEGIN_DECLS extern "C" { + # define __END_DECLS } + #else + # define __BEGIN_DECLS /* empty */ + # define __END_DECLS /* empty */ + #endif + + /* __P is a macro used to wrap function prototypes, so that compilers + that don't understand ANSI C prototypes still work, and ANSI C + compilers can issue warnings about type mismatches. */ + #undef __P + #undef lt_ptr_t + #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) + # define __P(protos) protos + # define lt_ptr_t void* + #else + # define __P(protos) () + # define lt_ptr_t char* + #endif + + #include + + #ifdef _LTDL_COMPILE_ + typedef struct lt_dlhandle_t *lt_dlhandle; + #else + typedef lt_ptr_t lt_dlhandle; + #endif + + typedef struct { + const char *name; + lt_ptr_t address; + } lt_dlsymlist; + + __BEGIN_DECLS + extern int lt_dlinit __P((void)); + extern int lt_dlpreload __P((const lt_dlsymlist *preloaded)); + extern int lt_dlpreload_default __P((const lt_dlsymlist *preloaded)); + extern int lt_dlexit __P((void)); + extern lt_dlhandle lt_dlopen __P((const char *filename)); + extern lt_dlhandle lt_dlopenext __P((const char *filename)); + extern int lt_dlclose __P((lt_dlhandle handle)); + extern lt_ptr_t lt_dlsym __P((lt_dlhandle handle, const char *name)); + extern const char *lt_dlerror __P((void)); + extern int lt_dladdsearchdir __P((const char *search_dir)); + extern int lt_dlsetsearchpath __P((const char *search_path)); + extern const char *lt_dlgetsearchpath __P((void)); + + extern const lt_dlsymlist lt_preloaded_symbols[]; + #define LTDL_SET_PRELOADED_SYMBOLS() lt_dlpreload_default(lt_preloaded_symbols) + + extern lt_ptr_t (*lt_dlmalloc)__P((size_t size)); + extern void (*lt_dlfree)__P((lt_ptr_t ptr)); + + __END_DECLS + + #endif /* !_LTDL_H_ */ Index: libtool/mail/LTLIBOBJ diff -c /dev/null libtool/mail/LTLIBOBJ:1.3 *** /dev/null Thu Apr 29 16:20:55 1999 --- libtool/mail/LTLIBOBJ Mon Jan 25 12:41:52 1999 *************** *** 0 **** --- 1,221 ---- + From - Thu Jan 21 11:48:15 1999 + Return-Path: + Received: from punt-2.mail.demon.net by mailstore + for gvaughan@oranda.demon.co.uk id 916916500:20:05273:1; + Thu, 21 Jan 99 11:01:40 GMT + Received: from mescaline.gnu.org ([158.121.106.21]) by punt-2.mail.demon.net + id aa2109043; 21 Jan 99 11:01 GMT + Received: (from slist@localhost) + by mescaline.gnu.org (8.9.1a/8.9.1) id GAA22496 + for gvaughan@oranda.demon.co.uk; Thu, 21 Jan 1999 06:06:25 -0500 + Resent-Date: Thu, 21 Jan 1999 06:06:25 -0500 + Received: from hades.aethos.co.uk (router.aethos.co.uk [195.171.18.1] (may be forged)) + by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id GAA22431; + Thu, 21 Jan 1999 06:04:57 -0500 + Received: from [193.164.192.100] (helo=zeus.aethos.co.uk) + by hades.aethos.co.uk with esmtp (Exim 2.05 #1) + id 103HtW-000753-00; Thu, 21 Jan 1999 11:03:26 +0000 + Received: from oranda.demon.co.uk (samhain.aethos.co.uk [193.164.192.38]) by zeus.aethos.co.uk with ESMTP (8.7.1/8.7.1) id LAA16759; Thu, 21 Jan 1999 11:00:22 GMT + Message-ID: <36A70897.32F60E81@oranda.demon.co.uk> + Date: Thu, 21 Jan 1999 10:59:35 +0000 + From: "Gary V. Vaughan" + Organization: Aethos Communication Systems Ltd. + X-Mailer: Mozilla 4.5 [en] (WinNT; I) + X-Accept-Language: en + MIME-Version: 1.0 + To: Akim Demaille + CC: Alexandre Oliva , Erez Zadok , + bug-libtool@gnu.org, automake@gnu.org + Subject: Re: lazy question + References: <199901202104.QAA04372@shekel.mcl.cs.columbia.edu> + Content-Type: text/plain; charset=us-ascii + Content-Transfer-Encoding: 7bit + Resent-Message-ID: <"420Yv3.0.qU5.Ydmfs"@mescaline.gnu.org> + Resent-From: bug-libtool@gnu.org + X-Mailing-List: archive/latest/413 + X-Loop: bug-libtool@gnu.org + Precedence: list + Resent-Sender: bug-libtool-request@gnu.org + X-Mozilla-Status: 8011 + X-Mozilla-Status2: 00000000 + X-UIDL: oranda.916916500:20:05273:1 + + Akim Demaille wrote: + > + > >>>>> "Alexandre" == Alexandre Oliva writes: + > + > Alexandre> On Jan 20, 1999, Erez Zadok wrote: + > >> My application (am-utils) has this legacy stuff in my + > >> configure.in. I think I can safely take that out, now right? + > + > >> LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'` AC_SUBST(LTLIBOBJS) + > >> LTALLOCA=`echo "$ALLOCA" | sed 's/\.o/.lo/g'` AC_SUBST(LTALLOCA) + > + > Alexandre> Not really. It looks like automake provides LTLIBOBJS, + > Alexandre> but not LTALLOCA :-( + > + > Are you sure? I can't find the string LTLIBOBJS anywhere in the + > sources. + + It seems you are right. Nor can I find reference anywhere except in the + documentation of both libtool and automake. However, I stopped using + these variables a few months ago (just forgot to include them really), + and have suffered no ill effects. + + > Alexandre> Unless it does but it's not documented. + > + > Another related issue is that Automake does not include the little + > needed magic that enables ansi2knr on LIBOBJS files. In addition to + > all this, people who want ansi2knr to be run should also include + > something like: + > + > # This is necessary so that .o files in LIBOBJS are also built via + > # the ANSI2KNR-filtering rules. + > LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` + > + > (Stolen from Jim Meyering's fileutils's configure.in). + + Yes, that makes sense. Or rather, automake should do this for us if it + sees we are using ansi2knr. + + > Also, it seems that now we should not append just + > replacement-function.o, but replacement-function.${ac_objext}[1]. + > + > [1] What also mean that the above sed snippet should be adapted too. + + Agreed. + + > What is the real status of this? Since Automake reads these LIBOBJS + > extensions, if one solution is to be chosen, couldn't it issue + > warnings for non complying additions? + + In my experience, Tom is very good about applying patches he receives. + =)O| Hopefully, I am too. =)O| + + This probably needs to be fixed in all of auto{make,conf} and libtool + simultaneously. I don't have time to look at it right now, but I can + certainly add it to the libtool TODO if you are also busy. + + Cheers, + Gary. + + From - Thu Jan 21 11:56:34 1999 + Return-Path: + Received: from punt-2.mail.demon.net by mailstore + for gvaughan@oranda.demon.co.uk id 916919003:20:12487:14; + Thu, 21 Jan 99 11:43:23 GMT + Received: from mescaline.gnu.org ([158.121.106.21]) by punt-2.mail.demon.net + id aa2122944; 21 Jan 99 11:43 GMT + Received: (from slist@localhost) + by mescaline.gnu.org (8.9.1a/8.9.1) id GAA23386 + for gvaughan@oranda.demon.co.uk; Thu, 21 Jan 1999 06:48:04 -0500 + Resent-Date: Thu, 21 Jan 1999 06:48:04 -0500 + Received: from ulysse.enst.fr (IDENT:1JXdBQbWjss9NS0/0RdVLAS9IgzJi29E@inf.enst.fr [137.194.2.81]) + by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id GAA23306; + Thu, 21 Jan 1999 06:46:02 -0500 + Received: from quasimodo.enst.fr (quasimodo.enst.fr [137.194.160.2]) + by ulysse.enst.fr (8.8.8/8.8.8) with ESMTP id MAA06955; + Thu, 21 Jan 1999 12:40:28 +0100 (MET) + Received: (from demaille@localhost) + by quasimodo.enst.fr (8.8.8/8.8.8) id MAA29306; + Thu, 21 Jan 1999 12:40:26 +0100 (MET) + Sender: demaille@inf.enst.fr + To: "Gary V. Vaughan" + Cc: Alexandre Oliva , Erez Zadok , + bug-libtool@gnu.org, automake@gnu.org, autoconf@gnu.org + Subject: Re: lazy question + References: <199901202104.QAA04372@shekel.mcl.cs.columbia.edu> <36A70897.32F60E81@oranda.demon.co.uk> + Content-Type: text/plain; charset=US-ASCII + MIME-Version: 1.0 + From: Akim Demaille + Date: 21 Jan 1999 12:40:25 +0100 + In-Reply-To: "Gary V. Vaughan"'s message of "Thu, 21 Jan 1999 10:59:35 +0000" + Message-ID: + Lines: 34 + User-Agent: Gnus/5.070069 (Pterodactyl Gnus v0.69) XEmacs/21.2(beta8) (Artemis) + Resent-Message-ID: <"uGwfO1.0.gi5.2Enfs"@mescaline.gnu.org> + Resent-From: bug-libtool@gnu.org + X-Mailing-List: archive/latest/414 + X-Loop: bug-libtool@gnu.org + Precedence: list + Resent-Sender: bug-libtool-request@gnu.org + X-Mozilla-Status: 8011 + X-Mozilla-Status2: 00000000 + X-UIDL: oranda.916919003:20:12487:14 + + >>>>> "Gary" == Gary V Vaughan writes: + + >> What is the real status of this? Since Automake reads these + >> LIBOBJS extensions, if one solution is to be chosen, couldn't it + >> issue warnings for non complying additions? + + Gary> In my experience, Tom is very good about applying patches he + Gary> receives. =)O| Hopefully, I am too. =)O| + + :) + + Gary> This probably needs to be fixed in all of auto{make,conf} and + Gary> libtool simultaneously. I don't have time to look at it right + Gary> now, but I can certainly add it to the libtool TODO if you are + Gary> also busy. + + I might have a look, but it is sure safer to write it down somewhere :) + + Also, since this is getting more and more tricky, and since I don't + find it's real fun to write down + + LIBOBJS="$LIBOBJS blah.${ac_objext}" + + we could introduce in Autoconf a macro taking care of this, no? + Something like + + AC_LIBOBJS(blah) + + Akim + + -- + P-mail: Akim Demaille, 107 rue Bobillot, F-75013 Paris, France + E-mail: demaille@inf.enst.fr + V-mail: +33 1 45 81 78 81 + + Subject: Re: lazy question + Date: Mon, 25 Jan 1999 11:38:41 +0000 + From: "Gary V. Vaughan" + Organization: Aethos Communication Systems Ltd. + To: tromey@cygnus.com + CC: Akim Demaille , + Erez Zadok , bug-libtool@gnu.org, + automake@gnu.org, autoconf@gnu.org + + Tom Tromey wrote: + > + > >> AC_LIBOBJS(blah) + > + > Gary> Agreed. Also added to the archive. + > + > I'm suprised this isn't already there, since this subject has come up + > many times before. I'm sure I mentioned it to Gord more than once. + > + > Basically, I think the right solution is to add some new + > functionality to autoconf that would let a user defer a piece of code + > to be run just before AC_OUTPUT. Then the libtool macro would + > arrange to defer computation (and AC_SUBSTitution) of LTLIBOBJS and + > LTALLOCA until that time. + + That sounds like a good, general, solution to me. I'm adding this mail + to the libtool mail archive too =)O| + + > This probably isn't even that hard to do; I just haven't done it. I + > wonder if it is on Ben's to-do list? Or perhaps one of the libtool + > hackers could submit the patch? + + We are teetering on the edge of a 1.3 release, which must be compatible + with autoconf-2.13 and automake-1.4. After that, I will try to submit a + patch to Ben (stop me if you have this in your pending queue!). + + > In any case I don't think it is an automake problem per se. + + Agreed. + + Cheers, + Gary. Index: libtool/mail/amiga diff -c /dev/null libtool/mail/amiga:1.2 *** /dev/null Thu Apr 29 16:20:55 1999 --- libtool/mail/amiga Mon Nov 2 20:30:13 1998 *************** *** 0 **** --- 1,341 ---- + From nobody Sun Dec 14 10:48:09 1997 + X-From-Line: JoopvandeWege@mococo.nl Wed Dec 03 04:15:19 1997 + Return-Path: + Delivered-To: gord@trick.profitpress.com + Received: (qmail 1795 invoked from network); 3 Dec 1997 04:15:16 -0000 + Received: from localhost (HELO bambam.m-tech.ab.ca) (127.0.0.1) + by localhost with SMTP; 3 Dec 1997 04:15:16 -0000 + Received: from mcc-server.mococo.nl (mail.mococo.nl [195.193.4.2]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with SMTP id GAA28567 for ; Tue, 2 Dec 1997 06:06:47 -0700 + Received: from laptop.mococo.nl (unverified [195.193.4.9]) by mcc-server.mococo.nl + (EMWAC SMTPRS 0.83) with SMTP id ; + Tue, 02 Dec 1997 14:06:15 +0100 + Date: Tue, 02 Dec 1997 14:06:15 +0100 + Message-ID: + From: Joop van de Wege + To: Gordon Matzigkeit + Subject: Re: AmigaOS libtool port + In-Reply-To: <86oh339y7g.fsf@trick.profitpress.com> + References: <86oh339y7g.fsf@trick.profitpress.com> + MIME-Version: 1.0 + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 7bit + X-Mailer: Becky! ver 1.23 + Xref: trick.profitpress.com mail.libtool:816 + Lines: 177 + X-Gnus-Article-Number: 1 Mon Nov 2 17:16:02 1998 + + + + On 29 Nov 1997 14:39:31 -0700 + Gordon Matzigkeit wrote: + + > Hi! + > + > libtool-1.0g contains some preliminary AmigaOS support. It is a + > little different than the patches you sent me, simply because I + > modified libtool slightly so that it would better accomodate your + > changes. + > + > Here are what I consider to be some unresolved issues: + > + > * I have attempted to automatically generate $objdir/a2ixlibrary.data, + > just as the OS/2 port does with $objdir/$libname.def. It currently + > looks like this: + > + > #define NAME $libname + > #define LIBRARY_ID 1 + > #define VERSION $major + > #define REVISION $revision + > + > So, for libhello.la in the libtool distribution, this would make an + > a2ixlibrary.data that looks like: + > + > #define NAME libhello + > #define LIBRARY_ID 1 + > #define VERSION 2 + > #define REVISION 12 + > + > Is that alright? My concerns are for the NAME definition, and the + > LIBRARY_ID, as I don't know what is valid, or what they are used + > for. + I have done this also but removed it because there are indeed two + problem. The NAME should be 'hello' but this can be solved but the + second issue is not so easy. LIBRARY_ID is a uniquely assign number + which needs to be different for each .ixlibrary build. The developer of + the ixlibrary is maintaining a database of which numbers are assign to + which library. Everything below 10 can be used for locally build + libraries, thats why I used 1. + So it is specific to the Amiga but it looks like overkill to me to + include the whole list into Libtool (about 50 entries right now). + + > + > * What does `assign libs: SOMEDIR [add|remove]' do, exactly? Is it + > something like `ldconfig'? If so, then we should do something cleaner + > than in your current patch: it doesn't belong in archive_cmds or + > finish_cmds, it belongs in the generated executable wrapper. + Yes, it does something like ldconfig. I followed that thread about it + and its very similar but also has some differences. + LIBS: is a logical directory where all libraries are, but that doesn't + mean that they reside physically in the same directory on disk. + It is a way of telling the OS where to look when a program requests a + library, something along these lines: + main() + { + GfxBase=OpenLibrary("graphics.library",37L); + HelloBase=OpenLibrary("libhello.ixlibrary",3L); + } + + Graphics.library is in ROM and will just have its open count incremented + but nothing else will happen. libhello.ixlibrary is loaded from disk if + it isn't already in memory, but one needs to tell the system where to + load it from. It will look in SYS:libs (another logical device (normally + the boot partition ~= /usr ) containing a libs directory) but it is + possible to add directories to this logical assignment with 'assign', + like this: + assign SOMEDIR LIBS: add + or remove them like this: + assign SOMEDIR LIBS: remove + SOMEDIR is composed of DRIVE+DIRECTORY (absolute) or DIRECTORY + (relative) from where the assign is executed. + The reason I used the assignment was because 'make check' didn't work + correctly because libhello.ixlibrary is generated in .libs which is not + where 'hell' is started from. The system looks in the current directory + for .libraries but I'm not sure about .ixlibraries. The alternative was + to install them first before 'make check'. Bad idea. + The assignment is not placed into a config file or so. The next reboot + will destroy it, no ld.so.conf. + + Probably you're now more confused then ever :) + + + > * I suspect you don't know what I mean by `hardcoding' a library + > directory, so I've interpreted your patch, and come up with hardcode_* + > settings that I believe will work. We need to test that, during the + > next release. + I have already merged most things into lt-1.0h but I'm short on freetime + this week. I hope to have a couple of hours but it could be that I can + do only some work during the weekend. + + + > * Could you please tell me more about the AmigaOS requirements? Some + > of your patch is impossible for me to decipher, because I have no idea + > what you want to accomplish, and I don't think you're taking full + > advantage of libtool's internal conventions. + > + > In plain language, what are the answers to the following questions: + > + > * What exactly are `$libname_ixlibrary.a', `$libname.ixlibrary', and + > `$libname.a'? Is `$libname.a' the same file and installed in the same + > place when building static libraries? + Just in case I don't manage to make this clear. Have a look at the + readme of the following archive (and maybe the rest of it aswell: + ftp://ftp.ninemoons.com/pub/geekgadgets/971125/amiga-src/a2ixlibrary-2.0-src.tgz + (35Kb) + + Dynamic libraries on the Amiga (in short) + first compile all object with the following additional CFLAGS: + -resident32 -malways-restore-a4 (these are the safest, -resident and + -m...restore.. can also be use but then certain limitations and + restrictions are imposed) + AR and RANLIB these into libNAME.a (-->$libname.a) + run a2ixlibrary on libNAME.a --> $libname_ixlibrary.a and $libname.ixlibrary + where _ixlibrary.a contains stubs and .ixlibrary contains the real code. + (NAME.h and NAME.x are also generated and automatically installed by + a2ixlibrary and are used by collect2) + libNAME.a can be discarded after running a2ixlibrary. + libNAME_ixlibrary.a gets installed in /usr/lib together with all the + other linker libraries. + libNAME.ixlibrary should be installed somewhere in a directory belonging + to LIBS: There is a subdirectory in /gg where the gnu-tools are + installed called sys/libs which should be used for this, prevents + cluttering the main libs directories. + + Static libraries on the Amiga: + compile all objects with the CFLAGS of your choice + AR and RANLIB these into libNAME.a + install in /usr/lib + done. + + > + > * How are each of them generated? + > + > * Where do they need to be installed? + Answered above, I hope. + > + > * `shlibpath_var' is the name of the runtime library search path + > environment variable. On Linux, it is `LD_LIBRARY_PATH'. So, if you + > install libhello.so in /home/gord/lib, binaries won't be able to + > execute unless you set `LD_LIBRARY_PATH=/home/gord/lib' before running + > them. Is there an equivalent variable under AmigaOS? + Assign LIBS: home:gord/lib add + Nope, ':' is NOT a typo. The root directory is ':' on the amiga and + cd / means move up one level, cd : means move to root. + There is a unix emulation library, ixemul.library, which handles things + like cd .. and cd / when one is using programs linked against it. + Thats why almost, if not all gnu tools are available for the Amiga and + they also work like on Unix. These leads to difficulties when mixing + 'native' Amiga programs and ixemul.library linked ones. The path + differences are most prominent. + + Somewhere in my patches I use a native program 'assign' inside ksh. + Further I have the gnu-tools installed under the 'gg' directory and + reference them in ksh using /gg. + Libtool libraries end up in /gg/lib (libNAME_ixlibrary.a, libNAME.a) and + the dynamic library ends up in /gg/sys/libs (libNAME.ixlibrary) + The system finds these because of the following statement: + assign LIBS: gg:sys/libs add + But some people like to specify --prefix=/local when configuring + packages and they also want the dynamic library to appear under + /local/sys/libs and thats why I have the sed substitution in postinstall_cmds + (?). Those people are responsible that they have an assignment that + tells the system to look into the proper directory for .ixlibraries. + + > Thanks! + No thanks, hope this clears up a lot of things. If not, ask me and I'll + try to clarify things. + + Joop + + ---- + Joop van de Wege (JoopvandeWege@mail.mococo.nl) + Mobile Computing Consultants + +31 (0) 318 553292 + + From nobody Sun Dec 14 10:48:13 1997 + X-From-Line: JoopvandeWege@mococo.nl Sat Dec 13 03:05:34 1997 + Return-Path: + Delivered-To: gord@trick.profitpress.com + Received: (qmail 11049 invoked from network); 13 Dec 1997 03:05:32 -0000 + Received: from localhost (HELO bambam.m-tech.ab.ca) (127.0.0.1) + by localhost with SMTP; 13 Dec 1997 03:05:32 -0000 + Received: from mcc-server.mococo.nl (mail.mococo.nl [195.193.4.2]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with SMTP id GAA11738 for ; Fri, 12 Dec 1997 06:47:52 -0700 + Received: from laptop.mococo.nl (unverified [195.193.4.9]) by mcc-server.mococo.nl + (EMWAC SMTPRS 0.83) with SMTP id ; + Fri, 12 Dec 1997 14:48:06 +0100 + Date: Fri, 12 Dec 1997 14:48:06 +0100 + Message-ID: + From: Joop van de Wege + To: Gordon Matzigkeit + Cc: gg@ninemoons.com + Subject: Re: AmigaOS libtool port + In-Reply-To: <86zpm8qm6o.fsf@trick.profitpress.com> + References: <86zpm8qm6o.fsf@trick.profitpress.com> + MIME-Version: 1.0 + Content-Type: text/plain; charset=US-ASCII + Content-Transfer-Encoding: 7bit + X-Mailer: Becky! ver 1.23 + Xref: trick.profitpress.com mail.libtool:868 + Lines: 111 + X-Gnus-Article-Number: 2 Mon Nov 2 17:16:02 1998 + + + + On 11 Dec 1997 02:11:11 -0700 + Gordon Matzigkeit wrote: + + > Hi! + > + > >>>>> Joop van de Wege writes: + > + > >> Is that alright? My concerns are for the NAME definition, and the + > >> LIBRARY_ID, as I don't know what is valid, or what they are used + > >> for. + > + > JvdW> I have done this also but removed it because there are indeed + > JvdW> two problem. The NAME should be 'hello' but this can be solved + > JvdW> but the second issue is not so easy. LIBRARY_ID is a uniquely + > JvdW> assign number which needs to be different for each .ixlibrary + > JvdW> build. The developer of the ixlibrary is maintaining a database + > JvdW> of which numbers are assign to which library. Everything below + > JvdW> 10 can be used for locally build libraries, thats why I used 1. + > JvdW> So it is specific to the Amiga but it looks like overkill to me + > JvdW> to include the whole list into Libtool (about 50 entries right + > JvdW> now). + > + > I suggest that the ixlibrary maintainer come up with a hash function + > that will map library names to numbers, so that if the LIBRARY_ID is + > not specified, it will be automatically generated by this hash + > function. + > + > If two hashed library codes conflict, then libtool will still have to + > provide a way for maintainers to specify the correct LIBRARY_ID. + > + > However, the current design of ixlibrary is not good because it means + > installing two libtool libraries will *always* cause a conflict, + > unless both package maintainers cared enough to be assigned a + > LIBRARY_ID. + The current situation is that all packages on ftp.ninemoons.com are + under CVS (amiga specific code added) and that for each snapshot Amiga + specific patches are applied to the baseline sources, whether they + originate from FSF or someplace else doesn't matter. + This means that for each library which can be turned into a *.ixlibrary + an a2ixlibrary.data{.in} exists. + + It would be nice if the LIBRARY_ID's could be maintained in one location + and that location being libtool. On the other hand lots of people might + have objections against such a special treatment to the Amiga. + It might mean a lot of code just to support on platform. + + > + > When I accepted the patches for the AmigaOS shared libraries, I was + > not aware of this limitation. You are basically telling me that there + > is no way for me to automatically generate correct shared libraries on + > AmigaOS. + No, unless I start digging into the a2ixlibrary source to see if I can + find a way to automate things. The problem is in the fact that the ID is + hardcoded into the library (like paths on some other platforms) and the + ID must be unique, making distribution of binaries almost impossible. + + + > Unless this issue can be resolved, I think I should remove the AmigaOS + > support, because it will cause more problems than it solves. Shared + > libraries, IMO, are not worth the time and effort of every maintainer + > having to register with the AmigaOS ixlibrary project. + Libtool can still be a package useful for the Amiga but it will get the + same treatment as all others, keep a baseline and apply patches when + needed. + + > + > JvdW> Somewhere in my patches I use a native program 'assign' inside + > JvdW> ksh. Further I have the gnu-tools installed under the 'gg' + > JvdW> directory and reference them in ksh using /gg. Libtool + > JvdW> libraries end up in /gg/lib (libNAME_ixlibrary.a, libNAME.a) + > JvdW> and the dynamic library ends up in /gg/sys/libs + > JvdW> (libNAME.ixlibrary) + > + > JvdW> But some + > JvdW> people like to specify --prefix=/local when configuring + > JvdW> packages and they also want the dynamic library to appear under + > JvdW> /local/sys/libs and thats why I have the sed substitution in + > JvdW> postinstall_cmds (?). Those people are responsible that they + > JvdW> have an assignment that tells the system to look into the + > JvdW> proper directory for .ixlibraries. + > + > This is a problem. Why do dynamic libraries have to go into a + > separate directory? + This way it doesn't clutter a directory where no executables belong in. + It is also historical and because the Amiga isn't a real Unix machine. + It uses ixemul.library for its unix emulation, something like cygwin32.dll + + > sys/libs sounds like a violation of the GNU directory conventions, + > which is a problem. It means that even GNU packages will not install + > binaries according to their own conventions. :( + > + > It seems to me to be much better if we just put everything into + > libdir. Can this work? + Yes, it can. + + I'll forward this reply to some relevant Amiga mailinglists to see if + people are willing to change things. + + Joop + + PS: + Please comment on this, Fred, Hans? + + ---- + + Joop van de Wege (JoopvandeWege@mail.mococo.nl) + Mobile Computing Consultants + +31 (0) 318 553292 + Index: libtool/mail/c++ diff -c /dev/null libtool/mail/c++:1.4 *** /dev/null Thu Apr 29 16:20:55 1999 --- libtool/mail/c++ Wed Dec 9 08:50:08 1998 *************** *** 0 **** --- 1,470 ---- + From nobody Tue Oct 7 19:29:17 1997 + X-From-Line: gord@gnu.org Wed Oct 08 00:03:13 1997 + Return-Path: + Delivered-To: gord@trick.profitpress.com + Received: (qmail 13926 invoked from network); 8 Oct 1997 00:03:12 -0000 + Received: from localhost (HELO bambam.m-tech.ab.ca) (127.0.0.1) + by localhost with SMTP; 8 Oct 1997 00:03:12 -0000 + X-POP3-Rcpt: gord@bambam + Received: from mescaline.gnu.org (root@mescaline.gnu.org [158.121.106.21]) by m-tech.ab.ca (8.6.12/8.6.9) with ESMTP id LAA01054 for ; Tue, 7 Oct 1997 11:58:02 -0600 + Received: from listserv.ucalgary.ca by mescaline.gnu.org (8.8.5/8.6.12GNU) with SMTP id NAA18464 for ; Tue, 7 Oct 1997 13:53:36 -0400 + Received: from ts3-port-52.acs.ucalgary.ca by listserv.ucalgary.ca (AIX 3.2/UCB 5.64/4.03) + id AA15145; Tue, 7 Oct 1997 11:53:10 -0600 + Received: (qmail 11153 invoked by uid 1001); 7 Oct 1997 17:52:59 -0000 + Sender: gord@trick.profitpress.com + To: Akim Demaille + Cc: bug-libtool@gnu.org + Subject: Re: Shared libs before installation + References: + X-Attribution: Gord + Mime-Version: 1.0 (generated by tm-edit 7.92) + Content-Type: text/plain; charset=US-ASCII + From: Gordon Matzigkeit + Date: 07 Oct 1997 11:52:59 -0600 + In-Reply-To: Akim Demaille's message of 26 Sep 1997 14:28:51 +0200 + Message-Id: <86201xcves.fsf@trick.profitpress.com> + X-Mailer: Gnus v5.4.42/Emacs 19.34 + Xref: trick.profitpress.com mail.libtool:570 + Lines: 41 + X-Gnus-Article-Number: 4 Mon Nov 2 17:16:26 1998 + + Hi! + + >>>>> Akim Demaille writes: + + AD> We once talked about this, but let's do it again :) + + Okay! ;) + + AD> I know this is the kind of things version numbers should + AD> solve. Nevertheless, to avoid having quickly too big a version + AD> number, the version should be set right before a _public_ + AD> distribution (correct?). Not when sharing with + AD> testers/maintainers. + + AD> But then they are most likely to link with an old installed + AD> version of the .so, failing to compile correctly. + + Actually, you may consider having *huge* version numbers for testers, + and using tiny ones for public releases. + + For testing releases use a major version corresponding with the + current date: -version-info 19971007 + + Then for the public release, figure out what has actually changed + since last time: -version-info 3:0:1 + + The huge test release major numbers will guarantee that every new test + release will require relinking, but the public versions will be + smarter and possibly backwards-compatible. + + AD> I am no system guy, so I may say stupid things :) + + Nothing stupid. These are legitimate questions that I will have to + answer eventually in the documentation. + + Thanks for your questions, + + -- + Gord Matzigkeit | Proudly running pieces of the GNU operating system. + gord@m-tech.ab.ca | Jacques Cousteau loved programming in assembler. + + From nobody Wed Oct 15 00:04:31 1997 + X-From-Line: coolo@itm.mu-luebeck.de Wed Oct 15 00:11:44 1997 + Return-Path: + Delivered-To: gord@trick.profitpress.com + Received: (qmail 4396 invoked from network); 15 Oct 1997 00:11:42 -0000 + Received: from localhost (HELO bambam.m-tech.ab.ca) (127.0.0.1) + by localhost with SMTP; 15 Oct 1997 00:11:42 -0000 + X-POP3-Rcpt: gord@bambam + Received: from itm.mu-luebeck.de (wotan.itm.mu-luebeck.de [141.83.21.121]) by m-tech.ab.ca (8.6.12/8.6.9) with ESMTP id MAA12037 for ; Tue, 14 Oct 1997 12:59:53 -0600 + Received: from buri.itm.mu-luebeck.de (coolo@buri [141.83.21.130]) by itm.mu-luebeck.de (8.8.7/8.7.1) with ESMTP id UAA12900 for ; Tue, 14 Oct 1997 20:54:08 +0200 (MET DST) + From: Stephan Kulow + Received: (from coolo@localhost) + by buri.itm.mu-luebeck.de (8.8.4/8.8.4) + id UAA01692 for gord@m-tech.ab.ca; Tue, 14 Oct 1997 20:55:19 +0200 + Message-Id: <199710141855.UAA01692@buri.itm.mu-luebeck.de> + Subject: Re: dlopen [was: libs dependencies] + To: gord@m-tech.ab.ca (Gordon Matzigkeit) + Date: Tue, 14 Oct 1997 20:55:19 +0200 (MET DST) + In-Reply-To: <86wwjg1av8.fsf@trick.profitpress.com> from "Gordon Matzigkeit" at Oct 14, 97 12:02:35 pm + Content-Type: text + Xref: trick.profitpress.com mail.libtool:589 + Lines: 89 + X-Gnus-Article-Number: 5 Mon Nov 2 17:16:26 1998 + + > + > Hi! + > + > >>>>> Stephan Kulow writes: + > + > I think we've adequately discussed your library dependencies, but I + > wanted to comment on the dlopen support that you mention below: + > + > SK> BTW: I made some efforts to use the dlopen support in libtool. I + > SK> think, it works the way I tried it. I link staticly, if dlfcn.h + > SK> or libdl is not supported. For this I patched libtool.m4 to + > SK> support this. I had to remove the --enable-shared/static options + > SK> and replaced it with --disable-dlopen option, since it looks + > SK> somewhat strange, if you have --enable-shared in a package, where + > SK> you do not expect libs. + > + > Yes, you are right. When I fully support dlopen emulation, I will + > need to make a configure flag that can turn things on and off. + > + > SK> We create a binary, that loads libraries, that contain C++ + > SK> classes derived from a specific class. So, it's not necessary, + > SK> that the binary knows, which "applets" are there while compile + > SK> time. + > + > Okay, this makes sense. This is why I generate the `symbol file' when + > -export-dynamic is given, which contains a list of symbols mapped to + > pointers in a C source file. + > + > Your solution is acceptable, and if it works for your application, + > congratulations! As I've said before, my eventual solution will be + > generic and application-independent: I will write a true dlopen + > implementation that uses a libtool `symbol file' to resolve pointers + > rather than dynamic loading of code. + > + > The C++ portion of this will need to understand name mangling, which + > is probably why you chose the easier way, of making your dlopening + > application-specific. + You say, you will write code? I tried to imagine a solution without + new code, but I failed. So you write a new linker or just a library, + that I can use in my own code? + > + > SK> This is somewhat a problem and I don't know a solution, how to + > SK> solve this. So, I added a header file, that contains all + > SK> currently known modules and this is only used, if no dlopen is + > SK> available. + > + > Okay, I think I understand. You are saying that when dlopen is not + > available, you emulate it by knowing in advance which modules have + > been linked into the executable (SANE calls this `preloading'), and + > changing your application to refer to specific C++ modules. + Yes. I have to know while compilation time of the binary, which libraries + get linked. + > + > As I've said above, when I release DLD 4.0 I'll let you know, but + > until then, your application-specific preloading is acceptable, and + > the Right Thing To Do. + Thanks, it's a pleasure to hear such comments ;) + > + > SK> Thanks for writing libtool, Stephan + > + > My pleasure! Thanks for using it, :) + BTW: Perhaps you remember, I once contacted you because of some problems + with C++ and static objects in shared libs. I found out (or read in a + news group), that most compilers on such plattforms do some magic before + calling the linker. So, what libtool have to do to support such plattforms + (Solaris, FreeBSD and perhaps some more), is to call the compiler and not + the linker to create C++ shared libs. + CC (under Solaris) has the same options then the linker, but should create + correct libraries. + Currently I set CC to CXX before I run AM_PROG_LIBTOOL to let libtool + find the correct linker options for the C++ compiler instead of the C + compiler. + + I just wanted to let you know, what I found out. I thought about patching + libtool to have better support for C++, but this would mean some drastic + changes, so I left it up to you ;) + + Greets, Stephan + + -- + Stephan Kulow (coolo@kde.org) + Student of medical CS + Medical University of Luebeck + + GCS/M/MD d-x s++: a-- C+++$ ULS+++ P--- L++ E W- N- o? K--? w + !O-- !M !V PS++ !PE Y PGP++ t+ 5 X+ !R tv+ b+ DI? D- G e+>$ + h--(++) r y + + + From nobody Thu Aug 20 09:31:03 1998 + X-From-Line: gord@gnu.org Wed Aug 05 11:02:23 1998 + Return-Path: + Delivered-To: gord@trick.fig.org + Received: (qmail 6829 invoked from network); 5 Aug 1998 11:02:23 -0000 + Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34) + by cs366707-a.cgmo1.ab.wave.home.com with SMTP; 5 Aug 1998 11:02:23 -0000 + Received: from mescaline.gnu.org (gateway [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id EAA09526 for ; Wed, 5 Aug 1998 04:59:58 -0600 + Received: from uranus.ubs.com by mescaline.gnu.org (8.8.5/8.6.12GNU) with ESMTP id HAA22473 for ; Wed, 5 Aug 1998 07:00:29 -0400 + From: alois.camenzind@ubs.com + Received: by uranus.ubs.com; id MAA10838; Wed, 5 Aug 1998 12:56:10 +0200 (MET DST) + Received: from (svscan [192.168.85.11]) by uranus via smap (V2.1) + id xma010753; Wed, 5 Aug 98 12:55:53 +0200 + Received: from localhost by svscan.ubinet.ubs.com (SMI-8.6/SMI-SVR4) + id MAA01005; Wed, 5 Aug 1998 12:58:25 +0200 + Received: from localhost (root@localhost) + by svcastor.flur.zuerich.ubs.ch (8.8.6 (PHNE_12836)/8.8.6) with SMTP id MAA21146 + for bug-libtool@gnu.org; Wed, 5 Aug 1998 12:58:23 +0200 (METDST) + X-OpenMail-Hops: 2 + Date: Wed, 5 Aug 1998 12:58:13 +0200 + Message-Id: <5499F13A@MHS> + Subject: libtool bug/problem + MIME-Version: 1.0 + TO: bug-libtool@gnu.org + Content-Type: multipart/mixed; boundary="MimeMultipartBoundary" + Xref: trick.fig.org libtool:1548 + Lines: 171 + X-Gnus-Article-Number: 6 Mon Nov 2 17:16:26 1998 + + --MimeMultipartBoundary + Content-Type: text/plain; charset=US-ASCII; name="PUBLIC:" + Content-Disposition: inline; filename="PUBLIC:" + Content-Transfer-Encoding: 7bit + + Hi + + I'd like to use libtool (ltmain.sh (GNU libtool) 1.2 togheter with the SUN C++ + compiler (CC: WorkShop Compilers 4.2 30 Oct 1996 C++ 4.2) on Solaris 5.5.1. + + Everything works good except if I'm trying to use C++ templates in my code and + put this in a shared library. The linker is afterwards always complaining + about missing references. The problem occurs because libtool renames + the object + files from xxx.o to xxx.lo. The SUN C++ compiler builds for himself a + Template.DB + and this somehow doens't match anymore with the object file. + + Have you ever heard of this problem and do you eventually allready have + a solution? + + I search in Deja News but couldn't find anything. + A solution I could think of would be to rename the xxx.lo file back to + xxx.o before + the linking phase. + + Thanks for any hints. + + ciao + Alois + + --MimeMultipartBoundary-- + From nobody Wed Oct 14 17:08:59 1998 + X-From-Line: gord@mescaline.gnu.org Mon Oct 05 20:10:38 1998 + Return-Path: + Delivered-To: gord@trick.fig.org + Received: (qmail 2026 invoked from network); 5 Oct 1998 20:10:30 -0000 + Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34) + by ip223.net247210.cr.sk.ca with SMTP; 5 Oct 1998 20:10:30 -0000 + Received: from mescaline.gnu.org (gateway [10.0.0.1]) + by bambam.m-tech.ab.ca (8.8.7/8.8.7) with ESMTP id OAA31749 + for ; Mon, 5 Oct 1998 14:13:57 -0600 + Received: from proxy.grad.kiev.ua (grad-UTC-28k8.ukrtel.net [195.5.25.54]) + by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id PAA26247 + for ; Mon, 5 Oct 1998 15:57:59 -0400 + Received: from Shevchenko.Kiev.UA (cam [10.0.0.50]) + by proxy.grad.kiev.ua (8.8.8/8.8.7) with ESMTP id WAA07178 + for ; Mon, 5 Oct 1998 22:56:50 +0300 (EEST) + (envelope-from Ruslan@Shevchenko.Kiev.UA) + Sender: rssh@proxy.grad.kiev.ua + Message-ID: <3619242C.C441DA29@Shevchenko.Kiev.UA> + Date: Mon, 05 Oct 1998 22:55:24 +0300 + From: Ruslan Shevchenko + Reply-To: rssh@grad.kiev.ua + X-Mailer: Mozilla 4.05 [en] (X11; I; FreeBSD 2.2.5-STABLE i386) + MIME-Version: 1.0 + To: bug-libtool@gnu.org + Subject: C++ libs on Solaris 2.6 with Sun CC 4.2 + Content-Type: multipart/mixed; boundary="------------48AE685394F01B5105112CF0" + Lines: 109 + Xref: trick.fig.org libtool:1646 + + This is a multi-part message in MIME format. + --------------48AE685394F01B5105112CF0 + Content-Type: text/plain; charset=us-ascii + Content-Transfer-Encoding: 7bit + + envirowment: + + uname -a: + + SunOS satory 5.6 Generic_105181-06 sun4u sparc SUNW,Ultra-4 + + Sun CC 4.1 + + libtool 1.2 + + Problem: + + building of shared libraries not supported. + (output of simple conffigure is attached.) + + and in reality, the process of linking CC library is different, + becouse generation of templates can be doing on stage of linking. + + In general, command for linking is + CC -xar -o$(LIBNAME) $(CXXFLAGS) $(OBJECTS) + + If anybody will tell me, from what I must begin, I will help to + add such support. + + Thanks. + + + -- + @= + //RSSH + mailto:Ruslan@Shevchenko.Kiev.UA + + CORBA in Ukraine & ex-USSR: http://www.corbadev.kiev.ua + --------------48AE685394F01B5105112CF0 + Content-Type: text/plain; charset=us-ascii; name="errs" + Content-Transfer-Encoding: 7bit + Content-Disposition: inline; filename="errs" + + creating cache ./config.cache + checking host system type... sparc-sun-solaris2.6 + checking target system type... sparc-sun-solaris2.6 + checking build system type... sparc-sun-solaris2.6 + checking for a BSD compatible install... config/install-sh -c + checking whether build environment is sane... yes + checking whether make sets ${MAKE}... yes + checking for working aclocal... found + checking for working autoconf... found + checking for working automake... found + checking for working autoheader... found + checking for working makeinfo... missing + checking for c++... no + checking for g++... no + checking for gcc... no + checking for CC... CC + checking whether the C++ compiler (CC ) works... yes + checking whether the C++ compiler (CC ) is a cross-compiler... no + checking whether we are using GNU C++... no + checking how to run the C++ preprocessor... CC -E + checking for ranlib... ranlib + checking for gcc... no + checking for cc... cc + checking whether the C compiler (cc ) works... yes + checking whether the C compiler (cc ) is a cross-compiler... no + checking whether we are using GNU C... no + checking for non-GNU ld... /usr/ucb/ld + checking if the linker (/usr/ucb/ld) is GNU ld... no + checking for BSD-compatible nm... /usr/ccs/bin/nm -p + checking whether ln -s works... yes + checking whether we are using GNU C... no + checking for cc option to produce PIC... -KPIC + checking if cc PIC flag -KPIC works... no + checking if cc static flag -Bstatic works... -Bstatic + checking if the linker (/usr/ucb/ld) is GNU ld... no + checking whether the linker (/usr/ucb/ld) supports shared libraries... yes + checking command to parse /usr/ccs/bin/nm -p output... yes + checking how to hardcode library paths into programs... immediate + checking for /usr/ucb/ld option to reload object files... -r + checking dynamic linker characteristics... solaris2.6 ld.so + checking if libtool supports shared libraries... no + checking whether to build shared libraries... no + checking whether to build static libraries... yes + checking for objdir... .libs + creating libtool + checking for a BSD compatible install... config/install-sh -c + CPPFLAGS= -I/usr/local/include + checking for OB/CORBA.h... yes + + checking for JTC/JTC.h... yes + checking for OB/CosNaming.h... yes + checking for nanosleep in -lposix4... yes + solaris2.6 + checking for socket in -lsocket... yes + updating cache ./config.cache + creating ./config.status + creating Makefile + creating src/Makefile + creating include/Makefile + creating tests/Makefile + creating tests/naming/Makefile + creating include/SyntaxShugarConfig.h + include/SyntaxShugarConfig.h is unchanged + + --------------48AE685394F01B5105112CF0-- + + From nobody Wed Oct 14 17:11:47 1998 + X-From-Line: gord@mescaline.gnu.org Tue Oct 13 18:11:55 1998 + Return-Path: + Delivered-To: gord@trick.fig.org + Received: (qmail 694 invoked from network); 13 Oct 1998 18:11:25 -0000 + Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34) + by ip223.net247210.cr.sk.ca with SMTP; 13 Oct 1998 18:11:25 -0000 + Received: from mescaline.gnu.org (gateway [10.0.0.1]) + by bambam.m-tech.ab.ca (8.8.7/8.8.7) with ESMTP id MAA30151 + for ; Tue, 13 Oct 1998 12:14:55 -0600 + Received: from proxy.grad.kiev.ua (grad-UTC-28k8.ukrtel.net [195.5.25.54]) + by m+ hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + --- 746,758 ---- + + aix4*) + allow_undefined_flag=unsupported + ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR $ARFLAGS $lib $objdir/$soname' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + + amigaos*) + ! archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR $ARFLAGS $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + Common subdirectories: libtool-1.2/tests and libtool-1.2-patched/tests + + --------------E06156B73BE5D4D4AD2BF900-- + + From nobody Wed Oct 14 16:56:33 1998 + X-From-Line: gord@gnu.org Thu Aug 06 20:23:55 1998 + Return-Path: + Delivered-To: gord@trick.fig.org + Received: (qmail 1251 invoked from network); 6 Aug 1998 20:23:54 -0000 + Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34) + by cs366707-a.cgmo1.ab.wave.home.com with SMTP; 6 Aug 1998 20:23:54 -0000 + Received: from mescaline.gnu.org (gateway [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id OAA21853 for ; Thu, 6 Aug 1998 14:21:27 -0600 + Received: from juliet.wcom.com by mescaline.gnu.org (8.8.5/8.6.12GNU) with SMTP id QAA20365 for ; Thu, 6 Aug 1998 16:21:44 -0400 + Received: from moloko.wcom.com by juliet with ESMTP; Thu, 6 Aug 1998 15:17:19 -0500 + Received: from pinebilly.wcom.com (pinebilly.wcom.com [159.98.206.11]) by moloko.wcom.com (8.8.8/8.8.8) + with SMTP id PAA27920 for ; Thu, 6 Aug 1998 15:17:18 -0500 (CDT) + X-Report-Problems-With-Moloko-To: brandon.black@wcom.com + X-If-you-can-read-this-you-are-too-close: :) + Date: Thu, 6 Aug 1998 15:17:11 -0500 (CDT) + From: Ron Romero + Sender: rdromero@pinebilly.wcom.com + Reply-To: ron.romero@wcom.com + To: bug-libtool@gnu.org + Subject: libtool Doesn't Export C++ Methods on AIX + Message-ID: + MIME-Version: 1.0 + Content-Type: TEXT/PLAIN; charset=US-ASCII + Xref: araguaia.dcc.unicamp.br libtool-cxx:8 + Lines: 26 + X-Gnus-Article-Number: 8 Wed Nov 4 08:08:35 1998 + + I'm trying to use libtool with C++ programs, and found that libtool + wouldn't put any C++ methods into the shared library. When I looked + into it, I found that the nm command used to create the export list + doesn't pass a -C flag. On AIX, the -C flag says to leave C++ names + mangled. Since the function names weren't mangled, the sed line + didn't recognize them as functions, so they weren't put into the .exp + file. I found that I could fix the problem by adding a -C flag to + ac_cv_path_NM in config.guess. I suppose the configure script should + check for that and do it automatically. + + I'm running libtool version 1.2 on an AIX 4.2 box + (powerpc-ibm-aix4.2.1.0). + + I have some test files that I can give to anyone who wants to test + this. And I can test potential fixes on my machine. + + + Thank you, + + Ron Romero + ron.romero@wcom.com + Object Developer + WorldCom, Inc. + + + Index: libtool/mail/cygwin32 diff -c /dev/null libtool/mail/cygwin32:1.4 *** /dev/null Thu Apr 29 16:20:55 1999 --- libtool/mail/cygwin32 Wed Nov 4 11:15:05 1998 *************** *** 0 **** --- 1,95 ---- + From ian@cygnus.com Tue Nov 3 23:23 EDT 1998 + Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8]) + by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id XAA22373 + for ; Tue, 3 Nov 1998 23:23:22 -0200 (EDT) + Received: from tweedledumb.cygnus.com (tweedledumb.cygnus.com [192.80.44.1]) + by grande.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id XAA20164 + for ; Tue, 3 Nov 1998 23:23:18 -0200 (EDT) + Received: from subrogation.cygnus.com (subrogation.cygnus.com [192.80.44.76]) + by tweedledumb.cygnus.com (8.8.5/8.8.5) with ESMTP id UAA13699; + Tue, 3 Nov 1998 20:25:28 -0500 (EST) + Received: (ian@localhost) by subrogation.cygnus.com (950413.SGI.8.6.12/8.6.4) id UAA01678; Tue, 3 Nov 1998 20:25:28 -0500 + Date: Tue, 3 Nov 1998 20:25:28 -0500 + Message-Id: <199811040125.UAA01678@subrogation.cygnus.com> + From: Ian Lance Taylor + To: gvaughan@oranda.demon.co.uk + CC: tanner@gmx.de, oliva@dcc.unicamp.br, gord@trick.fig.org, + bug-libtool@gnu.org + In-reply-to: <363F3F85.2B31574@oranda.demon.co.uk> + (gvaughan@oranda.demon.co.uk) + Subject: Re: Inter-library dependencies in libtool + Content-Type: text + X-Content-Length: 3237 + Xref: araguaia.dcc.unicamp.br libtool-cygwin32:2 + Lines: 69 + X-Gnus-Article-Number: 2 Wed Nov 4 01:39:12 1998 + + Date: Tue, 03 Nov 1998 17:38:13 +0000 + From: "Gary V. Vaughan" + + It would seem that the dll code has bitrotted =(O| Pity. Ian, do you + have time/want to fix this, or do you want to pass the torch on? + + I no longer have access to a Windows machine, nor do I have all that + much interest in the problem, so I'd say that somebody else had better + pick up the torch. + + Incidentally, I believe that DJ Delorie is working on adding DLL + support directly to ld, which will mean that dlltool is no longer + required, and should make it possible to greatly simplify the win32 + hacks in dlltool, perhaps even simply using the standard GNU ld code. + + Shouldn't libtool notice that it is running on cygwin32 and pass the + -no-undefined option by itself? It seems to go against the raison + d'etre for libtool to force the Makefile developer to figure this out... + + This kind of goes to the heart of libtool. libtool wants to present a + particular interface for using shared libraries. In order to do this, + it assumes that the system supports certain capabilities. One of + those is that the system can support undefined symbols in shared + libraries. + + That means that on systems which do not permit shared libraries to + have undefined symbols--AIX and Windows--libtool doesn't really work. + + The --no-undefined option is a hack which tells libtool that the + shared library has special characteristics which permit libtool to + create a shared library on AIX or Windows, or any other supported + platform. + + I think the general idea is that you should use the --no-undefined + option whenever possible. If you do, you will be able to create + shared libraries on AIX and Windows. If you do not or can not, you + will not be able to create them. + + libtool should not add a --no-undefined option itself. If it used + that option inappropriately, then building the shared library would + fail. Instead, libtool users should always use --no-undefined if they + can. + + Of course, there are problems. For example, in the GNU binutils, I + can arrange matters such that --no-undefined will work on Windows, but + to do so I have to link various libraries together and I have to link + against special Windows system libraries. So I do that, which means + that I have to change the options I pass to libtool based on the + system. + + In other words, the interface which libtool presents is deficient. It + does not successfully hide the system on which it is running, and it + forces the code which calls libtool to make adjustments. + + I doubt there is any wholly acceptable solution here. The only + workable one I can see would be to effectively enhance Windows and AIX + shared libraries such that they support creating shared libraries with + undefined symbols. On Windows, this could be done by doing the link + once, checking for undefined symbols, creating little stub routines + for those symbols which track down the symbols in some other open DLL, + compiling those stubs, and linking them into the DLL. Perhaps + something similar is possible on AIX. + + Of course even that will not make Windows DLLs identical to ELF shared + libraries. ELF shared libraries permit the main program to override a + symbol in the shared library, and Windows DLLs do not. + + Ian + Index: libtool/mail/deplibs diff -c /dev/null libtool/mail/deplibs:1.5 *** /dev/null Thu Apr 29 16:20:56 1999 --- libtool/mail/deplibs Sat Nov 21 07:40:20 1998 *************** *** 0 **** --- 1,610 ---- + From nobody Wed Oct 14 16:45:01 1998 + X-From-Line: ian@cygnus.com Fri Apr 17 23:33:18 1998 + Return-Path: + Delivered-To: gord@trick.profitpress.com + Received: (qmail 23427 invoked from network); 17 Apr 1998 23:33:17 -0000 + Received: from unknown (HELO bambam.m-tech.ab.ca) (127.0.0.1) + by 127.0.0.1 with SMTP; 17 Apr 1998 23:33:17 -0000 + Received: from tweedledumb.cygnus.com (gateway.m-tech.ab.ca [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id OAA06912 for ; Fri, 17 Apr 1998 14:17:39 -0600 + Received: from subrogation.cygnus.com (subrogation.cygnus.com [192.80.44.76]) + by tweedledumb.cygnus.com (8.8.5/8.8.5) with ESMTP id QAA18613; + Fri, 17 Apr 1998 16:18:12 -0400 (EDT) + Received: (ian@localhost) by subrogation.cygnus.com (950413.SGI.8.6.12/8.6.4) id QAA08387; Fri, 17 Apr 1998 16:18:11 -0400 + Date: Fri, 17 Apr 1998 16:18:11 -0400 + Message-Id: <199804172018.QAA08387@subrogation.cygnus.com> + From: Ian Lance Taylor + To: gord@profitpress.com + CC: bug-libtool@gnu.org + In-reply-to: <86k98oh6fy.fsf@trick.profitpress.com> (message from Gordon + Matzigkeit on 17 Apr 1998 08:24:33 -0600) + Subject: Re: libtool on cygwin32 + Xref: trick.profitpress.com mail.libtool:1335 + Lines: 30 + X-Gnus-Article-Number: 2 Mon Nov 2 17:17:55 1998 + + From: Gordon Matzigkeit + Date: 17 Apr 1998 08:24:33 -0600 + + >>>>> Ian Lance Taylor writes: + + [...] + + ILT> So, my choices are to use -no-undefined -lbfd everywhere, or to + ILT> use it only on Windows. + + Would `-avoid-deps' (a proposed flag) give you what you want? + + default = record inter-library dependencies on all platforms, if + possible. + + -no-undefined = the dependency info provided is complete. Build + shared libraries on AIX and windows. + + -avoid-deps = implies `-no-undefined'. However, avoid recording + inter-library dependencies unless they are required for building a + shared library. + + Yes, that sounds like it will do what I need. + + Somebody someday may want to record some library dependencies but not + others, in which case you would want + -avoid-deps -lfoo -no-avoid-deps -lbar + + Ian + + From nobody Wed Oct 14 16:45:40 1998 + X-From-Line: ian@cygnus.com Mon Apr 27 16:24:19 1998 + Return-Path: + Delivered-To: gord@trick.profitpress.com + Received: (qmail 136 invoked from network); 27 Apr 1998 16:24:18 -0000 + Received: from unknown (HELO bambam.m-tech.ab.ca) (127.0.0.1) + by localhost with SMTP; 27 Apr 1998 16:24:18 -0000 + Received: from tweedledumb.cygnus.com (gateway.m-tech.ab.ca [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id JAA21924 for ; Mon, 27 Apr 1998 09:42:43 -0600 + Received: from subrogation.cygnus.com (subrogation.cygnus.com [192.80.44.76]) + by tweedledumb.cygnus.com (8.8.5/8.8.5) with ESMTP id LAA02934; + Mon, 27 Apr 1998 11:48:04 -0400 (EDT) + Received: (ian@localhost) by subrogation.cygnus.com (950413.SGI.8.6.12/8.6.4) id LAA01776; Mon, 27 Apr 1998 11:48:03 -0400 + Date: Mon, 27 Apr 1998 11:48:03 -0400 + Message-Id: <199804271548.LAA01776@subrogation.cygnus.com> + From: Ian Lance Taylor + To: gord@m-tech.ab.ca + CC: robbe@orcus.priv.at, bug-libtool@gnu.org + In-reply-to: <86bttpvbqd.fsf@trick.profitpress.com> (message from Gordon + Matzigkeit on 25 Apr 1998 15:21:30 -0600) + Subject: Re: libtool 1.2: Why no inter-lib dependencies on ELF? + Xref: trick.profitpress.com mail.libtool:1388 + Lines: 27 + X-Gnus-Article-Number: 3 Mon Nov 2 17:17:55 1998 + + From: Gordon Matzigkeit + Date: 25 Apr 1998 15:21:30 -0600 + + There are still some unresolved issues (see + http://www.profitpress.com/libtool/deplibs.html). Full inter-library + dependency support is scheduled for libtool 1.3, though, and should + appear in the next beta-testing release. + + I read that page, and here are a few quick notes. + + 1) On any platform which does not require -fpic you can link + static libraries into shared libraries. These platforms include + AIX, Irix 5/6, and Windows. + + 2) On any functioning ELF platform you can include code which was not + compiled with -fpic in a shared library, and you can link with a + static library when creating a shared library. You say that Solaris + won't let you link a shared library against a static one, but it + appears to work for me. What type of test are you using? + + 3) On SunOS you can not correctly link a static library into a shared + library. It will mostly work, but I believe that certain operations, + such as overriding a shared library function in the main executable, + will fail. + + Ian + + From nobody Wed Oct 14 16:48:43 1998 + X-From-Line: gord@gnu.org Thu Sep 10 04:39:20 1998 + Return-Path: + Delivered-To: gord@trick.fig.org + Received: (qmail 30644 invoked from network); 10 Sep 1998 04:39:18 -0000 + Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34) + by cs366707-a.cgmo1.ab.wave.home.com with SMTP; 10 Sep 1998 04:39:18 -0000 + Received: from mescaline.gnu.org (gateway [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id WAA26741 for ; Wed, 9 Sep 1998 22:38:15 -0600 + Received: from mailhost.cyberramp.net (root@mailhost.cyberramp.net [207.158.64.11]) by mescaline.gnu.org (8.8.5/8.6.12GNU) with ESMTP id AAA11165 for ; Thu, 10 Sep 1998 00:38:17 -0400 + Received: from fuzzylog.simple.dallas.tx.us (dal-tsa11-49.cyberramp.net [207.158.111.49]) + by mailhost.cyberramp.net (8.9.1a/8.9.1/ler-980825-0832-PM) with ESMTP id XAA13581; + Wed, 9 Sep 1998 23:37:41 -0500 (CDT) + Received: from scooby (scooby [192.168.1.3]) + by fuzzylog.simple.dallas.tx.us (8.8.8/8.8.8) with SMTP id XAA27692; + Wed, 9 Sep 1998 23:37:38 -0500 (CDT) + Date: Wed, 9 Sep 1998 23:37:38 -0500 (CDT) + From: Bob Friesenhahn + To: Libtool Bugs + Subject: Late-binding looses space efficiency ... + Message-ID: + MIME-Version: 1.0 + Content-Type: TEXT/PLAIN; charset=US-ASCII + Xref: trick.fig.org libtool:1605 + Lines: 27 + X-Gnus-Article-Number: 4 Mon Nov 2 17:17:55 1998 + + On most systems, libtool does not supply the dependency libraries (-llib) when + it creates the shared library in spite of these being supplied on the libtool + command line. The ImageMagick package uses quite a few dependency libraries. + The ImageMagick library uses these libraries directly but utilities built + using the ImageMagick library only link against these libraries because the + ImageMagick library demands it. + + Through testing we have found that if the 'ltconfig' archive_cmds definition + is ammended to include $deplibs that linked programs become much smaller (1/3 + to 1/4 the original size). This appears to be because more code is included + in the shared library itself, avoiding the need for this to be part of the + program. + + The distributed 'ltconfig' only supplies $deplibs for systems matching osf3* | + osf4*. Is there a reason why $deplibs is not supplied for all systems that can + support inter-library dependencies? Reducing overall package size is highly + desireable in order to reduce disk-space consumption and binary distribution + size. + + Thanks, + + Bob + ====================================== + Bob Friesenhahn + bfriesen@simple.dallas.tx.us + http://www.cyberramp.net/~bfriesen + + From nobody Wed Oct 14 16:52:40 1998 + X-From-Line: ddj@hks.net Thu Sep 17 21:29:13 1998 + Return-Path: + Delivered-To: gord@trick.fig.org + Received: (qmail 22994 invoked by uid 1003); 17 Sep 1998 21:29:12 -0000 + Delivered-To: jana-profitpress-gord@profitpress.com + Received: (qmail 22991 invoked from network); 17 Sep 1998 21:29:11 -0000 + Received: from dali.hks.net (ddj@208.203.175.210) + by cs366707-a.cgmo1.ab.wave.home.com with SMTP; 17 Sep 1998 21:29:11 -0000 + Received: (from ddj@localhost) + by dali.hks.net (8.8.5/8.8.5) id RAA04020; + Thu, 17 Sep 1998 17:26:28 -0400 + Received: from BatMail.robin.v2.15.CUILIB.3.45.SNAP.NOT.LINKED.dali..none..ix86.Linux + via MS.5.6.dali.(none).ix86_Linux; + Thu, 17 Sep 1998 17:26:27 -0400 (EDT) + Message-ID: + Date: Thu, 17 Sep 1998 17:26:27 -0400 (EDT) + From: Doug DeJulio + To: gord@profitpress.com + Subject: Re: Libtool Inter-library Dependencies + Xref: trick.fig.org libtool:1611 + Lines: 32 + X-Gnus-Article-Number: 5 Mon Nov 2 17:17:55 1998 + + I read your discussion of why libtool can't handle inter-library + dependencies and how people might be able to help fix this. I found + an error in item #1 of "The Solution". I quote: + + > Finally, there are some systems which won't even allow you to link a + > shared library against a static one: + > Solaris 2.x + + This is only true in most cases. If all of the accessed individual + object files in the static library *could* have been put in a shared + library, things will work just fine. It's not the type of library + that matters, but the type of object files. + + Our commercial product includes a library and a few + dynamically-loadable modules that make that library accessible to + various interpretetd languages (TCL, Perl, PHP3 and Python at the + moment, with more coming). We don't distribute a shared library + anymore because when we did this caused a ton of trouble (most people + just couldn't get it configured correctly). I haven't yet found a + platform on which linking dynamically-loadable object file against a + static "ar" archive containing relocatable object files causes any + trouble (and we support SCO, Digital Unix, SCO, Solaris, Linux, and + FreeBSD, so this isn't because of narrow experience). + + So, the main point is that just deciding whether it'll work based on + looking at the library file will in some cases fail when it should + have succeeded (and the software we sell is such a case). + + -- + Doug DeJulio | mailto:ddj@hks.net + HKS, Incorporated | http://www.hks.net/ + + From gord@trick.fig.org Wed Nov 4 16:50 EDT 1998 + Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8]) + by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id QAA12687 + for ; Wed, 4 Nov 1998 16:50:18 -0200 (EDT) + Received: from cabler.cableregina.com (ip2.net20483142.cr.sk.ca [204.83.142.2]) + by grande.dcc.unicamp.br (8.8.5/8.8.5) with SMTP id QAA03463 + for ; Wed, 4 Nov 1998 16:50:12 -0200 (EDT) + Received: from [24.72.10.223] by cabler.cableregina.com + (SMTPD32-4.0) id A25C7D0074; Wed, 04 Nov 1998 12:52:12 -0600 + Received: (qmail 1392 invoked by uid 1001); 4 Nov 1998 18:51:16 -0000 + To: "Gary V. Vaughan" + Cc: Ian Lance Taylor , tanner@gmx.de, oliva@dcc.unicamp.br, + bug-libtool@gnu.org + Subject: Re: Inter-library dependencies in libtool + References: <199811040125.UAA01678@subrogation.cygnus.com> <3640381C.725FC8F2@oranda.demon.co.uk> + X-Attribution: Gord + Mime-Version: 1.0 (generated by tm-edit 7.106) + From: Gordon Matzigkeit + Date: 04 Nov 1998 12:51:11 -0600 + In-Reply-To: "Gary V. Vaughan"'s message of Wed, 04 Nov 1998 11:18:52 +0000 + Message-ID: <86af27qokg.fsf@trick.fig.org> + X-Mailer: Gnus v5.5/Emacs 20.2 + Content-Type: text/plain; charset=US-ASCII + X-Content-Length: 2911 + Xref: araguaia.dcc.unicamp.br libtool-deplibs:6 + Lines: 80 + X-Gnus-Article-Number: 6 Thu Nov 5 08:41:15 1998 + + Hi! + + >>>>> Gary V Vaughan writes: + + GVV> Ian Lance Taylor wrote: + + >> This kind of goes to the heart of libtool. libtool wants to + >> present a particular interface for using shared libraries. + + GVV> Is that an "official" design goal? + + Yes. From the manual: + + 1. The system must be as elegant as possible. + + The main power of libtool is that it blurs the distinction between + static archives (`.a' files) and shared libraries, by providing an + interface that unifies the two into a new beast, the `.la' file. This + is the reason why libtool caught on: you can write Makefile rules that + work for both shared and static libraries. + + >> In order to do this, it assumes that the system supports certain + >> capabilities. One of those is that the system can support + >> undefined symbols in shared libraries. + + To add to this point: or the system can link shared libraries against + one another (deplibs). + + GVV> My understanding was that libtool wants to provide a single + GVV> interface for the building of shared libraries, particularly so + GVV> that a developer can use libtool in a Makefile (*without* all of + GVV> the system dependant rules that used to me necessary) and get + GVV> shared libraries on all of libtool's supported platforms using + GVV> the same build rules. + + Both your understandings are correct. + + >> That means that on systems which do not permit shared libraries to + >> have undefined symbols--AIX and Windows--libtool doesn't really + >> work. + + I would state this somewhat differently: on those platforms, libtool + works (it can still build static libraries), but it doesn't shine. + + >> [[snip]] In other words, the interface which libtool presents is + >> deficient. It does not successfully hide the system on which it + >> is running, and it forces the code which calls libtool to make + >> adjustments. + + Exactly. + + I believe the correct way to solve this problem is to.... (drum roll) + use inter-library dependencies! + + If `deplibs' is set, then the library has undefined symbols. If it + isn't set, then we could assume it has no undefined symbols. + + So, using `-lanything' on the .la creation line would be a synonym for + `-allow-undefined', and having no `-l' flags would be a synonym for + `-no-undefined'. + + >> Of course even that will not make Windows DLLs identical to ELF + >> shared libraries. ELF shared libraries permit the main program to + >> override a symbol in the shared library, and Windows DLLs do not. + + I'd just as soon cross that bridge when we come to it, unless you have + any real-world examples that demand more control over whether or not + DLLs are built. + + In any event, this is more incentive for Thomas Tanner's patches to + restrict the symbol table, so that people don't get bitten by + namespace clashes. + + Thanks for your comments, + + -- + Gordon Matzigkeit //\ I'm a FIG (http://www.fig.org/) + Lovers of freedom, unite! \// I use GNU (http://www.gnu.org/) + + From ian@cygnus.com Wed Nov 4 17:16 EDT 1998 + Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8]) + by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id RAA17371 + for ; Wed, 4 Nov 1998 17:15:59 -0200 (EDT) + Received: from tweedledumb.cygnus.com (tweedledumb.cygnus.com [192.80.44.1]) + by grande.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id RAA04425 + for ; Wed, 4 Nov 1998 17:15:45 -0200 (EDT) + Received: from subrogation.cygnus.com (subrogation.cygnus.com [192.80.44.76]) + by tweedledumb.cygnus.com (8.8.5/8.8.5) with ESMTP id OAA16598; + Wed, 4 Nov 1998 14:17:48 -0500 (EST) + Received: (ian@localhost) by subrogation.cygnus.com (950413.SGI.8.6.12/8.6.4) id OAA02450; Wed, 4 Nov 1998 14:17:48 -0500 + Date: Wed, 4 Nov 1998 14:17:48 -0500 + Message-Id: <199811041917.OAA02450@subrogation.cygnus.com> + From: Ian Lance Taylor + To: gord@trick.fig.org + CC: gvaughan@oranda.demon.co.uk, tanner@gmx.de, oliva@dcc.unicamp.br, + bug-libtool@gnu.org + In-reply-to: <86af27qokg.fsf@trick.fig.org> (message from Gordon Matzigkeit on + 04 Nov 1998 12:51:11 -0600) + Subject: Re: Inter-library dependencies in libtool + X-Content-Length: 1774 + Xref: araguaia.dcc.unicamp.br libtool-deplibs:7 + Lines: 43 + X-Gnus-Article-Number: 7 Thu Nov 5 08:41:16 1998 + + From: Gordon Matzigkeit + Date: 04 Nov 1998 12:51:11 -0600 + + I believe the correct way to solve this problem is to.... (drum roll) + use inter-library dependencies! + + If `deplibs' is set, then the library has undefined symbols. If it + isn't set, then we could assume it has no undefined symbols. + + So, using `-lanything' on the .la creation line would be a synonym for + `-allow-undefined', and having no `-l' flags would be a synonym for + `-no-undefined'. + + This sounds reasonable. Of course, -allow-undefined should remain a + possible option even if there are no -l options. I guess + -no-undefined could be an error check, but it wouldn't have much + functional use. + + >> Of course even that will not make Windows DLLs identical to ELF + >> shared libraries. ELF shared libraries permit the main program to + >> override a symbol in the shared library, and Windows DLLs do not. + + I'd just as soon cross that bridge when we come to it, unless you have + any real-world examples that demand more control over whether or not + DLLs are built. + + In any event, this is more incentive for Thomas Tanner's patches to + restrict the symbol table, so that people don't get bitten by + namespace clashes. + + What I'm talking about is not namespace clashes, but rather the + ability to override a particular function from a shared library. For + example, I can write my own version of malloc and free, and libc.so on + an ELF system will use them rather than the malloc and free linked + into the library. + + I don't think there is anything libtool can do about this. It's + something that is very useful when dealing with preexisting shared + libraries, but is not particularly useful when dealing with shared + libraries you build yourself. + + Ian + + From gord@mescaline.gnu.org Thu Nov 5 15:32 EDT 1998 + Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8]) + by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id PAA10607 + for ; Thu, 5 Nov 1998 15:32:00 -0200 (EDT) + Received: from mescaline.gnu.org (mescaline.gnu.org [158.121.106.21]) + by grande.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id PAA22399 + for ; Thu, 5 Nov 1998 15:31:57 -0200 (EDT) + Received: from hades.aethos.co.uk (hades.aethos.co.uk [195.171.18.1] (may be forged)) + by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id MAA01615 + for ; Thu, 5 Nov 1998 12:37:11 -0500 + Received: from zeus.aethos.co.uk (zeus.aethos.co.uk [193.164.192.100]) + by hades.aethos.co.uk (8.8.5/8.8.5) with ESMTP id RAA28242; + Thu, 5 Nov 1998 17:37:46 GMT + Received: from oranda.demon.co.uk (samhain.aethos.co.uk [193.164.192.38]) by zeus.aethos.co.uk with ESMTP (8.7.1/8.7.1) id RAA03467; Thu, 5 Nov 1998 17:33:25 GMT + Message-ID: <3641E0DF.A8F92E78@oranda.demon.co.uk> + Date: Thu, 05 Nov 1998 17:31:11 +0000 + From: "Gary V. Vaughan" + Organization: Aethos Communication Systems ltd. + X-Mailer: Mozilla 4.5 [en] (WinNT; I) + X-Accept-Language: en + MIME-Version: 1.0 + To: Alexandre Oliva + CC: Ian Lance Taylor , tanner@gmx.de, gord@trick.fig.org, + bug-libtool@gnu.org + Subject: Re: Inter-library dependencies in libtool + References: <199811041854.NAA02418@subrogation.cygnus.com> <364183EF.9F15E7D6@oranda.demon.co.uk> + Content-Transfer-Encoding: 7bit + Content-Type: text/plain; charset=us-ascii + X-Content-Length: 3787 + Xref: araguaia.dcc.unicamp.br libtool-deplibs:8 + Lines: 87 + X-Gnus-Article-Number: 8 Sat Nov 7 05:46:44 1998 + + If I may be permitted to quote you gratuitously... I think there are two + problems here, and solving the first will keep most people happy most of + the time. + + In order of progressive difficulty... + + 1. COMPILE TIME LTLIBRARIES + *************************** + + Alexandre Oliva wrote: + > + > [[1.1]] the programmer knows that his library is completely + > self-contained, it does not depend on any external symbols + > (-no-undefined) + + 1.2) The link mode command line to libtool contains no -l options, + which implies your fallback method (try to link a shared library + as if `-no-undefined' had been specified, or if that fails build + only a static library). + + 1.3) The programmer knows that resolving all of the symbols in his + library requires linking deplibs, and is able to specify all of + them on the link line (some if these may be installed .la files + which have deplibs of their own which libtool must also link + with). + + > [[1.4]] the programmer knows that there may be symbols in his library + > that are going to be supplied by another library, which [[is]] + > unknown in advance. If such dependencies exist, they have to + > be resolved at program-linking time (-allow-undefined == default) + + In the future maybe libtool will be able to do a two stage link + for platforms which can't do `-allow-undefined', the first link + to find which symbols are unresolved, the second against a + temporarily generated set of stubs... I'm not sure whether the + stage 2 lib can then resolve its stubbed functions against a + different library when it is subsequently linked into an + executable? Perhaps I am reiterating Ian's idea about stubbing + on broken platforms? + + In the present, broken platforms will have to manage with static + libraries in this case. + + 2. RUNTIME LTLIBRARIES + ********************** + + > [[2.1]] the programmer needs a library foo that is completely + > self-contained, so that he can be sure that dlopen(foo) works, + > and just adding -lfoo *after* the library is installed will be + > fine (-self-contained ?) + + 2.2) The programmer needs a library that can be dlopened, but which + can have all of its symbols resolved at link time with deplibs. + A small amount of magic in the form a .c and .h distributed with + libtool (as suggested by Gord) is enough to make sure deplibs + are dlopened if necessary and then the library itself is loaded. + At best, this will only be supported on platforms for which + libtool can generate shared libraries, perhaps only a (large) + subset of those. + + 2.3) The programmer needs a library that can be dlopened, and + doesn't know at link time how all of the symbols will be resolved. + A (small) subset of the platforms for which libtool can generate + shared libraries, will be handled by the aforementioned magic. + For the unhandled cases dld will be required. + + > [[2.4]] although a library is not going to be self-contained, + > [[snip]] the platform does not support libraries with undefined + > symbols, a shared library is badly needed, [[This will]] require + > dld. + + NOTE: in the above, I am assuming that + all-supported-platforms >= (large) >= (small) > no-platforms + + I don't see any need to add anymore command line switches, except + perhaps to tell libtool whether this is a compile time or runtime + library, but even that may prove unnecessary. + + The line between 1.3 and 1.4 could probably use some clarification; what + if the link line includes several deplibs, but some symbols are + still unresolved? 1.4? Maybe... what if the platform doesn't support + `-no-undefined'? Perhaps there is a 1.3.5? In any case, for maximum + portability, we want to keep the number of cases of 1.4 to a minimum. + + Cheers, + Gary. + + From wmperry@aventail.com Sun Nov 1 01:03 EDT 1998 + Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8]) + by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id BAA29973 + for ; Sun, 1 Nov 1998 01:03:04 -0200 (EDT) + Received: from slow.bp.aventail.com (vina05.cntwk.net [207.205.120.131]) + by grande.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id BAA10397 + for ; Sun, 1 Nov 1998 01:02:59 -0200 (EDT) + Received: from kramer-fast.bp.aventail.com (kramer-fast.bp.aventail.com [192.168.200.2]) + by slow.bp.aventail.com (8.8.5/8.8.5) with ESMTP id SAA31093; + Sat, 31 Oct 1998 18:03:52 -0800 + Received: (from wmperry@localhost) + by kramer-fast.bp.aventail.com (8.8.5/8.8.5) id WAA21542; + Sat, 31 Oct 1998 22:04:49 -0500 + Sender: wmperry@aventail.com + To: Gordon Matzigkeit + Cc: Alexandre Oliva + Subject: Re: libtool 1.2 problems... + References: <199810251708.MAA02237@kramer-fast.bp.aventail.com> <86zpac2z99.fsf@trick.fig.org> + Errors-to: wmperry@aventail.com + Reply-to: wmperry@aventail.com + X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7 + X-Mailer: Gnus v5.6.8/XEmacs 21.0 - "Pyrenean-pre6" + Content-Type: text/plain; charset=US-ASCII + X-Content-Length: 2306 + Xref: araguaia.dcc.unicamp.br libtool-deplibs:9 + Lines: 66 + X-Gnus-Article-Number: 9 Fri Nov 20 23:23:12 1998 + + Gordon Matzigkeit writes: + + > >>>>> Alexandre Oliva writes: + > + > AO> I can understand why we'd want all that stuff on systems with + > AO> brain-damaged dynamic linkers or such, but on Linux? Gord? + > + > No specific reason. I was trying to implement something that would + > work on all platforms, including Linux. + > + > >> I think optionally having a PUBLIC_API preprocessor macro or + > >> something might be handy. + > + > AO> Thomas Tanner has recently submitted a patch that implements + > AO> that, I think. I still couldn't find the time to look carefully + > AO> at the patch, but, from the text description, it looks like + > AO> that's exactly what it does. + > + > I think it's a good idea to be able to specify global symbols + > explicitly. That's part of the glibc versioning system that I was + > alluding to earlier. + > + > If you look at the `--version-script' option to GNU ld + > ((ld.info)Version Script.), then you'll see more details. + + To restrict globally visible symbols, here's the info I've got. :) i've + been using this for quite a while in our server product. All hail the + NSA. + + Linux: '--retain-symbols-file ' , with all the symbols you want + exported in + + OSF1: '-hidden -exported_symbol "symname-or-wildcardspec"' + + AIX: you just restrict what you but in the export list you pass to + -bE:. + + HP/UX: '+e symname' on the link line for each exported symbol you want + + Solaris: create a map file for the linker that looks like: + { + global: + symname1; + symname2; + symname3; + local: + *; + } + + And use -M on the link line. + + BSD/OS 3.x is the only system I couldn't find a way to support this symbol + hiding on. But you might be able to do it better with BSD/OS 4.x now that + they have finally moved to elf. + + BTW: What are the subscription directions for libtool-bugs or a general + discussion list for stuff like this? I've had lots of experience over the + last 3 years with dynamic loading on various platforms, and would love to + get libtool to the point where I could use it for all of our products here + at aventail. Less stuff for me to officially maintain. :) + + I'd also like to see DLD 4.x eventually so that I can just support it and + ditch all the crufty junk we are using right now. :) Abstraction good. + + -Bill P. + Index: libtool/mail/deplibs.html diff -c /dev/null libtool/mail/deplibs.html:1.1 *** /dev/null Thu Apr 29 16:20:56 1999 --- libtool/mail/deplibs.html Wed Jan 13 22:39:13 1999 *************** *** 0 **** --- 1,213 ---- + + + Libtool Inter-library Dependencies + +

Libtool

+ +

Inter-library Dependencies

+ +

About twice a week, for the last five weeks, I've been receiving + bug reports which tell me that libtool's inter-library dependency + handling is broken. + +

I know. I broke it intentionally, until I have the time to fix it + myself, or somebody else takes the time to help me with it. + +

These same people often give me a simple one-line patch which + re-enables my old, simplistic inter-library dependencies, but nobody + seems to want to test things thoroughly and come up with a real + solution. + +

If you don't care about the history, and you just want to help me + out, jump to the bottom of this document. + +

Background

+ +

Libtool's basic premise is to make static and shared libraries + behave the same way from a programmer's point of view. This allows + users to build a libtoolized package with or without shared libraries, + determined at configuration time. It does this by using a + libtool object (.lo) and libtool + archive (.la) abstraction, so that the package + maintainer can use libtool to operate on these files without making + any assumptions about their underlying representation. + +

For the most part, this abstraction works well, and has made + libtool as popular as it is today. Without this abstraction, it would + be significantly harder to port libtool to new platforms. + +

Unfortunately, what this abstraction has also done is reveal some + fundamental inconsistencies with most shared library implementations. + Every shared library implementation works well for `hello world'-type + examples, but very few are robust and well-designed so that libtool + doesn't need special tricks in order to build correct, featureful + shared libraries. + +

Providing inter-library dependencies is one feature that has + revealed these kinds of inconsistencies. + +

The problem

+ +

My orginal inter-library dependency code received rigourous testing + in beta releases of GNU + Guile. As soon as the Guile people started using my code, I + received a flood of bug reports. People were reporting that + libguile (Guile's main shared library) was failing to + link, or that programs linked against libguile were + dumping core. + +

Not good. + +

The Guile people chased this bug down to the following scenario: + +

    +
  1. The user's system has a static regexp library installed, + librx.a. + +
  2. Guile's configure script detects that the + -lrx linker option can be used to link in + librx. + +
  3. When libguile is built, the -lrx linker + option is used. + +
  4. Some linkers fail at this point, because they don't allow shared + libraries to contain or depend on static libraries. + +
  5. If the linker didn't fail, then a few programs are linked against + libguile. + +
  6. On some systems, these programs core dump because + libguile is a shared library that contains non-PIC code + (from librx). +
+ +

The interim solution

+ +

I needed some way to respond to these reports. I saw my options (in + order of my preference) as: + +

    +
  1. Write code in ltmain.sh to prevent static libraries + from appearing in inter-library dependencies. This would take some + work, but obviously is the best solution. + +
  2. Find the systems that fail, and turn off inter-library + dependencies on only those systems. + +
  3. Force the package maintainer to guarantee that static libraries + never appear in inter-library dependencies. +
+ +

I immediately vetoed the last solution, because that would violate + the whole point of using libtool, and would cause a lot of people to + waste time solving a problem that really should be fixed by libtool. + +

I preferred the first solution, but at the time of the reports, I + didn't see an obviously simple mechanism for detecting the difference + between shared and static libraries. + +

So, in the meantime, I tried turning off inter-library dependencies + on the systems that failed. + +

I quickly discovered, to my chagrin, that many systems fail. So, + it was be simpler for me to turn off all inter-library + dependencies, then find out which systems work, rather than vice + versa. + +

The current situation

+ +

I've been busy trying to avoid bankruptcy. It's been over three + months since I first turned off inter-library dependencies, and I + still haven't completed the solution I want. + +

I've been gearing up for the 1.1 release of libtool, because there + is a high demand for a stable public release. So, I'm not going to + introduce any destabilizing changes to the inter-library dependency + code until after 1.1 is released. + +

The solution

+ +

So, I want to tell you how you can help me solve the various + dilemmas surrounding this issue: + +

    +
  1. I need to find out more about the nature of the problems I ran + into with Guile. Unfortunately, I cannot reproduce them in simple + tests on my own platform (i586-pc-linux-gnulibc1), even though I think + they were reported here. I need to find out which platforms already + have perfect inter-library dependency support, how to work around the + problem on other platforms, and, more importantly, exactly + why some systems give me problems and others don't. + +

    On correct platforms, you can link any static library + against a shared library via the -lNAME option without + the linker complaining, then link a program against this library and + run it without dumping core. I know that this scenario will always + work fine on the following systems: + +

      +
    • None reported yet. +
    + +

    I also know that on some systems, you can create a shared library + linked against a static one, but running programs linked against such + a library will dump core: + +

      +
    • None reported yet. +
    + +

    Finally, there are some systems which won't even allow you to link + a shared library against a static one: + +

      +
    • Solaris 2.x +
    + +
  2. Help me figure out a good, portable way to detect if a given + -lNAME option refers to a shared library or not, since + that is needed as a workaround to the problem. Some suggestions so + far have been: + +
      +
    • Link the library against a tiny test program, and: + +
        +
      • run ldd(1) on the test program and search for + libNAME in the ldd output. +
      • use the -verbose flag for GNU ld in order to see + which library is actually linked. +
      • run some sort of other program to determine if the library was + dynamic. +
      + +
    • Track the -LDIR flags, do a search for the library, + and then check whether it is shared by: + +
        +
      • using the file(1) program. +
      • looking at its suffix. +
      +
    + +
  3. Contact any people you know who might be interested, get them to + read this page, so that they can help me solve the problem. + +
  4. Send me money, so that I can devote more of my time to solving the + problem. +
+ +

Thank you for your help, and have fun. + +


+ + +

Back to the libtool home page. + +

+ Gordon Matzigkeit <gord@profitpress.com> +
+ \ No newline at end of file Index: libtool/mail/docs diff -c /dev/null libtool/mail/docs:1.2 *** /dev/null Thu Apr 29 16:20:56 1999 --- libtool/mail/docs Mon Nov 2 20:30:14 1998 *************** *** 0 **** --- 1,48 ---- + From nobody Wed Oct 14 17:14:44 1998 + X-From-Line: rms@santafe.edu Mon Jun 01 19:52:46 1998 + Return-Path: + Delivered-To: gord@trick.profitpress.com + Received: (qmail 15232 invoked from network); 1 Jun 1998 19:52:45 -0000 + Received: from unknown (HELO bambam.m-tech.ab.ca) (127.0.0.1) + by 127.0.0.1 with SMTP; 1 Jun 1998 19:52:45 -0000 + Received: from sfi.santafe.edu (gateway [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with SMTP id MAA32739 for ; Mon, 1 Jun 1998 12:09:11 -0600 + Received: from wijiji.santafe.edu by sfi.santafe.edu (4.1/SMI-4.1) + id AA03877; Mon, 1 Jun 98 11:55:41 MDT + Received: by wijiji.santafe.edu (SMI-8.6/SMI-SVR4) + id LAA04106; Mon, 1 Jun 1998 11:55:40 -0600 + Date: Mon, 1 Jun 1998 11:55:40 -0600 + Message-Id: <199806011755.LAA04106@wijiji.santafe.edu> + From: Richard Stallman + To: gord@m-tech.ab.ca + In-Reply-To: <86hg27twsh.fsf@trick.profitpress.com> (message from Gordon + Matzigkeit on 30 May 1998 12:53:50 -0600) + Subject: Re: libtool manual comments + Reply-To: rms@gnu.org + References: <199805240500.XAA01237@wijiji.santafe.edu> <86hg27twsh.fsf@trick.profitpress.com> + Xref: trick.profitpress.com mail.libtool:1476 + Lines: 23 + X-Gnus-Article-Number: 1 Mon Nov 2 17:18:09 1998 + + Regarless, it needs to have a light touch on the option + namespace, since it forwards any unrecognized options to the + underlying compiler. This is so that people can pass arbitrary flags + that libtool doesn't know about. + + Sorry, I don't follow the logic. + + Long-named options are the GNU standard, so every a GNU program should + provide a long-named version of every option name. + + If you think there is some practical reason why libtool should not support + long-named versions of its own options, would you please spell it out? + I don't see why it would cause any problem. + + RMS> In section 5.3.1 there is a table of environment variable names, + RMS> that should be @table @code. Section 12.4 has one too. + + Actually, these are not tables, they are lists of `@defvar' blocks. + What would you recommend in this situation? + + I'd recommend @table @code. We don't use @defvar for environment + variables. + Index: libtool/mail/libc_s diff -c /dev/null libtool/mail/libc_s:1.2 *** /dev/null Thu Apr 29 16:20:56 1999 --- libtool/mail/libc_s Mon Nov 2 20:30:14 1998 *************** *** 0 **** --- 1,140 ---- + From nobody Wed Jul 2 19:28:31 1997 + X-From-Line: norm@connectware.ca Wed Jul 02 22:32:39 1997 + Return-Path: + Delivered-To: gord@profitpress.com + Received: (qmail 5508 invoked from network); 2 Jul 1997 22:32:38 -0000 + Received: from localhost (HELO bambam.m-tech.ab.ca) (127.0.0.1) + by localhost with SMTP; 2 Jul 1997 22:32:38 -0000 + X-POP3-Rcpt: gord@bambam + Return-Path: norm@connectware.ca + Received: from bunker.connectware.ca (norm.HIP.CAM.ORG [199.84.42.109]) by m-tech.ab.ca (8.6.12/8.6.9) with ESMTP id KAA07116 for ; Wed, 2 Jul 1997 10:12:18 -0600 + Received: from castle.connectware.ca (castle.connectware.ca [204.19.223.2]) + by bunker.connectware.ca (8.8.5/8.8.5) with SMTP id MAA02233 + for ; Wed, 2 Jul 1997 12:15:54 -0400 (EDT) + Received: by castle.connectware.ca (AIX 3.2/UCB 5.64/4.03) + id AA21851; Wed, 2 Jul 1997 12:08:56 -0400 + Date: Wed, 2 Jul 1997 12:08:53 -0400 (EDT) + From: Normand McGuire + To: Gordon Matzigkeit + Subject: Re: -lc_s shared libraries + In-Reply-To: <86yb7qipsd.fsf_-_@trick.profitpress.com> + Message-Id: + Mime-Version: 1.0 + Content-Type: TEXT/PLAIN; charset=US-ASCII + Xref: trick.profitpress.com mail.libtool:299 + Lines: 113 + X-Gnus-Article-Number: 1 Mon Nov 2 17:19:44 1998 + + + + On 1 Jul 1997, Gordon Matzigkeit wrote: + + > Are you sure that on SCO Openserver 5 you need to specify + > /lib/libc.so? From what I understood about that platform, specifying + > `-lc' (which is what the C compiler does by default) is good enough, + > and links in the shared version if it exists. + + >From my experience, definitely. Look below. + + > Do you know otherwise? Can you show the results of specific tests to + > me that would prove your point? + + Here is a sample of a session demonstrating this on my system. I show the + source code, default cc file and three compiles with three a.out file + sizes. See for yourself: + + Script started on Wed Jul 2 11:21:58 1997 + $ cat t.c + main() + + { + printf("Hello, world\n"); + } + $ cat /etc/default/cc + # @(#) cc.default 20.1 94/12/04 + # + # Copyright (C) The Santa Cruz Operation, Inc. 1994-1995. + # This Module contains Proprietary Information of + # The Santa Cruz Operation, and should be treated as Confidential. + # + # Core development /bin/cc reads /etc/default/cc. + # Cross development /usr/ods30/bin/cc reads /etc/default/crossdevcc. + # If a prefix is specified, cc reads /etc/default/cc instead. + # + FLAGS= + LIBS= + $ cc t.c + $ l a.out + -rwxrwxr-x 1 root sys 46334 Jul 2 11:22 a.out + $ cc t.c -lc + $ l a.out + -rwxrwxr-x 1 root sys 46334 Jul 2 11:22 a.out + $ cc t.c /lib/libc.so + $ l a.out + -rwxrwxr-x 1 root sys 3988 Jul 2 11:22 a.out + $ exit + + script done on Wed Jul 2 11:22:32 1997 + + And believe me, this script session is not a fake. + + > The reason I'm asking is that I, too, would like to know how Autoconf + > packages can best take advantage of shared libraries, especially in a + > general, rather than a test-by-test way. + + The section of my configure.in script that takes care of shared libraries + is short and not annoying to repeat. You may want to incorporate it into + the AC_PROG_CC macro or create a new one for it. So far, I've seen only + two kinds of behaviors regarding shared libraries: if they are not used + automatically when invoking cc, just include them when linking the + program. And it worked so far. However, you guys may have a whole lot + more flavors of system to run on compared to me. + + Here is the portion of the shared library check in my configure.in script: + + # STEP 2 - Check for libraries + + AC_MSG_CHECKING([for libc.so]) + if test -r /lib/libc.so; then + AC_MSG_RESULT([yes (/lib/libc.so)]) + LIBS="$LIBS /lib/libc.so" + elif test -r /usr/lib/libc.so; then + AC_MSG_RESULT([yes (/usr/lib/libc.so)]) + LIBS="$LIBS /usr/lib/libc.so" + else + AC_MSG_RESULT(no) + AC_CHECK_LIB(c_s, main) + fi + + > Could you be more specific when you mention `some other System V Unix + > systems'? What are their canonical system names (i.e. *-*-sco3.2v4*)? + + By 'some other Unix systems' requiring that you explicitely specify the + shared library name when linking the program, I meant specifically: + + o Bull Open Software (Unix System V Release 4, but don't remember if it is x86) + + o Interactive Unix System V/386 all versions + + o SCO Unix 3.2v4 and SCO OpenServer 5 + + o Sun Solaris 2.3 / SunOS 5.3 + + All others that we've compiled and run on will automatically use shared + libraries when available, namely: + + IBM's AIX 3.2.* and 4.* + HP's HPUX 8.*, 9.* and 10.* + DEC Ultrix, OSF/1 and DEC Unix all versions tried + DataGeneral's DGUX all versions tried + Sequent's DYNIX/ptx 2.1 and 4 + Linux all versions tried + SGI's Irix all versions tried + NCR and AT&T Unix System V/386 Release 4 + Sun Solaris 2.4 (SunOS 5.4) and Solaris 2.5 (SunOS 5.5) + SunOS 4.1* + Unisys Unix System V/386 + Unixware all versions + + Normand McGuire + Index: libtool/mail/perms diff -c /dev/null libtool/mail/perms:1.2 *** /dev/null Thu Apr 29 16:20:56 1999 --- libtool/mail/perms Mon Nov 2 20:30:15 1998 *************** *** 0 **** --- 1,155 ---- + From nobody Wed Oct 14 17:00:26 1998 + X-From-Line: gord@gnu.org Wed Sep 16 02:36:19 1998 + Return-Path: + Delivered-To: gord@trick.fig.org + Received: (qmail 16983 invoked from network); 16 Sep 1998 02:36:18 -0000 + Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34) + by cs366707-a.cgmo1.ab.wave.home.com with SMTP; 16 Sep 1998 02:36:18 -0000 + Received: from mescaline.gnu.org (gateway [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id UAA21823 for ; Tue, 15 Sep 1998 20:33:36 -0600 + Received: from creche.cygnus.com (2Cust11.tnt22.dfw5.da.uu.net [208.254.195.11]) by mescaline.gnu.org (8.8.5/8.6.12GNU) with ESMTP id WAA25991 for ; Tue, 15 Sep 1998 22:34:08 -0400 + Received: (from tromey@localhost) by creche.cygnus.com (8.7.6/8.7.3) id UAA02812; Tue, 15 Sep 1998 20:29:44 -0600 + Sender: tromey@creche.cygnus.com + To: Libtool Bugs + Subject: [pacman@cqc.com] permission problems on things installed by automake + X-Zippy: Did you move a lot of KOREAN STEAK KNIVES this trip, Dingy? + X-Attribution: Tom + Reply-To: tromey@cygnus.com + From: Tom Tromey + Date: 15 Sep 1998 20:29:42 -0600 + Message-ID: + X-Mailer: Red Gnus v0.34/Emacs 19.34 + Xref: trick.fig.org libtool:1609 + Lines: 28 + X-Gnus-Article-Number: 1 Mon Nov 2 17:19:58 1998 + + The second paragraph applies to libtool. I was recently asked this + same question by the Gtk developers as well. I don't know the answer; + automake just follows you guys where libtool is concerned. + + Tom + ------- Start of forwarded message ------- + From: pacman@cqc.com + Message-ID: <19980909050926.23045.qmail@defiant.cqc.com> + Subject: permission problems on things installed by automake + To: automake-bugs@gnu.org + Date: Wed, 9 Sep 1998 00:09:26 -0500 (EST) + + Two separate problems here. The first, I have complained about before, but + nobody took any interest in fixing it. mkinstalldirs creates directories with + bad permissions. Specifically, it creates directories by just using mkdir and + assuming that they the Public Directory Fairy will come along and make them + 755. This does not happen. Please, stop making unwarranted assumptions about + my umask. + + The second problem is that automake installs LTLIBRARIES by running libtool + install -m 644 (also known as $INSTALL_DATA). Shared libraries should really + be 755. If you just say "libtool install" without any -m, it will set the + right permissions on installed libraries: 644 for .a's and 755 for .so's. + -- + Alan Curry + + ------- End of forwarded message ------- + + From nobody Wed Oct 14 17:00:27 1998 + X-From-Line: gord@gnu.org Wed Sep 16 03:22:10 1998 + Return-Path: + Delivered-To: gord@trick.fig.org + Received: (qmail 17099 invoked from network); 16 Sep 1998 03:21:53 -0000 + Received: from gen2-93ip34.cadvision.com (HELO bambam.m-tech.ab.ca) (209.91.93.34) + by cs366707-a.cgmo1.ab.wave.home.com with SMTP; 16 Sep 1998 03:21:53 -0000 + Received: from mescaline.gnu.org (gateway [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id VAA22252 for ; Tue, 15 Sep 1998 21:19:11 -0600 + Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.1.11]) by mescaline.gnu.org (8.8.5/8.6.12GNU) with ESMTP id XAA27401 for ; Tue, 15 Sep 1998 23:19:47 -0400 + Received: from amazonas.dcc.unicamp.br (amazonas.dcc.unicamp.br [143.106.7.11]) + by grande.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id AAA21803; + Wed, 16 Sep 1998 00:17:29 -0300 (EST) + Received: from tiete.dcc.unicamp.br (tiete.dcc.unicamp.br [143.106.7.1]) + by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with SMTP id AAA10695; + Wed, 16 Sep 1998 00:17:30 -0300 (EST) + Sender: oliva@tiete.dcc.unicamp.br + To: tromey@cygnus.com + Cc: Libtool Bugs + Subject: Re: [pacman@cqc.com] permission problems on things installed by automake + References: + From: Alexandre Oliva + Date: 16 Sep 1998 00:17:26 +-300 + In-Reply-To: Tom Tromey's message of "15 Sep 1998 20:29:42 -0600" + Message-ID: + User-Agent: Gnus/5.070024 (Pterodactyl Gnus v0.24) XEmacs/20.4 (Emerald) + X-Emacs: 20.4 "Emerald" XEmacs Lucid with mule + MIME-Version: 1.0 (generated by SEMI 1.8.5 - "Nishi-Takaoka") + Content-Type: text/plain; charset=US-ASCII + Xref: trick.fig.org libtool:1610 + Lines: 27 + X-Gnus-Article-Number: 2 Mon Nov 2 17:19:58 1998 + + Tom Tromey writes: + + > From: pacman@cqc.com + + > The second problem is that automake installs LTLIBRARIES by running libtool + > install -m 644 (also known as $INSTALL_DATA). + + this is wrong, it was probably just cut&pasted from the rule for + LIBRARIES. libtools knows what is the right default permission to + assign to libraries, automake doesn't have to do it. Unless someone + has a good reason to do it. Maybe automake should define a macro such + as INSTALL_LTLIBRARY, empty by default, but that one could override + with additional arguments for libtool --mode=install + + Another alternative, that I don't like very much, is to let libtool + modify the modes of libraries: if they must be executable in the final + target, it just ensures that the installed .so has the executable bit + enabled wherever the read bit is enabled too. + + What do you think? + + -- + Alexandre Oliva + mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org + http://www.dcc.unicamp.br/~oliva + Universidade Estadual de Campinas, SP, Brasil + + From nobody Wed Oct 14 17:00:28 1998 + X-From-Line: otaylor@fresnel.labs.redhat.com Sun Sep 20 22:12:22 1998 + Return-Path: + Delivered-To: gord@trick.fig.org + Received: (qmail 1616 invoked from network); 20 Sep 1998 22:12:21 -0000 + Received: from gen2-93ip36.cadvision.com (HELO mail.fig.org) (209.91.93.36) + by cs366707-a.cgmo1.ab.wave.home.com with SMTP; 20 Sep 1998 22:12:21 -0000 + Received: (qmail 9059 invoked by uid 500); 20 Sep 1998 22:09:20 -0000 + Delivered-To: gord@fig.org + Received: (qmail 9056 invoked from network); 20 Sep 1998 22:09:19 -0000 + Received: from fresnel.labs.redhat.com (207.175.45.22) + by www.fig.org with SMTP; 20 Sep 1998 22:09:19 -0000 + Received: (from otaylor@localhost) + by fresnel.labs.redhat.com (8.8.7/8.8.7) id SAA25598; + Sun, 20 Sep 1998 18:18:38 -0400 + To: gord@fig.org + Subject: Automake and ltlibraries installation + From: Owen Taylor + Date: 20 Sep 1998 18:18:38 -0400 + Message-ID: + X-Mailer: Gnus v5.5/Emacs 20.2 + Xref: trick.fig.org libtool:1621 + Lines: 19 + X-Gnus-Article-Number: 3 Mon Nov 2 17:19:58 1998 + + + Recently, we've been using a modified version of libtool that enables + shared library dependencies on Linux. With that change, it becomes + desirable to be able to run ldd on the installed libraries. + + However, the libraries are installed without executable permissions. + + The relevant changelog entry seems to be: + + Tue Nov 25 14:20:42 1997 Tom Tromey + + * ltlib.am: Use INSTALL_DATA, not INSTALL_PROGRAM. From Gord + Matzigkeit. + + Do you happen to remember why this change was made? + + Thanks, + Owen + Index: libtool/mail/rpath diff -c /dev/null libtool/mail/rpath:1.2 *** /dev/null Thu Apr 29 16:20:56 1999 --- libtool/mail/rpath Mon Nov 2 20:30:15 1998 *************** *** 0 **** --- 1,112 ---- + From nobody Wed Oct 14 16:48:15 1998 + X-From-Line: manfred@s-direktnet.de Fri Jun 05 23:07:19 1998 + Return-Path: + Delivered-To: gord@trick.profitpress.com + Received: (qmail 21857 invoked from network); 5 Jun 1998 23:07:19 -0000 + Received: from unknown (HELO bambam.m-tech.ab.ca) (127.0.0.1) + by 127.0.0.1 with SMTP; 5 Jun 1998 23:07:19 -0000 + Received: from dallas.seitz.de (gateway [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id LAA21368 for ; Fri, 5 Jun 1998 11:20:42 -0600 + Received: from saturn.hollstein.net + (pf-net-host-248.seitz.de [193.155.171.248]) by dallas.seitz.de + (Netscape Mail Server v2.02) with ESMTP id AAD28613; + Fri, 5 Jun 1998 19:25:21 +0200 + Received: (from manfred@localhost) + by saturn.hollstein.net (8.8.7/8.8.7) id TAA00796; + Fri, 5 Jun 1998 19:03:53 +0200 + Date: Fri, 5 Jun 1998 19:03:53 +0200 (MEST) + From: Manfred Hollstein + To: ddsinc09@ix.netcom.com, gord@profitpress.com + Cc: egcs@cygnus.com + Subject: Issues for libtool and/vs egcs (was: Re: can't resolve symbol '__register_frame_info') + In-Reply-To: <3576FDAF.EE503B4B@datadesign.com> + References: <35757FE9.87EEC06D@datadesign.com> + <13686.53201.340176.596631@saturn.hollstein.net> + <3576FDAF.EE503B4B@datadesign.com> + X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid + Message-ID: <13688.9050.615440.687287@saturn.hollstein.net> + Reply-To: manfred@s-direktnet.de, Manfred.Hollstein@ks.sel.alcatel.de + Mime-Version: 1.0 (generated by tm-edit 7.108) + Content-Type: text/plain; charset=US-ASCII + Xref: trick.profitpress.com mail.libtool:1479 + Lines: 41 + X-Gnus-Article-Number: 1 Mon Nov 2 17:20:09 1998 + + On Thu, 4 June 1998, 13:03:59, korbb@datadesign.com wrote: + + > Manfred Hollstein wrote: + > + > > To fix the problem, you should + > > + > > 1. Add all directories which contain _your_ private shared libs + > > to LD_RUN_PATH prior to linking your executables, and/or + > > 2. Add a -Wl,-rpath, for all these directories, or + > > 3. Remove all your own lib*.so files from your private directories. + > > + > > Since I didn't want to use KDE4's libjpeg.so, I removed libjpeg.so + > > (and libgdbm.so) from my private installation directory and re-linked + > > the particular applications; now ImageMagick is running like a charm. + > + > Excuse me? What happened to LD_LIBRARY_PATH? + > Are there *two* ways of specifying the same information? + > Also, for the particular application, I am using : + > + > ltmain.sh (GNU libtool) 1.2 + > + > which builds a shared lib for me and a magical shell script that + > is supposed to do the right thing when invoking the uninstalled + > program. So, does libtool need updating to work with egcs? + > + > + + Yep, some days ago the libtool maintainer asked about details what + need to be done in this area. + + I guess, the main reason for the problems is inconsistent usage of + `-Wl,-rpath,somedir' vs. LD_RUN_PATH; AFAIK, `-Wl,-rpath,...' disables + LD_RUN_PATH at linktime and LD_LIBRARY_PATH at runtime. + + I don't know, which way libtool is using, but I tend to strongly + recommend against using -Wl,-rpath. + + Other thoughts? + + manfred + + From nobody Wed Oct 14 16:48:18 1998 + X-From-Line: ian@cygnus.com Sat Jun 06 19:44:17 1998 + Return-Path: + Delivered-To: gord@trick.profitpress.com + Received: (qmail 28443 invoked from network); 6 Jun 1998 19:44:15 -0000 + Received: from unknown (HELO bambam.m-tech.ab.ca) (127.0.0.1) + by 127.0.0.1 with SMTP; 6 Jun 1998 19:44:15 -0000 + Received: from tweedledumb.cygnus.com (gateway [10.0.0.1]) by bambam.m-tech.ab.ca (8.8.5/8.6.9) with ESMTP id KAA32693 for ; Sat, 6 Jun 1998 10:38:53 -0600 + Received: from subrogation.cygnus.com (subrogation.cygnus.com [192.80.44.76]) + by tweedledumb.cygnus.com (8.8.5/8.8.5) with ESMTP id MAA08502; + Sat, 6 Jun 1998 12:44:42 -0400 (EDT) + Received: (ian@localhost) by subrogation.cygnus.com (950413.SGI.8.6.12/8.6.4) id MAA20367; Sat, 6 Jun 1998 12:44:42 -0400 + Date: Sat, 6 Jun 1998 12:44:42 -0400 + Message-Id: <199806061644.MAA20367@subrogation.cygnus.com> + From: Ian Lance Taylor + To: manfred@s-direktnet.de, Manfred.Hollstein@ks.sel.alcatel.de + CC: ddsinc09@ix.netcom.com, gord@profitpress.com, egcs@cygnus.com + In-reply-to: <13688.9050.615440.687287@saturn.hollstein.net> (message from + Manfred Hollstein on Fri, 5 Jun 1998 19:03:53 +0200 (MEST)) + Subject: Re: Issues for libtool and/vs egcs (was: Re: can't resolve symbol '__register_frame_info') + Xref: trick.profitpress.com mail.libtool:1480 + Lines: 14 + X-Gnus-Article-Number: 2 Mon Nov 2 17:20:09 1998 + + Date: Fri, 5 Jun 1998 19:03:53 +0200 (MEST) + From: Manfred Hollstein + + I guess, the main reason for the problems is inconsistent usage of + `-Wl,-rpath,somedir' vs. LD_RUN_PATH; AFAIK, `-Wl,-rpath,...' disables + LD_RUN_PATH at linktime and LD_LIBRARY_PATH at runtime. + + Using -rpath will indeed cause the linker to ignore LD_RUN_PATH (at + least, that is how the GNU linker behaves). However, it does not + cause the dynamic linker to ignore LD_LIBRARY_PATH when the executable + is run. + + Ian + Index: libtool/mdemo/.cvsignore diff -c /dev/null libtool/mdemo/.cvsignore:1.4.2.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/mdemo/.cvsignore Wed Mar 17 07:53:27 1999 *************** *** 0 **** --- 1,14 ---- + .deps + .libs + Makefile + Makefile.in + acinclude.m4 + aclocal.m4 + configure + config.* + conftest* + libtool + *.lo + *.la + mdemo + mdemo.static Index: libtool/mdemo/Makefile.am diff -c /dev/null libtool/mdemo/Makefile.am:1.34.2.3 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/mdemo/Makefile.am Wed Mar 31 01:33:30 1999 *************** *** 0 **** --- 1,48 ---- + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = no-dependencies foreign + + INCLUDES = -I$(srcdir)/../libltdl + + EXTRA_DIST = acinclude.m4 + + lib_LTLIBRARIES = foo1.la libfoo2.la + + foo1_la_SOURCES = foo1.c + foo1_la_LIBADD = $(LIBM) + foo1_la_LDFLAGS = -module -avoid-version + + libfoo2_la_SOURCES = foo2.c + libfoo2_la_LIBADD = $(LIBM) + libfoo2_la_LDFLAGS = -module -export-symbols-regex "libfoo2.*" + + noinst_HEADERS = foo.h + + bin_PROGRAMS = mdemo mdemo.static + + ## use @LIBLTDL@ because some broken makes do not accept macros in targets + ## we can only do this because our LIBLTDL does not contain ${top_builddir} + @LIBLTDL@: ../libtool ../libltdl/libtool ../libltdl/config.h \ + $(srcdir)/../libltdl/ltdl.c $(srcdir)/../libltdl/ltdl.h + (cd ../libltdl; $(MAKE) `echo $(LIBLTDL) | sed 's,.*\.\./libltdl/,,g'`) + # Without the following line, the check may fail if libltdl/libtool is + # removed after libltdl is configured + ../libltdl/libtool ../libltdl/config.h: + + # Create a version of mdemo that does dlopen. + mdemo_SOURCES = main.c + mdemo_LDFLAGS = -export-dynamic + ## The quotes around -dlopen below fool automake into accepting it + mdemo_LDADD = @LIBLTDL@ "-dlopen" self \ + "-dlopen" foo1.la "-dlopen" libfoo2.la + mdemo_DEPENDENCIES = @LIBLTDL@ foo1.la libfoo2.la + + # Create a statically linked version of mdemo. + mdemo_static_SOURCES = $(mdemo_SOURCES) + mdemo_static_LDFLAGS = $(STATIC) $(mdemo_LDFLAGS) + mdemo_static_LDADD = $(mdemo_LDADD) + mdemo_static_DEPENDENCIES = $(mdemo_DEPENDENCIES) + + $(OBJECTS): libtool + libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status --recheck Index: libtool/mdemo/README diff -c /dev/null libtool/mdemo/README:1.4 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/mdemo/README Tue Jan 12 21:42:47 1999 *************** *** 0 **** --- 1,10 ---- + This is mdemo, an example package that uses GNU libtool with an + Automake-generated environment to build two simple modules and + a program. + + It demonstrates how to build both dynamic and static libraries + that can be dlopened. mdemo uses libtool's portable dlopen + wrapper called "libltdl". + All exported symbols are prefixed with "libname_LTX_" to avoid + symbols conflicts, especially when linking statically. + libltdl will automatically cut the prefix off to get the real name. Index: libtool/mdemo/configure.in diff -c /dev/null libtool/mdemo/configure.in:1.15.2.3 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/mdemo/configure.in Thu Apr 29 12:17:14 1999 *************** *** 0 **** --- 1,34 ---- + dnl Process this file with autoconf to create configure. + + AC_INIT(main.c) + AM_INIT_AUTOMAKE(mdemo,0.1) + + AC_PROG_CC + AC_C_CONST + AC_EXEEXT + + dnl AC_LIBLTDL_CONVENIENCE(['${top_builddir}/../libltdl']) + dnl Since the package is flat, we need not use the line above, + dnl and not having macros in LIBLTDL allows us to build LIBLTDL + dnl on demand even with broken makes + AC_LIBLTDL_CONVENIENCE(../libltdl) + AC_SUBST(LIBLTDL) + + AC_LIBTOOL_DLOPEN + AM_PROG_LIBTOOL + AC_SUBST(LIBTOOL_DEPS) + + if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then + STATIC=-static + else + STATIC= + fi + AC_SUBST(STATIC) + + AC_CHECK_HEADERS(math.h) + + AC_CHECK_LIBM + AC_SUBST(LIBM) + + dnl Output the makefile + AC_OUTPUT(Makefile) Index: libtool/mdemo/foo.h diff -c /dev/null libtool/mdemo/foo.h:1.6 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/mdemo/foo.h Wed Jan 6 22:00:00 1999 *************** *** 0 **** --- 1,29 ---- + /* foo.h -- interface to the libfoo* libraries + Copyright (C) 1998-1999 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + /* Only include this header file once. */ + #ifndef _FOO_H_ + #define _FOO_H_ 1 + + /* Silly constants that the functions return. */ + #define HELLO_RET 0xe110 + #define FOO_RET 0xf00 + + #endif /* !_FOO_H_ */ Index: libtool/mdemo/foo1.c diff -c /dev/null libtool/mdemo/foo1.c:1.8 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/mdemo/foo1.c Sun Jan 10 20:16:29 1999 *************** *** 0 **** --- 1,56 ---- + /* foo1.c -- trivial test library + Copyright (C) 1998-1999 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "foo.h" + #include + + #ifdef HAVE_MATH_H + #include + #endif + + #define nothing foo1_LTX_nothing + #define foo1 foo1_LTX_foo1 + #define hello foo1_LTX_hello + + /* Give a global variable definition. */ + int nothing; + + /* private function */ + int + _foo1_helper() + { + return FOO_RET; + } + + /* exported functions */ + + int + foo1() + { + printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0)); + return _foo1_helper(); + } + + int + hello() + { + printf ("** This is foolib 1 **\n"); + return HELLO_RET; + } Index: libtool/mdemo/foo2.c diff -c /dev/null libtool/mdemo/foo2.c:1.7 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/mdemo/foo2.c Sat Jan 9 10:51:44 1999 *************** *** 0 **** --- 1,56 ---- + /* foo2.c -- trivial test library + Copyright (C) 1998-1999 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "foo.h" + #include + + #ifdef HAVE_MATH_H + #include + #endif + + #define nothing libfoo2_LTX_nothing + #define foo2 libfoo2_LTX_foo2 + #define hello libfoo2_LTX_hello + + /* Give a global variable definition. */ + int nothing; + + /* private function */ + int + _foo2_helper() + { + return FOO_RET; + } + + /* exported functions */ + + int + foo2() + { + printf ("sin (0.0) = %g\n", (double) sin ((double) 0.0)); + return _foo2_helper(); + } + + int + hello() + { + printf ("** This is foolib 2 **\n"); + return HELLO_RET; + } Index: libtool/mdemo/main.c diff -c /dev/null libtool/mdemo/main.c:1.16 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/mdemo/main.c Thu Mar 11 23:13:00 1999 *************** *** 0 **** --- 1,175 ---- + /* main.c -- mdemo test program + Copyright (C) 1998-1999 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "foo.h" + #include "ltdl.h" + #include + + int + test_dl (filename) + char *filename; + { + lt_dlhandle handle; + int (*pfoo1)() = 0; + int (*pfoo2)() = 0; + int (*phello)() = 0; + int *pnothing = 0; + int ret = 0; + + handle = lt_dlopen(filename); + if (!handle) { + fprintf (stderr, "can't open the module %s!\n", filename); + fprintf (stderr, "error was: %s\n", lt_dlerror()); + return 1; + } + phello = (int(*)())lt_dlsym(handle, "hello"); + pfoo1 = (int(*)())lt_dlsym(handle, "foo1"); + pfoo2 = (int(*)())lt_dlsym(handle, "foo2"); + pnothing = (int*)lt_dlsym(handle, "nothing"); + + if (phello) + { + int value = (*phello) (); + + printf ("hello returned: %i\n", value); + if (value == HELLO_RET) + printf("hello is ok!\n"); + } + else + { + fprintf (stderr, "did not find the `hello' function\n"); + ret = 1; + } + + /* Try assigning to the nothing variable. */ + if (pnothing) + *pnothing = 1; + else + { + fprintf (stderr, "did not find the `nothing' variable\n"); + ret = 1; + } + + /* Just call the functions and check return values. */ + if (pfoo1) + { + if ((*pfoo1) () == FOO_RET) + printf("foo1 is ok!\n"); + else + ret = 1; + } + else if (pfoo2) + { + if ((*pfoo2) () == FOO_RET) + printf("foo2 is ok!\n"); + else ret = 1; + } + else + { + fprintf (stderr, "did not find the `foo' function\n"); + ret = 1; + } + + lt_dlclose(handle); + return ret; + } + + int + myfunc () + { + return HELLO_RET; + } + + int myvar; + + int + test_dlself () + { + lt_dlhandle handle; + int (*pmyfunc)() = 0; + int *pmyvar = 0; + int ret = 0; + + handle = lt_dlopen(0); + if (!handle) { + fprintf (stderr, "can't dlopen the program!\n"); + fprintf (stderr, "error was: %s\n", lt_dlerror()); + return 1; + } + pmyfunc = (int(*)())lt_dlsym(handle, "myfunc"); + pmyvar = (int*)lt_dlsym(handle, "myvar"); + + if (pmyfunc) + { + int value = (*pmyfunc) (); + + printf ("myfunc returned: %i\n", value); + if (value == HELLO_RET) + printf("myfunc is ok!\n"); + } + else + { + fprintf (stderr, "did not find the `myfunc' function\n"); + ret = 1; + } + + /* Try assigning to the variable. */ + if (pmyvar) + *pmyvar = 1; + else + { + fprintf (stderr, "did not find the `myvar' variable\n"); + ret = 1; + } + + lt_dlclose(handle); + return ret; + } + + int + main (argc, argv) + int argc; + char **argv; + { + int i; + int ret = 0; + + printf ("Welcome GNU libtool mdemo!\n"); + + if (argc < 2) { + fprintf (stderr, "usage: %s module [module...]\n", argv[0]); + } + + LTDL_SET_PRELOADED_SYMBOLS(); + if (lt_dlinit() != 0) { + fprintf (stderr, "error during initialization: %s\n", lt_dlerror()); + return 1; + } + + for (i = 1; i < argc; i++) + if (test_dl(argv[i])) + ret = 1; + + if (test_dlself()) + ret = 1; + + lt_dlexit(); + return ret; + } Index: libtool/tests/.cvsignore diff -c /dev/null libtool/tests/.cvsignore:1.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/.cvsignore Tue Oct 27 17:09:56 1998 *************** *** 0 **** --- 1,2 ---- + Makefile + Makefile.in Index: libtool/tests/ChangeLog diff -c libtool/tests/ChangeLog:1.1.1.27 libtool/tests/ChangeLog:removed *** libtool/tests/ChangeLog:1.1.1.27 Mon Mar 9 06:34:02 1998 --- libtool/tests/ChangeLog Thu Apr 29 16:21:36 1999 *************** *** 1,238 **** - 1998-03-08 Gordon Matzigkeit - - * tlibtool: Eliminate from distribution. - - * defs (libtool): Don't use tlibtool anymore, since we can now use - the generated libtool directly. - - 1998-02-18 Gordon Matzigkeit - - * sh.test (scripts): Remove the lineno script, since it is no - longer distributed. - - * assign.test, if.test, test-e.test: Even though 15 tests looks - impressive, these are now redundant. Remove them from the - distribution. - - * sh.test: Do what assign.test, if.test, and test-e.test used to - do. - - 1998-02-16 Gordon Matzigkeit - - * defs: Correctly identify absolute directory names on MS-DOS. - Suggested by Bob Friesenhahn. - - 1998-02-07 Gordon Matzigkeit - - * suffix.test (extensions): Added GNAT (GNU Ada Translator) - suffices, `.ada', `.ads', `.adb'. From Samuel Tardieu. - - 1998-01-23 Gordon Matzigkeit - - * Makefile.am (TESTS_ENVIRONMENT): Export some important - environment variables. Reported by Ian Haggard. - - 1998-01-18 Gordon Matzigkeit - - * suffix.test (extensions): Recognize `.asm'. From Markus - F.X.J. Oberhumer. - - 1997-12-05 Gordon Matzigkeit - - * suffix.test (extensions): Recognize `.s'. From Markus - F.X.J. Oberhumer. - - 1997-11-11 Gordon Matzigkeit - - * quote.test: Add backticks to the backslashify test. - - 1997-10-07 Gordon Matzigkeit - - * hardcode.test (hardcode_libdir_flag_spec): Check the hardcoding - properties of the flag_spec, too. - - 1997-09-21 Gordon Matzigkeit - - * defs, Makefile.am (clean-local): Change =inst to _inst to fix - portability on MS-DOS. From Robert Hoehne. - - 1997-09-15 Gordon Matzigkeit - - * hardcode.test (objdir): New variable to simplify change from - .libs to _libs (MS-DOS portability fix). - - 1997-09-05 Gordon Matzigkeit - - * demo-exec.test, demo-inst.test: Change references from - hell.static to hell.debug. - - * quote.test (echo): Add the same Digital Unix echo test fixes as - the ones to ltmain.sh.in from Todd Kover. - - * if.test, test-e.test (scripts): Add ../lineno to the scripts we - check. - * if.test: Check for accidental use of test X$something rather - than test "X$something". - - 1997-08-28 Gordon Matzigkeit - - * quote.test (echo): Change test to version that uses printf. - Be less strict about return results. - - 1997-08-27 Gordon Matzigkeit - - * quote.test (echo): Add the test for a non-backslash-mangling - echo. - - 1997-08-26 Gordon Matzigkeit - - * quote.test: New torture test for libtool metacharacter quoting. - - 1997-08-14 Gordon Matzigkeit - - * suffix.test (extensions): Added Objective C extension, `.m'. - - 1997-07-24 Gordon Matzigkeit - - * demo-exec.test (status): Use status variables so that we try to - execute all the programs. - - 1997-07-12 Gordon Matzigkeit - - * demo-exec.test, demo-inst.test: Check the new helldl program, - too. - - 1997-07-11 Gordon Matzigkeit - - * nomode.test: New test to make sure there is correct behaviour - when we don't specify a mode. - - 1997-06-30 Gordon Matzigkeit - - * if.test: New test to make sure that we haven't forgotten to - follow an `if' statement with a `test' command. This should avoid - the majority of hard-to-track bugs. - - 1997-06-19 Gordon Matzigkeit - - * demo-conf.test (CONFIG_SITE): Set to /dev/null, so that the - config.site file doesn't mess up our prefix. Reported by Joel - Weber. - - * demo-inst.test: Always run both hell.static and hell. - - * demo-conf.test: Always remove the local config.cache, but run - `make distclean' only if the Makefile exists. Otherwise, the demo - directory is not cleaned up if a user uses their own config.cache. - Reported by Joel Weber. - - 1997-04-16 Gordon Matzigkeit - - * hardcode.test: AIX also has arbitrary limits on the line length - of input to fgrep(1), so we need to translate NUL characters to - newlines in order to properly detect embedded `.libs'. From Bruno - Haible. - Also redirect stderr to /dev/null, so that AIX users don't get - worried by `fgrep: Maximum line length of 2048 exceeded.'. - - 1997-04-01 Gordon Matzigkeit - - * hardcode.test: AIX 3 doesn't have strings(1) so we need to do a - funny tr and pipe the output to fgrep. From Bruno Haible. - - 1997-02-03 Gordon Matzigkeit - - * Makefile.am (TESTS): Do the full make sequence with - --disable-shared, then without. - - * demo-sttc.test: Configure the demo directory with - --disable-shared. - - 1997-01-29 Gordon Matzigkeit - - * hardcode.test: Rewrite to use fgrep on output from ``strings - -a'' if using fgrep directly on the binary files fails. From Mark - Kettenis. - - 1997-01-28 Gordon Matzigkeit - - * hardcode.test: Make sure that ../demo/libhello.la really is a - shared library before running hardcoding tests. - - 1997-01-18 Gordon Matzigkeit - - * demo-conf.test: Use the CONFIG_SHELL environment variable when - running configure in the demo directory. From Bruno Haible. - - * Makefile.am (clean-local): Make distclean in the demo directory, - so that ``make clean; env CC=cc make check'' works as one would - expect. - - * demo-make.test: Fix typo (use $make instead of make). Reported - by Akim Demaille. - - 1997-01-16 Gordon Matzigkeit - - * tlibtool: Rewrote to grab all the settings from the generated - libtool script. - - * hardcode.test: Make allowances if shlibpath_var cannot be used - to find libraries at link time, such as on AIX. - - 1997-01-14 Gordon Matzigkeit - - * demo-conf.test, demo-inst.test, demo-unst.test, hardcode.test: - Use $make instead of make. - - * defs (make): Add definition of $make that uses the $MAKE - environment variable, if set. Suggested by Bruno Haible. - - * demo-unst.test (leftovers): Change the find command to ignore - files beginning with a dot, as egrep -v doesn't seem to do the - trick. Reported by Bruno Haible. - - 1997-01-13 Gordon Matzigkeit - - * hardcode.test: Added a test to make sure that libtool's idea of - hardcoding system linkers is correct. - - 1997-01-03 Gordon Matzigkeit - - * Makefile.am (distclean-local): Remove all files that the tests - may have created. Reported by Bruno Haible. - - * For all tests, discover srcdir when running from the command - line. - - * demo-unst.test: Don't fail if make uninstall doesn't delete - files beginning with a dot, since spurious .nfsXXX files may be - present when running NFS. Reported by Bruno Haible. - - 1997-01-02 Gordon Matzigkeit - - * suffix.test: New test to guarantee that libtool compile - recognizes valid source file suffices. - - 1996-12-08 Gordon Matzigkeit - - * demo.test: Break up into demo-conf.test, demo-make.test, - demo-exec.test, demo-inst.test, and demo-unst.test, so that passes - and failures are reported more quickly. - - * link-2.test: Test to make sure that .lo files don't get built - directly into programs. - - 1996-12-07 Gordon Matzigkeit - - * tlibtool: A typically-configured libtool script, that uses - ../ltmain.sh.in for its backend. - - * link.test: Make sure that it is legal to link against .a files. - - 1996-12-02 Gordon Matzigkeit - - * demo.test: Try compiling the ../demo subdirectory, with no - special options. - - * test-e.test: Check that we haven't used `test -e' anywhere in - our portable shell scripts. --- 0 ---- Index: libtool/tests/Makefile.am diff -c libtool/tests/Makefile.am:1.1.1.16 libtool/tests/Makefile.am:1.13.2.9 *** libtool/tests/Makefile.am:1.1.1.16 Mon Mar 9 06:34:02 1998 --- libtool/tests/Makefile.am Wed Apr 7 08:01:47 1999 *************** *** 1,19 **** ! ## Process this file with automake to create Makefile.in -*-Makefile-*- AUTOMAKE_OPTIONS = gnits ! makesequence = demo-make.test demo-exec.test \ ! demo-inst.test demo-unst.test hardcode.test ! TESTS = demo-conf.test $(makesequence) link.test link-2.test nomode.test \ quote.test sh.test suffix.test # Be sure to reexport important environment variables. TESTS_ENVIRONMENT = CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ ! LD="$(LD)" NM="$(NM)" RANLIB="$(RANLIB)" LN_S="$(LN_S)" EXTRA_DIST = defs $(TESTS) # We need to remove any files that the above tests created. clean-local: -test -f ../demo/Makefile && cd ../demo && $(MAKE) distclean rm -rf _inst --- 1,48 ---- ! ## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = gnits ! TESTS = cdemo-static.test cdemo-make.test cdemo-exec.test \ ! demo-static.test demo-make.test demo-exec.test \ ! demo-inst.test demo-unst.test \ ! mdemo-static.test mdemo-make.test mdemo-exec.test \ ! mdemo-inst.test mdemo-unst.test \ ! cdemo-conf.test cdemo-make.test cdemo-exec.test \ ! demo-conf.test demo-make.test demo-exec.test \ ! demo-inst.test demo-unst.test deplibs.test \ ! mdemo-conf.test mdemo-make.test mdemo-exec.test \ ! mdemo-inst.test mdemo-unst.test dryrun.test \ ! demo-nofast.test demo-make.test demo-exec.test \ ! demo-inst.test demo-unst.test \ ! cdemo-shared.test cdemo-make.test cdemo-exec.test \ ! demo-shared.test demo-make.test demo-exec.test demo-inst.test \ ! hardcode.test build-relink.test noinst-link.test demo-unst.test \ ! mdemo-shared.test mdemo-make.test mdemo-exec.test \ ! mdemo-inst.test mdemo-unst.test \ ! assign.test link.test link-2.test nomode.test \ quote.test sh.test suffix.test + cdemo-static.test: $(top_builddir)/libtool + + $(top_builddir)/libtool: + cd $(top_builddir) && $(MAKE) all + + # We should export these variables when we run ltconfig. + CFLAGS = @CFLAGS@ + CPPLAGS = @CPPFLAGS@ + LDFLAGS = @LDFLAGS@ + LIBS = @LIBS@ + # Be sure to reexport important environment variables. TESTS_ENVIRONMENT = CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ ! LD="$(LD)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \ ! LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" EXTRA_DIST = defs $(TESTS) # We need to remove any files that the above tests created. clean-local: + -test -f ../cdemo/Makefile && cd ../cdemo && $(MAKE) distclean -test -f ../demo/Makefile && cd ../demo && $(MAKE) distclean + -test -f ../mdemo/Makefile && cd ../mdemo && $(MAKE) distclean rm -rf _inst Index: libtool/tests/assign.test diff -c /dev/null libtool/tests/assign.test:1.1.1.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/assign.test Sun Jun 22 22:00:03 1997 *************** *** 0 **** --- 1,20 ---- + #! /bin/sh + # assign.test - check that we don't put break or continue on the same + # line as an assignment + + # Test script header. + need_prefix=no + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Check that test -e isn't used in our portable shell scripts. + if egrep -n '[^ ]=[^ ].*(break|continue)' $srcdir/../ltconfig $srcdir/../ltmain.sh; then + echo "cannot use \`break' or \`continue' on the same line as an assignment" + exit 1 + fi + + exit 0 Index: libtool/tests/build-relink.test diff -c /dev/null libtool/tests/build-relink.test:1.4.4.3 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/build-relink.test Sun Mar 21 12:25:20 1999 *************** *** 0 **** --- 1,113 ---- + #! /bin/sh + # build-relink.test - check to see whether shlibpath overrides runpath + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Check that things are built. + if test -f $prefix/lib/libhello.la && cd ../demo && test -f libhello.la; then : + else + echo "You must run demo-inst.test before $0" 1>&2 + exit 77 + fi + + # Check to make sure we have a dynamic library. + library_names=NONE + eval `egrep -e '^library_names=' ./libhello.la 2>/dev/null` + + if test "$library_names" = NONE; then + echo "library_names not set in ../demo/libhello.la" 1>&2 + exit 1 + elif test -z "$library_names"; then + echo "= Exiting: ../demo/libhello.la is not a shared library" + exit 77 + fi + + # Unfortunately, we need access to libtool internals for this test. + objdir=NONE + eval `egrep -e '^objdir=' ./libtool 2>/dev/null` + if test "$objdir" = NONE; then + echo "objdir not set in ../demo/libtool" 1>&2 + exit 1 + fi + + shlibpath_overrides_runpath=NONE + eval `egrep -e '^shlibpath_overrides_runpath=' ./libtool 2>/dev/null` + if test "$shlibpath_overrides_runpath" = NONE; then + echo "shlibpath_overrides_runpath not set in ../demo/libtool" 1>&2 + exit 1 + fi + + hardcode_action=NONE + eval `egrep -e '^hardcode_action=' ./libtool 2>/dev/null` + if test "$hardcode_action" = NONE; then + echo "hardcode_action not set in ../demo/libtool" 1>&2 + exit 1 + fi + + hardcode_direct=NONE + eval `egrep -e '^hardcode_direct=' ./libtool 2>/dev/null` + if test "$hardcode_direct" = NONE; then + echo "hardcode_direct not set in ../demo/libtool" 1>&2 + exit 1 + fi + + ./hell # so that it links on-demand if needed + + echo "removing libhello.la from ../demo" + rm -f libhello.la $objdir/libhello.* + + echo "running ../demo/hell" + if ./hell; then + : + elif test "x,$hardcode_action,$hardcode_direct" = x,relink,yes; then + echo "Ok, uninstalled programs fail after uninstalled libraries are removed" + echo "This works in other configurations, but not in this particular one" + else + echo "= Exiting: ../demo/hell does not run, maybe libhello was not installed" + exit 1 + fi + + echo "linking a broken ../demo/libhello.la" + if $make libhello.la libhello_la_OBJECTS=hello.lo; then + : + else + echo "= Exiting: cannot link broken libhello.la" + exit 1 + fi + rm -f libhello.la + + echo "running ../demo/hell with broken libhello.la" + if (./hell) 2>&1; then + echo "= Exiting: ../demo/hell runs even though libhello.la is incomplete" + echo "shlibpath_overrides_runpath should be set to no" + exit 1 + else + echo "Failed, as expected" + fi + + if test "x$hardcode_action" = xrelink; then + echo "= Exiting: install-time relinking is required" + exit 0 + fi + + if test "$shlibpath_overrides_runpath" != yes; then + rm -f $objdir/lt-hell || exit 1 + cp $objdir/hell $objdir/lt-hell || exit 1 + echo "running ../demo/hell with installed libhello.la" + if ./hell; then + echo "Worked, as expected" + else + echo "shlibpath_overrides_runpath should be set to yes" + status=1 + fi + rm -f $objdir/lt-hell + fi + + exit $status Index: libtool/tests/cdemo-conf.test diff -c /dev/null libtool/tests/cdemo-conf.test:1.1.4.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/cdemo-conf.test Fri Mar 19 18:58:37 1999 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # cdemo-conf.test - try configuring the ../cdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../cdemo || mkdir ../cdemo + + # Change to our build directory. + cd ../cdemo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../demo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../cdemo (prefix=$prefix)" + CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix || exit 1 + + if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/cdemo-exec.test diff -c /dev/null libtool/tests/cdemo-exec.test:1.1.4.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/cdemo-exec.test Fri Mar 19 18:58:38 1999 *************** *** 0 **** --- 1,28 ---- + #! /bin/sh + # cdemo-exec.test - check that programs in the ../cdemo subdirectory are viable + + # Test script header. + need_prefix=no + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + if test -f ../cdemo/cdemo; then : + else + echo "You must run cdemo-make.test before running $0" 1>&2 + exit 77 + fi + + # Check to see if the programs really run. + echo "Executing uninstalled programs in ../cdemo" + + if ../cdemo/cdemo; then : + else + echo "$0: cannot execute ../cdemo/cdemo" 1>&2 + status=1 + fi + + exit $status Index: libtool/tests/cdemo-make.test diff -c /dev/null libtool/tests/cdemo-make.test:1.1.4.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/cdemo-make.test Fri Mar 19 18:58:38 1999 *************** *** 0 **** --- 1,25 ---- + #! /bin/sh + # cdemo-make.test - try building in the ../cdemo subdirectory + + # Test script header. + need_prefix=no + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + if test -f ../cdemo/Makefile; then : + else + echo "You must run cdemo-conf.test before running $0" 1>&2 + exit 77 + fi + + # Change to our build directory. + cd ../cdemo || exit 1 + + # Do the actual build. + echo "Making in ../cdemo" + $make || exit 1 + exit 0 Index: libtool/tests/cdemo-shared.test diff -c /dev/null libtool/tests/cdemo-shared.test:1.1.4.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/cdemo-shared.test Fri Mar 19 18:58:38 1999 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # cdemo-conf.test - try configuring the ../cdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../cdemo || mkdir ../cdemo + + # Change to our build directory. + cd ../cdemo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../demo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-static" + CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-static || exit 1 + + if egrep '^build_old_libs=no' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/cdemo-static.test diff -c /dev/null libtool/tests/cdemo-static.test:1.2.4.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/cdemo-static.test Fri Mar 19 18:58:39 1999 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # cdemo-conf.test - try configuring the ../cdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../cdemo || mkdir ../cdemo + + # Change to our build directory. + cd ../cdemo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../demo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-shared" + CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-shared || exit 1 + + if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=no' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/demo-conf.test diff -c libtool/tests/demo-conf.test:1.1.1.6 libtool/tests/demo-conf.test:1.1.1.6.4.1 *** libtool/tests/demo-conf.test:1.1.1.6 Fri Jun 20 06:20:39 1997 --- libtool/tests/demo-conf.test Fri Mar 19 18:58:39 1999 *************** *** 27,30 **** --- 27,35 ---- echo "= Configuring in ../demo (prefix=$prefix)" CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix || exit 1 + if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + exit 0 Index: libtool/tests/demo-exec.test diff -c libtool/tests/demo-exec.test:1.1.1.8 libtool/tests/demo-exec.test:1.2.2.3 *** libtool/tests/demo-exec.test:1.1.1.8 Fri Sep 5 23:59:39 1997 --- libtool/tests/demo-exec.test Thu Apr 1 17:37:38 1999 *************** *** 13,28 **** if test -f ../demo/hell; then : else echo "You must run demo-make.test before running $0" 1>&2 ! exit 1 fi # Check to see if the programs really run. echo "Executing uninstalled programs in ../demo" status=0 ! if ../demo/hell.debug| grep 'Welcome to GNU Hell'; then : else ! echo "$0: cannot execute ../demo/hell.debug" 1>&2 status=1 fi --- 13,28 ---- if test -f ../demo/hell; then : else echo "You must run demo-make.test before running $0" 1>&2 ! exit 77 fi # Check to see if the programs really run. echo "Executing uninstalled programs in ../demo" status=0 ! if ../demo/hell.static| grep 'Welcome to GNU Hell'; then : else ! echo "$0: cannot execute ../demo/hell.static" 1>&2 status=1 fi Index: libtool/tests/demo-inst.test diff -c libtool/tests/demo-inst.test:1.1.1.9 libtool/tests/demo-inst.test:1.2.2.3 *** libtool/tests/demo-inst.test:1.1.1.9 Fri Sep 5 23:59:39 1997 --- libtool/tests/demo-inst.test Thu Apr 1 17:37:39 1999 *************** *** 14,20 **** if test -f ../demo/hell; then : else echo "You must run demo-make.test before $0" 1>&2 ! exit 1 fi # Change to our build directory. --- 14,20 ---- if test -f ../demo/hell; then : else echo "You must run demo-make.test before $0" 1>&2 ! exit 77 fi # Change to our build directory. *************** *** 25,33 **** echo "= Executing installed programs" status=0 ! if $prefix/bin/hell.debug | grep 'Welcome to GNU Hell'; then : else ! echo "$0: cannot execute $prefix/bin/hell.debug" 1>&2 status=1 fi --- 25,33 ---- echo "= Executing installed programs" status=0 ! if $prefix/bin/hell.static | grep 'Welcome to GNU Hell'; then : else ! echo "$0: cannot execute $prefix/bin/hell.static" 1>&2 status=1 fi Index: libtool/tests/demo-make.test diff -c libtool/tests/demo-make.test:1.1.1.3 libtool/tests/demo-make.test:1.1.1.3.4.1 *** libtool/tests/demo-make.test:1.1.1.3 Tue Apr 1 21:02:08 1997 --- libtool/tests/demo-make.test Fri Mar 19 18:58:40 1999 *************** *** 13,19 **** if test -f ../demo/Makefile; then : else echo "You must run demo-conf.test before running $0" 1>&2 ! exit 1 fi # Change to our build directory. --- 13,19 ---- if test -f ../demo/Makefile; then : else echo "You must run demo-conf.test before running $0" 1>&2 ! exit 77 fi # Change to our build directory. Index: libtool/tests/demo-nofast.test diff -c /dev/null libtool/tests/demo-nofast.test:1.1.4.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/demo-nofast.test Fri Mar 19 18:58:40 1999 *************** *** 0 **** --- 1,34 ---- + #! /bin/sh + # demo-nofast.test - try configuring the ../demo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../demo || mkdir ../demo + + # Change to our build directory. + cd ../demo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../demo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../demo (prefix=$prefix)" + CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --enable-fast-install=no || exit 1 + + if egrep '^hardcode_action=relink' libtool > /dev/null; then + rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/demo-shared.test diff -c /dev/null libtool/tests/demo-shared.test:1.1.4.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/demo-shared.test Fri Mar 19 18:58:40 1999 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # demo-conf.test - try configuring the ../demo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../demo || mkdir ../demo + + # Change to our build directory. + cd ../demo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../demo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../demo (prefix=$prefix) with --disable-static" + CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-static || exit 1 + + if egrep '^build_old_libs=no' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/demo-static.test diff -c /dev/null libtool/tests/demo-static.test:1.1.4.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/demo-static.test Fri Mar 19 18:58:41 1999 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # demo-conf.test - try configuring the ../demo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../demo || mkdir ../demo + + # Change to our build directory. + cd ../demo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../demo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../demo (prefix=$prefix) with --disable-shared" + CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-shared || exit 1 + + if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=no' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/demo-unst.test diff -c libtool/tests/demo-unst.test:1.1.1.3 libtool/tests/demo-unst.test:1.1.1.3.4.2 *** libtool/tests/demo-unst.test:1.1.1.3 Tue Apr 1 20:59:30 1997 --- libtool/tests/demo-unst.test Sun Mar 21 05:16:23 1999 *************** *** 10,24 **** fi . $srcdir/defs || exit 1 ! # Maybe we have a VPATH build, in which case, create a new subdir. ! if test "$prefix/bin/hell"; then : else echo "You must run demo-inst.test before $0." 1>&2 ! exit 1 fi - - # Change to our build directory. - cd ../demo || exit 1 echo "= Running $make uninstall in ../demo" $make uninstall || exit 1 --- 10,21 ---- fi . $srcdir/defs || exit 1 ! # Make sure it was installed already ! if test "$prefix/bin/hell" && cd ../demo && test -f Makefile; then : else echo "You must run demo-inst.test before $0." 1>&2 ! exit 77 fi echo "= Running $make uninstall in ../demo" $make uninstall || exit 1 Index: libtool/tests/deplibs.test diff -c /dev/null libtool/tests/deplibs.test:1.1.2.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/deplibs.test Thu Apr 1 17:37:39 1999 *************** *** 0 **** --- 1,34 ---- + #! /bin/sh + # deplibs.test - check whether the shared library check method is OK + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Check that things are built. + if test -f ../demo/libhello.la && cd ../demo; then : + else + echo "You must run demo-conf.test before $0" 1>&2 + exit 77 + fi + + echo "linking a shared library against a static library" + if $make deplibs-check && test -f hell0; then : + else + echo "= cannot build the test program, check your deplibs_check_method" + status=1 + fi + + echo "executing the test program" + if ./hell0; then : + else + echo "= cannot execute the test program, check your deplibs_check_method" + status=1 + fi + + exit $status Index: libtool/tests/dryrun.test diff -c /dev/null libtool/tests/dryrun.test:1.1.2.5 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/dryrun.test Wed Apr 7 21:35:58 1999 *************** *** 0 **** --- 1,105 ---- + #! /bin/sh + # dryrun.test - check whether the --dry-run mode works properly + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + if test -f ../mdemo/Makefile; then : + else + echo "You must run mdemo-conf.test before running $0" 1>&2 + exit 77 + fi + + # Change to our build directory. + cd ../mdemo || exit 1 + + echo "= Running $make clean in ../mdemo" + $make clean || exit 1 + + eval `$libtool --config | grep "^objdir="` + + # create `before' and `after' in a directory deep within objdir, + # so that their creation and removal does not modify even a timestamp + # in the output of `ls -l . $objdir' + for d in $objdir $objdir/temp $objdir/temp/temp; do + test -d $d || mkdir $d + done + before=$d/before + after=$d/after + + # Create a new libtool script that will enter dry run if the environment + # variable force_dry_run is set + rm -f $objdir/libtool.new + sed 's/^run=$/run=${force_dry_run+:}/' < libtool > $objdir/libtool.new + chmod +x $objdir/libtool.new + mv libtool $objdir/libtool + mv $objdir/libtool.new libtool + + # main.o is not compiled with libtool, but it depends on it, so make + # sure it is up-to-date + $make main.o || exit 1 + + echo "= Making object files in ../mdemo (dry run)" + ls -l . $objdir > $before + force_dry_run=yes $make foo1.lo foo2.lo || exit $? + ls -l . $objdir > $after + cmp $before $after > /dev/null || exit 1 + # Now really make them + echo "= Making object files in ../mdemo" + $make foo1.lo foo2.lo || exit 1 + + echo "= Making libraries in ../mdemo (dry run)" + ls -l . $objdir > $before + force_dry_run=yes $make foo1.la libfoo2.la || exit $? + ls -l . $objdir > $after + cmp $before $after > /dev/null || exit 1 + # Now really make them + echo "= Making libraries in ../mdemo" + $make foo1.la libfoo2.la || exit 1 + + echo "= Making programs in ../mdemo (dry run)" + ls -l . $objdir > $before + force_dry_run=yes $make mdemo mdemo.static 1>&2 || exit $? + ls -l . $objdir > $after + cmp $before $after > /dev/null || exit 1 + # Now really make them + echo "= Making programs in ../mdemo" + $make mdemo mdemo.static || exit 1 + + echo "= Running $make install in ../mdemo (dry run)" + # Libtool does not create these directories + mkdir $prefix/bin + mkdir $prefix/lib + ls -l . $objdir > $before + ls -lR $prefix >> $before + force_dry_run=yes $make install 1>&2 || exit 1 + ls -l . $objdir > $after + ls -lR $prefix >> $after + cmp $before $after > /dev/null || exit 1 + # Now really run it + echo "= Running $make install in ../mdemo" + $make install || exit 1 + + echo "= Running $make uninstall in ../mdemo (dry run)" + # Libtool does not uninstall the programs, remove them first + rm -f $prefix/bin/mdemo $prefix/bin/mdemo.static + ls -l . $objdir > $before + ls -lR $prefix >> $before + force_dry_run=yes $make uninstall 1>&2 || exit $? + ls -l . $objdir > $after + ls -lR $prefix >> $after + cmp $before $after > /dev/null || exit 1 + # Now really run it + echo "= Running $make uninstall in ../mdemo" + $make uninstall || exit 1 + + rm -f $before $after libtool + mv $objdir/libtool libtool + + exit 0 Index: libtool/tests/hardcode.test diff -c libtool/tests/hardcode.test:1.1.1.9 libtool/tests/hardcode.test:1.2.2.1 *** libtool/tests/hardcode.test:1.1.1.9 Sun Oct 19 20:53:23 1997 --- libtool/tests/hardcode.test Fri Mar 19 18:58:41 1999 *************** *** 2,8 **** # hardcode.test - check to see what the system linker hardcodes # Test script header. ! need_prefix=no if test -z "$srcdir"; then srcdir=`echo "$0" | sed 's%/[^/]*$%%'` test "$srcdir" = "$0" && srcdir=. --- 2,8 ---- # hardcode.test - check to see what the system linker hardcodes # Test script header. ! need_prefix=yes if test -z "$srcdir"; then srcdir=`echo "$0" | sed 's%/[^/]*$%%'` test "$srcdir" = "$0" && srcdir=. *************** *** 11,24 **** . $srcdir/defs || exit 1 # Check that things are built. ! if test -f ../demo/hell; then : else ! echo "You must run demo-make.test before $0" 1>&2 ! exit 1 fi - - # Change to our build directory. - cd ../demo || exit 1 # Unfortunately, we need access to libtool internals for this test. objdir=NONE --- 11,21 ---- . $srcdir/defs || exit 1 # Check that things are built. ! if test -f $prefix/lib/libhello.la && cd ../demo; then : else ! echo "You must run demo-inst.test before $0" 1>&2 ! exit 77 fi # Unfortunately, we need access to libtool internals for this test. objdir=NONE Index: libtool/tests/mdemo-conf.test diff -c /dev/null libtool/tests/mdemo-conf.test:1.4.2.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/mdemo-conf.test Fri Mar 19 18:58:42 1999 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # mdemo-conf.test - try configuring the ../mdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../mdemo || mkdir ../mdemo + + # Change to our build directory. + cd ../mdemo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../mdemo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../mdemo (prefix=$prefix)" + CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix || exit 1 + + if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/mdemo-exec.test diff -c /dev/null libtool/tests/mdemo-exec.test:1.8.2.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/mdemo-exec.test Fri Mar 19 18:58:42 1999 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # mdemo-exec.test - check that programs in the ../mdemo subdirectory are viable + + # Test script header. + need_prefix=no + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + if test -f ../mdemo/mdemo; then : + else + echo "You must run mdemo-make.test before running $0" 1>&2 + exit 77 + fi + + # Check to see if the programs really run. + echo "Executing uninstalled programs in ../mdemo" + + status=0 + if ../mdemo/mdemo.static ../mdemo/foo1.la ../mdemo/libfoo2.la; then : + else + echo "$0: cannot execute ../mdemo/mdemo.static" 1>&2 + status=1 + fi + + if ../mdemo/mdemo ../mdemo/foo1.la ../mdemo/libfoo2.la; then : + else + echo "$0: cannot execute ../mdemo/mdemo" 1>&2 + status=1 + fi + + exit $status Index: libtool/tests/mdemo-inst.test diff -c /dev/null libtool/tests/mdemo-inst.test:1.10.2.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/mdemo-inst.test Fri Mar 19 18:58:42 1999 *************** *** 0 **** --- 1,47 ---- + #! /bin/sh + # mdemo-inst.test - try installing from the ../mdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Check that things are built. + if test -f ../mdemo/mdemo; then : + else + echo "You must run mdemo-make.test before $0" 1>&2 + exit 77 + fi + + # Change to our build directory. + cd ../mdemo || exit 1 + + echo "= Running $make install in ../mdemo" + $make install || exit 1 + + echo "= Executing installed programs" + + status=0 + if $prefix/bin/mdemo.static $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then : + else + echo "$0: cannot execute $prefix/bin/mdemo.static" 1>&2 + status=1 + fi + + if $prefix/bin/mdemo $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then : + else + echo "$0: cannot execute $prefix/bin/mdemo" 1>&2 + + # Simple check to see if they are superuser. + if test -w /; then : + else + echo "You may need to run $0 as the superuser." + fi + status=1 + fi + + exit $status Index: libtool/tests/mdemo-make.test diff -c /dev/null libtool/tests/mdemo-make.test:1.5.4.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/mdemo-make.test Fri Mar 19 18:58:43 1999 *************** *** 0 **** --- 1,25 ---- + #! /bin/sh + # mdemo-make.test - try building in the ../mdemo subdirectory + + # Test script header. + need_prefix=no + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + if test -f ../mdemo/Makefile; then : + else + echo "You must run mdemo-conf.test before running $0" 1>&2 + exit 77 + fi + + # Change to our build directory. + cd ../mdemo || exit 1 + + # Do the actual build. + echo "Making in ../mdemo" + $make || exit 1 + exit 0 Index: libtool/tests/mdemo-shared.test diff -c /dev/null libtool/tests/mdemo-shared.test:1.2.2.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/mdemo-shared.test Fri Mar 19 18:58:43 1999 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # mdemo-conf.test - try configuring the ../mdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../mdemo || mkdir ../mdemo + + # Change to our build directory. + cd ../mdemo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../mdemo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-static" + CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-static || exit 1 + + if egrep '^build_old_libs=no' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/mdemo-static.test diff -c /dev/null libtool/tests/mdemo-static.test:1.2.2.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/mdemo-static.test Fri Mar 19 18:58:43 1999 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # mdemo-conf.test - try configuring the ../mdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../mdemo || mkdir ../mdemo + + # Change to our build directory. + cd ../mdemo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../mdemo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-shared" + CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-shared || exit 1 + + if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=no' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/mdemo-unst.test diff -c /dev/null libtool/tests/mdemo-unst.test:1.3.4.2 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/mdemo-unst.test Sun Mar 21 05:16:25 1999 *************** *** 0 **** --- 1,32 ---- + #! /bin/sh + # mdemo.test - try uninstalling in the ../mdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Make sure it was installed already + if test "$prefix/bin/hell" && cd ../mdemo && test -f Makefile; then : + else + echo "You must run mdemo-inst.test before $0." 1>&2 + exit 77 + fi + + echo "= Running $make uninstall in ../mdemo" + $make uninstall || exit 1 + + # See that there were no files leftover in $prefix. + # Ignore dotfiles, so that .nfsXXX files don't screw up the test. + leftovers=`find $prefix ! -type d ! -name '.*' -print` + if test -n "$leftovers"; then + echo "= Leftover after make uninstall:" + ls -l $leftovers + exit 1 + fi + + exit 0 Index: libtool/tests/noinst-link.test diff -c /dev/null libtool/tests/noinst-link.test:1.1.2.1 *** /dev/null Thu Apr 29 16:21:36 1999 --- libtool/tests/noinst-link.test Fri Mar 19 17:54:18 1999 *************** *** 0 **** --- 1,32 ---- + #! /bin/sh + # noinst-link.test - make sure we do not link with an installed + # library when an uninstalled one is to be used + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Check that things are built. + if test -f $prefix/lib/libhello.la && cd ../demo; then : + else + echo "You must run demo-inst.test before $0" 1>&2 + exit 77 + fi + + echo "removing libhello.la and hell from ../demo" + rm -f libhello.la hell + + echo "linking hell with a broken ../demo/libhello.la" + if $make hell libhello_la_OBJECTS=hello.lo; then + echo "= Succeeded: this means the installed library was used, which is wrong" + status=1 + fi + + rm -f libhello.la hell + + exit $status Index: libtool/tests/nomode.test diff -c libtool/tests/nomode.test:1.1.1.1 libtool/tests/nomode.test:1.2 *** libtool/tests/nomode.test:1.1.1.1 Sat Jul 12 03:37:13 1997 --- libtool/tests/nomode.test Wed Jan 20 23:12:51 1999 *************** *** 17,23 **** status=1 fi ! if $libtool 2>&1 | grep 'you must specify a MODE' >/dev/null; then : else echo "invalid error when no mode is specified" status=1 --- 17,24 ---- status=1 fi ! # The emoticon below works around a nasty bug in Ultrix /bin/sh ! if ($libtool 2>&1; :) | grep 'you must specify a MODE' >/dev/null; then : else echo "invalid error when no mode is specified" status=1 Index: libtool/tests/quote.test diff -c libtool/tests/quote.test:1.1.1.4 libtool/tests/quote.test:1.1.1.6 *** libtool/tests/quote.test:1.1.1.4 Fri Nov 14 19:04:44 1997 --- libtool/tests/quote.test Sun Apr 19 21:21:49 1998 *************** *** 14,41 **** status=0 echo=echo ! if test "X`$echo '\t'`" = 'X\t'; then : else ! # The Solaris and AIX default echo program unquotes backslashes. ! # This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' ! # So, we emulate echo with printf '%s\n' ! echo='printf %s\n' ! if test "X`$echo '\t'`" = 'X\t'; then : ! else ! # Oops. We have no working printf. Try to find a not-so-buggy echo. ! echo=echo ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" ! save_PATH="$PATH" ! PATH="$PATH":/usr/ucb ! for dir in $PATH; do ! if test -f $dir/echo && test X`$dir/echo '\t'` = 'X\t'; then ! echo="$dir/echo" ! break fi ! done ! IFS="$save_ifs" ! PATH="$save_PATH" fi fi --- 14,54 ---- status=0 echo=echo ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : else ! # The Solaris, AIX, and Digital Unix default echo programs unquote ! # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' ! # ! # So, first we look for a working echo in the user's PATH. ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" ! for dir in $PATH /usr/ucb; do ! if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then ! echo="$dir/echo" ! break ! fi ! done ! IFS="$save_ifs" ! ! if test "X$echo" = Xecho; then ! # We didn't find a better echo, so look for alternatives. ! if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then ! # This shell has a builtin print -r that does the trick. ! echo='print -r' ! elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then ! # If we have ksh, try running ltconfig again with it. ! CONFIG_SHELL=/bin/ksh ! export CONFIG_SHELL ! exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} ! else ! # Try using printf. ! echo='printf %s\n' ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : ! else ! # Oops. We lost completely, so just stick with echo. ! echo=echo fi ! fi fi fi Index: libtool/tests/sh.test diff -c libtool/tests/sh.test:1.1.1.1 libtool/tests/sh.test:1.4 *** libtool/tests/sh.test:1.1.1.1 Thu Mar 5 17:22:50 1998 --- libtool/tests/sh.test Sat Mar 13 23:20:33 1999 *************** *** 1,5 **** #! /bin/sh ! # if.test - check that we haven't forgotten a `test' command # Test script header. need_prefix=no --- 1,5 ---- #! /bin/sh ! # sh.test - check that we haven't forgotten a `test' command # Test script header. need_prefix=no *************** *** 34,40 **** # Check for using test X... instead of test "X... if egrep -n -e 'test[ ]+X' $scripts; then ! echo "use \`test "X..."' instead of \`test X'" status=1 fi --- 34,40 ---- # Check for using test X... instead of test "X... if egrep -n -e 'test[ ]+X' $scripts; then ! echo "use \`test \"X...\"' instead of \`test X'" status=1 fi *************** *** 47,52 **** --- 47,58 ---- # Check for problems with variable assignments. if egrep -n -e '[^ ]=[^ ].*(break|continue)' $scripts; then echo "assignments on the same line as a \`break' or \`continue' may have no effect" + status=1 + fi + + # Check for uses of Xsed without corresponding echo "X + if egrep -n -e '\$Xsed' $scripts | egrep -v -n -e '\$echo \\*"X'; then + echo "occurrences of \`\$Xsed\' without \`echo \"X\' on the same line" status=1 fi