This file contains context diffs between libtool version 1.0 and 1.1. Changes in files produced by Makeinfo and Autoconf have been omitted. You will need patch(1) and GNU autoconf to apply this patch. To apply this patch, cd to the main directory of the package and then run `patch -NZp1 < ../libtool-1.0f-1.0g.diff'. This avoids guesswork in choosing which subdirectory to find each file in. If you have a GNU patch older than version 2.4, or a non-GNU patch program, you should omit the `-Z' option (i.e. run `patch -Np1 ...'). Unfortunately, without `-Z', file timestamps will be incorrect, and you may need to obtain special tools in order to properly build this package. If you do not have these tools, then you should download libtool-1.1.tar.gz, rather than applying this patch. After applying this patch, you will need to manually run `autoreconf' to regenerate the configure script. Then, you may follow the instructions in the INSTALL file to build the package. diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/ChangeLog libtool-1.1/ChangeLog *** libtool-1.0/ChangeLog Tue Jul 8 18:34:04 1997 --- libtool-1.1/ChangeLog Mon Mar 9 04:50:43 1998 *************** *** 1,4 **** ! Tue Jul 8 11:01:27 1997 Gordon Matzigkeit * Release 1.0. --- 1,817 ---- ! 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. *************** *** 13,26 **** * README-automake: Remove from distribution. ! Wed Jul 2 19:13:00 1997 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. ! Tue Jul 1 13:03:49 1997 Gordon Matzigkeit * ltmain.sh.in, ltconfig.in: Eliminate uses of the NONE magic variable value. Use an empty variable instead. --- 826,839 ---- * 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. *************** *** 39,51 **** to indicate his preference. (AM_PROG_LIBTOOL): Use it. ! Mon Jun 30 22:32:05 1997 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. ! Sun Jun 29 19:51:50 1997 Gordon Matzigkeit * ltmain.sh.in: Change all the `eval "$run ..."' sequences to `$run "eval ..."'. --- 852,864 ---- 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 ..."'. *************** *** 61,77 **** * libtool.m4: Increment serial number, and require AC_PROG_LN_S. ! Thu Jun 26 17:55:26 1997 Gordon Matzigkeit * ltmain.sh.in (link): Add missing `test' statement. Reported by Akim Demaille. ! Tue Jun 24 14:58:41 1997 Gordon Matzigkeit * libtool.m4 (LD): Consistently use ac_cv_path_ld instead of am_cv_path_ld. From Tim Pierce. ! Fri Jun 20 08:21:34 1997 Gordon Matzigkeit * ltmain.sh.in: Redo two robustness fixes. Alexandre had the correct approach, but I botched them. --- 874,890 ---- * 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. *************** *** 79,98 **** * ltconfig.in (dynamic_linker): Disable shared libraries on MkLinux unless GNU libc is in use. Reported by Akim Demaille. ! Thu Jun 19 14:24:06 1997 Gordon Matzigkeit * ltmain.sh.in (install): Add a missing `test' command. Reported by Joel Weber. Miscellaneous fixes to improve robustness. From Alexandre Oliva. ! Sat Jun 14 21:01:03 1997 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. ! Fri Jun 13 14:18:23 1997 Gordon Matzigkeit * Makefile.am (demo/configure): Fix up rules to run autoconf. (aclocal.m4): Now we depend on our own libtool.m4. --- 892,911 ---- * 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. *************** *** 106,112 **** * ltmain.sh.in (install, uninstall): Support installing and uninstalling `.lo' files. From Jeff Dairiki. ! Wed Jun 11 11:04:59 1997 Gordon Matzigkeit * Makefile.am (ltconfig, ltmain.sh): Only move if $(srcdir) is not the current directory. Don't regenerate every time the package is --- 919,925 ---- * 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 *************** *** 114,120 **** (MAINTAINERCLEANFILES): Added ltconfig, ltmain.sh, so that $(srcdir) is not messed with during a regular clean. ! Tue Jun 10 12:26:00 1997 Gordon Matzigkeit * Makefile.am (ltconfig, ltmain.sh): Be sure to move these files into $(srcdir) once they are created. --- 927,933 ---- (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. *************** *** 122,130 **** * 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 Stephen Kulow. ! Sun Jun 8 12:10:14 1997 Gordon Matzigkeit * ltconfig.in (host_cpu, host_vendor, host_os): Patch up definitions, to allow for the fact that the host_os may contain --- 935,943 ---- * 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 *************** *** 136,147 **** can be found by programs that want to find a library's dlname by searching LD_LIBRARY_PATH. Reported by David Mosberger-Tang. ! Fri Jun 6 15:52:28 1997 Gordon Matzigkeit * Tell people to report bugs to the new libtool mailing list, . ! Thu Jun 5 10:40:15 1997 Gordon Matzigkeit * ltconfig.in (allow_undefined_flag): New variable that implements `-allow-undefined'. --- 949,960 ---- 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'. *************** *** 153,169 **** unresolved symbols to exist in shared libraries. Basically, this turns off shared libraries on AIX. Suggested by Ian Lance Taylor. ! Mon May 26 08:24:55 1997 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. ! Sat May 10 12:21:58 1997 Gordon Matzigkeit * ltconfig.in: Trivial port to FreeBSD 3. From David Nugent. ! Fri Apr 25 13:23:33 1997 Gordon Matzigkeit * ltmain.sh.in (link): Remove all traces of `-whole-archive', `-no-whole-archive', and libtool convenience libraries. They were --- 966,982 ---- 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 *************** *** 174,180 **** off static library creation. From Tom Lees (who finally convinced me that it was the Right Thing to do). ! Tue Apr 22 12:41:34 1997 Gordon Matzigkeit * ltmain.sh.in (hardcode_runpath_var, runpath_var): Use them, if the linker has no -rpath flag. --- 987,993 ---- 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. *************** *** 189,222 **** * ltmain.sh.in (dlname): Distinguish between missing `-export-dynamic' and when the library is only statically linked. ! Mon Apr 21 09:52:51 1997 Gordon Matzigkeit * ltconfig.in: Trivial port to OpenBSD by making it an alias for NetBSD. From Tim Pierce. ! Wed Apr 16 19:32:05 1997 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. ! Sun Apr 13 19:40:58 1997 Gordon Matzigkeit * ltmain.sh.in (mode): Use `egrep -e' when inferring the operation mode. ! Sat Apr 12 13:09:24 1997 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. ! Mon Apr 7 09:39:02 1997 Gordon Matzigkeit * ltconfig.in (hardcode_action): Fix silly logic error. From Bruno Haible. ! Sat Apr 5 11:26:06 1997 Gordon Matzigkeit * ltmain.sh.in (install): Relink if hardcode_action is `relink', rather than using complex conditionals based on the other --- 1002,1035 ---- * 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 *************** *** 227,233 **** conditionals to make the intent clearer, otherwise this can be one hellish piece of code for the already-dizzy libtool maintainer. ! Wed Apr 2 10:36:31 1997 Gordon Matzigkeit * replfunc.m4: Delete from the distribution. Documentation now describes how to set LTALLOCA and LTLIBOBJS in your own --- 1040,1046 ---- 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 *************** *** 239,245 **** symlinking to the real object. This helps invalid mixtures of PIC and non-PIC to fail. ! Tue Apr 1 10:01:20 1997 Gordon Matzigkeit * Makefile.am (EXTRA_DIST): Distribute libtool.prj. --- 1052,1058 ---- 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. *************** *** 285,291 **** * ltconfig.in (verify_host): Remove redundant `Transform *-*-linux* to *-*-linux-gnu*'. From Bruno Haible. ! Mon Mar 31 16:15:03 1997 Gordon Matzigkeit * Makefile.am: Use the new AUTOMAKE and ACLOCAL variables. --- 1098,1104 ---- * 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. *************** *** 293,299 **** exist, and the user specified -whole-archive. Fix shell quoting that was breaking @OUTPUT@ substitution. ! Fri Mar 28 19:09:08 1997 Gordon Matzigkeit * ltmain.sh.in (link): Use the hardcode_libdir_separator. Convenience libraries are libtool objects if we're not building --- 1106,1112 ---- 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 *************** *** 320,332 **** Added `-whole-archive' and `-no-whole-archive' to manipulate convenience libraries. ! Thu Mar 27 15:55:34 1997 Gordon Matzigkeit * ltmain.sh.in (link): Allow the creation of static convenience libraries made of libtool objects. Suggested by David Mosberger-Tang. ! Tue Mar 25 08:38:23 1997 Gordon Matzigkeit * ltconfig.in: On AIX, libtool also needs to look for `B' symbols in nm output. These are global variable definitions. --- 1133,1145 ---- 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. *************** *** 343,356 **** * configure.in: Find out the user-supplied CC, LD, RANLIB. From Carl D. Roth. ! Mon Mar 24 01:26:48 1997 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. ! Sat Mar 15 14:15:43 1997 Gordon Matzigkeit * demo/main.c: Use it. --- 1156,1169 ---- * 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. *************** *** 359,372 **** * demo/foo.c: Added definition of `nothing' so that we have an global variable definition, as well as functions. ! Wed Mar 12 19:00:44 1997 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. ! Sat Feb 22 12:47:59 1997 Gordon Matzigkeit * ltconfig.in, ltmain.sh.in (hardcode_libdir_flag_spec): Renamed from `hardcode_libdir_flag'. --- 1172,1185 ---- * 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'. *************** *** 378,414 **** * replfunc.m4: Add AM_FUNC_ALLOCA, AM_FUNC_MEMCMP, and AM_STRUCT_ST_BLOCKS. ! Tue Feb 18 09:36:24 1997 Gordon Matzigkeit * ltconfig.in: Transform *-*-linux* to *-*-linux-gnu* to support old-style config.guess scripts. ! Mon Feb 17 23:30:32 1997 Gordon Matzigkeit * ltmain.sh.in: Create objdir *before* linking a program into it. ! Wed Feb 12 01:20:45 1997 Gordon Matzigkeit * ltconfig.in: Any ld --version that returns GNU is probably a GNU ld. From Marcus Daniels. * libtool.m4: Added AM_REPLACE_FUNCS. ! Tue Feb 11 01:28:19 1997 Gordon Matzigkeit * ltconfig.in: Trivial port to *-*-osf4. From Bruno Haible. ! Mon Feb 10 09:54:07 1997 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. ! Fri Feb 7 08:37:54 1997 Gordon Matzigkeit * doc/platforms.texi: Yaay! We found a workaround for HP-UX /bin/sh buffer overflows. From Eric Backus. ! Mon Feb 3 11:15:01 1997 Gordon Matzigkeit * Release 0.9. --- 1191,1227 ---- * 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. *************** *** 426,432 **** hardcode_libdir_flag. (hardcode_action): New variable to simplify ltmain.sh. ! Wed Jan 29 12:58:00 1997 Gordon Matzigkeit * ltmain.sh.in: Change to take advantage of linkers that don't hardcode direct libraries. --- 1239,1245 ---- 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. *************** *** 440,461 **** * demo/foo.c (foo): Change to use the `cos' function, so that we need to link against another library. ! Tue Jan 28 20:32:19 1997 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]. ! Sun Jan 26 15:50:07 1997 Gordon Matzigkeit * Release 0.8. ! Fri Jan 24 23:32:03 1997 Gordon Matzigkeit * Makefile.am (demo_distfiles): Add demo/acinclude.m4 to the distribution. ! Wed Jan 22 17:22:17 1997 Gordon Matzigkeit * libtool.m4: For IRIX 6, ld needs -n32 if cc uses it. Reported by Bruno Haible. --- 1253,1274 ---- * 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. *************** *** 463,469 **** * ltconfig.in: IRIX ld does not hardcode direct libraries. Reported by Bruno Haible. ! Sat Jan 18 15:15:12 1997 Gordon Matzigkeit * ltconfig.in, ltmain.sh.in (hardcode_shlibpath_var): Allow new value, `unsupported', since most linkers do not allow you to use --- 1276,1282 ---- * 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 *************** *** 474,480 **** (archive_cmds): Fix not to use +h on HP-UX 9.x. Reported by Bruno Haible. ! Fri Jan 17 09:58:22 1997 Gordon Matzigkeit * libtoolize.in: Handle explicit AC_CONFIG_AUX_DIR settings. Suggested by Akim Demaille. --- 1287,1293 ---- (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. *************** *** 482,488 **** * libtool.m4: Change ltconfig line to use $CONFIG_SHELL when it is specified. Reported by Bruno Haible. ! Thu Jan 16 17:57:38 1997 Gordon Matzigkeit * demo/Makefile.am (hc-direct): Do better searching for the proper name to do a direct link. --- 1295,1301 ---- * 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. *************** *** 512,580 **** then retry without it, but still use the .a versions of uninstalled libtool archives. ! Wed Jan 15 08:59:22 1997 Gordon Matzigkeit * ltmain.sh.in (link): Eval $link_static_flag. Reported by Bruno Haible. * PLATFORMS: Add to distribution. Suggested by Bruno Haible. ! Mon Jan 13 12:59:29 1997 Gordon Matzigkeit ! * ltconfig.in: Add support for SCO OpenServer 5.x. (can_build_shared): Initialize at the top of the file, so that shared libraries aren't built on platforms that don't support them. ! Sat Jan 11 13:29:08 1997 Gordon Matzigkeit * ltmain.sh.in, ltconfig.in, libtoolize.in, doc/libtool.texi: Update the copyright completion years. ! Wed Jan 8 15:01:06 1997 Gordon Matzigkeit * ltconfig.in: Port to IRIX 5.3, 6.2. ! Mon Jan 6 08:54:00 1997 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. ! Fri Jan 3 17:26:07 1997 Gordon Matzigkeit * ltmain.sh.in (link): On at least SunOS, /bin/sh doesn't understand "export something=val". From Bruno Haible. ! Thu Jan 2 13:04:17 1997 Gordon Matzigkeit * ltmain.sh.in (compile): Recognize valid source file suffixes for Fortran and C++. ! Tue Dec 17 23:17:17 1996 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. ! Mon Dec 16 20:16:35 1996 Gordon Matzigkeit * ltmain.sh.in (link): Delete the `libtool' version type. ! Thu Dec 12 00:04:27 1996 Gordon Matzigkeit * ltconfig.in: Use the full autoconf syntax when checking for GNU C. Delete library stripping program, until we have a correct test. ! Wed Dec 11 11:41:33 1996 Gordon Matzigkeit * ltconfig.in: On AIX 3, use /usr/ucb/nm, not /ucb/nm. From ir. M.M. Kettenis. ! Mon Dec 9 12:06:31 1996 Gordon Matzigkeit Reported by Charles Kerr: * doc/libtool.texi (Creating Object Files): Doc fix independant -> --- 1325,1394 ---- 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 -> *************** *** 583,589 **** * ltconfig.in (ld_shlibs): SunOS 4 doesn't support shared library dependencies. ! Sun Dec 8 14:39:04 1996 Gordon Matzigkeit * Release 0.7. --- 1397,1403 ---- * ltconfig.in (ld_shlibs): SunOS 4 doesn't support shared library dependencies. ! 1996-12-08 Gordon Matzigkeit * Release 0.7. *************** *** 602,608 **** * ltmain.sh.in: Don't force people to use libNAME.la: SOMETHING.la is good enough (for consistency with *.a handling). ! Sat Dec 7 12:31:15 1996 Gordon Matzigkeit * ltmain.sh.in (link): Accept files ending in .a as standard object files. Reported by Ulrich Drepper. --- 1416,1422 ---- * 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. *************** *** 613,619 **** * ltconfig.in (thisdir): How embarrassing! An error in the regexp for finding the directory component of the script path. ! Thu Dec 5 14:19:21 1996 Gordon Matzigkeit * ltmain.sh.in (compile): Support `.S' (preprocessed assembler) files. Reported by Anthony Green. --- 1427,1433 ---- * 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. *************** *** 624,630 **** * ltconfig.in, ltmain.sh.in (link): Add support for creating reloadable objects. ! Wed Dec 4 00:42:53 1996 Gordon Matzigkeit * ltmain.sh.in (install): Fix passing -n flag to `libtool --finish'. --- 1438,1444 ---- * 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'. *************** *** 633,639 **** into programs and creating static archives. Suggested by Ulrich Drepper. ! Tue Dec 3 10:43:22 1996 Gordon Matzigkeit * ltmain.sh.in (link): Give the full path to the libtool library when sourcing it. --- 1447,1453 ---- 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. *************** *** 641,647 **** * ltconfig.in (old_striplib): Do a configuration test to determine if old-style libraries actually can be stripped or not. ! Mon Dec 2 13:57:28 1996 Gordon Matzigkeit * ltconfig.in: Delete reference to ABOUT-LIBS. --- 1455,1461 ---- * 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. *************** *** 660,666 **** * demo: Also test Automake's ansi2knr support. ! Tue Nov 19 14:09:27 1996 Gordon Matzigkeit * ltconfig.in: Bug fixes for AIX 4, and for static platforms. --- 1474,1480 ---- * demo: Also test Automake's ansi2knr support. ! 1996-11-19 Gordon Matzigkeit * ltconfig.in: Bug fixes for AIX 4, and for static platforms. *************** *** 672,678 **** * ltconfig.in: Check for library stripping program. Use test -f instead of test -e. ! Mon Nov 18 20:10:42 1996 Gordon Matzigkeit * ltconfig.in: Don't run the RANLIB test unless RANLIB wasn't set. --- 1486,1492 ---- * 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. *************** *** 681,696 **** * ltmain.sh.in (objdir): change to .libs. ! Sat Nov 16 12:02:03 1996 Gordon Matzigkeit * ltmain.sh.in (install): Just plunge ahead with the installation... don't try to enforce dependencies. ! Fri Nov 15 17:57:36 1996 Gordon Matzigkeit * ltmain.sh.in: Fix up $libdir to be $dest in install mode. ! Sun Nov 10 13:08:04 1996 Gordon Matzigkeit * ltmain.sh: Finished rewrite of compile, link, and install modes. --- 1495,1510 ---- * 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. *************** *** 698,703 **** * New ChangeLog file for libtool-0.7, since I've totally rewritten libtool. ! Fri Mar 15 14:21:15 1996 Gord Matzigkeit * For historical reasons: this is when I started writing libtool. --- 1512,1517 ---- * 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. diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/Makefile.am libtool-1.1/Makefile.am *** libtool-1.0/Makefile.am Tue Jul 8 17:00:49 1997 --- libtool-1.1/Makefile.am Sat Mar 7 23:17:38 1998 *************** *** 9,16 **** aclocal_macros = libtool.m4 ! EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.sh.in \ ! libtool.prj CLEANFILES = libtool libtoolize MAINTAINERCLEANFILES = ltconfig ltmain.sh --- 9,16 ---- 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 *************** *** 18,24 **** 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/hello.c demo/main.c demo/run.test # These are required by libtoolize. pkgdata_SCRIPTS = config.guess config.sub ltconfig --- 18,24 ---- 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 *************** *** 31,57 **** # The standalone libtool script, and the libtool distributor. bin_SCRIPTS = libtool libtoolize ! libtool: ltconfig ! @echo 'WARNING: Warnings from ltconfig can be ignored. :-)' CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ ! LD="$(LD)" LN_S="$(LN_S)" RANLIB="$(RANLIB)" \ ! $(srcdir)/ltconfig --srcdir=$(srcdir) $(pkgdatadir)/ltmain.sh libtoolize: libtoolize.in $(top_builddir)/config.status CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status chmod +x libtoolize ! # These depend on configure.in (rather then config.status) so that version ! # numbers are correctly updated. ! # This way, they aren't regenerated after people configure the package. ! $(srcdir)/ltconfig: ltconfig.in configure.in CONFIG_FILES=ltconfig CONFIG_HEADERS= $(top_builddir)/config.status ! chmod +x ltconfig ! test "$(srcdir)" = . || mv ltconfig $(srcdir)/ltconfig ! ! $(srcdir)/ltmain.sh: ltmain.sh.in configure.in ! CONFIG_FILES=ltmain.sh CONFIG_HEADERS= $(top_builddir)/config.status ! test "$(srcdir)" = . || mv ltmain.sh $(srcdir)/ltmain.sh # Distribute the demo subdirectory. dist-hook: $(demo_distfiles) --- 31,58 ---- # 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 CONFIG_FILES=ltconfig CONFIG_HEADERS= $(top_builddir)/config.status ! $(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) *************** *** 71,80 **** all: demo/Makefile.in demo/configure # We use our own libtool.m4. ! $(srcdir)/aclocal.m4: acinclude.m4 ! $(srcdir)/acinclude.m4: rm -f $(srcdir)/acinclude.m4 ! ln -s libtool.m4 $(srcdir)/acinclude.m4 # Rules for rebuilding some of the demo source files. $(srcdir)/demo/Makefile.in: demo/Makefile.am demo/configure.in demo/aclocal.m4 --- 72,83 ---- 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 *************** *** 86,91 **** $(srcdir)/demo/aclocal.m4: demo/configure.in demo/acinclude.m4 cd $(srcdir)/demo && $(ACLOCAL) ! $(srcdir)/demo/acinclude.m4: ! rm -f $(srcdir)/demo/acinclude.m4 ! ln -s ../libtool.m4 $(srcdir)/demo/acinclude.m4 --- 89,123 ---- $(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 "=============================" diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/Makefile.in libtool-1.1/Makefile.in *** libtool-1.0/Makefile.in Tue Jul 8 19:54:25 1997 --- libtool-1.1/Makefile.in Mon Mar 9 05:31:12 1998 *************** *** 51,61 **** --- 51,63 ---- POST_UNINSTALL = true host_alias = @host_alias@ host_triplet = @host@ + AWK = @AWK@ CC = @CC@ LD = @LD@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ + NM = @NM@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ *************** *** 70,77 **** aclocal_macros = libtool.m4 ! EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.sh.in \ ! libtool.prj CLEANFILES = libtool libtoolize MAINTAINERCLEANFILES = ltconfig ltmain.sh --- 72,79 ---- 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 *************** *** 79,85 **** 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/hello.c demo/main.c demo/run.test # These are required by libtoolize. pkgdata_SCRIPTS = config.guess config.sub ltconfig --- 81,87 ---- 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 *************** *** 91,96 **** --- 93,108 ---- # The standalone libtool script, and the libtool distributor. bin_SCRIPTS = libtool libtoolize + + ###################################################################### + # 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = *************** *** 397,423 **** maintainer-clean-generic clean mostlyclean distclean maintainer-clean ! libtool: ltconfig ! @echo 'WARNING: Warnings from ltconfig can be ignored. :-)' CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ ! LD="$(LD)" LN_S="$(LN_S)" RANLIB="$(RANLIB)" \ ! $(srcdir)/ltconfig --srcdir=$(srcdir) $(pkgdatadir)/ltmain.sh libtoolize: libtoolize.in $(top_builddir)/config.status CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status chmod +x libtoolize ! # These depend on configure.in (rather then config.status) so that version ! # numbers are correctly updated. ! # This way, they aren't regenerated after people configure the package. ! $(srcdir)/ltconfig: ltconfig.in configure.in CONFIG_FILES=ltconfig CONFIG_HEADERS= $(top_builddir)/config.status ! chmod +x ltconfig ! test "$(srcdir)" = . || mv ltconfig $(srcdir)/ltconfig ! ! $(srcdir)/ltmain.sh: ltmain.sh.in configure.in ! CONFIG_FILES=ltmain.sh CONFIG_HEADERS= $(top_builddir)/config.status ! test "$(srcdir)" = . || mv ltmain.sh $(srcdir)/ltmain.sh # Distribute the demo subdirectory. dist-hook: $(demo_distfiles) --- 409,436 ---- maintainer-clean-generic clean mostlyclean distclean maintainer-clean ! 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 CONFIG_FILES=ltconfig CONFIG_HEADERS= $(top_builddir)/config.status ! $(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) *************** *** 437,446 **** all: demo/Makefile.in demo/configure # We use our own libtool.m4. ! $(srcdir)/aclocal.m4: acinclude.m4 ! $(srcdir)/acinclude.m4: rm -f $(srcdir)/acinclude.m4 ! ln -s libtool.m4 $(srcdir)/acinclude.m4 # Rules for rebuilding some of the demo source files. $(srcdir)/demo/Makefile.in: demo/Makefile.am demo/configure.in demo/aclocal.m4 --- 450,461 ---- 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 *************** *** 452,460 **** $(srcdir)/demo/aclocal.m4: demo/configure.in demo/acinclude.m4 cd $(srcdir)/demo && $(ACLOCAL) ! $(srcdir)/demo/acinclude.m4: ! rm -f $(srcdir)/demo/acinclude.m4 ! ln -s ../libtool.m4 $(srcdir)/demo/acinclude.m4 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- 467,494 ---- $(srcdir)/demo/aclocal.m4: demo/configure.in demo/acinclude.m4 cd $(srcdir)/demo && $(ACLOCAL) ! .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 "=============================" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/NEWS libtool-1.1/NEWS *** libtool-1.0/NEWS Tue Jul 8 18:35:49 1997 --- libtool-1.1/NEWS Mon Mar 9 05:00:58 1998 *************** *** 1,6 **** ! NEWS - list of user-visible changes between releases of GNU libtool. ! New in 1.0: * Bug fixes. * Better configuration test to find the system linker. The old test was failing because people frequently install GNU ld, but don't --- 1,53 ---- ! NEWS - list of user-visible changes between releases of GNU Libtool ! New in 1.1 - 1998-03-08, Gordon Matzigkeit: ! * Bug fixes. ! * http://www.profitpress.com/libtool/ is libtool's homepage. ! * `AM_PROG_LIBTOOL' supports turning shared or static libraries off ! with the `--enable-shared=PKGS' and `--enable-static=PKGS' configure ! flags. See (libtool)AM_PROG_LIBTOOL. ! * Use the `AM_DISABLE_SHARED' or `AM_DISABLE_STATIC' macros if you ! wish to modify the default behaviour of `AM_PROG_LIBTOOL' for your ! package. ! * New rules for `AM_PROG_LD' to use gcc's `-print-prog-name' flag in ! order to find ld, if possible. ! * Suppress duplicate compiler output during `compile' mode. ! * Deleted `dlname' mode. Dlopen applications should only use the ! runtime search method described in (libtool)Finding the dlname. ! * Experimental support for dynamically loaded modules, even on ! static-only platforms, via new `-dlopen' and `-dlpreopen' link ! flags. ! * `compile' mode honours the `-static' flag to prevent libtool ! from building PIC objects. ! * New `execute' mode to support debugging uninstalled libtool ! libraries and executables. ! * `-allow-undefined' is now the default. You can use `-no-undefined' ! to declare that a shared library is completely self-contained. ! * Inter-library dependencies are automatically handled when linking ! against an uninstalled `.la' file. ! * New `-all-static' flag to prevent any dynamic linking. The regular ! `-static' flag now just prevents dynamic linking of libtool libraries. ! * New `-release' flag to encode release numbers into libtool ! libraries. This breaks binary compatibility, but is useful for ! libraries whose interfaces change very frequently. See ! (libtool)Versioning. ! * The `-rpath' flag can be used to hardcode absolute directories when ! linking executables using libtool. ! * New robust quoting code to handle any metacharacters passed in ! arguments to libtool commands. ! * Full support for broken collect2 on AIX 3. Shared libraries ! can now be built with all working versions of GCC on AIX. ! * Shell script speed optimizations for old and buggy /bin/sh systems, ! such as HP-UX 9 and SunOS 4.1.4. ! * Maybe use `_libs' as a temporary libtool directory instead of `.libs' ! in order to cope with MS-DOS filenames. ! * Portability fixes for Windows NT. ! * Refuse to create libtool libraries that don't begin with `lib'. ! This allows us to correctly handle OSes that don't have the `lib' ! prefix by default, such as OS/2. ! * Support for *-*-amigaos*, *-*-os2*, *-*-sysv4.2uw2*, and *-*-uts4*. ! ! New in 1.0 - 1997-07-08, Gordon Matzigkeit: * Bug fixes. * Better configuration test to find the system linker. The old test was failing because people frequently install GNU ld, but don't *************** *** 20,32 **** * Support *-*-linux-gnu* as an alias for *-*-linux*. * Support for *-*-openbsd* and *-*-freebsd3*. ! New in 0.9: * Bug fixes. * The libtool demo now uses the libm cos(3) function, to demonstrate inter-library dependencies. * The PLATFORMS file has been moved to doc/platforms.texi. ! New in 0.8: * Bug fixes, and more documentation. * Basic support for other language compilers (C++, Fortran, and preprocessed assembler). --- 67,79 ---- * Support *-*-linux-gnu* as an alias for *-*-linux*. * Support for *-*-openbsd* and *-*-freebsd3*. ! New in 0.9 - 1997-02-03, Gordon Matzigkeit: * Bug fixes. * The libtool demo now uses the libm cos(3) function, to demonstrate inter-library dependencies. * The PLATFORMS file has been moved to doc/platforms.texi. ! New in 0.8 - 1997-01-26, Gordon Matzigkeit: * Bug fixes, and more documentation. * Basic support for other language compilers (C++, Fortran, and preprocessed assembler). *************** *** 39,45 **** been rewritten to avoid ANSI-only constructs. * Support for *-*-irix5, *-*-irix6*, and *-*-sco3.2v5*. ! New in 0.7: * Total rewrite of libtool, along with a new model for library building. * Completely rewritten documentation for the new paradigm. * Sane handling of broken system linkers, such as the ones on AIX --- 86,92 ---- been rewritten to avoid ANSI-only constructs. * Support for *-*-irix5, *-*-irix6*, and *-*-sco3.2v5*. ! New in 0.7 - 1996-12-08, Gordon Matzigkeit: * Total rewrite of libtool, along with a new model for library building. * Completely rewritten documentation for the new paradigm. * Sane handling of broken system linkers, such as the ones on AIX diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/README libtool-1.1/README *** libtool-1.0/README Tue Jul 8 18:46:00 1997 --- libtool-1.1/README Mon Mar 2 00:10:19 1998 *************** *** 1,5 **** ! This is GNU libtool, a generic library support script. Libtool hides ! the complexity of using shared libraries behind a consistent interface. To use libtool, add the new generic library building commands to your --- 1,5 ---- ! 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 *************** *** 9,27 **** Libtool supports building static libraries on all platforms. Shared library support has been implemented for these platforms: - All ELF targets that use both the GNU C compiler (gcc) and GNU ld AIX 3.x (*-*-aix3*) AIX 4.x (*-*-aix4*) Digital/UNIX 3.x, 4.x, a.k.a. OSF/1 (*-*-osf3*, *-*-osf4*) FreeBSD 2.x, 3.x (*-*-freebsd2*, *-*-freebsd3*) ! HP-UX 9.x, 10.x (*-*-hpux9*, *-*-hpux10*) IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*) Linux ELF (*-*-linux*, except aout, coff, and oldld) NetBSD 1.x (*-*-netbsd*) OpenBSD 2.x (*-*-openbsd*) SCO OpenServer 5.x (*-*-sco3.2v5*) Solaris 2.x (*-*-solaris2*) SunOS 4.x, a.k.a. Solaris 1.x (*-*-sunos4*) See the file NEWS for a description of recent changes to libtool. --- 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*) ! HP-UX 9.x, 10.x (*-*-hpux9*, *-*-hpux10*) [see note] IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*) Linux ELF (*-*-linux*, except aout, coff, and oldld) 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. *************** *** 29,39 **** libtool. See the info node (libtool)Tested Platforms. (or the file ! doc/platforms.texi) for a list of platforms that libtool shared ! library support was tested on. 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'). --- 42,52 ---- libtool. See the info node (libtool)Tested Platforms. (or the file ! doc/PLATFORMS) for a list of platforms that libtool shared library ! support was tested on. 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'). diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/THANKS libtool-1.1/THANKS *** libtool-1.0/THANKS Tue Jul 8 17:53:30 1997 --- libtool-1.1/THANKS Fri Feb 6 18:55:36 1998 *************** *** 2,17 **** these people: Everybody who was kind enough to spend time testing libtool, use it in ! their packages, and report bugs to me before the libtool 1.0 was ! released. Akim Demaille Bruno Haible Carl D. Roth Charles S. Kerr Joel Cannon ! Joel N. Weber II Karl Berry Mark Kettenis Mimi Burbank Oliver Guntermann --- 2,24 ---- 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 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/TODO libtool-1.1/TODO *** libtool-1.0/TODO Tue Jul 8 16:58:57 1997 --- libtool-1.1/TODO Mon Mar 9 05:23:47 1998 *************** *** 1,27 **** ! * Another form of convenience library, suggested by Alexandre Oliva, ! is to have undocumented utility libraries, where only the shared ! version is installed. ! * Somehow we need to make sure that static libraries never appear in ! $deplibs. If a program linked against a library doesn't contain the ! basename of the library (or is the same size), then the library is ! probably static. ! * A better check to detect broken collect2 on AIX, once the bug is ! fixed in GCC. ! * We could use libtool object convenience libraries that resolve ! symbols to be included in a libtool archive. ! * Delete dlname mode, and integrate DLD support. We need a way for ! different major versions of the same .la to coexist. This also ! involves writing a better uninstall mode, so that nothing breaks. * Implement full multi-language support. Currently, this is only for C++, but there are beginnings of this in the manual (Other Languages). This includes writing libtool not to be so dependent on the compiler used to configure it. * Need to finalize the documentation, and give a specification of `.la' files so that people can depend on their format. This also needs to be done so that DLD uses a public interface to libtool --- 1,58 ---- ! For next public release: ! ************************ ! * 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. * Implement full multi-language support. Currently, this is only for C++, but there are beginnings of this in the manual (Other Languages). This includes writing libtool not to be so dependent on the compiler used to configure it. + We especially need this for C++ linking, for which libtool currently + does not handle static constructors properly, even on operating + systems that support them. ``Don't use static constructors'' is no + longer a satisfactory answer. + + People who need it: + Jean Daniel Fekete + Thomas Hiller + + * Another form of convenience library, suggested by Alexandre Oliva, + is to have undocumented utility libraries, where only the shared + version is installed. + + * We could use libtool object convenience libraries that resolve + 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 needs to be done so that DLD uses a public interface to libtool *************** *** 31,52 **** Things to think about: ********************** - * Implement full support for other orthogonal library types - (libhello_g, libhello_p). Make these types configurable. Some - thinking will have to be done about the defaults, and what libhello - (standard type) should be. - - Maybe we should just add an autoconf macro and get creative with - library_transform_name, or something. These changes should be - partially driven by the needs of packaging tools, such as RPM and - dpkg. - * Talk with RMS about his so-called `automatic package generation tool.' This is probably what Thomas has been murmuring about for the Hurd. We'll need to integrate package-supplied programs such as libtool into that scheme, since it manages some of the preinstall and postinstall commands, but isn't installed itself. Probably, things like libtool should be distributed as part of such a binary package. * Add support for windoze DLL's, and maybe other jumptable libs. Check out Lesstif and Tcl configuration again (maybe they would be --- 62,77 ---- Things to think about: ********************** * Talk with RMS about his so-called `automatic package generation tool.' This is probably what Thomas has been murmuring about for the Hurd. We'll need to integrate package-supplied programs such as libtool into that scheme, since it manages some of the preinstall and postinstall commands, but isn't installed itself. Probably, things like libtool should be distributed as part of such a binary package. + + * 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 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/acinclude.m4 libtool-1.1/acinclude.m4 *** libtool-1.0/acinclude.m4 Tue Jul 1 19:39:27 1997 --- libtool-1.1/acinclude.m4 Fri Mar 6 05:42:50 1998 *************** *** 1,5 **** ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ! ## Copyright (C) 1996, 1997 Free Software Foundation, Inc. ## Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify --- 1,5 ---- ## 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 *************** *** 21,114 **** ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. ! # serial 9 AM_PROG_LIBTOOL AC_DEFUN(AM_PROG_LIBTOOL, ! [AC_REQUIRE([AC_CANONICAL_HOST]) ! AC_REQUIRE([AC_PROG_CC]) ! AC_REQUIRE([AC_PROG_RANLIB]) ! AC_REQUIRE([AM_PROG_LD]) ! AC_REQUIRE([AC_PROG_LN_S]) ! # Always use our own libtool. ! LIBTOOL='$(top_builddir)/libtool' ! AC_SUBST(LIBTOOL) ! ! dnl Allow the --disable-shared flag to stop us from building shared libs. ! AC_ARG_ENABLE(shared, ! [ --enable-shared build shared libraries [default=yes]], ! test "$enableval" = no && libtool_shared=" --disable-shared", ! libtool_shared=) ! ! dnl Allow the --disable-static flag to stop us from building static libs. ! AC_ARG_ENABLE(static, ! [ --enable-static build static libraries [default=yes]], ! test "$enableval" = no && libtool_static=" --disable-static", ! libtool_static=) ! libtool_flags="$libtool_shared$libtool_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. ! [case "$host" in *-*-irix6*) ! for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do ! if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then ! LD="${LD-ld} $f" ! fi ! done ;; *-*-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" 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_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) ! if test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, ! [case "$LD" in ! /*) ! ac_cv_path_LD="$LD" # Let the user override the test with a path. ! ;; ! *) 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/ld"; then ! ac_cv_path_LD="$ac_dir/ld" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then ! test "$with_gnu_ld" = yes && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" ! ;; ! esac]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) --- 21,207 ---- ## 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. ! case "$host" in *-*-irix6*) ! # Find out which ABI we are using. ! echo '[#]line __oline__ "configure"' > conftest.$ac_ext ! if AC_TRY_EVAL(ac_compile); then ! case "`/usr/bin/file conftest.o`" in ! *32-bit*) ! LD="${LD-ld} -32" ! ;; ! *N32*) ! LD="${LD-ld} -n32" ! ;; ! *64-bit*) ! LD="${LD-ld} -64" ! ;; ! esac ! fi ! rm -rf conftest* ;; *-*-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 ;; + no) enable_shared=no ;; + *) + enable_shared=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_shared=yes + fi + done + 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 ;; + no) enable_static=no ;; + *) + enable_static=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_static=yes + fi + done + 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 ! ;; ! *) ! # If it is relative, then search for the first ld in PATH. ! with_gnu_ld=unknown ! ;; ! esac ! elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) 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. # Break only if it was the GNU/non-GNU ld that we prefer. ! 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 IFS="$ac_save_ifs" ! else ! ac_cv_path_LD="$LD" # Let the user override the test with a path. ! fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) *************** *** 121,131 **** ]) AC_DEFUN(AM_PROG_LD_GNU, ! [AC_CACHE_CHECK([whether we are using 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 /dev/null; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) --- 214,259 ---- ]) 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 ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no 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) ]) diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/aclocal.m4 libtool-1.1/aclocal.m4 *** libtool-1.0/aclocal.m4 Tue Jul 8 18:47:41 1997 --- libtool-1.1/aclocal.m4 Sat Mar 7 23:14:57 1998 *************** *** 1,94 **** dnl aclocal.m4 generated automatically by aclocal 1.2 ! # serial 9 AM_PROG_LIBTOOL AC_DEFUN(AM_PROG_LIBTOOL, ! [AC_REQUIRE([AC_CANONICAL_HOST]) ! AC_REQUIRE([AC_PROG_CC]) ! AC_REQUIRE([AC_PROG_RANLIB]) ! AC_REQUIRE([AM_PROG_LD]) ! AC_REQUIRE([AC_PROG_LN_S]) ! # Always use our own libtool. ! LIBTOOL='$(top_builddir)/libtool' ! AC_SUBST(LIBTOOL) ! ! dnl Allow the --disable-shared flag to stop us from building shared libs. ! AC_ARG_ENABLE(shared, ! [ --enable-shared build shared libraries [default=yes]], ! test "$enableval" = no && libtool_shared=" --disable-shared", ! libtool_shared=) ! ! dnl Allow the --disable-static flag to stop us from building static libs. ! AC_ARG_ENABLE(static, ! [ --enable-static build static libraries [default=yes]], ! test "$enableval" = no && libtool_static=" --disable-static", ! libtool_static=) ! libtool_flags="$libtool_shared$libtool_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. ! [case "$host" in *-*-irix6*) ! for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do ! if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then ! LD="${LD-ld} $f" ! fi ! done ;; *-*-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" 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_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) ! if test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, ! [case "$LD" in ! /*) ! ac_cv_path_LD="$LD" # Let the user override the test with a path. ! ;; ! *) 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/ld"; then ! ac_cv_path_LD="$ac_dir/ld" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then ! test "$with_gnu_ld" = yes && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" ! ;; ! esac]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) --- 1,187 ---- dnl aclocal.m4 generated automatically by aclocal 1.2 ! # 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. ! case "$host" in *-*-irix6*) ! # Find out which ABI we are using. ! echo '[#]line __oline__ "configure"' > conftest.$ac_ext ! if AC_TRY_EVAL(ac_compile); then ! case "`/usr/bin/file conftest.o`" in ! *32-bit*) ! LD="${LD-ld} -32" ! ;; ! *N32*) ! LD="${LD-ld} -n32" ! ;; ! *64-bit*) ! LD="${LD-ld} -64" ! ;; ! esac ! fi ! rm -rf conftest* ;; *-*-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 ;; + no) enable_shared=no ;; + *) + enable_shared=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_shared=yes + fi + done + 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 ;; + no) enable_static=no ;; + *) + enable_static=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_static=yes + fi + done + 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 ! ;; ! *) ! # If it is relative, then search for the first ld in PATH. ! with_gnu_ld=unknown ! ;; ! esac ! elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) 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. # Break only if it was the GNU/non-GNU ld that we prefer. ! 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 IFS="$ac_save_ifs" ! else ! ac_cv_path_LD="$LD" # Let the user override the test with a path. ! fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) *************** *** 101,113 **** ]) AC_DEFUN(AM_PROG_LD_GNU, ! [AC_CACHE_CHECK([whether we are using 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 /dev/null; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) # Do all the work for Automake. This macro actually does too much -- --- 194,241 ---- ]) 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 ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no 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) ]) # Do all the work for Automake. This macro actually does too much -- diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/config.guess libtool-1.1/config.guess *** libtool-1.0/config.guess Wed Jun 25 16:14:38 1997 --- libtool-1.1/config.guess Sun Sep 21 19:30:36 1997 *************** *** 52,62 **** case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in alpha:OSF1:*:*) # 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. ! echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'` exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 --- 52,104 ---- 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-cc} 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 *************** *** 91,96 **** --- 133,141 ---- 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;; *************** *** 129,134 **** --- 174,191 ---- 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 ;; *************** *** 423,428 **** --- 480,488 ---- i*:CYGWIN*:*) echo i386-pc-cygwin32 exit 0 ;; + i*:MINGW*:*) + echo i386-pc-mingw32 + exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin32 exit 0 ;; *************** *** 436,462 **** # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` ! if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then ! echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0 ! elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then ! echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ! elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then ! echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ! elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then ! echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 ! elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then ! echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ! elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then ! echo "powerpc-unknown-linux-gnu" ; exit 0 ! elif test "${UNAME_MACHINE}" = "alpha" ; then ! echo alpha-unknown-linux-gnu ; exit 0 ! elif test "${UNAME_MACHINE}" = "sparc" ; then ! echo sparc-unknown-linux-gnu ; exit 0 elif test "${UNAME_MACHINE}" = "mips" ; then cat >dummy.c <&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 ;; ! 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-cc} 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. ! test ! -d /usr/lib/ldscripts/. \ ! && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 # Determine whether the default compiler is a.out or elf 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 < main(argc, argv) ! int argc; ! char *argv[]; { #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; } *************** *** 496,501 **** --- 623,636 ---- 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} *************** *** 517,522 **** --- 652,662 ---- echo ${UNAME_MACHINE}-pc-sysv32 fi 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 ;; *************** *** 591,596 **** --- 731,739 ---- exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:*:6*) + echo mips-sony-newsos6 exit 0 ;; R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) if [ -d /usr/nec ]; then diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/config.sub libtool-1.1/config.sub *** libtool-1.0/config.sub Wed Jun 25 16:14:38 1997 --- libtool-1.1/config.sub Sun Sep 21 19:30:36 1997 *************** *** 1,6 **** #! /bin/sh # Configuration validation subroutine script, version 1.1. ! # Copyright (C) 1991, 92, 93, 94, 95, 1996 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. --- 1,6 ---- #! /bin/sh # Configuration validation subroutine script, version 1.1. ! # Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 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. *************** *** 149,161 **** 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 | arm \ ! | arme[lb] | pyramid | mn10300 \ | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ ! | alpha | we32k | ns16k | clipper | i370 | sh \ ! | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \ ! | pdp11 | mips64el | mips64orion | mips64orionel \ ! | sparc | sparclet | sparclite | sparc64) basic_machine=$basic_machine-unknown ;; # We use `pc' rather than `unknown' --- 149,162 ---- 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 \ ! | alpha | alphaev5 | alphaev56 | 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' *************** *** 171,183 **** ;; # Recognize the basic CPU types with company name. vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \ ! | m88k-* | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ ! | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ ! | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ ! | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ ! | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ ! | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ ! | mips64el-* | mips64orion-* | mips64orionel-* | f301-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. --- 172,188 ---- ;; # Recognize the basic CPU types with company name. vax-* | tahoe-* | i[3456]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-* \ ! | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ ! | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ ! | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ ! | sparc64-* | mips64-* | mipsel-* \ ! | mips64el-* | mips64orion-* | mips64orionel-* \ ! | mipstx39-* | mipstx39el-* \ ! | f301-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. *************** *** 204,212 **** amiga | amiga-*) basic_machine=m68k-cbm ;; ! amigados) basic_machine=m68k-cbm ! os=-amigados ;; amigaunix | amix) basic_machine=m68k-cbm --- 209,217 ---- amiga | amiga-*) basic_machine=m68k-cbm ;; ! amigaos | amigados) basic_machine=m68k-cbm ! os=-amigaos ;; amigaunix | amix) basic_machine=m68k-cbm *************** *** 391,401 **** ;; mipsel*-linux*) basic_machine=mipsel-unknown ! os=-linux ;; mips*-linux*) basic_machine=mips-unknown ! os=-linux ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` --- 396,406 ---- ;; 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/'` *************** *** 566,571 **** --- 571,582 ---- basic_machine=i386-sequent os=-dynix ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; tower | tower-32) basic_machine=m68k-ncr ;; *************** *** 585,591 **** basic_machine=vax-dec os=-vms ;; ! vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) --- 596,602 ---- basic_machine=vax-dec os=-vms ;; ! vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) *************** *** 615,621 **** # 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 ]; then basic_machine=mips-unknown else basic_machine=mips-mips --- 626,632 ---- # 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 *************** *** 680,688 **** -solaris) os=-solaris2 ;; ! -unixware* | svr4*) os=-sysv4 ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; --- 691,702 ---- -solaris) os=-solaris2 ;; ! -svr4*) os=-sysv4 ;; + -unixware*) + os=-sysv4.2uw + ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; *************** *** 693,699 **** -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ ! | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ --- 707,714 ---- -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* \ *************** *** 701,707 **** | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ ! | -linux-gnu* | -uxpv*) # Remember, each alternative MUST END IN *, to match a version number. ;; -linux*) --- 716,722 ---- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ ! | -mingw32* | -linux-gnu* | -uxpv*) # Remember, each alternative MUST END IN *, to match a version number. ;; -linux*) *************** *** 827,833 **** os=-sysv ;; *-cbm) ! os=-amigados ;; *-dg) os=-dgux --- 842,848 ---- os=-sysv ;; *-cbm) ! os=-amigaos ;; *-dg) os=-dgux diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/configure.in libtool-1.1/configure.in *** libtool-1.0/configure.in Tue Jul 8 18:47:26 1997 --- libtool-1.1/configure.in Fri Mar 6 04:07:29 1998 *************** *** 1,6 **** dnl Process this file with autoconf to create configure. ! AC_INIT(ltmain.sh.in) ! AM_INIT_AUTOMAKE(libtool,1.0) pkgdatadir='${datadir}/libtool' AC_SUBST(pkgdatadir) --- 1,12 ---- 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.1) pkgdatadir='${datadir}/libtool' AC_SUBST(pkgdatadir) *************** *** 11,17 **** --- 17,27 ---- AC_PROG_CC AC_PROG_RANLIB AM_PROG_LD + AM_PROG_NM AC_PROG_LN_S + + dnl For the `lineno' script (which puts line numbers into `ltconfig'). + AC_PROG_AWK AC_OUTPUT([Makefile doc/Makefile tests/Makefile]) diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/demo/Makefile.am libtool-1.1/demo/Makefile.am *** libtool-1.0/demo/Makefile.am Tue Jul 8 17:30:59 1997 --- libtool-1.1/demo/Makefile.am Tue Feb 10 18:57:57 1998 *************** *** 1,28 **** # A brief demonstration of using Automake with Libtool. -*-Makefile-*- AUTOMAKE_OPTIONS = foreign EXTRA_DIST = $(TESTS) acinclude.m4 ! hardcode_tests = hc-direct 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 include_HEADERS = foo.h ! bin_PROGRAMS = hell hell.static # 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 TESTS = run.test --- 1,41 ---- # 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 *************** *** 30,54 **** # Regenerate our acinclude.m4 only if it doesn't exist. $(srcdir)/acinclude.m4: rm -f $(srcdir)/acinclude.m4 ! ln -s ../libtool.m4 $(srcdir)/acinclude.m4 # Test programs to see what gets hardcoded. .PHONY: hardcode hardcode: $(hardcode_tests) hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) ! @shlib=./.libs/libhello.a; \ eval "`egrep '^library_names' libhello.la`"; \ for lib in $$library_names; do \ ! shlib="./.libs/$$lib"; \ done; \ ! echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS)"; \ ! eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS)" ! hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES) ! $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./.libs -lhello $(LIBS) hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) @echo "You may ignore any linking errors from the following command:" @eval `egrep -e '^shlibpath_var=' ./libtool`; \ ! echo "$$shlibpath_var=./.libs $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) || echo unsupported > $@"; \ ! eval "$$shlibpath_var=./.libs $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) || echo unsupported > $@" --- 43,108 ---- # Regenerate our acinclude.m4 only if it doesn't exist. $(srcdir)/acinclude.m4: 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; \ eval "`egrep '^library_names' libhello.la`"; \ 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 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/demo/Makefile.in libtool-1.1/demo/Makefile.in *** libtool-1.0/demo/Makefile.in Tue Jul 8 19:54:32 1997 --- libtool-1.1/demo/Makefile.in Mon Mar 9 05:31:20 1998 *************** *** 5,10 **** --- 5,14 ---- # gives unlimited permission to copy, distribute and modify it. # 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. SHELL = /bin/sh *************** *** 58,63 **** --- 62,68 ---- LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ + NM = @NM@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ *************** *** 66,91 **** EXTRA_DIST = $(TESTS) acinclude.m4 ! hardcode_tests = hc-direct 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 include_HEADERS = foo.h ! bin_PROGRAMS = hell hell.static # 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 TESTS = run.test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --- 71,104 ---- 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 ! ! # 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 *************** *** 105,112 **** hell_OBJECTS = main.o hell_DEPENDENCIES = libhello.la hell_LDFLAGS = ! hell_static_OBJECTS = main.o ! hell_static_DEPENDENCIES = libhello.la CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) --- 118,127 ---- hell_OBJECTS = main.o hell_DEPENDENCIES = libhello.la hell_LDFLAGS = ! hell_debug_OBJECTS = main.o ! hell_debug_DEPENDENCIES = libhello.la ! helldl_OBJECTS = dlmain.o ! helldl_LDADD = $(LDADD) CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) *************** *** 121,128 **** TAR = tar GZIP = --best ! SOURCES = $(libhello_la_SOURCES) $(hell_SOURCES) $(hell_static_SOURCES) ! OBJECTS = $(libhello_la_OBJECTS) $(hell_OBJECTS) $(hell_static_OBJECTS) default: all --- 136,143 ---- TAR = tar GZIP = --best ! SOURCES = $(libhello_la_SOURCES) $(hell_SOURCES) $(hell_debug_SOURCES) $(helldl_SOURCES) ! OBJECTS = $(libhello_la_OBJECTS) $(hell_OBJECTS) $(hell_debug_OBJECTS) $(helldl_OBJECTS) default: all *************** *** 188,194 **** rm -f *.lo clean-libtool: ! rm -rf .libs distclean-libtool: --- 203,209 ---- rm -f *.lo clean-libtool: ! rm -rf .libs _libs distclean-libtool: *************** *** 226,234 **** @rm -f hell $(LINK) $(hell_LDFLAGS) $(hell_OBJECTS) $(hell_LDADD) $(LIBS) ! hell.static: $(hell_static_OBJECTS) $(hell_static_DEPENDENCIES) ! @rm -f hell.static ! $(LINK) $(hell_static_LDFLAGS) $(hell_static_OBJECTS) $(hell_static_LDADD) $(LIBS) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) --- 241,249 ---- @rm -f hell $(LINK) $(hell_LDFLAGS) $(hell_OBJECTS) $(hell_LDADD) $(LIBS) ! hell.debug: $(hell_debug_OBJECTS) $(hell_debug_DEPENDENCIES) ! @rm -f hell.debug ! $(LINK) $(hell_debug_LDFLAGS) $(hell_debug_OBJECTS) $(hell_debug_LDADD) $(LIBS) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) *************** *** 306,311 **** --- 321,327 ---- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file; \ done + dlmain.o dlmain.lo: dlmain.c foo.h foo.o foo.lo: foo.c foo.h hello.o hello.lo: hello.c foo.h main.o main.lo: main.c foo.h *************** *** 408,440 **** clean-generic maintainer-clean-generic clean mostlyclean distclean \ maintainer-clean # The following rules are only for the libtool demo and tests. # Regenerate our acinclude.m4 only if it doesn't exist. $(srcdir)/acinclude.m4: rm -f $(srcdir)/acinclude.m4 ! ln -s ../libtool.m4 $(srcdir)/acinclude.m4 # Test programs to see what gets hardcoded. .PHONY: hardcode hardcode: $(hardcode_tests) hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) ! @shlib=./.libs/libhello.a; \ eval "`egrep '^library_names' libhello.la`"; \ for lib in $$library_names; do \ ! shlib="./.libs/$$lib"; \ done; \ ! echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS)"; \ ! eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS)" ! hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES) ! $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./.libs -lhello $(LIBS) hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) @echo "You may ignore any linking errors from the following command:" @eval `egrep -e '^shlibpath_var=' ./libtool`; \ ! echo "$$shlibpath_var=./.libs $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) || echo unsupported > $@"; \ ! eval "$$shlibpath_var=./.libs $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) || echo unsupported > $@" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- 424,498 ---- clean-generic maintainer-clean-generic clean mostlyclean distclean \ maintainer-clean + helldl: libhello.la # The following rules are only for the libtool demo and tests. # Regenerate our acinclude.m4 only if it doesn't exist. $(srcdir)/acinclude.m4: 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; \ eval "`egrep '^library_names' libhello.la`"; \ 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 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/demo/README libtool-1.1/demo/README *** libtool-1.0/demo/README Fri Jun 6 21:51:48 1997 --- libtool-1.1/demo/README Mon Feb 9 15:21:59 1998 *************** *** 6,9 **** everything. Send bug reports and comments about GNU hell to the libtool mailing ! list . --- 6,9 ---- everything. Send bug reports and comments about GNU hell to the libtool mailing ! list . diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/demo/acinclude.m4 libtool-1.1/demo/acinclude.m4 *** libtool-1.0/demo/acinclude.m4 Tue Jul 1 19:39:27 1997 --- libtool-1.1/demo/acinclude.m4 Fri Mar 6 05:42:50 1998 *************** *** 1,5 **** ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ! ## Copyright (C) 1996, 1997 Free Software Foundation, Inc. ## Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify --- 1,5 ---- ## 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 *************** *** 21,114 **** ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. ! # serial 9 AM_PROG_LIBTOOL AC_DEFUN(AM_PROG_LIBTOOL, ! [AC_REQUIRE([AC_CANONICAL_HOST]) ! AC_REQUIRE([AC_PROG_CC]) ! AC_REQUIRE([AC_PROG_RANLIB]) ! AC_REQUIRE([AM_PROG_LD]) ! AC_REQUIRE([AC_PROG_LN_S]) ! # Always use our own libtool. ! LIBTOOL='$(top_builddir)/libtool' ! AC_SUBST(LIBTOOL) ! ! dnl Allow the --disable-shared flag to stop us from building shared libs. ! AC_ARG_ENABLE(shared, ! [ --enable-shared build shared libraries [default=yes]], ! test "$enableval" = no && libtool_shared=" --disable-shared", ! libtool_shared=) ! ! dnl Allow the --disable-static flag to stop us from building static libs. ! AC_ARG_ENABLE(static, ! [ --enable-static build static libraries [default=yes]], ! test "$enableval" = no && libtool_static=" --disable-static", ! libtool_static=) ! libtool_flags="$libtool_shared$libtool_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. ! [case "$host" in *-*-irix6*) ! for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do ! if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then ! LD="${LD-ld} $f" ! fi ! done ;; *-*-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" 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_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) ! if test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, ! [case "$LD" in ! /*) ! ac_cv_path_LD="$LD" # Let the user override the test with a path. ! ;; ! *) 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/ld"; then ! ac_cv_path_LD="$ac_dir/ld" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then ! test "$with_gnu_ld" = yes && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" ! ;; ! esac]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) --- 21,207 ---- ## 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. ! case "$host" in *-*-irix6*) ! # Find out which ABI we are using. ! echo '[#]line __oline__ "configure"' > conftest.$ac_ext ! if AC_TRY_EVAL(ac_compile); then ! case "`/usr/bin/file conftest.o`" in ! *32-bit*) ! LD="${LD-ld} -32" ! ;; ! *N32*) ! LD="${LD-ld} -n32" ! ;; ! *64-bit*) ! LD="${LD-ld} -64" ! ;; ! esac ! fi ! rm -rf conftest* ;; *-*-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 ;; + no) enable_shared=no ;; + *) + enable_shared=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_shared=yes + fi + done + 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 ;; + no) enable_static=no ;; + *) + enable_static=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_static=yes + fi + done + 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 ! ;; ! *) ! # If it is relative, then search for the first ld in PATH. ! with_gnu_ld=unknown ! ;; ! esac ! elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) 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. # Break only if it was the GNU/non-GNU ld that we prefer. ! 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 IFS="$ac_save_ifs" ! else ! ac_cv_path_LD="$LD" # Let the user override the test with a path. ! fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) *************** *** 121,131 **** ]) AC_DEFUN(AM_PROG_LD_GNU, ! [AC_CACHE_CHECK([whether we are using 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 /dev/null; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) --- 214,259 ---- ]) 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 ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no 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) ]) diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/demo/aclocal.m4 libtool-1.1/demo/aclocal.m4 *** libtool-1.0/demo/aclocal.m4 Tue Jul 1 19:45:06 1997 --- libtool-1.1/demo/aclocal.m4 Sat Mar 7 23:17:35 1998 *************** *** 1,94 **** dnl aclocal.m4 generated automatically by aclocal 1.2 ! # serial 9 AM_PROG_LIBTOOL AC_DEFUN(AM_PROG_LIBTOOL, ! [AC_REQUIRE([AC_CANONICAL_HOST]) ! AC_REQUIRE([AC_PROG_CC]) ! AC_REQUIRE([AC_PROG_RANLIB]) ! AC_REQUIRE([AM_PROG_LD]) ! AC_REQUIRE([AC_PROG_LN_S]) ! # Always use our own libtool. ! LIBTOOL='$(top_builddir)/libtool' ! AC_SUBST(LIBTOOL) ! ! dnl Allow the --disable-shared flag to stop us from building shared libs. ! AC_ARG_ENABLE(shared, ! [ --enable-shared build shared libraries [default=yes]], ! test "$enableval" = no && libtool_shared=" --disable-shared", ! libtool_shared=) ! ! dnl Allow the --disable-static flag to stop us from building static libs. ! AC_ARG_ENABLE(static, ! [ --enable-static build static libraries [default=yes]], ! test "$enableval" = no && libtool_static=" --disable-static", ! libtool_static=) ! libtool_flags="$libtool_shared$libtool_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. ! [case "$host" in *-*-irix6*) ! for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do ! if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then ! LD="${LD-ld} $f" ! fi ! done ;; *-*-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" 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_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) ! if test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, ! [case "$LD" in ! /*) ! ac_cv_path_LD="$LD" # Let the user override the test with a path. ! ;; ! *) 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/ld"; then ! ac_cv_path_LD="$ac_dir/ld" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then ! test "$with_gnu_ld" = yes && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" ! ;; ! esac]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) --- 1,187 ---- dnl aclocal.m4 generated automatically by aclocal 1.2 ! # 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. ! case "$host" in *-*-irix6*) ! # Find out which ABI we are using. ! echo '[#]line __oline__ "configure"' > conftest.$ac_ext ! if AC_TRY_EVAL(ac_compile); then ! case "`/usr/bin/file conftest.o`" in ! *32-bit*) ! LD="${LD-ld} -32" ! ;; ! *N32*) ! LD="${LD-ld} -n32" ! ;; ! *64-bit*) ! LD="${LD-ld} -64" ! ;; ! esac ! fi ! rm -rf conftest* ;; *-*-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 ;; + no) enable_shared=no ;; + *) + enable_shared=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_shared=yes + fi + done + 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 ;; + no) enable_static=no ;; + *) + enable_static=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_static=yes + fi + done + 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 ! ;; ! *) ! # If it is relative, then search for the first ld in PATH. ! with_gnu_ld=unknown ! ;; ! esac ! elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) 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. # Break only if it was the GNU/non-GNU ld that we prefer. ! 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 IFS="$ac_save_ifs" ! else ! ac_cv_path_LD="$LD" # Let the user override the test with a path. ! fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) *************** *** 101,113 **** ]) AC_DEFUN(AM_PROG_LD_GNU, ! [AC_CACHE_CHECK([whether we are using 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 /dev/null; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) # Do all the work for Automake. This macro actually does too much -- --- 194,241 ---- ]) 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 ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no 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) ]) # Do all the work for Automake. This macro actually does too much -- diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/demo/configure.in libtool-1.1/demo/configure.in *** libtool-1.0/demo/configure.in Tue Apr 1 19:04:40 1997 --- libtool-1.1/demo/configure.in Sat Feb 7 18:48:53 1998 *************** *** 5,12 **** AC_PROG_CC AM_PROG_LIBTOOL - dnl Check for the math library. - AC_CHECK_LIB(m, cos) - dnl Output the makefile AC_OUTPUT(Makefile) --- 5,9 ---- diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/demo/dlmain.c libtool-1.1/demo/dlmain.c *** libtool-1.0/demo/dlmain.c Thu Jan 1 00:00:00 1970 --- libtool-1.1/demo/dlmain.c Tue Jul 29 17:57:17 1997 *************** *** 0 **** --- 1,90 ---- + /* 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 + 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 + #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 ++; + } + + /* Try assigning to the nothing variable. */ + if (pnothing) + *pnothing = 1; + else + fprintf (stderr, "did not find the `nothing' variable\n"); + + /* Just call the functions and check return values. */ + if (pfoo) + { + if ((*pfoo) () != FOO_RET) + return 1; + } + else + fprintf (stderr, "did not find the `foo' function\n"); + + if (phello) + { + if ((*phello) () != HELLO_RET) + return 3; + } + else + fprintf (stderr, "did not find the `hello' function\n"); + + return 0; + } diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/doc/Makefile.am libtool-1.1/doc/Makefile.am *** libtool-1.0/doc/Makefile.am Tue Apr 1 19:19:30 1997 --- libtool-1.1/doc/Makefile.am Mon Feb 9 01:52:54 1998 *************** *** 7,10 **** ## Written by Gordon Matzigkeit AUTOMAKE_OPTIONS = gnits info_TEXINFOS = libtool.texi ! libtool_TEXINFOS = platforms.texi --- 7,10 ---- ## Written by Gordon Matzigkeit AUTOMAKE_OPTIONS = gnits info_TEXINFOS = libtool.texi ! libtool_TEXINFOS = PLATFORMS diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/doc/Makefile.in libtool-1.1/doc/Makefile.in *** libtool-1.0/doc/Makefile.in Tue Jul 8 19:54:27 1997 --- libtool-1.1/doc/Makefile.in Mon Mar 9 05:31:14 1998 *************** *** 51,61 **** --- 51,63 ---- POST_UNINSTALL = true host_alias = @host_alias@ host_triplet = @host@ + AWK = @AWK@ CC = @CC@ LD = @LD@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ + NM = @NM@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ *************** *** 64,70 **** AUTOMAKE_OPTIONS = gnits info_TEXINFOS = libtool.texi ! libtool_TEXINFOS = platforms.texi mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = TEXI2DVI = texi2dvi --- 66,72 ---- AUTOMAKE_OPTIONS = gnits info_TEXINFOS = libtool.texi ! libtool_TEXINFOS = PLATFORMS mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = TEXI2DVI = texi2dvi diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/doc/PLATFORMS libtool-1.1/doc/PLATFORMS *** libtool-1.0/doc/PLATFORMS Thu Jan 1 00:00:00 1970 --- libtool-1.1/doc/PLATFORMS Tue Feb 10 18:42:35 1998 *************** *** 0 **** --- 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 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-linux2.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. diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/doc/libtool.info-1 libtool-1.1/doc/libtool.info-1 *** libtool-1.0/doc/libtool.info-1 Tue Jul 8 18:47:53 1997 --- libtool-1.1/doc/libtool.info-1 Sat Mar 7 23:15:13 1998 *************** *** 11,19 **** * libtoolize: (libtool)Invoking libtoolize. Adding libtool support. END-INFO-DIR-ENTRY ! This file documents GNU Libtool 1.0 ! Copyright (C) 1996, 1997 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 --- 11,19 ---- * libtoolize: (libtool)Invoking libtoolize. Adding libtool support. END-INFO-DIR-ENTRY ! This file documents GNU Libtool 1.1 ! 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 *************** *** 37,43 **** This file documents GNU Libtool, a script that allows package developers to provide generic shared library support. This edition ! documents version 1.0. * Menu: --- 37,46 ---- This file documents GNU Libtool, a script that allows package developers to provide generic shared library support. This edition ! documents version 1.1. ! ! *Note Reporting bugs::, for information on how to report problems ! with libtool. * Menu: *************** *** 69,74 **** --- 72,78 ---- * Creating object files:: Compiling object files for libraries. * Linking libraries:: Creating libraries from object files. * Linking executables:: Linking object files against libtool libraries. + * Debugging executables:: Running GDB on libtool-generated programs. * Installing libraries:: Making libraries available to users. * Installing executables:: Making programs available to users. * Static libraries:: When shared libraries are not wanted. *************** *** 77,83 **** * Compile mode:: Creating library object files. * Link mode:: Generating executables and libraries. ! * Dlname mode:: Obtaining a file name to `dlopen(3)'. * Install mode:: Making libraries and executables public. * Finish mode:: Completing a library installation. * Uninstall mode:: Removing executables and libraries. --- 81,87 ---- * Compile mode:: Creating library object files. * Link mode:: Generating executables and libraries. ! * Execute mode:: Debugging libtool-generated programs. * Install mode:: Making libraries and executables public. * Finish mode:: Completing a library installation. * Uninstall mode:: Removing executables and libraries. *************** *** 88,93 **** --- 92,98 ---- * Using Automake:: Automatically supporting libtool. * Configuring:: Configuring libtool for a host system. * Distributing:: What files to distribute with your package. + * Static-only libraries:: Sometimes shared libraries are just a pain. Configuring libtool *************** *** 105,110 **** --- 110,116 ---- * Interfaces:: What are library interfaces? * Libtool versioning:: Libtool's versioning system. * Updating version info:: Changing version information before releases. + * Release numbers:: Breaking binary compatibility for aesthetics. Tips for interface design *************** *** 112,118 **** Dlopened modules ! * Exporting dynamic symbols:: Preparing files to be dlopened. * Finding the dlname:: Choosing the right file to `dlopen(3)'. * Dlopen issues:: Unresolved problems that need your attention. --- 118,125 ---- Dlopened modules ! * Building modules:: Creating dlopenable objects and libraries. ! * Dlpreopening:: Dlopening that works on static platforms. * Finding the dlname:: Choosing the right file to `dlopen(3)'. * Dlopen issues:: Unresolved problems that need your attention. *************** *** 130,136 **** * Test descriptions:: The contents of the test suite. * When tests fail:: What to do when a test fails. ! Maintainance notes for libtool * New ports:: How to port libtool to new systems. * Tested platforms:: When libtool was last tested. --- 137,143 ---- * Test descriptions:: The contents of the test suite. * When tests fail:: What to do when a test fails. ! Maintenance notes for libtool * New ports:: How to port libtool to new systems. * Tested platforms:: When libtool was last tested. *************** *** 139,148 **** Platform quirks * Compilers:: Creating object files from source files. * Reloadable objects:: Binding object files together. * Archivers:: Programs that create static archives. - * Strip:: Removing unnecessary linkage information.  File: libtool.info, Node: Introduction, Next: Libtool paradigm, Prev: Top, Up: Top --- 146,155 ---- Platform quirks + * References:: Finding more information. * Compilers:: Creating object files from source files. * Reloadable objects:: Binding object files together. * Archivers:: Programs that create static archives.  File: libtool.info, Node: Introduction, Next: Libtool paradigm, Prev: Top, Up: Top *************** *** 263,270 **** ===================== I have investigated several different implementations of systems that ! build shared libraries as part of a freeware 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 --- 270,278 ---- ===================== 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 *************** *** 372,377 **** --- 380,386 ---- * Creating object files:: Compiling object files for libraries. * Linking libraries:: Creating libraries from object files. * Linking executables:: Linking object files against libtool libraries. + * Debugging executables:: Running GDB on libtool-generated programs. * Installing libraries:: Making libraries available to users. * Installing executables:: Making programs available to users. * Static libraries:: When shared libraries are not wanted. *************** *** 411,417 **** files are identical to "standard" object files. To create library object files for `foo.c' and `hello.c', simply ! invoke libtool with the standard compilation command as arguments: a23$ libtool gcc -g -O -c foo.c gcc -g -O -c foo.c --- 420,427 ---- files are identical to "standard" object files. To create library object files for `foo.c' and `hello.c', simply ! invoke libtool with the standard compilation command as arguments ! (*note Compile mode::.): a23$ libtool gcc -g -O -c foo.c gcc -g -O -c foo.c *************** *** 467,473 **** Again, the libtool library name differs from the standard name (it has a `.la' suffix instead of a `.a' suffix). The arguments to libtool are the same ones you would use to produce an executable named ! `libhello.la' with your compiler: burger$ libtool gcc -g -O -o libhello.la foo.o hello.o libtool: cannot build libtool library `libhello.la' from non-libtool \ --- 477,483 ---- Again, the libtool library name differs from the standard name (it has a `.la' suffix instead of a `.a' suffix). The arguments to libtool are the same ones you would use to produce an executable named ! `libhello.la' with your compiler (*note Link mode::.): burger$ libtool gcc -g -O -o libhello.la foo.o hello.o libtool: cannot build libtool library `libhello.la' from non-libtool \ *************** *** 513,520 **** command to create a shared library, as well as the static library. Note how libtool creates extra files in the `.libs' subdirectory, ! rather than the current directory. This feature is to make it easier to ! clean up the build directory, and to help ensure that other programs fail horribly if you accidentally forget to use libtool when you should. ---------- Footnotes ---------- --- 523,530 ---- command to create a shared library, as well as the static library. Note how libtool creates extra files in the `.libs' subdirectory, ! rather than the current directory. This feature is to make it easier ! to clean up the build directory, and to help ensure that other programs fail horribly if you accidentally forget to use libtool when you should. ---------- Footnotes ---------- *************** *** 524,530 **** libtool::.  ! File: libtool.info, Node: Linking executables, Next: Installing libraries, Prev: Linking libraries, Up: Using libtool Linking executables =================== --- 534,540 ---- libtool::.  ! File: libtool.info, Node: Linking executables, Next: Debugging executables, Prev: Linking libraries, Up: Using libtool Linking executables =================== *************** *** 553,559 **** burger$ gcc -g -O -o hell.old main.o libhello.a -lm burger$ ! Libtool's way is almost the same(1): a23$ libtool gcc -g -O -o hell main.o libhello.la -lm gcc -g -O -o hell main.o ./.libs/libhello.a -lm --- 563,569 ---- burger$ gcc -g -O -o hell.old main.o libhello.a -lm burger$ ! Libtool's way is almost the same(1) (*note Link mode::.): a23$ libtool gcc -g -O -o hell main.o libhello.la -lm gcc -g -O -o hell main.o ./.libs/libhello.a -lm *************** *** 625,631 **** shared libraries.  ! File: libtool.info, Node: Installing libraries, Next: Installing executables, Prev: Linking executables, Up: Using libtool Installing libraries ==================== --- 635,706 ---- shared libraries.  ! File: libtool.info, Node: Debugging executables, Next: Installing libraries, Prev: Linking executables, Up: Using libtool ! ! Debugging executables ! ===================== ! ! If `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: ! ! burger$ 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 ! ! (gdb) quit ! burger$ ! ! 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: ! ! burger$ gdb .libs/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) break main ! Breakpoint 1 at 0x8048547: file main.c, line 29. ! (gdb) run ! Starting program: /home/src/libtool/demo/.libs/hell ! /home/src/libtool/demo/.libs/hell: can't load library 'libhello.so.2' ! ! Program exited with code 020. ! (gdb) quit ! burger$ ! ! Argh. Now GDB complains because it cannot find the shared library ! that `hell' is linked against. So, we must use libtool in order to ! properly set the library path and run the debugger. Fortunately, we can ! forget all about the `.libs' directory, and just run it on the ! executable wrapper (*note Execute mode::.): ! ! burger$ 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) break main ! Breakpoint 1 at 0x8048547: file main.c, line 29. ! (gdb) run ! Starting program: /home/src/libtool/demo/.libs/hell ! ! Breakpoint 1, main (argc=1, argv=0xbffffc40) at main.c:29 ! 29 printf ("Welcome to GNU Hell!\n"); ! (gdb) quit ! The program is running. Quit anyway (and kill it)? (y or n) y ! burger$ ! !  ! File: libtool.info, Node: Installing libraries, Next: Installing executables, Prev: Debugging executables, Up: Using libtool Installing libraries ==================== *************** *** 644,650 **** burger# Libtool installation is quite simple, as well. Just use the ! `install' or `cp' command that you normally would: a23# libtool cp libhello.la /usr/local/lib/libhello.la cp libhello.la /usr/local/lib/libhello.la --- 719,726 ---- burger# Libtool installation is quite simple, as well. Just use the ! `install' or `cp' command that you normally would (*note Install ! mode::.): a23# libtool cp libhello.la /usr/local/lib/libhello.la cp libhello.la /usr/local/lib/libhello.la *************** *** 676,682 **** with the `-rpath' flag you used to build it. Then, running `libtool -n --finish LIBDIR' can give you further ! hints on what to do: burger# libtool -n --finish /usr/local/lib ldconfig -m /usr/local/lib --- 752,758 ---- with the `-rpath' flag you used to build it. Then, running `libtool -n --finish LIBDIR' can give you further ! hints on what to do (*note Finish mode::.): burger# libtool -n --finish /usr/local/lib ldconfig -m /usr/local/lib *************** *** 747,753 **** Another common situation where static linking is desirable is in creating a standalone binary. Use libtool to do the linking and add the ! `-static' flag.  File: libtool.info, Node: Invoking libtool, Next: Integrating libtool, Prev: Using libtool, Up: Top --- 823,829 ---- Another common situation where static linking is desirable is in creating a standalone binary. Use libtool to do the linking and add the ! `-all-static' flag.  File: libtool.info, Node: Invoking libtool, Next: Integrating libtool, Prev: Using libtool, Up: Top *************** *** 787,794 **** `compile' Compile a source file into a libtool object. ! `dlname' ! Find the correct name that programs should `dlopen(3)'. `finish' Complete the installation of libtool libraries on the system. --- 863,871 ---- `compile' Compile a source file into a libtool object. ! `execute' ! Automatically set the library path so that another program ! can use uninstalled libtool-generated programs or libraries. `finish' Complete the installation of libtool libraries on the system. *************** *** 809,815 **** * Compile mode:: Creating library object files. * Link mode:: Generating executables and libraries. ! * Dlname mode:: Obtaining a file name to `dlopen(3)'. * Install mode:: Making libraries and executables public. * Finish mode:: Completing a library installation. * Uninstall mode:: Removing executables and libraries. --- 886,892 ---- * Compile mode:: Creating library object files. * Link mode:: Generating executables and libraries. ! * Execute mode:: Debugging libtool-generated programs. * Install mode:: Making libraries and executables public. * Finish mode:: Completing a library installation. * Uninstall mode:: Removing executables and libraries. *************** *** 832,839 **** If shared libraries are being built, any necessary PIC generation flags are substituted into the compilation command.  ! File: libtool.info, Node: Link mode, Next: Dlname mode, Prev: Compile mode, Up: Invoking libtool Link mode ========= --- 909,921 ---- If shared libraries are being built, any necessary PIC generation flags are substituted into the compilation command. + Note that the `-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. +  ! File: libtool.info, Node: Link mode, Next: Execute mode, Prev: Compile mode, Up: Invoking libtool Link mode ========= *************** *** 846,855 **** The following components of MODE-ARGS are treated specially: ! `-allow-undefined' ! If OUTPUT-FILE is a libtool library, allow it to contain ! references to symbols that aren't defined in that library or its ! dependencies (*note Inter-library dependencies::.). `-export-dynamic' Allow symbols from OUTPUT-FILE to be resolved with `dlsym(3)' --- 928,946 ---- The following components of MODE-ARGS are treated specially: ! `-all-static' ! If OUTPUT-FILE is a program, then do not link it against any ! shared libraries at all. If OUTPUT-FILE is a library, then only ! create a static library. ! ! `-dlopen FILE' ! Same as `-dlpreopen FILE', if native dlopening is not supported on ! the host platform (*note Dlopened modules::.). Otherwise, no ! effect. ! ! `-dlpreopen FILE' ! Link FILE into the output program, and add its symbols to ! DLD_PRELOADED_SYMBOLS (*note Dlpreopening::.). `-export-dynamic' Allow symbols from OUTPUT-FILE to be resolved with `dlsym(3)' *************** *** 863,885 **** OUTPUT-FILE requires the installed library `libNAME'. This option is required even when OUTPUT-FILE is not an executable. `-o OUTPUT-FILE' Create OUTPUT-FILE from the specified objects and libraries. `-rpath LIBDIR' If OUTPUT-FILE is a library, it will eventually be installed in LIBDIR. `-static' If OUTPUT-FILE is a program, then do not link it against any ! shared libraries. If OUTPUT-FILE is a library, then only create a ! static library. `-version-info CURRENT[:REVISION[:AGE]]' ! If OUTPUT-FILE is a libtool library, use library version ! information CURRENT, REVISION, and AGE to build it. If not ! specified, each of these variables defaults to 0 (*note ! Versioning::.). If the OUTPUT-FILE ends in `.la', then a libtool library is created, which must be built only from library objects (`.lo' files). The --- 954,988 ---- OUTPUT-FILE requires the installed library `libNAME'. This option is required even when OUTPUT-FILE is not an executable. + `-no-undefined' + Declare that OUTPUT-FILE does not depend on any other libraries. + Some platforms cannot create shared libraries that depend on other + libraries (*note Inter-library dependencies::.). + `-o OUTPUT-FILE' Create OUTPUT-FILE from the specified objects and libraries. + `-release RELEASE' + Specify that the library was generated by release RELEASE of your + 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 `-version-info' flag (*note Versioning::.). + `-rpath LIBDIR' If OUTPUT-FILE is a library, it will eventually be installed in LIBDIR. `-static' If OUTPUT-FILE is a program, then do not link it against any ! uninstalled shared libtool libraries. If OUTPUT-FILE is a ! library, then only create a static library. `-version-info CURRENT[:REVISION[:AGE]]' ! If OUTPUT-FILE is a libtool library, use interface version ! information CURRENT, REVISION, and AGE to build it (*note ! Versioning::.). Do *not* use this flag to specify package release ! information, rather see the `-release' flag. If the OUTPUT-FILE ends in `.la', then a libtool library is created, which must be built only from library objects (`.lo' files). The *************** *** 897,920 **** Otherwise, an executable program is created.  ! File: libtool.info, Node: Dlname mode, Next: Install mode, Prev: Link mode, Up: Invoking libtool ! Dlname mode ! =========== ! The `dlname' mode simply prints the name of a libtool library that ! can be passed to the `dlopen(3)' function call (*note Dlopened ! modules::.). ! Each of the MODE-ARGS specifies a libtool library linked using the ! `-export-dynamic' option (*note Link mode::.). The names of the ! modules to load are printed to standard output, one per line. ! If one of the MODE-ARGS was not linked with `-export-dynamic', then ! an error is displayed.  ! File: libtool.info, Node: Install mode, Next: Finish mode, Prev: Dlname mode, Up: Invoking libtool Install mode ============ --- 1000,1030 ---- Otherwise, an executable program is created.  ! File: libtool.info, Node: Execute mode, Next: Install mode, Prev: Link mode, Up: Invoking libtool ! Execute mode ! ============ ! ! For `execute' mode, the library path is automatically set, then a ! program is executed. ! ! The first of the MODE-ARGS is treated as a program name, with the ! rest as arguments to that program. ! ! The following components of MODE-ARGS are treated specially: ! `-dlopen FILE' ! Add the directory containing FILE to the library path. ! This mode sets the library path environment variable according to any ! `-dlopen' flags. ! If any of the ARGS are libtool executable wrappers, then they are ! translated into the name of their corresponding uninstalled binary, and ! any of their required library directories are added to the library path.  ! File: libtool.info, Node: Install mode, Next: Finish mode, Prev: Execute mode, Up: Invoking libtool Install mode ============ *************** *** 970,975 **** --- 1080,1086 ---- * Using Automake:: Automatically supporting libtool. * Configuring:: Configuring libtool for a host system. * Distributing:: What files to distribute with your package. + * Static-only libraries:: Sometimes shared libraries are just a pain.  File: libtool.info, Node: Makefile rules, Next: Using Automake, Up: Integrating libtool *************** *** 1011,1030 **** First, to link a program against a libtool library, just use the `program_LDADD' variable: ! bin_PROGRAMS = hell hell.static # 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 You may use the `program_LDFLAGS' variable to stuff in any flags you want to pass to libtool while linking `program' (such as `-static' to ! create a statically-linked executable). Building a libtool library is almost as trivial... note the use of `libhello_la_LDFLAGS' to pass the `-version-info' (*note Versioning::.) --- 1122,1141 ---- First, to link a program against a libtool library, just use the `program_LDADD' variable: ! bin_PROGRAMS = hell hell.debug # 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 You may use the `program_LDFLAGS' variable to stuff in any flags you want to pass to libtool while linking `program' (such as `-static' to ! avoid linking uninstalled shared libtool libraries). Building a libtool library is almost as trivial... note the use of `libhello_la_LDFLAGS' to pass the `-version-info' (*note Versioning::.) *************** *** 1181,1379 **** checking whether to build shared libraries... yes creating libtool burger$ - -  - File: libtool.info, Node: AM_PROG_LIBTOOL, Prev: ltconfig example, Up: Configuring - - The `AM_PROG_LIBTOOL' macro - --------------------------- - - If you are using GNU Autoconf (or Automake), you should add a call to - `AM_PROG_LIBTOOL' to your `configure.in' file. This macro offers - seamless integration between the `configure' script and `ltconfig': - - - Macro: AM_PROG_LIBTOOL - Add support for the `--enable-shared' and `--disable-shared' - `configure' flags. Invoke `ltconfig' with the correct arguments - to configure the package.(1) - - When you invoke the `libtoolize' program (*note Invoking - libtoolize::.), it will tell you where to find a definition of - `AM_PROG_LIBTOOL'. If you use Automake, the `aclocal' program will - automatically add `AM_PROG_LIBTOOL' support to your `configure' script. - - ---------- Footnotes ---------- - - (1) `AM_PROG_LIBTOOL' requires that you define the `Makefile' - variable `top_builddir' in your `Makefile.in'. Automake does this - automatically, but Autoconf users should set it to the relative path to - the top of your build directory (`../..', for example). - -  - File: libtool.info, Node: Distributing, Prev: Configuring, Up: Integrating libtool - - Including libtool with your package - =================================== - - In order to use libtool, you need to include the following files with - your package: - - `config.guess' - Attempt to guess a canonical system name. - - `config.sub' - Canonical system name validation subroutine script. - - `ltconfig' - Generate a libtool script for a given system. - - `ltmain.sh' - A generic script implementing basic libtool functionality. - - Note that the libtool script itself should *not* be included with - your package. *Note Configuring::. - - You should use the `libtoolize' program, rather than manually - copying these files into your package. - - * Menu: - - * Invoking libtoolize:: `libtoolize' command line options. - * Autoconf .o macros:: Autoconf macros that set object file names. - -  - File: libtool.info, Node: Invoking libtoolize, Next: Autoconf .o macros, Up: Distributing - - Invoking `libtoolize' - --------------------- - - The `libtoolize' program provides a standard way to add libtool - support to your package. In the future, it may implement better usage - checking, or other features to make libtool even easier to use. - - The `libtoolize' program has the following synopsis: - - libtoolize [OPTION]... - - and accepts the following options: - - `--automake' - Work silently, and assume that Automake libtool support is used. - - `libtoolize --automake' is used by Automake to add libtool files to - your package, when `AM_PROG_LIBTOOL' appears in your - `configure.in'. - - `--copy' - `-c' - Copy files from the libtool data directory rather than creating - symlinks. - - `--dry-run' - `-n' - Don't run any commands that modify the file system, just print them - out. - - `--force' - `-f' - Replace existing libtool files. By default, `libtoolize' won't - overwrite existing files. - - `--help' - Display a help message and exit. - - `--version' - Print `libtoolize' version information and exit. - - If `libtoolize' detects an explicit call to `AC_CONFIG_AUX_DIR' - (*note The Autoconf Manual: (autoconf)Input.) in your `configure.in', it - will put the files in the specified directory. - - `libtoolize' displays hints for adding libtool support to your - package, as well. - -  - File: libtool.info, Node: Autoconf .o macros, Prev: Invoking libtoolize, Up: Distributing - - Autoconf `.o' macros - -------------------- - - The Autoconf package comes with a few macros that run tests, then - set a variable corresponding to the name of an object file. Sometimes - it is necessary to use corresponding names for libtool objects. - - Here are the names of variables that list libtool objects: - - - Variable: LTALLOCA - Substituted by `AC_FUNC_ALLOCA' (*note Particular Function Checks: - (autoconf)Particular Functions.). Is either empty, or contains - `alloca.lo'. - - - Variable: LTLIBOBJS - Substituted by `AC_REPLACE_FUNCS' (*note Generic Function Checks: - (autoconf)Generic Functions.), and a few other functions. - - Unfortunately, the most recent version of Autoconf (2.12, at the - time of this writing) does not have any way for libtool to provide - support for these variables. So, if you depend on them, use the - following code immediately before the call to `AC_OUTPUT' in your - `configure.in': - - LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'` - AC_SUBST(LTLIBOBJS) - LTALLOCA=`echo "$ALLOCA" | sed 's/\.o/.lo/g'` - AC_SUBST(LTALLOCA) - AC_OUTPUT(...) - -  - File: libtool.info, Node: Versioning, Next: Library tips, Prev: Integrating libtool, Up: Top - - Library interface 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 - `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 - description of an interface consists of a name, and a "version number." - - Even that sort of description is not accurate enough for some - purposes. What if Emacs 20 changes enough to break Gnus 5.1? - - The same problem exists in shared libraries: we require a formal - version system to describe the sorts of dependencies that programs have - on shared libraries, so that the dynamic linker can guarantee that - programs are linked only against libraries that provide the interface - they require. - - * Menu: - - * Interfaces:: What are library interfaces? - * Libtool versioning:: Libtool's versioning system. - * Updating version info:: Changing version information before releases. - -  - File: libtool.info, Node: Interfaces, Next: Libtool versioning, Up: Versioning - - What are library interfaces? - ============================ - - Interfaces for libraries may be any of the following (and more): - - * global variables: both names and types - - * global functions: argument types and number, return types, and - function names - - * standard input, standard output, standard error, and file formats - - * sockets, pipes, and other inter-process communication protocol - formats - - Note that static functions do not count as interfaces, because they - are not directly available to the user of the library. --- 1292,1295 ---- diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/doc/libtool.info-2 libtool-1.1/doc/libtool.info-2 *** libtool-1.0/doc/libtool.info-2 Tue Jul 8 18:47:53 1997 --- libtool-1.1/doc/libtool.info-2 Sat Mar 7 23:15:13 1998 *************** *** 11,19 **** * libtoolize: (libtool)Invoking libtoolize. Adding libtool support. END-INFO-DIR-ENTRY ! This file documents GNU Libtool 1.0 ! Copyright (C) 1996, 1997 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 --- 11,19 ---- * libtoolize: (libtool)Invoking libtoolize. Adding libtool support. END-INFO-DIR-ENTRY ! This file documents GNU Libtool 1.1 ! 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 *************** *** 30,35 **** --- 30,304 ---- translation approved by the Foundation.  + File: libtool.info, Node: AM_PROG_LIBTOOL, Prev: ltconfig example, Up: Configuring + + The `AM_PROG_LIBTOOL' macro + --------------------------- + + If you are using GNU Autoconf (or Automake), you should add a call to + `AM_PROG_LIBTOOL' to your `configure.in' file. This macro offers + seamless integration between the `configure' script and `ltconfig': + + - Macro: AM_PROG_LIBTOOL + Add support for the `--enable-shared' and `--disable-shared' + `configure' flags. Invoke `ltconfig' with the correct arguments + to configure the package (*note Invoking ltconfig::.).(1) + + 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 `AM_DISABLE_SHARED' or + `AM_DISABLE_STATIC' macros: + + # Turn off shared libraries during beta-testing, since they make the + # build process take too long. + AM_DISABLE_SHARED + AM_PROG_LIBTOOL + + The user may specify a modified form of `--enable-shared' and + `--enable-static' to choose whether shared or static libraries are + built based on the name of the package. For example, to have + shared `bfd' and `gdb' libraries built, but not shared `libg++', + you can run all three `configure' scripts as follows: + + trick$ ./configure --enable-shared=bfd,gdb + + In general, specifying `--enable-shared=PKGS' is the same as + specifying `--enable-shared' to every package named in the PKGS + list, and `--disable-shared' to every other package. The + `--enable-static=PKGS' flag behaves similarly, except it + translates into `--enable-static' and `--disable-static'. + + The package name `default' matches any packages which have not set + their name in the `PACKAGE' environment variable. + + - Macro: AM_DISABLE_SHARED + Change the default behaviour for `AM_PROG_LIBTOOL' to disable + shared libraries. The user may still override this default by + specifying `--enable-shared'. + + - Macro: AM_DISABLE_STATIC + Change the default behaviour for `AM_PROG_LIBTOOL' to disable + static libraries. The user may still override this default by + specifying `--enable-static'. + + When you invoke the `libtoolize' program (*note Invoking + libtoolize::.), it will tell you where to find a definition of + `AM_PROG_LIBTOOL'. If you use Automake, the `aclocal' program will + automatically add `AM_PROG_LIBTOOL' support to your `configure' script. + + ---------- Footnotes ---------- + + (1) `AM_PROG_LIBTOOL' requires that you define the `Makefile' + variable `top_builddir' in your `Makefile.in'. Automake does this + automatically, but Autoconf users should set it to the relative path to + the top of your build directory (`../..', for example). + +  + File: libtool.info, Node: Distributing, Next: Static-only libraries, Prev: Configuring, Up: Integrating libtool + + Including libtool with your package + =================================== + + In order to use libtool, you need to include the following files with + your package: + + `config.guess' + Attempt to guess a canonical system name. + + `config.sub' + Canonical system name validation subroutine script. + + `ltconfig' + Generate a libtool script for a given system. + + `ltmain.sh' + A generic script implementing basic libtool functionality. + + Note that the libtool script itself should *not* be included with + your package. *Note Configuring::. + + You should use the `libtoolize' program, rather than manually + copying these files into your package. + + * Menu: + + * Invoking libtoolize:: `libtoolize' command line options. + * Autoconf .o macros:: Autoconf macros that set object file names. + +  + File: libtool.info, Node: Invoking libtoolize, Next: Autoconf .o macros, Up: Distributing + + Invoking `libtoolize' + --------------------- + + The `libtoolize' program provides a standard way to add libtool + support to your package. In the future, it may implement better usage + checking, or other features to make libtool even easier to use. + + The `libtoolize' program has the following synopsis: + + libtoolize [OPTION]... + + and accepts the following options: + + `--automake' + Work silently, and assume that Automake libtool support is used. + + `libtoolize --automake' is used by Automake to add libtool files to + your package, when `AM_PROG_LIBTOOL' appears in your + `configure.in'. + + `--copy' + `-c' + Copy files from the libtool data directory rather than creating + symlinks. + + `--dry-run' + `-n' + Don't run any commands that modify the file system, just print them + out. + + `--force' + `-f' + Replace existing libtool files. By default, `libtoolize' won't + overwrite existing files. + + `--help' + Display a help message and exit. + + `--version' + Print `libtoolize' version information and exit. + + If `libtoolize' detects an explicit call to `AC_CONFIG_AUX_DIR' + (*note The Autoconf Manual: (autoconf)Input.) in your `configure.in', it + will put the files in the specified directory. + + `libtoolize' displays hints for adding libtool support to your + package, as well. + +  + File: libtool.info, Node: Autoconf .o macros, Prev: Invoking libtoolize, Up: Distributing + + Autoconf `.o' macros + -------------------- + + The Autoconf package comes with a few macros that run tests, then + set a variable corresponding to the name of an object file. Sometimes + it is necessary to use corresponding names for libtool objects. + + Here are the names of variables that list libtool objects: + + - Variable: LTALLOCA + Substituted by `AC_FUNC_ALLOCA' (*note Particular Function Checks: + (autoconf)Particular Functions.). Is either empty, or contains + `alloca.lo'. + + - Variable: LTLIBOBJS + Substituted by `AC_REPLACE_FUNCS' (*note Generic Function Checks: + (autoconf)Generic Functions.), and a few other functions. + + Unfortunately, the most recent version of Autoconf (2.12, at the + time of this writing) does not have any way for libtool to provide + support for these variables. So, if you depend on them, use the + following code immediately before the call to `AC_OUTPUT' in your + `configure.in': + + LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'` + AC_SUBST(LTLIBOBJS) + LTALLOCA=`echo "$ALLOCA" | sed 's/\.o/.lo/g'` + AC_SUBST(LTALLOCA) + AC_OUTPUT(...) + +  + File: libtool.info, Node: Static-only libraries, Prev: Distributing, Up: Integrating libtool + + Static-only libraries + ===================== + + When you are developing a package, it is often worthwhile to + configure your package with the `--disable-shared' flag, or to override + the defaults for `AM_PROG_LIBTOOL' by using the `AM_DISABLE_SHARED' + Autoconf macro (*note AM_PROG_LIBTOOL::.). This prevents libtool from + building shared libraries, which has several advantages: + + * compilation is twice as fast, which can speed up your development + cycle + + * debugging is easier because you don't need to deal with any + complexities added by shared libraries + + * you can see how libtool behaves on static-only platforms + + You may want to put a small note in your package `README' to let + other developers know that `--disable-shared' can save them time. The + following example note is taken from the GIMP(1) distribution `README': + + The GIMP uses GNU Libtool in order to build shared libraries on a + variety of systems. While this is very nice for making usable + binaries, it can be a pain when trying to debug a program. For that + reason, compilation of shared libraries can be turned off by + specifying the `--disable-shared' option to `configure'. + + ---------- Footnotes ---------- + + (1) GNU Image Manipulation Program, for those who haven't taken the + plunge. See `http://www.gimp.org/'. + +  + File: libtool.info, Node: Versioning, Next: Library tips, Prev: Integrating libtool, Up: Top + + Library interface 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 + `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 + description of an interface consists of a name, and a "version number." + + Even that sort of description is not accurate enough for some + purposes. What if Emacs 20 changes enough to break Gnus 5.1? + + The same problem exists in shared libraries: we require a formal + version system to describe the sorts of dependencies that programs have + on shared libraries, so that the dynamic linker can guarantee that + programs are linked only against libraries that provide the interface + they require. + + * Menu: + + * Interfaces:: What are library interfaces? + * Libtool versioning:: Libtool's versioning system. + * Updating version info:: Changing version information before releases. + * Release numbers:: Breaking binary compatibility for aesthetics. + +  + File: libtool.info, Node: Interfaces, Next: Libtool versioning, Up: Versioning + + What are library interfaces? + ============================ + + Interfaces for libraries may be any of the following (and more): + + * global variables: both names and types + + * global functions: argument types and number, return types, and + function names + + * standard input, standard output, standard error, and file formats + + * sockets, pipes, and other inter-process communication protocol + formats + + Note that static functions do not count as interfaces, because they + are not directly available to the user of the library. + +  File: libtool.info, Node: Libtool versioning, Next: Updating version info, Prev: Interfaces, Up: Versioning Libtool's versioning system *************** *** 47,55 **** simple: it encodes the least and the greatest interface numbers in the resulting binary (FIRST-INTERFACE, LAST-INTERFACE). ! Then, the dynamic linker is guaranteed that if a library supports ! *every* interface number between FIRST-INTERFACE and LAST-INTERFACE, ! then the program can be relinked against that library. Note that this can cause problems because libtool's compatibility requirements are actually stricter than is necessary. --- 316,324 ---- simple: it encodes the least and the greatest interface numbers in the resulting binary (FIRST-INTERFACE, LAST-INTERFACE). ! The dynamic linker is guaranteed that if a library supports *every* ! interface number between FIRST-INTERFACE and LAST-INTERFACE, then the ! program can be relinked against that library. Note that this can cause problems because libtool's compatibility requirements are actually stricter than is necessary. *************** *** 72,91 **** CURRENT The most recent interface number that this library implements. AGE ! The difference between the oldest and newest interfaces that this library implements. In other words, the library implements all the interface numbers in the range from number `CURRENT - AGE' to `CURRENT'. - REVISION - The implementation number of the CURRENT interface. - If two libraries have identical CURRENT and AGE numbers, then the dynamic linker chooses the library with the greater REVISION number.  ! File: libtool.info, Node: Updating version info, Prev: Libtool versioning, Up: Versioning Updating library version information ==================================== --- 341,360 ---- CURRENT The most recent interface number that this library implements. + REVISION + The implementation number of the CURRENT interface. + AGE ! The difference between the newest and oldest interfaces that this library implements. In other words, the library implements all the interface numbers in the range from number `CURRENT - AGE' to `CURRENT'. If two libraries have identical CURRENT and AGE numbers, then the dynamic linker chooses the library with the greater REVISION number.  ! File: libtool.info, Node: Updating version info, Next: Release numbers, Prev: Libtool versioning, Up: Versioning Updating library version information ==================================== *************** *** 98,104 **** `CURRENT[:REVISION[:AGE]]'. So, passing `-version-info 3:12:1' sets CURRENT to 3, REVISION to 12, and AGE to 1. ! If either AGE or REVISION are omitted, they default to 0. Also note that AGE must be less than or equal to the CURRENT interface number. Here are a set of rules to help you update your library version --- 367,373 ---- `CURRENT[:REVISION[:AGE]]'. So, passing `-version-info 3:12:1' sets CURRENT to 3, REVISION to 12, and AGE to 1. ! If either REVISION or AGE are omitted, they default to 0. Also note that AGE must be less than or equal to the CURRENT interface number. Here are a set of rules to help you update your library version *************** *** 123,131 **** 6. If any interfaces have been removed since the last public release, then set AGE to 0. ! **Never** try to set library version 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.  File: libtool.info, Node: Library tips, Next: Inter-library dependencies, Prev: Versioning, Up: Top --- 392,449 ---- 6. If any interfaces have been removed since the last public release, then set AGE to 0. ! **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 `-release' flag (*note Release numbers::.), but be warned that ! every release of your package will not be binary compatibility with any ! other release. ! !  ! File: libtool.info, Node: Release numbers, Prev: Updating version info, Up: Versioning ! ! Managing release information ! ============================ ! ! 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: ! ! trick$ ls /usr/lib/libbfd* ! /usr/lib/libbfd.a /usr/lib/libbfd.so.2.7.0.2 ! /usr/lib/libbfd.so ! trick$ ! ! On `trick', `/usr/lib/libbfd.so' is just a symbolic link to ! `/usr/lib/libbfd.so.2.7.0.2', which was distributed as a part of ! `binutils-2.7.0.2'. ! ! Unfortunately, this convention conflicts directly with libtool's ! idea of library interface versions, because the library interface ! rarely changes at the same time that the release number does, and the ! library suffix is never the same across all platforms. ! ! So, in order to accomodate both views, you can use the `-release' ! flag in order to set release information for libraries which you do not ! want to use `-version-info'. For the `libbfd' example, the next ! release which uses libtool should be built with `-release 2.9.0', which ! will produce the following files on Linux: ! ! trick$ 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$ ! ! In this case, `/usr/lib/libbfd.so' is a symbolic link to ! `/usr/lib/libbfd-2.9.0.so.0.0.0'. This makes it obvious that the user ! is dealing with `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 ! `-release' for libraries whose interfaces change very frequently.  File: libtool.info, Node: Library tips, Next: Inter-library dependencies, Prev: Versioning, Up: Top *************** *** 315,334 **** compatibility with static library systems and simple dynamic library systems. ! If your library depends on symbols that are defined in executables or ! static libraries, then you cannot express the dependency with a ! `-lNAME' flag,(2) so you need to use the `-allow-undefined' link flag ! (*note Link mode::.). ---------- Footnotes ---------- ! (1) Unfortunately, as of libtool version 1.0, there is no way to specify inter-library dependencies on libtool libraries that have not yet been installed. - (2) For static libraries, you *could* use a `-l' flag, but it would - cause conflicts on systems which have non-PIC objects. -  File: libtool.info, Node: Dlopened modules, Next: Other languages, Prev: Inter-library dependencies, Up: Top --- 633,651 ---- 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 -NO-UNDEFINED flag to allow a shared library to be built. ! By default, libtool builds only static libraries on these kinds of ! platforms. ---------- Footnotes ---------- ! (1) Unfortunately, as of libtool version 1.1, there is no way to specify inter-library dependencies on libtool libraries that have not yet been installed.  File: libtool.info, Node: Dlopened modules, Next: Other languages, Prev: Inter-library dependencies, Up: Top *************** *** 355,372 **** language interpreters to provide an efficient way to extend the language. ! On most operating systems, dlopened modules must be compiled as PIC. ! This restriction simplifies the implementation of the `dlopen(3)' ! family of functions by avoiding symbol relocation. "True" dlopen ! implementations, such as the unportable GNU DLD 3 implementation (*note ! Introduction: (dld)Top.), don't have this restriction, as they can ! perform relocation at runtime. ! ! As of version 1.0, libtool provides only minimal support for ! dlopened modules, and this support is guaranteed to change and be ! redesigned in the near future. Because there is not a very high ! proportion of applications that use dlopening, adding this support to ! libtool was not deemed a priority for the 1.0 release. This chapter discusses the preliminary support that libtool offers, and how you as a dlopen application developer might use libtool to --- 672,681 ---- language interpreters to provide an efficient way to extend the language. ! As of version 1.1, 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 *************** *** 376,382 **** * Menu: ! * Exporting dynamic symbols:: Preparing files to be dlopened. * Finding the dlname:: Choosing the right file to `dlopen(3)'. * Dlopen issues:: Unresolved problems that need your attention. --- 685,692 ---- * Menu: ! * Building modules:: Creating dlopenable objects and libraries. ! * Dlpreopening:: Dlopening that works on static platforms. * Finding the dlname:: Choosing the right file to `dlopen(3)'. * Dlopen issues:: Unresolved problems that need your attention. *************** *** 385,402 **** (1) HP-UX, to be different, uses a function named `shl_load(3)'.  ! File: libtool.info, Node: Exporting dynamic symbols, Next: Finding the dlname, Up: Dlopened modules ! Exporting dynamic symbols ! ========================= ! In order for a symbol to be dynamically resolved (typically using the ! `dlsym(3)' function), it must be specially declared in the object ! module where it is defined. Libtool provides the `-export-dynamic' link flag (*note Link mode::.), which does this declaration. You need to use this flag if you ! are linking a shared library that will be dlopened. For example, if we wanted to build a shared library, `libhello', that would later be dlopened by an application, we would add --- 695,713 ---- (1) HP-UX, to be different, uses a function named `shl_load(3)'.  ! File: libtool.info, Node: Building modules, Next: Dlpreopening, Up: Dlopened modules ! Building modules to dlopen ! ========================== ! On some operating systems, a program symbol must be specially ! declared in order to be dynamically resolved with the `dlsym(3)' (or ! equivalent) function. Libtool provides the `-export-dynamic' link flag (*note 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, `libhello', that would later be dlopened by an application, we would add *************** *** 415,421 **** burger$  ! File: libtool.info, Node: Finding the dlname, Next: Dlopen issues, Prev: Exporting dynamic symbols, Up: Dlopened modules Finding the correct name to dlopen ================================== --- 726,795 ---- burger$  ! File: libtool.info, Node: Dlpreopening, Next: Finding the dlname, Prev: Building modules, Up: Dlopened modules ! ! Dlpreopening ! ============ ! ! Libtool provides special support for dlopening libtool object and ! libtool library files, so that their symbols can be resolved *even on ! platforms without any `dlopen(3)' and `dlsym(3)' functions.*. ! ! Consider the following alternative ways of loading code into your ! program, in order of increasing "laziness": ! ! 1. Linking against object files that become part of the program ! executable, whether or not they are referenced. If an object file ! cannot be found, then the linker refuses to create the executable. ! ! 2. Declaring a static library to the linker, so that it is searched ! at link time in order to satisfy any undefined references in the ! above object files. If the static library cannot be found, then ! the linker refuses to link the executable. ! ! 3. Declaring a shared library to the runtime linker, so that it is ! searched at runtime in order to satisfy any undefined references ! in the above files. If the shared library cannot be found, then ! the dynamic linker aborts the program before it runs. ! ! 4. Dlopening a module, so that the application can resolve its own, ! dynamically-computed references. If there is an error opening the ! module, or the module is not found, then the application can ! recover without crashing. ! ! Libtool emulates `-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 `-dlopen' or `-dlpreopen' flags ! when you link your program (*note Link mode::.). ! ! - Structure: dld_symbol name address ! The NAME attribute is a 0-terminated character string of the ! symbol name, such as `"fprintf"'. The ADDRESS attribute is a ! generic pointer to the appropriate object, which is `&fprintf' in ! this example. ! ! - Variable: dld_symbol * dld_preloaded_symbols ! An array of DLD_SYMBOL structures, representing all the preloaded ! symbols linked into the program. The last element has a NAME of ! `0'. ! ! - Variable: int dld_preloaded_symbol_count ! The number of elements in DLD_PRELOADED_SYMBOLS, if it is sorted ! in ascending order by NAME. Otherwise, `-1', to indicate that the ! application needs to sort and count DLD_PRELOADED_SYMBOLS itself, ! or search it linearly. ! ! 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 DLD_PRELOADED_SYMBOLS. ! !  ! File: libtool.info, Node: Finding the dlname, Next: Dlopen issues, Prev: Dlpreopening, Up: Dlopened modules Finding the correct name to dlopen ================================== *************** *** 424,443 **** dlopened. Unfortunately, because of the variation in library names, your package needs to determine the correct file to dlopen. ! Dlname mode (*note Dlname mode::.) was designed for this purpose. It ! returns the name that should be given as the first argument to a ! `dlopen(3)' function call. ! ! For example, on NetBSD 1.2: ! ! burger$ libtool --mode=dlname libhello.la ! libhello.so.3.12 ! burger$ ! ! The trick is in finding a way to hardcode this name into your ! program at compilation time, so that it opens the correct library. ! ! An alternative implementation that avoids hardcoding is to determine the name at runtime, by finding the installed `.la' file, and searching it for the following lines: --- 798,804 ---- 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 name at runtime, by finding the installed `.la' file, and searching it for the following lines: *************** *** 481,488 **** family of functions. Some platforms do not even use the same function names (notably HP-UX, with its `shl_load(3)' family). ! * It is the burden of the libtool user to find a way to get the ! results of dlname mode (*note Dlname mode::.) into the call to `dlopen(3)'. Each of these limitations will be addressed in GNU DLD 4.(1) --- 842,849 ---- family of functions. Some platforms do not even use the same function names (notably HP-UX, with its `shl_load(3)' family). ! * The application developer must write a custom search function in ! order to discover the correct module filename to supply to `dlopen(3)'. Each of these limitations will be addressed in GNU DLD 4.(1) *************** *** 675,682 **** specific to Emacs, but the principle behind them is a general one. Finally, send a bug report to the libtool mailing list ! `' with any appropriate *facts*, such as ! test suite output (*note When tests fail::.), all the details needed to reproduce the bug, and a brief description of why you think the behaviour is a bug. Be sure to include the word "libtool" in the subject line, as well as the version number you are using (which can be --- 1036,1043 ---- specific to Emacs, but the principle behind them is a general one. Finally, send a bug report to the libtool mailing list ! <> with any appropriate *facts*, such as test ! suite output (*note When tests fail::.), all the details needed to reproduce the bug, and a brief description of why you think the behaviour is a bug. Be sure to include the word "libtool" in the subject line, as well as the version number you are using (which can be *************** *** 688,695 ****  File: libtool.info, Node: Maintaining, Next: Index, Prev: Troubleshooting, Up: Top ! Maintainance notes for libtool ! ****************************** This chapter contains information that the libtool maintainer finds important. It will be of no use to you unless you are considering --- 1049,1056 ----  File: libtool.info, Node: Maintaining, Next: Index, Prev: Troubleshooting, Up: Top ! Maintenance notes for libtool ! ***************************** This chapter contains information that the libtool maintainer finds important. It will be of no use to you unless you are considering *************** *** 747,784 **** -------------------------------------------------------- alpha-dec-osf3.2 cc 0.8 ok alpha-dec-osf3.2 gcc 0.8 ok ! alpha-dec-osf4.0 cc 0.9 ok ! alpha-dec-osf4.0 gcc 0.9 ok alpha-unknown-linux gcc 0.9h ok ! hppa1.1-hp-hpux9.05 cc 0.8 ok ! hppa1.1-hp-hpux9.05 gcc 0.8 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-gnu1.3.20 gcc 1.0 ok ! i586-pc-linux-gnu2.0.16 gcc 1.0 ok mips-sgi-irix5.3 cc 0.8 ok mips-sgi-irix5.3 gcc 0.8 ok ! mips-sgi-irix6.2 cc -32 0.9 ok ! mips-sgi-irix6.2 cc -n32 0.9 ok mipsel-unknown-openbsd2.1 gcc 1.0 ok ! powerpc-ibm-aix4.1.4.0 xlc 1.0 ok powerpc-ibm-aix4.1.4.0 gcc 1.0 ok ! rs6000-ibm-aix3.2.5 xlc 0.9h ok ! rs6000-ibm-aix3.2.5 gcc 0.9h ok* sparc-sun-linux2.1.23 gcc 0.9h ok ! sparc-sun-sunos4.1.4 cc 1.0 ok ! sparc-sun-sunos4.1.4 gcc 1.0 ok ! sparc-sun-solaris2.4 cc 0.9 ok ! sparc-sun-solaris2.4 gcc 0.9 ok ! sparc-sun-solaris2.5 cc 0.9 ok ! sparc-sun-solaris2.5 gcc 1.0 ok -------------------------------------------------------- ! * Libtool will not build shared libraries because of a bug in ! GCC 2.7.2.2's collect2 linker program.  File: libtool.info, Node: Platform quirks, Next: libtool script contents, Prev: Tested platforms, Up: Maintaining --- 1108,1151 ---- -------------------------------------------------------- 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 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-linux2.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.  File: libtool.info, Node: Platform quirks, Next: libtool script contents, Prev: Tested platforms, Up: Maintaining *************** *** 798,810 **** * Menu: * Compilers:: Creating object files from source files. * Reloadable objects:: Binding object files together. * Archivers:: Programs that create static archives. - * Strip:: Removing unnecessary linkage information.  ! File: libtool.info, Node: Compilers, Next: Reloadable objects, Up: Platform quirks Compilers --------- --- 1165,1192 ---- * Menu: + * References:: Finding more information. * Compilers:: Creating object files from source files. * Reloadable objects:: Binding object files together. * Archivers:: Programs that create static archives.  ! File: libtool.info, Node: References, Next: Compilers, Up: Platform quirks ! ! References ! ---------- ! ! The following is a list of valuable documentation references: ! ! * SGI's IRIX Manual Pages, ! `http://techpubs.sgi.com/cgi-bin/infosrch.cgi?cmd=browse&db=man'. ! ! * Sun's free service area ! (`http://www.sun.com/service/online/free.html') and documentation ! server (`http://docs.sun.com/'). ! !  ! File: libtool.info, Node: Compilers, Next: Reloadable objects, Prev: References, Up: Platform quirks Compilers --------- *************** *** 869,875 **** treated as exactly equivalent to other objects.  ! File: libtool.info, Node: Archivers, Next: Strip, Prev: Reloadable objects, Up: Platform quirks Archivers --------- --- 1251,1257 ---- treated as exactly equivalent to other objects.  ! File: libtool.info, Node: Archivers, Prev: Reloadable objects, Up: Platform quirks Archivers --------- *************** *** 881,1062 **** On all known systems, if there is a program named `ranlib', then it must be used to "bless" the created library before linking against it, with the `ranlib libNAME.a' command. - -  - File: libtool.info, Node: Strip, Prev: Archivers, Up: Platform quirks - - The `strip' program - ------------------- - - Stripping a library is essentially the same problem as stripping an - object file. Only local and debugging symbols must be removed, or else - linking against a stripped library will fail. - - With GNU `strip', the `--discard-all' (or equivalent `-x') flag will - do the appropriate stripping, for both shared and static libraries. - - Here is a list of some other operating systems, and what their - bundled `strip' programs will do: - - `netbsd*' - The `-x' flag works for shared libraries, but fails with - "Inappropriate file type or format" when used on static libraries. - - `hpux10*' - HP-UX `strip' requires the `-r' and `-x' flags in order to strip - libraries. - -  - File: libtool.info, Node: libtool script contents, Prev: Platform quirks, Up: Maintaining - - `libtool' script contents - ========================= - - The `libtool' script is generated by `ltconfig' (*note - Configuring::.). Ever since libtool version 0.7, this script simply - sets shell variables, then sources the libtool backend, `ltmain.sh'. - - Here is a listing of each of these variables, and how they are used - within `ltmain.sh': - - - Variable: AR - The name of the system library archiver. - - - Variable: LD - The name of the linker that libtool should use internally for - reloadable linking and possibly shared libraries. - - - Variable: LTCONFIG_VERSION - This is set to the version number of the `ltconfig' script, to - prevent mismatches between the configuration information in - `libtool', and how that information is used in `ltmain.sh'. - - - Variable: RANLIB - Set to the name of the ranlib program, if any. - - - Variable: allow_undefined_flag - The flag that is used by `archive_cmds' in order to declare that - there will be unresolved symbols in the resulting shared library. - Empty, if no such flag is required. Set to `unsupported' if there - is no way to generate a shared library with references to symbols - that aren't defined in that library. - - - Variable: archive_cmds - - Variable: old_archive_cmds - Commands used to create shared and static libraries, respectively. - - - Variable: build_libtool_libs - Whether libtool should build shared libraries on this system. Set - to `yes' or `no'. - - - Variable: build_old_libs - Whether libtool should build static libraries on this system. Set - to `yes' or `no'. - - - Variable: export_dynamic_flag - Compiler link flag that allows a dlopened shared library to - reference symbols that are defined in the program. - - - Variable: finish_cmds - Commands to tell the dynamic linker how to find shared libraries - in a specific directory. - - - Variable: hardcode_action - Either `immediate' or `relink', depending on whether shared - library paths can be hardcoded into executables before they are - installed, or if they need to be relinked. - - - Variable: hardcode_direct - Set to `yes' or `no', depending on whether the linker hardcodes - directories if a library is directly specified on the command line - (such as `DIR/libNAME.a'). - - - Variable: hardcode_libdir_flag_spec - Flag to hardcode a LIBDIR variable into a binary, so that the - dynamic linker searches LIBDIR for shared libraries at runtime. - - - Variable: hardcode_libdir_separator - If the compiler only accepts a single HARDCODE_LIBDIR_FLAG, then - this variable contains the string that should separate multiple - arguments to that flag. - - - Variable: hardcode_minus_L - Set to `yes' or `no', depending on whether the linker hardcodes - directories specified by `-L' flags into the resulting executable. - - - Variable: hardcode_runpath_var - Set to `yes' or `no', depending on whether the linker hardcodes - directories by writing the contents of `$runpath_var' into the - resulting executable. - - - Variable: hardcode_shlibpath_var - Set to `yes' or `no', depending on whether the linker hardcodes - directories by writing the contents of `$shlibpath_var' into the - resulting executable. Set to `unsupported' if directories - specified by `$shlibpath_var' are searched at run time, but not at - link time. - - - Variable: host - - Variable: host_alias - For information purposes, set to the specified and canonical names - of the system that libtool was configured for. - - - Variable: library_names_spec - A list of shared library names. The first is the name of the file, - the rest are symbolic links to the file. The name in the list is - the file name that the linker finds when given `-lNAME'. - - - Variable: link_static_flag - Linker flag (passed through the C compiler) used to prevent dynamic - linking. - - - Variable: pic_flag - Any additional compiler flags for building library object files. - - - Variable: postinstall_cmds - - Variable: old_postinstall_cmds - Commands run after installing a shared or static library, - respectively. - - - Variable: reload_cmds - - Variable: reload_flag - Commands to create a reloadable object. - - - Variable: runpath_var - The environment variable that tells the linker which directories to - hardcode in the resulting executable. - - - Variable: shlibpath_var - The environment variable that tells the dynamic linker where to - find shared libraries. - - - Variable: soname_spec - The name coded into shared libraries, if different from the real - name of the file. - - - Variable: striplib - - Variable: old_striplib - Programs to strip shared and static libraries, respectively.(1) - - - Variable: version_type - The library version numbering type. One of `libtool', `linux', - `osf', `sunos', or `none'. - - - Variable: wl - The C compiler flag that allows libtool to pass a flag directly to - the linker. Used as: `${wl}SOME-FLAG'. - - Variables ending in `_cmds' contain a semicolon-separated list of - commands that are `eval'ed one after another. If any of the commands - return a nonzero exit status, libtool generally exits with an error - message. - - Variables ending in `_spec' are `eval'ed before being used by - libtool. - - ---------- Footnotes ---------- - - (1) In the current implementation, libtool does not use any - programs to strip libraries. Support will be added after it is clear - how to write a portable test for library stripping programs. --- 1263,1266 ---- diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/doc/libtool.info-3 libtool-1.1/doc/libtool.info-3 *** libtool-1.0/doc/libtool.info-3 Tue Jul 8 18:47:53 1997 --- libtool-1.1/doc/libtool.info-3 Sat Mar 7 23:15:13 1998 *************** *** 11,19 **** * libtoolize: (libtool)Invoking libtoolize. Adding libtool support. END-INFO-DIR-ENTRY ! This file documents GNU Libtool 1.0 ! Copyright (C) 1996, 1997 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 --- 11,19 ---- * libtoolize: (libtool)Invoking libtoolize. Adding libtool support. END-INFO-DIR-ENTRY ! This file documents GNU Libtool 1.1 ! 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 *************** *** 30,35 **** --- 30,217 ---- translation approved by the Foundation.  + File: libtool.info, Node: libtool script contents, Prev: Platform quirks, Up: Maintaining + + `libtool' script contents + ========================= + + The `libtool' script is generated by `ltconfig' (*note + Configuring::.). Ever since libtool version 0.7, this script simply + sets shell variables, then sources the libtool backend, `ltmain.sh'. + + Here is a listing of each of these variables, and how they are used + within `ltmain.sh': + + - Variable: AR + The name of the system library archiver. + + - Variable: CC + The name of the C compiler used to configure libtool. + + - Variable: LD + The name of the linker that libtool should use internally for + reloadable linking and possibly shared libraries. + + - Variable: LTCONFIG_VERSION + This is set to the version number of the `ltconfig' script, to + prevent mismatches between the configuration information in + `libtool', and how that information is used in `ltmain.sh'. + + - Variable: NM + The name of a BSD-compatible `nm' program, which produces listings + of global symbols in one the following formats: + + ADDRESS C GLOBAL-VARIABLE-NAME + ADDRESS D GLOBAL-VARIABLE-NAME + ADDRESS T GLOBAL-FUNCTION-NAME + + - Variable: RANLIB + Set to the name of the ranlib program, if any. + + - Variable: allow_undefined_flag + The flag that is used by `archive_cmds' in order to declare that + there will be unresolved symbols in the resulting shared library. + Empty, if no such flag is required. Set to `unsupported' if there + is no way to generate a shared library with references to symbols + that aren't defined in that library. + + - Variable: archive_cmds + - Variable: old_archive_cmds + Commands used to create shared and static libraries, respectively. + + - Variable: build_libtool_libs + Whether libtool should build shared libraries on this system. Set + to `yes' or `no'. + + - Variable: build_old_libs + Whether libtool should build static libraries on this system. Set + to `yes' or `no'. + + - Variable: echo + An `echo(1)' program which does not interpret backslashes as an + escape character. + + - Variable: export_dynamic_flag_spec + Compiler link flag that allows a dlopened shared library to + reference symbols that are defined in the program. + + - Variable: finish_cmds + Commands to tell the dynamic linker how to find shared libraries + in a specific directory. + + - Variable: finish_eval + Same as FINISH_CMDS, except the commands are not displayed. + + - Variable: global_symbol_pipe + A pipeline that takes the output of NM, and produces a listing of + raw symbols followed by their C names. For example: + + $ $NM | $global_symbol_pipe + SYMBOL1 C-SYMBOL1 + SYMBOL2 C-SYMBOL2 + SYMBOL3 C-SYMBOL3 + ... + $ + + - Variable: hardcode_action + Either `immediate' or `relink', depending on whether shared + library paths can be hardcoded into executables before they are + installed, or if they need to be relinked. + + - Variable: hardcode_direct + Set to `yes' or `no', depending on whether the linker hardcodes + directories if a library is directly specified on the command line + (such as `DIR/libNAME.a'). + + - Variable: hardcode_libdir_flag_spec + Flag to hardcode a LIBDIR variable into a binary, so that the + dynamic linker searches LIBDIR for shared libraries at runtime. + + - Variable: hardcode_libdir_separator + If the compiler only accepts a single HARDCODE_LIBDIR_FLAG, then + this variable contains the string that should separate multiple + arguments to that flag. + + - Variable: hardcode_minus_L + Set to `yes' or `no', depending on whether the linker hardcodes + directories specified by `-L' flags into the resulting executable. + + - Variable: hardcode_shlibpath_var + Set to `yes' or `no', depending on whether the linker hardcodes + directories by writing the contents of `$shlibpath_var' into the + resulting executable. Set to `unsupported' if directories + specified by `$shlibpath_var' are searched at run time, but not at + link time. + + - Variable: host + - Variable: host_alias + For information purposes, set to the specified and canonical names + of the system that libtool was configured for. + + - Variable: libname_spec + The format of a library name prefix. On all Unix systems, static + libraries are called `libNAME.a', but on some systems (such as + OS/2 or MS-DOS), the library is just called `NAME.a'. + + - Variable: library_names_spec + A list of shared library names. The first is the name of the file, + the rest are symbolic links to the file. The name in the list is + the file name that the linker finds when given `-lNAME'. + + - Variable: link_static_flag + Linker flag (passed through the C compiler) used to prevent dynamic + linking. + + - Variable: no_builtin_flag + Compiler flag to disable builtin functions that conflict with + declaring external global symbols as `char'. + + - Variable: no_undefined_flag + The flag that is used by `archive_cmds' in order to declare that + there will be no unresolved symbols in the resulting shared + library. Empty, if no such flag is required. + + - Variable: pic_flag + Any additional compiler flags for building library object files. + + - Variable: postinstall_cmds + - Variable: old_postinstall_cmds + Commands run after installing a shared or static library, + respectively. + + - Variable: reload_cmds + - Variable: reload_flag + Commands to create a reloadable object. + + - Variable: runpath_var + The environment variable that tells the linker which directories to + hardcode in the resulting executable. + + - Variable: shlibpath_var + The environment variable that tells the dynamic linker where to + find shared libraries. + + - Variable: soname_spec + The name coded into shared libraries, if different from the real + name of the file. + + - Variable: version_type + The library version numbering type. One of `libtool', `linux', + `osf', `sunos', or `none'. + + - Variable: wl + The C compiler flag that allows libtool to pass a flag directly to + the linker. Used as: `${wl}SOME-FLAG'. + + Variables ending in `_cmds' or `_eval' contain a semicolon-separated + list of commands that are `eval'ed one after another. If any of the + commands return a nonzero exit status, libtool generally exits with an + error message. + + Variables ending in `_spec' are `eval'ed before being used by + libtool. + +  File: libtool.info, Node: Index, Prev: Maintaining, Up: Top Index *************** *** 45,55 **** --- 227,240 ---- * AC_REPLACE_FUNCS: Autoconf .o macros. * aclocal: AM_PROG_LIBTOOL. * allow_undefined_flag: libtool script contents. + * AM_DISABLE_SHARED: AM_PROG_LIBTOOL. + * AM_DISABLE_STATIC: AM_PROG_LIBTOOL. * AM_PROG_LIBTOOL: AM_PROG_LIBTOOL. * Application-level dynamic linking: Dlopened modules. * AR: libtool script contents. * ar: Linking libraries. * archive_cmds: libtool script contents. + * Avoiding shared libraries: Static-only libraries. * Bug reports: Reporting bugs. * Buggy system linkers: Linking executables. * Bugs, subtle ones caused by buggy linkers: Linking executables. *************** *** 59,64 **** --- 244,250 ---- * C++, pitfalls: C++ libraries. * C++, using: Other languages. * C, not using: Other languages. + * CC <1>: libtool script contents. * CC: Invoking ltconfig. * CFLAGS: Invoking ltconfig. * Command options, libtool: Invoking libtool. *************** *** 72,77 **** --- 258,264 ---- * Configuring libtool: Configuring. * Convenience libraries: Static libraries. * CPPFLAGS: Invoking ltconfig. + * Debugging libraries: Static-only libraries. * Definition of libraries: Libtool paradigm. * demo-conf.test: Test descriptions. * demo-exec.test: Test descriptions. *************** *** 83,111 **** * Design issues: Issues. * Design of library interfaces: Library tips. * Design philosophy: Motivation. * dlclose(3): Dlopened modules. ! * Dlname mode: Dlname mode. * dlopen(3): Dlopened modules. * dlopening modules: Dlopened modules. * Dlopening, pitfalls: Dlopen issues. * dlsym(3): Dlopened modules. * Dynamic dependencies: Versioning. * Dynamic linking, applications: Dlopened modules. * Dynamic modules, names: Finding the dlname. * Examples of using libtool: Using libtool. ! * export_dynamic_flag: libtool script contents. * Failed tests: When tests fail. * Finish mode: Finish mode. * finish_cmds: libtool script contents. * Formal versioning: Libtool versioning. * Global functions: Library tips. * hardcode.test: Test descriptions. * hardcode_action: libtool script contents. * hardcode_direct: libtool script contents. * hardcode_libdir_flag_spec: libtool script contents. * hardcode_libdir_separator: libtool script contents. * hardcode_minus_L: libtool script contents. - * hardcode_runpath_var: libtool script contents. * hardcode_shlibpath_var: libtool script contents. * Header files: Library tips. * host: libtool script contents. --- 270,305 ---- * Design issues: Issues. * Design of library interfaces: Library tips. * Design philosophy: Motivation. + * Developing libraries: Static-only libraries. * dlclose(3): Dlopened modules. ! * dld_preloaded_symbol_count: Dlpreopening. ! * dld_preloaded_symbols: Dlpreopening. * dlopen(3): Dlopened modules. * dlopening modules: Dlopened modules. * Dlopening, pitfalls: Dlopen issues. * dlsym(3): Dlopened modules. + * Double-compilation, avoiding: Static-only libraries. * Dynamic dependencies: Versioning. * Dynamic linking, applications: Dlopened modules. * Dynamic modules, names: Finding the dlname. + * echo: libtool script contents. + * Eliding shared libraries: Static-only libraries. * Examples of using libtool: Using libtool. ! * Execute mode: Execute mode. ! * export_dynamic_flag_spec: libtool script contents. * Failed tests: When tests fail. * Finish mode: Finish mode. * finish_cmds: libtool script contents. + * finish_eval: libtool script contents. * Formal versioning: Libtool versioning. * Global functions: Library tips. + * global_symbol_pipe: libtool script contents. * hardcode.test: Test descriptions. * hardcode_action: libtool script contents. * hardcode_direct: libtool script contents. * hardcode_libdir_flag_spec: libtool script contents. * hardcode_libdir_separator: libtool script contents. * hardcode_minus_L: libtool script contents. * hardcode_shlibpath_var: libtool script contents. * Header files: Library tips. * host: libtool script contents. *************** *** 119,124 **** --- 313,319 ---- * Languages, non-C: Other languages. * LD <1>: libtool script contents. * LD: Invoking ltconfig. + * libname_spec: libtool script contents. * Libraries, definition of: Libtool paradigm. * Libraries, finishing installation: Installing libraries. * Libraries, stripping: Installing libraries. *************** *** 153,159 **** * Makefile.am: Makefile rules. * Makefile.in: Makefile rules. * Mode, compile: Compile mode. ! * Mode, dlname: Dlname mode. * Mode, finish: Finish mode. * Mode, install: Install mode. * Mode, link: Link mode. --- 348,354 ---- * Makefile.am: Makefile rules. * Makefile.in: Makefile rules. * Mode, compile: Compile mode. ! * Mode, execute: Execute mode. * Mode, finish: Finish mode. * Mode, install: Install mode. * Mode, link: Link mode. *************** *** 161,171 **** * Modules, dynamic: Dlopened modules. * Motivation for writing libtool: Motivation. * Names of dynamic modules: Finding the dlname. * Object files, compiling: Creating object files. * Object files, library: Creating object files. * old_archive_cmds: libtool script contents. * old_postinstall_cmds: libtool script contents. - * old_striplib: libtool script contents. * Opaque data types: Library tips. * Options, libtool command: Invoking libtool. * Options, libtoolize command: Invoking libtoolize. --- 356,368 ---- * Modules, dynamic: Dlopened modules. * Motivation for writing libtool: Motivation. * Names of dynamic modules: Finding the dlname. + * NM: libtool script contents. + * no_builtin_flag: libtool script contents. + * no_undefined_flag: libtool script contents. * Object files, compiling: Creating object files. * Object files, library: Creating object files. * old_archive_cmds: libtool script contents. * old_postinstall_cmds: libtool script contents. * Opaque data types: Library tips. * Options, libtool command: Invoking libtool. * Options, libtoolize command: Invoking libtoolize. *************** *** 193,199 **** --- 390,398 ---- * Reporting bugs: Reporting bugs. * Reusability of library systems: Postmortem. * runpath_var: libtool script contents. + * Saving time: Static-only libraries. * Security problems with buggy linkers: Linking executables. + * Shared libraries, not using: Static-only libraries. * Shared library versions: Versioning. * shl_load(3): Dlopened modules. * shlibpath_var: libtool script contents. *************** *** 203,215 **** * Standalone binaries: Static libraries. * Static linking: Static libraries. * strip: Installing libraries. - * striplib: libtool script contents. * Stripping libraries: Installing libraries. * su: Installing libraries. * suffix.test: Test descriptions. * Test suite: Libtool test suite. * test-e.test: Test descriptions. * Tests, failed: When tests fail. * Tricky design issues: Issues. * Trouble with C++: C++ libraries. * Trouble with dlopen: Dlopen issues. --- 402,414 ---- * Standalone binaries: Static libraries. * Static linking: Static libraries. * strip: Installing libraries. * Stripping libraries: Installing libraries. * su: Installing libraries. * suffix.test: Test descriptions. * Test suite: Libtool test suite. * test-e.test: Test descriptions. * Tests, failed: When tests fail. + * Time, saving: Static-only libraries. * Tricky design issues: Issues. * Trouble with C++: C++ libraries. * Trouble with dlopen: Dlopen issues. *************** *** 217,222 **** --- 416,422 ---- * Undefined symbols, allowing: Link mode. * Uninstall mode: Uninstall mode. * Unresolved symbols, allowing: Link mode. + * Using shared libraries, not: Static-only libraries. * version_type: libtool script contents. * Versioning, formal: Libtool versioning. * wl: libtool script contents. diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/doc/libtool.texi libtool-1.1/doc/libtool.texi *** libtool-1.0/doc/libtool.texi Thu Jul 3 06:22:51 1997 --- libtool-1.1/doc/libtool.texi Thu Mar 5 16:16:45 1998 *************** *** 7,13 **** @c %**end of header @include version.texi ! @set BUGADDR the libtool mailing list @code{} @dircategory GNU programming tools @direntry --- 7,14 ---- @c %**end of header @include version.texi ! @set BUGADDR the libtool mailing list @email{} ! @set objdir .libs @dircategory GNU programming tools @direntry *************** *** 22,28 **** @ifinfo This file documents GNU Libtool @value{VERSION} ! Copyright (C) 1996, 1997 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 --- 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 *************** *** 54,60 **** @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1996, 1997 Free Software Foundation, Inc. @sp 2 This is the first edition of the GNU Libtool documentation,@* and is consistent with GNU Libtool @value{VERSION}.@* --- 55,61 ---- @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}.@* *************** *** 92,97 **** --- 93,101 ---- to provide generic shared library support. This edition documents version @value{VERSION}. + @xref{Reporting bugs}, for information on how to report problems with + libtool. + @menu * Introduction:: What the heck is libtool? * Libtool paradigm:: How libtool's view of libraries is different. *************** *** 122,127 **** --- 126,132 ---- * Creating object files:: Compiling object files for libraries. * Linking libraries:: Creating libraries from object files. * Linking executables:: Linking object files against libtool libraries. + * Debugging executables:: Running GDB on libtool-generated programs. * Installing libraries:: Making libraries available to users. * Installing executables:: Making programs available to users. * Static libraries:: When shared libraries are not wanted. *************** *** 130,136 **** * Compile mode:: Creating library object files. * Link mode:: Generating executables and libraries. ! * Dlname mode:: Obtaining a file name to @code{dlopen(3)}. * Install mode:: Making libraries and executables public. * Finish mode:: Completing a library installation. * Uninstall mode:: Removing executables and libraries. --- 135,141 ---- * Compile mode:: Creating library object files. * Link mode:: Generating executables and libraries. ! * Execute mode:: Debugging libtool-generated programs. * Install mode:: Making libraries and executables public. * Finish mode:: Completing a library installation. * Uninstall mode:: Removing executables and libraries. *************** *** 141,146 **** --- 146,152 ---- * Using Automake:: Automatically supporting libtool. * Configuring:: Configuring libtool for a host system. * Distributing:: What files to distribute with your package. + * Static-only libraries:: Sometimes shared libraries are just a pain. Configuring libtool *************** *** 158,163 **** --- 164,170 ---- * Interfaces:: What are library interfaces? * Libtool versioning:: Libtool's versioning system. * Updating version info:: Changing version information before releases. + * Release numbers:: Breaking binary compatibility for aesthetics. Tips for interface design *************** *** 165,171 **** Dlopened modules ! * Exporting dynamic symbols:: Preparing files to be dlopened. * Finding the dlname:: Choosing the right file to @code{dlopen(3)}. * Dlopen issues:: Unresolved problems that need your attention. --- 172,179 ---- Dlopened modules ! * 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. *************** *** 183,189 **** * Test descriptions:: The contents of the test suite. * When tests fail:: What to do when a test fails. ! Maintainance notes for libtool * New ports:: How to port libtool to new systems. * Tested platforms:: When libtool was last tested. --- 191,197 ---- * Test descriptions:: The contents of the test suite. * When tests fail:: What to do when a test fails. ! Maintenance notes for libtool * New ports:: How to port libtool to new systems. * Tested platforms:: When libtool was last tested. *************** *** 192,201 **** Platform quirks * Compilers:: Creating object files from source files. * Reloadable objects:: Binding object files together. * Archivers:: Programs that create static archives. - * Strip:: Removing unnecessary linkage information. @end detailmenu @end menu --- 200,209 ---- Platform quirks + * References:: Finding more information. * Compilers:: Creating object files from source files. * Reloadable objects:: Binding object files together. * Archivers:: Programs that create static archives. @end detailmenu @end menu *************** *** 329,337 **** @section Other implementations I have investigated several different implementations of systems that ! build shared ! libraries as part of a freeware 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 --- 337,345 ---- @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 *************** *** 440,445 **** --- 448,454 ---- * Creating object files:: Compiling object files for libraries. * Linking libraries:: Creating libraries from object files. * Linking executables:: Linking object files against libtool libraries. + * Debugging executables:: Running GDB on libtool-generated programs. * Installing libraries:: Making libraries available to users. * Installing executables:: Making programs available to users. * Static libraries:: When shared libraries are not wanted. *************** *** 489,495 **** To create library object files for @file{foo.c} and @file{hello.c}, simply invoke libtool with the standard compilation command as ! arguments: @example a23$ @kbd{libtool gcc -g -O -c foo.c} --- 498,504 ---- To create library object files for @file{foo.c} and @file{hello.c}, simply invoke libtool with the standard compilation command as ! arguments (@pxref{Compile mode}): @example a23$ @kbd{libtool gcc -g -O -c foo.c} *************** *** 502,510 **** @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 --- 511,519 ---- @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 *************** *** 554,560 **** 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 the same ones you would use to produce an executable named ! @file{libhello.la} with your compiler: @example burger$ @kbd{libtool gcc -g -O -o libhello.la foo.o hello.o} --- 563,569 ---- 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 the same ones you would use to produce an executable named ! @file{libhello.la} with your compiler (@pxref{Link mode}): @example burger$ @kbd{libtool gcc -g -O -o libhello.la foo.o hello.o} *************** *** 587,595 **** @example a23$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \ -rpath /usr/local/lib -lm} ! mkdir .libs ! ar cru .libs/libhello.a foo.o hello.o ! ranlib .libs/libhello.a creating libhello.la a23$ @end example --- 596,604 ---- @example a23$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \ -rpath /usr/local/lib -lm} ! mkdir @value{objdir} ! ar cru @value{objdir}/libhello.a foo.o hello.o ! ranlib @value{objdir}/libhello.a creating libhello.la a23$ @end example *************** *** 599,608 **** @example burger$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \ -rpath /usr/local/lib -lm} ! mkdir .libs ! ld -Bshareable -o .libs/libhello.so.0.0 foo.lo hello.lo -lm ! ar cru .libs/libhello.a foo.o hello.o ! ranlib .libs/libhello.a creating libhello.la burger$ @end example --- 608,617 ---- @example burger$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \ -rpath /usr/local/lib -lm} ! mkdir @value{objdir} ! ld -Bshareable -o @value{objdir}/libhello.so.0.0 foo.lo hello.lo -lm ! ar cru @value{objdir}/libhello.a foo.o hello.o ! ranlib @value{objdir}/libhello.a creating libhello.la burger$ @end example *************** *** 611,621 **** @code{ld} command to create a shared library, as well as the static library. @cindex @file{.libs} subdirectory ! Note how libtool creates extra files in the @file{.libs} subdirectory, ! rather than the current directory. This feature is to make it easier to ! clean up the build directory, and to help ensure that other programs ! fail horribly if you accidentally forget to use libtool when you should. @node Linking executables @section Linking executables --- 620,633 ---- @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 ! other programs fail horribly if you accidentally forget to use libtool ! when you should. @node Linking executables @section Linking executables *************** *** 654,677 **** Libtool's way is almost the same@footnote{However, you should never use @samp{-L} or @samp{-l} flags to link against an uninstalled libtool library. Just specify the relative path to the @samp{.la} file, such as ! @file{../intl/libintl.la}. This is a design decision to eliminate ! any ambiguity when linking against uninstalled shared libraries.}: @example a23$ @kbd{libtool gcc -g -O -o hell main.o libhello.la -lm} ! gcc -g -O -o hell main.o ./.libs/libhello.a -lm a23$ @end example That looks too simple to be true. All libtool did was transform ! @file{libhello.la} to @file{./.libs/libhello.a}, but remember that ! @samp{a23} has no shared libraries. On @samp{burger} the situation is different: @example burger$ @kbd{libtool gcc -g -O -o hell main.o libhello.la -lm} ! gcc -g -O -o .libs/hell main.o -L./.libs -R/usr/local/lib -lhello -lm creating hell burger$ @end example --- 666,690 ---- Libtool's way is almost the same@footnote{However, you should never use @samp{-L} or @samp{-l} flags to link against an uninstalled libtool library. Just specify the relative path to the @samp{.la} file, such as ! @file{../intl/libintl.la}. This is a design decision to eliminate any ! ambiguity when linking against uninstalled shared libraries.} ! (@pxref{Link mode}): @example a23$ @kbd{libtool gcc -g -O -o hell main.o libhello.la -lm} ! gcc -g -O -o hell main.o ./@value{objdir}/libhello.a -lm a23$ @end example That looks too simple to be true. All libtool did was transform ! @file{libhello.la} to @file{./@value{objdir}/libhello.a}, but remember ! that @samp{a23} has no shared libraries. On @samp{burger} the situation is different: @example burger$ @kbd{libtool gcc -g -O -o hell main.o libhello.la -lm} ! gcc -g -O -o @value{objdir}/hell main.o -L./@value{objdir} -R/usr/local/lib -lhello -lm creating hell burger$ @end example *************** *** 679,691 **** @cindex Wrapper scripts for programs @cindex Program wrapper scripts Notice that the executable, @code{hell}, was actually created in the ! @file{.libs} 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{./.libs}) until it is properly installed. Let's compare the two different programs: --- 692,704 ---- @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: *************** *** 713,722 **** burger$ @kbd{ls -l hell.old libhello.a} -rwxr-xr-x 1 gord gord 15481 Nov 14 12:11 hell.old -rw-r--r-- 1 gord gord 4274 Nov 13 18:02 libhello.a ! burger$ @kbd{ls -l .libs/hell .libs/libhello.*} ! -rwxr-xr-x 1 gord gord 11647 Nov 14 12:10 .libs/hell ! -rw-r--r-- 1 gord gord 4274 Nov 13 18:44 .libs/libhello.a ! -rwxr-xr-x 1 gord gord 12205 Nov 13 18:44 .libs/libhello.so.0.0 burger$ @end example --- 726,735 ---- burger$ @kbd{ls -l hell.old libhello.a} -rwxr-xr-x 1 gord gord 15481 Nov 14 12:11 hell.old -rw-r--r-- 1 gord gord 4274 Nov 13 18:02 libhello.a ! burger$ @kbd{ls -l @value{objdir}/hell @value{objdir}/libhello.*} ! -rwxr-xr-x 1 gord gord 11647 Nov 14 12:10 @value{objdir}/hell ! -rw-r--r-- 1 gord gord 4274 Nov 13 18:44 @value{objdir}/libhello.a ! -rwxr-xr-x 1 gord gord 12205 Nov 13 18:44 @value{objdir}/libhello.so.0.0 burger$ @end example *************** *** 729,734 **** --- 742,815 ---- kilobytes. So, having a shared @file{libhello} won't be an advantage until we link it against at least a few more programs. + @node Debugging executables + @section Debugging executables + + 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 + + (gdb) @kbd{quit} + 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} + Starting program: /home/src/libtool/demo/.libs/hell + /home/src/libtool/demo/.libs/hell: can't load library 'libhello.so.2' + + Program exited with code 020. + (gdb) @kbd{quit} + burger$ + @end example + + Argh. Now GDB complains because it cannot find the shared library that + @file{hell} is linked against. So, we must use libtool in order to + properly set the library path and run the debugger. Fortunately, we can + forget all about the @file{@value{objdir}} directory, and just run it on + the executable wrapper (@pxref{Execute mode}): + + @example + 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} + Starting program: /home/src/libtool/demo/.libs/hell + + Breakpoint 1, main (argc=1, argv=0xbffffc40) at main.c:29 + 29 printf ("Welcome to GNU Hell!\n"); + (gdb) @kbd{quit} + The program is running. Quit anyway (and kill it)? (y or n) @kbd{y} + burger$ + @end example + @node Installing libraries @section Installing libraries *************** *** 754,765 **** @pindex install Libtool installation is quite simple, as well. Just use the ! @code{install} or @code{cp} command that you normally would: @example a23# @kbd{libtool cp libhello.la /usr/local/lib/libhello.la} cp libhello.la /usr/local/lib/libhello.la ! cp .libs/libhello.a /usr/local/lib/libhello.a ranlib /usr/local/lib/libhello.a a23# @end example --- 835,847 ---- @pindex install Libtool installation is quite simple, as well. Just use the ! @code{install} or @code{cp} command that you normally would ! (@pxref{Install mode}): @example a23# @kbd{libtool cp libhello.la /usr/local/lib/libhello.la} cp libhello.la /usr/local/lib/libhello.la ! cp @value{objdir}/libhello.a /usr/local/lib/libhello.a ranlib /usr/local/lib/libhello.a a23# @end example *************** *** 772,780 **** @example burger# @kbd{libtool install -c libhello.la /usr/local/lib/libhello.la} ! install -c .libs/libhello.so.0.0 /usr/local/lib/libhello.so.0.0 install -c libhello.la /usr/local/lib/libhello.la ! install -c .libs/libhello.a /usr/local/lib/libhello.a ranlib /usr/local/lib/libhello.a burger# @end example --- 854,862 ---- @example burger# @kbd{libtool install -c libhello.la /usr/local/lib/libhello.la} ! install -c @value{objdir}/libhello.so.0.0 /usr/local/lib/libhello.so.0.0 install -c libhello.la /usr/local/lib/libhello.la ! install -c @value{objdir}/libhello.a /usr/local/lib/libhello.a ranlib /usr/local/lib/libhello.a burger# @end example *************** *** 795,801 **** @cindex Installation, finishing @cindex Libraries, finishing installation Then, running @samp{libtool -n --finish @var{libdir}} can give you ! further hints on what to do: @example burger# @kbd{libtool -n --finish /usr/local/lib} --- 877,883 ---- @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} *************** *** 831,837 **** @example burger# libtool install -c hell /usr/local/bin/hell ! install -c .libs/hell /usr/local/bin/hell burger# @end example --- 913,919 ---- @example burger# libtool install -c hell /usr/local/bin/hell ! install -c @value{objdir}/hell /usr/local/bin/hell burger# @end example *************** *** 866,872 **** @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{-static} flag. @node Invoking libtool @chapter Invoking @code{libtool} --- 948,954 ---- @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. @node Invoking libtool @chapter Invoking @code{libtool} *************** *** 913,920 **** @item compile Compile a source file into a libtool object. ! @item dlname ! Find the correct name that programs should @code{dlopen(3)}. @item finish Complete the installation of libtool libraries on the system. --- 995,1003 ---- @item compile Compile a source file into a libtool object. ! @item execute ! Automatically set the library path so that another program can use ! uninstalled libtool-generated programs or libraries. @item finish Complete the installation of libtool libraries on the system. *************** *** 936,942 **** @menu * Compile mode:: Creating library object files. * Link mode:: Generating executables and libraries. ! * Dlname mode:: Obtaining a file name to @code{dlopen(3)}. * Install mode:: Making libraries and executables public. * Finish mode:: Completing a library installation. * Uninstall mode:: Removing executables and libraries. --- 1019,1025 ---- @menu * Compile mode:: Creating library object files. * Link mode:: Generating executables and libraries. ! * Execute mode:: Debugging libtool-generated programs. * Install mode:: Making libraries and executables public. * Finish mode:: Completing a library installation. * Uninstall mode:: Removing executables and libraries. *************** *** 959,964 **** --- 1042,1052 ---- 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 *************** *** 975,984 **** @table @samp @cindex Undefined symbols, allowing @cindex Unresolved symbols, allowing ! @item -allow-undefined ! If @var{output-file} is a libtool library, allow it to contain ! references to symbols that aren't defined in that library or its ! dependencies (@pxref{Inter-library dependencies}). @item -export-dynamic Allow symbols from @var{output-file} to be resolved with @code{dlsym(3)} --- 1063,1081 ---- @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)} *************** *** 993,1015 **** This option is required even when @var{output-file} is not an executable. @item -o @var{output-file} Create @var{output-file} from the specified objects and libraries. @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 ! shared libraries. If @var{output-file} is a library, then only create a ! static library. @item -version-info @var{current}[:@var{revision}[:@var{age}]] ! If @var{output-file} is a libtool library, use library version ! information @var{current}, @var{revision}, and @var{age} to build it. ! If not specified, each of these variables defaults to 0 ! (@pxref{Versioning}). @end table If the @var{output-file} ends in @samp{.la}, then a libtool library is --- 1090,1124 ---- This option is required even when @var{output-file} is not an executable. + @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 + libraries (@pxref{Inter-library dependencies}). + @item -o @var{output-file} Create @var{output-file} from the specified objects and libraries. + @item -release @var{release} + Specify that the library was generated by release @var{release} of your + 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 ! library, then only create a static library. @item -version-info @var{current}[:@var{revision}[:@var{age}]] ! If @var{output-file} is a libtool library, use interface version ! information @var{current}, @var{revision}, and @var{age} to build it ! (@pxref{Versioning}). Do @strong{not} use this flag to specify package ! release information, rather see the @samp{-release} flag. @end table If the @var{output-file} ends in @samp{.la}, then a libtool library is *************** *** 1029,1049 **** Otherwise, an executable program is created. ! @node Dlname mode ! @section Dlname mode ! @cindex Dlname mode ! @cindex Mode, dlname ! ! The @samp{dlname} mode simply prints the name of a libtool library that ! can be passed to the @code{dlopen(3)} function call (@pxref{Dlopened ! modules}). ! ! Each of the @var{mode-args} specifies a libtool library linked ! using the @samp{-export-dynamic} option (@pxref{Link mode}). The names ! of the modules to load are printed to standard output, one per line. ! If one of the @var{mode-args} was not linked with ! @samp{-export-dynamic}, then an error is displayed. @node Install mode @section Install mode --- 1138,1167 ---- Otherwise, an executable program is created. ! @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 ! rest as arguments to that program. ! ! The following components of @var{mode-args} are treated specially: ! ! @table @samp ! @item -dlopen @var{file} ! Add the directory containing @var{file} to the library path. ! @end table ! ! This mode sets the library path environment variable according to any ! @samp{-dlopen} flags. ! If any of the @var{args} are libtool executable wrappers, then they are ! translated into the name of their corresponding uninstalled binary, and ! any of their required library directories are added to the library path. @node Install mode @section Install mode *************** *** 1096,1101 **** --- 1214,1220 ---- * Using Automake:: Automatically supporting libtool. * Configuring:: Configuring libtool for a host system. * Distributing:: What files to distribute with your package. + * Static-only libraries:: Sometimes shared libraries are just a pain. @end menu @node Makefile rules *************** *** 1140,1160 **** @samp{program_LDADD} variable: @example ! bin_PROGRAMS = hell hell.static # 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 @end example 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 create a statically-linked executable). Building a libtool library is almost as trivial@dots{} note the use of @samp{libhello_la_LDFLAGS} to pass the @samp{-version-info} --- 1259,1279 ---- @samp{program_LDADD} variable: @example ! bin_PROGRAMS = hell hell.debug # 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 @end example 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). Building a libtool library is almost as trivial@dots{} note the use of @samp{libhello_la_LDFLAGS} to pass the @samp{-version-info} *************** *** 1335,1345 **** @defmac AM_PROG_LIBTOOL Add support for the @samp{--enable-shared} and @samp{--disable-shared} @code{configure} flags. Invoke @code{ltconfig} with the correct ! arguments to configure the package.@footnote{@code{AM_PROG_LIBTOOL} ! requires that you define the @file{Makefile} variable @code{top_builddir} in ! your @file{Makefile.in}. Automake does this automatically, but Autoconf ! users should set it to the relative path to the top of your build ! directory (@file{../..}, for example).} @end defmac @pindex aclocal --- 1454,1508 ---- @defmac AM_PROG_LIBTOOL Add support for the @samp{--enable-shared} and @samp{--disable-shared} @code{configure} flags. Invoke @code{ltconfig} with the correct ! arguments to configure the package (@pxref{Invoking ! ltconfig}).@footnote{@code{AM_PROG_LIBTOOL} requires that you define the ! @file{Makefile} variable @code{top_builddir} in your @file{Makefile.in}. ! Automake does this automatically, but Autoconf users should set it to ! the relative path to the top of your build directory (@file{../..}, for ! example).} ! ! By default, this macro turns on shared libraries if they are available, ! and also enables static libraries if they don't conflict with the shared ! libraries. You can modify these defaults by 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}. @end defmac @pindex aclocal *************** *** 1408,1414 **** Work silently, and assume that Automake libtool support is used. @samp{libtoolize --automake} is used by Automake to add libtool files to ! your package, when @samp{AM_PROG_LIBTOOL} appears in your @file{configure.in}. @item --copy --- 1571,1577 ---- Work silently, and assume that Automake libtool support is used. @samp{libtoolize --automake} is used by Automake to add libtool files to ! your package, when @code{AM_PROG_LIBTOOL} appears in your @file{configure.in}. @item --copy *************** *** 1479,1484 **** --- 1642,1691 ---- AC_OUTPUT(@dots{}) @end example + @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 + other developers know that @samp{--disable-shared} can save them time. + The following example note is taken from the GIMP@footnote{GNU Image + Manipulation Program, for those who haven't taken the plunge. See + @url{http://www.gimp.org/}.} distribution @file{README}: + + @example + The GIMP uses GNU Libtool in order to build shared libraries on a + variety of systems. While this is very nice for making usable + binaries, it can be a pain when trying to debug a program. For that + reason, compilation of shared libraries can be turned off by + specifying the @samp{--disable-shared} option to @file{configure}. + @end example + @node Versioning @chapter Library interface versions @cindex Dynamic dependencies *************** *** 1509,1514 **** --- 1716,1722 ---- * Interfaces:: What are library interfaces? * Libtool versioning:: Libtool's versioning system. * Updating version info:: Changing version information before releases. + * Release numbers:: Breaking binary compatibility for aesthetics. @end menu @node Interfaces *************** *** 1552,1561 **** simple: it encodes the least and the greatest interface numbers in the resulting binary (@var{first-interface}, @var{last-interface}). ! Then, the dynamic linker is guaranteed that if a library supports ! @emph{every} interface number between @var{first-interface} and ! @var{last-interface}, then the program can be relinked against that ! library. Note that this can cause problems because libtool's compatibility requirements are actually stricter than is necessary. --- 1760,1768 ---- simple: it encodes the least and the greatest interface numbers in the resulting binary (@var{first-interface}, @var{last-interface}). ! The dynamic linker is guaranteed that if a library supports @emph{every} ! interface number between @var{first-interface} and @var{last-interface}, ! then the program can be relinked against that library. Note that this can cause problems because libtool's compatibility requirements are actually stricter than is necessary. *************** *** 1579,1592 **** @item current The most recent interface number that this library implements. @item age ! The difference between the oldest and newest interfaces that this library implements. In other words, the library implements all the interface numbers in the range from number @code{@var{current} - @var{age}} to @code{@var{current}}. - - @item revision - The implementation number of the @var{current} interface. @end table If two libraries have identical @var{current} and @var{age} numbers, --- 1786,1799 ---- @item current The most recent interface number that this library implements. + @item revision + The implementation number of the @var{current} interface. + @item age ! The difference between the newest and oldest interfaces that this library implements. In other words, the library implements all the interface numbers in the range from number @code{@var{current} - @var{age}} to @code{@var{current}}. @end table If two libraries have identical @var{current} and @var{age} numbers, *************** *** 1605,1611 **** @samp{-version-info 3:12:1} sets @var{current} to 3, @var{revision} to 12, and @var{age} to 1. ! If either @var{age} or @var{revision} are omitted, they default to 0. Also note that @var{age} must be less than or equal to the @var{current} interface number. --- 1812,1818 ---- @samp{-version-info 3:12:1} sets @var{current} to 3, @var{revision} to 12, and @var{age} to 1. ! If either @var{revision} or @var{age} are omitted, they default to 0. Also note that @var{age} must be less than or equal to the @var{current} interface number. *************** *** 1639,1647 **** set @var{age} to 0. @end enumerate ! @strong{@emph{Never}} try to set library version 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. @node Library tips @chapter Tips for interface design --- 1846,1904 ---- set @var{age} to 0. @end enumerate ! @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 + + 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*} + /usr/lib/libbfd.a /usr/lib/libbfd.so.2.7.0.2 + /usr/lib/libbfd.so + 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 + library interface versions, because the library interface rarely changes + at the same time that the release number does, and the library suffix is + never the same across all platforms. + + So, in order to accomodate both views, you can use the @samp{-release} + 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 *************** *** 1853,1864 **** compatibility with static library systems and simple dynamic library systems. ! If your library depends on symbols that are defined in executables or ! static libraries, then you cannot express the dependency with a ! @samp{-l@var{name}} flag,@footnote{For static libraries, you ! @emph{could} use a @samp{-l} flag, but it would cause conflicts ! on systems which have non-PIC objects.} so you need to use the ! @samp{-allow-undefined} link flag (@pxref{Link mode}). @node Dlopened modules @chapter Dlopened modules --- 2110,2121 ---- 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 *************** *** 1897,1914 **** language interpreters to provide an efficient way to extend the language. ! On most operating systems, dlopened modules must be compiled as PIC. ! This restriction simplifies the implementation of the @code{dlopen(3)} ! family of functions by avoiding symbol relocation. ``True'' dlopen ! implementations, such as the unportable GNU DLD 3 implementation ! (@pxref{Top,, Introduction, dld, The DLD Manual}), don't have this ! restriction, as they can perform relocation at runtime. ! ! As of version @value{VERSION}, libtool provides only minimal support for ! dlopened modules, and this support is guaranteed to change and be ! redesigned in the near future. Because there is not a very high ! proportion of applications that use dlopening, adding this support to ! libtool was not deemed a priority for the 1.0 release. This chapter discusses the preliminary support that libtool offers, and how you as a dlopen application developer might use libtool to generate --- 2154,2163 ---- 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 *************** *** 1917,1937 **** problems associated with dlopened modules. @menu ! * Exporting dynamic symbols:: Preparing files to be dlopened. * Finding the dlname:: Choosing the right file to @code{dlopen(3)}. * Dlopen issues:: Unresolved problems that need your attention. @end menu ! @node Exporting dynamic symbols ! @section Exporting dynamic symbols ! In order for a symbol to be dynamically resolved (typically using the ! @code{dlsym(3)} function), it must be specially declared in the object ! module where it is defined. 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 a shared library that will 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 --- 2166,2188 ---- 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 ! @node Building modules ! @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 *************** *** 1954,1959 **** --- 2205,2280 ---- burger$ @end example + @node Dlpreopening + @section Dlpreopening + + 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 + program, in order of increasing ``laziness'': + + @enumerate 1 + @item + Linking against object files that become part of the program executable, + whether or not they are referenced. If an object file cannot be found, + then the linker refuses to create the executable. + + @item + Declaring a static library to the linker, so that it is searched at link + time in order to satisfy any undefined references in the above object + files. If the static library cannot be found, then the linker refuses + to link the executable. + + @item + Declaring a shared library to the runtime linker, so that it is searched + at runtime in order to satisfy any undefined references in the above + files. If the shared library cannot be found, then the dynamic linker + aborts the program before it runs. + + @item + Dlopening a module, so that the application can resolve its own, + dynamically-computed references. If there is an error opening the + module, or the module is not found, then the application can recover + 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 *************** *** 1963,1984 **** dlopened. Unfortunately, because of the variation in library names, your package needs to determine the correct file to dlopen. ! Dlname mode (@pxref{Dlname mode}) was designed for this purpose. It ! returns the name that should be given as the first argument to a ! @code{dlopen(3)} function call. ! ! For example, on NetBSD 1.2: ! ! @example ! burger$ @kbd{libtool --mode=dlname libhello.la} ! libhello.so.3.12 ! burger$ ! @end example ! ! The trick is in finding a way to hardcode this name into your program at ! compilation time, so that it opens the correct library. ! ! An alternative implementation that avoids hardcoding is to determine the name at runtime, by finding the installed @samp{.la} file, and searching it for the following lines: --- 2284,2290 ---- 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 name at runtime, by finding the installed @samp{.la} file, and searching it for the following lines: *************** *** 2024,2031 **** names (notably HP-UX, with its @samp{shl_load(3)} family). @item ! It is the burden of the libtool user to find a way to get the results of ! dlname mode (@pxref{Dlname mode}) into the call to @code{dlopen(3)}. @end itemize Each of these limitations will be addressed in GNU DLD --- 2330,2337 ---- 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 *************** *** 2234,2240 **** so that I can see what values @code{ltconfig} guessed for your system. @node Maintaining ! @chapter Maintainance notes for libtool This chapter contains information that the libtool maintainer finds important. It will be of no use to you unless you are considering --- 2540,2546 ---- so that I can see what values @code{ltconfig} guessed for your system. @node Maintaining ! @chapter Maintenance notes for libtool This chapter contains information that the libtool maintainer finds important. It will be of no use to you unless you are considering *************** *** 2283,2289 **** platforms where it claims to support shared libraries: @example ! @include platforms.texi @end example @node Platform quirks --- 2589,2595 ---- platforms where it claims to support shared libraries: @example ! @include PLATFORMS @end example @node Platform quirks *************** *** 2300,2311 **** improve libtool, or write your own. @menu * Compilers:: Creating object files from source files. * Reloadable objects:: Binding object files together. * Archivers:: Programs that create static archives. - * Strip:: Removing unnecessary linkage information. @end menu @node Compilers @subsection Compilers --- 2606,2633 ---- improve libtool, or write your own. @menu + * References:: Finding more information. * Compilers:: Creating object files from source files. * Reloadable objects:: Binding object files together. * Archivers:: Programs that create static archives. @end menu + @node References + @subsection References + + The following is a list of valuable documentation references: + + @itemize @bullet + @item + SGI's IRIX Manual Pages, + @url{http://techpubs.sgi.com/cgi-bin/infosrch.cgi?cmd=browse&db=man}. + + @item + Sun's free service area + (@url{http://www.sun.com/service/online/free.html}) and documentation + server (@url{http://docs.sun.com/}). + @end itemize + @node Compilers @subsection Compilers *************** *** 2382,2413 **** must be used to ``bless'' the created library before linking against it, with the @kbd{ranlib lib@var{name}.a} command. - @node Strip - @subsection The @code{strip} program - - Stripping a library is essentially the same problem as stripping an - object file. Only local and debugging symbols must be removed, or else - linking against a stripped library will fail. - - With GNU @code{strip}, the @samp{--discard-all} (or equivalent - @samp{-x}) flag will do the appropriate stripping, for both shared and - static libraries. - - Here is a list of some other operating systems, and what their bundled - @code{strip} programs will do: - - @c FIXME complete this section - - @table @code - @item netbsd* - The @samp{-x} flag works for shared libraries, but fails with - ``Inappropriate file type or format'' when used on static libraries. - - @item hpux10* - HP-UX @code{strip} requires the @samp{-r} and @samp{-x} flags in order - to strip libraries. - @end table - @node libtool script contents @section @code{libtool} script contents @cindex Implementation of libtool --- 2704,2709 ---- *************** *** 2425,2430 **** --- 2721,2730 ---- The name of the system library archiver. @end defvar + @defvar CC + The name of the C compiler used to configure libtool. + @end defvar + @defvar LD The name of the linker that libtool should use internally for reloadable linking and possibly shared libraries. *************** *** 2436,2441 **** --- 2736,2752 ---- @code{libtool}, and how that information is used in @code{ltmain.sh}. @end defvar + @defvar NM + The name of a BSD-compatible @code{nm} program, which produces listings + of global symbols in one the following formats: + + @example + @var{address} C @var{global-variable-name} + @var{address} D @var{global-variable-name} + @var{address} T @var{global-function-name} + @end example + @end defvar + @defvar RANLIB Set to the name of the ranlib program, if any. @end defvar *************** *** 2463,2469 **** @samp{yes} or @samp{no}. @end defvar ! @defvar export_dynamic_flag Compiler link flag that allows a dlopened shared library to reference symbols that are defined in the program. @end defvar --- 2774,2785 ---- @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 *************** *** 2473,2478 **** --- 2789,2812 ---- specific directory. @end defvar + @defvar finish_eval + 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, *************** *** 2502,2513 **** executable. @end defvar - @defvar hardcode_runpath_var - Set to @samp{yes} or @samp{no}, depending on whether the linker - hardcodes directories by writing the contents of @samp{$runpath_var} - 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} --- 2836,2841 ---- *************** *** 2522,2527 **** --- 2850,2861 ---- the system that libtool was configured for. @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 + as OS/2 or MS-DOS), the library is just called @samp{@var{name}.a}. + @end defvar + @defvar library_names_spec A list of shared library names. The first is the name of the file, the rest are symbolic links to the file. The name in the list is *************** *** 2533,2538 **** --- 2867,2883 ---- linking. @end defvar + @defvar no_builtin_flag + Compiler flag to disable builtin functions that conflict with declaring + external global symbols as @code{char}. + @end defvar + + @defvar no_undefined_flag + The flag that is used by @samp{archive_cmds} in order to declare that + there will be no unresolved symbols in the resulting shared library. + Empty, if no such flag is required. + @end defvar + @defvar pic_flag Any additional compiler flags for building library object files. @end defvar *************** *** 2562,2575 **** the file. @end defvar - @defvar striplib - @defvarx old_striplib - Programs to strip shared and static libraries, respectively.@footnote{In - the current implementation, libtool does not use any programs to strip - libraries. Support will be added after it is clear how to write a - portable test for library stripping programs.} - @end defvar - @defvar version_type The library version numbering type. One of @samp{libtool}, @samp{linux}, @samp{osf}, @samp{sunos}, or @samp{none}. --- 2907,2912 ---- *************** *** 2580,2589 **** linker. Used as: @samp{$@{wl@}@var{some-flag}}. @end defvar ! Variables ending in @samp{_cmds} contain a semicolon-separated list of ! commands that are @code{eval}ed one after another. If any of the ! commands return a nonzero exit status, libtool generally exits with an ! error message. Variables ending in @samp{_spec} are @code{eval}ed before being used by libtool. --- 2917,2926 ---- linker. Used as: @samp{$@{wl@}@var{some-flag}}. @end defvar ! Variables ending in @samp{_cmds} or @samp{_eval} contain a ! semicolon-separated list of commands that are @code{eval}ed one after ! another. If any of the commands return a nonzero exit status, libtool ! generally exits with an error message. Variables ending in @samp{_spec} are @code{eval}ed before being used by libtool. diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/doc/platforms.texi libtool-1.1/doc/platforms.texi *** libtool-1.0/doc/platforms.texi Tue Jul 8 18:34:31 1997 --- libtool-1.1/doc/platforms.texi Thu Jan 1 00:00:00 1970 *************** *** 1,38 **** - -------------------------------------------------------- - 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 0.9 ok - alpha-dec-osf4.0 gcc 0.9 ok - alpha-unknown-linux gcc 0.9h ok - hppa1.1-hp-hpux9.05 cc 0.8 ok - hppa1.1-hp-hpux9.05 gcc 0.8 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-gnu1.3.20 gcc 1.0 ok - i586-pc-linux-gnu2.0.16 gcc 1.0 ok - mips-sgi-irix5.3 cc 0.8 ok - mips-sgi-irix5.3 gcc 0.8 ok - mips-sgi-irix6.2 cc -32 0.9 ok - mips-sgi-irix6.2 cc -n32 0.9 ok - mipsel-unknown-openbsd2.1 gcc 1.0 ok - powerpc-ibm-aix4.1.4.0 xlc 1.0 ok - powerpc-ibm-aix4.1.4.0 gcc 1.0 ok - rs6000-ibm-aix3.2.5 xlc 0.9h ok - rs6000-ibm-aix3.2.5 gcc 0.9h ok* - sparc-sun-linux2.1.23 gcc 0.9h ok - sparc-sun-sunos4.1.4 cc 1.0 ok - sparc-sun-sunos4.1.4 gcc 1.0 ok - sparc-sun-solaris2.4 cc 0.9 ok - sparc-sun-solaris2.4 gcc 0.9 ok - sparc-sun-solaris2.5 cc 0.9 ok - sparc-sun-solaris2.5 gcc 1.0 ok - -------------------------------------------------------- - - * Libtool will not build shared libraries because of a bug in - GCC 2.7.2.2's collect2 linker program. --- 0 ---- diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/doc/stamp-vti libtool-1.1/doc/stamp-vti *** libtool-1.0/doc/stamp-vti Tue Jul 8 18:47:52 1997 --- libtool-1.1/doc/stamp-vti Sat Mar 7 23:15:13 1998 *************** *** 1,3 **** ! @set UPDATED 3 July 1997 ! @set EDITION 1.0 ! @set VERSION 1.0 --- 1,3 ---- ! @set UPDATED 5 March 1998 ! @set EDITION 1.1 ! @set VERSION 1.1 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/doc/version.texi libtool-1.1/doc/version.texi *** libtool-1.0/doc/version.texi Tue Jul 8 18:47:53 1997 --- libtool-1.1/doc/version.texi Sat Mar 7 23:15:13 1998 *************** *** 1,3 **** ! @set UPDATED 3 July 1997 ! @set EDITION 1.0 ! @set VERSION 1.0 --- 1,3 ---- ! @set UPDATED 5 March 1998 ! @set EDITION 1.1 ! @set VERSION 1.1 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/libtool.m4 libtool-1.1/libtool.m4 *** libtool-1.0/libtool.m4 Tue Jul 1 19:39:27 1997 --- libtool-1.1/libtool.m4 Fri Mar 6 05:42:50 1998 *************** *** 1,5 **** ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ! ## Copyright (C) 1996, 1997 Free Software Foundation, Inc. ## Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify --- 1,5 ---- ## 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 *************** *** 21,114 **** ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. ! # serial 9 AM_PROG_LIBTOOL AC_DEFUN(AM_PROG_LIBTOOL, ! [AC_REQUIRE([AC_CANONICAL_HOST]) ! AC_REQUIRE([AC_PROG_CC]) ! AC_REQUIRE([AC_PROG_RANLIB]) ! AC_REQUIRE([AM_PROG_LD]) ! AC_REQUIRE([AC_PROG_LN_S]) ! # Always use our own libtool. ! LIBTOOL='$(top_builddir)/libtool' ! AC_SUBST(LIBTOOL) ! ! dnl Allow the --disable-shared flag to stop us from building shared libs. ! AC_ARG_ENABLE(shared, ! [ --enable-shared build shared libraries [default=yes]], ! test "$enableval" = no && libtool_shared=" --disable-shared", ! libtool_shared=) ! ! dnl Allow the --disable-static flag to stop us from building static libs. ! AC_ARG_ENABLE(static, ! [ --enable-static build static libraries [default=yes]], ! test "$enableval" = no && libtool_static=" --disable-static", ! libtool_static=) ! libtool_flags="$libtool_shared$libtool_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. ! [case "$host" in *-*-irix6*) ! for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do ! if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then ! LD="${LD-ld} $f" ! fi ! done ;; *-*-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" 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_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) ! if test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, ! [case "$LD" in ! /*) ! ac_cv_path_LD="$LD" # Let the user override the test with a path. ! ;; ! *) 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/ld"; then ! ac_cv_path_LD="$ac_dir/ld" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then ! test "$with_gnu_ld" = yes && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" ! ;; ! esac]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) --- 21,207 ---- ## 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. ! case "$host" in *-*-irix6*) ! # Find out which ABI we are using. ! echo '[#]line __oline__ "configure"' > conftest.$ac_ext ! if AC_TRY_EVAL(ac_compile); then ! case "`/usr/bin/file conftest.o`" in ! *32-bit*) ! LD="${LD-ld} -32" ! ;; ! *N32*) ! LD="${LD-ld} -n32" ! ;; ! *64-bit*) ! LD="${LD-ld} -64" ! ;; ! esac ! fi ! rm -rf conftest* ;; *-*-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 ;; + no) enable_shared=no ;; + *) + enable_shared=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_shared=yes + fi + done + 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 ;; + no) enable_static=no ;; + *) + enable_static=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_static=yes + fi + done + 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 ! ;; ! *) ! # If it is relative, then search for the first ld in PATH. ! with_gnu_ld=unknown ! ;; ! esac ! elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) 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. # Break only if it was the GNU/non-GNU ld that we prefer. ! 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 IFS="$ac_save_ifs" ! else ! ac_cv_path_LD="$LD" # Let the user override the test with a path. ! fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) *************** *** 121,131 **** ]) AC_DEFUN(AM_PROG_LD_GNU, ! [AC_CACHE_CHECK([whether we are using 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 /dev/null; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) --- 214,259 ---- ]) 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 ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no 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) ]) diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/libtool.prj libtool-1.1/libtool.prj *** libtool-1.0/libtool.prj Tue Jul 8 19:53:57 1997 --- libtool-1.1/libtool.prj Mon Mar 9 05:30:48 1998 *************** *** 1,12 **** ;; -*- Lisp -*- ! (Created-By-Prcs-Version 1 1 1) ! (Project-Description "GNU libtool library support script") ! (Project-Version libtool 1 1) ! (Parent-Version libtool 1 0) ! (Descends-From -*- -*- -*-) ! (Version-Log "") ! (New-Version-Log "") ! (Checkin-Time "Tue, 08 Jul 1997 13:53:55 -0600") (Checkin-Login gord) (Populate-Ignore ("~$" "Makefile$" "Makefile\\.in$" "aclocal\\.m4$" "configure$" "config\\.status$" "config\\.cache$" --- 1,11 ---- ;; -*- Lisp -*- ! (Created-By-Prcs-Version 1 2 1) ! (Project-Description "GNU Libtool library support script") ! (Project-Version libtool 1.1a 0) ! (Parent-Version libtool 1.0j 4) ! (Version-Log "Release 1.0j.") ! (New-Version-Log "A few optimizations and minor bug fixes for release 1.1.") ! (Checkin-Time "Thu, 05 Mar 1998 21:07:27 -0700") (Checkin-Login gord) (Populate-Ignore ("~$" "Makefile$" "Makefile\\.in$" "aclocal\\.m4$" "configure$" "config\\.status$" "config\\.cache$" *************** *** 14,79 **** "\\.cps$" "\\.pg$" "\\.ky$" "\\.tp$" "\\.vr$" "\\.fn$" "\\.cp$" "\\.toc$" "\\.aux$" "\\.o$" "\\.a$" "\\.lo$" "\\.la$" "\\.tar\\.gz$" ! "\\.deps/" "\\.libs/" "stamp-" "^doc/libtool\\.info" "^doc/version\\.texi$" ! "^demo/hc-" "^demo/hell$" "^demo/hell\\.static$" ! "libtool$" "^libtoolize$" "^ltconfig$" "^ltmain\\.sh$")) (Project-Keywords) (Files ;; Administrivia. (AUTHORS (libtool/21_AUTHORS 1.1 664)) ! (ChangeLog (libtool/20_ChangeLog 1.4.1.34 664)) ! (NEWS (libtool/19_NEWS 1.4.1.22 664)) ! (PACKAGES (libtool/42_PACKAGES 1.5 664)) ! (README (libtool/17_README 1.13 664)) ! (README-alpha (libtool/16_README-alp 1.5 664)) ! (TODO (libtool/14_TODO 1.3.1.18 664)) ! (THANKS (libtool/15_THANKS 1.8 664)) ;; Top directory. ! (Makefile.am (libtool/18_Makefile.a 1.22 664)) ! (configure.in (libtool/13_configure. 1.4.1.18 664)) ! (ltmain.sh.in (libtool/2_ltmain.sh. 1.4.1.24 664)) ! (ltconfig.in (libtool/3_ltconfig.i 1.4.1.26 775)) (libtoolize.in (libtool/4_libtoolize 1.6 664)) ;; aclocal additions. ! (libtool.m4 (libtool/12_libtool.m4 1.9 664)) ;; Documentation subdirectory. ! (doc/libtool.texi (libtool/0_libtool.te 1.3.1.20 664)) ! (doc/platforms.texi (libtool/41_platforms. 1.9 664)) ! (doc/Makefile.am (libtool/1_Makefile.a 1.5 664)) ;; Demonstration subdirectory. ! (demo/README (libtool/28_README 1.2 664)) ! (demo/Makefile.am (libtool/11_Makefile.a 1.12 664)) ! (demo/configure.in (libtool/10_configure. 1.4 664)) (demo/run.test (libtool/27_run.test 1.1 775)) (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.12 664)) ! (tests/Makefile.am (libtool/25_Makefile.a 1.10 664)) ! (tests/defs (libtool/24_defs 1.3 664)) ! (tests/tlibtool (libtool/29_tlibtool 1.2 775)) ;; The actual tests. - (tests/assign.test (libtool/44_assign.tes 1.1 775)) (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.5 775)) ! (tests/demo-exec.test (libtool/35_demo-exec. 1.3 775)) (tests/demo-conf.test (libtool/36_demo-conf. 1.6 775)) ! (tests/hardcode.test (libtool/39_hardcode.t 1.6 775)) ! (tests/if.test (libtool/45_if.test 1.1 775)) (tests/link.test (libtool/30_link.test 1.3 775)) (tests/link-2.test (libtool/31_link-2.tes 1.3 775)) ! (tests/suffix.test (libtool/38_suffix.tes 1.1 775)) ! (tests/test-e.test (libtool/22_test-e.tes 1.3 775)) ;; Installed automatically. (config.sub (/local/share/automake/config.sub) :symlink) --- 13,81 ---- "\\.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.73 664)) ! (NEWS (libtool/19_NEWS 1.4.1.53 664)) ! (PACKAGES (libtool/42_PACKAGES 1.8 664)) ! (README (libtool/17_README 1.21 664)) ! (README-alpha (libtool/16_README-alp 1.12 664)) ! (TODO (libtool/14_TODO 1.3.1.37 664)) ! (THANKS (libtool/15_THANKS 1.12 664)) ! (libtool.spec (libtool/46_libtool.sp 1.6 664)) ;; Top directory. ! (Makefile.am (libtool/18_Makefile.a 1.36 664)) ! (configure.in (libtool/13_configure. 1.4.1.29 664)) ! (ltmain.in (libtool/2_ltmain.sh. 1.4.1.58 664)) ! (ltconfig.in (libtool/3_ltconfig.i 1.4.1.59 775)) (libtoolize.in (libtool/4_libtoolize 1.6 664)) ;; aclocal additions. ! (libtool.m4 (libtool/12_libtool.m4 1.24 664)) ;; Documentation subdirectory. ! (doc/Makefile.am (libtool/1_Makefile.a 1.6 664)) ! (doc/PLATFORMS (libtool/41_platforms. 1.15 664)) ! (doc/libtool.texi (libtool/0_libtool.te 1.3.1.35 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.26 664)) ! (tests/Makefile.am (libtool/25_Makefile.a 1.15 664)) ! (tests/defs (libtool/24_defs 1.5 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) diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/libtool.spec libtool-1.1/libtool.spec *** libtool-1.0/libtool.spec Thu Jan 1 00:00:00 1970 --- libtool-1.1/libtool.spec Mon Mar 9 05:14:47 1998 *************** *** 0 **** --- 1,48 ---- + Summary: GNU Libtool - shared library support for source packages + # $Format: "Name: $Project$"$ + Name: libtool + # $Format: "Version: $ProjectMajorVersion$"$ + Version: 1.1 + 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 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/ltconfig libtool-1.1/ltconfig *** libtool-1.0/ltconfig Tue Jul 8 18:47:56 1997 --- libtool-1.1/ltconfig Mon Mar 9 03:49:29 1998 *************** *** 1,9 **** #! /bin/sh # ltconfig - Create a system-specific libtool. ! # When updating this script, search for LINENUM and fix line number refs. ! # Generated automatically from ltconfig.in by configure. ! # Copyright (C) 1996, 1997, Free Software Foundation, Inc. # Gordon Matzigkeit , 1996 # # This file is free software; you can redistribute it and/or modify it --- 1,7 ---- #! /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 *************** *** 27,40 **** # A lot of this script is taken from autoconf-2.10. # The name of this program. ! progname=`echo "$0" | sed 's%^.*/%%'` # Constants: PROGRAM=ltconfig PACKAGE=libtool ! VERSION=1.0 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' rm="rm -f" help="Try \`$progname --help' for more information." --- 25,74 ---- # 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 + + # 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='s/\([\\"\\`$\\\\]\)/\\\1/g' + + # Same as above, but do not quote variable references. + double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + # The name of this program. ! progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` # Constants: PROGRAM=ltconfig PACKAGE=libtool ! VERSION=1.1 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" help="Try \`$progname --help' for more information." *************** *** 61,70 **** old_CPPFLAGS="$CPPFLAGS" old_LD="$LD" old_LN_S="$LN_S" old_RANLIB="$RANLIB" - test -z "$AR" && AR=ar - # Parse the command line options. args= prev= --- 95,103 ---- old_CPPFLAGS="$CPPFLAGS" old_LD="$LD" old_LN_S="$LN_S" + old_NM="$NM" old_RANLIB="$RANLIB" # Parse the command line options. args= prev= *************** *** 93,99 **** --help display this help and exit --no-verify do not verify that HOST is a valid host type --quiet same as \`--silent' ! --silent don't print informational messages --srcdir=DIR find \`config.guess' in DIR --version output version information and exit --with-gcc assume that the GNU C compiler will be used --- 126,132 ---- --help display this help and exit --no-verify do not verify that HOST is a valid host type --quiet same as \`--silent' ! --silent do not print informational messages --srcdir=DIR find \`config.guess' in DIR --version output version information and exit --with-gcc assume that the GNU C compiler will be used *************** *** 133,139 **** if test -z "$ltmain"; then ltmain="$option" elif test -z "$host"; then ! # FIXME This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then # echo "$progname: warning \`$option' is not a valid host type" 1>&2 # fi --- 166,172 ---- if test -z "$ltmain"; then ltmain="$option" elif test -z "$host"; then ! # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then # echo "$progname: warning \`$option' is not a valid host type" 1>&2 # fi *************** *** 154,160 **** if test -f "$ltmain"; then : else ! echo "$progname: warning: \`$ltmain' does not exist" 1>&2 fi # Quote any args containing shell metacharacters. --- 187,195 ---- if test -f "$ltmain"; then : else ! echo "$progname: \`$ltmain' does not exist" 1>&2 ! echo "$help" 1>&2 ! exit 1 fi # Quote any args containing shell metacharacters. *************** *** 206,215 **** if test -z "$srcdir"; then # Assume the source directory is the same one as the path to ltmain.sh. ! srcdir=`echo "$ltmain" | sed 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=. fi if test "$verify_host" = yes; then # Check for config.guess and config.sub. ac_aux_dir= --- 241,251 ---- 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 + trap "$rm conftest*; exit 1" 1 2 15 if test "$verify_host" = yes; then # Check for config.guess and config.sub. ac_aux_dir= *************** *** 248,254 **** fi ;; esac host=`$ac_config_sub $host_alias` ! echo "$ac_t""$host" 1>&6 elif test -z "$host"; then echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 --- 284,293 ---- fi ;; esac host=`$ac_config_sub $host_alias` ! echo "$ac_t$host" 1>&6 ! ! # Make sure the host verified. ! test -z "$host" && exit 1 elif test -z "$host"; then echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 *************** *** 258,276 **** host_alias=$host fi ! # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. ! case "$host" in ! *-*-linux-gnu*) ;; ! *-*-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Determine commands to create old-style static archives. old_archive_cmds='$AR cru $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' # If RANLIB is not set, then run the test. if test "${RANLIB+set}" != "set"; then --- 297,331 ---- host_alias=$host fi ! # Transform linux* to *-*-linux-gnu*, to support old configure scripts. ! case "$host_os" in ! linux-gnu*) ;; ! linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + case "$host_os" in + aix3*) + # 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. + if test "${COLLECT_NAMES+set}" != set; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; + esac + # Determine commands to create old-style static archives. old_archive_cmds='$AR cru $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' + old_postuninstall_cmds= + + # 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 *************** *** 288,299 **** done IFS="$save_ifs" ! echo $ac_t "$result" 1>&6 fi if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" ! old_postinstall_cmds="$old_postinstall_cmds;\$RANLIB \$oldlib" fi # Check to see if we are using GCC. --- 343,354 ---- done IFS="$save_ifs" ! echo "$ac_t$result" 1>&6 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. *************** *** 313,321 **** IFS="$save_ifs" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi fi --- 368,376 ---- IFS="$save_ifs" if test -n "$CC"; then ! echo "$ac_t$CC" 1>&6 else ! echo "$ac_t"no 1>&6 fi fi *************** *** 352,360 **** fi if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then --- 407,415 ---- fi if test -n "$CC"; then ! echo "$ac_t$CC" 1>&6 else ! echo "$ac_t"no 1>&6 fi if test -z "$CC"; then *************** *** 366,385 **** # Now see if the compiler is really GCC. with_gcc=no echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 - trap "$rm conftest.c; exit 1" 1 2 15 $rm conftest.c cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then with_gcc=yes fi $rm conftest.c ! echo $ac_t "$with_gcc" 1>&6 fi # Allow CC to be a program name with arguments. --- 421,439 ---- # Now see if the compiler is really GCC. with_gcc=no echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 + echo "$progname:424: checking whether we are using GNU C" >&5 $rm conftest.c cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then with_gcc=yes fi $rm conftest.c ! echo "$ac_t$with_gcc" 1>&6 fi # Allow CC to be a program name with arguments. *************** *** 388,416 **** echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 pic_flag= - profile_flag_pattern= special_shlib_compile_flags= wl= link_static_flag= if test "$with_gcc" = yes; then - pic_flag='-fPIC' - profile_flag_pattern='-pg?' wl='-Wl,' link_static_flag='-static' else # PORTME Check for PIC flags for the system compiler. case "$host_os" in aix3* | aix4*) ! # FIXME All rs/6000 code is PIC, but is there any non-rs/6000 AIX platform? ! pic_flag= link_static_flag='-bnso -bI:/lib/syscalls.exp' ;; hpux9* | hpux10*) ! # FIXME is there a better link_static_flag that works with the bundled CC? wl='-Wl,' ! link_static_flag='${wl}-a ${wl}archive' pic_flag='+Z' ;; --- 442,486 ---- echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 pic_flag= special_shlib_compile_flags= wl= link_static_flag= + no_builtin_flag= 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*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + pic_flag='-m68020 -resident32 -malways-restore-a4' + ;; + *) + pic_flag='-fPIC' + ;; + esac else # PORTME Check for PIC flags for the system compiler. case "$host_os" in aix3* | aix4*) ! # All AIX code is PIC. 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" pic_flag='+Z' ;; *************** *** 418,428 **** wl='-Wl,' link_static_flag='-non_shared' # PIC (with -KPIC) is the default. ! pic_flag= ;; osf3* | osf4*) ! # FIXME - pic_flag is probably required for hppa*-osf* and i860-osf* wl='-Wl,' link_static_flag='-non_shared' ;; --- 488,501 ---- wl='-Wl,' link_static_flag='-non_shared' # PIC (with -KPIC) is the default. ! ;; ! ! os2*) ! # We can build DLLs from non-PIC. ;; osf3* | osf4*) ! # All OSF/1 code is PIC. wl='-Wl,' link_static_flag='-non_shared' ;; *************** *** 445,468 **** wl='-Qoption ld ' ;; *) can_build_shared=no ;; esac fi - case "$host_cpu" in - rs6000 | powerpc | powerpcle) - # Yippee! All RS/6000 and PowerPC code is position-independent. - pic_flag= - ;; - esac - if test -n "$pic_flag"; then ! echo $ac_t "$pic_flag" 1>&6 ! pic_flag=" $pic_flag" else ! echo $ac_t none 1>&6 fi # Check for any special shared library compilation flags. --- 518,575 ---- wl='-Qoption ld ' ;; + sysv4.2uw2*) + pic_flag='-KPIC' + link_static_flag='-Bstatic' + wl='-Wl,' + ;; + + uts4*) + pic_flag='-pic' + link_static_flag='-Bstatic' + ;; + *) can_build_shared=no ;; esac fi if test -n "$pic_flag"; then ! echo "$ac_t$pic_flag" 1>&6 ! ! # 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:547: checking if $compiler PIC flag $pic_flag works" >&5 ! if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then ! # Append any errors to the config.log. ! cat conftest.err 1>&5 ! ! # On HP-UX, the stripped-down bundled CC does not accept +Z, but also ! # reports no error. So, we need to grep stderr for (Bundled). ! if grep '(Bundled)' conftest.err >/dev/null; 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 ! can_build_shared=no ! pic_flag= ! echo "$ac_t"no 1>&6 ! fi ! CFLAGS="$save_CFLAGS" ! $rm conftest* else ! echo "$ac_t"none 1>&6 fi # Check for any special shared library compilation flags. *************** *** 475,510 **** fi fi ! # See if we are using a broken GCC collect2 program. ! if test "$with_gcc" = yes; then ! echo $ac_n "checking for broken GCC collect2... $ac_c" 1>&6 ! ! # FIXME: Run a test here, instead of relying on the canonical system name. ! case "$host_os" in ! aix3*) ! can_build_shared=no ! echo $ac_t yes 1>&6 ! echo "$progname: to build shared libraries, set the CC env variable to \`xlc' and reconfigure" 1>&2 ! ;; ! *) ! echo $ac_t no 1>&6 ! ;; ! esac ! fi ! ! echo $ac_n "checking for $compiler option to statically link programs... $ac_c" 1>&6 ! if test -n "$link_static_flag"; then ! echo $ac_t "$link_static_flag" 1>&6 else ! echo $ac_t none 1>&6 fi 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 -f conftestdata if ln -s X conftestdata 2>/dev/null; then ! rm -f conftestdata LN_S="ln -s" else LN_S=ln --- 582,608 ---- fi fi ! echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 ! $rm conftest* ! echo 'main(){return(0);}' > conftest.c ! save_LDFLAGS="$LDFLAGS" ! LDFLAGS="$LDFLAGS $link_static_flag" ! echo "$progname:590: checking if $compiler static flag $link_static_flag works" >&5 ! if { (eval echo $progname:591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ! echo "$ac_t$link_static_flag" 1>&6 else ! echo "$ac_t"none 1>&6 ! link_static_flag= fi + LDFLAGS="$save_LDFLAGS" + $rm conftest* 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 *************** *** 516,639 **** fi fi ! if test "$with_gnu_ld" != yes || test -z "$LD"; then ! if test -z "$LD"; then ! if test "$with_gnu_ld" = yes; then ! echo $ac_n "checking for GNU ld... $ac_c" 1>&6 ! else ! echo $ac_n "checking for non-GNU ld... $ac_c" 1>&6 ! fi 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/ld"; then ! LD="$ac_dir/ld" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then ! test "$with_gnu_ld" = yes && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" ! if test -n "$LD"; then ! echo "$ac_t""$LD" 1>&6 ! else ! echo "$ac_t""no" 1>&6 ! fi ! ! if test -z "$LD"; then ! echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 ! exit 1 ! fi fi ! echo $ac_n "checking whether we are using GNU ld... $ac_c" 1>&6 ! # I'd rather use --version here, but apparently some GNU ld's only accept -v. ! if $LD -v 2>&1 /dev/null; then ! with_gnu_ld=yes fi - echo $ac_t "$with_gnu_ld" 1>&6 fi # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 allow_undefined_flag= archive_cmds= ! export_dynamic_flag= hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no - hardcode_runpath_var=no hardcode_shlibpath_var=unsupported runpath_var= ld_shlibs=yes ! if test "$with_gnu_ld" = yes; then ! # See if GNU ld supports shared libraries. ! case "$host_os" in ! sunos4*) ld_shlibs=yes ! hardcode_direct=yes ! hardcode_shlibpath_var=no ! ;; ! ! *) ! if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! ld_shlibs=yes ! else ! ld_shlibs=no ! fi ! ;; ! esac if test "$ld_shlibs" = yes; then ! archive_cmds='$cc -shared ${wl}-soname $wl$soname -o $lib$libobjs$deplibs' ! hardcode_libdir_flag_spec='${wl}-rpath $wl$libdir' ! export_dynamic_flag='${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='/usr/ucb/nm$libobjs | egrep \" [BD] \" | sed \"s/^.* //\" > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE -lc$deplibs;$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 ;; aix4*) allow_undefined_flag=unsupported ! archive_cmds='/bin/nm -B$libobjs | egrep \" [BD] \" | sed \"s/^.* //\" > $lib.exp;$cc -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry$deplibs;$AR cru $lib $objdir/$soname' hardcode_direct=yes 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 ! # doesn't break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) ! archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs /usr/lib/c++rt0.o' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; ! # Unfortunately, older versions of FreeBSD 2 don't have this feature. freebsd2*) ! archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no --- 614,775 ---- fi fi ! # Make sure LD is an absolute path. ! if test -z "$LD"; then ! ac_prog=ld ! if test "$with_gcc" = yes; then ! # Check if gcc -print-prog-name=ld gives a path. ! echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 ! echo "$progname:623: checking for ld used by GCC" >&5 ! 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 are not using GCC. ! ac_prog=ld ! ;; ! *) ! # If it is relative, then search for the first ld in PATH. ! with_gnu_ld=unknown ! ;; ! esac ! elif test "$with_gnu_ld" = yes; then ! echo $ac_n "checking for GNU ld... $ac_c" 1>&6 ! echo "$progname:641: checking for GNU ld" >&5 ! else ! echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "$progname:644: checking for non-GNU ld" >&5 ! 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. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$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 IFS="$ac_save_ifs" + fi ! if test -n "$LD"; then ! echo "$ac_t$LD" 1>&6 ! else ! echo "$ac_t"no 1>&6 fi ! if test -z "$LD"; then ! echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 ! exit 1 fi fi + # Check to see if it really is or is not GNU ld. + echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 + # I'd rather use --version here, but apparently some GNU ld's only accept -v. + if $LD -v 2>&1 &5; then + with_gnu_ld=yes + else + with_gnu_ld=no + fi + echo "$ac_t$with_gnu_ld" 1>&6 + # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 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 + if test "$with_gcc" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi ;; 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 *************** *** 641,718 **** # FreeBSD 3, at last, uses gcc -shared to do shared libraries. freebsd3*) ! archive_cmds='$CC -shared -o $lib$libobjs$deplibs' hardcode_direct=yes ! hardcode_minusL=yes hardcode_shlibpath_var=no ;; hpux9*) ! archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs$deplibs;mv $objdir/$soname $lib' hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; hpux10*) ! archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs$deplibs' hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; irix5* | irix6*) ! archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ;; ! netbsd* | openbsd*) # Tested with NetBSD 1.2 ld ! archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; osf3* | osf4*) ! allow_undefined_flag=' -expect_unresolved' ! archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; sco3.2v5*) ! archive_cmds='$LD -G -o $lib$libobjs$deplibs' hardcode_direct=yes ;; solaris2*) ! archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no ;; sunos4*) ! archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; *) ld_shlibs=no can_build_shared=no ;; esac fi ! echo $ac_t "$ld_shlibs" 1>&6 # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ ! test "$hardcode_runpath_var" = yes; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && \ --- 777,1065 ---- # 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 ;; + os2*) + 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" ! test -z "$NM" && NM=nm ! ;; ! esac ! echo "$ac_t$NM" 1>&6 ! fi ! ! # Check for command to grab the raw symbol name followed by C symbol from nm. ! echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 ! ! # These are sane defaults that work on at least a few old systems. ! # [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 <&5 ! if { (eval echo $progname:971: \"$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:974: 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:1032: \"$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 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ ! test -n "$runpath_var"; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && \ *************** *** 728,740 **** elif test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" != yes; then ! # We can't 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 --- 1075,1087 ---- 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 *************** *** 743,756 **** 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 library_names_spec= soname_spec= postinstall_cmds= finish_cmds= shlibpath_var= version_type=none dynamic_linker="$host_os ld.so" --- 1090,1106 ---- 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 library_names_spec= + libname_spec='lib$name' soname_spec= postinstall_cmds= + postuninstall_cmds= finish_cmds= + finish_eval= shlibpath_var= version_type=none dynamic_linker="$host_os ld.so" *************** *** 759,781 **** case "$host_os" in aix3* | aix4*) version_type=linux ! library_names_spec='$libname.so.$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. ! soname_spec='$libname.so.$major' ;; freebsd2* | freebsd3*) version_type=sunos ! library_names_spec='$libname.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.so.$versuffix' shlibpath_var=LD_LIBRARY_PATH ;; --- 1109,1137 ---- 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 ;; *************** *** 785,800 **** dynamic_linker="$host_os dld.sl" version_type=sunos shlibpath_var=SHLIB_PATH ! library_names_spec='$libname.sl.$versuffix $libname.sl.$major $libname.sl' ! soname_spec='$libname.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.so' ! library_names_spec='$libname.so.$versuffix $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; --- 1141,1156 ---- 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 ;; *************** *** 806,814 **** # This must be Linux ELF. linux-gnu*) version_type=linux ! library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' ! soname_spec='$libname.so.$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH if test -f /lib/ld.so.1; then --- 1162,1170 ---- # 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 *************** *** 824,859 **** netbsd* | openbsd*) version_type=sunos ! library_names_spec='$libname.so.$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; osf3* | osf4*) version_type=osf ! soname_spec='$libname.so' ! library_names_spec='$libname.so.$versuffix $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; sco3.2v5*) version_type=osf ! soname_spec='$libname.so.$major' ! library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; solaris2*) version_type=linux ! library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' ! soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH ;; sunos4*) version_type=sunos ! library_names_spec='$libname.so.$versuffix' ! finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH ;; --- 1180,1236 ---- 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 + ;; + 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 ;; *************** *** 861,899 **** dynamic_linker=no ;; esac ! echo "$ac_t""$dynamic_linker" test "$dynamic_linker" = no && can_build_shared=no ! # FIXME need to add library stripping features ! # strip -x works for most platforms, though not for static libraries on NetBSD ! # HP-UX requires "-r" for library stripping ! striplib= ! old_striplib= ! ! #echo $ac_n "checking for static library strip program... $ac_c" 1>&6 ! #if test -n "$old_striplib"; then ! # echo $ac_t "$old_striplib" 1>&6 ! #else ! # echo $ac_t none 1>&6 ! #fi ! ! #if test "$can_build_shared" = yes; then ! # echo $ac_n "checking for shared library strip program... $ac_c" 1>&6 ! # ! # if test -n "$striplib"; then ! # echo $ac_t "$striplib" 1>&6 ! # else ! # echo $ac_t none 1>&6 ! # fi ! #fi ! ! # Report the 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. case "$host_os" in aix*) test "$enable_shared" = yes && enable_static=no --- 1238,1254 ---- 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 *************** *** 904,939 **** ;; esac ! echo "$ac_t""$enable_shared" 1>&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "checking whether to build static libraries... $enable_static" 1>&6 ofile=libtool trap "$rm $ofile; exit 1" 1 2 15 echo creating $ofile ! rm -fr $ofile cat < $ofile #! /bin/sh # libtool - Provide generalized library-building support services. - # # Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION # 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" 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. # The version of $progname that generated this script. LTCONFIG_VERSION="$VERSION" # Whether or not to build libtool libraries. build_libtool_libs=$enable_shared --- 1259,1370 ---- ;; esac ! echo "$ac_t$enable_shared" 1>&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "checking whether to build static libraries... $enable_static" 1>&6 + echo $ac_n "checking for objdir... $ac_c" 1>&6 + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then + objdir=.libs + else + # MS-DOS does not allow filenames that begin with a dot. + objdir=_libs + fi + 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 + # 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 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//" + + # 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 + + # 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 *************** *** 945,1005 **** host="$host" # The archiver. ! AR='$AR' # The linker used to build libraries. ! LD='$LD' # Whether we need hard or soft links. ! LN_S='$LN_S' # 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 allow reflexive dlopens. ! export_dynamic_flag='$export_dynamic_flag' ! # Pattern to match compiler flags for creating libNAME_p libraries: ! profile_flag_pattern='$profile_flag_pattern' # Library versioning type. version_type=$version_type # 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' # Commands used to build and install a shared archive. ! archive_cmds='$archive_cmds' ! postinstall_cmds='$postinstall_cmds' # Flag that allows shared libraries with undefined symbols to be built. ! allow_undefined_flag='$allow_undefined_flag' # Commands used to finish a libtool library installation in a directory. ! finish_cmds='$finish_cmds' ! # How to strip a library file. ! striplib='$striplib' ! old_striplib='$old_striplib' # This is the shared library runtime path variable. runpath_var=$runpath_var --- 1376,1458 ---- 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 *************** *** 1012,1021 **** # 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. --- 1465,1474 ---- # 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. *************** *** 1025,1059 **** # resulting binary. hardcode_minus_L=$hardcode_minus_L - # Set to yes if using RUNPATH_VAR=DIR during linking hardcodes DIR into the - # resulting binary. - hardcode_runpath_var=$hardcode_runpath_var - # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var EOF ! # Detect if we are using a relative or absolute path to ltmain.sh. ! case "$ltmain" in ! /*) cat <> $ofile ! # Execute the libtool backend. ! . $ltmain ! EOF2 ! ;; ! *) cat <> $ofile ! # Find the path to this script. ! thisdir=\`echo "\$0" | sed -e 's%/[^/]*\$%%'\` ! test "X\$0" = "X\$thisdir" && thisdir=. ! ! # Execute the libtool backend. ! . \$thisdir/$ltmain ! EOF3 ;; esac ! echo 'exit 1' >> $ofile chmod +x $ofile exit 0 --- 1478,1506 ---- # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # 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. ! if test "${COLLECT_NAMES+set}" != set; then ! 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 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/ltconfig.in libtool-1.1/ltconfig.in *** libtool-1.0/ltconfig.in Tue Jul 8 18:31:12 1997 --- libtool-1.1/ltconfig.in Sat Mar 7 23:28:38 1998 *************** *** 1,9 **** #! /bin/sh # ltconfig - Create a system-specific libtool. ! # When updating this script, search for LINENUM and fix line number refs. ! # @configure_input@ ! # Copyright (C) 1996, 1997, Free Software Foundation, Inc. # Gordon Matzigkeit , 1996 # # This file is free software; you can redistribute it and/or modify it --- 1,7 ---- #! /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 *************** *** 27,40 **** # A lot of this script is taken from autoconf-2.10. # The name of this program. ! progname=`echo "$0" | sed 's%^.*/%%'` # Constants: PROGRAM=ltconfig PACKAGE=@PACKAGE@ VERSION=@VERSION@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' rm="rm -f" help="Try \`$progname --help' for more information." --- 25,74 ---- # 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 + + # 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='s/\([\\"\\`$\\\\]\)/\\\1/g' + + # Same as above, but do not quote variable references. + double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + # The name of this program. ! progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` # Constants: PROGRAM=ltconfig PACKAGE=@PACKAGE@ VERSION=@VERSION@ 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" help="Try \`$progname --help' for more information." *************** *** 61,70 **** old_CPPFLAGS="$CPPFLAGS" old_LD="$LD" old_LN_S="$LN_S" old_RANLIB="$RANLIB" - test -z "$AR" && AR=ar - # Parse the command line options. args= prev= --- 95,103 ---- old_CPPFLAGS="$CPPFLAGS" old_LD="$LD" old_LN_S="$LN_S" + old_NM="$NM" old_RANLIB="$RANLIB" # Parse the command line options. args= prev= *************** *** 93,99 **** --help display this help and exit --no-verify do not verify that HOST is a valid host type --quiet same as \`--silent' ! --silent don't print informational messages --srcdir=DIR find \`config.guess' in DIR --version output version information and exit --with-gcc assume that the GNU C compiler will be used --- 126,132 ---- --help display this help and exit --no-verify do not verify that HOST is a valid host type --quiet same as \`--silent' ! --silent do not print informational messages --srcdir=DIR find \`config.guess' in DIR --version output version information and exit --with-gcc assume that the GNU C compiler will be used *************** *** 133,139 **** if test -z "$ltmain"; then ltmain="$option" elif test -z "$host"; then ! # FIXME This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then # echo "$progname: warning \`$option' is not a valid host type" 1>&2 # fi --- 166,172 ---- if test -z "$ltmain"; then ltmain="$option" elif test -z "$host"; then ! # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then # echo "$progname: warning \`$option' is not a valid host type" 1>&2 # fi *************** *** 154,160 **** if test -f "$ltmain"; then : else ! echo "$progname: warning: \`$ltmain' does not exist" 1>&2 fi # Quote any args containing shell metacharacters. --- 187,195 ---- if test -f "$ltmain"; then : else ! echo "$progname: \`$ltmain' does not exist" 1>&2 ! echo "$help" 1>&2 ! exit 1 fi # Quote any args containing shell metacharacters. *************** *** 206,215 **** if test -z "$srcdir"; then # Assume the source directory is the same one as the path to ltmain.sh. ! srcdir=`echo "$ltmain" | sed 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=. fi if test "$verify_host" = yes; then # Check for config.guess and config.sub. ac_aux_dir= --- 241,251 ---- 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 + trap "$rm conftest*; exit 1" 1 2 15 if test "$verify_host" = yes; then # Check for config.guess and config.sub. ac_aux_dir= *************** *** 248,254 **** fi ;; esac host=`$ac_config_sub $host_alias` ! echo "$ac_t""$host" 1>&6 elif test -z "$host"; then echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 --- 284,293 ---- fi ;; esac host=`$ac_config_sub $host_alias` ! echo "$ac_t$host" 1>&6 ! ! # Make sure the host verified. ! test -z "$host" && exit 1 elif test -z "$host"; then echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 *************** *** 258,276 **** host_alias=$host fi ! # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. ! case "$host" in ! *-*-linux-gnu*) ;; ! *-*-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Determine commands to create old-style static archives. old_archive_cmds='$AR cru $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' # If RANLIB is not set, then run the test. if test "${RANLIB+set}" != "set"; then --- 297,331 ---- host_alias=$host fi ! # Transform linux* to *-*-linux-gnu*, to support old configure scripts. ! case "$host_os" in ! linux-gnu*) ;; ! linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + case "$host_os" in + aix3*) + # 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. + if test "${COLLECT_NAMES+set}" != set; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; + esac + # Determine commands to create old-style static archives. old_archive_cmds='$AR cru $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' + old_postuninstall_cmds= + + # 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 *************** *** 288,299 **** done IFS="$save_ifs" ! echo $ac_t "$result" 1>&6 fi if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" ! old_postinstall_cmds="$old_postinstall_cmds;\$RANLIB \$oldlib" fi # Check to see if we are using GCC. --- 343,354 ---- done IFS="$save_ifs" ! echo "$ac_t$result" 1>&6 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. *************** *** 313,321 **** IFS="$save_ifs" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi fi --- 368,376 ---- IFS="$save_ifs" if test -n "$CC"; then ! echo "$ac_t$CC" 1>&6 else ! echo "$ac_t"no 1>&6 fi fi *************** *** 352,360 **** fi if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then --- 407,415 ---- fi if test -n "$CC"; then ! echo "$ac_t$CC" 1>&6 else ! echo "$ac_t"no 1>&6 fi if test -z "$CC"; then *************** *** 366,385 **** # Now see if the compiler is really GCC. with_gcc=no echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 - trap "$rm conftest.c; exit 1" 1 2 15 $rm conftest.c cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then with_gcc=yes fi $rm conftest.c ! echo $ac_t "$with_gcc" 1>&6 fi # Allow CC to be a program name with arguments. --- 421,439 ---- # Now see if the compiler is really GCC. with_gcc=no echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 + echo "$progname:@LINENO@: checking whether we are using GNU C" >&5 $rm conftest.c cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then with_gcc=yes fi $rm conftest.c ! echo "$ac_t$with_gcc" 1>&6 fi # Allow CC to be a program name with arguments. *************** *** 388,416 **** echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 pic_flag= - profile_flag_pattern= special_shlib_compile_flags= wl= link_static_flag= if test "$with_gcc" = yes; then - pic_flag='-fPIC' - profile_flag_pattern='-pg?' wl='-Wl,' link_static_flag='-static' else # PORTME Check for PIC flags for the system compiler. case "$host_os" in aix3* | aix4*) ! # FIXME All rs/6000 code is PIC, but is there any non-rs/6000 AIX platform? ! pic_flag= link_static_flag='-bnso -bI:/lib/syscalls.exp' ;; hpux9* | hpux10*) ! # FIXME is there a better link_static_flag that works with the bundled CC? wl='-Wl,' ! link_static_flag='${wl}-a ${wl}archive' pic_flag='+Z' ;; --- 442,486 ---- echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 pic_flag= special_shlib_compile_flags= wl= link_static_flag= + no_builtin_flag= 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*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + pic_flag='-m68020 -resident32 -malways-restore-a4' + ;; + *) + pic_flag='-fPIC' + ;; + esac else # PORTME Check for PIC flags for the system compiler. case "$host_os" in aix3* | aix4*) ! # All AIX code is PIC. 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" pic_flag='+Z' ;; *************** *** 418,428 **** wl='-Wl,' link_static_flag='-non_shared' # PIC (with -KPIC) is the default. ! pic_flag= ;; osf3* | osf4*) ! # FIXME - pic_flag is probably required for hppa*-osf* and i860-osf* wl='-Wl,' link_static_flag='-non_shared' ;; --- 488,501 ---- wl='-Wl,' link_static_flag='-non_shared' # PIC (with -KPIC) is the default. ! ;; ! ! os2*) ! # We can build DLLs from non-PIC. ;; osf3* | osf4*) ! # All OSF/1 code is PIC. wl='-Wl,' link_static_flag='-non_shared' ;; *************** *** 445,468 **** wl='-Qoption ld ' ;; *) can_build_shared=no ;; esac fi - case "$host_cpu" in - rs6000 | powerpc | powerpcle) - # Yippee! All RS/6000 and PowerPC code is position-independent. - pic_flag= - ;; - esac - if test -n "$pic_flag"; then ! echo $ac_t "$pic_flag" 1>&6 ! pic_flag=" $pic_flag" else ! echo $ac_t none 1>&6 fi # Check for any special shared library compilation flags. --- 518,575 ---- wl='-Qoption ld ' ;; + sysv4.2uw2*) + pic_flag='-KPIC' + link_static_flag='-Bstatic' + wl='-Wl,' + ;; + + uts4*) + pic_flag='-pic' + link_static_flag='-Bstatic' + ;; + *) can_build_shared=no ;; esac fi if test -n "$pic_flag"; then ! echo "$ac_t$pic_flag" 1>&6 ! ! # 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 errors to the config.log. ! cat conftest.err 1>&5 ! ! # On HP-UX, the stripped-down bundled CC does not accept +Z, but also ! # reports no error. So, we need to grep stderr for (Bundled). ! if grep '(Bundled)' conftest.err >/dev/null; 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 ! can_build_shared=no ! pic_flag= ! echo "$ac_t"no 1>&6 ! fi ! CFLAGS="$save_CFLAGS" ! $rm conftest* else ! echo "$ac_t"none 1>&6 fi # Check for any special shared library compilation flags. *************** *** 475,510 **** fi fi ! # See if we are using a broken GCC collect2 program. ! if test "$with_gcc" = yes; then ! echo $ac_n "checking for broken GCC collect2... $ac_c" 1>&6 ! ! # FIXME: Run a test here, instead of relying on the canonical system name. ! case "$host_os" in ! aix3*) ! can_build_shared=no ! echo $ac_t yes 1>&6 ! echo "$progname: to build shared libraries, set the CC env variable to \`xlc' and reconfigure" 1>&2 ! ;; ! *) ! echo $ac_t no 1>&6 ! ;; ! esac ! fi ! ! echo $ac_n "checking for $compiler option to statically link programs... $ac_c" 1>&6 ! if test -n "$link_static_flag"; then ! echo $ac_t "$link_static_flag" 1>&6 else ! echo $ac_t none 1>&6 fi 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 -f conftestdata if ln -s X conftestdata 2>/dev/null; then ! rm -f conftestdata LN_S="ln -s" else LN_S=ln --- 582,608 ---- fi fi ! echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 ! $rm conftest* ! echo 'main(){return(0);}' > conftest.c ! save_LDFLAGS="$LDFLAGS" ! LDFLAGS="$LDFLAGS $link_static_flag" ! echo "$progname:@LINENO@: checking if $compiler static flag $link_static_flag works" >&5 ! if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ! echo "$ac_t$link_static_flag" 1>&6 else ! echo "$ac_t"none 1>&6 ! link_static_flag= fi + LDFLAGS="$save_LDFLAGS" + $rm conftest* 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 *************** *** 516,639 **** fi fi ! if test "$with_gnu_ld" != yes || test -z "$LD"; then ! if test -z "$LD"; then ! if test "$with_gnu_ld" = yes; then ! echo $ac_n "checking for GNU ld... $ac_c" 1>&6 ! else ! echo $ac_n "checking for non-GNU ld... $ac_c" 1>&6 ! fi 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/ld"; then ! LD="$ac_dir/ld" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then ! test "$with_gnu_ld" = yes && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" ! if test -n "$LD"; then ! echo "$ac_t""$LD" 1>&6 ! else ! echo "$ac_t""no" 1>&6 ! fi ! ! if test -z "$LD"; then ! echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 ! exit 1 ! fi fi ! echo $ac_n "checking whether we are using GNU ld... $ac_c" 1>&6 ! # I'd rather use --version here, but apparently some GNU ld's only accept -v. ! if $LD -v 2>&1 /dev/null; then ! with_gnu_ld=yes fi - echo $ac_t "$with_gnu_ld" 1>&6 fi # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 allow_undefined_flag= archive_cmds= ! export_dynamic_flag= hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no - hardcode_runpath_var=no hardcode_shlibpath_var=unsupported runpath_var= ld_shlibs=yes ! if test "$with_gnu_ld" = yes; then ! # See if GNU ld supports shared libraries. ! case "$host_os" in ! sunos4*) ld_shlibs=yes ! hardcode_direct=yes ! hardcode_shlibpath_var=no ! ;; ! ! *) ! if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! ld_shlibs=yes ! else ! ld_shlibs=no ! fi ! ;; ! esac if test "$ld_shlibs" = yes; then ! archive_cmds='$cc -shared ${wl}-soname $wl$soname -o $lib$libobjs$deplibs' ! hardcode_libdir_flag_spec='${wl}-rpath $wl$libdir' ! export_dynamic_flag='${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='/usr/ucb/nm$libobjs | egrep \" [BD] \" | sed \"s/^.* //\" > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE -lc$deplibs;$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 ;; aix4*) allow_undefined_flag=unsupported ! archive_cmds='/bin/nm -B$libobjs | egrep \" [BD] \" | sed \"s/^.* //\" > $lib.exp;$cc -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry$deplibs;$AR cru $lib $objdir/$soname' hardcode_direct=yes 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 ! # doesn't break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) ! archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs /usr/lib/c++rt0.o' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; ! # Unfortunately, older versions of FreeBSD 2 don't have this feature. freebsd2*) ! archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no --- 614,775 ---- fi fi ! # Make sure LD is an absolute path. ! if test -z "$LD"; then ! ac_prog=ld ! if test "$with_gcc" = yes; then ! # Check if gcc -print-prog-name=ld gives a path. ! echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 ! echo "$progname:@LINENO@: checking for ld used by GCC" >&5 ! 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 are not using GCC. ! ac_prog=ld ! ;; ! *) ! # If it is relative, then search for the first ld in PATH. ! with_gnu_ld=unknown ! ;; ! esac ! elif test "$with_gnu_ld" = yes; then ! echo $ac_n "checking for GNU ld... $ac_c" 1>&6 ! echo "$progname:@LINENO@: checking for GNU ld" >&5 ! else ! echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "$progname:@LINENO@: checking for non-GNU ld" >&5 ! 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. # Break only if it was the GNU/non-GNU ld that we prefer. ! if "$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 IFS="$ac_save_ifs" + fi ! if test -n "$LD"; then ! echo "$ac_t$LD" 1>&6 ! else ! echo "$ac_t"no 1>&6 fi ! if test -z "$LD"; then ! echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 ! exit 1 fi fi + # Check to see if it really is or is not GNU ld. + echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 + # I'd rather use --version here, but apparently some GNU ld's only accept -v. + if $LD -v 2>&1 &5; then + with_gnu_ld=yes + else + with_gnu_ld=no + fi + echo "$ac_t$with_gnu_ld" 1>&6 + # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 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 + if test "$with_gcc" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi ;; 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 *************** *** 641,718 **** # FreeBSD 3, at last, uses gcc -shared to do shared libraries. freebsd3*) ! archive_cmds='$CC -shared -o $lib$libobjs$deplibs' hardcode_direct=yes ! hardcode_minusL=yes hardcode_shlibpath_var=no ;; hpux9*) ! archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs$deplibs;mv $objdir/$soname $lib' hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; hpux10*) ! archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs$deplibs' hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; irix5* | irix6*) ! archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ;; ! netbsd* | openbsd*) # Tested with NetBSD 1.2 ld ! archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; osf3* | osf4*) ! allow_undefined_flag=' -expect_unresolved' ! archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; sco3.2v5*) ! archive_cmds='$LD -G -o $lib$libobjs$deplibs' hardcode_direct=yes ;; solaris2*) ! archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no ;; sunos4*) ! archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; *) ld_shlibs=no can_build_shared=no ;; esac fi ! echo $ac_t "$ld_shlibs" 1>&6 # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ ! test "$hardcode_runpath_var" = yes; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && \ --- 777,1065 ---- # 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 ;; + os2*) + 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" ! test -z "$NM" && NM=nm ! ;; ! esac ! echo "$ac_t$NM" 1>&6 ! fi ! ! # Check for command to grab the raw symbol name followed by C symbol from nm. ! echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 ! ! # These are sane defaults that work on at least a few old systems. ! # [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 <&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 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ ! test -n "$runpath_var"; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && \ *************** *** 728,740 **** elif test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" != yes; then ! # We can't 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 --- 1075,1087 ---- 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 *************** *** 743,756 **** 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 library_names_spec= soname_spec= postinstall_cmds= finish_cmds= shlibpath_var= version_type=none dynamic_linker="$host_os ld.so" --- 1090,1106 ---- 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 library_names_spec= + libname_spec='lib$name' soname_spec= postinstall_cmds= + postuninstall_cmds= finish_cmds= + finish_eval= shlibpath_var= version_type=none dynamic_linker="$host_os ld.so" *************** *** 759,781 **** case "$host_os" in aix3* | aix4*) version_type=linux ! library_names_spec='$libname.so.$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. ! soname_spec='$libname.so.$major' ;; freebsd2* | freebsd3*) version_type=sunos ! library_names_spec='$libname.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.so.$versuffix' shlibpath_var=LD_LIBRARY_PATH ;; --- 1109,1137 ---- 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 ;; *************** *** 785,800 **** dynamic_linker="$host_os dld.sl" version_type=sunos shlibpath_var=SHLIB_PATH ! library_names_spec='$libname.sl.$versuffix $libname.sl.$major $libname.sl' ! soname_spec='$libname.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.so' ! library_names_spec='$libname.so.$versuffix $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; --- 1141,1156 ---- 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 ;; *************** *** 806,814 **** # This must be Linux ELF. linux-gnu*) version_type=linux ! library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' ! soname_spec='$libname.so.$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH if test -f /lib/ld.so.1; then --- 1162,1170 ---- # 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 *************** *** 824,859 **** netbsd* | openbsd*) version_type=sunos ! library_names_spec='$libname.so.$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; osf3* | osf4*) version_type=osf ! soname_spec='$libname.so' ! library_names_spec='$libname.so.$versuffix $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; sco3.2v5*) version_type=osf ! soname_spec='$libname.so.$major' ! library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; solaris2*) version_type=linux ! library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' ! soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH ;; sunos4*) version_type=sunos ! library_names_spec='$libname.so.$versuffix' ! finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH ;; --- 1180,1236 ---- 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 + ;; + 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 ;; *************** *** 861,899 **** dynamic_linker=no ;; esac ! echo "$ac_t""$dynamic_linker" test "$dynamic_linker" = no && can_build_shared=no ! # FIXME need to add library stripping features ! # strip -x works for most platforms, though not for static libraries on NetBSD ! # HP-UX requires "-r" for library stripping ! striplib= ! old_striplib= ! ! #echo $ac_n "checking for static library strip program... $ac_c" 1>&6 ! #if test -n "$old_striplib"; then ! # echo $ac_t "$old_striplib" 1>&6 ! #else ! # echo $ac_t none 1>&6 ! #fi ! ! #if test "$can_build_shared" = yes; then ! # echo $ac_n "checking for shared library strip program... $ac_c" 1>&6 ! # ! # if test -n "$striplib"; then ! # echo $ac_t "$striplib" 1>&6 ! # else ! # echo $ac_t none 1>&6 ! # fi ! #fi ! ! # Report the 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. case "$host_os" in aix*) test "$enable_shared" = yes && enable_static=no --- 1238,1254 ---- 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 *************** *** 904,939 **** ;; esac ! echo "$ac_t""$enable_shared" 1>&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "checking whether to build static libraries... $enable_static" 1>&6 ofile=libtool trap "$rm $ofile; exit 1" 1 2 15 echo creating $ofile ! rm -fr $ofile cat < $ofile #! /bin/sh # libtool - Provide generalized library-building support services. - # # Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION # 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" 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. # The version of $progname that generated this script. LTCONFIG_VERSION="$VERSION" # Whether or not to build libtool libraries. build_libtool_libs=$enable_shared --- 1259,1370 ---- ;; esac ! echo "$ac_t$enable_shared" 1>&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "checking whether to build static libraries... $enable_static" 1>&6 + echo $ac_n "checking for objdir... $ac_c" 1>&6 + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then + objdir=.libs + else + # MS-DOS does not allow filenames that begin with a dot. + objdir=_libs + fi + 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 + # 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 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//" + + # 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 + + # 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 *************** *** 945,1005 **** host="$host" # The archiver. ! AR='$AR' # The linker used to build libraries. ! LD='$LD' # Whether we need hard or soft links. ! LN_S='$LN_S' # 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 allow reflexive dlopens. ! export_dynamic_flag='$export_dynamic_flag' ! # Pattern to match compiler flags for creating libNAME_p libraries: ! profile_flag_pattern='$profile_flag_pattern' # Library versioning type. version_type=$version_type # 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' # Commands used to build and install a shared archive. ! archive_cmds='$archive_cmds' ! postinstall_cmds='$postinstall_cmds' # Flag that allows shared libraries with undefined symbols to be built. ! allow_undefined_flag='$allow_undefined_flag' # Commands used to finish a libtool library installation in a directory. ! finish_cmds='$finish_cmds' ! # How to strip a library file. ! striplib='$striplib' ! old_striplib='$old_striplib' # This is the shared library runtime path variable. runpath_var=$runpath_var --- 1376,1458 ---- 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 *************** *** 1012,1021 **** # 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. --- 1465,1474 ---- # 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. *************** *** 1025,1059 **** # resulting binary. hardcode_minus_L=$hardcode_minus_L - # Set to yes if using RUNPATH_VAR=DIR during linking hardcodes DIR into the - # resulting binary. - hardcode_runpath_var=$hardcode_runpath_var - # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var EOF ! # Detect if we are using a relative or absolute path to ltmain.sh. ! case "$ltmain" in ! /*) cat <> $ofile ! # Execute the libtool backend. ! . $ltmain ! EOF2 ! ;; ! *) cat <> $ofile ! # Find the path to this script. ! thisdir=\`echo "\$0" | sed -e 's%/[^/]*\$%%'\` ! test "X\$0" = "X\$thisdir" && thisdir=. ! ! # Execute the libtool backend. ! . \$thisdir/$ltmain ! EOF3 ;; esac ! echo 'exit 1' >> $ofile chmod +x $ofile exit 0 --- 1478,1506 ---- # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # 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. ! if test "${COLLECT_NAMES+set}" != set; then ! 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 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/ltmain.in libtool-1.1/ltmain.in *** libtool-1.0/ltmain.in Thu Jan 1 00:00:00 1970 --- libtool-1.1/ltmain.in Mon Mar 9 03:45:24 1998 *************** *** 0 **** --- 1,2454 ---- + # 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 + # 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. + + # The name of this program. + progname=`$echo "$0" | sed 's%^.*/%%'` + modename="$progname" + + # Constants. + PROGRAM=ltmain.sh + PACKAGE=@PACKAGE@ + VERSION=@VERSION@ + + default_mode= + help="Try \`$progname --help' for more information." + magic="%%%MAGIC variable%%%" + mkdir="mkdir" + mv="mv -f" + rm="rm -f" + + # 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='s/\([\\`\\"$\\\\]\)/\\\1/g' + + # 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). + 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 "$LTCONFIG_VERSION" != "$VERSION"; then + echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + fi + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + echo "$modename: not configured to build any kind of library" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + fi + + # Global variables. + mode=$default_mode + nonopt= + prev= + prevopt= + run= + show="$echo" + show_help= + execute_dlfiles= + + # Parse our command line options once, thoroughly. + while test $# -gt 0 + do + arg="$1" + shift + + case "$arg" in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case "$prev" in + execute_dlfiles) + eval "$prev=\"\$$prev \$arg\"" + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case "$arg" in + --help) + show_help=yes + ;; + + --version) + echo "$PROGRAM (GNU $PACKAGE) $VERSION" + exit 0 + ;; + + --dry-run | -n) + run=: + ;; + + --features) + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + exit 0 + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --quiet | --silent) + show=: + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *) + nonopt="$arg" + break + ;; + esac + done + + if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + case "$nonopt" in + *cc | *++ | gcc* | *-gcc*) + mode=link + for arg + do + case "$arg" in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # 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 + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case "$mode" in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + lastarg= + 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" + + # Aesthetically quote the previous argument. + + # Backslashify any backslashes, double quotes, and dollar signs. + # These are the only characters that are still specially + # interpreted inside of double-quoted scrings. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly in scan + # sets, so we specify it separately. + case "$lastarg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + lastarg="\"$lastarg\"" + ;; + esac + + # Add the previous argument to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + 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 ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + esac + + 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 + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # 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. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + 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 + ;; + + # 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. + for arg + do + case "$arg" in + -all-static | -static) + if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 + fi + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + 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" + + 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) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + 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 + arg=`eval \\$echo "$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 + continue + ;; + + -o) prev=output ;; + + -release) + prev=release + continue + ;; + + -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. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + 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 + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + 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 + flag=`eval \\$echo \"$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. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + 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. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + ;; + esac + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + 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 + $echo "$help" 1>&2 + 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//'` + libname=`eval \\$echo \"$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. + library_names=`eval \\$echo \"$library_names_spec\"` + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + soname=`eval \\$echo \"$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. + cmds=`eval \\$echo \"$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" + cmds=`eval \\$echo \"$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" + + # Exit if we aren't doing a library object file. + 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" + cmds=`eval \\$echo \"$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 + flag=`eval \\$echo \"$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" + EOF + 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 + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # 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 + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` + done + + # 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. + args= + for arg + do + # Quote arguments (to preserve shell metacharacters). + arg=\`\$echo \"X\$arg\" | \$Xsed -e \"\$sed_quote_subst\"\` + args=\"\$args \\\"\$arg\\\"\" + done + + # Export the path to the program. + PATH=\"\$progdir:\$PATH\" + export PATH + + eval \"exec \$program \$args\" + + \$echo \"\$0: cannot exec \$program \$args\" + exit 1 + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + 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 + cmds=`eval \\$echo \"$old_archive_from_new_cmds\"` + else + cmds=`eval \\$echo \"$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' + + # Names of this library. + library_names='$library_names' + + # The name of the static archive. + old_library='$old_library' + + # Libraries that this one depends upon. + dependency_libs='$dependency_libs' + + # Version information for $libname. + current=$current + 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 + ;; + + # libtool install mode + 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 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg="$nonopt" + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir= + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest="$arg" + continue + fi + + case "$arg" in + -d) isdir=yes ;; + -f) prev="-f" ;; + -g) prev="-g" ;; + -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. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + 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 + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test -n "$isdir"; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # 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 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # 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" + cmds=`eval \\$echo \"$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 + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + # Do each command in the postinstall commands. + cmds=`eval \\$echo \"$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 + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec $SHELL $0 --finish$current_libdirs + exit 1 + fi + + exit 0 + ;; + + # libtool finish mode + 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. + cmds=`eval \\$echo \"$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. + cmds=`eval \\$echo \"$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" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + flag=`eval \\$echo \"$hardcode_libdir_flag_spec\"` + + 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 + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit 1 + fi + + # 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 + fi + + 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. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit 1 + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + 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 ;; + *) . ./$file ;; + esac + + # 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"` + args="$args \"$file\"" + done + + if test -z "$run"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + + # Now actually exec the command. + eval "exec \$cmd$args" + + $echo "$modename: cannot exec \$cmd$args" + exit 1 + else + # Display what would be done. + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + $echo "$cmd$args" + exit 0 + fi + ;; + + # libtool uninstall mode + uninstall) + modename="$modename: uninstall" + rm="$nonopt" + files= + + for arg + do + case "$arg" in + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + rmfiles="$file" + + 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 + + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=`eval \\$echo \"$postuninstall_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 "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=`eval \\$echo \"$old_postuninstall_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 + + # 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 + done + exit 0 + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + ;; + esac + + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + fi # test -z "$show_help" + + # We need to display help for each of the modes. + case "$mode" in + "") $echo \ + "Usage: $modename [OPTION]... [MODE-ARG]... + + 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] + --quiet same as \`--silent' + --silent don't print informational messages + --version print version information + + MODE must be one of the following: + + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + + MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for + a more detailed description of MODE." + exit 0 + ;; + + compile) + $echo \ + "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + + Compile a source file into a libtool library object. + + COMPILE-COMMAND is a command to be used in creating a \`standard' object file + from the given SOURCEFILE. + + The output file name is determined by removing the directory component from + SOURCEFILE, then substituting the C source code suffix \`.c' with the + library object suffix, \`.lo'." + ;; + + execute) + $echo \ + "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + + Automatically set library path, then run a program. + + This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + + This mode sets the library path environment variable according to \`-dlopen' + flags. + + If any of the ARGS are libtool executable wrappers, then they are translated + into their corresponding uninstalled binary, and any of their required library + directories are added to the library path. + + Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $echo \ + "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + + Complete the installation of libtool libraries. + + Each LIBDIR is a directory that contains libtool libraries. + + The commands that this mode executes may require superuser privileges. Use + the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $echo \ + "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + + Install executables or libraries. + + INSTALL-COMMAND is the installation command. The first component should be + either the \`install' or \`cp' program. + + The rest of the components are interpreted as arguments to that command (only + BSD-compatible install options are recognized)." + ;; + + link) + $echo \ + "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + + Link object files or libraries together to form another library, or to + create an executable program. + + LINK-COMMAND is a command using the C compiler that you would use to create + a program from several object files. + + 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. + + Every other argument is treated as a filename. Files ending in \`.la' are + 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. + + RM is the name of the program to use to delete files associated with each FILE + (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed + to RM. + + If FILE is a libtool library, all the files associated with it are deleted. + Otherwise, only FILE itself is deleted using RM." + ;; + + *) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + echo + $echo "Try \`$modename --help' for more information about other modes." + + exit 0 + + # Local Variables: + # mode:shell-script + # sh-indentation:2 + # End: diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/ltmain.sh libtool-1.1/ltmain.sh *** libtool-1.0/ltmain.sh Tue Jul 8 18:47:59 1997 --- libtool-1.1/ltmain.sh Mon Mar 9 03:49:29 1998 *************** *** 1,6 **** # ltmain.sh - Provide generalized library-building support services. ! # Generated automatically from ltmain.sh.in by configure. ! # Copyright (C) 1996, 1997 Free Software Foundation, Inc. # Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify --- 1,7 ---- # 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 *************** *** 23,52 **** # the same distribution terms that you use for the rest of that program. # The name of this program. ! progname=`echo "$0" | sed 's%^.*/%%'` # Constants. PROGRAM=ltmain.sh PACKAGE=libtool ! VERSION=1.0 default_mode= help="Try \`$progname --help' for more information." magic="%%%MAGIC variable%%%" mkdir="mkdir" mv="mv -f" - objdir=.libs rm="rm -f" if test "$LTCONFIG_VERSION" != "$VERSION"; then ! echo "$progname: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi - # if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then ! echo "$progname: not configured to build any kind of library" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi --- 24,64 ---- # the same distribution terms that you use for the rest of that program. # The name of this program. ! progname=`$echo "$0" | sed 's%^.*/%%'` ! modename="$progname" # Constants. PROGRAM=ltmain.sh PACKAGE=libtool ! VERSION=1.1 default_mode= help="Try \`$progname --help' for more information." magic="%%%MAGIC variable%%%" mkdir="mkdir" mv="mv -f" rm="rm -f" + # 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='s/\([\\`\\"$\\\\]\)/\\\1/g' + + # 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). + 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 "$LTCONFIG_VERSION" != "$VERSION"; then ! echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then ! echo "$modename: not configured to build any kind of library" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi *************** *** 57,64 **** prev= prevopt= run= ! show=echo show_help= # Parse our command line options once, thoroughly. while test $# -gt 0 --- 69,77 ---- prev= prevopt= run= ! show="$echo" show_help= + execute_dlfiles= # Parse our command line options once, thoroughly. while test $# -gt 0 *************** *** 67,79 **** shift case "$arg" in ! -*=*) optarg=`echo "$arg" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then ! eval "$prev=\$arg" prev= prevopt= continue --- 80,100 ---- shift case "$arg" in ! -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then ! case "$prev" in ! execute_dlfiles) ! eval "$prev=\"\$$prev \$arg\"" ! ;; ! *) ! eval "$prev=\$arg" ! ;; ! esac ! prev= prevopt= continue *************** *** 114,122 **** --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; -*) ! echo "$progname: unrecognized option \`$arg'" 1>&2 ! echo "$help" 1>&2 exit 1 ;; --- 135,152 ---- --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; + --quiet | --silent) + show=: + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + -*) ! $echo "$modename: unrecognized option \`$arg'" 1>&2 ! $echo "$help" 1>&2 exit 1 ;; *************** *** 127,146 **** esac done - if test -n "$prevopt"; then ! echo "$progname: option \`$prevopt' requires an argument" 1>&2 ! echo "$help" 1>&2 exit 1 fi - if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then case "$nonopt" in ! *cc) mode=link for arg do --- 157,174 ---- esac done if test -n "$prevopt"; then ! $echo "$modename: option \`$prevopt' requires an argument" 1>&2 ! $echo "$help" 1>&2 exit 1 fi if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then case "$nonopt" in ! *cc | *++ | gcc* | *-gcc*) mode=link for arg do *************** *** 152,234 **** esac done ;; ! *install*|cp) mode=install ;; *rm) mode=uninstall ;; - *.la) - mode=dlname - ;; *) # Just use the default operation mode. if test -z "$mode"; then ! if test -n "$nonopt"; then ! echo "$progname: warning: cannot infer operation mode from \`$nonopt'" 1>&2 ! else ! echo "$progname: warning: cannot infer operation mode without MODE-ARGS" 1>&2 ! fi fi ;; esac fi # Change the help message to a mode-specific one. generic_help="$help" ! help="Try \`$progname --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case "$mode" in # libtool compile mode compile) ! progname="$progname: compile" # Get the compilation command and the source file. ! base_compile="$nonopt" lastarg= ! srcfile= for arg do ! # Quote any args containing shell metacharacters. case "$arg" in ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*|*\"*) ! quote_arg="'$arg'" ;; ! *) quote_arg="$arg" ;; esac ! base_compile="$base_compile$lastarg" ! srcfile="$quote_arg" ! lastarg=" $srcfile" done # Get the name of the library object. ! libobj=`echo "$srcfile" | sed -e 's%^.*/%%'` # Recognize several different file suffixes. ! xform='[cCFSf]' case "$libobj" in ! *.c++) xform='c++' ;; *.cc) xform=cc ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; ! *.for) xform='for' ;; esac ! libobj=`echo "$libobj" | sed -e "s/\.$xform$/.lo/"` case "$libobj" in ! *.lo) obj=`echo "$libobj" | sed -e 's/\.lo$/.o/'` ;; *) ! echo "$progname: cannot determine name of library object from \`$srcfile'" 1>&2 exit 1 ;; esac if test -z "$base_compile"; then ! echo "$progname: you must specify a compilation command" 1>&2 ! echo "$help" 1>&2 exit 1 fi --- 180,308 ---- esac done ;; ! *db | *dbx) ! mode=execute ! ;; ! *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + # 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 fi + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + # Change the help message to a mode-specific one. generic_help="$help" ! help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case "$mode" in # libtool compile mode compile) ! modename="$modename: compile" # Get the compilation command and the source file. ! base_compile= lastarg= ! 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" ! ! # Aesthetically quote the previous argument. ! ! # Backslashify any backslashes, double quotes, and dollar signs. ! # These are the only characters that are still specially ! # interpreted inside of double-quoted scrings. ! lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` ! ! # Double-quote args containing other shell metacharacters. ! # Many Bourne shells cannot handle close brackets correctly in scan ! # sets, so we specify it separately. ! case "$lastarg" in ! *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) ! lastarg="\"$lastarg\"" ! ;; esac ! # Add the previous argument to base_compile. ! if test -z "$base_compile"; then ! base_compile="$lastarg" ! else ! base_compile="$base_compile $lastarg" ! 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 ;; ! *.ads) xform=ads ;; ! *.asm) xform=asm ;; ! *.c++) xform=c++ ;; *.cc) xform=cc ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; ! *.for) xform=for ;; esac ! 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 if test -z "$base_compile"; then ! $echo "$modename: you must specify a compilation command" 1>&2 ! $echo "$help" 1>&2 exit 1 fi *************** *** 243,283 **** # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # 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 fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then ! $show "$base_compile $srcfile" ! if $run eval "$base_compile $srcfile"; then : else $run $rm $obj $libobj exit 1 fi fi ! # Create an invalid libtool object if no PIC, so that we don't 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 --- 317,364 ---- # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + 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 *************** *** 285,310 **** # libtool link mode link) ! progname="$progname: link" ! # Go through the arguments, transforming them on the way. ! cc="$nonopt" ! args="$cc" ! allow_undefined=no ! compile_command="$cc" ! finalize_command="$cc" compile_shlibpath= finalize_shlibpath= deplibs= export_dynamic=no hardcode_libdirs= - install_libdir= libobjs= link_against_libtool_libs= - link_static= ltlibs= objs= prev= prevarg= perm_rpath= temp_rpath= vinfo= --- 366,392 ---- # 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= *************** *** 313,606 **** for arg do case "$arg" in ! -static) build_libtool_libs=no ! build_old_libs=yes break ;; esac done 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@" ! args="$args $arg" ! ;; ! esac ! ! eval "$prev=\$arg" ! prev= ! continue fi - args="$args $arg" prevarg="$arg" case "$arg" in ! -allow-undefined) allow_undefined=yes ;; ! -export-dynamic) ! export_dynamic=yes ! compile_command="$compile_command $export_dynamic_flag" ! finalize_command="$finalize_command $export_dynamic_flag" continue ;; ! -L*) ! dir=`echo "$arg" | sed 's%^-L\(.*\)$%\1%'` ! case "$dir" in ! /*) ! ;; ! *) ! echo "$progname: \`-L$dir' cannot specify a relative directory" 1>&2 ! exit 1 ! ;; ! esac ! deplibs="$deplibs $arg" ! ;; ! -l*) deplibs="$deplibs $arg" ;; ! -o) prev=output ;; ! -rpath) ! prev=install_libdir ! continue ! ;; ! -static) ! link_static="`eval echo \"$link_static_flag\"`" ! compile_command="$compile_command $link_static" ! continue ! ;; ! -version-file) ! echo "$progname: \`-version-file' has been replaced by \`-version-info'" 1>&2 ! echo "$help" 1>&2 ! exit 1 ! ;; ! -version-info) ! prev=vinfo continue ;; ! -*) cc="$cc $arg" ;; # Some other compiler flag. ! *.o) ! # A standard object. ! objs="$objs $arg" ;; ! *.a) ! # Find the relevant object directory and library name. ! file=`echo "$arg" | sed 's%^.*/%%'` ! dir=`echo "$arg" | sed 's%/[^/]*$%/%'` ! test "$dir" = "$arg" && dir= ! # Standard archive. ! objs="$objs $arg" ;; ! *.lo) ! # A library object. ! libobjs="$libobjs $arg" ! ;; ! *.la) ! # A libtool-controlled library. ! libdir= ! library_names= ! old_library= ! # Check to see that this really is a libtool archive. ! if egrep "^# Generated by $PROGRAM" $arg >/dev/null 2>&1; then : ! else ! echo "$progname: \`$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 "$progname: \`$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 "$progname: cannot find name of link library for \`$arg'" 1>&2 ! exit 1 ! fi ! # Find the relevant object directory and library name. ! name=`echo "$arg" | sed 's%^.*/%%; s/\.la$//; s/^lib//'` ! dir=`echo "$arg" | sed 's%/[^/]*$%%'` ! if test "$dir" = "$arg"; then ! dir="$objdir" ! else ! dir="$dir/$objdir" ! 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 ! 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 libdirs. ! hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ! libdir= ! fi ! fi ! if test -n "$libdir"; then ! hardcode_libdir_flag=`eval echo \"$hardcode_libdir_flag_spec\"` ! compile_command="$compile_command $hardcode_libdir_flag" ! finalize_command="$finalize_command $hardcode_libdir_flag" ! fi ! elif test "$hardcode_runpath_var" = yes; 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 ! /*) ;; ! *) ! absdir=`cd "$dir" && pwd` ! if test -z "$absdir"; then ! echo "$progname: 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 "$progname: \`$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 can't 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 "$progname: cannot find static library for \`$arg'" 1>&2 ! exit 1 fi - test -n "$old_library" && linklib="$old_library" - compile_command="$compile_command $dir/$linklib" - finalize_command="$finalize_command $dir/$linklib" fi continue ! ;; *) ! echo "$progname: unknown file suffix for \`$arg'" 1>&2 ! echo "$help" 1>&2 ! exit 1 ! ;; esac ! compile_command="$compile_command $arg" ! finalize_command="$finalize_command $arg" done if test -n "$prev"; then ! echo "$progname: the \`$prevarg' option requires an argument" 1>&2 ! echo "$help" 1>&2 exit 1 fi ! # Substitute the hardcoded libdirs into the compile commands. ! if test "$hardcode_libdir_colon_separated" = yes; then ! compile_command=`echo "$compile_command" | sed "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` ! finalize_command=`echo "$finalize_command" | sed "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` fi oldlib= oldobjs= case "$output" in "") ! echo "$progname: you must specify an output file" 1>&2 ! echo "$help" 1>&2 exit 1 ;; ! */*) ! echo "$progname: output file \`$output' must have no directory components" 1>&2 exit 1 ;; *.la) ! libname=`echo "$output" | sed 's/\.la$//'` # All the library-specific variables (install_libdir is set above). library_names= --- 395,849 ---- for arg do case "$arg" in ! -all-static | -static) ! if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then ! $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 ! fi build_libtool_libs=no ! build_old_libs=yes break ;; esac done + # See if our shared archives depend on static archives. + 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" 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) ! # FIXME: remove this flag sometime in the future. ! $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 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 ! arg=`eval \\$echo "$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 continue ;; ! -o) prev=output ;; ! -release) ! prev=release ! continue ;; ! -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. ! -* | +*) ! # Unknown arguments in both finalize_command and compile_command need ! # to be aesthetically quoted because they are evaled later. ! arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` ! case "$arg" in ! *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) ! 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 ! # If libtool objects are unsupported, then we need to preload. ! prev=dlprefiles ! fi fi ! 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 ! flag=`eval \\$echo \"$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. ! if test "$hardcode_direct" != unsupported; then ! test -n "$old_library" && linklib="$old_library" ! 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. *) ! # Unknown arguments in both finalize_command and compile_command need ! # to be aesthetically quoted because they are evaled later. ! arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` ! case "$arg" in ! *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) ! arg="\"$arg\"" ! ;; ! esac ! ;; esac ! # Now actually substitute the argument into the commands. ! if test -n "$arg"; then ! compile_command="$compile_command $arg" ! finalize_command="$finalize_command $arg" ! fi done if test -n "$prev"; then ! $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 ! $echo "$help" 1>&2 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 ! $echo "$help" 1>&2 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//'` ! libname=`eval \\$echo \"$libname_spec\"` # All the library-specific variables (install_libdir is set above). library_names= *************** *** 611,630 **** age=0 if test -n "$objs"; then ! echo "$progname: 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 "$progname: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2 ! exit 1 fi ! if test -z "$install_libdir"; then ! echo "$progname: you must specify an installation directory with \`-rpath'" 1>&2 ! exit 1 fi # Parse the version information argument. IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' --- 854,887 ---- 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=':' *************** *** 632,640 **** IFS="$save_ifs" if test -n "$5"; then ! echo "$progname: too many parameters to \`-version-info'" 1>&2 ! echo "$help" 1>&2 ! exit 1 fi test -n "$2" && current="$2" --- 889,897 ---- 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" *************** *** 645,677 **** case "$current" in 0 | [1-9] | [1-9][0-9]*) ;; *) ! echo "$progname: CURRENT \`$current' is not a nonnegative integer" 1>&2 ! echo "$progname: \`$vinfo' is not valid version information" 1>&2 exit 1 ! ;; esac case "$revision" in 0 | [1-9] | [1-9][0-9]*) ;; *) ! echo "$progname: REVISION \`$revision' is not a nonnegative integer" 1>&2 ! echo "$progname: \`$vinfo' is not valid version information" 1>&2 exit 1 ! ;; esac case "$age" in 0 | [1-9] | [1-9][0-9]*) ;; *) ! echo "$progname: AGE \`$age' is not a nonnegative integer" 1>&2 ! echo "$progname: \`$vinfo' is not valid version information" 1>&2 exit 1 ! ;; esac if test $age -gt $current; then ! echo "$progname: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 ! echo "$progname: \`$vinfo' is not valid version information" 1>&2 exit 1 fi --- 902,934 ---- 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 *************** *** 681,835 **** 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 "$progname: 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/$libname.*" ! $run $rm $objdir/$libname.* else $show "$mkdir $objdir" ! $run $mkdir $objdir || exit $? 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 "$progname: warning: undefined symbols not allowed in $host shared libraries" 1>&2 ! build_libtool_libs=no ! fi else ! # Clear the flag. ! allow_undefined_flag= fi if test "$build_libtool_libs" = yes; then ! # Get the real and link names of the library. ! library_names=`eval echo \"$library_names_spec\"` ! set dummy $library_names ! realname="$2" ! shift; shift ! if test -n "$soname_spec"; then ! soname=`eval echo \"$soname_spec\"` ! else ! soname="$realname" ! fi ! lib="$objdir/$realname" ! linknames= for link do linknames="$linknames $link" done ! # Use standard objects if they are PIC. ! test -z "$pic_flag" && libobjs=`echo "$libobjs " | sed 's/\.lo /.o /g; s/ $//g'` ! # Do each of the archive commands. ! cmds=`eval echo \"$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 link in $linknames; do ! $show "(cd $objdir && $LN_S $realname $link)" ! $run eval "(cd $objdir && $LN_S $realname $link)" || 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 ;; *.lo | *.o) if test -n "$link_against_libtool_libs"; then ! echo "$progname: error: cannot link libtool libraries into reloadable objects" 1>&2 ! exit 1 fi if test -n "$deplibs"; then ! echo "$progname: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2 fi ! if test -n "$install_libdir"; then ! echo "$progname: warning: \`-rpath' is ignored while creating objects" 1>&2 fi if test -n "$vinfo"; then ! echo "$progname: warning: \`-version-info' is ignored while creating objects" 1>&2 fi case "$output" in *.lo) ! if test -n "$objs"; then ! echo "$progname: cannot build library object \`$output' from non-libtool objects" 1>&2 ! exit 1 ! fi ! libobj="$output" ! obj=`echo "$output" | sed 's/\.lo$/.o/'` ! ;; *) libobj= ! obj="$output" ! ;; esac # Delete the old objects. $run $rm $obj $libobj # Create the old-style object. ! reload_objs="$objs"`echo "$libobjs " | sed 's/[^ ]*\.a //g; s/\.lo /.o /g; s/ $//g'` output="$obj" ! cmds=`eval echo \"$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" --- 938,1115 ---- 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. ! library_names=`eval \\$echo \"$library_names_spec\"` ! set dummy $library_names ! realname="$2" ! shift; shift ! if test -n "$soname_spec"; then ! soname=`eval \\$echo \"$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. ! cmds=`eval \\$echo \"$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" ! cmds=`eval \\$echo \"$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" *************** *** 839,854 **** 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" ! cmds=`eval echo \"$reload_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" --- 1119,1134 ---- 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" ! cmds=`eval \\$echo \"$reload_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" *************** *** 866,979 **** ;; *) ! if test -n "$install_libdir"; then ! echo "$progname: warning: \`-rpath' is ignored while linking programs" 1>&2 fi ! if test -n "$vinfo"; then ! echo "$progname: warning: \`-version-info' is ignored while linking programs" 1>&2 fi ! if test -n "$libobjs"; then ! # Transform all the library objects into standard objects. ! compile_command=`echo "$compile_command " | sed 's/\.lo /.o /g; s/ $//'` ! finalize_command=`echo "$finalize_command " | sed 's/\.lo /.o /g; s/ $//'` fi ! if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then ! # Replace the output file specification. ! compile_command=`echo "$compile_command" | sed 's%@OUTPUT@%'"$output"'%g'` ! finalize_command=`echo "$finalize_command" | sed 's%@OUTPUT@%'"$output"'%g'` ! ! # We have no uninstalled library dependencies, so finalize right now. ! $show "$compile_command" ! $run $compile_command ! status=$? ! # If we failed to link statically, then try again. ! if test $status -ne 0 && test -n "$link_static"; then ! echo "$progname: cannot link \`$output' statically; retrying semi-dynamically" 1>&2 ! compile_command=`echo "$compile_command " | sed "s% $link_static % %;s/ $//"` ! $show "$finalize_command" ! $run $finalize_command status=$? fi ! exit $status fi # Replace the output file specification. ! compile_command=`echo "$compile_command" | sed 's%@OUTPUT@%'"$objdir/$output"'%g'` ! finalize_command=`echo "$finalize_command" | sed '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 || exit $? fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var ! rpath= ! for dir in $temp_rpath; do ! case "$dir" in ! /*) ! # 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 "$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 "$progname: warning: using a buggy system linker" 1>&2 ! echo "$progname: 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. ! echo "creating $output" # 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 ! cat > $output <&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 ! flag=`eval \\$echo \"$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" ! EOF ! 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. *************** *** 981,1076 **** # This wrapper script should never be moved out of \``pwd`'. # If it is, it will not operate correctly. # 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 # Find the directory that this script lives in. ! thisdir=\`echo \$0 | sed 's%/[^/]*$%%'\` ! test "x\$thisdir" = "x\$0" && thisdir=. ! # 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 ! # Run the actual program with our arguments. ! args= ! for arg ! do ! # Quote arguments (to preserve shell metacharacters). ! args="\$args '\$arg'" ! done ! # Export the path to the program. ! PATH="\$progdir:\$PATH" ! export PATH ! EOF ! # Export our shlibpath_var if we have one. ! if test -n "$shlibpath_var" && test -n "$temp_rpath"; then ! cat >> $output <> $output <&2 ! echo "This script is just a wrapper for \$program." 1>&2 ! echo "See the $PACKAGE documentation for more information." 1>&2 exit 1 fi ! fi ! EOF ! chmod +x $output fi exit 0 ;; esac - # See if we need to build an old-fashioned archive. if test "$build_old_libs" = "yes"; then - # Now set the variables for building old libraries. - oldlib="$objdir/$libname.a" - # Transform .lo files to .o files. ! oldobjs="$objs"`echo "$libobjs " | sed 's/[^ ]*\.a //g; s/\.lo /.o /g; s/ $//g'` ! if test -d "$objdir"; then ! $show "$rm $oldlib" ! $run $rm $oldlib else ! $show "$mkdir $objdir" ! $run $mkdir $objdir fi - - # Do each command in the archive commands. - cmds=`eval echo \"$old_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" fi --- 1439,1559 ---- # 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 + # Find the directory that this script lives in. ! thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` ! test \"x\$thisdir\" = \"x\$file\" && thisdir=. ! # Follow symbolic links until we get to the real thisdir. ! file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` ! while test -n \"\$file\"; do ! destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` ! ! # 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 ! file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` ! file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` ! done ! # 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. ! args= ! for arg ! do ! # Quote arguments (to preserve shell metacharacters). ! arg=\`\$echo \"X\$arg\" | \$Xsed -e \"\$sed_quote_subst\"\` ! args=\"\$args \\\"\$arg\\\"\" ! done ! # Export the path to the program. ! PATH=\"\$progdir:\$PATH\" ! export PATH ! eval \"exec \$program \$args\" ! \$echo \"\$0: cannot exec \$program \$args\" ! exit 1 ! fi else # The program doesn't exist. ! \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 ! \$echo \"This script is just a wrapper for \$program.\" 1>&2 ! echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 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 ! cmds=`eval \\$echo \"$old_archive_from_new_cmds\"` else ! cmds=`eval \\$echo \"$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 *************** *** 1081,1093 **** old_library= test "$build_old_libs" = yes && old_library="$libname.a" ! echo "creating $output" # Only create the output if not a dry run. if test -z "$run"; then ! cat > $output < $output \ ! "# $output - a libtool library file ! # Generated by ltmain.sh - GNU $PACKAGE $VERSION # The name that we can dlopen(3). dlname='$dlname' *************** *** 1098,1111 **** # The name of the static archive. old_library='$old_library' # Version information for $libname. current=$current age=$age revision=$revision # Directory that this library needs to be installed in: ! libdir='$install_libdir' ! EOF fi # Do a symbolic link so that the libtool archive can be found in --- 1581,1596 ---- # The name of the static archive. old_library='$old_library' + # Libraries that this one depends upon. + dependency_libs='$dependency_libs' + # Version information for $libname. current=$current 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 *************** *** 1119,1128 **** # libtool install mode install) ! progname="$progname: install" ! # The first argument is the name of the installation program. ! install_prog="$nonopt" # We need to accept at least all the BSD install flags. dest= --- 1604,1638 ---- # libtool install mode 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 ! *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) ! arg="\"$arg\"" ! ;; ! esac ! install_prog="$arg " ! arg="$1" ! shift ! else ! install_prog= ! arg="$nonopt" ! fi ! # The real first argument should be the name of the installation program. ! # Aesthetically quote it. ! arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` ! case "$arg" in ! *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) ! arg="\"$arg\"" ! ;; ! esac ! install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= *************** *** 1136,1143 **** do if test -n "$dest"; then files="$files $dest" ! dest="$arg" ! continue fi case "$arg" in --- 1646,1653 ---- do if test -n "$dest"; then files="$files $dest" ! dest="$arg" ! continue fi case "$arg" in *************** *** 1147,1194 **** -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 install_prog="$install_prog $arg" done if test -z "$install_prog"; then ! echo "$progname: you must specify an install program" 1>&2 ! echo "$help" 1>&2 exit 1 fi if test -n "$prev"; then ! echo "$progname: the \`$prev' option requires an argument" 1>&2 ! echo "$help" 1>&2 exit 1 fi if test -z "$files"; then if test -z "$dest"; then ! echo "$progname: no file or destination specified" 1>&2 else ! echo "$progname: you must specify a destination" 1>&2 fi ! echo "$help" 1>&2 exit 1 fi # Strip any trailing slash from the destination. ! dest=`echo "$dest" | sed 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes --- 1657,1712 ---- -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. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then ! $echo "$modename: you must specify an install program" 1>&2 ! $echo "$help" 1>&2 exit 1 fi if test -n "$prev"; then ! $echo "$modename: the \`$prev' option requires an argument" 1>&2 ! $echo "$help" 1>&2 exit 1 fi 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 fi # Strip any trailing slash from the destination. ! dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes *************** *** 1196,1229 **** destdir="$dest" destname= else ! destdir=`echo "$dest" | sed 's%/[^/]*$%%'` ! test "$destdir" = "$dest" && destdir=. ! destname=`echo "$dest" | sed 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test $# -gt 2; then ! echo "$progname: \`$dest' is not a directory" 1>&2 ! echo "$help" 1>&2 ! exit 1 fi fi case "$destdir" in ! /*) ;; *) for file in $files; do ! case "$file" in ! *.lo) ;; ! *) ! echo "$progname: \`$destdir' must be an absolute directory name" 1>&2 ! echo "$help" 1>&2 ! exit 1 ! ;; ! esac done ;; esac staticlibs= future_libdirs= current_libdirs= --- 1714,1751 ---- destdir="$dest" destname= else ! destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` ! test "X$destdir" = "X$dest" && destdir=. ! destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # 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 + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + staticlibs= future_libdirs= current_libdirs= *************** *** 1232,1300 **** # 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 egrep "^# Generated by $PROGRAM" $file >/dev/null 2>&1; then : ! else ! echo "$progname: \`$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 "$destdir" = "$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 "$file" | sed 's%/[^/]*$%%'`/" ! test "$dir" = "$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= ! ! # Support stripping libraries. ! if test -n "$stripme"; then ! if test -n "$striplib"; then ! $show "$striplib $destdir/$realname" ! $run $striplib $destdir/$realname || exit $? ! else ! echo "$progname: warning: no library stripping program" 1>&2 ! fi ! fi ! if test $# -gt 0; then ! # Delete the old symlinks. rmcmd="$rm" for linkname do --- 1754,1812 ---- # 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 *************** *** 1303,1481 **** $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" ! cmds=`eval echo \"$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 "$file" | sed 's%^.*/%%'` ! $show "$install_prog $file $destdir/$name" ! $run $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 "$file" | sed 's%^.*/%%;'` ! destfile="$destdir/$destfile" fi ! # Deduce the name of the destination old-style object file. ! case "$destfile" in ! *.lo) ! staticdest=`echo "$destfile" | sed 's/\.lo$/\.o/;'` ! ;; ! *.o) ! staticdest="$destfile" ! destfile= ! ;; ! *) ! echo "$progname: 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 $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 "$file" | sed 's/\.lo$/\.o/;'` ! $show "$install_prog $staticobj $staticdest" ! $run $install_prog $staticobj $staticdest || exit $? ! fi ! exit 0 ! ;; *) ! # Do a test to see if this is really a libtool program. ! if egrep "^# Generated by $PROGRAM" $file >/dev/null 2>&1; then ! # This variable tells wrapper scripts just to set variables rather ! # than running their programs. ! libtool_install_magic="$magic" ! 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 "$progname: 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 "$lib" | sed 's%^.*/%%g'`" ! if test -z "$libdir"; then ! echo "$progname: warning: \`$lib' contains no -rpath information" 1>&2 ! elif test -f "$libfile"; then : ! else ! echo "$progname: 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 "$progname: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2 ! $show "$finalize_command" ! if $run $finalize_command; then : ! else ! echo "$progname: error: relink \`$file' with the above command before installing it" 1>&2 ! continue ! fi ! file="$objdir/$file"T ! else ! echo "$progname: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2 ! fi ! else ! # Install the binary that we compiled earlier. ! dir=`echo "$file" | sed 's%/[^/]*$%%'` ! if test "$file" = "$dir"; then ! file="$objdir/$file" ! else ! file="$dir/$objdir/`echo "$file" | sed 's%^.*/%%'`" ! fi ! fi ! fi ! $show "$install_prog$stripme $file $dest" ! $run $install_prog$stripme $file $dest || exit $? ! ;; esac done for file in $staticlibs; do ! name=`echo "$file" | sed 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" ! $run $install_prog $file $oldlib || exit $? ! ! # Support stripping libraries. ! if test -n "$stripme"; then ! if test -n "$old_striplib"; then ! $show "$old_striplib $oldlib" ! $run $old_striplib $oldlib || exit $? ! else ! echo "$progname: warning: no static library stripping program" 1>&2 ! fi ! fi # Do each command in the postinstall commands. ! cmds=`eval echo \"$old_postinstall_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" --- 1815,1975 ---- $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" ! cmds=`eval \\$echo \"$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 for file in $staticlibs; do ! name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" ! $run eval "$install_prog \$file \$oldlib" || exit $? # Do each command in the postinstall commands. ! cmds=`eval \\$echo \"$old_postinstall_cmds\"` IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' for cmd in $cmds; do IFS="$save_ifs" *************** *** 1486,1591 **** done if test -n "$future_libdirs"; then ! echo "$progname: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" ! exec $0 --finish$current_libdirs exit 1 fi exit 0 ;; ! # libtool dlname mode ! dlname) ! progname="$progname: dlname" ! ltlibs="$nonopt" ! for lib ! do ! ltlibs="$ltlibs $lib" done ! if test -z "$ltlibs"; then ! echo "$progname: you must specify at least one LTLIBRARY" 1>&2 ! echo "$help" 1>&2 ! exit 1 fi ! # Now check to make sure each one is a valid libtool library. ! status=0 ! for lib in $ltlibs; do ! dlname= ! libdir= ! library_names= ! # Check to see that this really is a libtool archive. ! if egrep "^# Generated by $PROGRAM" $arg >/dev/null 2>&1; then : else ! echo "$progname: \`$arg' is not a valid libtool archive" 1>&2 ! status=1 ! continue fi ! # If there is no directory component, then add one. ! case "$arg" in ! */*) . $arg ;; ! *) . ./$arg ;; esac ! if test -z "$libdir"; then ! echo "$progname: \`$arg' contains no -rpath information" 1>&2 ! status=1 ! elif test -n "$dlname"; then ! echo "$libdir/$dlname" ! elif test -z "$library_names"; then ! echo "$progname: \`$arg' is not a shared library" 1>&2 ! status=1 else ! echo "$progname: \`$arg' was not linked with \`-export-dynamic'" 1>&2 ! status=1 fi done - exit $status - ;; ! # libtool finish mode ! finish) ! progname="$progname: finish" ! libdirs="$nonopt" ! if test -n "$finish_cmds" && test -n "$libdirs"; then ! for dir ! do ! libdirs="$libdirs $dir" ! done ! for libdir in $libdirs; do ! # Do each command in the postinstall commands. ! cmds=`eval echo \"$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" ! done ! fi ! echo "To link against installed libraries in LIBDIR, users may have to:" ! if test -n "$shlibpath_var"; then ! echo " - add LIBDIR to their \`$shlibpath_var' environment variable" fi - echo " - use the \`-LLIBDIR' linker flag" - exit 0 ;; # libtool uninstall mode uninstall) ! progname="$progname: uninstall" rm="$nonopt" files= --- 1980,2197 ---- done if test -n "$future_libdirs"; then ! $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" ! exec $SHELL $0 --finish$current_libdirs exit 1 fi exit 0 ;; ! # libtool finish mode ! 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. ! cmds=`eval \\$echo \"$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. ! cmds=`eval \\$echo \"$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" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + flag=`eval \\$echo \"$hardcode_libdir_flag_spec\"` ! 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 + ;; ! # libtool execute mode ! execute) ! modename="$modename: execute" ! ! # The first argument is the command name. ! cmd="$nonopt" ! if test -z "$cmd"; then ! $echo "$modename: you must specify a COMMAND" 1>&2 ! $echo "$help" ! exit 1 ! fi ! # 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 fi ! 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. ! if test -z "$dlname"; then ! # Warn if it was a shared library. ! test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" ! continue ! fi ! ! dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` ! test "X$dir" = "X$file" && dir=. ! ! if test -f "$dir/$objdir/$dlname"; then ! dir="$dir/$objdir" ! else ! $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 ! exit 1 ! fi ! ;; ! ! *.lo) ! # Just add the directory containing the .lo file. ! dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` ! test "X$dir" = "X$file" && dir=. ! ;; ! ! *) ! $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 ! continue ! ;; esac ! # Get the absolute pathname. ! absdir=`cd "$dir" && pwd` ! test -n "$absdir" && dir="$absdir" ! ! # Now add the directory to shlibpath_var. ! if eval "test -z \"\$$shlibpath_var\""; then ! eval "$shlibpath_var=\"\$dir\"" else ! eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done ! # This variable tells wrapper scripts just to set shlibpath_var ! # rather than running their programs. ! libtool_execute_magic="$magic" ! # Check if any of the arguments is a wrapper script. ! args= ! for file ! do ! 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 ;; ! *) . ./$file ;; ! esac ! # 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"` ! args="$args \"$file\"" ! done ! if test -z "$run"; then ! # Export the shlibpath_var. ! eval "export $shlibpath_var" ! ! # Now actually exec the command. ! eval "exec \$cmd$args" ! ! $echo "$modename: cannot exec \$cmd$args" ! exit 1 ! else ! # Display what would be done. ! eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" ! $echo "export $shlibpath_var" ! $echo "$cmd$args" ! exit 0 fi ;; # libtool uninstall mode uninstall) ! modename="$modename: uninstall" rm="$nonopt" files= *************** *** 1598,1663 **** done if test -z "$rm"; then ! echo "$progname: you must specify an RM program" 1>&2 ! echo "$help" 1>&2 exit 1 fi for file in $files; do ! dir=`echo "$file" | sed -e 's%/[^/]*$%%'` ! test "$dir" = "$file" && dir=. ! name=`echo "$file" | sed -e 's%^.*/%%'` rmfiles="$file" case "$name" in *.la) ! # Possibly a libtool archive, so verify it. ! if egrep "^# Generated by $PROGRAM" $file >/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" ! # FIXME: should reinstall the best remaining shared library. ! fi ! ;; *.lo) ! if test "$build_old_libs" = yes; then ! oldobj=`echo "$name" | sed 's/\.lo$/\.o/'` ! rmfiles="$rmfiles $dir/$oldobj" ! fi ! ;; ! esac ! $show "$rm $rmfiles" ! $run $rm $rmfiles done exit 0 ;; ! NONE) ! echo "$progname: you must specify a MODE" 1>&2 ! echo "$generic_help" 1>&2 exit 1 ;; esac ! echo "$progname: invalid operation mode \`$mode'" 1>&2 ! echo "$generic_help" 1>&2 exit 1 fi # test -z "$show_help" # We need to display help for each of the modes. case "$mode" in ! NONE) cat <&2 ! $echo "$help" 1>&2 exit 1 fi for file in $files; do ! dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` ! test "X$dir" = "X$file" && dir=. ! name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` rmfiles="$file" 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 ! ! if test -n "$library_names"; then ! # Do each command in the postuninstall commands. ! cmds=`eval \\$echo \"$postuninstall_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 "$old_library"; then ! # Do each command in the old_postuninstall commands. ! cmds=`eval \\$echo \"$old_postuninstall_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 ! ! # 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 done exit 0 ;; ! "") ! $echo "$modename: you must specify a MODE" 1>&2 ! $echo "$generic_help" 1>&2 exit 1 ;; esac ! $echo "$modename: invalid operation mode \`$mode'" 1>&2 ! $echo "$generic_help" 1>&2 exit 1 fi # test -z "$show_help" # We need to display help for each of the modes. case "$mode" in ! "") $echo \ ! "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. *************** *** 1666,1690 **** --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --version print version information MODE must be one of the following: compile compile a source file into a libtool object ! dlname print filenames to use to \`dlopen' libtool libraries finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory ! MODE-ARGS vary depending on the MODE. Try \`$progname --help --mode=MODE' for ! a more detailed description of MODE. ! EOF ;; compile) ! cat <&2 ! echo "$help" 1>&2 exit 1 ;; esac ! case "$mode" in ! archive|compile) ! echo ! echo "Try \`$progname --help' for more information about other modes." ! ;; ! esac exit 0 --- 2433,2450 ---- to RM. If FILE is a libtool library, all the files associated with it are deleted. ! Otherwise, only FILE itself is deleted using RM." ;; *) ! $echo "$modename: invalid operation mode \`$mode'" 1>&2 ! $echo "$help" 1>&2 exit 1 ;; esac ! echo ! $echo "Try \`$modename --help' for more information about other modes." exit 0 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/ltmain.sh.in libtool-1.1/ltmain.sh.in *** libtool-1.0/ltmain.sh.in Thu Jul 3 01:13:42 1997 --- libtool-1.1/ltmain.sh.in Thu Jan 1 00:00:00 1970 *************** *** 1,1813 **** - # ltmain.sh - Provide generalized library-building support services. - # @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 - # 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. - - # The name of this program. - progname=`echo "$0" | sed 's%^.*/%%'` - - # Constants. - PROGRAM=ltmain.sh - PACKAGE=@PACKAGE@ - VERSION=@VERSION@ - - default_mode= - help="Try \`$progname --help' for more information." - magic="%%%MAGIC variable%%%" - mkdir="mkdir" - mv="mv -f" - objdir=.libs - rm="rm -f" - - if test "$LTCONFIG_VERSION" != "$VERSION"; then - echo "$progname: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 - fi - - # - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - echo "$progname: not configured to build any kind of library" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 - fi - - # Global variables. - mode=$default_mode - nonopt= - prev= - prevopt= - run= - show=echo - show_help= - - # Parse our command line options once, thoroughly. - while test $# -gt 0 - do - arg="$1" - shift - - case "$arg" in - -*=*) optarg=`echo "$arg" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - eval "$prev=\$arg" - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case "$arg" in - --help) - show_help=yes - ;; - - --version) - echo "$PROGRAM (GNU $PACKAGE) $VERSION" - exit 0 - ;; - - --dry-run | -n) - run=: - ;; - - --features) - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - exit 0 - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - -*) - echo "$progname: unrecognized option \`$arg'" 1>&2 - echo "$help" 1>&2 - exit 1 - ;; - - *) - nonopt="$arg" - break - ;; - esac - done - - - if test -n "$prevopt"; then - echo "$progname: option \`$prevopt' requires an argument" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - - if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - case "$nonopt" in - *cc) - mode=link - for arg - do - case "$arg" in - -c) - mode=compile - break - ;; - esac - done - ;; - *install*|cp) - mode=install - ;; - *rm) - mode=uninstall - ;; - *.la) - mode=dlname - ;; - *) - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - echo "$progname: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - echo "$progname: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case "$mode" in - # libtool compile mode - compile) - progname="$progname: compile" - # Get the compilation command and the source file. - base_compile="$nonopt" - lastarg= - srcfile= - - for arg - do - # Quote any args containing shell metacharacters. - case "$arg" in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*|*\"*) - quote_arg="'$arg'" ;; - *) quote_arg="$arg" ;; - esac - - base_compile="$base_compile$lastarg" - srcfile="$quote_arg" - lastarg=" $srcfile" - done - - # Get the name of the library object. - libobj=`echo "$srcfile" | sed -e 's%^.*/%%'` - - # Recognize several different file suffixes. - xform='[cCFSf]' - case "$libobj" in - *.c++) xform='c++' ;; - *.cc) xform=cc ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform='for' ;; - esac - - libobj=`echo "$libobj" | sed -e "s/\.$xform$/.lo/"` - - case "$libobj" in - *.lo) obj=`echo "$libobj" | sed -e 's/\.lo$/.o/'` ;; - *) - echo "$progname: cannot determine name of library object from \`$srcfile'" 1>&2 - exit 1 - ;; - esac - - if test -z "$base_compile"; then - echo "$progname: you must specify a compilation command" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - # 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. - if test "$build_libtool_libs" = yes; then - # 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 - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - $show "$base_compile $srcfile" - if $run eval "$base_compile $srcfile"; then : - else - $run $rm $obj $libobj - exit 1 - fi - fi - - # Create an invalid libtool object if no PIC, so that we don't 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 - ;; - - # libtool link mode - link) - progname="$progname: link" - # Go through the arguments, transforming them on the way. - cc="$nonopt" - args="$cc" - allow_undefined=no - compile_command="$cc" - finalize_command="$cc" - compile_shlibpath= - finalize_shlibpath= - deplibs= - export_dynamic=no - hardcode_libdirs= - install_libdir= - libobjs= - link_against_libtool_libs= - link_static= - ltlibs= - objs= - prev= - prevarg= - perm_rpath= - temp_rpath= - vinfo= - - # We need to know -static, to get the right output filenames. - for arg - do - case "$arg" in - -static) - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - 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@" - args="$args $arg" - ;; - esac - - eval "$prev=\$arg" - prev= - - continue - fi - - args="$args $arg" - prevarg="$arg" - - case "$arg" in - -allow-undefined) allow_undefined=yes ;; - - -export-dynamic) - export_dynamic=yes - compile_command="$compile_command $export_dynamic_flag" - finalize_command="$finalize_command $export_dynamic_flag" - continue - ;; - - -L*) - dir=`echo "$arg" | sed 's%^-L\(.*\)$%\1%'` - case "$dir" in - /*) - ;; - *) - echo "$progname: \`-L$dir' cannot specify a relative directory" 1>&2 - exit 1 - ;; - esac - deplibs="$deplibs $arg" - ;; - - -l*) deplibs="$deplibs $arg" ;; - - -o) prev=output ;; - - -rpath) - prev=install_libdir - continue - ;; - - -static) - link_static="`eval echo \"$link_static_flag\"`" - compile_command="$compile_command $link_static" - continue - ;; - - -version-file) - echo "$progname: \`-version-file' has been replaced by \`-version-info'" 1>&2 - echo "$help" 1>&2 - exit 1 - ;; - - -version-info) - prev=vinfo - continue - ;; - - -*) cc="$cc $arg" ;; # Some other compiler flag. - - *.o) - # A standard object. - objs="$objs $arg" - ;; - - *.a) - # Find the relevant object directory and library name. - file=`echo "$arg" | sed 's%^.*/%%'` - dir=`echo "$arg" | sed 's%/[^/]*$%/%'` - test "$dir" = "$arg" && dir= - - # Standard archive. - objs="$objs $arg" - ;; - - *.lo) - # A library object. - libobjs="$libobjs $arg" - ;; - - *.la) - # A libtool-controlled library. - - libdir= - library_names= - old_library= - - # Check to see that this really is a libtool archive. - if egrep "^# Generated by $PROGRAM" $arg >/dev/null 2>&1; then : - else - echo "$progname: \`$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 "$progname: \`$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 "$progname: cannot find name of link library for \`$arg'" 1>&2 - exit 1 - fi - - # Find the relevant object directory and library name. - name=`echo "$arg" | sed 's%^.*/%%; s/\.la$//; s/^lib//'` - dir=`echo "$arg" | sed 's%/[^/]*$%%'` - if test "$dir" = "$arg"; then - dir="$objdir" - else - dir="$dir/$objdir" - 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 - - 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 libdirs. - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - libdir= - fi - fi - - if test -n "$libdir"; then - hardcode_libdir_flag=`eval echo \"$hardcode_libdir_flag_spec\"` - compile_command="$compile_command $hardcode_libdir_flag" - finalize_command="$finalize_command $hardcode_libdir_flag" - fi - elif test "$hardcode_runpath_var" = yes; 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 - /*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - echo "$progname: 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 "$progname: \`$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 can't 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 "$progname: cannot find static library for \`$arg'" 1>&2 - exit 1 - fi - test -n "$old_library" && linklib="$old_library" - compile_command="$compile_command $dir/$linklib" - finalize_command="$finalize_command $dir/$linklib" - fi - continue - ;; - - *) - echo "$progname: unknown file suffix for \`$arg'" 1>&2 - echo "$help" 1>&2 - exit 1 - ;; - esac - - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - done - - if test -n "$prev"; then - echo "$progname: the \`$prevarg' option requires an argument" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - # Substitute the hardcoded libdirs into the compile commands. - if test "$hardcode_libdir_colon_separated" = yes; then - compile_command=`echo "$compile_command" | sed "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` - finalize_command=`echo "$finalize_command" | sed "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` - fi - - oldlib= - oldobjs= - case "$output" in - "") - echo "$progname: you must specify an output file" 1>&2 - echo "$help" 1>&2 - exit 1 - ;; - - */*) - echo "$progname: output file \`$output' must have no directory components" 1>&2 - exit 1 - ;; - - *.la) - libname=`echo "$output" | sed 's/\.la$//'` - - # 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 "$progname: 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 "$progname: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2 - exit 1 - fi - - if test -z "$install_libdir"; then - echo "$progname: you must specify an installation directory with \`-rpath'" 1>&2 - exit 1 - fi - - # Parse the version information argument. - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' - set dummy $vinfo - IFS="$save_ifs" - - if test -n "$5"; then - echo "$progname: 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 "$progname: CURRENT \`$current' is not a nonnegative integer" 1>&2 - echo "$progname: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case "$revision" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - echo "$progname: REVISION \`$revision' is not a nonnegative integer" 1>&2 - echo "$progname: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case "$age" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - echo "$progname: AGE \`$age' is not a nonnegative integer" 1>&2 - echo "$progname: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - if test $age -gt $current; then - echo "$progname: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - echo "$progname: \`$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 "$progname: 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/$libname.*" - $run $rm $objdir/$libname.* - else - $show "$mkdir $objdir" - $run $mkdir $objdir || exit $? - 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 "$progname: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - fi - else - # Clear the flag. - allow_undefined_flag= - fi - - if test "$build_libtool_libs" = yes; then - # Get the real and link names of the library. - library_names=`eval echo \"$library_names_spec\"` - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - soname=`eval echo \"$soname_spec\"` - else - soname="$realname" - fi - - lib="$objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are PIC. - test -z "$pic_flag" && libobjs=`echo "$libobjs " | sed 's/\.lo /.o /g; s/ $//g'` - - # Do each of the archive commands. - cmds=`eval echo \"$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 link in $linknames; do - $show "(cd $objdir && $LN_S $realname $link)" - $run eval "(cd $objdir && $LN_S $realname $link)" || 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 - ;; - - *.lo | *.o) - if test -n "$link_against_libtool_libs"; then - echo "$progname: error: cannot link libtool libraries into reloadable objects" 1>&2 - exit 1 - fi - - if test -n "$deplibs"; then - echo "$progname: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2 - fi - - if test -n "$install_libdir"; then - echo "$progname: warning: \`-rpath' is ignored while creating objects" 1>&2 - fi - - if test -n "$vinfo"; then - echo "$progname: warning: \`-version-info' is ignored while creating objects" 1>&2 - fi - - case "$output" in - *.lo) - if test -n "$objs"; then - echo "$progname: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit 1 - fi - libobj="$output" - obj=`echo "$output" | sed 's/\.lo$/.o/'` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Create the old-style object. - reload_objs="$objs"`echo "$libobjs " | sed 's/[^ ]*\.a //g; s/\.lo /.o /g; s/ $//g'` - - output="$obj" - cmds=`eval echo \"$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" - - # Exit if we aren't doing a library object file. - 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" - cmds=`eval echo \"$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 "$install_libdir"; then - echo "$progname: warning: \`-rpath' is ignored while linking programs" 1>&2 - fi - - if test -n "$vinfo"; then - echo "$progname: warning: \`-version-info' is ignored while linking programs" 1>&2 - fi - - if test -n "$libobjs"; then - # Transform all the library objects into standard objects. - compile_command=`echo "$compile_command " | sed 's/\.lo /.o /g; s/ $//'` - finalize_command=`echo "$finalize_command " | sed 's/\.lo /.o /g; s/ $//'` - fi - - if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`echo "$compile_command" | sed 's%@OUTPUT@%'"$output"'%g'` - finalize_command=`echo "$finalize_command" | sed 's%@OUTPUT@%'"$output"'%g'` - - # We have no uninstalled library dependencies, so finalize right now. - $show "$compile_command" - $run $compile_command - status=$? - - # If we failed to link statically, then try again. - if test $status -ne 0 && test -n "$link_static"; then - echo "$progname: cannot link \`$output' statically; retrying semi-dynamically" 1>&2 - compile_command=`echo "$compile_command " | sed "s% $link_static % %;s/ $//"` - $show "$finalize_command" - $run $finalize_command - status=$? - fi - exit $status - fi - - # Replace the output file specification. - compile_command=`echo "$compile_command" | sed 's%@OUTPUT@%'"$objdir/$output"'%g'` - finalize_command=`echo "$finalize_command" | sed '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 || exit $? - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case "$dir" in - /*) - # 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 "$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 "$progname: warning: using a buggy system linker" 1>&2 - echo "$progname: 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. - echo "creating $output" - - # 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 - - cat > $output <> $output <> $output <&2 - echo "This script is just a wrapper for \$program." 1>&2 - echo "See the $PACKAGE documentation for more information." 1>&2 - exit 1 - fi - fi - EOF - chmod +x $output - fi - exit 0 - ;; - esac - - - # See if we need to build an old-fashioned archive. - if test "$build_old_libs" = "yes"; then - # Now set the variables for building old libraries. - oldlib="$objdir/$libname.a" - - # Transform .lo files to .o files. - oldobjs="$objs"`echo "$libobjs " | sed 's/[^ ]*\.a //g; s/\.lo /.o /g; s/ $//g'` - - if test -d "$objdir"; then - $show "$rm $oldlib" - $run $rm $oldlib - else - $show "$mkdir $objdir" - $run $mkdir $objdir - fi - - # Do each command in the archive commands. - cmds=`eval echo \"$old_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" - fi - - # Now create the libtool archive. - case "$output" in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.a" - - echo "creating $output" - - # Only create the output if not a dry run. - if test -z "$run"; then - cat > $output <&2 - echo "$help" 1>&2 - exit 1 - fi - - if test -n "$prev"; then - echo "$progname: the \`$prev' option requires an argument" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - if test -z "$files"; then - if test -z "$dest"; then - echo "$progname: no file or destination specified" 1>&2 - else - echo "$progname: you must specify a destination" 1>&2 - fi - echo "$help" 1>&2 - exit 1 - fi - - # Strip any trailing slash from the destination. - dest=`echo "$dest" | sed 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test -n "$isdir"; then - destdir="$dest" - destname= - else - destdir=`echo "$dest" | sed 's%/[^/]*$%%'` - test "$destdir" = "$dest" && destdir=. - destname=`echo "$dest" | sed 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test $# -gt 2; then - echo "$progname: \`$dest' is not a directory" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - fi - case "$destdir" in - /*) ;; - *) - for file in $files; do - case "$file" in - *.lo) ;; - *) - echo "$progname: \`$destdir' must be an absolute directory name" 1>&2 - echo "$help" 1>&2 - exit 1 - ;; - esac - done - ;; - esac - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # 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 egrep "^# Generated by $PROGRAM" $file >/dev/null 2>&1; then : - else - echo "$progname: \`$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 "$destdir" = "$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 "$file" | sed 's%/[^/]*$%%'`/" - test "$dir" = "$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= - - # Support stripping libraries. - if test -n "$stripme"; then - if test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run $striplib $destdir/$realname || exit $? - else - echo "$progname: warning: no library stripping program" 1>&2 - fi - fi - - 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" - cmds=`eval echo \"$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 "$file" | sed 's%^.*/%%'` - $show "$install_prog $file $destdir/$name" - $run $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 "$file" | sed 's%^.*/%%;'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case "$destfile" in - *.lo) - staticdest=`echo "$destfile" | sed 's/\.lo$/\.o/;'` - ;; - *.o) - staticdest="$destfile" - destfile= - ;; - *) - echo "$progname: 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 $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 "$file" | sed 's/\.lo$/\.o/;'` - - $show "$install_prog $staticobj $staticdest" - $run $install_prog $staticobj $staticdest || exit $? - fi - exit 0 - ;; - - *) - # Do a test to see if this is really a libtool program. - if egrep "^# Generated by $PROGRAM" $file >/dev/null 2>&1; then - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - 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 "$progname: 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 "$lib" | sed 's%^.*/%%g'`" - if test -z "$libdir"; then - echo "$progname: warning: \`$lib' contains no -rpath information" 1>&2 - elif test -f "$libfile"; then : - else - echo "$progname: 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 "$progname: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2 - $show "$finalize_command" - if $run $finalize_command; then : - else - echo "$progname: error: relink \`$file' with the above command before installing it" 1>&2 - continue - fi - file="$objdir/$file"T - else - echo "$progname: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2 - fi - else - # Install the binary that we compiled earlier. - dir=`echo "$file" | sed 's%/[^/]*$%%'` - if test "$file" = "$dir"; then - file="$objdir/$file" - else - file="$dir/$objdir/`echo "$file" | sed 's%^.*/%%'`" - fi - fi - fi - - $show "$install_prog$stripme $file $dest" - $run $install_prog$stripme $file $dest || exit $? - ;; - esac - done - - for file in $staticlibs; do - name=`echo "$file" | sed 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run $install_prog $file $oldlib || exit $? - - # Support stripping libraries. - if test -n "$stripme"; then - if test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run $old_striplib $oldlib || exit $? - else - echo "$progname: warning: no static library stripping program" 1>&2 - fi - fi - - # Do each command in the postinstall commands. - cmds=`eval echo \"$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 - - if test -n "$future_libdirs"; then - echo "$progname: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec $0 --finish$current_libdirs - exit 1 - fi - - exit 0 - ;; - - # libtool dlname mode - dlname) - progname="$progname: dlname" - ltlibs="$nonopt" - for lib - do - ltlibs="$ltlibs $lib" - done - - if test -z "$ltlibs"; then - echo "$progname: you must specify at least one LTLIBRARY" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - # Now check to make sure each one is a valid libtool library. - status=0 - for lib in $ltlibs; do - dlname= - libdir= - library_names= - - # Check to see that this really is a libtool archive. - if egrep "^# Generated by $PROGRAM" $arg >/dev/null 2>&1; then : - else - echo "$progname: \`$arg' is not a valid libtool archive" 1>&2 - status=1 - continue - fi - - # If there is no directory component, then add one. - case "$arg" in - */*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$libdir"; then - echo "$progname: \`$arg' contains no -rpath information" 1>&2 - status=1 - elif test -n "$dlname"; then - echo "$libdir/$dlname" - elif test -z "$library_names"; then - echo "$progname: \`$arg' is not a shared library" 1>&2 - status=1 - else - echo "$progname: \`$arg' was not linked with \`-export-dynamic'" 1>&2 - status=1 - fi - done - exit $status - ;; - - # libtool finish mode - finish) - progname="$progname: finish" - libdirs="$nonopt" - - if test -n "$finish_cmds" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - # Do each command in the postinstall commands. - cmds=`eval echo \"$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" - done - fi - - echo "To link against installed libraries in LIBDIR, users may have to:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to their \`$shlibpath_var' environment variable" - fi - echo " - use the \`-LLIBDIR' linker flag" - exit 0 - ;; - - # libtool uninstall mode - uninstall) - progname="$progname: uninstall" - rm="$nonopt" - files= - - for arg - do - case "$arg" in - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - echo "$progname: you must specify an RM program" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - for file in $files; do - dir=`echo "$file" | sed -e 's%/[^/]*$%%'` - test "$dir" = "$file" && dir=. - name=`echo "$file" | sed -e 's%^.*/%%'` - - rmfiles="$file" - - case "$name" in - *.la) - # Possibly a libtool archive, so verify it. - if egrep "^# Generated by $PROGRAM" $file >/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" - - # FIXME: should reinstall the best remaining shared library. - fi - ;; - - *.lo) - if test "$build_old_libs" = yes; then - oldobj=`echo "$name" | sed 's/\.lo$/\.o/'` - rmfiles="$rmfiles $dir/$oldobj" - fi - ;; - esac - - $show "$rm $rmfiles" - $run $rm $rmfiles - done - exit 0 - ;; - - NONE) - echo "$progname: you must specify a MODE" 1>&2 - echo "$generic_help" 1>&2 - exit 1 - ;; - esac - - echo "$progname: invalid operation mode \`$mode'" 1>&2 - echo "$generic_help" 1>&2 - exit 1 - fi # test -z "$show_help" - - # We need to display help for each of the modes. - case "$mode" in - NONE) cat <&2 - echo "$help" 1>&2 - exit 1 - ;; - esac - - case "$mode" in - archive|compile) - echo - echo "Try \`$progname --help' for more information about other modes." - ;; - esac - - exit 0 - - # Local Variables: - # mode:shell-script - # sh-indentation:2 - # End: --- 0 ---- diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/ChangeLog libtool-1.1/tests/ChangeLog *** libtool-1.0/tests/ChangeLog Mon Jun 30 12:50:01 1997 --- libtool-1.1/tests/ChangeLog Mon Mar 9 04:13:54 1998 *************** *** 1,10 **** ! Mon Jun 30 06:49:13 1997 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. ! Thu Jun 19 14:31:49 1997 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 --- 1,119 ---- ! 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 *************** *** 17,23 **** directory is not cleaned up if a user uses their own config.cache. Reported by Joel Weber. ! Wed Apr 16 19:21:00 1997 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 --- 126,132 ---- 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 *************** *** 26,37 **** Also redirect stderr to /dev/null, so that AIX users don't get worried by `fgrep: Maximum line length of 2048 exceeded.'. ! Tue Apr 1 12:48:32 1997 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. ! Mon Feb 3 15:17:18 1997 Gordon Matzigkeit * Makefile.am (TESTS): Do the full make sequence with --disable-shared, then without. --- 135,146 ---- 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. *************** *** 39,56 **** * demo-sttc.test: Configure the demo directory with --disable-shared. ! Wed Jan 29 14:02:03 1997 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. ! Tue Jan 28 14:00:23 1997 Gordon Matzigkeit * hardcode.test: Make sure that ../demo/libhello.la really is a shared library before running hardcoding tests. ! Sat Jan 18 10:33:21 1997 Gordon Matzigkeit * demo-conf.test: Use the CONFIG_SHELL environment variable when running configure in the demo directory. From Bruno Haible. --- 148,165 ---- * 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. *************** *** 62,68 **** * demo-make.test: Fix typo (use $make instead of make). Reported by Akim Demaille. ! Thu Jan 16 21:43:18 1997 Gordon Matzigkeit * tlibtool: Rewrote to grab all the settings from the generated libtool script. --- 171,177 ---- * 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. *************** *** 70,76 **** * hardcode.test: Make allowances if shlibpath_var cannot be used to find libraries at link time, such as on AIX. ! Tue Jan 14 09:17:27 1997 Gordon Matzigkeit * demo-conf.test, demo-inst.test, demo-unst.test, hardcode.test: Use $make instead of make. --- 179,185 ---- * 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. *************** *** 82,93 **** files beginning with a dot, as egrep -v doesn't seem to do the trick. Reported by Bruno Haible. ! Mon Jan 13 14:01:17 1997 Gordon Matzigkeit * hardcode.test: Added a test to make sure that libtool's idea of hardcoding system linkers is correct. ! Fri Jan 3 23:15:22 1997 Gordon Matzigkeit * Makefile.am (distclean-local): Remove all files that the tests may have created. Reported by Bruno Haible. --- 191,202 ---- 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. *************** *** 99,110 **** files beginning with a dot, since spurious .nfsXXX files may be present when running NFS. Reported by Bruno Haible. ! Thu Jan 2 13:03:41 1997 Gordon Matzigkeit * suffix.test: New test to guarantee that libtool compile ! recognizes valid source file suffixes. ! Sun Dec 8 14:43:15 1996 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 --- 208,219 ---- 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 *************** *** 113,126 **** * link-2.test: Test to make sure that .lo files don't get built directly into programs. ! Sat Dec 7 15:44:49 1996 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. ! Mon Dec 2 16:31:10 1996 Gordon Matzigkeit * demo.test: Try compiling the ../demo subdirectory, with no special options. --- 222,235 ---- * 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. diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/Makefile.am libtool-1.1/tests/Makefile.am *** libtool-1.0/tests/Makefile.am Mon Jun 30 12:48:25 1997 --- libtool-1.1/tests/Makefile.am Mon Mar 9 04:12:51 1998 *************** *** 4,15 **** makesequence = demo-make.test demo-exec.test \ demo-inst.test demo-unst.test hardcode.test ! TESTS = assign.test demo-conf.test $(makesequence) \ ! if.test link.test link-2.test suffix.test test-e.test ! EXTRA_DIST = defs tlibtool $(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 --- 4,19 ---- 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 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/Makefile.in libtool-1.1/tests/Makefile.in *** libtool-1.0/tests/Makefile.in Tue Jul 8 19:54:29 1997 --- libtool-1.1/tests/Makefile.in Mon Mar 9 05:31:17 1998 *************** *** 51,61 **** --- 51,63 ---- POST_UNINSTALL = true host_alias = @host_alias@ host_triplet = @host@ + AWK = @AWK@ CC = @CC@ LD = @LD@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ + NM = @NM@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ *************** *** 66,75 **** makesequence = demo-make.test demo-exec.test \ demo-inst.test demo-unst.test hardcode.test ! TESTS = assign.test demo-conf.test $(makesequence) \ ! if.test link.test link-2.test suffix.test test-e.test ! EXTRA_DIST = defs tlibtool $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DIST_COMMON = ChangeLog Makefile.am Makefile.in --- 68,81 ---- 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) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DIST_COMMON = ChangeLog Makefile.am Makefile.in *************** *** 186,192 **** # We need to remove any files that the above tests created. clean-local: -test -f ../demo/Makefile && cd ../demo && $(MAKE) distclean ! rm -rf =inst # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- 192,198 ---- # We need to remove any files that the above tests created. clean-local: -test -f ../demo/Makefile && cd ../demo && $(MAKE) distclean ! rm -rf _inst # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/assign.test libtool-1.1/tests/assign.test *** libtool-1.0/tests/assign.test Sun Jun 22 19:57:12 1997 --- libtool-1.1/tests/assign.test Thu Jan 1 00:00:00 1970 *************** *** 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 --- 0 ---- diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/defs libtool-1.1/tests/defs *** libtool-1.0/tests/defs Tue Apr 1 18:59:30 1997 --- libtool-1.1/tests/defs Mon Mar 9 04:11:26 1998 *************** *** 4,21 **** # Check that srcdir is set to an absolute path. case "$srcdir" in ! /*) ;; *) srcdir=`cd $srcdir && pwd` ;; esac progname=`echo "$0" | sed 's%^.*/%%'` ! # tlibtool needs to know what srcdir is. ! export srcdir ! libtool="$srcdir/tlibtool" make="${MAKE-make}" ! prefix="./=inst" if test "$need_prefix" = yes; then # An absolute path to a test installation directory. test -d $prefix || mkdir $prefix --- 4,19 ---- # Check that srcdir is set to an absolute path. case "$srcdir" in ! /* | [A-Za-z]:\\*) ;; *) srcdir=`cd $srcdir && pwd` ;; esac progname=`echo "$0" | sed 's%^.*/%%'` ! libtool="../libtool" make="${MAKE-make}" ! prefix="./_inst" if test "$need_prefix" = yes; then # An absolute path to a test installation directory. test -d $prefix || mkdir $prefix diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/demo-exec.test libtool-1.1/tests/demo-exec.test *** libtool-1.0/tests/demo-exec.test Tue Apr 1 19:04:40 1997 --- libtool-1.1/tests/demo-exec.test Fri Sep 5 21:20:52 1997 *************** *** 19,34 **** # Check to see if the programs really run. echo "Executing uninstalled programs in ../demo" ! if ../demo/hell.static | grep 'Welcome to GNU Hell'; then : else ! echo "$0: cannot execute ./hell.static" 1>&2 ! exit 1 fi if ../demo/hell | grep 'Welcome to GNU Hell'; then : else ! echo "$0: cannot execute ./hell" 1>&2 ! exit 1 fi ! exit 0 --- 19,41 ---- # 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 if ../demo/hell | grep 'Welcome to GNU Hell'; then : else ! echo "$0: cannot execute ../demo/hell" 1>&2 ! status=1 fi ! if ../demo/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then : ! else ! echo "$0: cannot execute ../demo/helldl" 1>&2 ! status=1 ! fi ! ! exit $status diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/demo-inst.test libtool-1.1/tests/demo-inst.test *** libtool-1.0/tests/demo-inst.test Thu Jun 19 22:38:59 1997 --- libtool-1.1/tests/demo-inst.test Fri Sep 5 21:21:05 1997 *************** *** 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 --- 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 *************** *** 42,45 **** --- 42,58 ---- fi status=1 fi + + if $prefix/bin/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then : + else + echo "$0: cannot execute $prefix/bin/helldl" 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 diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/hardcode.test libtool-1.1/tests/hardcode.test *** libtool-1.0/tests/hardcode.test Tue Apr 22 19:54:57 1997 --- libtool-1.1/tests/hardcode.test Sat Oct 18 07:13:45 1997 *************** *** 20,25 **** --- 20,33 ---- # Change to our build directory. cd ../demo || exit 1 + # 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 + # Check to make sure we have a dynamic library. library_names=NONE eval `egrep -e '^library_names=' ./libhello.la 2>/dev/null` *************** *** 40,45 **** --- 48,54 ---- hardcode_direct=NONE hardcode_minus_L=NONE hardcode_shlibpath_var=NONE + hardcode_libdir_flag_spec=NONE # Suck in all the hardcode_* variable settings. eval `egrep -e '^hardcode_' ./libtool 2>/dev/null` *************** *** 59,64 **** --- 68,78 ---- status=1 fi + if test "$hardcode_libdir_flag_spec" = NONE; then + echo "hardcode_libdir_flag_spec not set in ../demo/libtool" 1>&2 + status=1 + fi + test $status -eq 0 || exit $status echo "= Searching for hardcoded library directories in each program" *************** *** 67,90 **** hc-direct) expected="$hardcode_direct" ;; hc-libpath) expected="$hardcode_shlibpath_var" ;; hc-minusL) expected="$hardcode_minus_L" ;; *) continue ;; esac ! # Discover whether the .libs directory really was hardcoded. hardcoded=no ! if fgrep '.libs' $file > /dev/null; then hardcoded=yes ! elif cat $file | tr '\200-\277' '\100-\177' | tr '\300-\377' '\100-\177' \ ! | tr '\000-\037' '\040-\077' | tr '\040' '\012' \ ! | fgrep '.libs' > /dev/null 2>&1; then ! # At least AIX fgrep doesn't work for binary files, and AIX also ! # doesn't have strings(1), so we need this strange conversion. ! # AIX fgrep also has a limited line length, that's why we finally ! # turn the NUL characters into newlines. hardcoded=yes ! elif egrep 'unsupported' $file > /dev/null; then hardcoded=unsupported fi --- 81,115 ---- hc-direct) expected="$hardcode_direct" ;; hc-libpath) expected="$hardcode_shlibpath_var" ;; hc-minusL) expected="$hardcode_minus_L" ;; + + hc-libflag) + if test -n "$hardcode_libdir_flag_spec"; then + expected=yes + else + expected=unsupported + fi + ;; + *) continue ;; esac ! # Discover whether the objdir really was hardcoded. hardcoded=no ! ! # At least AIX fgrep doesn't work for binary files, and AIX also ! # doesn't have strings(1), so we need this strange conversion ! # (which only works on ASCII). ! # AIX fgrep also has a limited line length, so we turn unprintable ! # characters into newlines. ! if cat $file | (tr '\000-\037\200-\377' '\n' || cat) 2>/dev/null \ ! | fgrep "$objdir" > /dev/null 2>&1; then hardcoded=yes ! elif fgrep "$objdir" $file > /dev/null 2>&1; then ! # We retry fgrep without tr, in case the above lead to a false negative. hardcoded=yes ! elif (sed -e '1!d' $file | egrep 'unsupported') >/dev/null 2>&1; then hardcoded=unsupported fi *************** *** 92,109 **** case "$hardcoded" in yes) if test $expected = yes; then ! echo ".libs was hardcoded in \`$file', as libtool expected" else ! echo ".libs was hardcoded in \`$file', which fooled libtool" 1>&2 status=1 fi ;; no) if test $expected = no; then ! echo ".libs was not hardcoded in \`$file', as libtool expected" else ! echo ".libs was not hardcoded in \`$file', which fooled libtool" 1>&2 status=1 fi ;; --- 117,134 ---- case "$hardcoded" in yes) if test $expected = yes; then ! echo "$objdir was hardcoded in \`$file', as libtool expected" else ! echo "$objdir was hardcoded in \`$file', which fooled libtool" 1>&2 status=1 fi ;; no) if test $expected = no; then ! echo "$objdir was not hardcoded in \`$file', as libtool expected" else ! echo "$objdir was not hardcoded in \`$file', which fooled libtool" 1>&2 status=1 fi ;; diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/if.test libtool-1.1/tests/if.test *** libtool-1.0/tests/if.test Mon Jun 30 12:49:10 1997 --- libtool-1.1/tests/if.test Thu Jan 1 00:00:00 1970 *************** *** 1,32 **** - #! /bin/sh - # if.test - check that we haven't forgotten a `test' command - - # 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 for bad binary operators. - status=0 - if egrep -n -e "if[ ]+[\"']?\\$.*(=|-[lg][te]|-eq|-ne)" $srcdir/../ltconfig $srcdir/../ltmain.sh; then - echo "use \`if test \$something =' instead of \`if \$something ='" - status=1 - fi - - # Check for bad unary operators. - if egrep -n -e 'if[ ]+-' $srcdir/../ltconfig $srcdir/../ltmain.sh; then - echo "use \`if test -X' instead of \`if -X'" - status=1 - fi - - # Check for using `[' instead of `test'. - if egrep -n -e 'if[ ]+\[' $srcdir/../ltconfig $srcdir/../ltmain.sh; then - echo "use \`if test' instead of \`if ['" - status=1 - fi - - exit $status --- 0 ---- diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/nomode.test libtool-1.1/tests/nomode.test *** libtool-1.0/tests/nomode.test Thu Jan 1 00:00:00 1970 --- libtool-1.1/tests/nomode.test Sat Jul 12 01:32:11 1997 *************** *** 0 **** --- 1,26 ---- + #! /bin/sh + # nomode.test - check that we can actually get help + + # 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 + + status=0 + if $libtool --help 2>&1 | grep '^Usage:' >/dev/null; then : + else + echo "cannot get top-level help" + 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 + fi + + exit $status diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/quote.test libtool-1.1/tests/quote.test *** libtool-1.0/tests/quote.test Thu Jan 1 00:00:00 1970 --- libtool-1.1/tests/quote.test Tue Nov 11 22:07:54 1997 *************** *** 0 **** --- 1,116 ---- + #! /bin/sh + # quote.test - make sure that shell metacharacters do not blow up libtool + + # 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 + + # Do the torture test. + 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 + + for mode in compile link install; do + $echo "== $mode mode" + + # Unfortunately, without an array data type, it is nearly impossible + # to protect libtool from metacharacters in filenames. So, we just + # try metacharacters in the options it needs to pass to other programs. + + # preargs and postargs need to go through libtool unmodified. + case "$mode" in + compile) + preargs="gcc -c" + flag="-DVAR=" + postargs="foo.c" + ;; + + link) + preargs="gcc -o hell -g -O" + flag="-Wl,-someflag=" + postargs="foo.o" + ;; + + install) + preargs="install -c" + flag="--something=" + postargs="hell /usr/local/bin/hell" + ;; + esac + + # Trivial. + $echo "= trying: no quoting" + result=`$libtool -n --mode=$mode $preargs "${flag}test" $postargs` || status=1 + case "$result" in + *"$preargs ${flag}test "*) + $echo "= passed: $result" + ;; + *) + $echo "= failed: $result" + status=1 + ;; + esac + + # Metacharacters that should be backslashified. + for mchar in \\ \" \` \$; do + $echo "= trying: \\$mchar quoting" + result=`$libtool -n --mode=$mode $preargs "${flag}${mchar}test${mchar}" $postargs` || status=1 + case "$result" in + *"$preargs ${flag}\\${mchar}test\\${mchar} "*) + $echo "= passed: $result" + ;; + *) + $echo "= failed: $result" + status=1 + ;; + esac + done + + # Metacharacters that should be double quoted. + for mchar in "[" "]" "~" "#" "^" "&" "*" "(" ")" "{" "}" "|" ";" "<" ">" "?" \ + "'" " " " "; do + + $echo "= trying: \"$mchar\" quoting" + result=`$libtool -n --mode=$mode $preargs "${flag}${mchar}test${mchar}" $postargs` || status=1 + case "$result" in + *"$preargs \"${flag}${mchar}test${mchar}\" "*) + $echo "= passed: $result" + ;; + *) + $echo "= failed: $result" + status=1 + ;; + esac + done + done + + exit $status diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/sh.test libtool-1.1/tests/sh.test *** libtool-1.0/tests/sh.test Thu Jan 1 00:00:00 1970 --- libtool-1.1/tests/sh.test Wed Feb 18 18:02:36 1998 *************** *** 0 **** --- 1,53 ---- + #! /bin/sh + # if.test - check that we haven't forgotten a `test' command + + # 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 all the "portable" shell scripts. + status=0 + scripts="$srcdir/../ltconfig $srcdir/../ltmain.sh" + + # Check for bad binary operators. + if egrep -n -e "if[ ]+[\"']?\\$.*(=|-[lg][te]|-eq|-ne)" $scripts; then + echo "use \`if test \$something =' instead of \`if \$something ='" + status=1 + fi + + # Check for bad unary operators. + if egrep -n -e 'if[ ]+-' $scripts; then + echo "use \`if test -X' instead of \`if -X'" + status=1 + fi + + # Check for using `[' instead of `test'. + if egrep -n -e 'if[ ]+\[' $scripts; then + echo "use \`if test' instead of \`if ['" + status=1 + fi + + # 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 + + # Never use test -e. + if egrep -n -e 'test[ ]+-e' $scripts; then + echo "use \`test -f' instead of \`test -e'" + status=1 + fi + + # 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 + + exit $status diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/suffix.test libtool-1.1/tests/suffix.test *** libtool-1.0/tests/suffix.test Tue Apr 1 18:57:49 1997 --- libtool-1.1/tests/suffix.test Wed Feb 18 18:04:42 1998 *************** *** 1,8 **** #! /bin/sh # suffix.test - check that libtool knows how to transform source suffices. ! # Extensions taken from the ones that Automake recognizes. ! extensions="C F S c c++ cc cpp cxx f f90 for" bad_names="foo." # Test script header. --- 1,9 ---- #! /bin/sh # suffix.test - check that libtool knows how to transform source suffices. ! # Extensions taken from the ones that Automake recognizes, plus Objective C, ! # and GNU Ada. ! extensions="C F S ada adb ads asm c c++ cc cpp cxx f f90 for m s" bad_names="foo." # Test script header. diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/test-e.test libtool-1.1/tests/test-e.test *** libtool-1.0/tests/test-e.test Mon Jun 30 12:45:57 1997 --- libtool-1.1/tests/test-e.test Thu Jan 1 00:00:00 1970 *************** *** 1,19 **** - #! /bin/sh - # test-e.test - check that we haven't accidentally used test -e - - # 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 -e 'test[ ]+-e' $srcdir/../ltconfig $srcdir/../ltmain.sh; then - echo "use test -f, not test -e to check for file existence" - exit 1 - fi - - exit 0 --- 0 ---- diff -Ncar --exclude=*.info --exclude=configure libtool-1.0/tests/tlibtool libtool-1.1/tests/tlibtool *** libtool-1.0/tests/tlibtool Tue Apr 1 19:00:38 1997 --- libtool-1.1/tests/tlibtool Thu Jan 1 00:00:00 1970 *************** *** 1,17 **** - #! /bin/sh - - # tlibtool - A little test version of libtool. - if test -z "$srcdir"; then - echo "tlibtool: you must set \`\$srcdir' before running this test program" 1>&2 - exit 1 - fi - - # Grab all the settings from the generated libtool. - eval "`egrep '^[A-Za-z_][A-Za-z0-9_]*=' ../libtool`" - - # Use @VERSION@ so that we can use ../ltmain.sh.in directly. - LTCONFIG_VERSION="@VERSION@" - - # Execute the libtool backend. - . $srcdir/../ltmain.sh.in - exit 1 --- 0 ----