Index: libtool/AUTHORS diff -c libtool/AUTHORS:1.4.4.6 libtool/AUTHORS:1.8 *** libtool/AUTHORS:1.4.4.6 Tue May 2 15:33:45 2000 --- libtool/AUTHORS Wed Apr 11 08:54:32 2001 *************** *** 6,8 **** --- 6,10 ---- Alexandre Oliva . Co-maintainer. Thomas Tanner . Co-maintainer. Gary V. Vaughan . Co-maintainer. + Ossama Othman . Co-maintainer. + Robert Boehne . Co-maintainer. Index: libtool/ChangeLog diff -c libtool/ChangeLog:1.385.2.206 libtool/ChangeLog:1.922 *** libtool/ChangeLog:1.385.2.206 Sat May 27 04:12:27 2000 --- libtool/ChangeLog Tue Apr 24 17:05:37 2001 *************** *** 1,19 **** ! 2000-05-27 Gary V. Vaughan ! GNU libtool 1.3.5 was released. ! * config.guess: updated from autoconf cvs. ! * config.sub: ditto. * NEWS: inserted todays date. - * configure.in: bumped version to 1.3.5. ! * ltmain.in: cygwin-1.1.0 and higher no longer grok backslash path ! separators. * README-alpha: note new location of config.(guess|sub). 2000-05-27 Chad Cunningham ! * ltconfig.in (rhapsody*): New Port. * ltmain.in (rhapsody*): ditto. --- 1,1181 ---- ! 2001-04-25 Gary V. Vaughan ! ! GNU libtool 1.4 was released. ! ! * configure.in: Bumped version to 1.4. ! * config.sub, config.guess: Synchronised from ftp.gnu.org. ! * NEWS: updated. ! ! 2001-04-24 Peter Eisentraut ! ! * libtool.m4: Support $host_os as /sysv5uw7*/ from newer ! config.guess in addition to older /unixware*/. Use compiler ! driver, not linker, for linking shared libraries. ! ! 2001-04-24 Gary V. Vaughan ! ! * libtool.m4, ltmain.in, libltdl/configure.in, ! tests/quote.test: Remove stale references to ltconfig. ! ! * ltdl.m4 (AC_C_INLINE): No longer required. ! * libltdl/ltdl.c (strdup, strcmp, strchr, strrchr, memcpy, trim, ! free_vars): Revoke inline keyword from declarations. `static ! inline' is not very portable, and in addition Unixware 7.1.1's ! compiler says you can't access static variables from inline ! functions. ! Reported by Peter Eisentraut ! ! 2001-04-24 Albert Chin-A-Young ! ! * libtool.m4: Handle case where /bin/nm -p outputs multiple ! symbol types (like under HP-UX 11.00). ! ! 2001-04-24 Thomas Tanner ! ! * TODO: describe problems with libltdl ! * ltmain.in (ILD): tidy up, add comments, remove dead code, ! merge duplicate code ! * ltmain.in (ILD): don't touch newdependency_libs after scan or ! dlopen pass ! * ltmain.in (ILD): don't dlpreopen dependency_libs of a dlopened ! module (remove absolutely wrong quick hack) ! * ltmain.in (ILD): remove wrong comments about duplicate removal ! * ltmain.in (ILD): build a static-only module if it has ! static libraries in its dependencies (so that libltdl can ! safely load dependency_libs) ! * ltmain.in (argument parsing): prefix comparsions of -l args with X, ! replace -lc with `-framework System' _after_ the ILD passes ! * ltmain.in (argument parsing): support dl[pre]open ! for both .o and .lo files ! * ltmain.in (deplibs_check): use portable test syntax ! * ltmain.in (help): document -prefer-[non-]pic flags ! * ltmain.in: improve readablity by adding some comments, ! rename uninst_* to notinst_* (more adequate name) ! ! 2001-04-24 Gary V. Vaughan ! ! * doc/PLATFORMS: More updates from subscribers to ! libtool@gnu.org. ! ! From Tim Mooney ! * tests/Makefile.am (TESTS_ENVIRONMENT): Make sure the *.test ! scripts get the same make that was used in the top level ! directory. ! ! 2001-04-23 Gary V. Vaughan ! ! * doc/PLATFORMS: Updated with more platforms successfully ! tested by members of libtool@gnu.org. ! ! 2001-04-23 Peter Eisentraut ! ! * doc/PLATFORMS: With this patch, freebsd4.3 passes the test ! suite. ! * libltdl/ltdl.c (lt_dlexit): Quit loop if only resident modules ! are left. ! ! 2001-04-23 Gary V. Vaughan ! ! * doc/PLATFORMS: With this patch, my Solaris boxes now pass the ! test suite, Yay! ! From Albert Chin-A-Young ! * ltmain.in: `test -L' is not portable, and infact breaks uninstall ! mode on Solaris. Fallback to `test -h' and finally `test -f', ! but be careful not to let the failure status cause libtool to ! stop. ! ! From Simon Spero ! * ltdl.m4 (AC_LTDL_DLSYM_USCORE): Add $LIBADD_DL while ! checking for dlsym _. ! ! From Simon Spero ! * libtool.m4 (lt_cv_deplibs_check_method) [darwin]: Set it! ! ! * TODO: Make a note to undo this later. ! From Christoph Pfisterer ! * libtool.m4: Use $() execution substitution quotation to work ! around zsh builtin echo \ escape removal. ! ! 2001-04-22 Peter Eisentraut ! ! * bootstrap: Allow overriding the location aclocal, automake, ! autoconf, autoheader from the environment. ! ! * demo/Makefile.am: Automake 1.4e does not allow `+=' assignments ! if the variable was not set with `=' earlier. `+=' was not useful ! here anyway. ! ! 2001-04-22 Gary V. Vaughan ! ! * ltdl.m4 (AC_CHECK_HEADERS): UW7 has sys/dl.h, so we must ! check for that here. ! * libltdl/ltdl.c (HAVE_SYS_DL_H): Include it if necessary for ! the dlopen loader. ! Reported by Matthew Schalit ! ! * libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Use pass_all for ! various releases of UnixWare and OpenServer that support it. ! Reported by Matthew Schalit ! ! * doc/PLATFORMS: Updated with various platforms successfully ! tested by members of libtool@gnu.org. ! ! 2001-04-21 Gary V. Vaughan ! ! * TODO: propose pkg-config merge. ! ! 2001-04-21 Nick Hudson ! ! * ltmain.in: Correct an error in yesterday's patch. ! ! 2001-04-20 Nick Hudson ! ! * libtool.m4: Improve NetBSD support. ! * ltmain.in: ditto. ! ! 2001-04-19 Dan McNichol ! ! * libtool.m4: Build standard shared libraries on AIX POWER ! more like AIX does, with a shared object archived into lib.a. ! On AIX -bexpall flag does strange things... Don't use it. ! Fix quotes around -berok flag. Add support for AIX 5. ! Add support for run time linking on AIX POWER. (should work ! on AIX 4.2 and up). Turn this feature on by adding -brtl flag ! to LD_FLAGS. Add support for AIX on IA64. Note: AIX on IA64 ! uses a SYSV type linker. Add a comment telling what to do if the ! TOC starts getting too large on AIX. ! * NEWS: mention aix5 support. ! ! 2001-04-18 Alexandre Oliva ! ! * TODO: Add -L- flag. ! ! 2001-04-11 Alexandre Oliva ! ! * libtool.m4 (no_undefined_flag) [Solaris ld]: Change to -zdefs. ! ! 2001-04-11 Ossama Othman ! ! * AUTHORS: Added myself to the list of maintainers. ! ! 2001-04-08 Gary V. Vaughan ! ! * libtool.m4 (hardcode_libdir_flag_spec, osf4/osf5): Use ${wl} ! to pass -rpath when compiling with gcc. ! Reported by Tim Mooney ! ! * libltdl/ltdl.c (sys_shl_open): Cache a handle for the `self' ! module, since HPUX adds module symbols into the `self' pool if ! it is opened later. Return the cached pointer if the caller ! subsequently tries to open `self'. ! (sys_shl_sym): Diagnose NULL modules. ! ! From Peter Eisentraut ! * ltmain.in (clean,uninstall): test -e is not portable. Well, ! neither is -L, but I'm hoping that redirecting error messages ! to /dev/null and relying on non-zero exit status will work okay ! on the few hosts that don't support -L. ! ! 2001-04-08 Nick Hudson ! ! * ltmain.in: Improve check for valid -version-info parameter. ! ! 2001-04-08 Gary V. Vaughan ! ! From Nick Hudson ! * doc/Makefile.am (libtool_TEXINFOS): Add fdl.texi so that it ! is included in the distribution. ! ! 2001-04-07 Peter Eisentraut ! ! * ltmain.in (clean,uninstall): Do not error if the file doesn't ! exist and 'rm -f' was used. Exit with status 1 on error. ! ! 2001-04-06 Nick Hudson ! ! * ltmain.in: Implement a new deplibs_check_method called ! match_pattern that does pattern matching on filenames... ! * libtool.m4: ...use it with NetBSD ! ! 2001-04-05 Gary V. Vaughan ! ! * doc/libtool.texi (Multiple dependencies): A note about the ! problems I've reintroduced by reverting the my patch of 2001-03-31. ! ! From Edward Lee ! * libtool.m4: Typos. ! ! * tests/Makefile.am (TESTS): Delete references to depdemo-dups.test. ! * tests/depdemo-dups.test: Removed, as part of the patch ! reversion below. ! * ltmain.in: Revert my change from 2001-03-31. Although it ! was technically correct, it opens a whole can of worms we don't ! want to deal with right now. ! ! From Ahmed Masud ! * libltdl/ltdl.c (sys_shl_open): Return a NULL module handle ! for self opening. ! (sys_shl_close): Be careful not to close a NULL module handle. ! (sys_shl_sym): Allow shl_findsym() to open NULL modules, but ! discard the modified module address it returns. ! ! * libltdl/ltdl.c (lt_dlopen): When reading the .la file, ! reallocate the line buffer size if the line overflows the ! original buffer. ! Reported by Nick Hudson ! ! * NEWS (1.3d) Removed bogus ltconfig reference. ! ! 2001-04-03 Gary V. Vaughan ! * libtool.m4 (_LT_AC_LTCONFIG_HACK): Remove the spurious ! `dnl' from the help text of --with-pic. ! Reported by stefan ! 2001-04-02 Gary V. Vaughan ! ! * configure.in: bumped version to 1.3e. ! ! GNU libtool 1.3d was released. ! * NEWS: inserted todays date. ! 2001-04-01 Christoph Pfisterer ! ! * libtool.m4: Fixed support for Darwin and Rhapsody. Now correctly ! hardcodes the library path and adds versioning. Other small ! fixes. ! * ltmain.in: Fixed special cases for libc and libm on Rhapsody and ! Darwin. One of them was misplaced. Added version_type case for ! Rhapsody and Darwin, named "darwin". ! ! 2001-03-31 Gary V. Vaughan ! ! * ltmain.in: Remove the code for stripping duplicate deplibs ! from libtool link lines -- duplicates are somtimes necessary ! to satisfy inter-library dependencies, and never cause link to ! fail even if they are spurious. ! * tests/depdemo-dups.test: New file. Make sure this bug doesn't ! creep back in again! ! * tests/Makefile.am (TESTS): Use the new test above. ! ! 2001-03-29 Edward M. Lee ! ! * libtoolize.in: Check configure.ac and prefer configure.ac to ! configure.in. ! ! * libtoolize.in: change recommendation from AM_PROG_LIBTOOL to ! AC_PROG_LIBTOOL. ! ! * libtool.m4: Generate dll/import libraries for cygwin according ! to the following: libFOO.a (static lib), libFOO.dll.a (import ! lib), cygFOO-version.dll (dll). Update postinstall_cmds and ! postuninstall_cmds to reflect this. ! * ltmain.in: Generate installed .la files with dlnames set to ! ../bin/cygFOO-version.dll for normal dlls. dlls for modules ! remain with the .la file. ! ! * libltdl/ltdl.c: Use windows paths while calling LoadLibrary. + 2001-03-16 Albert Chin + + * libtool.m4 (save_CPPFLAGS): Fix typo. + + 2001-03-13 Alexandre Oliva + + * libtool.m4 (lt_cv_compiler_c_o): Cache it. + (lt_cv_compiler_o_lo): Likewise. + + 2001-03-09 Peter Eisentraut + + * ltmain.in (clean): Automatically remove $objdir (usually '.libs'). + + 2001-03-08 Gary V. Vaughan + + * ltconfig.in (library_names_spec): Undo latin-1 spaces I pasted + in yesterday by mistake. + + 2001-03-07 Gary V. Vaughan + + From Tor Lillqvist + * libtool.m4 (export_symbols): On Windows, if the export_symbols + file (which has been passed to libtool with the -export-symbols + command line switch) already is a .def file, use it as is. + + * libtool.m4 (library_names_spec): Using m4 quotes correctly this + time around! + + From Tor Lillqvist + * libtool.m4 (library_names_spec): Use an appropriate filename + prefix for dlls -- lib for mingw; cyg for cygwin; pw for pw32. + + 2001-03-06 Alexandre Oliva + + * libtool.m4 (can_build_shared) [AIX 4.[01], GCC]: GCC up to + 2.96 can't build shared libraries reliably. Disable them. + + * ltmain.in: When dropping dependencies of a -no-undefined + library, give up on building a shared library. + + 2001-03-05 Akim Demaille + + * ltmain.sh: Don't quote the argument of case/esac and + assignments. + * libtool.m4: Likewise. + + 2001-03-03 Markus F.X.J. Oberhumer , + Alexandre Oliva + + * libtool.m4: Added explicit return type to all C functions. + + 2001-02-22 Gary Vaughan + + * NEWS: Updated. + * doc/libtool.texi (Thread Safety in libltdl): New node describing + the application the new MT API. + * libltdl/ltdl.h: Prototypes. + * libltdl/ltdl.c: Use these functions throughout the rest of + the file to provide thread locking. + (lt_dlmutex_register): New function to set callbacks for + multi-threaded calls into libltdl. + (lt_dl_mutex_lock): Type of a locking callback function. + (lt_dl_mutex_lock): Type of an unlocking callback function. + (lt_dl_mutex_seterror): Type of a callback function to save the + last libltdl error message in thread local storage. + (lt_dl_mutex_geterror): Type of a callback function to retrieve + the last saved error message from thread local storage. + + 2001-02-20 Gary Vaughan + + * libltdl/ltdl.c (lt_dlcaller_register): dont set an unsigned + type to a negative number. + Reported by Guenter Millahn + + 2001-02-05 Gary V. Vaughan + + From Nick Hudson + * ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): netbsd* is able to + automatically load module deplibs without assistance from + libltdl. + + 2001-02-02 Gary V. Vaughan + + * libltdl/ltdl.c (load_deplibs): Make sure the depcount is reset, + even when deplibs are not used because of the patch below. + + * ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): If we know that the host + architecture automatically loads deplibs, then... + * libltdl/ltdl.c (load_deplibs): ...don't manually load each one. + + 2001-01-31 Gary V. Vaughan + + * TODO: Updated. + + * libltdl/ltdl.c (load_deplibs): If loading a deplib fails, + don't sweat -- it may be a lib that is already statically linked + into the loading application. + + * libltdl/ltdl.c: Clean up the shadowing of the global handles + variable. + (LT_DLRESIDENT_FLAGS): Add extra parens to satisfy -Wall. + (load_deplibs): Cast isspace() argument to an int to satisfy + -Wall. + + 2001-01-30 Robert Boehne + + * AUTHORS: added myself to the list of maintainers. + + 2001-01-28 Alexandre Oliva + + * libltdl/Makefile.am (CLEANFILES): Clean conditionally-built + libraries. + + 2001-01-27 Alexandre Oliva + + * libtool.m4 (ld_shlibs) [aix4*]: Disable on unknown CPU types. + + 2001-01-07 Gary V. Vaughan + + * NEWS: Updated. + * doc/libtool.texi (User defined module data): Updated. + * libltdl/ltdl.c (lt_dlhandle_next): New function. + * libltdl/ltdl.h (lt_dlhandle_next): Prototypes. + + 2001-01-05 Gary V. Vaughan + + * NEWS: Updated. + * doc/libtool.texi (User defined module data): Document it all. + * ltdl.m4: Check for memcpy, or else bcopy. + * ltdl.c (lt_caller_data): New type. + (lt_dl_handle_struct): Add an lt_caller_data field. + (lt_dlcaller_register, lt_dlcaller_set_data, + lt_dlcaller_get_data): New functions. + (rpl_memcpy): A minimal fallback implementation. + (rpl_realloc): A realloc implemented with lt_dlmalloc and + lt_dlfree. + (LT_DLMALLOC, LT_DLFREE, LT_DLREALLOC, LT_DLMEM_REASSIGN): + New memory handling convenience macros. Use them + appropriately throughout the rest of this file. + * ltdl.h (lt_dlcaller_register, lt_dlcaller_set_data, + lt_dlcaller_get_data): Prototyped. + + 2001-01-04 Gary V. Vaughan + + * libltdl/ltdl.h: formatting change. + + 2000-12-23 Gary V. Vaughan + + From vvv@vsu.ru: + * doc/fdl.texi (GNU Free Documentation License): contained @bye + command which prevented part of document to be generated (indices, + etc). + * doc/libtool.texi (Dlpreopening): the @deftypevar did not contain + a space after a type. + + 2000-12-22 Akim Demaille + + * libtool.m4: s/[ \t]*$// + + 2000-12-22 Aneesh Kumar K.V + + * libtool.m4 (OSF/1): Revert my patch of 2000-12-16. + + 2000-12-20 Gary V. Vaughan + + * libltdl/ltdl.c (lt_dlexit): Was checking for residency of the + wrong module. + Reported by Robert Boehne + + * ltmain.in (dlprefiles): Now that `2000-12-15 Utz-Uwe Haus' patch + below can detect preopened library deplibs correctly in libltdl, + we need to ensure that libtool library deplibs are also preloaded + into the binary for that phase to work. + + 2000-12-16 Aneesh Kumar K.V + + * libtool.m4 (OSF/1): Change the way to pass linker flags through + compiler on a Tru64 machine. + + 2000-12-16 Gary V. Vaughan + + * libtool.m4 (sys_lib_search_path_spec): Use test instead of + `['. + (archive_cmds): And another one. + + * libtool.m4 (darwin*): Fixed a pair of stupid typos I made in the + last patch. + + * libtool.m4 (AC_DEPLIBS_CHECK_METHOD): moved rogue settings from + sequent, ncr and newos6 back into here from other macros. + + 2000-12-16 Wilfredo Sanchez + + * libtool.m4: (dyld/darwin*) Much improved port. + * ltmain.in: (dyld/darwin*) Much improved port. + + 2000-12-16 Sascha Schumann + + * libtool.m4: Accept darwin as an alias for rhapsody. + * ltmain.in: ditto. + + * libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Use the HPUX 10.20 + methods to check for library dependencies on HPUX 11. + + 2000-12-16 Nick Hudson + + * libtool.m4 (netbsd*, deplibs_check_method): Enable ILD support + for NetBSD a.out. + + 2000-12-15 Akim Demaille + + * libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Rename + `ac_cv_sys_global_symbol_pipe' as `lt_cv_sys_global_symbol_pipe'. + Similarly with `lt_cv_global_symbol_to_cdecl + (_LT_AC_LTCONFIG_HACK): Similarly with `ac_cv_prog_cc_pic', + `ac_cv_prog_cc_shlib', `ac_cv_prog_cc_wl', `ac_cv_prog_cc_static', + `ac_cv_prog_cc_no_builtin', `ac_cv_prog_cc_can_build_shared', + `ac_cv_prog_cc_static_works', `ac_cv_archive_cmds_need_lc'. + (AC_PATH_TOOL_PREFIX): Similarly with `ac_cv_path_MAGIC_CMD' + (AC_PROG_LD) : Likewise. + (AC_PROG_LD_GNU) : Likewise. + (AC_PROG_NM) : Likewise. + + 2000-12-15 Utz-Uwe Haus + + * libltdl/ltdl.c (lt_dlopen): Changed "dl_dependency_libs" keyword + to "dependency_libs". + + 2000-12-14 Tod Milam + + * libltdl/ltdl.c (lt_dlexit): Reset the loaders value to zero when + the last module has been unloaded. + + 2000-12-14 Michael Schmitz + + * libtool.m4: Port to *-sni-sysv4 (Reliant Unix) + * README: added Reliant Unix to hte list of supported platforms + * doc/PLATFORMS: added note on tests on Reliant Unix + + 2000-12-14 Masahiro Nobori + + * README: Updated. + * NEWS: Updated. + * libtool.m4: New port to NEWS-OS Release 6. + + 2000-12-14 Nick Hudson + + * libtool.m4 (hardcode_libdir_flag_spec): Remove linker + specification for netbsd. + + 2000-12-14 Akim Demaille + + * libtool.m4: Don't depend on Autoconf internals: + s/ac_cv_prog_gcc/GCC/. + + 2000-12-14 Gary V. Vaughan + + * libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Don't empty + out ac_cv_global_symbol_to_cdecl inside the loop, incase we + need to go around again and try with underscore prefix. + (_LT_AC_TRY_DLOPEN_SELF): On some hosts (cygwin for instance) + self dlclosing unloads the main program and causes a SIGSEGV. So + don't do it for now. + + 2000-12-05 Gary V. Vaughan + + Oh My! Cygwin support has bitrotted while I was looking the other + way. This should fix it some: + * libtool.m4 (extract_expsyms_cmds): There is a quoting problem + with autoconf-2.13 that prevents [$]0 from expanding. Use shell + quotes instead to delay eval of $0. + (impgen.c) The '# ' sequence stripped by sed works again. + + 2000-12-01 Gary V. Vaughan + + * doc/libtool.texi (Libltdl interface): Add documentation. + * libltdl/ltdl.h (lt_dlmakeresident, lt_dlisresident): Add + prototypes. + (LT_DLERROR_CLOSE_RESIDENT_MODULE): New error status. + * libltdl/ltdl.c (lt_dlmakeresident, lt_dlisresident): Allow + making and testing of resident module status, which prevents a + module from being lt_dlclosed. + (lt_dlopen): If lt_dlopen()ing self, make the module resident. + (lt_dlclose): Return an error if the module is resident. + + * libtool.m4 (_LT_AC_LTCONFIG_HACK): Move the tests for dlopen + from here... + (AC_LIBTOOL_DLOPEN_SELF): ...to here. + (_LT_AC_CHECK_DLFCN): Factor out repeated code for dlfcn.h + (_LT_AC_TRY_DLOPEN_SELF): Factor out repeated code for + checking dlopen status. + * ltdl.m4 (AC_LIB_LTDL): Use _LT_AC_CHECK_DLFCN. + dlopen compile time checking. Use _LT_AC_CHECK_DLFCN. + (AC_LTDL_DLSYM_USCORE): Use _LT_AC_TRY_DLOPEN_SELF. + + 2000-11-29 Gary V. Vaughan + + * libltdl/ltdl.h (lt_dlhandle): Rename the wrapped structure + to prevent nameclash when used from C++. + * libltdl/ltdl.c: Fixed all references. + + 2000-11-25 Gary V. Vaughan + + * libltdl/ltdl.c (lt_dlopen): Change the default search order + for modules. If the named module has no directory component, + always start the search with the user_search_path directories, + and then fall back on the current directory only if that fails. + + 2000-11-20 Gary V. Vaughan + + * libltdl/Makefile.am (libltdl_la_LDFLAGS): increment the version + number to reflect the breakage of binary compatibility. + * doc/libtool.texi (Libltdl interface): Document + LT_NON_POSIX_NAMESPACE. + * libltdl/ltdl.h (LT_POSIX_NAMESPACE): Deleted. The default is + now to use this namespace, so the cpp macro is no longer + necessary. + + 2000-11-20 Morten Eriksen + + * ltdl.m4 (AC_LIB_LTDL, AC_LTDL_SYMBOL_USCORE): Break a circular + dependency between AC_LTDL_SYMBOL_USCORE and AC_LTDL_DLSYM_USCORE. + + 2000-11-20 Paul Berrevoets + + * ltmain.in: Some versions of expr respond with "0" if a + regexp fails to match. + + 2000-11-19 Paul Berrevoets + + * libtool.m4 (_LT_AC_LTCONFIG_HACK): Quote the $ in $#, $2 and + $3 in variable 'archive_expsym_cmds' for cygwin. + + 2000-11-19 Gary V. Vaughan + + * ltdl.c: Relegate non-POSIX-compliant symbols (e.g. those + ending in ``_t'') to deprecated #define compatibility macros. + Also ease up on the namespace pollution, so that only ``lt_'' + and ``LT_'' prefixes are taken from the global namespace. + * ltdl.h: ditto. + + 2000-11-17 Gary V. Vaughan + + * ltdl.c: Reformatted. + * ltdl.h: ditto. + + 2000-11-11 Gary V. Vaughan + + * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Use $ac_ext for conftest + sourcefile. + * libtool.m4: Use $ac_ext and $ac_objext respectively for conftest + sources and objects. + Reported by Carlo Wood + + * doc/fdl.texi: New file. The license for distributing the + libtool manual. + * doc/libtool.texi: Reference the new license. + + 2000-10-31 Morten Eriksen + + * libtool.m4 (_LT_AC_LTCONFIG_HACK): Quote argument to avoid + error output from cygpath when $srcdir is empty. + + 2000-10-31 Gary V. Vaughan + + * bootstrap: rm Makefiles to prevent infinite loop during + configure when libtool.m4 is newer than Makefile. + + 2000-10-31 Akim Demaille + + * libtool.m4: Adjust the copyright notice. + Quote all the macro names when defined. + Some minor formatting changes. + (AM_PROG_LIBTOOL, AM_ENABLE_SHARED, AM_ENABLE_STATIC) + (AM_DISABLE_SHARED, AM_DISABLE_STATIC, AM_PROG_LD, AM_PROG_NM): + Don't use indir when useless. Don't add trailing `dnl' either. + + 2000-10-30 Gary V. Vaughan + + * doc/libtool.texi: Corrected another attack of CRLF line + endings. + + 2000-10-30 Ossama Othman + + * libtool.m4 (archive_expsym_cmds): Fix typo where line was broken + in the middle of an expression. + + 2000-10-30 Aneesh Kumar K.V + + * libtool.m4 (archive_expsym_cmds): Support for -export-symbol + option on Tru64. + (hardcode_libdir_flag_spec): Fixed cxx throwing error while using + libtool. Done by passing -rpath directlty to the compiler. + + 2000-10-27 Robert Boehne + + * docs/libtool.texi: Added pointers to documentation + of Hewlett-Packard, Compaq Tru64 and IBM AIX systems. + + 2000-10-02 Gary V. Vaughan + + From Bruce Korb + * ltmain.in (execute_dlfiles): Reduce obfuscation. + + 2000-09-30 Alexandre Oliva + + * libtool.m4 [netbsd*] (deplibs_check_method, file_magic_cmd, + file_magic_test_file): Removed inappropriate duplicate + definitions; these variables are set in AC_DEPLIBS_CHECK_METHOD. + + * libtool.m4 (lt_cv_file_magic_cmd): Don't use '${MAGIC_CMD}' or + '${OBJDUMP}'; Solaris' /bin/sh loses with `}' in cache files. + (ac_cv_path_MAGIC_CMD): Renamed to lt_cv_path_MAGIC_CMD. + + 2000-09-28 Gary V. Vaughan + + * libtool.m4 (MAGIC_CMD): Don't use MAGIC, since BSD versions of + the file command use this environment variable to hold the + location of the magic database. + Reported by Marc Espie + + 2000-09-19 Gary V. Vaughan + + * doc/PLATFORMS: Updated. + * demo/configure.in: Revert to the `libtool --features' test. + * Makefile.am (libtool): This needs to rerun configure now that + libtool is generated entirely by AC_PROG_LIBTOOL again. + (ltconfig): Removed. + (ltmain.sh): Is now regenerated when ltmain.in changes. + * libtool.m4 (_LT_AC_LTCONFIG_HACK): Now does all of the work for + generating libtool immediately in configure.in, rather than + deferring part of the creation until config.status runs. + + 2000-09-17 Gary V. Vaughan + + * bootstrap: Backed out yesterdays patch which is no longer + necessary. + * Makefile.am (libtool): Reworked rule for regeneration of libtool, + now that it is built entirely withing config.status. + (libtoolize): Tidied for orthogonality with the other generation + rules. + (ltconfig): This is now generated by AC_PROG_LIBTOOL, called from + make by running config.status --recheck. + (ltmain.sh): Moved primary generation of this file into here... + * configure.in (AC_OUTPUT): ...instead of here. + * libtool.m4 (AC_OUTPUT_COMMANDS): Write the config to ltconfig + where it can be reused, rather than directly to libtool. + * demo/configure.in: libtool is no longer present immediately + after AC_LIBTOOL_M4 has completed, so the tests now grep through + ltconfig instead -- which *will* be present. + + 2000-09-16 Gary V. Vaughan + + * TODO: Removed the item describing the change below, and added a + similar item to remind us to change the ltdl.m4 macros again when + _LT_AC_LTCONFIG_HACK is divided into proper macros. + * ltdl.m4 (AC_LTDL_SNARF_CONFIG): Removed. No longet required + now that ltconfig has migrated to libtool.m4. + (AC_LTDL_SHLIBEXT): Require _LT_AC_LTCONFIG_HACK. + (AC_LTDL_SHLIBPATH): ditto. + (AC_LTDL_SYSSEARCHPATH): ditto. + + * ltdl.m4 (AC_LTDL_DLPREOPEN): Require the libtool.m4 symbol_pipe + macro. + (AC_LTDL_SYMBOL_USCORE): ditto. + (AC_LTDL_GLOBAL_SYMBOL_PIPE): Removed, since it is a duplicate + of... + * libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): ...this new + macro, extracted from _LT_AC_LTCONFIG_HACK. + + * ltdl.m4 (changequote): An audit of changequote and m4 + quote usage -- all changequotes have been removed, and some + latent unquoted `[' and `]' bugs have been fixed. + + * configure.in (AC_OUTPUT): ltmain.sh must be generated in the + source tree since this is where it would be found in a freshly + unrolled tarball. + + * configure.in: Replace `dnl' comments with `#' comments for + more conformity with cvs autoconf. + Removed emacs hack-local-variables, since there is now a + proper Autoconf major mode. + Removed a couple of changequote()s. + + * bootstrap (ltconfig): When bootstrapping libtool with a + stock automake (i.e. without the README patch applied), + references to ltconfig are manually removed from the generated + Makefile.in files. + + 2000-09-15 Gary V. Vaughan + + * doc/libtool.texi: Removes references to ltconfig, and a small + amount of tidying up to compensate. + + 2000-09-15 Nick Hudson + + * libtool.m4 (netbsd): Improved support. + + 2000-09-15 Gary V. Vaughan + + * ltmain.in (version_type): Use "-iface" as the windows + versioning scheme, where iface is the number of the oldest + interface supported. + + 2000-09-14 Gary V. Vaughan + + From Paul Sokolovsky + * libtool.m4 (pw32): Initial support for pw32, assuming that + libtool's behaviour in this environment is identical to under + cygwin. + * ltmain.in (pw32): ditto. + * NEWS: Updated. + + * libtool.m4 (changequote): An audit of changequote and m4 + quote usage -- all changequotes (except a few with non-nesting + square brackets) have been removed. + + * Makefile.am (EXTRA_DIST): The bootstrap script should be + distributed with libtool. + + 2000-09-13 Gary V. Vaughan + + libtool.m4 (_LT_AC_LTCONFIG_HACK): Oh man! Third time lucky. + I just discovered that '&' needs to be escaped inside + AC_TRY_EVAL. + + 2000-09-12 Michael Matz + + * ltmain.in: Be careful about filenames with multiple `.'s in + them when calculating file extensions. + Reported by Joel Reed + + 2000-09-12 Gary V. Vaughan + + libtool.m4 (AC_PROG_LIBTOOL): Removed, as it was triggering a + bug in Autoconf-2.13 AC_REQUIRE implementation which inserted + some of the expanded tests too early in the generaated configure. + (_AC_PROG_LIBTOOL): renamed to AC_PROG_LIBTOOL, and defines + itself to an empty expansion to prevent multiple expansions. + configure.in (AC_LIBTOOL_SETUP): Replaced by a call to + AC_PROG_LIBTOOL now that the AC_REQUIRE bug has been worked + around. + + 2000-09-09 Gary V. Vaughan + + libtool.m4 (_LT_AC_LTCONFIG_HACK): Forgot to escape the + redirections inside AC_TRY_EVAL in the need_lc tests. Doh! + + libtool.m4 (_LT_AC_LTCONFIG_HACK): Forgot to redirect the + output of grep to /dev/null in the need_lc tests. + + configure.in (AC_PROG_LIBTOOL): Using this in libtools own + configure.in interacts badly with the AC_PROVIDE calls and + results in several tests being inserted into configure too + early. Use AC_LIBTOOL_SETUP instead. + + 2000-09-08 Gary V. Vaughan + + libtool.m4 (_LT_AC_LTCONFIG_HACK): The ltconfig.in code I + ported from ltconfig.in was incomplete -- this is a backport + of the missing code taken from the multi-language branch. + + 2000-09-07 Pavel Roskin + + * libtool.m4 (_LT_AC_LTCONFIG_HACK): Fixed incorrect use of + changequote + + 2000-09-07 Gary V. Vaughan + + * NEWS: Updated. + * TODO: Add a reminder to get rid of ltconfig in mlb. + * README: Until things even out, I have added a note and a + patch to make the installed automake cooperate with the new + ltconfig free libtool. + + * libtool.m4 (_LT_AC_LTCONFIG_HACK): with_gcc is only useful in + ltmain.sh as it has not yet been set in libtool.m4. Use + $ac_cv_prog_gcc instead. + + * doc/PLATFORMS: Updated. + + * configure.in (AC_PROG_AWK): Removed -- no longer required by + the build process. + * lineno: ditto. + + * libtoolize.in (files): Don't try to install ltconfig -- it + doesn't exist!! + * bootstrap: Fake an ltconfig incase the installed automake + calls an installed libtoolize (as part of its --add-missing + process) which thinks ltconfig should be there. + + * libtool.m4 (_LT_AC_LTCONFIG_HACK): Deleted a vital `;;' + terminator from a case statement by mistake. + + * Makefile.am (ltmain.sh): Make this depend on TSDEPS again + so that the Changelog timestamp is used for ltmain.sh at `make + dist' time. + + 2000-09-06 Gary V. Vaughan + + libtool.m4 now contains a version of the code that used to run + from ltconfig, so that ltmain.sh and then libtool are + generated at configure time. + + * Makefile.am: Don't generate ltmain.sh or ltconfig anymore. + * bootstrap: ltconfig is no more! + * configure.in: Call AC_PROG_LIBTOOL directly. + (AC_OUTPUT): Generate tmain.sh. + * libtool.m4: Don't build an argument list for ltconfig. + (_LT_AC_LTCONFIG_HACK): Refactoring of the former contents of + ltconfig.in to take advantage of the m4 macros from autoconf. + * ltmain.in: Don't do a version check against ltconfig. + * tests/assign.test: Remove reference to ltconfig. + * tests/hardcode.test: ditto. + * tests/sh.test: ditto. + + 2000-09-05 Alexandre Oliva + + * depdemo/main.c: Support -alt. + * tests/build-relink2.test: Try it. + + * ltconfig.in: Removed all references to what used to be + hardcode_into_libs=all. 2000-09-03's patch was wrong. + * ltmain.in: Likewise. + * tests/build-relink.test, tests/build-relink2.test: Adjust. + * mdemo/Makefile.am (lib_LTLIBRARIES): Move libsub.la before + libfoo2.la, so that they're installed in the right order. + + 2000-09-04 Alexandre Oliva + + * tests/dryrun.test: Build libsub.la along with the object files, + since it is needed by libfoo2.la. + + * mdemo/Makefile.am: Mark only libfoo2 as -no-undefined. + Explicitly link it with libsub.la. + + * ltconfig.in (need_lc): Preserve allow_undefined_flag. + + * tests/*.test (CONFIG_SITE): Ultrix's /bin/sh fails on + `. /dev/null'. Set CONFIG_SITE to /dev/null/config/site, to make + sure we pick a non-existent file. + + * Makefile.am (libtool, clibtool): Pass CONFIG_SHELL along with + ECHO down to ltconfig. + + * ltconfig.in (hardcode_libdir_flag_spec, export_dynamic_flag_spec): + Use ${wl}, not ${wlarc}. + + * ltmain.in (compile, need_lock): Don't create nor remove lock + files in dry runs. + + * libltdl/ltdl.c (load_deplibs): Don't append shlib_ext; use + lt_dlopenext() instead. + + * ltmain.in (link -static): Don't add $link_static_flag; only + -all-static should do that. + * mdemo/configure.in: Revert part of the previous delta. + + * mdemo/configure.in: Don't use -static on AIX4.1. + * mdemo/Makefile.am: Likewise. + + 2000-09-03 Alexandre Oliva + + * ltconfig.in: Get rid of hardcode_into_libs=all; use + hardcode_into_libs=yes && shlibpath_overrides_runpath!=yes + instead. + [FreeBSD 3.[01]] (shlibpath_overrides_runpath): Set to no. + * ltmain.in: Likewise. + * tests/build-relink.test, tests/build-relink2.test: Adjust. + + * libtool.m4: Fix typo I introduced in yesterday's patch. + + * libltdl/ltdl.c (lt_dlopen): Set dlname from library_names if + dlname is empty. + + * ltdl.m4 (HAVE_LIBDL): Look for dlopen in -lsvld. + * ltconfig.in: Likewise. + + * tests/mdemo-exec.test: Modify failure message. + + * ltmain.in (newdlprefiles): Use dlname if it's available and + old_library isn't; use linklib only if dlname is not available. + + * ltconfig.in (enable_dlopen): Set to no when lt_cv_dlopen is no. + + * libtool.m4: Don't quote CONFIG_SHELL nor ORIGINAL_CONFIG_SHELL. + Quote $@ properly so that the shell expands it, not m4. + + * libtool.m4: Don't quote SHELL when `re-exec'ing, so that SHELL + can be `/path/to/shell -x'. + + * tests/quote.test: Move the match test out of case statements, to + work around bug in /bin/sh of several OSs. + + * ltmain.in (variables_saved_for_relink): Attempt to unset them + instead of setting them to an empty string. + + 2000-09-02 Alexandre Oliva + + * ltconfig.in [with_gnu_ld] (archive_cmds, archive_expsym_cmds) + : Use compiler_flags instead of linker + flags. + Reported by Alex Hornby + + 2000-09-02 Makoto Ishisone + + * libtool.m4 (lt_cv_deplibs_check_method, freebsd): Fix typo, + add support for compact format library. + + 2000-09-02 Alexandre Oliva + + * ltdl.m4: Oops, I had forgotten to commit this part of Syd Polk's + patch from 2000-06-17. + + 2000-09-02 Tom Kacvinsky , Tim Mooney + + * libtool.m4: Ignore Tru64's nm's complaint. + + 2000-09-02 Pavel Roskin + + * ltconfig.in: only load $cache_file if it's a regular file + + 2000-09-02 Assar Westerlund + + * ltconfig.in: Add back ranlib calls for static libraries if there + is a ranlib. + + 2000-08-31 Gary V. Vaughan + + Move the echo detection code to a macro in libtool.m4. The code + at the top ofltconfig.in is ugly, but will go away when the rest + of ltconfig is migrated. + + * Makefile.am (libtool): Pass the value of $ECHO to ltconfig as + an environment variable. + * libtool.m4 (_LT_AC_PROG_ECHO_BACKSLASH): Quote the ECHO value + correctly so that it inserts the correct code into configure.in + suitably quoted for M4 expansion. This code needs to be near + the top of configure.in as it calls itself recursively, so I + am using AC_DIVERSION_NOTICE (or simply NOTICE on CVS + Autoconf). The value of ECHO is also substitued into the + Makefile to be used when Make calls ltconfig to generate + libtool, so another layer of quotation is required for the + Makefile. + (AC_LIBTOOL_SETUP): Use it. + * ltconfig.in: Accept a value for ECHO from the environment, and + carefully substitue for $0 if it is present in the ECHO value. + Because ECHO was quoted for Make, when ltconfig is called by + configure, it is overquoted, and one layer of quotes must be + stripped. + + 2000-08-27 Gary V. Vaughan + + * ltconfig.in (with_gcc): Make the value of this option + available to the generated libtool script. + * ltmain.in (compile_command, finalize_command): The native C + and C++ compilers on IRIX require the -LANG:std in order to to + compile correctly. The same options should _not_ be passed + through to gcc on IRIX, or at all on other architectures for + backwards compatibility (among others). + Reported by Bob Friesenhahn + Reported by Albert Chin-A-Young + + 2000-08-26 Gary V. Vaughan + + * ltconfig.in (old_reload_flag): typo. + + 2000-08-01 Alexandre Oliva + + * ltmain.in (shtool): Use echo|grep instead of expr, as in the + original patch. + + 2000-08-01 Alexandre Oliva + + * ltconfig.in (need_lc): Fix test message. + + 2000-07-24 Mocha + + * ltconfig.in (NetBSD, deplibs_check_method): Use file_magic. + (NetBSD, file_magic_cmd, file_magic_test_file): Set. + + 2000-07-24 Alexandre Oliva , David Kaelbling + + * ltmain.in (irix, major): Prepend a `.'. + * ltconfig.in (irix, soname_spec, library_names_spec): Adjust. + + 2000-07-24 Alexandre Oliva , Ralf S. Engelschall + + * ltmain.in: Support GNU shtool's install. + + 2000-07-24 Alexandre Oliva + + * ltconfig.in (linkopts): Don't set for test. + + 2000-07-24 Nick Hudson + + * ltconfig.in (linkopts): Replace with linker_flags. + + * ltmain.in (ILD): Fix addition of deplibs in relink case. + + 2000-07-18 H.J. Lu + + * ltconfig.in: Check if -lc is necessary for building shared + library. Set build_libtool_need_lc to indicate it. + * ltmain.in: Add -lc when building shared library only if + necessary. + + 2000-07-10 Mo DeJong + + * libtool.m4 (AC_PROG_NM): Fix macro so that it + finds a cross NM on the PATH. + + 2000-07-10 Ken Block + + * libltdl/ltdl.h: Also check for __cplusplus, __STDC__ is not + by Compaq C++ compiler + + 2000-07-10 Alexandre Oliva + + * ltconfig.in (wlarc, netbsd, aout): Set to empty. + (hardcode_dynamic_flag_spec, export_dynamic_flag_spec): Use it. + + * ltconfig.in (dynamic_linker, linux, powerpc): Do not disable + shared libraries just because of MkLinux. + + * libtool.m4 (lt_cv_deplibs_check_method, freebsd): Do not depend + on $version_type; check for ELF support as in other BSDs. + + 2000-06-17 Syd Polk + + * libtool.m4 (AC_LIBTOOL_SETUP): Do not generate a libtool based + on target; use host instead. + + 2000-05-30 Gary V. Vaughan + + * ltconfig.in (ORIGINAL_CONFIG_SHELL): Prevent lossage when + the echo probing code falls into this branch without setting + this variable. + + * ltconfig.in (netbsd*): archive_cmds and archive_expsym_cmds + were reversed with respect to definition of __ELF__. + From Keisuke Inoue + + 2000-05-29 Gary V. Vaughan + + * libtool.m4 (netbsd*): Use -L option to file_magic_cmd as for + freebsd (below). + * libtool.m4 (netbsd ELF): support file_magic. + From Dan Winship . + + 2000-05-29 Steven M. Schultz + + * libtool.m4 (bsdi4*): Add -L option to bsdi4's file_magic_cmd + command. Under BSD/OS 4.1 several libraries are now symlinks + rather than regular files. Adding -L tells the file program + to follow the symlink. + + 2000-05-29 Gary V. Vaughan + + * libtool.m4 (i*86-*-freebsd*): Forgot to changequote(,). + + * NEWS: Updated. + * libtool.m4 (i*86-*-freebsd*): Support a.out shared libs. + From + + 2000-05-29 Fred Fish + + Support AR=mwld AR_FLAGS='-xml -o' for PPC Beos. + * ltconfig (old_AR_FLAGS): Add. + (old_archive_cmds): Use AR_FLAGS rather than hardcoding "cru". + (archive_cmds): Use AR_FLAGS rather than hardcoding "cru". + (AR_FLAGS): Default to "cru" if not set. + + 2000-05-29 Gary V. Vaughan + + * ltconfig.in (echo): The following code actually prints the + double quotes -- so I removed them: + echo='printf "%s\n"' /bin/ksh -c '$echo \\t' + From Tuukka Toivonen + + * NEWS: Updated. + + 2000-05-29 Bernhard Rosenkraenzer + + * libtool.m4: adding ia64 as supported linux platform + + 2000-05-29 Michael Matz + + * ltmain.in: fix quoting for $var_value. + + * ltconfig.in: check for dlfcn.h: include return value + to make -Wall in CFLAGS work. + + 2000-05-27 Gary V. Vaughan + * README-alpha: note new location of config.(guess|sub). 2000-05-27 Chad Cunningham ! * ltconfig.in (rhapsody*): New Port. * ltmain.in (rhapsody*): ditto. *************** *** 21,45 **** * ltconfig.in (*-sequent-sysv4): New Port. 2000-05-14 Alexandre Oliva * libtool.m4 (AC_LIBLTDL_CONVENIENCE, AC_LIBLTDL_INSTALLABLE): Pick LIBLTLD from top_builddir and INCLTDL from top_srcdir. * mdemo/configure.in: Remove comments on AC_LIBLTLD_CONVENIENCE. ! 2000-05-03 John Wehle (john@feith.com) ! * ltconfig.in (hpux10.20*): use file_magic for ! inter-library dependency tracking. ! 2000-05-02 Gary V. Vaughan ! * AUTHORS: Update my email address. ! * commit: ditto. ! * ltconfig.in (linux-gnu*, deplibs_check_method): Use pass_all. ! Reported by Michael Deutschmann 1999-12-12 Gary V. Vaughan --- 1183,1816 ---- * ltconfig.in (*-sequent-sysv4): New Port. + 2000-05-17 Gary V. Vaughan + + * ltmain.in: cygwin-1.1.0 and higher no longer grok backslash path + separators. + 2000-05-14 Alexandre Oliva * libtool.m4 (AC_LIBLTDL_CONVENIENCE, AC_LIBLTDL_INSTALLABLE): Pick LIBLTLD from top_builddir and INCLTDL from top_srcdir. * mdemo/configure.in: Remove comments on AC_LIBLTLD_CONVENIENCE. + + * libtool.m4 (_AC_PROG_LIBTOOL): Renamed from... + (AC_PROG_LIBTOOL): Just AC_REQUIRE(_AC_PROG_LIBTOOL), to avoid + effects of multiple runs. + + 2000-05-11 Thomas Tanner + + * NEWS: update + * doc/libtool.texi (libltdl): rename lt_(find|next|add|remove)_dlloader + to lt_dlloader_* + * libltdl/ltdl.c: ditto + * libltdl/ltdl.h: ditto, add declaration of lt_dlloader_(find|remove) + + 2000-05-06 Pavel Roskin + + * libltdl/ltdl.c: Typo. + + * libtool.m4 (AC_LIBTOOL_SETUP): CVS autoconf no longer sets + target to "NONE", but to an empty string. + + 2000-05-05 Paul Sokolovsky + + * ltdl.c: support lt_dlopen(0) for win32 + + 2000-05-03 Thomas Tanner + + * doc/libtool.texi (libltdl): fix typos, + INCLTDL starts with top_srcdir, replace NULL with @code{NULL} + + * ltmain.in (ILD): search in newlib_search_path, too + + * ltmain.in (ILD): fix bugs in conv pass, expand convenience + libs to deplibs and link them later on + + * ltmain.in (ILD): don't allow convenience libs to be + -dlopen/preopen'ed + + * ltmain.in (ILD): it's not required to link all deplibs + in fast-install mode + + * ltmain.in (ILD): if hardcode_into_libs=all, only relink + a library if it is linked against uninstalled libtool libraries, + rename link_against_libtool_libs to uninst_deplibs + + * ltmain.in (ILD): tidy up, add some comments + + 2000-05-03 John Wehle (john@feith.com) + + * libtool.m4 (hpux10.20*): use file_magic for + inter-library dependency tracking. + + 2000-05-02 Gary V. Vaughan + + * AUTHORS: Update my email address. + * commit: ditto. + + 2000-04-11 Thomas Tanner + + * NEWS: update + * libtool.m4: add AC_LIBTOOL_PICMODE + * ltconfig.in: move pic_mode checks to ltmain.in + * ltmain.in: add -prefer-pic and -prefer-non-pic + + 2000-03-29 Alexandre Oliva + + * ltmain.in (tmpdir): Do not accept an existing directory, and + force its mode to 700, for security reasons. + Reported by Joseph S. Myers + + 2000-03-27 Thomas Tanner + + * NEWS: reformatting + + * ltmain.in (ILD): add extra convenience library scanning pass + + * ltmain.in (ILD): accept -R flags for libraries, too + + * ltmain.in (ILD): correclty merge the dlpreopened libraries + with deplibs + + * ltmain.in (install mode): remove directories from filenames + before relinking (reported by Elrond ) + + * doc/libtool.texi (libltdl): rename Library -> Lesser, + clarify exception clause + * libltdl/ltdl.c, libltdl.h (License): ditto + + 2000-03-21 Alexandre Oliva + + * ltconfig.in (variables_saved_for_relink): Set to `PATH + $shlibpath_var $runpath_var'. If with_gcc, add gcc-related + environment variables. Add it to the configuration section. + * ltmain.in (relink_command): Expand those variables. + + 2000-03-14 Christopher A. Knight + + * ltconfig.in: added main() definition in compile + check for header `dlfcn.h' to fix link errors + when built with Sun Workshop Pro CC 4.2 (and perhaps + others). + + 2000-02-03 Gary V. Vaughan + + * libltdl/ltdl.c (lt_find_dlhandle): Deleted. This was B.S. + far cleaner to use lt_dlforeach and lt_dlgetinfo. + * libltdl/ltdl.h: Prototype deleted. + * doc/libtool.texi: Documentation deleted. + * NEWS: annoncement deleted. + + 2000-02-23 Thomas Tanner + + * ltmain.in: remove duplicates from deplibs, handle + interdependent libraries (e.g. -la -lb -la), + this requires adding deplibs in reverse order + + * ltmain.in: link dlpreopened libraries before other libraries + (reported by Pavel Roskin) + * mdemo/Makefile.am: build and link libsub.la + * mdemo/sub.c: new file used by both dlopened modules + * mdemo/foo*: use sub() defined in libsub + * tests/dryrun.test: build libsub.la + + * mdemo/Makefile.am: always link mdemo.static with -static + * mdemo/configure.in: ditto + + * ltmain.in: fix dlopen/dlpreopening of objects + + * ltmain.in (ILD): fix misplaced `continue' in -R* argument handler + + * ltmain.in: merge duplicated code of clean and uninstall mode + + * libtool.m4: recognize powerpc*linux* (reported by + Dirk A. Mueller ) + + 2000-02-23 Gary V. Vaughan + + * ltconfig.in (old_MAGIC, old_STRIP, old_reload_flag, + old_deplibs_check_method, old_file_magic_cmd): New variabes. + Treat these as old_CC etc. + (STRIP, MAGIC): Create and set these variables in the generated + libtool script. + Reported by Pavel Roskin + + * configure.in: Due to a bug in autoconf-2.13 implementation of + AC_SUBST, `AC_SUBST(FILE)' can never work. Use MAGIC as the + holder of the command to run in file_magic_cmd instead. + * ltconfig.in: s/FILE/MAGIC/g. + * libtool.m4 (AC_PROG_LIBTOOL): set MAGIC in the environment when + calling ltconfig. + (AC_PATH_MAGIC): renamed from AC_PATH_FILE. + (AC_PATH_TOOL_PREFIX): s/FILE/MAGIC/g. Also set file_magic_cmd + to '${MAGIC}' so that make can grok it. + * Makefile.am (libtool): + (clibtool): ditto. + + 2000-02-21 Gary V. Vaughan + + * libltdl/ltdl.c (lt_find_dlhandle): New function. + (tryall_dlopen): Use it. + * libltdl/ltdl.h: Prototype it. + * doc/libtool.texi: Document it. + * NEWS: updated. + + * libltdl/ltdl.c (lt_dlinit): removed unused variable, `loader'. + + * libltdl/ltdl.c (lt_remove_dlloader): typo, s/=/==/g. + + 2000-02-03 Gary V. Vaughan + + * libltdl/ltdl.h (lt_dlloader_data_t): New type for loader + instance data. + (lt_user_dlloader): New lt_dlloader_data_t field. + (lt_module_open_t): Add lt_dlloader_data_t parameter. + (lt_module_close_t): Add lt_dlloader_data_t parameter. + (lt_find_sym_t): Add lt_dlloader_data_t parameter. + (lt_dlloader_exit_t): Add lt_dlloader_data_t parameter. + * libltdl/ltdl.c: A sprinkling of /*ARGSUSED*/ markers to + reassure lint that the unused arguments are intentional. + (lt_dlloader_t): New lt_dlloader_data_t field. + (lt_dlloader_data): New function to return the contents of the + dlloader_data field. + (sys_dl_open): Take an additional lt_dlloader_data_t argument. + (sys_dl_close): Ditto. + (sys_dl_sym): Ditto. + (sys_dl): Initialise lt_dlloader_data_t field. + (sys_shl_open, sys_shl_close, sys_shl_sym, sys_shl): As above. + (sys_wll_open, sys_wll_close, sys_wll_sym, sys_wll): As above. + (sys_bedl_open, sys_bedl_close, sys_bedl_sym, sys_bedl): As + above. + (sys_dld_open, sys_dld_close, sys_dld_sym, sys_dld): As above. + (presym_init, presym_exit, presym_open, presym_close, presym_sym, + presym): As above. + (lt_dlinit): Call presym_init with additional argument. + (lt_dlexit): Call dlloader_exit method with additional argument. + (tryall_dlopen): Call module_open method with additional argument. + (lt_dlclose): Call module_close method with additional argument. + (lt_dlsym): Call find_sym method with additional argument. + (lt_add_dlloader): Initialise dlloader_data field. + (lt_remove_dlloader): Call dlloader_exit method with additional + argument. + + * libltdl/ltdl.c (find_file): Prevent early release of memory + in filename/*pdir. + From Jon Leichter + + (sys_wll_init): Deleted. No longer required. And this time, + with feeling! + (sys_wll_exit): Ditto. + + 2000-02-02 Gary V. Vaughan + + * NEWS: updated. + * doc/libtool.texi (Libltdl interface): Moved user defined module + loader documentation from here... + (Module loaders for libltdl) ...to here, and updated the text and + added examples. + * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. + * libltdl/ltdl.h: Reformatted and commented for readability. + (struct lt_user_dlloader): New data type for passing + initialisation pointers to lt_add_dlloader. + (LTDL_ERROR_INVALID_LOADER): New error message when non loader + handles are passed to the user loader API. + (LTDL_ERROR_INIT_LOADER): New error when loader initialisation + fails. + (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. + (lt_module_open_t): renamed from lt_lib_open_t. + (lt_module_close_t): renamed from lt_lib_close_t. + (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. + * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" + loader no longer occurs before "dlopen" on some platforms and + after it on others. + (lt_dlloader_t): Moved here from ltdl.h, added a field, + "loader_name", for identifying the loader, and renamed from + lt_dltype_t. Renamed type variables to loader IFF of type + lt_dlloader_t. + (lt_module_t): Renamed from lt_syshandle. Renamed handle variables + to module IFF of type lt_module_t. + (LTDL_TYPE_TOP): Deleted. No longer required. + (sys_dl): Initialised as a struct lt_user_dlloader. + (sys_dl_init): Deleted. No longer required. + (sys_dl_exit): Ditto. + (sys_shl): Initialised as a struct lt_user_dlloader. + (sys_shl_init): Deleted. No longer required. + (sys_shl_exit): Ditto. + (sys_wll): Initialised as a struct lt_user_dlloader. + (sys_wll_init): Deleted. No longer required. + (sys_wll_exit): Ditto. + (sys_bedl): Initialised as a struct lt_user_dlloader. + (sys_bedl_init): Deleted. No longer required. + (sys_bedl_exit): Ditto. + (sys_dld): Initialised as a struct lt_user_dlloader. + (sys_dld_init): Deleted. No longer required. + (sys_dld_exit): Ditto. + (sys_presym): Initialised as a struct lt_user_dlloader. + (lt_mod_init_t): Moved to here from ltdl.h. + (lt_dlinit): Add builtin loaders using the user loader API. + (lt_dlexit): Unregister and free all loaders. + (lt_add_dlloader): New function to add a new module loader after the + loader specified in the argument. + (lt_remove_dlloader): New function to remove a module loader. + (lt_next_dlloader): New function for iterating over module loaders. + (lt_dlloader_name): Accessor function for name of dlloader. + (lt_find_dlloader): New function to get a reference to a registered + module loader. + (strcmp): static implementation incase the host has none. + (lt_dlgettypes, lt_dlsettypes): Removed. + + 2000-02-02 Thomas Tanner + + * libltdl/ltdl.c: replace NULL with 0, remove unused system + and app_private pointers from lt_dlhandle_t + * libltdl/ltdl.c (presym_add_list): new preloaded symbols + don't need to be added to the end + + * libltdl/ltdl.c (lt_dlgetdata, lt_dlsetdata): removed + * libltdl/ltdl.h: ditto + * doc/libtool.texi (libltdl interface): ditto + + 2000-02-01 Thomas Tanner + + * ltmain.in: support -dlopen/dlpreopen for libraries + * NEWS: updated + * TODO: updated + * ltmain.in: rename dlopen to dlopen_support + * ltconfig.in: ditto + * doc/libtool.texi: ditto + + * ltmain.in: check whether libraries are moved out of $libdir, + replace .a and .lib with .$libext, .o and .obj with .$objext + + 2000-01-31 Gary V. Vaughan + + * libltdl/ltdl.h (lt_dlrealloc): removed declaration. + * libltdl/ltdl.c (lt_dlrealloc): removed definition. + (lt_dladderror): Instead of calling lt_dlrealloc, use lt_dlmalloc, + and lt_dlfree. + + 2000-01-30 Ossama Othman + + * libtool.m4 (lt_cv_cc_needs_belf): Set the test language to C + prior to executing the test that checks if the C compiler needs + "-belf." + Reported by Chris Butler + + 2000-01-28 Gary V. Vaughan + + * libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Use changequote to + protect `[' and `]' in deplibs_check_method. + + * libltdl/ltdl.h (lt_dlrealloc): Added declaration. + * libltdl/ltdl.c (lt_dlrealloc): Added default definition. + + * libltdl/ltdl.c (lt_dlseterror): Catch errorcodes below 0 as + invalid. + * libltdl/ltdl.h (LTDL_ERROR): Added missing '_' in K&R + definition. + + * libltdl/ltdl.h (ltdl_error_table): Added missing error code, and + fixed typo in another code. + * doc/libtool.texi (Libltdl interface): Added missing @end + clause. + + 2000-01-27 Thomas Tanner + + * ltconfig.in: Oops, replace the remaining $objdir's + + * ltmain.in: merge library linking code of programs and libraries, + some cleanups + + 2000-01-27 Gary V. Vaughan + + * NEWS: Updated. + * doc/libtool.texi (Libltdl interface): Document new entry + points. + * libltdl/ltdl.c (lt_dladderror): New function to add a user + defined error message to the tables used by lt_dlerror(). + (lt_dlseterror): New function to allow setting of last_error by + user modules. + (ltdl_error_strings): New preprocessor generated table of internal + error diagnostic strings. + (user_error_strings): New internal list of registered user error + diagnostic strings. + (throughout!): Use error messages from ltdl_error_strings. + * libltdl/ltdl.h (ltdl_error_table): New macro to tabulate + internal diagnostic error strings alongside enum keys. + + * NEWS: Updated. + * doc/libtool.texi (Libltdl interface): Document new entry + points. + * libltdl/ltdl.c (lt_dltype_t): Use new type definitions for + existing fields. + (lt_dladdtype): New function to add a new ltdl dynamic loader + type to the end of the list of valid types.. + (lt_dlgettypes): New function to return the complete list of ltdl + dynamic loader types. + (lt_dlsettypes): New function to replace the list of ltdl dynamic + loader types entirely -- e.g. to prepend a new type to the + existing list. + (sys_dl_open, sys_dl_close, sys_dl_sym): Work with lt_syshandle. + (sys_shl_open, sys_shl_close, sys_shl_sym): ditto. + (sys_dld_open, sys_dld_close, sys_dld_sym): ditto. + (sys_wll_open, sys_wll_close, sys_wll_sym): ditto. + (sys_bedl_open, sys_bedl_close, sys_bedl_sym): ditto. + (presym_open, presym_close, presym_sym): ditto. + (tryall_dlopen): Call lt_lib_open_t functions lt_syshandle + compatibly. + (lt_dlclose): Call lt_lib_close_t functions lt_syshandle + compatibly. + (lt_dlsym): Call lt_find_sym_t functions lt_syshandle compatibly. + (lt_dltype_t): moved type declaration from here... + * libltdl/ltdl.h (lt_dltype_t): ...to here. + (lt_syshandle): new type for low level system handles passed by + loader functions + (lt_mod_init_t): New type for functions implementing the + initialisation for an ltdl dynamic loader. + (lt_mod_exit_t): Type of exit functions for the same. + (lt_lib_open_t): Type of loader functions for the same. + (lt_lib_close_t): Type of unloader functions for the same. + (lt_find_sym_t): Type of symbol resolver functions for the same. + + * libltdl/ltdl.c (sys_dl_init, sys_dl_exit, sys_dl_open, + sys_dl_close, sys_dl_sym): Preprocess these away on cygwin to + avoid spurious error messages. + + 2000-01-24 Thomas Tanner + + fix severe bugs reported by Elrond + + * ltconfig.in: replace $objdir with $output_objdir + + * ltmain.in: change to the builddir before relinking programs + + * ltmain.in, ltconfig.in, libtool.m4, ltdl.m4: + remove unnessary spaces from line endings + + 2000-01-19 Thomas Tanner + + * ltmain.in: rewrite of the ILD code, merge linking code for + programs, libraries and objects, allow linking of shared libraries + against static libraries/objects on platforms that support it + but print a warning, fix some typos + + * partially revert my previous change and + update only copyright notices of files that were actually modified + + * NEWS: update + + * libltdl/Makefile.am: version number was wrong + + * libltdl/ltdl.c (tryall_dlopen): revert Gary's change + since it breaks dlpreopening + * ltdl.m4: ditto + + * libltdl/ltdl.c (sys_search_path): search in the system default + library search path, too + * ltdl.m4 (AC_LTDL_SYSSEARCHPATH): extract the path + + * libltdl/ltdl.c (find_module): remove bogus file_not_found_error + + * libltdl/ltdl.c (load_deplibs): implement loading of dependency + libraries + * libltdl/ltdl.c (unload_deplibs): implement unloading of dependency + libraries + * libltdl/ltdl.c (lt_dlexit): correctly close all modules and + their dependencies + + * libltdl/ltdl.c (lt_dlforeach): new function + * libltdl/ltdl.h: ditto + * doc/libtool.texi (using libltdl): document it + + * libtool.m4: reformatting, only add -I$topsrc_dir/libltdl to + INCLTDL + + * libtoolize.in: reformatting + * ltconfig.in: reformatting + * ltmain.in: reformatting + + * mdemo/configure.in: AC_SUBST INCLTDL + * mdemo/Makefile.am: use INCLTDL + + * tests/Makefile.am: reexport OBJEXT and EXEEXT + * tests/dryrun.test: use them for building main.obj and mdemo.exe + + 2000-01-17 Gary V. Vaughan + + * libltdl/ltdl.c (tryall_dlopen): Abort with + file_not_found_error before trying all lib_open() methods + if the file to be dlopened doesn't exist. + * ltdl.m4 (AC_HAVE_HEADERS): add unistd.h. + + 2000-01-16 Gary V. Vaughan + + * libltdl/ltdl.c (find_file): memory error fixed. + + 2000-01-14 Gary V. Vaughan + + * ltconfig.in (Usage): Now it matches the code! + Reported by Jon Leichter + + * README: Some notes about libtool release numbers. + + * mdemo/README: Explain the deliberate incompleteness of the + Windows port. + * mdemo/configure.in: Use AC_LIBTOOL_WIN32_DLL. + * mdemo/Makefile.am (LDFLAGS): Add -no-undefined. + + * libltdl/ltdl.h (LTDL_STMT_START, LTDL_STMT_END): Macros for + wrapping other macros to make a portable compound statement from + multiple C statements in the expansion. + (LTDL_SET_PRELOADED_SYMBOLS): Use the above macros to add an + extern declaration for lt_preloaded_symbols, to remove + dependency on undefined symbol from libltdl.dll on cygwin (and + other -no-undefined architectures). + * libltdl/ltdl.c (lt_preloaded_symbols): No longer defined here. + + * libtool,m4 (AC_LIBTOOL_SETUP): The result of lt_cv_need_dllmain + was set to the opposite of what it should be. + * configure.in (AC_LIBTOOL_WIN32_DLL): Call to this macro is + required for libtool configury to test lt_cv_need_dllmain on + Windows. + + * ltconfig.in (opt_cr, mingw*): replace unescaped ? with correctly + escaped and portable \{0,1\} in sed expression. + From Jon Leichter + + 2000-01-13 Gary V. Vaughan + + * libtool.m4 (AC_LIBLTDL_CONVENIENCE): Add -I${top_srcdir}/libltdl + to default INCLTDL for VPATH. + (AC_LIBLTDL_INSTALLABLE): ditto. + Reported by Tom Tromey + + 2000-01-12 Thomas Tanner + + * update all copyright notices to 2000 + + * doc/libtool.texi (using libltdl): document new lt_dlinfo struct, + replace NULL with @code{NULL}, document lt_dlsetdata(), + lt_dlgetdata() and lt_dlgetinfo() + * libltdl/Makefile.am: increment interface version number + * libltdl/configure.in: set version number to 1.1 + * libltdl/ltdl.c: make some variables public by moving them + to the info struct, add support for application specific data + within module handles, new lt_dlsetdata(), lt_dlgetdata() and + lt_dlgetinfo() functions, + fix memory leaks, minor cleanups + * libltdl/ltdl.h: ditto + * mdemo/main.c: demonstrate use of lt_dlgetinfo, + improved handling of errors + + * ltconfig.in: set hardcode_into_libs = yes for GNU/Hurd, Linux + and Solaris, only hardcode *all* run-paths if hardcode_into_libs + is set to 'all', otherwise hardcode only user-specified rpaths + into libraries + * ltmain.in: minor cleanups, we don't need to add user-specified + rpaths to compile_rpath, finalize_rpath is sufficient + + * ltconfig.in: transform linux* -> *linux-gnu* _after_ host_os has + been set! (reported by Bruno Haible ) + + * configure.in: AC_SUBST reload_flag, deplibs_check_method + and file_magic_cmd + + * README: use 'libtool --version' instead of 'ltconfig --version' + (suggested by Francios Pinard + + 2000-01-10 Gary V. Vaughan + + * libltdl/ltdl.h (LTDL_DIRSEP_CHAR): Leave undefined when + not compiling for a Windows target. + * libltdl/ltdl.c (canonicalize_path): New function to + ensure internal paths use '/' directory separators. + (find_file): use canonicalize_path. Memory management + changed to cope. + (lt_dlopen): ditto. + (free_vars): Removed `dir' and `name', which are now handled + internally. + + * libltdl/ltdl.h (LTDL_DIRSEP_CHAR): Define to '/' or '\\', + as suitable for the target host. + (LTDL_PATHSEP_CHAR): Similarly with ':' or ';'. + * libltdl/ltdl.c: Use LTDL_DIRSEP_CHAR and LTDL_PATHSEP_CHAR + instead of hardcoding throughout. + Reported by Jon Leichter + + 1999-12-18 Alexandre Oliva + + * ltmain.in: Oops, `largarg' -> `lastarg'. + + * ltmain.in (-Wc, -Xcompiler): Implemented in compile mode. + + * ltmain.in (-Xcompiler, -Xlinker): Add to compile_command and + finalize_command. + (-Wc, -Wl): Likewise. + + * tests/quote.test: Adjust quoting style of -Wl. + + * ltmain.in: Oops, `echo' -> `$echo'. + + * ltmain.in (-Wl, -Wc): Make commas argument separators, just like + in gcc. + + * ltmain.in (libtool_args): Get all arguments properly enclosed in + quotes and backslash-protected when needed. + + 1999-12-16 Alexandre Oliva + + * ltdl.m4: Renamed from... + * libltdl/ltdl.m4: that no longer exists. + * configure.in (ACINCLUDE_M4_LIST): Removed libltdl/acinclude.m4. + * Makefile.am (aclocal_macros): Added ltdl.m4. + (libltdl/acinclude.m4): Concatenate libtool.m4 and ltdl.m4. + * bootstrap: Likewise. + * libltdl/Makefile.am (ACLOCAL): Remove the definition. Relying + upon -I may lead to duplicates. + * doc/libtool.texi: Suggest appending ltdl.m4 to acinclude.m4. + * libtoolize.in: Check AC_LIB_LTDL version number in aclocal.m4. + + * libltdl/configure.in (with_auxdir): Do not use it as the + argument of AC_CONFIG_AUX_DIR, automake requires a literal here. + Use AC_CONFIG_AUX_DIRS/DIR_DEFAULT instead. + + * libltdl/Makefile.am (ACLOCAL): Define with `-I .', as in + bootstrap. + + 1999-12-15 Thomas Tanner + + * libltdl/configure.in: path to auxiliary files can be specified + using --with-auxdir (idea by Howard Chu ) ! * ltmain.in: don't remove multiple occurences from dependency_libs ! of a library, otherwise many dependencies would get lost ! * bootstrap: use "aclocal -I ." instead of adding the contents ! of ltdl.m4 to acinclude.m4 ! 1999-12-13 Gary V. Vaughan ! * NEWS: updated. ! * libltdl/Makefile.am: Use -no-undefined for dll compliance. ! * libltdl/configure.in: Use AC_LIBTOOL_WIN32_DLL for dll ! compliance. ! * libltdl/ltdl.c: Define and use LTDL_GLOBAL_DATA to correctly ! export global data symbols from libtldl.dll. ! * libltdl/ltdl.h: Define and use LTDL_SCOPE to declare data ! symbols as dllexport, dllimport or plain ornary extern depending ! in the context in which it is used. ! ! * doc/libtool.texi (Distributing libltdl): document use of ! ltdl.m4. ! * libltdl/configure.in: Removed header checks, as they are ! automatically performed by AC_LIB_LTDL. ! * libltdl/ltdl.m4: Added header checks from configure.in, so that ! AC_LIB_LTDL is sufficient to compile ltdl.c. ! Reported by Stephan Kulow . ! * ltconfig.in (ltdll_obj): fixed typo: objdir -> $objdir 1999-12-12 Gary V. Vaughan *************** *** 48,78 **** (cygwin*, mingw*, archive_expsym_cmds): Honor any DATA tags found in the symbol list. Reported by Jon Leichter . - - 1999-12-07 Gary V. Vaughan - - * configure.in: bumped version to 1.3.4a ! GNU libtool 1.3.4 was released. ! * config.guess: updated from autoconf cvs. ! * config.sub: ditto. ! * NEWS: inserted todays date. ! * configure.in: bumped version to 1.3.4. ! * doc/PLATFORMS: tested on all the machines I have access to. 1999-12-06 Gary V. Vaughan From Tim Mooney * ltconfig.in: split off the osf3 section, so that the osf4 and osf5 sections can add `-msym' to arguments passed to the linker for shared libs. - 1999-12-03 Gary V. Vaughan - - * ltconfig.in (hardcode_into_libs): Remove the commented out - hardcode_into_libs reference. Doh! - 1999-12-03 Alexandre Oliva * ltconfig.in (ac_compile): Use $ac_ext instead of .c. --- 1819,1845 ---- (cygwin*, mingw*, archive_expsym_cmds): Honor any DATA tags found in the symbol list. Reported by Jon Leichter . ! 1999-12-10 Gary V. Vaughan ! From Stephan Kulow ! * libltdl/ltdl.m4: Add arg 3 to AC_DEFINE's to save the user ! from having to hack acconfig.h. 1999-12-06 Gary V. Vaughan + * NEWS: Updated. + * TODO: Note some cleanups that are now needed. + * libltdl/configure.in: Use the new macroised tests. + * libltdl/ltdl.m4: New file, macroised tests formerly in + libltdl/configure.in. + Reported by Stephan Kulow . + From Tim Mooney * ltconfig.in: split off the osf3 section, so that the osf4 and osf5 sections can add `-msym' to arguments passed to the linker for shared libs. 1999-12-03 Alexandre Oliva * ltconfig.in (ac_compile): Use $ac_ext instead of .c. *************** *** 80,86 **** (dlfcn.h, ac_try): Do not add filename, it is already in ac_compile. Reported by Stephane Conversy ! * ltconfig.in (linux-gnu*): Disable hardcode_into_libs until it works together with fast_install. --- 1847,1853 ---- (dlfcn.h, ac_try): Do not add filename, it is already in ac_compile. Reported by Stephane Conversy ! * ltconfig.in (linux-gnu*): Disable hardcode_into_libs until it works together with fast_install. *************** *** 93,99 **** here. * libtool.m4: Do not AC_SUBST anything other than LIBTOOL. ! 1999-11-29 Gary V. Vaughan * ltconfig.in: Be friendlier to C++ compilers when testing --- 1860,1870 ---- here. * libtool.m4: Do not AC_SUBST anything other than LIBTOOL. ! ! 1999-11-20 Michael Forster ! ! * ltconfig.in (linux-gnu*): Set hardcode_into_libs=yes. ! 1999-11-29 Gary V. Vaughan * ltconfig.in: Be friendlier to C++ compilers when testing *************** *** 106,116 **** cross compilation. Reported by Sam Latinga 1999-11-02 Thomas Tanner * NEWS: updated ! * ltmain.in: preserve $CC (reported by Tom Tromey) ! * ltconfig.in: remove second occurence of sysv5 * libltdl/Makefile.am: increment version number, fix typo * libltdl/ltdl.c (lt_dlsym): don't report an error if the libltdl-style symbol name wasn't found --- 1877,1915 ---- cross compilation. Reported by Sam Latinga + 1999-11-16 Thomas Tanner + + * configure.in: generate ltconfig and ltmain.sh before configuring + libltdl + + 1999-11-04 Alexandre Oliva + + * tests/sh.test: New test to detect uses of quotes within + backticks within quotes. + * ltconfig.in, ltmain.in: Fix detected errors. Mark false + positives with a comment that disables the detector. + Reported by Akim Demaille + + * configure.in: Move ltconfig and ltmain.sh generation back... + * Makefile.am: here. + 1999-11-02 Thomas Tanner * NEWS: updated ! * THANKS: added Olly Betts and Pavel Roskin ! * doc/libtool.texi: fix typo ! ! * fix major bugs which rendered libtool virtually ! unusable (i.e. not portable): ! * ltconfig.in: don't hardcode system dependent variables in ltconfig!! ! but set sane defaults ! * Makefile.am: pass variables from AC_LIBTOOL_SETUP to ltconfig ! * libtool.m4: ditto, fix typo in AC_PROG_LD_RELOAD_FLAG ! ! * ltconfig.in: use old_deplibs for archives, too ! remove second occurence of sysv5 ! * ltmain.in: fix typo, fix the second occurence of -DPIC, too ! * libltdl/Makefile.am: increment version number, fix typo * libltdl/ltdl.c (lt_dlsym): don't report an error if the libltdl-style symbol name wasn't found *************** *** 119,134 **** --- 1918,2047 ---- * ltconfig.in: add support for Unixware (sysv4.2uw2*) + 1999-10-29 Gary V. Vaughan + + * ltmain.in: Damnit! Cygwin cvs committed all the + dos line endings. + 1999-10-28 Stephane Conversy * ltmain.in (-DPIC): changed the order of pic flags a little to prevent upsetting the sgi c++ compiler. + 1999-10-28 Olly Betts + + * ltconfig.in (opt_cr): Handle crlf sequences output by the + mingw toolchain. + + * libtool.m4: Third time lucky, with Tor's patch. + + 1999-10-19 Tor Lillqvist + + * libtool.m4: these was a missing `*' in the -mno-cygwin + match. + * ltconfig.in (cygwin, ltdll_obj): fixed a quoting error. + (export_symbols_cmds): added missing cosmetic newline. + + 1999-10-18 Tor Lillqvist + + * libtool.m4: test command used == which should be =. + Support -mno-cygwin flag for building mingw32 dlls. + * ltconfig.in (file_magic_cmd): add missing quotes. + (deplibs_check_method): and here. + + 1999-10-16 Alexandre Oliva + + * libltdl/ltdl.c (lt_dlopen): Do not search paths when the + specified library is not just a basename. + + 1999-10-10 Gary V. Vaughan + + * libtool.m4 (AC_PATH_FILE): new macro replaces + AC_PATH_TOOL_GREP_OUTPUT. + (AC_PATH_TOOL_PREFIX): new macro replaces + AC_PATH_PROG_GREP_OUTPUT. + (AC_LD_RELOAD_FLAG): migrated from ltconfig.in. + (AC_DEPLIBS_CHECK_METHOD): ditto. + * ltconfig.in (reload_flag): moved to libtool.m4. + (deplbs_check_method): ditto. + + 1999-10-07 Gary V. Vaughan + + * libtool.m4 (AC_PATH_PROG_VERSION_GREP): removed in favour of the + more general AC_PATH_PROG_GREP_OUTPUT. + (AC_PATH_TOOL_VERSION_GREP): removed in favour of the more general + AC_PATH_TOOL_GREP_OUTPUT. + (AC_PROG_LIBTOOL): Search for a working find program in the + user's PATH using the new macros. + + 1999-10-06 Gary V. Vaughan + + * NEWS: updtaed. + * ltconfig.in: Accept osf5. + Reported by Sascha Schumann + + 1999-10-04 Gary V. Vaughan + + * ltmain.in (-no-install): This doesn't work on win32 since + the search path for libraries is not encoded in the binary, + and dlls not in $PATH won't be found. Fall back to -no-fast-install + instead. + + * ltmain.in (-no-fast-install): Wrapper script used to add the + exeext on again when naming the wrapped executable. + + 1999-10-03 Gary V. Vaughan + + * ltconfig.in: Set $FILE to @FILE@ for substitution with + the value found in libtool.m4 at configure time. + * libtool.m4 (AC_PATH_TOOL_GREP_VERSION): New macro, combines + AC_PATH_PROG and AC_CHECK_TOOL with a test which greps the + output of $ac_dir/${ac_prefix} --version for a + given regex. + (AC_PATH_PROG_GREP_VERSION): New macro used by the above. + (AC_LIBTOOL_SETUP): Use the new macros to search the PATH + [starting at /usr/bin] for a file program which accepts + --version and has "file" in its --version output. + + 1999-10-03 Thomas Tanner + + * NEWS: new -no-install flag + * configure.in: fix typo + * doc/libtool.texi(Link mode): document -no-install flag, + correct -no-fast-install docs + * libtool.m4: check for "file" command + * ltconfig.in: don't hardcode /usr/bin/file, remove second + definition of sysv5, replace linkopts -> linker_flags + * ltmain.in: add new -no-install flag, print help for -no-install + and -no-fast-install flags + + 1999-10-03 Olly Betts + + * ltmain.in: always create output_objdir + 1999-10-03 Pavel Roskin * libltdl/Makefile.am: don't preserve file attributes when installing the libltdl sources + 1999-10-01 Gary V. Vaughan + + * configure.in (AC_OUTPUT_COMMANDS): generate ltmain.sh + * Makefile.am (ltmain.sh ltconfig): removed. Automake inserts the + rules to automatically call config.status. + + * libtool.m4: be sure to AC_SUBST values no longer tested in + ltconfig.in. + * ltconfig.in: replaced several of the simple feature tests with + substitutions from config.status. + * Makefile.am (ltconfig): generate ltconfig with config.status. + * configure.in (AC_OUTPUT): generate ltconfig with config.status. + + 1999-09-30 Donald Anderson + + * ltconfig.in (sco3.2v5): use pass_all deplibs_check_method + for SCO3.2. + 1999-09-29 Gary V. Vaughan * ltconfig.in (whole-archive-flag-spec): I had been *************** *** 140,172 **** * ltconfig.in (sysv): More UW7 support. 1999-09-27 Manfred Weichel * ltconfig.in (sysv5): Added support required for shared library linking on SCO UW7. 1999-09-14 Alexandre Oliva * ltconfig.in (CDPATH): Set to `:' instead of empty. * ltmain.in (CDPATH): Likewise. Reported by Greg McGary 1999-08-24 Thomas Tanner * ltconfig.in: use CC -E when checking for ELF support ! on NetBSD (reported by Todd Vierling ) 1999-08-24 Boyd Gerber * ltconfig.in: add support for UnixWare 7.X.X 1999-08-24 Pavel Roskin * doc/libtool.texi: document use of noinst_LTLIBRARIES for convenience libraries - - * ltconfig.in: check for freebsdelf3, not just freebsd3 * ltmain.in: enable workaround for freebsdelf3.0 1999-08-24 Bert Driehuis --- 2053,2115 ---- * ltconfig.in (sysv): More UW7 support. + 1999-09-28 Albert Cheng + + * ltmain.in (shlibpath_var): ensure the variable is non-empty before + exporting it. + 1999-09-27 Manfred Weichel * ltconfig.in (sysv5): Added support required for shared library linking on SCO UW7. + 1999-09-22 Gary V. Vaughan + + * ltconfig.in (whole-archive-flag-spec): test whether the + version of GNU ld being used understands --whole-archive + before using it. + + 1999-09-19 Thomas Tanner + + * ltmain.in: don't ignore convenience libraries for objects/archives + (temporary hack) + 1999-09-14 Alexandre Oliva * ltconfig.in (CDPATH): Set to `:' instead of empty. * ltmain.in (CDPATH): Likewise. Reported by Greg McGary + 1999-08-24 Gary V. Vaughan + + * ltconfig.in (ltdll.c, impgen.c): Prevent the shell from + expanding variables & backslash escapes when writing these + files to the libtool script. + 1999-08-24 Thomas Tanner + * NEWS: mention fixes + * doc/PLATFORMS: GNU/Hurd update + * depdemo: make use of variables * ltconfig.in: use CC -E when checking for ELF support ! on NetBSD (reported by Todd Vierling ), ! replace all occurences of 'linkopts' with 'linker_flags' ! * ltmain.in: move ltdll.c and impgen.c to ltconfig.in and ! only add them to the libtool script if it's necessary 1999-08-24 Boyd Gerber * ltconfig.in: add support for UnixWare 7.X.X + * doc/PLATFORMS: add new platforms 1999-08-24 Pavel Roskin * doc/libtool.texi: document use of noinst_LTLIBRARIES for convenience libraries + * ltconfig.in: check for freebsdelf3, not just freebsd3. + Set hardcode_into_libs=yes for FreeBSD 3.0 and 3.1 + * ltmain.in: enable workaround for freebsdelf3.0 1999-08-24 Bert Driehuis *************** *** 178,183 **** --- 2121,2133 ---- * libltdl/COPYING.LIB: Update to version 2.1. * libltdl/ltdl.h, libltdl/ltdl.c: Update FSF address. + 1999-08-03 Gary V. Vaughan + + * libtool.m4 (mingw*, AC_PROG_LD): use tr for carriage return + stripping. + * ltconfig.in: ditto. + From Olly Betts + 1999-08-02 Olly Betts * doc/libtool.texi (Compile mode): typo correction. *************** *** 187,207 **** --- 2137,2219 ---- (Test descriptions): and another. (libtool script contents): and one more. + * libtool.m4 (AC_PROG_LD): strip carriage returns from the + output of gcc -print-prog-name=ld. + * ltconfig.in: ditto. + 1999-07-30 Pavel Roskin * ltmain.in: Ensure that gcc on HPsUX uses -fPIC, or else initialised structures are sometimes emitted in the code section. + 1999-07-30 Mumit Khan + + * ltconfig.in: Read line at a time to avoid tokenisation by + shell. + 1999-07-29 Alexandre Oliva * ltmain.in: Fix creation of relative links to object files in sub-dirs. + 1999-07-29 Olly Betts + + * ltconfig.in(cygwin mingw32, archive_expsym_cmds): Only compile + and link ltdll.c if the libtool.m4 macros discovered that it is + required. + + 1999-07-26 Olly Betts + + * libtool.m4(cygwin mingw32, AC_LIBTOOL_SETUP): Oops. Fix some + typos made by Evil Gary while (mis)applying my patch :-). + + * libtool.m4(cygwin mingw32, AC_LIBTOOL_SETUP): On second + thoughts, only probe for -mdll vs -dll on mingw, and revert to + the old `-Wl,--dll -nostartfiles' on cygwin. + + 1999-07-24 Erez Zadok + + * doc/PLATFORMS (i*86-*openbsd2.5): New platform. + Slight reordering of other bsd entries. + + 1999-07-24 Olly Betts + + * NEWS: Note new user visible changes. + * libtool.m4 (mingw32, AC_LIBTOOL_SETUP): probe for -mdll vs -dll + under cygwin/mingw. + probe whether the cygwin/mingw library supplies a stub DllMain + (but this information isn't yet used). + * ltconfig.in (mingw32, extract_expsyms_cmds): if HOST_CC is set, + use that to build impgen so we can use it when cross-compiling. + use correct entry points for mingw so static C++ constructors get + called for code in the DLL. + * ltmain.in (impgen.c): define O_BINARY to 0 if it is not in the + system headers. + 1999-07-24 Bert Driehuis * ltconfig.in: Updated bsdi4 soname specs to be more like linux as discussed on the bsdi mailing list. + 1999-07-20 Gary V. Vaughan + + * configure.in (AC_PROG_RANLIB): No longer required as we now use + AC_CHECK_TOOL in AC_LIBTOOL_SETUP. + * libtool.m4 (AC_PROG_LIBTOOL): Pass the $build variable to + ltconfig. + (AC_PROG_RANLIB): replaced with AC_CHECK_TOOL. + * ltconfig.in (build): new variable to hold the build triplet + which is now checked for unless --no-verify is specified. + (--build): new argument to set the build triplet. + (ranlib): Prefer ${host_alias}-ranlib[.exe] if $build is different + to $host. + * doc/libtool.texi (Invoking ltconfig): Document --build option. + * NEWS: Note --build option. + + 1999-07-19 Erez Zadok + + * doc/PLATFORMS: Updated mostly *bsd platforms. + 1999-07-19 Alexandre Oliva * doc/libtool.texi (Porting inter-library dependencies): Typos *************** *** 209,215 **** --- 2221,2239 ---- 1999-07-17 Thomas Tanner + * NEWS, TODO: updated (pic flags) + * libtool.m4 (AC_PROG_LIBTOOL): added --with-pic flag + * ltconfig.in: new pic_mode variable and --prefer[-non]-pic flags, + fixed the strip check (reported by Keith Bostic ) + * ltmain.in (compile mode): build only PIC/non-PIC code depending + on pic_mode * libltdl/README: document the supported dlopen interfaces + * doc/libtool.texi (tests): documented new tests + * tests/Makefile.am: added new tests + * tests/demo-pic.test: new test to test --with-pic + * tests/demo-nopic.test: new test to test --without-pic + * tests/build-relink2.test: variant of build-relink.test that + uses depdemo 1999-07-09 Olly Betts *************** *** 220,271 **** * README-alpha: improved the release instructions to mention actual list addresses for announcements, and urls for upload locations. - - 1999-07-03 Pavel Roskin - - * ltconfig.in: finish_cmds for FreeBSD removed - - 1999-10-16 Alexandre Oliva - - * libltdl/ltdl.c (lt_dlopen): Do not search paths when the - specified library is not just a basename. - - 1999-10-06 Gary V. Vaughan - - * ltconfig.in: Accept osf5. - Reported by Sascha Schumann - - 1999-10-04 Gary V. Vaughan ! * ltmain.in (-no-fast-install): Wrapper script used to add the ! exeext on again when naming the wrapped executable. ! 1999-09-28 Albert Cheng ! * ltmain.in (shlibpath_var): ensure the variable is non-empty before ! exporting it. ! 1999-09-22 Gary V. Vaughan ! ! * ltconfig.in (whole-archive-flag-spec): test whether the ! version of GNU ld being used understands --whole-archive ! before using it. ! ! 1999-07-30 Pavel Roskin - * ltmain.in: Ensure that gcc on HPsUX uses -fPIC, or else - initialised structures are sometimes emitted in the code section. - 1999-07-02 Gary V. Vaughan ! * configure.in: bumped version to 1.3.3a. ! GNU libtool 1.3.3 was released. - * config.sub: updated from common. - * config.guess: ditto. * NEWS: inserted todays date. - * configure.in: bumped version to 1.3.3. 1999-07-02 Alexandre Oliva --- 2244,2266 ---- * README-alpha: improved the release instructions to mention actual list addresses for announcements, and urls for upload locations. ! 1999-07-03 Thomas Tanner ! * doc/PLATFORMS: 1.3b passes all tests on cygwin ! 1999-07-03 Pavel Roskin ! * ltconfig.in: finish_cmds for FreeBSD removed ! * depdemo/l3/Makefile.am: install libl3.la into an extra directory 1999-07-02 Gary V. Vaughan ! * configure.in: bumped version to 1.3c. ! GNU libtool 1.3b was released. * NEWS: inserted todays date. 1999-07-02 Alexandre Oliva *************** *** 273,293 **** 1999-07-01 Thomas Tanner * doc/PLATFORMS: updated * changed my email address 1999-06-30 Thomas Tanner * demo/foo.h: use LT_PARAMS instead of LTDL_PARAMS (this is not libltdl) 1999-06-29 Thomas Tanner ! * NEWS: rename dummy to force ! * doc/libtool.texi: better documentation of uninstall mode, ! rename dummy to force, AC_LIBLTDL_* must be called before ! AC_PROG_LIBTOOL ! * ltmain.in: dlname is always soname or in library_names so ! we don't need to handle different file names 1999-06-29 Alexandre Oliva --- 2268,2304 ---- 1999-07-01 Thomas Tanner + * NEWS: updated * doc/PLATFORMS: updated * changed my email address 1999-06-30 Thomas Tanner * demo/foo.h: use LT_PARAMS instead of LTDL_PARAMS (this is not libltdl) + * tests/build-relink.test: also check for hardcode_into_libs = yes, + if set, we need to relink at install-time 1999-06-29 Thomas Tanner ! * NEWS: mention -no-fast-install, rename dummy to force ! * doc/PLATFORMS: 1.3b passes all tests on GNU/Linux, ! FreeBSD (2.2.6 and 3.1) ! * doc/libtool.texi: it's possible to link libtool libraries ! using -L and -l, better documentation of uninstall and clean mode, ! rename dummy to force, documented -no-fast-install, ! AC_LIBLTDL_* must be called before AC_PROG_LIBTOOL, ! documented hardcode_into_libs and striplib/old_striplib, ! * ltconfig.in: search for strip program, added hardcode_into_libs ! and striplib/old_striplib variables, set strip commands for GNU strip, ! on FreeBSD >= 3.2 set hardcode_into_libs to yes, ! fast-install mode doesn't work if hardcode_into_libs = yes ! * ltmain.in: reimplemented hardcoding into libraries: ! new relink mode, preserve all libtool args, relink libraries ! when installing if necessary ! added -no-fast-install flag, removed unnecessary `dlname' ! initialization, use striplib/old_striplib for stripping libraries, ! dlname is always soname or in library_names so we don't need ! to handle different file names 1999-06-29 Alexandre Oliva *************** *** 300,330 **** * ltconfig.in (freebsd*, shlibpath_overrides_runpath): Set to yes; tested on 3.1-ELF by Pavel and on 2.2.6 by Alexandre. 1999-06-23 Thomas Tanner * NEWS: updated * README: added GNU Hurd to the supported platforms * doc/libtool.texi: document `-dlpreopen dummy' * libltdl/ltdl.c (strchr): fixed typo (missing star) ! 1999-06-23 Stephan Kulow * libltdl/ltdl.c (strrchr): fixed typo (missing star) * libltdl/ltdl.c (trim): use `const' to silence -Wwrite-strings - 1999-06-18 Thomas Tanner - - * ltconfig.in (bsdi4, deplibs_check_method): use a less restrictive - regex (reported by Chris P. Ross ) - * ltmain.in: support `-dlopen dummy', define lt_preloaded_symbols - if dlself != no - * doc/libtool.texi: libtool does also support non C source code - - 1999-06-18 Teun Burgers - - * ltconfig.in: CR/LF fix for broken DJGPP bash - * ltmain.in: CR/LF fix for DJGPP - 1999-06-23 Olly Betts * ltmain.in (ltdll.c): Support for crosscompiling from linux to --- 2311,2335 ---- * ltconfig.in (freebsd*, shlibpath_overrides_runpath): Set to yes; tested on 3.1-ELF by Pavel and on 2.2.6 by Alexandre. + 1999-06-25 Alexandre Oliva + + * ltconfig.in (linux-gnu*, deplibs_check_method): Use pass_all on + alpha, x86 and sparc architectures by now, reverting to file_magic + at least on ARM, where it breaks. + 1999-06-23 Thomas Tanner * NEWS: updated * README: added GNU Hurd to the supported platforms * doc/libtool.texi: document `-dlpreopen dummy' + instead of `-dlopen dummy' * libltdl/ltdl.c (strchr): fixed typo (missing star) ! 1999-06-23 Stephan Kulow * libltdl/ltdl.c (strrchr): fixed typo (missing star) * libltdl/ltdl.c (trim): use `const' to silence -Wwrite-strings 1999-06-23 Olly Betts * ltmain.in (ltdll.c): Support for crosscompiling from linux to *************** *** 340,345 **** --- 2345,2378 ---- are paths through the code which run archive_expsym_cmds without running export_symbols_cmds. + 1999-06-20 Gary V. Vaughan + + * ltconfig.in: moved the test for NM after the test for + no_builtin_flag. + + 1999-06-20 Alexandre Oliva + + * ltconfig.in: Use sed '$q' instead of sed "" for copying ltmain, + just in case some sed does not support an empty command. + + * ltconfig.in (link_static_flag, ac_cv_prog_cc_static): Use the + latter in the test. + + 1999-06-18 Thomas Tanner + + * ltconfig.in (bsdi4, deplibs_check_method): use a less restrictive + regex (reported by Chris P. Ross ) + * ltmain.in: support `-dlopen dummy', define lt_preloaded_symbols + if dlself != no + * doc/libtool.texi (Compile and Link mode): document it, + documented the -Wc, -Wl flags, libtool does also support non C + source code + + 1999-06-18 Teun Burgers + + * ltconfig.in: CR/LF fix for broken DJGPP bash + * ltmain.in: CR/LF fix for DJGPP + 1999-06-18 Gary V. Vaughan * ltmain.in (outputname): When generating the executable wrapper *************** *** 347,353 **** add it again. 1999-06-16 Gary V. Vaughan ! * libltdl/ltdl.c (sys_wll_open): libltdl expects this function to fail if it is unable to physically load the library. Sadly, LoadLibrary will search the loaded libraries for a match and --- 2380,2389 ---- add it again. 1999-06-16 Gary V. Vaughan ! ! * libltdl/configure.in (ac_cv_lib_dl_dlopen): missing "x" in test ! comparison corrected. ! * libltdl/ltdl.c (sys_wll_open): libltdl expects this function to fail if it is unable to physically load the library. Sadly, LoadLibrary will search the loaded libraries for a match and *************** *** 356,373 **** Also, LoadLibrary takes the liberty of adding `.dll' to library names passed without an extension, we now add a trailing `.' to prevent this from happening. ! 1999-06-15 Gary V. Vaughan * libltdl/ltdl.c (sys_wll_close): Strangely enough, Microsoft have decided that LoadLibrary returns `0' for success, yet FreeLibrary returns `0' for failure! The FreeLibrary call used to interpret ! `0' as success. ! 1999-06-14 Thomas Tanner ! * ltmain.in: minor reformatting 1999-06-10 Alexandre Oliva * ltconfig.in: Reverted June 6's patch for new GNU ld output, it --- 2392,2417 ---- Also, LoadLibrary takes the liberty of adding `.dll' to library names passed without an extension, we now add a trailing `.' to prevent this from happening. ! 1999-06-15 Gary V. Vaughan * libltdl/ltdl.c (sys_wll_close): Strangely enough, Microsoft have decided that LoadLibrary returns `0' for success, yet FreeLibrary returns `0' for failure! The FreeLibrary call used to interpret ! `0' as success for both functions. ! 1999-06-14 Thomas Tanner ! * ltconfig.in: use eval when setting have_dlfcn_h, reformatting + 1999-06-12 Thomas Tanner + + * ltmain.in: store old archives in deplibs and old_deplibs, + retain the order of dependency libraries (even old archives), + determining the absolute directory name didn't work due to a typo, + add the library search paths of all dependency libraries when + linking a library (fixes IRIX 5.2 bug) + 1999-06-10 Alexandre Oliva * ltconfig.in: Reverted June 6's patch for new GNU ld output, it *************** *** 386,400 **** no extension, and we must do the same in order to share the cache value. Also we must ignore conftest.err which HPsUX (at least) fills with gratuitous warnings. Reported by Pavel Roskin 1999-06-09 Pavel Roskin ! * ltconfig.in (exeext): Use quotes in the test, to prevent a failure in sh.test. 1999-06-08 Gary V. Vaughan * ltmain.in (exeext): Use $exeext when working out the names of programs (but not the wrapper script itself due to a stupidity in win32 which hardwires the .exe extension to the binary loader!). --- 2430,2475 ---- no extension, and we must do the same in order to share the cache value. Also we must ignore conftest.err which HPsUX (at least) fills with gratuitous warnings. + (objext): for consistency, do the same as above. Reported by Pavel Roskin 1999-06-09 Pavel Roskin ! * ltconfig.in (exeext): Use quotes in the test, to prevent a failure in sh.test. + 1999-06-09 Gary V. Vaughan + + * ltconfig.in: Reordered tests to be more like configure.in's + recommended order (programs first, then libraries, etc.). + Performed a manual ``constant folding pass'' (eg: s/eval "test + \"echo '$''{'lt_cv_dlopen'+set}'`\" != set/test + "${lt_cv_dlopen+set}" != set/). + s/test "${foo+set}" = "set"/test "X${foo+set}" = Xset/g + + * ltconfig.in (link_static_flag): Accept, in order of decreasing + preference: the cached value; the default value for the current + host. Also test that the compiler accepts the flag, and cache + that result too. + + * ltconfig.in (pic_flag): Accept, in order of decreasing + preference: the cached value; the default value for the current + host. Also test that the compiler accepts the flag, and cache + that result too. + 1999-06-08 Gary V. Vaughan + * ltconfig.in (LN_S): Accept, in order of decreasing preference: + the cached value; an environment setting; ``ln -s'' if it works; + ``ln'' if ``ln -s'' doesn't appear to work. + + * ltconfig.in (objext): Accept, in order of decreasing preference: + the cached value; the result of a test object compilation. + + * ltconfig.in (RANLIB): Accept, in order of decreasing preference: + the cached value; an environment setting; the first file called + ``ranlib'' in the user's path. + * ltmain.in (exeext): Use $exeext when working out the names of programs (but not the wrapper script itself due to a stupidity in win32 which hardwires the .exe extension to the binary loader!). *************** *** 403,412 **** AC_EXEEXT). Since we can't rely on AC_EXEEXT having been called in configure.in, we must be able to check for ourselves, though we can look for a cached result incase AC_EXEEXT was called. ! * ltconfig.in (cygwin, need_version): Set to no, otherwise module dll's end up with mighty long names! ! 1999-06-06 Alexandre Oliva * ltconfig.in: Support new GNU ld --help output format. --- 2478,2492 ---- AC_EXEEXT). Since we can't rely on AC_EXEEXT having been called in configure.in, we must be able to check for ourselves, though we can look for a cached result incase AC_EXEEXT was called. ! ! * ltconfig.in (cygwin, pic_flag): Force separate compilation of ! objects for dlls vs. objects for static archives. Using a cpp ! macro also allows us to decide whether or not we need to use ! dllexport/import declarations. ! * ltconfig.in (cygwin, need_version): Set to no, otherwise module dll's end up with mighty long names! ! 1999-06-06 Alexandre Oliva * ltconfig.in: Support new GNU ld --help output format. *************** *** 421,426 **** --- 2501,2511 ---- links. Allow shared objects without the `lib' prefix and without version information. + 1999-06-02 Nick Rasmussen + + * ltmain.in (link): use "$nonopt" as the compiler for + compile/finalize_command + 1999-05-27 Alexandre Oliva * TODO: Remove the short list of people interested in C++ *************** *** 428,441 **** people requesting this feature, and we just can't maintain it accurate. ! 1999-05-27 Thomas Tanner ! * ltmain.in: when linking another library add its ! -L paths to lib_search_path (otherwise the deplibs check will fail) 1999-05-27 Alexandre Oliva , Olly Betts ! * ltmain.in: Expand convenience libraries when creating reloadable objects. * NEWS: Ditto. --- 2513,2525 ---- people requesting this feature, and we just can't maintain it accurate. ! 1999-05-27 Pavel Roskin ! * ltconfig.in (GNU Hurd, deplibs_check_method): Use pass_all. 1999-05-27 Alexandre Oliva , Olly Betts ! * ltmain.in: Expand convenience libraries when creating reloadable objects. * NEWS: Ditto. *************** *** 451,457 **** * ltconfig.in (export_symbols_cmds): Add $convenience. (cygwin, export_symbols_cmds): Ditto. * ltmain.in: Generate export symbol list before expanding ! convenience libraries, to avoid passing whole_archive_flag_spec to $NM. Reported by Godmar Back --- 2535,2541 ---- * ltconfig.in (export_symbols_cmds): Add $convenience. (cygwin, export_symbols_cmds): Ditto. * ltmain.in: Generate export symbol list before expanding ! convenience libraries, to avoid passing whole_archive_flag_spec to $NM. Reported by Godmar Back *************** *** 460,486 **** * libltdl/ltdl.c (LTDL_BIND_FLAGS): Remove BIND_VERBOSE, to avoid printing error messages. - 1999-05-27 Alexandre Oliva - - * configure.in: Bumped to 1.3.2a. - 1999-05-26 Alexandre Oliva ! GNU Libtool 1.3.2 was released. 1999-05-25 Alexandre Oliva - * configure.in: Bumped to 1.3.2. - * NEWS: List fixed problems. * doc/PLATFORMS: Tested for 1.3.2. * config.guess: Synch with GNU common. * ltmain.in: Revert to stripping .exe on all platforms. ! * TODO: Note about this problem. Demo is fixed on win32. -Wl and ! -Wc are implemented for release 1.4. Support `empty' convenience ! libraries. * ltconfig.in (solaris*, ld_shlibs): Do not enable shared libraries with GNU ld 2.8.*, it's broken. Emit a warning --- 2544,2563 ---- * libltdl/ltdl.c (LTDL_BIND_FLAGS): Remove BIND_VERBOSE, to avoid printing error messages. 1999-05-26 Alexandre Oliva ! GNU libtool 1.3.2 was released. 1999-05-25 Alexandre Oliva * NEWS: List fixed problems. * doc/PLATFORMS: Tested for 1.3.2. * config.guess: Synch with GNU common. * ltmain.in: Revert to stripping .exe on all platforms. ! * TODO: Note about this problem. Demo is fixed on win32. Support ! `empty' convenience libraries. * ltconfig.in (solaris*, ld_shlibs): Do not enable shared libraries with GNU ld 2.8.*, it's broken. Emit a warning *************** *** 494,542 **** 1999-05-25 Alexandre Oliva * ltmain.in: Remove object files before writing to them, to avoid circular links. Reported by Ron O'Hara 1999-05-24 Thomas Tanner ! * doc/libtool.texi: fix "wierd" typo :) ! * ltmain.in: strip off the .exe suffix only on *Win ! Reported by Matthew D. Langston 1999-05-23 Alexandre Oliva * doc/PLATFORMS: Release 1.3.1 passes on GNU Hurd/x86. Reported by Pavel Roskin - - 1999-05-22 Doug Evans - - * libltdl/configure.in (dlerror): Fix typo in dlopen found in -ldl - test. - - 1999-05-22 Gary V. Vaughan ! * configure.in: bumped to 1.3.1a. ! 1999-05-21 Gary V. Vaughan ! GNU Libtool 1.3.1 was released. ! * AUTHORS: Added myself back into the file! Seems I ! managed to delete myself somehow :-? ! * AUTHORS: de CR/LFed. ! * config.guess: ditto. ! * config.sub: ditto. - * configure.in: bumped to revision 1.3.1. * NEWS: insert todays date alongside 1.3.1 release. * Makefile.in: use gnu not gnits rules * config.guess: synch with gnu common & apply Takabatake-san's MIPS *000 patch. * config.sub: synch with gnu common. ! 1999-05-21 Pavel Roskin * Makefile.am (EXTRA_DIST): Don't distribute instutils. (install-data-hook): use libltdl/Makefile.am's local-install files --- 2571,2630 ---- 1999-05-25 Alexandre Oliva + * depdemo/main.c, depdemo/l1/l1.c, depdemo/l2/l2.c: K&R-ize. + * depdemo/l3/l3.c, depdemo/l4/l4.c: Likewise. + * ltmain.in: Remove object files before writing to them, to avoid circular links. Reported by Ron O'Hara 1999-05-24 Thomas Tanner ! * NEWS: support for installing stripped libraries using GNU strip ! * ltconfig.in: set deplibs_check_method=pass_all on FreeBSD, ! Linux and Solaris since no one can reproduce the famous deplibs ! bug ! * ltmain.in: preserve $CC (reported by Tom Tromey), ! strip libraries using GNU strip if it's available and the ! -s flag was passed to "install" 1999-05-23 Alexandre Oliva * doc/PLATFORMS: Release 1.3.1 passes on GNU Hurd/x86. Reported by Pavel Roskin ! 1999-05-23 Thomas Tanner ! * ltmain.in: strip off the .exe suffix only on *Win ! (Reported by Matthew D. Langston ) ! 1999-05-22 Thomas Tanner ! * NEWS: updated ! * TODO: -Wc, -Wl, implemented ! * AUTHORS: changed my email address ! * doc/libtool.texi: fix "wierd" typo :) ! * ltmain.in: linking against convenience libraries was broken, ! implemented the "-Wc," "-Wl," "-Xcompiler" "-Xlinker" flag for ! compiler and linker-specific flags, ! add -lc before we do the deplibs check ! * ltconfig.in: linkopts -> compiler_flags for $CC and linker_flags ! for $LD, link_all_deplibs=yes on IRIX ! 1999-05-22 Gary V. Vaughan * NEWS: insert todays date alongside 1.3.1 release. * Makefile.in: use gnu not gnits rules * config.guess: synch with gnu common & apply Takabatake-san's MIPS *000 patch. * config.sub: synch with gnu common. + + 1999-05-22 Doug Evans + + * libltdl/configure.in (dlerror): Fix typo in dlopen found in -ldl + test. ! 1999-05-21 Pavel Roskin * Makefile.am (EXTRA_DIST): Don't distribute instutils. (install-data-hook): use libltdl/Makefile.am's local-install files *************** *** 566,572 **** * NEWS: Updated docs. * TODO: Recommend libtool.m4 to be inserted in acinclude.m4. AIX 4.3.2.0 no longer fails on static dlopening. GNU DLD no longer ! has to support .la files, since libltdl already does. Convenience libraries and reloadable objects should be tested in the testsuite. We could support some amount of control on the soname of libraries. --- 2654,2660 ---- * NEWS: Updated docs. * TODO: Recommend libtool.m4 to be inserted in acinclude.m4. AIX 4.3.2.0 no longer fails on static dlopening. GNU DLD no longer ! has to support .la files, since libltdl already does. Convenience libraries and reloadable objects should be tested in the testsuite. We could support some amount of control on the soname of libraries. *************** *** 602,613 **** passed in, simply warn and continue since some compilers require -LANG:* like options to work. Reported by Adam C. Powell, IV ! 1999-05-17 Jiro Takabatake ! * ltconfig.in: port to NEC UX/4800. * NEWS: updated. ! 1999-05-17 Gary V. Vaughan * ltconfig.in (beos*, deplibs_check_method): set to pass_all. BeOS --- 2690,2701 ---- passed in, simply warn and continue since some compilers require -LANG:* like options to work. Reported by Adam C. Powell, IV ! 1999-05-17 Jiro Takabatake ! * ltconfig.in: port to NEC UX/4800. * NEWS: updated. ! 1999-05-17 Gary V. Vaughan * ltconfig.in (beos*, deplibs_check_method): set to pass_all. BeOS *************** *** 616,622 **** * libltdl/configure.in: Fix test failures on AIX 4.3.2 by checking for dlopen *with* -ldl first. ! Reported by Greg Wooledge * demo/foo.h: Don't set any declspecs until we have full dll support. --- 2704,2710 ---- * libltdl/configure.in: Fix test failures on AIX 4.3.2 by checking for dlopen *with* -ldl first. ! Reported by Greg Wooledge * demo/foo.h: Don't set any declspecs until we have full dll support. *************** *** 636,641 **** --- 2724,2733 ---- (instal-data-hook): Add srcdir/instutil to the beginning of the PATH before installing libltdl's sources. + 1999-05-09 Gary V. Vaughan + + * TODO: updated. + 1999-05-06 Gary V. Vaughan * Makefile.am (install-data-hook): make sure the install directory *************** *** 647,660 **** * libtool.m4: Use ifelse instead of if. Reported by David Mazieres - * configure.in: Bumped to 1.3.0a, just in case. - 1999-04-29 Alexandre Oliva GNU Libtool 1.3 was released. ! * configure.in: Bumped to 1.3. ! * NEWS: Summarize news since 1.2. * ltmain.in: Save exit status of link_command before removing symbol table object file. --- 2739,2749 ---- * libtool.m4: Use ifelse instead of if. Reported by David Mazieres 1999-04-29 Alexandre Oliva GNU Libtool 1.3 was released. ! * NEWS: Summarize news from 1.2 to 1.3. * ltmain.in: Save exit status of link_command before removing symbol table object file. *************** *** 663,673 **** * doc/PLATFORMS: updated my hpux-10.20 and cygwin box entries. - 1999-04-29 Thomas Tanner - - * doc/libtool.texi (inter-library dependencies): - libtool 1.4 will have full inter-library dependencies support - 1999-04-29 Alexandre Oliva * NEWS: Improved support for DU and IRIX too. --- 2752,2757 ---- *************** *** 684,690 **** * doc/libtool.texi: Clear up overfull hbox. * libltdl/Makefile.am (ltdl.lo): Add dependencies. ! * libltdl/configure.in: Clean up some duplicate defines. * libltdl/acconfig.h: New file. Add #undefs for defines that would be duplicated. --- 2768,2775 ---- * doc/libtool.texi: Clear up overfull hbox. * libltdl/Makefile.am (ltdl.lo): Add dependencies. ! * libltdl/configure.in: Clean up some duplicate defines. Enable ! support for multiple dlopening mechanisms. * libltdl/acconfig.h: New file. Add #undefs for defines that would be duplicated. *************** *** 692,698 **** * libtool.m4 (cygwin*|mingw*, DLLTOOL, OBJDUMP, AS): Only expand the code that makes these configure time checks on hosts that need the ! tools *and* if the AC_LIBTOOL_WIN32_DLL macro is used. 1999-04-29 Alexandre Oliva --- 2777,2783 ---- * libtool.m4 (cygwin*|mingw*, DLLTOOL, OBJDUMP, AS): Only expand the code that makes these configure time checks on hosts that need the ! tools *and* if the AC_LIBTOOL_WIN32_DLL macro is used. 1999-04-29 Alexandre Oliva *************** *** 734,753 **** 1999-04-27 Thomas Tanner * ltconfig.in: set need_version=no on OSF (reported by Marcus Sundberg ) * ltmain.in: allow absolute non-existant -L paths, ! always use output_objdir instead of objdir for temporary files ! and create the directory before generating symbol lists, delete generated temporary symbol lists, ! don't add .la twice in the pseudo-library header * ltmain.in (help uninstall): added a missing backslash after echo (reported by Ossama Othman) ! 1999-04-27 Alexandre Oliva * ltmain.in (old_archive_cmds): Iterate on oldobjs to find out ! which links to object files we must create. Do not test for empty pic_flag to create such links. Use objext when searching for object files extracted from convenience library. --- 2819,2845 ---- 1999-04-27 Thomas Tanner + * NEWS: new clean mode + * THANKS: added Ossama Othman + * doc/libtool.texi: documented the new `clean' mode * ltconfig.in: set need_version=no on OSF (reported by Marcus Sundberg ) * ltmain.in: allow absolute non-existant -L paths, ! always use output_objdir instead of objdir for temporary files, delete generated temporary symbol lists, ! don't add .la twice in the pseudo-library header, ! implemented and documented clean mode (deletes libraries, ! programs and object files and the files associated with them), ! if build_libtool_libs=no and no static library is available, ! try to link the program against the shared library, ! don't add a statically linked library to the dependency_libs * ltmain.in (help uninstall): added a missing backslash after echo (reported by Ossama Othman) ! 1999-04-27 Alexandre Oliva * ltmain.in (old_archive_cmds): Iterate on oldobjs to find out ! which links to object files we must create. Do not test for empty pic_flag to create such links. Use objext when searching for object files extracted from convenience library. *************** *** 766,772 **** 1999-04-26 Alexandre Oliva ! * ltconfig.in (aix4.[01], always_export_symbols): The case pattern would never match; fixed. Reported by Stephan Kulow --- 2858,2864 ---- 1999-04-26 Alexandre Oliva ! * ltconfig.in (aix4.[01], always_export_symbols): The case pattern would never match; fixed. Reported by Stephan Kulow *************** *** 775,797 **** * libtool.m4 (OBJDUMP): Pass it to ltconfig. * configure.in: AC_SUBST DLLTOOL, OBJDUMP and AS. * Makefile.am (libtool, clibtool): Pass them to ltconfig. - * doc/libtool.texi (Invoking ltconfig): Document OBJDUMP. 1999-04-25 Frank Ch. Eigler ! * libtool.m4 (cygwin*): Look for target objdump tool. * ltconfig.in (cygwin*, file_magic_cmd): Use autoconf-located target objdump tool. Track OBJDUMP like DLLTOOL and AS. ! * ltconfig.in (cygwin*, deplibs_check_method): Accept "architecture: i386" as optional suffix, for it is printed on a separate line sometimes. ! * ltmain.in (cygwin*, ltdll.c): Wrap DllMain declaration in extern "C". ! * ltmain.in (deplibs_check_method=file_magic): Redirect stderr to /dev/null, to suppress error messages from target objdump. ! 1999-04-25 Alexandre Oliva * ltconfig.in (irix*, soname_spec, library_names_spec): Missing --- 2867,2888 ---- * libtool.m4 (OBJDUMP): Pass it to ltconfig. * configure.in: AC_SUBST DLLTOOL, OBJDUMP and AS. * Makefile.am (libtool, clibtool): Pass them to ltconfig. 1999-04-25 Frank Ch. Eigler ! * libtool.m4 (cygwin*): Look for target objdump tool. * ltconfig.in (cygwin*, file_magic_cmd): Use autoconf-located target objdump tool. Track OBJDUMP like DLLTOOL and AS. ! * ltconfig.in (cygwin*, deplibs_check_method): Accept "architecture: i386" as optional suffix, for it is printed on a separate line sometimes. ! * ltmain.in (cygwin*, ltdll.c): Wrap DllMain declaration in extern "C". ! * ltmain.in (deplibs_check_method=file_magic): Redirect stderr to /dev/null, to suppress error messages from target objdump. ! 1999-04-25 Alexandre Oliva * ltconfig.in (irix*, soname_spec, library_names_spec): Missing *************** *** 824,830 **** * ltconfig.in (irix*, soname_spec): Append $major. (irix*, library_names_spec): Add new soname. Reported by David Kaelbling ! * ltconfig.in (irix*, sys_lib_dlsearch_path_spec): /usr/local/lib is not searched by default. /usr/lib is searched before /lib. * ltconfig.in (irix*, sys_lib_search_path_spec): /usr/lib is --- 2915,2921 ---- * ltconfig.in (irix*, soname_spec): Append $major. (irix*, library_names_spec): Add new soname. Reported by David Kaelbling ! * ltconfig.in (irix*, sys_lib_dlsearch_path_spec): /usr/local/lib is not searched by default. /usr/lib is searched before /lib. * ltconfig.in (irix*, sys_lib_search_path_spec): /usr/lib is *************** *** 862,867 **** --- 2953,2963 ---- * libltdl/ltdl.c: Remove trivial warnings. + 1999-04-22 Frank Ch. Eigler + + * ltconfig.in: Correct sed expression that extracts symbols + from cygwin def files. Ignore demangled C++ names, if any. + 1999-04-12 John David Anglin * libltdl/ltdl.c (shl_close): shl_t was correct here... *************** *** 885,891 **** * ltconfig.in (check for gcc): removed a bogus line, check for shl_load in libdld * ltmain.in: added a warning to the header of the .la file ! to warn users against deleting the file. 1999-04-10 Alexandre Oliva --- 2981,2989 ---- * ltconfig.in (check for gcc): removed a bogus line, check for shl_load in libdld * ltmain.in: added a warning to the header of the .la file ! to warn users against deleting the file, ! link shared against static libraries if ! deplibs_check_method == pass_all 1999-04-10 Alexandre Oliva *************** *** 920,930 **** * dryrun.test: It would still fail at random times, because `cp' and `mv' are not guaranteed to preserve the timestamps of the installed files. Instead of preserving them, just remove them ! before the dry uninstall test. Redirect dry-run output to stderr, so that it can be easily separated from the regular output. 1999-04-07 Thomas Tanner * libtool.m4: another DJGPP fix 1999-04-07 Alexandre Oliva --- 3018,3029 ---- * dryrun.test: It would still fail at random times, because `cp' and `mv' are not guaranteed to preserve the timestamps of the installed files. Instead of preserving them, just remove them ! before the dry uninstall test. Redirect dry-run output to stderr, so that it can be easily separated from the regular output. 1999-04-07 Thomas Tanner + * NEWS: support for moved libraries * libtool.m4: another DJGPP fix 1999-04-07 Alexandre Oliva *************** *** 939,945 **** * tests/dryrun.test: The constant modifications of libtool would cause main.o to be updated at the wrong time; the new approach is to modify the libtool script so that it enables dry run depending ! on whether an environment variable is set or not. I've also moved `after' and `before' to a directory deep within $objdir, instead of creating it in ../tests. * tests/Makefile.am (CLEANFILES): Removed. --- 3038,3044 ---- * tests/dryrun.test: The constant modifications of libtool would cause main.o to be updated at the wrong time; the new approach is to modify the libtool script so that it enables dry run depending ! on whether an environment variable is set or not. I've also moved `after' and `before' to a directory deep within $objdir, instead of creating it in ../tests. * tests/Makefile.am (CLEANFILES): Removed. *************** *** 956,974 **** * tests/dryrun.test: Use cmp instead of diff. (before, after): Create them within ../tests. ! (libtool): Set to `/bin/sh ./libtool' by default, but use LIBTOOL, ! SHELL and top_builddir from the environment if available. For dry runs, use "$libtool -n". * tests/Makefile.am (CLEANFILES): Added before and after. * ltmain.in: Do not create links to object files in dry runs. 1999-04-06 Thomas Tanner * NEWS: improved DJGPP support * libtool.m4: some DJGPP fixes * ltconfig.in: ditto, reverted one of my previous patches: we need ! to check for NM ! * ltmain.in: some DJGPP fixes 1999-04-05 Alexandre Oliva --- 3055,3077 ---- * tests/dryrun.test: Use cmp instead of diff. (before, after): Create them within ../tests. ! (libtool): Set to `/bin/sh ./libtool' by default, but use LIBTOOL, ! SHELL and top_builddir from the environment if available. For dry runs, use "$libtool -n". * tests/Makefile.am (CLEANFILES): Added before and after. * ltmain.in: Do not create links to object files in dry runs. 1999-04-06 Thomas Tanner + * ltmain.in: added a missing line of the ILD patch + * NEWS: improved DJGPP support + * doc/libtool.texi: removed hardcode_into_libs documentation * libtool.m4: some DJGPP fixes * ltconfig.in: ditto, reverted one of my previous patches: we need ! to check for NM, removed the hardcode_into_libs support since ! no platform seems to support it ! * ltmain.in: some DJGPP fixes, removed the hardcode_into_libs support 1999-04-05 Alexandre Oliva *************** *** 985,997 **** 1999-04-05 Thomas Tanner * doc/libtool.texi: reorder tests to reflect execution order, ! documented dryrun.test * ltmain.in (lt_preloaded_symbols): dry-run mode bugfix * tests/dryrun.test: new test to check whether the dry-run mode works properly * demo/run.test: removed the unnecessary test * demo/Makefile.am: ditto 1999-04-04 Alexandre Oliva --- 3088,3101 ---- 1999-04-05 Thomas Tanner * doc/libtool.texi: reorder tests to reflect execution order, ! documented dryrun.test and depdemo* * ltmain.in (lt_preloaded_symbols): dry-run mode bugfix * tests/dryrun.test: new test to check whether the dry-run mode works properly * demo/run.test: removed the unnecessary test * demo/Makefile.am: ditto + * ltmain.in: set the DLL search path on cygwin,mingw and os2 1999-04-04 Alexandre Oliva *************** *** 1009,1016 **** * ltconfig.in: if ld_shlibs=no, set can_build_shared=no too, otherwise it will just be disregarded. This would cause ! netbsd/m68k with GNU ld a.out, and certainly many other platforms, ! to incorrectly believe that shared libraries were supported, while archive_cmds was empty, causing shared libraries not to be created 1999-04-03 Alexandre Oliva --- 3113,3120 ---- * ltconfig.in: if ld_shlibs=no, set can_build_shared=no too, otherwise it will just be disregarded. This would cause ! netbsd/m68k with GNU ld a.out, and certainly many other platforms, ! to incorrectly believe that shared libraries were supported, while archive_cmds was empty, causing shared libraries not to be created 1999-04-03 Alexandre Oliva *************** *** 1021,1044 **** * NEWS: updated * libtool.m4: check for main in libm instead of cos ! * ltmain.in: cosmetic fixes 1999-04-02 Alexandre Oliva ! * ltmain.in (convenience): fixed race condition when more than one library was linked with the same convenience library by uniquifying the extract directory. It is now named after the new library *and* the old one, and lives in the objdir of the new one. ! * ltmain.in (-L*): do not abort just because a directory specified with -L does not exist; just warn and discard it * ltconfig.in (archive_cmds, sunos4*): where we used -Bstatic, we should have been using -Bshareable * demo/Makefile.am (CLEANFILES): clean EXTRA_* from deplibs-check ! * libtool.m4 (LDFLAGS, LIBS): pass them to ltconfig, for the tests that involve linking * Makefile.am (LDFLAGS, LIBS, libtool, clibtool): ditto * tests/Makefile.am (CFLAGS, CPPFLAGS, LDFLAGS, LIBS): set --- 3125,3154 ---- * NEWS: updated * libtool.m4: check for main in libm instead of cos ! * ltmain.in: cosmetic fixes, don't try to link libraries only once ! (although it's not necessary on many platforms and looks ugly...), 1999-04-02 Alexandre Oliva ! * ltmain.in (convenience): fixed race condition when more than one library was linked with the same convenience library by uniquifying the extract directory. It is now named after the new library *and* the old one, and lives in the objdir of the new one. ! * ltmain.in (-L*): do not abort just because a directory specified with -L does not exist; just warn and discard it + * depdemo/l1/Makefile.am (AUTOMAKE_OPTIONS): no-dependencies + * depdemo/l2/Makefile.am (AUTOMAKE_OPTIONS): ditto + * depdemo/l3/Makefile.am (AUTOMAKE_OPTIONS): ditto + * depdemo/l4/Makefile.am (AUTOMAKE_OPTIONS): ditto + * ltconfig.in (archive_cmds, sunos4*): where we used -Bstatic, we should have been using -Bshareable * demo/Makefile.am (CLEANFILES): clean EXTRA_* from deplibs-check ! * libtool.m4 (LDFLAGS, LIBS): pass them to ltconfig, for the tests that involve linking * Makefile.am (LDFLAGS, LIBS, libtool, clibtool): ditto * tests/Makefile.am (CFLAGS, CPPFLAGS, LDFLAGS, LIBS): set *************** *** 1048,1053 **** --- 3158,3169 ---- * doc/PLATFORMS: 1.2f ok on various versions of hpux cc + 1999-04-02 Alexandre Oliva + + * ltconfig.in (link_all_deplibs): set to unknown by default + * ltmain.in: test != no, not = yes + * doc/libtool.texi: document unknown + 1999-04-01 Thomas Tanner * doc/libtool.texi: documented deplibs.test *************** *** 1060,1071 **** --- 3176,3189 ---- used, lt_dlopen and silent may be empty, AC_SYS_LIBTOOL_CYGWIN no longer necessary * ltconfig.in: NM is already checked in libtool.m4, + * ltmain.in: always link all static dependency_libs * tests/Makefile.am: added deplibs.test * tests/demo-exec.test, demo-inst.test: removed hell0 * tests/deplibs.test: new test to test the deplibs_check_method 1999-03-31 Thomas Tanner + * ltmain.in: always link a library before its dependency libs * mdemo/Makefile.am: test -export-symbols-regex 1999-03-30 Thomas Tanner *************** *** 1079,1084 **** --- 3197,3211 ---- * *demo/configure.in: AC_SUBST LIBM * libltdl/configure.in: use ac_cv_sys_symbol_underscore instead of USE_SYMBOL_UNDERSCORE + * ltconfig.in: added link_all_deplibs variable + * doc/libtool.texi: document it + * ltmain.in: always search for libname.la - don't eval libname_spec, + when linking libraries against static ones just print a warning + and add them to dependency_libs, add -lc before deplibs, + always link all dependencies of a static library or if + link_all_deplibs is yes, hardcode library paths if + hardcode_into_libs is no, don't link against dependency_libs + that already are deplibs 1999-03-30 Alexandre Oliva *************** *** 1091,1101 **** library search path * ltmain.in, ltconfig.in: reverted most of the quoting changes ! from 1999-03-25; Gary's delay_variable_subst patch from 1999-02-19 obviates it. Keep only quoting of $PATH, for uniformity with other systems that already did it - * TODO: comments on hardcoding paths into libraries; problem - with shell meta-characters in filenames 1999-03-29 Gary V. Vaughan --- 3218,3226 ---- library search path * ltmain.in, ltconfig.in: reverted most of the quoting changes ! from 1999-03-25; Gary's delay_variable_subst patch from 1999-02-19 obviates it. Keep only quoting of $PATH, for uniformity with other systems that already did it 1999-03-29 Gary V. Vaughan *************** *** 1114,1128 **** * doc/PLATFORMS: BeOS works * doc/libtool.texi: we have now to two mailing lists, updated -dlopen self documentation, documented libltdl's license, ! put each author in a separate line, cleanups and minor corrections * libltdl/COPYING.LIB: new file * libltdl/ltdl.[ch]: added special exception to the LGPL license * libtool.spec: removed, it was outdated * Makefile.am: removed libtool.spec * ltmain.in: use TMPDIR when possible, create a subdirectory in the temporary directory, added -export-symbols-regex to the help, - don't regenerate the .lai file if it was removed - it should not - happen 1999-03-25 Alexandre Oliva --- 3239,3253 ---- * doc/PLATFORMS: BeOS works * doc/libtool.texi: we have now to two mailing lists, updated -dlopen self documentation, documented libltdl's license, ! put each author in a separate line, ! inter-library dependencies on uninstalled libtool libraries are ! now supported, cleanups and minor corrections * libltdl/COPYING.LIB: new file * libltdl/ltdl.[ch]: added special exception to the LGPL license * libtool.spec: removed, it was outdated * Makefile.am: removed libtool.spec * ltmain.in: use TMPDIR when possible, create a subdirectory in the temporary directory, added -export-symbols-regex to the help, 1999-03-25 Alexandre Oliva *************** *** 1133,1171 **** * tests/demo-exec.test, tests/demo-inst.test: run the new program * ltconfig.in (irix5*, irix6*, deplibs_check_method): pass_all ! * ltmain.in ($PATH): instead of modifying the PATH, better prevent ! its expansion the first time *_cmds variables are eval'ed. Modify $show within loops that eval them so as to expand variables * ltconfig.in (*_cmds): quote $ so that they're not expanded by the first eval ! 1999-03-25 Gary V. Vaughan * ltmain.in ($PATH): Expand any tildes in the users path to the contents of $HOME to avoid problems with *_cmds splitting and evaluation. ! 1999-03-24 Thomas Tanner * doc/PLATFORMS: Erez Zadok reported that libtool works on bsdi 4.0.1 * doc/libtool.texi (libltdl): libltdl supports BeOS ! * libltdl/ltdl.c: partially reverted my previous patch: BeOS will automatically search in ADDON_PATH ! * ltmain.in: only accept -L paths that exist, support relative ! -L paths, removed offensive warnings/comments 1999-03-24 Alexandre Oliva * ltconfig.in (ld_shlibs, amigaos*): disable shared libraries - - 1999-03-23 Thomas Tanner - - * libltdl/ltdl.c: shlib_ext was declared even if LTDL_SHLIB_EXT - didn't exist - * ltmain.in: don't allow relative run-paths, fixed a typo in a warning, - ignore -dlopen self for libraries and objects ! 1999-03-23 Gary V. Vaughan * libltdl/configure.in: the sed expression for finding the shared library extension used to think the . in [.] for the cygwin --- 3258,3294 ---- * tests/demo-exec.test, tests/demo-inst.test: run the new program * ltconfig.in (irix5*, irix6*, deplibs_check_method): pass_all ! * ltmain.in ($PATH): instead of modifying the PATH, better prevent ! its expansion the first time *_cmds variables are eval'ed. Modify $show within loops that eval them so as to expand variables * ltconfig.in (*_cmds): quote $ so that they're not expanded by the first eval ! 1999-03-25 Gary V. Vaughan * ltmain.in ($PATH): Expand any tildes in the users path to the contents of $HOME to avoid problems with *_cmds splitting and evaluation. ! 1999-03-24 Thomas Tanner + * TODO: support -dlopen for libraries * doc/PLATFORMS: Erez Zadok reported that libtool works on bsdi 4.0.1 * doc/libtool.texi (libltdl): libltdl supports BeOS ! * libltdl/ltdl.c: shlib_ext was declared even if LTDL_SHLIB_EXT ! didn't exist, partially reverted my previous patch: BeOS will automatically search in ADDON_PATH ! * ltmain.in: don't allow relative run-paths, fixed a typo in a warning, ! ignore -dlopen self for libraries and objects, ! only accept -L paths that exist, minor cleanups, ! bugfix: add -lc for normal libraries, not convenicence libraries ! removed offensive warnings/comments 1999-03-24 Alexandre Oliva * ltconfig.in (ld_shlibs, amigaos*): disable shared libraries ! 1999-03-23 Gary V. Vaughan * libltdl/configure.in: the sed expression for finding the shared library extension used to think the . in [.] for the cygwin *************** *** 1174,1182 **** brackets delimit a sed or expr expression which is not part of the extension) before looking for the extension. 1999-03-21 Alexandre Oliva ! * tests/build-relink.test: if we relink and have hardcode_direct, removing an uninstalled library breaks an uninstalled program * doc/libtool.texi: documented convenience libraries --- 3297,3307 ---- brackets delimit a sed or expr expression which is not part of the extension) before looking for the extension. + * TODO (cygwin): food for thought re: mutually dependant dlls. + 1999-03-21 Alexandre Oliva ! * tests/build-relink.test: if we relink and have hardcode_direct, removing an uninstalled library breaks an uninstalled program * doc/libtool.texi: documented convenience libraries *************** *** 1184,1206 **** * tests/*-unst.test: if directory is not configured, skip it * tests/demo.test, tests/mdemo.test: unused, removed 1999-03-20 Thomas Tanner ! * use the same header in all configure.in's and Makefile.am's ! * TODO: all internal variables and macros are now documented ! * demo/Makefile.am: use $(LIBS) instead of -lm ! * doc/libtool.texi: documented thread_safe_flag_spec, ! renamed all AM_ENABLE/DISABLE_* macros to AC_*, ! documented AC_DISABLE_FAST_INSTALL and AC_LIBTOOL_DLOPEN ! documentation for -module updated * ltmain.in: bugfix: "-dlopen self [-all]-static" wouldn't use dlopen_self_static, automatically enable -export-dynamic when using "-dlopen self", always make run-paths absolute, ignore -lc only on platforms that don't have such a library, don't generate an installable pseudo-library for convenience libraries, bugfix: export_symbols would be removed immediately ! before it is be used 1999-03-19 Alexandre Oliva --- 3309,3352 ---- * tests/*-unst.test: if directory is not configured, skip it * tests/demo.test, tests/mdemo.test: unused, removed + * tests/depdemo.test: ditto 1999-03-20 Thomas Tanner ! * doc/libtool.texi (link mode): documentation for -module updated ! * ltconfig.in: fast-install mode doesn't work for ! hardcode_into_libs=yes * ltmain.in: bugfix: "-dlopen self [-all]-static" wouldn't use dlopen_self_static, automatically enable -export-dynamic when using "-dlopen self", always make run-paths absolute, ignore -lc only on platforms that don't have such a library, + cleanups in the ILD code, find even installed libtool libraries + that were moved, before generating the DLL-import library we need + to set libname, improved hardcoding of shlibpath for libraries, don't generate an installable pseudo-library for convenience libraries, bugfix: export_symbols would be removed immediately ! before it is used ! ! 1999-03-19 Thomas Tanner ! ! * use the same header in all configure.in's and Makefile.am's ! * NEWS: improved support for BeOS and Cygwin ! * TODO: ILD branch was merged, all internal variables and macros ! are now documented ! * demo/Makefile.am: use $(LIBS) instead of -lm ! * doc/libtool.texi: documented new variable hardcode_into_libs ! and thread_safe_flag_spec, renamed all AM_ENABLE/DISABLE_* macros ! to AC_*, documented AC_DISABLE_FAST_INSTALL and AC_LIBTOOL_DLOPEN ! * libltdl/ltdl.c: added two new error messages (cannot_open_error, ! cannot_close_error), use them where approriate, ! BeOS support (thanks to Xavier Pianet), on BeOS search modules ! additionally in ADDON_PATH ! * libtool.m4: rewrote AC_CHECK_LIBM: BeOS and Cygwin don't have ! libm and *-ncr-sysv4.3* requires libmw ! * ltconfig.in: don't check for LoadLibrary, hardcode dlopen ! configuration for BeOS and Cygwin ! * ltmain.in: fix sourcing of .la files on Solaris ! (patch by Raja R Harinath) 1999-03-19 Alexandre Oliva *************** *** 1238,1261 **** * tests/Makefile.am (TESTS): added noinst-link.test * doc/libtool.texi: document it 1999-03-18 Thomas Tanner ! * NEWS: improved support for BeOS and Cygwin ! * libltdl/ltdl.c: added two new error messages (cannot_open_error, ! cannot_close_error), use them where approriate, ! BeOS support (thanks to Xavier Pianet), on BeOS search modules ! additionally in ADDON_PATH ! * libtool.m4: rewrote AC_CHECK_LIBM: BeOS and Cygwin don't have ! libm and *-ncr-sysv4.3* requires libmw ! * ltconfig.in: don't check for LoadLibrary, hardcode dlopen ! configuration for BeOS and Cygwin ! * ltmain.in: ignore -lm on BeOS and Cygwin, always ignore -lc ! 1999-03-17 Alexandre Oliva * ltconfig.in (hpux*, hardcode_minus_L): should be no, we have +b (hpux*, hardcode_libdir_separator): set to colon * doc/PLATFORMS: egcs is gcc; updates from Erez Zadok 1999-03-16 Alexandre Oliva --- 3384,3458 ---- * tests/Makefile.am (TESTS): added noinst-link.test * doc/libtool.texi: document it + 1999-03-19 Gary V. Vaughan + + * ltmain.in (dependency_libs): There is no reason to infer that + the pseudo library is invalid if dependency_libs='' at + install-time, or else libltdl/libltdl.la is invalid!! + 1999-03-18 Thomas Tanner ! * merged my inter-library dependencies code from the ILD branch: ! * NEWS: inter-library dependencies are now supported ! * configure.in: add the depdemo subdirectory ! * depdemo/*: new demo to demonstrate inter-library dependencies ! * tests/depdemo*: new tests for depdemo ! * ltconfig.in: added hardcode_into_libs (whether library paths ! should be hardcoded into the libraries), ! it currently defaults to 'no' ! * ltmain.in: new internal 'relink' mode to relink libraries ! on platforms with hardcode_into_libs=yes, save command line ! arguments in libtool_args, accept relative -L directories, ! ignore -lm on BeOS and Cygwin, always ignore -lc, ! handle -l, -L and .la arguments later, always make the library ! installation directory (-rpath) absolute, in relink mode don't ! delete the not-relinked library and exit immediately after relinking, ! try to find already-installed libtool libraries that were specified ! using -l, support hardcoding of library paths into libraries too, ! export shlibpath before linking libraries, and a lot of other ! big changes that I don't want to describe here... please read ! the source. ! ! * merged Gary's Win32 code from the ILD branch: ! * NEWS: Win32 DLLs are now supported ! * TODO: removed .a library namespace clash for win32. It is ! now resolved. ! * ltconfig.in (cygwin, library_names_spec): removed $libname.a. ! Creating a dll with libtool no longer creates an import library. ! * ltconfig.in (extract_expsyms_cmds): Create $objdir if it does ! not exist -- i.e. we need to generate import an import library ! in a directory which has no libs of its own. ! * doc/libtool.texi (old_archive_from_expsyms_cmds, ! extract_expsyms_cmds): documented these new variables. ! * ltconfig.in (extract_expsyms_cmds): New variable. Commands to ! extract the exported symbol list from a dll. ! (old_archive_from_expsyms_cmds): New variable. Commands to build ! an old archive from the extracted expsyms list. ! * ltmain.in: run the cmds in extract_expsyms_cmds and ! old_archive_from_expsyms_cmds as necessary. ! * ltconfig.in (cygwin, old_archive_from_new_cmds): no longer ! required. ! * ltconfig.in (cygwin, shlibpath_overrides_runpath): I'm not even ! sure whether win32 honours the runpath at all when searching for ! a dll to load! Anyway, when set to yes this prevents a gratuitous ! warning. ! * ltmain.in (deplib): The cygwin environment doesn't actually have ! -lm, and although the linker fakes having one, specifiying it to ! libtool will break ILD, so we ignore it when generating ! dependencies. ! ! 1999-03-17 Gary V. Vaughan ! ! * doc/PLATFORMS: Thanks to Alexandres changes below, both my ! hp boxes pass the entire test suite. ! 1999-03-17 Alexandre Oliva * ltconfig.in (hpux*, hardcode_minus_L): should be no, we have +b (hpux*, hardcode_libdir_separator): set to colon + 1999-03-17 Alexandre Oliva + * doc/PLATFORMS: egcs is gcc; updates from Erez Zadok 1999-03-16 Alexandre Oliva *************** *** 1283,1286 **** Continued in ChangeLog.0 ! $Revision: 1.385.2.206 $ $Date: 2000/05/27 11:12:27 $ --- 3480,3483 ---- Continued in ChangeLog.0 ! $Revision: 1.922 $ $Date: 2001/04/25 00:05:37 $ Index: libtool/ChangeLog.0 diff -c libtool/ChangeLog.0:1.1.2.1 libtool/ChangeLog.0:1.2 *** libtool/ChangeLog.0:1.1.2.1 Tue Mar 16 13:24:20 1999 --- libtool/ChangeLog.0 Tue May 2 15:41:36 2000 *************** *** 1,5 **** --- 1,7 ---- 1999-03-15 Alexandre Oliva + * configure.in, libtool.spec, NEWS: bump to 1.3a + * Branched for release 1.3 (branch-1-3) * configure.in, libtool.spec, NEWS: bump to 1.2g * configure.in, libtool.spec: bump to 1.2f *************** *** 271,277 **** * mdemo/configure.in: use AC_LIBLTDL_CONVENIENCE * mdemo/Makefile.am: refer to @LIBLTDL@ ! 1999-03-09 Gary V. Vaughan * NEWS: updated. --- 273,279 ---- * mdemo/configure.in: use AC_LIBLTDL_CONVENIENCE * mdemo/Makefile.am: refer to @LIBLTDL@ ! 1999-03-09 Gary V. Vaughan * NEWS: updated. *************** *** 394,400 **** only on FreeBSD and when not static linking; it's been causing trouble on platforms such as OpenBSD. ! 1999-02-26 Gary V. Vaughan * libtool.m4 (cygwin): s/\\(mingw\\|cygwin\\)32/\\1/g. Must've missed this file when I changed to cygnus' new sanction name. --- 396,402 ---- only on FreeBSD and when not static linking; it's been causing trouble on platforms such as OpenBSD. ! 1999-02-26 Gary V. Vaughan * libtool.m4 (cygwin): s/\\(mingw\\|cygwin\\)32/\\1/g. Must've missed this file when I changed to cygnus' new sanction name. *************** *** 512,518 **** * libltdl/ltdl.c (lt_dlopen): use newhandle instead of handle where appropriate, when dlopening a non-libtool library ! 1999-02-19 Gary V. Vaughan * ltconfig.in (export_symbols_cmds): renamed from export_symbols_cmd. --- 514,520 ---- * libltdl/ltdl.c (lt_dlopen): use newhandle instead of handle where appropriate, when dlopening a non-libtool library ! 1999-02-19 Gary V. Vaughan * ltconfig.in (export_symbols_cmds): renamed from export_symbols_cmd. *************** *** 543,549 **** alternate name without ${release}, otherwise build fails when -release is used ! 1999-02-18 Gary V. Vaughan * ltconfig.in (archive{,_sym}_commands): Be careful not to re-export the dll entry points DllMain@12, _cygwin_dll_entry@12 and --- 545,551 ---- alternate name without ${release}, otherwise build fails when -release is used ! 1999-02-18 Gary V. Vaughan * ltconfig.in (archive{,_sym}_commands): Be careful not to re-export the dll entry points DllMain@12, _cygwin_dll_entry@12 and *************** *** 608,614 **** * mdemo/configure.in: use AC_LIBTOOL_DLOPEN * mdemo/main.c: demonstrate lt_dlopen(0) ! 1999-02-15 Gary V. Vaughan * demo/dlmain.c (_WIN32): The lt_symlist structure is now const, so my original horrible temporary win32 hack no longer worked. --- 610,616 ---- * mdemo/configure.in: use AC_LIBTOOL_DLOPEN * mdemo/main.c: demonstrate lt_dlopen(0) ! 1999-02-15 Gary V. Vaughan * demo/dlmain.c (_WIN32): The lt_symlist structure is now const, so my original horrible temporary win32 hack no longer worked. *************** *** 646,652 **** * ltmain.in: allow -export-symbols for modules, use thread_safe flag, add include_expsyms to the exported symbols ! 1999-02-12 Gary V. Vaughan * libltdl/ltdl.h (_LTDLL_EXTERN): libltdl is no longer linked as a shared library, so the _declspec's were preventing the linker from --- 648,654 ---- * ltmain.in: allow -export-symbols for modules, use thread_safe flag, add include_expsyms to the exported symbols ! 1999-02-12 Gary V. Vaughan * libltdl/ltdl.h (_LTDLL_EXTERN): libltdl is no longer linked as a shared library, so the _declspec's were preventing the linker from *************** *** 738,744 **** * libltdl/ltdl.c (lt_dlopenext): tmp would be trashed if shlib_ext was longer than 3 characters ! 1999-02-02 Gary V. Vaughan * ltconfig.in: new config.guess returns *-*-cygwin now instead of *-*-cygwin32. sed -e 's%\(cygwin\|mingw\)32%\1%g' ltconfig.in --- 740,746 ---- * libltdl/ltdl.c (lt_dlopenext): tmp would be trashed if shlib_ext was longer than 3 characters ! 1999-02-02 Gary V. Vaughan * ltconfig.in: new config.guess returns *-*-cygwin now instead of *-*-cygwin32. sed -e 's%\(cygwin\|mingw\)32%\1%g' ltconfig.in *************** *** 750,756 **** yes' implies gnu ld, otherwise MSVC++ (which I haven't tested since I inheritted the code from Ian Lance Taylor btw!) is implied. ! 1999-01-28 Gary V. Vaughan * ltmain.in: Reverted this change of Alexandre's from the 1999-01-25; "don't try to use .o instead of .lo just because --- 752,758 ---- yes' implies gnu ld, otherwise MSVC++ (which I haven't tested since I inheritted the code from Ian Lance Taylor btw!) is implied. ! 1999-01-28 Gary V. Vaughan * ltmain.in: Reverted this change of Alexandre's from the 1999-01-25; "don't try to use .o instead of .lo just because *************** *** 768,774 **** AM_PROG_LIBTOOL Reported by Jeff Garzik ! 1999-01-27 Gary V. Vaughan * THANKS: Now that we have a policy, applied it to the existing list. This in no way demeans the work of those people removed --- 770,776 ---- AM_PROG_LIBTOOL Reported by Jeff Garzik ! 1999-01-27 Gary V. Vaughan * THANKS: Now that we have a policy, applied it to the existing list. This in no way demeans the work of those people removed *************** *** 874,880 **** message, and added a warning about inter-library dependencies even for non-module builds ! 1999-01-26 Gary V. Vaughan * Makefile.am (install-data-hook): Don't show the if expression that tests for gzip with a conditional error message; just do it --- 876,882 ---- message, and added a warning about inter-library dependencies even for non-module builds ! 1999-01-26 Gary V. Vaughan * Makefile.am (install-data-hook): Don't show the if expression that tests for gzip with a conditional error message; just do it *************** *** 979,985 **** anything about the format of the date, just that it does not contain `$' ! 1999-01-22 Gary V. Vaughan * configure.in (date): echo the version number during configuration, and show $date for cvs versions. --- 981,987 ---- anything about the format of the date, just that it does not contain `$' ! 1999-01-22 Gary V. Vaughan * configure.in (date): echo the version number during configuration, and show $date for cvs versions. *************** *** 1002,1008 **** * ltconfig.in, ltmain.in (TIMESTAMP): append timestamp to most references to VERSION ! 1999-01-22 Gary V. Vaughan * ltmain.in (ild): Revert the change which allowed libtool to link libraries with dependencies on .la libs. --- 1004,1010 ---- * ltconfig.in, ltmain.in (TIMESTAMP): append timestamp to most references to VERSION ! 1999-01-22 Gary V. Vaughan * ltmain.in (ild): Revert the change which allowed libtool to link libraries with dependencies on .la libs. *************** *** 1035,1041 **** * demo/configure.in, demo/Makefile.am (DLPREOPEN): reverted; it didn't make any difference. ! 1999-01-21 Gary V. Vaughan * THANKS: Added Chris Laas --- 1037,1043 ---- * demo/configure.in, demo/Makefile.am (DLPREOPEN): reverted; it didn't make any difference. ! 1999-01-21 Gary V. Vaughan * THANKS: Added Chris Laas *************** *** 1165,1171 **** * mdemo/main.c (LTDL_PREOPENED_SYMBOLS): remove ! 1999-01-20 Gary V. Vaughan * TODO: Added inter-library deps for ltlibs. --- 1167,1173 ---- * mdemo/main.c (LTDL_PREOPENED_SYMBOLS): remove ! 1999-01-20 Gary V. Vaughan * TODO: Added inter-library deps for ltlibs. *************** *** 1222,1228 **** flags to LDADD * doc/libtool.texi (Using Automake): how to add -dlopen to LDADD ! 1999-01-19 Gary V. Vaughan From Andrey Slepuhin * ltmain.in (hardcode_action) Oops, misapplied the patch! --- 1224,1230 ---- flags to LDADD * doc/libtool.texi (Using Automake): how to add -dlopen to LDADD ! 1999-01-19 Gary V. Vaughan From Andrey Slepuhin * ltmain.in (hardcode_action) Oops, misapplied the patch! *************** *** 1332,1338 **** (find_module) tryall_dlopen old_name first, so that we don't override statically linked symbols with dlopened ones ! 1999-01-15 Gary V. Vaughan From Andrey Slepuhin * libtoolize.in (cd $pkgdatadir): Make sure we return the the --- 1334,1340 ---- (find_module) tryall_dlopen old_name first, so that we don't override statically linked symbols with dlopened ones ! 1999-01-15 Gary V. Vaughan From Andrey Slepuhin * libtoolize.in (cd $pkgdatadir): Make sure we return the the *************** *** 1379,1385 **** * mdemo/Makefile.am: use -export-dynamic until libtool and libltdl are able to handle module dependencies ! 1999-01-14 Gary V. Vaughan * THANKS: added Mark Elbrecht. * ltconfig.in (PATH_SEPARATOR): new variable to hold valid $PATH --- 1381,1387 ---- * mdemo/Makefile.am: use -export-dynamic until libtool and libltdl are able to handle module dependencies ! 1999-01-14 Gary V. Vaughan * THANKS: added Mark Elbrecht. * ltconfig.in (PATH_SEPARATOR): new variable to hold valid $PATH *************** *** 1506,1512 **** (@DIST_MAKEFILE_LIST@): create subdir if needed, then run configure. On-demand configuration of subdirs at distribution time was ! suggested by Gary V. Vaughan * libtool.m4, ltconfig.in (NM): search for NM in PATH before /usr/ccs/bin, /usr/ucb and /bin. However, if the found one isn't --- 1508,1514 ---- (@DIST_MAKEFILE_LIST@): create subdir if needed, then run configure. On-demand configuration of subdirs at distribution time was ! suggested by Gary V. Vaughan * libtool.m4, ltconfig.in (NM): search for NM in PATH before /usr/ccs/bin, /usr/ucb and /bin. However, if the found one isn't *************** *** 1563,1569 **** * mdemo/configure.in: check only for math.h (string.h is no longer necessary) ! 1999-01-12 Gary V. Vaughan * configure.in (ltdl-install): Fixed up the indentation so that `configure --help' is pretty again. --- 1565,1571 ---- * mdemo/configure.in: check only for math.h (string.h is no longer necessary) ! 1999-01-12 Gary V. Vaughan * configure.in (ltdl-install): Fixed up the indentation so that `configure --help' is pretty again. *************** *** 1657,1668 **** non-libtool modules, dlopen with the flags GLOBAL and NOW * mdemo/main.c: report the error using lt_dlerror() ! 1999-01-08 Gary V. Vaughan * doc/libtool.texi (old_archive_from_new_commands): Documented this ltcofig variable. ! 1999-01-07 Gary V. Vaughan * ltmain.sh (cygwin, allow_undefined): Unfortunately, there are problems with this variable when trying to make a dll which has --- 1659,1670 ---- non-libtool modules, dlopen with the flags GLOBAL and NOW * mdemo/main.c: report the error using lt_dlerror() ! 1999-01-08 Gary V. Vaughan * doc/libtool.texi (old_archive_from_new_commands): Documented this ltcofig variable. ! 1999-01-07 Gary V. Vaughan * ltmain.sh (cygwin, allow_undefined): Unfortunately, there are problems with this variable when trying to make a dll which has *************** *** 1678,1684 **** * libltdl/ltdl.c: assigned copyright to the FSF * libltdl/ltdl.h, mdemo/foo*,main.c: likewise ! 1999-01-06 Gary V. Vaughan * ltmain.in (dllsearchpath): add absolute directory paths to dllsearchpath so that the wrapper scripts can be called from any --- 1680,1686 ---- * libltdl/ltdl.c: assigned copyright to the FSF * libltdl/ltdl.h, mdemo/foo*,main.c: likewise ! 1999-01-06 Gary V. Vaughan * ltmain.in (dllsearchpath): add absolute directory paths to dllsearchpath so that the wrapper scripts can be called from any *************** *** 1810,1816 **** USE_DLPREOPEN was defined, integrated shl_load code from GModule (still untested) ! 1998-12-24 Gary V. Vaughan * libltdl/configure.in: fixup spacing in --enable-ltdl-install help string so that it lines up nicely for configure --help. --- 1812,1818 ---- USE_DLPREOPEN was defined, integrated shl_load code from GModule (still untested) ! 1998-12-24 Gary V. Vaughan * libltdl/configure.in: fixup spacing in --enable-ltdl-install help string so that it lines up nicely for configure --help. *************** *** 1851,1857 **** * mdemo/Makefile.am (mdemo_debug_LDADD, mdemo_debug_DEPENDENCIES): use libltdl.la ! 1998-12-23 Gary V. Vaughan * doc/PLATFORMS: added my cygwin32 box (i686-pc-cygwin32). --- 1853,1859 ---- * mdemo/Makefile.am (mdemo_debug_LDADD, mdemo_debug_DEPENDENCIES): use libltdl.la ! 1998-12-23 Gary V. Vaughan * doc/PLATFORMS: added my cygwin32 box (i686-pc-cygwin32). *************** *** 1910,1916 **** * libltdl/configure.in: warn if dlopen is not supported * mdemo/Makefile.am (mdemo.debug): use libltdls ! 1998-12-22 Gary V. Vaughan * ltconfig.in: revert Thomas Tanners change to create all libraries without the `lib' prefix on win32, otherwise `gcc foo.c --- 1912,1918 ---- * libltdl/configure.in: warn if dlopen is not supported * mdemo/Makefile.am (mdemo.debug): use libltdls ! 1998-12-22 Gary V. Vaughan * ltconfig.in: revert Thomas Tanners change to create all libraries without the `lib' prefix on win32, otherwise `gcc foo.c *************** *** 1932,1938 **** * depdemo/.cvsignore: renamed hell* to depdemo*, added *.lo,*.la * mdemo/.cvsignore: ditto ! 1998-12-21 Gary V. Vaughan * libtool.m4 (AM_SYS_NM_PARSE): apparently __ptr_t is predefined on some systems - use lt_ptr_t instead. --- 1934,1940 ---- * depdemo/.cvsignore: renamed hell* to depdemo*, added *.lo,*.la * mdemo/.cvsignore: ditto ! 1998-12-21 Gary V. Vaughan * libtool.m4 (AM_SYS_NM_PARSE): apparently __ptr_t is predefined on some systems - use lt_ptr_t instead. *************** *** 2004,2010 **** demo), updated the documentation, import sin and cos in main program rather than linking libfoo1 statically ! 1998-12-17 Gary V. Vaughan * libtool.m4 (AM_PROG_LIBTOOL): Added AC_PREREQ(2.12) to prevent people using libtool with old autoconfs that don't provide the --- 2006,2012 ---- demo), updated the documentation, import sin and cos in main program rather than linking libfoo1 statically ! 1998-12-17 Gary V. Vaughan * libtool.m4 (AM_PROG_LIBTOOL): Added AC_PREREQ(2.12) to prevent people using libtool with old autoconfs that don't provide the *************** *** 2120,2126 **** (*demo/Makefile.in): don't update autoconf/automake files any more; make check is needed ! 1998-12-14 Gary V. Vaughan * ltconfig.in (archive_cmds): tweaked for cygwin b18->b20.1 compatibility and fixed a bug with generating the export --- 2122,2128 ---- (*demo/Makefile.in): don't update autoconf/automake files any more; make check is needed ! 1998-12-14 Gary V. Vaughan * ltconfig.in (archive_cmds): tweaked for cygwin b18->b20.1 compatibility and fixed a bug with generating the export *************** *** 2150,2156 **** * libltdl/Makefile.am (noinst_HEADERS): don't install ltdl.h yet (noinst_LTLIBRARIES): ditto for libltdl.la ! 1998-12-08 Gary V. Vaughan * README-alpha: adapted the release procedure from automake/HACKING. --- 2152,2158 ---- * libltdl/Makefile.am (noinst_HEADERS): don't install ltdl.h yet (noinst_LTLIBRARIES): ditto for libltdl.la ! 1998-12-08 Gary V. Vaughan * README-alpha: adapted the release procedure from automake/HACKING. *************** *** 2196,2202 **** * ltmain.in: use sys_lib_search_path, removed extradeplibs (they're not portable) ! 1998-12-02 Gary V. Vaughan * libltdl/configure.in: look for string.h or else strings.h, and also check for ANSI strrchr() function. Fix `undescore before --- 2198,2204 ---- * ltmain.in: use sys_lib_search_path, removed extradeplibs (they're not portable) ! 1998-12-02 Gary V. Vaughan * libltdl/configure.in: look for string.h or else strings.h, and also check for ANSI strrchr() function. Fix `undescore before *************** *** 2221,2227 **** * mdemo/modules/Makefile.am: replaced -export-symbols with -export-dynamic since it doesn't work for modules ! 1998-12-01 Gary V. Vaughan * README: Updated homepage pointer to gnu libtool page. --- 2223,2229 ---- * mdemo/modules/Makefile.am: replaced -export-symbols with -export-dynamic since it doesn't work for modules ! 1998-12-01 Gary V. Vaughan * README: Updated homepage pointer to gnu libtool page. *************** *** 2244,2250 **** * config.guess, config.sub: imported from autoconf pre-2.13 ! 1998-11-27 Gary V. Vaughan * libtool (AM_PROG_LD): Oops... we need to know the host_os for the changes below. I'm not sure whether mingw32 and os2 support --- 2246,2252 ---- * config.guess, config.sub: imported from autoconf pre-2.13 ! 1998-11-27 Gary V. Vaughan * libtool (AM_PROG_LD): Oops... we need to know the host_os for the changes below. I'm not sure whether mingw32 and os2 support *************** *** 2399,2405 **** * PORTING: new file, with general instructions and inter-library dependencies tips ! 1998-11-11 Gary V. Vaughan * ltconfig.in: make use of '~' field separator in reload_cmds, old_archive_from_new_cmds, old_archive_cmds, archive_cmds, --- 2401,2407 ---- * PORTING: new file, with general instructions and inter-library dependencies tips ! 1998-11-11 Gary V. Vaughan * ltconfig.in: make use of '~' field separator in reload_cmds, old_archive_from_new_cmds, old_archive_cmds, archive_cmds, *************** *** 2475,2481 **** modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo ! 1998-11-04 Gary V. Vaughan * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS --- 2477,2483 ---- modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo ! 1998-11-04 Gary V. Vaughan * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS Index: libtool/Makefile.am diff -c libtool/Makefile.am:1.37.2.12 libtool/Makefile.am:1.63 *** libtool/Makefile.am:1.37.2.12 Fri May 21 07:20:23 1999 --- libtool/Makefile.am Wed Sep 20 17:10:41 2000 *************** *** 6,25 **** SUBDIRS = $(BUILD_SUBDIRS) DIST_SUBDIRS = $(BUILD_SUBDIRS) $(CONF_SUBDIRS) ! # We need to export these variables when we run ltconfig. CFLAGS = @CFLAGS@ CPPLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS= @LIBS@ ! aclocal_macros = libtool.m4 ! EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.in \ mkstamp ChangeLog.0 ! CLEANFILES = libtool libtoolize ltconfig.T ltmain.shT # These are required by libtoolize. ! pkgdata_SCRIPTS = config.guess config.sub ltconfig pkgdata_DATA = ltmain.sh # This macro file should be visible to Automake's aclocal. --- 6,25 ---- SUBDIRS = $(BUILD_SUBDIRS) DIST_SUBDIRS = $(BUILD_SUBDIRS) $(CONF_SUBDIRS) ! # We need to export these variables CFLAGS = @CFLAGS@ CPPLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS= @LIBS@ ! aclocal_macros = libtool.m4 ltdl.m4 ! EXTRA_DIST = $(aclocal_macros) bootstrap libtoolize.in ltmain.in \ mkstamp ChangeLog.0 ! CLEANFILES = libtool libtoolize ltmain.shT # These are required by libtoolize. ! pkgdata_SCRIPTS = config.guess config.sub pkgdata_DATA = ltmain.sh # This macro file should be visible to Automake's aclocal. *************** *** 28,54 **** # The standalone libtool script, and the libtool distributor. bin_SCRIPTS = libtool libtoolize ! libtool: $(srcdir)/ltmain.sh $(srcdir)/ltconfig ! CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ ! LD="$(LD)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \ ! LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ ! DLLTOOL="$(DLLTOOL)" OBJDUMP="$(OBJDUMP)" AS="$(AS)" \ ! $(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \ ! --output=$@ $(srcdir)/ltmain.sh ! ! # Experimental C version of libtool. ! clibtool: $(srcdir)/ltmain.c $(srcdir)/ltconfig ! CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ ! LD="$(LD)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \ ! LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ ! DLLTOOL="$(DLLTOOL)" OBJDUMP="$(OBJDUMP)" AS="$(AS)" \ ! $(SHELL) $(srcdir)/ltconfig $(LIBTOOL_FLAGS) --srcdir=$(srcdir) \ ! --output=$@ $(srcdir)/ltmain.c libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status ! CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status ! chmod +x libtoolize # TSDEPS will be defined to TSDEPS_DIST at `make dist' time TSDEPS = TSDEPS_DIST = ChangeLog libtool.m4 --- 28,49 ---- # The standalone libtool script, and the libtool distributor. bin_SCRIPTS = libtool libtoolize ! libtool: $(srcdir)/ltmain.sh $(top_builddir)/configure.in ! $(SHELL) $(top_builddir)/config.status --recheck ! chmod +x $@ libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status ! CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) $(top_builddir)/config.status ! chmod +x $@ + $(srcdir)/ltmain.sh: $(srcdir)/ltmain.in $(TSDEPS) + -rm -f ltmain.shT + date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \ + sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \ + -e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT + mv -f ltmain.shT $@ || \ + (rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT) + # TSDEPS will be defined to TSDEPS_DIST at `make dist' time TSDEPS = TSDEPS_DIST = ChangeLog libtool.m4 *************** *** 60,95 **** @if (cd $(srcdir) && test -d CVS && \ $(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \ echo "Cannot make dist before commit"; exit 1; else :; fi - $(MAKE) TSDEPS="$(TSDEPS_DIST)" $(srcdir)/ltconfig $(srcdir)/ltmain.sh - - # Do line number substitution, as well as PACKAGE, VERSION and TIMESTAMP. - # Line numbering transliterated from a section in autoconf (Autoconf 2.12). - @srcdir@/ltconfig: $(srcdir)/ltconfig.in $(top_srcdir)/configure.in $(TSDEPS) - rm -f ltconfig.T - date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \ - $(AWK) '/@LINENO@/ { printf "%d:", NR } { print }' $(srcdir)/ltconfig.in | \ - sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \ - -e "s%@""TIMESTAMP@%$$date%" \ - -e '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' \ - > ltconfig.T - chmod +x ltconfig.T - mv -f ltconfig.T $@ || \ - (rm -f $@ && cp ltconfig.T $@ && rm -f ltconfig.T) - @srcdir@/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in $(TSDEPS) - rm -f ltmain.shT - date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \ - sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \ - -e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT - mv -f ltmain.shT $@ || \ - (rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT) - # All our rules should depend on these demo files. ! all-recursive: $(ACINCLUDE_M4_LIST) @ACINCLUDE_M4_LIST@: $(srcdir)/libtool.m4 ! rm -f $@ ! cp $(srcdir)/libtool.m4 $@ .PHONY: configure-subdirs configure-subdirs distdir: $(DIST_MAKEFILE_LIST) --- 55,73 ---- @if (cd $(srcdir) && test -d CVS && \ $(CVS) -n update $(TSDEPS_DIST) | grep '^M'); then \ echo "Cannot make dist before commit"; exit 1; else :; fi # All our rules should depend on these demo files. ! all-recursive: $(srcdir)/libltdl/acinclude.m4 $(ACINCLUDE_M4_LIST) ! ! @srcdir@/libltdl/acinclude.m4: $(srcdir)/libtool.m4 $(srcdir)/ltdl.m4 ! -rm -f $@ $@T ! cat $(srcdir)/libtool.m4 $(srcdir)/ltdl.m4 > $@T ! mv $@T $@ @ACINCLUDE_M4_LIST@: $(srcdir)/libtool.m4 ! -rm -f $@ $@T ! cat $(srcdir)/libtool.m4 > $@T ! mv $@T $@ .PHONY: configure-subdirs configure-subdirs distdir: $(DIST_MAKEFILE_LIST) Index: libtool/NEWS diff -c libtool/NEWS:1.24.2.32 libtool/NEWS:1.91 *** libtool/NEWS:1.24.2.32 Fri May 26 19:24:07 2000 --- libtool/NEWS Tue Apr 24 17:05:37 2001 *************** *** 1,5 **** --- 1,59 ---- NEWS - list of user-visible changes between releases of GNU Libtool + New in 1.4: 2001-04-25; CVS version 1.3e, Libtool team: + * Support for aix5*. + * Bugfixes. + + New in 1.3d: 2001-04-02; CVS version 1.3c, Libtool team: + * ltconfig is no more. Generation of libtool happens directly from + the configure file. + * Multithread safe with lt_dlmutex_register callback registration. + * New -no-install flag to avoid the use of executable wrapper scripts. + * New --with-pic, -prefer-pic and -prefer-non-pic flags to control + the generation of PIC/non-PIC code. + * Support for hardcoding run-time paths (-R) into libraries. + * Support -dlopen and -dlpreopen for libraries. + * Libtool now allows you to link shared libraries against static code. + * New functions in libltdl: + lt_dlgetinfo, lt_dlhandle_next and lt_dlforeach provide access to module + specific data in handles. + lt_dlcaller_register, lt_dlcaller_set_data and lt_dlcaller_get_data provide + management for user storage of per module data. + lt_dlloader_next, lt_dlloader_name, lt_dlloader_find, lt_dlloader_add and + lt_dlloader_remove can be used for adding new types of module loaders. + lt_dladderror, lt_dlseterror integrate user module loaders with lt_dlerror. + * "-Xcompiler" and "-Wc," does now work in compile mode, too. + * Support recent dlltool formats. + * Start of support code for cross-compiling to win32. + * libltdl can now be built as a dll with win32. + * m4 macros needed to configure libltdl split out into libltdl/ltdl.m4. + * New port to NEWS-OS Release 6. + * Improved support for darwin (rhapsody), mingw32, NetBSD, Compaq Tru64 V5.0 + and Digital Unix V4.*. + * Initial support for ia64 linux. + * Initial support for a.out freebsd shared libs. + * Initial support for Paul Sokolovsky's pw32 POSIX over win32 layer. + * Many bugfixes (especially in libltdl) + + New in 1.3b: 1999-07-02; CVS version 1.3a, Libtool team: + * Complete inter-library dependencies support. It's now possible + to link libtool libraries against other libtool libraries. + * Libtool is able to find already-installed libtool libraries, + even if they were moved out of their installation directory. + * New "-Wc,flag" and "-Xcompiler flag" flags to pass flags + directly to the compiler + * New "-Wl,flag" and "-Xlinker flag" flags to pass flags + directly to the linker + * New "-no-fast-install" flag to selectively disable fast-install mode. + * Support for installing stripped libraries using GNU strip (install -s). + Automake >= 1.5 will install stripped libraries with "make install-strip". + * Allow linking shared libraries against static ones + on FreeBSD, GNU/Linux, GNU Hurd and Solaris + * Support for linking DLLs on Win32 + * New `clean' mode to delete uninstalled files. + * New demos and tests + * Various bugfixes + New in 1.3.5: 2000-05-27, CVS version 1.3.4a, Libtool team: * Support for mac OS X (rhapsody). * Support for *-sequent-sysv4. *************** *** 51,60 **** libtool libraries. Linking of uninstalled libtool libraries into libraries is under development for 1.4. * Do not drop library dependencies on platforms that allow them. ! * Linking with uninstalled libraries no longer picks installed ones by mistake. * Use libraries from the build tree when running uninstalled ! executables (may require double linking). * Allow developers to optimize for build-tree executions. * Support -export-symbols-regex for controlled symbol exporting. * Support -R to hardcode directories in library search paths. --- 105,114 ---- libtool libraries. Linking of uninstalled libtool libraries into libraries is under development for 1.4. * Do not drop library dependencies on platforms that allow them. ! * Linking with uninstalled libraries no longer picks installed ones by mistake. * Use libraries from the build tree when running uninstalled ! executables (may require double linking). * Allow developers to optimize for build-tree executions. * Support -export-symbols-regex for controlled symbol exporting. * Support -R to hardcode directories in library search paths. *************** *** 125,135 **** It is still undocumented, but you can already find some examples in: * New mdemo directory, with tests of -module and dlopening examples. Be aware that libltdl is only known to work on a few platforms such as ! GNU/Linux and Solaris2. Some mdemo tests are known to FAIL on several other platforms; please ignore these failures by now (or work to fix them :-). * Inter-library dependencies patch finally integrated, but there's ! still much porting to do. See PORTING for details (some plans for the future in mail/deplibs in the CVS tree). * New option -export-symbols to control symbol exporting when possible. * Fixed -export-dynamic problem with C++ programs in egcs 1.1. --- 179,189 ---- It is still undocumented, but you can already find some examples in: * New mdemo directory, with tests of -module and dlopening examples. Be aware that libltdl is only known to work on a few platforms such as ! GNU/Linux and Solaris2. Some mdemo tests are known to FAIL on several other platforms; please ignore these failures by now (or work to fix them :-). * Inter-library dependencies patch finally integrated, but there's ! still much porting to do. See PORTING for details (some plans for the future in mail/deplibs in the CVS tree). * New option -export-symbols to control symbol exporting when possible. * Fixed -export-dynamic problem with C++ programs in egcs 1.1. Index: libtool/README diff -c libtool/README:1.6.4.3 libtool/README:1.14 *** libtool/README:1.6.4.3 Wed Jun 23 08:13:15 1999 --- libtool/README Wed Dec 13 18:53:45 2000 *************** *** 2,7 **** --- 2,15 ---- the complexity of using shared libraries behind a consistent, portable interface. + IMPORTANT: + ========== + + ** Until the next release of automake, you should apply the patch at ** + ** the end of this file to your installed automake script if you ** + ** intend to use it in conjunction with this release of libtool. ** + + To use libtool, add the new generic library building commands to your Makefile, Makefile.in, or Makefile.am. See the documentation for details. *************** *** 20,29 **** --- 28,39 ---- HP-UX 9.x, 10.x, 11.x (*-*-hpux9*, *-*-hpux10*, *-*-hpux11*) [see note] IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*) NCR MP-RAS 3.x (*-ncr-sysv4.3*) [see note] + NEWS-OS Release 6 (*-*-newsos6) Motorola System V 4 (mk88-motorola-sysv4) [see note] NetBSD 1.x (*-*-netbsd*) OpenBSD 2.x (*-*-openbsd*) OS/2 using EMX (*-*-os2*) + Reliant Unix (*-sni-sysv4) [see note] SCO OpenServer 5.x (*-*-sco3.2v5*) SCO UnixWare 7.x (*-*-sysv5*) Solaris 2.x (*-*-solaris2*) *************** *** 47,52 **** --- 57,66 ---- NOTE: Any earlier DG/UX system with ELF executables, such as R3.10 or R4.10, is also likely to work, but hasn't been explicitly tested. + NOTE: Libtool has only been tested with the Siemens C-compiler and + an old version of gcc provided by Marco Walther you can find on + ftp://ftp.mch.sni.de/sni/mr/pd/gnu/gcc/gcc.2.7.2.3 on Reliant Unix. + Libtool's home page is: http://www.gnu.org/software/libtool/libtool.html *************** *** 64,67 **** libtool to a new platform, please send electronic mail to the libtool mailing list or bug reports to . Don't forget to mention the version of libtool that you are currently ! using (by typing `ltconfig --version'). --- 78,144 ---- libtool to a new platform, please send electronic mail to the libtool mailing list or bug reports to . Don't forget to mention the version of libtool that you are currently ! using (by typing `libtool --version'). ! ! People have complained that they find the version numbering scheme ! under which libtool is released confusing... it works like this: ! ! . ! ! Releases with a less than 1 were not yet feature ! complete. If libtool ever undergoes a major rewrite or substantial ! restructuring, the will be incremented again. In the ! mean time, whenever we make a stable release it will have its ! incremented with respect to the previous stable ! release. ! ! So that alpha releases can be distinguished from stable releases, ! we append a letter to them, starting with `a' and continuing ! alphabetically: ! ! . ! ! Since alpha releases are start with the code of a previous stable ! release, the and are the same as the ! stable release they started with. So release `1.3a' is the first ! alpha release after stable release `1.3', and so on. ! ! To complicate matters slightly we always increment the letter in the ! repository before *and* after making a release tarball. This means ! that "odd" letters (a,c,e,g...) only exist in the repository, and ! "even" letters are used instantaneously for an alpha release. For ! example, you can tell that libtool-1.3c is an alpha release that is a ! snapshot of the repository taken between official alpha releases ! 1.3b and 1.3d. Since the odd lettered alpha release number potentially ! cover many states of the tree, we somtimes qualify such releases by ! adding the cvs version of the ChangeLog: ! ! $ libtool --version ! ltmain.sh (GNU libtool) 1.3c (1.666 2000/01/14 13:50:21) ! ! Finally, if we need to make a patch release to fix bugs in a stable ! release, and the development on the trunk has made the tree unstable, ! we use a third number, so: ! ! .. ! ! $ libtool --version ! ltconfig (GNU libtool) 1.3.4 (1.385.2.196 1999/12/07 21:47:57) ! ! There might be several patch releases to the last stable release, ! and all happening concurrently with alpha releases. For example, ! libtool-1.3.4 and libtool-1.3b might be available at the same time: ! `1.3.4' is the fourth patch release after stable release `1.3'; ! `1.3b' is the first alpha release after stable release `1.3'. ! ! --- /usr/bin/automake Sat Mar 11 09:25:33 2000 ! +++ automake Thu Sep 7 22:08:33 2000 ! @@ -187,7 +187,7 @@ $seen_libtool = 0; ! $libtool_line = 0; ! ! # Files installed by libtoolize. ! -@libtoolize_files = ('ltconfig', 'ltmain.sh', 'config.guess', 'config.sub'); ! +@libtoolize_files = ('ltmain.sh', 'config.guess', 'config.sub'); ! ! # TRUE if we've seen AM_MAINTAINER_MODE. ! $seen_maint_mode = 0; Index: libtool/THANKS diff -c libtool/THANKS:1.26.2.1 libtool/THANKS:1.29 *** libtool/THANKS:1.26.2.1 Sat Mar 27 08:51:36 1999 --- libtool/THANKS Tue Nov 2 04:33:05 1999 *************** *** 28,33 **** --- 28,36 ---- Manfred Weichel Marc J. Fraioli Mark Kettenis + Ossama Othman + Olly Betts + Pavel Roskin Sebastian Wilhelmi Stephan Kulow Steven M. Schultz Index: libtool/TODO diff -c libtool/TODO:1.21.2.8 libtool/TODO:1.46 *** libtool/TODO:1.21.2.8 Thu May 27 14:29:28 1999 --- libtool/TODO Tue Apr 24 13:30:21 2001 *************** *** 1,15 **** In the near future: ******************** * Check whether the version of libtool.m4 is compatible with ltconfig/ltmain.sh. Meanwhile, the recommended approach for developers using automake is to insert libtool.m4 in acinclude.m4. - * Inter-library dependencies should be fully tracked by libtool and - need to work for ltlibraries too. This requires looking up installed - libtool libraries for transparent support. Support for this feature - is under development, and is expected to be available in libtool 1.4. - * We could have an option to hardcode paths into libraries, as well as binaries: `... -Wl,-soname -Wl,/tmp/libtest.so.0 ...'. This is not possible on all platforms, and is in part obviated by the ability of --- 1,28 ---- In the near future: ******************** + * Figure out why zsh echo builtin's removal of \ escapes is not detected + by libtool's echo selector. + + * Port the migration of all code from ltconfig into libtool.m4 to the + multi-language-branch, so that CVS automake can remove its references + to ltconfig. + + * Fix the following bugs in libltdl: + - error reporting of tryall_dlopen(): + if the file actually doesn't exist (stat() fails or it wasn't dlpreopened) + -> report `file not found' + if it cannot be loaded (e.g. due to missing dependencies) + -> report dlerror + open question: which error should be reported if all dlloaders fail + or if a specific module type can only be loaded by one of them, how report its dlerror? + Also report dlerror() for dlclose and dlsym if available + - Make sure that the dependency_libs of a dlpreopened module won't be loaded. + * Check whether the version of libtool.m4 is compatible with ltconfig/ltmain.sh. Meanwhile, the recommended approach for developers using automake is to insert libtool.m4 in acinclude.m4. * We could have an option to hardcode paths into libraries, as well as binaries: `... -Wl,-soname -Wl,/tmp/libtest.so.0 ...'. This is not possible on all platforms, and is in part obviated by the ability of *************** *** 19,27 **** --- 32,69 ---- * Lists of exported symbols should be stored in the pseudo library so that the size of lt_preloaded_symbols can be reduced. + * Have some option to tell libtool not to include -L flags that point + into a certain tree in the dependence list of an installed library. + For example: -L-$top_builddir would let one link with libtool + libraries in sibling subdirectories within a project, using the -L + notation, without getting builddir pathnames ever mentioned in .la + files that get installed. + + * Eric Lemings writes: + Because of a growing number of config scripts for packages in GNOME 1.2 + (e.g. glib-config, xml-config, orbit-config. etc), development of GNOME + 2.0 spawned a separate tool called pkg-config that allows all packages + to use one tool rather than several different scripts to query compile + flags, link flags, and other configuration data. + + The functionality of pkg-config seems to me to have a lot of overlap + with the goals of libtool. I was wondering if anyone had considered + adding an eighth mode to libtool that just queries the installed + library for the same information that pkg-config provides. Since + most packages that use pkg-config also use libtool, I think this + would be a good way to reduce maintainer and developer dependencies. + + In the future: ************** + * The definitions for AC_LTDL_SHLIBEXT, AC_LTDL_SHLIBPATH and + AC_LTDL_SYSSEARCHPATH should not rely on the _LT_AC_LTCONFIG_HACK + macro. This involves moving the code which sets the variables + library_names_spec, shlibpath_var and sys_lib_dlsearch_path_spec from + into a separate macro, and AC_REQUIRING the newly extracted macro in the + respective ltdl.m4 macros. + * Godmar Back writes: libltdl uses such stdio functions as fopen, fgets, feof, fclose, and others. These functions are not async-signal-safe. While this does not make *************** *** 49,59 **** almost definitely require that automake pass some hints about linkage in to each object compilation line. ! * Resolve the name clash between import libs and static libs on win32. ! Probably the best way to do this is to create lib$name-dll.a for the import ! library, and continue to use lib$name.a for the static lib. libtool ! --mode=link can then favour -dll.a over .a if there is a choice. No point in ! doing this until we can export data items (above). * If not cross-compiling, have the static flag test run the resulting binary to make sure everything works. --- 91,101 ---- almost definitely require that automake pass some hints about linkage in to each object compilation line. ! * jeffdb@goodnet.com writes ! all you need to do for mutually dependant ! .dll's is to create an implib from a .def file ! so it appears that we might need to detect and handle mutual dependencies ! specially on win32 =(O| * If not cross-compiling, have the static flag test run the resulting binary to make sure everything works. *************** *** 68,82 **** systems that support them. ``Don't use static constructors'' is no longer a satisfactory answer. - * We need some mechanism to allow users to pass flags to the linker - and/or to the compiler, when creating libtool archives. We could - recognize linker flags such as `-Wl,flag' and `-Xlinker flag' in - libtool's command line, and passing them down to the linker, if "$wl" - is `-Wl,', or stripping the `-Wl,' part if we're calling `ld' - directly. We could also introduce `-Wc,flag' and `-Xcompiler flag' to - allow unrecognized flags to be passed to the compiler, after stripping - by libtool. This is already implemented in the CVS tree. - * Another form of convenience library is to have undocumented utility libraries, where only the shared version is installed. --- 110,115 ---- *************** *** 118,123 **** --- 151,159 ---- for example. In the future, we might even have an option to encode the sonames of all dependencies of a library into its soname. + * The current implementation of libltdl in a subdirectory doesn't work + properly with AC_CONFIG_AUX_DIR using projects. + Things to think about: ********************** *************** *** 131,133 **** --- 167,176 ---- * Maybe implement full support for other orthogonal library types (libhello_g, libhello_p, 64 vs 32-bit ABI's, etc). Make these types configurable. + + * Perhaps the iuse of libltdl could be made cleaner by allowing + registration of hook functions to call at various points. This would + hopefully free the user from having to maintain a parallel module + list with user data. This would likely involve being able to carry + additional per user module data in the lt_dlmodule structure -- perhaps + in the form of an associative array keyed by user name? Index: libtool/bootstrap diff -c libtool/bootstrap:1.1.2.4 libtool/bootstrap:1.16 *** libtool/bootstrap:1.1.2.4 Fri May 21 07:35:15 1999 --- libtool/bootstrap Sun Apr 22 16:28:01 2001 *************** *** 2,30 **** # helps bootstrapping libtool, when checked out from CVS # requires GNU autoconf and GNU automake - # this is not meant to go into the distributions rm -f acinclude.m4 ln -s libtool.m4 acinclude.m4 # fake the libtool scripts - touch ltconfig touch ltmain.sh touch libtoolize ! aclocal ! automake --gnu --add-missing ! autoconf ! for sub in demo libltdl mdemo cdemo; do cd $sub ! rm -f acinclude.m4 ! cp ../libtool.m4 acinclude.m4 ! aclocal ! test "$sub" = libltdl && autoheader ! automake --gnits --add-missing ! autoconf cd .. done ! rm -f ltconfig ltmain.sh libtoolize exit 0 --- 2,37 ---- # helps bootstrapping libtool, when checked out from CVS # requires GNU autoconf and GNU automake + file=Makefile.in + + : ${ACLOCAL=aclocal} + : ${AUTOMAKE=automake} + : ${AUTOCONF=autoconf} + : ${AUTOHEADER=autoheader} + rm -f acinclude.m4 ln -s libtool.m4 acinclude.m4 # fake the libtool scripts touch ltmain.sh + touch ltconfig touch libtoolize ! $ACLOCAL ! $AUTOMAKE --gnu --add-missing --copy ! $AUTOCONF ! for sub in libltdl demo depdemo mdemo cdemo; do cd $sub ! rm -f acinclude.m4 Makefile ! cat ../libtool.m4 > acinclude.m4 ! test "$sub" = libltdl && cat ../ltdl.m4 >> acinclude.m4 ! $ACLOCAL ! test "$sub" = libltdl && $AUTOHEADER ! $AUTOMAKE --gnits --add-missing ! $AUTOCONF cd .. done ! rm -f ltmain.sh ltconfig libtoolize Makefile exit 0 Index: libtool/config.guess diff -c libtool/config.guess:1.3.2.6 libtool/config.guess:1.9 *** libtool/config.guess:1.3.2.6 Sat May 27 04:12:27 2000 --- libtool/config.guess Tue Apr 24 17:05:38 2001 *************** *** 1,8 **** #! /bin/sh # Attempt to guess a canonical system name. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # Free Software Foundation, Inc. ! # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or --- 1,10 ---- #! /bin/sh # Attempt to guess a canonical system name. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. ! ! timestamp='2001-04-20' ! # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or *************** *** 30,55 **** # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you ! # don't specify an explicit system type (host/target name). ! # ! # Only a few systems have been added to this list; please add others ! # (but try to keep the structure clean). ! # ! # Use $HOST_CC if defined. $CC may point to a cross-compiler ! if test x"$CC_FOR_BUILD" = x; then ! if test x"$HOST_CC" != x; then ! CC_FOR_BUILD="$HOST_CC" ! else ! if test x"$CC" != x; then ! CC_FOR_BUILD="$CC" ! else ! CC_FOR_BUILD=cc ! fi ! fi fi # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then --- 32,117 ---- # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you ! # don't specify an explicit build system type. ! me=`echo "$0" | sed -e 's,.*/,,'` ! ! usage="\ ! Usage: $0 [OPTION] ! ! Output the configuration name of the system \`$me' is run on. ! ! Operation modes: ! -h, --help print this help, then exit ! -t, --time-stamp print date of last modification, then exit ! -v, --version print version number, then exit ! ! Report bugs and patches to ." ! ! version="\ ! GNU config.guess ($timestamp) ! ! Originally written by Per Bothner. ! Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 ! Free Software Foundation, Inc. ! ! This is free software; see the source for copying conditions. There is NO ! warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ! ! help=" ! Try \`$me --help' for more information." ! ! # Parse command line ! while test $# -gt 0 ; do ! case $1 in ! --time-stamp | --time* | -t ) ! echo "$timestamp" ; exit 0 ;; ! --version | -v ) ! echo "$version" ; exit 0 ;; ! --help | --h* | -h ) ! echo "$usage"; exit 0 ;; ! -- ) # Stop option processing ! shift; break ;; ! - ) # Use stdin as input. ! break ;; ! -* ) ! echo "$me: invalid option $1$help" >&2 ! exit 1 ;; ! * ) ! break ;; ! esac ! done ! ! if test $# != 0; then ! echo "$me: too many arguments$help" >&2 ! exit 1 fi + dummy=dummy-$$ + trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + + # CC_FOR_BUILD -- compiler used by this script. + # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still + # use `HOST_CC' if defined, but it is deprecated. + + case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break + fi + done + rm -f $dummy.c $dummy.o $dummy.rel + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then *************** *** 58,69 **** UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown ! UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - dummy=dummy-$$ - trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in --- 120,128 ---- UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown ! UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *************** *** 77,83 **** # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in ! amiga) machine=m68k-cbm ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; --- 136,142 ---- # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in ! amiga) machine=m68k-unknown ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; *************** *** 87,102 **** ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac ! # The Operating System including object format. ! if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ ! | grep __ELF__ >/dev/null ! then ! # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). ! # Return netbsd for either. FIX? ! os=netbsd ! else ! os=netbsdelf ! fi # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: --- 146,169 ---- ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac ! # The Operating System including object format, if it has switched ! # to ELF recently, or will in the future. ! case "${UNAME_MACHINE}" in ! i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) ! if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ ! | grep __ELF__ >/dev/null ! then ! # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). ! # Return netbsd for either. FIX? ! os=netbsd ! else ! os=netbsdelf ! fi ! ;; ! *) ! os=netbsd ! ;; ! esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: *************** *** 173,179 **** echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) ! echo m68k-cbm-sysv4 exit 0;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} --- 240,246 ---- echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) ! echo m68k-unknown-sysv4 exit 0;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} *************** *** 205,211 **** arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; ! SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) --- 272,278 ---- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; ! SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) *************** *** 341,350 **** EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; --- 408,420 ---- EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; *************** *** 392,400 **** ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ! i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c --- 462,478 ---- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ! i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c *************** *** 408,414 **** exit(0); } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then --- 486,492 ---- exit(0); } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then *************** *** 417,425 **** echo rs6000-ibm-aix3.2 fi exit 0 ;; ! *:AIX:*:4) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` ! if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc --- 495,503 ---- echo rs6000-ibm-aix3.2 fi exit 0 ;; ! *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` ! if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc *************** *** 427,433 **** if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else ! IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; --- 505,511 ---- if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else ! IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *************** *** 453,462 **** --- 531,558 ---- echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE *************** *** 491,501 **** } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` rm -f $dummy.c $dummy esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include --- 587,602 ---- } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy + fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include *************** *** 522,528 **** exit (0); } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; --- 623,629 ---- exit (0); } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; *************** *** 541,547 **** hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; ! i?86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else --- 642,648 ---- hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; ! i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else *************** *** 586,612 **** CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; ! CRAY*T3E:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; ! F300:UNIX_System_V:*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ! echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; ! i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) --- 687,714 ---- CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; ! CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; ! F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) ! FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ! echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; ! i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) *************** *** 627,632 **** --- 729,737 ---- i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we *************** *** 645,702 **** *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; ! *:Linux:*:*) ! ! # The BFD linker knows what the default object file format is, so ! # first see if it will tell us. cd to the root directory to prevent ! # problems with other programs or directories called `ld' in the path. ! ld_help_string=`cd /; ld --help 2>&1` ! ld_supported_emulations=`echo $ld_help_string \ ! | sed -ne '/supported emulations:/!d ! s/[ ][ ]*/ /g ! s/.*supported emulations: *// ! s/ .*// ! p'` ! case "$ld_supported_emulations" in ! *ia64) ! echo "${UNAME_MACHINE}-unknown-linux" ! exit 0 ! ;; ! i?86linux) ! echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ! ;; ! elf_i?86) ! echo "${UNAME_MACHINE}-pc-linux" ! exit 0 ! ;; ! i?86coff) ! echo "${UNAME_MACHINE}-pc-linux-gnucoff" ! exit 0 ! ;; ! sparclinux) ! echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ! exit 0 ! ;; ! armlinux) ! echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ! exit 0 ! ;; ! elf32arm*) ! echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" ! exit 0 ! ;; ! armelf_linux*) ! echo "${UNAME_MACHINE}-unknown-linux-gnu" ! exit 0 ! ;; ! m68klinux) ! echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ! exit 0 ! ;; ! elf32ppc | elf32ppclinux) ! # Determine Lib Version ! cat >$dummy.c < #if defined(__GLIBC__) extern char __libc_version[]; --- 750,790 ---- *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; ! i*86:Minix:*:*) ! echo ${UNAME_MACHINE}-pc-minix ! exit 0 ;; ! arm*:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux-gnu ! exit 0 ;; ! ia64:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux ! exit 0 ;; ! m68*:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux-gnu ! exit 0 ;; ! mips:Linux:*:*) ! cat >$dummy.c < /* for printf() prototype */ ! int main (int argc, char *argv[]) { ! #else ! int main (argc, argv) int argc; char *argv[]; { ! #endif ! #ifdef __MIPSEB__ ! printf ("%s-unknown-linux-gnu\n", argv[1]); ! #endif ! #ifdef __MIPSEL__ ! printf ("%sel-unknown-linux-gnu\n", argv[1]); ! #endif ! return 0; ! } ! EOF ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy ! ;; ! ppc:Linux:*:*) ! # Determine Lib Version ! cat >$dummy.c < #if defined(__GLIBC__) extern char __libc_version[]; *************** *** 709,831 **** #if defined(__GLIBC__) printf("%s %s\n", __libc_version, __libc_release); #else ! printf("unkown\n"); #endif return 0; } EOF ! LIBC="" ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null if test "$?" = 0 ; then ! ./$dummy | grep 1\.99 > /dev/null ! if test "$?" = 0 ; then ! LIBC="libc1" ! fi fi ! rm -f $dummy.c $dummy ! echo powerpc-unknown-linux-gnu${LIBC} exit 0 ;; esac ! ! if test "${UNAME_MACHINE}" = "alpha" ; then ! cat <$dummy.s ! .data ! \$Lformat: ! .byte 37,100,45,37,120,10,0 # "%d-%x\n" ! ! .text ! .globl main ! .align 4 ! .ent main ! main: ! .frame \$30,16,\$26,0 ! ldgp \$29,0(\$27) ! .prologue 1 ! .long 0x47e03d80 # implver \$0 ! lda \$2,-1 ! .long 0x47e20c21 # amask \$2,\$1 ! lda \$16,\$Lformat ! mov \$0,\$17 ! not \$1,\$18 ! jsr \$26,printf ! ldgp \$29,0(\$26) ! mov 0,\$16 ! jsr \$26,exit ! .end main ! EOF ! LIBC="" ! $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null ! if test "$?" = 0 ; then ! case `./$dummy` in ! 0-0) ! UNAME_MACHINE="alpha" ! ;; ! 1-0) ! UNAME_MACHINE="alphaev5" ! ;; ! 1-1) ! UNAME_MACHINE="alphaev56" ! ;; ! 1-101) ! UNAME_MACHINE="alphapca56" ! ;; ! 2-303) ! UNAME_MACHINE="alphaev6" ! ;; ! 2-307) ! UNAME_MACHINE="alphaev67" ! ;; ! 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 < /* for printf() prototype */ ! int main (int argc, char *argv[]) { ! #else ! int main (argc, argv) int argc; char *argv[]; { ! #endif ! #ifdef __MIPSEB__ ! printf ("%s-unknown-linux-gnu\n", argv[1]); ! #endif ! #ifdef __MIPSEL__ ! printf ("%sel-unknown-linux-gnu\n", argv[1]); ! #endif ! return 0; ! } ! EOF ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy ! elif test "${UNAME_MACHINE}" = "s390"; then ! echo s390-ibm-linux && exit 0 ! else ! # Either a pre-BFD a.out linker (linux-gnuoldld) ! # or one that does not give us useful --help. ! # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. ! # If ld does not provide *any* "supported emulations:" ! # that means it is gnuoldld. ! echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" ! test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 ! ! case "${UNAME_MACHINE}" in ! i?86) ! VENDOR=pc; ! ;; ! *) ! VENDOR=unknown; ! ;; ! esac ! # Determine whether the default compiler is a.out or elf ! cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ --- 797,923 ---- #if defined(__GLIBC__) printf("%s %s\n", __libc_version, __libc_release); #else ! printf("unknown\n"); #endif return 0; } + EOF + LIBC="" + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy | grep 1\.99 > /dev/null + if test "$?" = 0 ; then LIBC="libc1" ; fi + fi + rm -f $dummy.c $dummy + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 ;; + alpha:Linux:*:*) + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main EOF ! LIBC="" ! $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null ! if test "$?" = 0 ; then ! case `./$dummy` in ! 0-0) UNAME_MACHINE="alpha" ;; ! 1-0) UNAME_MACHINE="alphaev5" ;; ! 1-1) UNAME_MACHINE="alphaev56" ;; ! 1-101) UNAME_MACHINE="alphapca56" ;; ! 2-303) UNAME_MACHINE="alphaev6" ;; ! 2-307) UNAME_MACHINE="alphaev67" ;; ! 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 ;; ! parisc:Linux:*:* | hppa:Linux:*:*) ! # Look for CPU level ! case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in ! PA7*) echo hppa1.1-unknown-linux-gnu ;; ! PA8*) echo hppa2.0-unknown-linux-gnu ;; ! *) echo hppa-unknown-linux-gnu ;; ! esac ! exit 0 ;; ! parisc64:Linux:*:* | hppa64:Linux:*:*) ! echo hppa64-unknown-linux-gnu ! exit 0 ;; ! s390:Linux:*:* | s390x:Linux:*:*) ! echo ${UNAME_MACHINE}-ibm-linux ! exit 0 ;; ! sh*:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux-gnu ! exit 0 ;; ! sparc:Linux:*:* | sparc64:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux-gnu ! exit 0 ;; ! x86_64:Linux:*:*) ! echo x86_64-unknown-linux-gnu ! exit 0 ;; ! i*86:Linux:*:*) ! # The BFD linker knows what the default object file format is, so ! # first see if it will tell us. cd to the root directory to prevent ! # problems with other programs or directories called `ld' in the path. ! ld_supported_emulations=`cd /; ld --help 2>&1 \ ! | 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 ! ;; ! elf_i*86) ! TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ! ;; ! i*86coff) ! echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; esac ! # 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. ! test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 ! case "${UNAME_MACHINE}" in ! i*86) ! VENDOR=pc; ! ;; ! *) ! VENDOR=unknown; ! ;; ! esac ! # Determine whether the default compiler is a.out or elf ! cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ *************** *** 849,863 **** return 0; } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy ! fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. ! i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; ! i?86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, --- 941,956 ---- return 0; } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy ! test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ! ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. ! i*86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; ! i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, *************** *** 865,871 **** # 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.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} --- 958,964 ---- # 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.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} *************** *** 873,879 **** echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; ! i?86:*:5:7*) # Fixed at (any) Pentium or better UNAME_MACHINE=i586 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then --- 966,972 ---- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; ! i*86:*:5:7*) # Fixed at (any) Pentium or better UNAME_MACHINE=i586 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then *************** *** 882,888 **** echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; ! i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; ! m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; ! i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; ! rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; --- 1032,1055 ---- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; ! m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; ! i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; ! rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; *************** *** 987,993 **** mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; ! news*:NEWS-OS:*:6*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) --- 1083,1089 ---- mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; ! news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) *************** *** 1030,1044 **** *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; ! NSR-W:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 --- 1126,1177 ---- *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; ! NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 *************** *** 1130,1140 **** #endif #if defined (vax) ! #if !defined (ultrix) ! printf ("vax-dec-bsd\n"); exit (0); ! #else ! printf ("vax-dec-ultrix\n"); exit (0); ! #endif #endif #if defined (alliant) && defined (i860) --- 1263,1286 ---- #endif #if defined (vax) ! # if !defined (ultrix) ! # include ! # if defined (BSD) ! # if BSD == 43 ! printf ("vax-dec-bsd4.3\n"); exit (0); ! # else ! # if BSD == 199006 ! printf ("vax-dec-bsd4.3reno\n"); exit (0); ! # else ! printf ("vax-dec-bsd\n"); exit (0); ! # endif ! # endif ! # else ! printf ("vax-dec-bsd\n"); exit (0); ! # endif ! # else ! printf ("vax-dec-ultrix\n"); exit (0); ! # endif #endif #if defined (alliant) && defined (i860) *************** *** 1145,1151 **** } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. --- 1291,1297 ---- } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. *************** *** 1178,1183 **** esac fi ! #echo '(Unable to guess system type)' 1>&2 exit 1 --- 1324,1371 ---- esac fi ! cat >&2 < in order to provide the needed + information to handle your system. + + config.guess timestamp = $timestamp + + uname -m = `(uname -m) 2>/dev/null || echo unknown` + uname -r = `(uname -r) 2>/dev/null || echo unknown` + uname -s = `(uname -s) 2>/dev/null || echo unknown` + uname -v = `(uname -v) 2>/dev/null || echo unknown` + + /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` + /bin/uname -X = `(/bin/uname -X) 2>/dev/null` + + hostinfo = `(hostinfo) 2>/dev/null` + /bin/universe = `(/bin/universe) 2>/dev/null` + /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` + /bin/arch = `(/bin/arch) 2>/dev/null` + /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` + /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + + UNAME_MACHINE = ${UNAME_MACHINE} + UNAME_RELEASE = ${UNAME_RELEASE} + UNAME_SYSTEM = ${UNAME_SYSTEM} + UNAME_VERSION = ${UNAME_VERSION} + EOF + exit 1 + + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) + # time-stamp-start: "timestamp='" + # time-stamp-format: "%:y-%02m-%02d" + # time-stamp-end: "'" + # End: Index: libtool/config.sub diff -c libtool/config.sub:1.3.2.5 libtool/config.sub:1.8 *** libtool/config.sub:1.3.2.5 Sat May 27 04:12:27 2000 --- libtool/config.sub Tue Apr 24 17:05:38 2001 *************** *** 1,8 **** #! /bin/sh ! # Configuration validation subroutine script, version 1.1. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # 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,10 ---- #! /bin/sh ! # Configuration validation subroutine script. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. ! ! timestamp='2001-04-20' ! # 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. *************** *** 27,33 **** # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. - # Written by Per Bothner . # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. --- 29,34 ---- *************** *** 50,79 **** # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. ! if [ x$1 = x ] ! then ! echo Configuration name missing. 1>&2 ! echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 ! echo "or $0 ALIAS" 1>&2 ! echo where ALIAS is a recognized configuration type. 1>&2 ! exit 1 ! fi ! # First pass through any local machine types. ! case $1 in ! *local*) ! echo $1 ! exit 0 ! ;; ! *) ! ;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! nto-qnx* | linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; --- 51,123 ---- # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. ! me=`echo "$0" | sed -e 's,.*/,,'` ! usage="\ ! Usage: $0 [OPTION] CPU-MFR-OPSYS ! $0 [OPTION] ALIAS ! ! Canonicalize a configuration name. ! ! Operation modes: ! -h, --help print this help, then exit ! -t, --time-stamp print date of last modification, then exit ! -v, --version print version number, then exit ! ! Report bugs and patches to ." ! ! version="\ ! GNU config.sub ($timestamp) ! ! Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ! Free Software Foundation, Inc. ! ! This is free software; see the source for copying conditions. There is NO ! warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ! ! help=" ! Try \`$me --help' for more information." ! ! # Parse command line ! while test $# -gt 0 ; do ! case $1 in ! --time-stamp | --time* | -t ) ! echo "$timestamp" ; exit 0 ;; ! --version | -v ) ! echo "$version" ; exit 0 ;; ! --help | --h* | -h ) ! echo "$usage"; exit 0 ;; ! -- ) # Stop option processing ! shift; break ;; ! - ) # Use stdin as input. ! break ;; ! -* ) ! echo "$me: invalid option $1$help" ! exit 1 ;; ! ! *local*) ! # First pass through any local machine types. ! echo $1 ! exit 0;; ! ! * ) ! break ;; ! esac ! done ! ! case $# in ! 0) echo "$me: missing argument$help" >&2 ! exit 1;; ! 1) ;; ! *) echo "$me: too many arguments$help" >&2 ! exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *************** *** 99,105 **** -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ ! -apple) os= basic_machine=$1 ;; --- 143,149 ---- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ ! -apple | -axis) os= basic_machine=$1 ;; *************** *** 171,200 **** case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. ! tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ ! | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ ! | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ ! | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ ! | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ ! | mips64vr5000 | miprs64vr5000el | mcore \ ! | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ ! | thumb | d10v | fr30 | avr) basic_machine=$basic_machine-unknown ;; ! m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. ! i[34567]86) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. --- 215,254 ---- case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. ! tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ ! | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ ! | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ ! | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ ! | we32k | ns16k | clipper | i370 | sh | sh[34] \ ! | powerpc | powerpcle \ ! | 1750a | dsp16xx | pdp10 | pdp11 \ ! | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ ! | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ ! | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ ! | v850 | c4x \ ! | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ ! | pj | pjl | h8500) basic_machine=$basic_machine-unknown ;; ! m6811 | m68hc11 | m6812 | m68hc12) ! # Motorola 68HC11/12. ! basic_machine=$basic_machine-unknown ! os=-none ! ;; ! m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. ! i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *************** *** 204,230 **** ;; # Recognize the basic CPU types with company name. # FIXME: clean up the formatting here. ! vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ ! | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ ! | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ | hppa2.0n-* | hppa64-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ ! | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ ! | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ ! | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ ! | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ ! | bs2000-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. --- 258,287 ---- ;; # Recognize the basic CPU types with company name. # FIXME: clean up the formatting here. ! vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ ! | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ ! | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ ! | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ | hppa2.0n-* | hppa64-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ ! | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ ! | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ ! | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ ! | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ ! | [cjt]90-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ ! | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ ! | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. *************** *** 261,274 **** os=-sysv ;; amiga | amiga-*) ! basic_machine=m68k-cbm ;; amigaos | amigados) ! basic_machine=m68k-cbm os=-amigaos ;; amigaunix | amix) ! basic_machine=m68k-cbm os=-sysv4 ;; apollo68) --- 318,331 ---- os=-sysv ;; amiga | amiga-*) ! basic_machine=m68k-unknown ;; amigaos | amigados) ! basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) ! basic_machine=m68k-unknown os=-sysv4 ;; apollo68) *************** *** 315,327 **** basic_machine=cray2-cray os=-unicos ;; ! [ctj]90-cray) ! basic_machine=c90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; da30 | da30-*) basic_machine=m68k-da30 ;; --- 372,387 ---- basic_machine=cray2-cray os=-unicos ;; ! [cjt]90) ! basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; da30 | da30-*) basic_machine=m68k-da30 ;; *************** *** 369,374 **** --- 429,438 ---- basic_machine=tron-gmicro os=-sysv ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 *************** *** 444,462 **** basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? ! i[34567]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; ! i[34567]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; ! i[34567]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; ! i[34567]86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; --- 508,526 ---- basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? ! i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; ! i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; ! i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; ! i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; *************** *** 468,481 **** basic_machine=i386-unknown os=-vsta ;; - i386-go32 | go32) - basic_machine=i386-unknown - os=-go32 - ;; - i386-mingw32 | mingw32) - basic_machine=i386-unknown - os=-mingw32 - ;; iris | iris4d) basic_machine=mips-sgi case $os in --- 532,537 ---- *************** *** 501,506 **** --- 557,566 ---- basic_machine=ns32k-utek os=-sysv ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; miniframe) basic_machine=m68000-convergent ;; *************** *** 531,537 **** os=-coff ;; msdos) ! basic_machine=i386-unknown os=-msdos ;; mvs) --- 591,597 ---- os=-coff ;; msdos) ! basic_machine=i386-pc os=-msdos ;; mvs) *************** *** 595,600 **** --- 655,664 ---- basic_machine=i960-intel os=-mon960 ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; np1) basic_machine=np1-gould ;; *************** *** 630,657 **** pc532 | pc532-*) basic_machine=ns32k-pc532 ;; ! pentium | p5 | k5 | k6 | nexen) basic_machine=i586-pc ;; ! pentiumpro | p6 | 6x86) basic_machine=i686-pc ;; pentiumii | pentium2) ! basic_machine=i786-pc ;; ! pentium-* | p5-* | k5-* | k6-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ! pentiumpro-* | p6-* | 6x86-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) ! basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; ! power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown ;; --- 694,721 ---- pc532 | pc532-*) basic_machine=ns32k-pc532 ;; ! pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; ! pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) ! basic_machine=i686-pc ;; ! pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ! pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) ! basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; ! power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; *************** *** 666,671 **** --- 730,739 ---- ps2) basic_machine=i386-ibm ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; rom68k) basic_machine=m68k-rom68k os=-coff *************** *** 757,762 **** --- 825,834 ---- basic_machine=t3e-cray os=-unicos ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; *************** *** 852,864 **** vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; ! sparc | sparcv9) basic_machine=sparc-sun ;; cydra) --- 924,943 ---- vax) basic_machine=vax-dec ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; ! sh3 | sh4) ! basic_machine=sh-unknown ! ;; ! sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) *************** *** 880,885 **** --- 959,967 ---- basic_machine=c4x-none os=-coff ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 *************** *** 939,950 **** | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ ! | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in ! x86-* | i[34567]86-*) ;; *) os=-nto$os --- 1021,1033 ---- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ ! | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ ! | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in ! x86-* | i*86-*) ;; *) os=-nto$os *************** *** 1000,1006 **** -ns2 ) os=-nextstep2 ;; ! -nsk) os=-nsk ;; # Preserve the version number of sinix5. --- 1083,1089 ---- -ns2 ) os=-nextstep2 ;; ! -nsk*) os=-nsk ;; # Preserve the version number of sinix5. *************** *** 1037,1043 **** -xenix) os=-xenix ;; ! -*mint | -*MiNT) os=-mint ;; -none) --- 1120,1126 ---- -xenix) os=-xenix ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -none) *************** *** 1071,1076 **** --- 1154,1162 ---- arm*-semi) os=-aout ;; + pdp10-*) + os=-tops20 + ;; pdp11-*) os=-none ;; *************** *** 1179,1185 **** *-masscomp) os=-rtu ;; ! f301-fujitsu) os=-uxpv ;; *-rom68k) --- 1265,1271 ---- *-masscomp) os=-rtu ;; ! f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) *************** *** 1257,1263 **** -mpw* | -macos*) vendor=apple ;; ! -*mint | -*MiNT) vendor=atari ;; esac --- 1343,1349 ---- -mpw* | -macos*) vendor=apple ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; esac *************** *** 1266,1268 **** --- 1352,1362 ---- esac echo $basic_machine$os + exit 0 + + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) + # time-stamp-start: "timestamp='" + # time-stamp-format: "%:y-%02m-%02d" + # time-stamp-end: "'" + # End: Index: libtool/configure.in diff -c libtool/configure.in:1.26.2.16 libtool/configure.in:1.52 *** libtool/configure.in:1.26.2.16 Sat May 27 04:12:27 2000 --- libtool/configure.in Tue Apr 24 17:05:38 2001 *************** *** 1,16 **** ! dnl Process this file with autoconf to create configure. AC_INIT(ltmain.in) ! AM_INIT_AUTOMAKE(libtool, 1.3.5) # This is a sanity check so we can see which version is used in bug reports. # It is assumed that we only want to see the date extension for cvs libtool # versions (i.e. "odd" letters) and not actual alpha releases. case "$VERSION" in ! changequote(,) ! *[acegikmoqsuwy]) ! changequote([,]) TIMESTAMP=`${CONFIG_SHELL} ${srcdir}/mkstamp < ${srcdir}/ChangeLog` banner="Configuring $PACKAGE $VERSION$TIMESTAMP" dashes=`echo "$banner" | sed 's/./-/g'` --- 1,15 ---- ! ## Process this file with autoconf to create configure. AC_INIT(ltmain.in) ! AM_INIT_AUTOMAKE(libtool, 1.4) # This is a sanity check so we can see which version is used in bug reports. # It is assumed that we only want to see the date extension for cvs libtool # versions (i.e. "odd" letters) and not actual alpha releases. + TIMESTAMP= case "$VERSION" in ! [*[acegikmoqsuwy])] TIMESTAMP=`${CONFIG_SHELL} ${srcdir}/mkstamp < ${srcdir}/ChangeLog` banner="Configuring $PACKAGE $VERSION$TIMESTAMP" dashes=`echo "$banner" | sed 's/./-/g'` *************** *** 23,57 **** echo ;; esac pkgdatadir='${datadir}'"/${PACKAGE}" ! AC_SUBST(pkgdatadir) dnl automake does not need this, but libtoolize does aclocaldir='${datadir}/aclocal' AC_SUBST(aclocaldir) ! dnl Use the specified CC, RANLIB, and LD while running ltconfig. AC_PROG_CC - AC_PROG_RANLIB AM_PROG_LD AC_SUBST(LD) AM_PROG_NM AC_SUBST(NM) AC_PROG_LN_S ! dnl For the `lineno' script (which puts line numbers into `ltconfig'). ! AC_PROG_AWK ! dnl Check for dlopen support AC_LIBTOOL_DLOPEN ! AC_LIBTOOL_SETUP ! AC_SUBST(DLLTOOL) ! AC_SUBST(FILE) ! AC_SUBST(OBJDUMP) ! AC_SUBST(AS) - LIBTOOL_FLAGS="$libtool_flags" - AC_SUBST(LIBTOOL_FLAGS) - AC_ARG_ENABLE(ltdl-install, [ --disable-ltdl-install do not install libltdl]) if test x"${enable_ltdl_install+set}" != xset; then --- 22,49 ---- echo ;; esac + AC_SUBST(TIMESTAMP) pkgdatadir='${datadir}'"/${PACKAGE}" ! AC_SUBST(pkgdatadir) # automake does not need this, but libtoolize does aclocaldir='${datadir}/aclocal' AC_SUBST(aclocaldir) ! # Use the specified CC and LD AC_PROG_CC AM_PROG_LD AC_SUBST(LD) AM_PROG_NM AC_SUBST(NM) AC_PROG_LN_S ! # Declare win32 dll support ! AC_LIBTOOL_WIN32_DLL ! # Check for dlopen support AC_LIBTOOL_DLOPEN ! AC_PROG_LIBTOOL AC_ARG_ENABLE(ltdl-install, [ --disable-ltdl-install do not install libltdl]) if test x"${enable_ltdl_install+set}" != xset; then *************** *** 60,86 **** fi AC_CONFIG_SUBDIRS(libltdl) ! dnl all subdirectories that are configured on demand, but that must be ! dnl included in the distribution ! CONF_SUBDIRS="cdemo demo mdemo" AC_SUBST(CONF_SUBDIRS) ! ACINCLUDE_M4_LIST="${srcdir}/acinclude.m4 ${srcdir}/libltdl/acinclude.m4 " DIST_MAKEFILE_LIST= for dir in $CONF_SUBDIRS; do ! ACINCLUDE_M4_LIST="$ACINCLUDE_M4_LIST${srcdir}/$dir/acinclude.m4 " DIST_MAKEFILE_LIST="$DIST_MAKEFILE_LIST$dir/Makefile " done AC_SUBST(ACINCLUDE_M4_LIST) AC_SUBST(DIST_MAKEFILE_LIST) - AC_OUTPUT_COMMANDS([ - test -f ${saved_top_srcdir}/ltconfig || ${MAKE-make} ${saved_top_srcdir}/ltconfig - test -f ${saved_top_srcdir}/ltmain.sh || ${MAKE-make} ${saved_top_srcdir}/ltmain.sh - ], [saved_top_srcdir=${srcdir}]) AC_OUTPUT([Makefile doc/Makefile tests/Makefile]) - - # Local Variables: - # mode:shell-script - # sh-indentation:2 - # End: --- 52,69 ---- fi AC_CONFIG_SUBDIRS(libltdl) ! # all subdirectories that are configured on demand, but that must be ! # included in the distribution ! CONF_SUBDIRS="cdemo demo depdemo mdemo" AC_SUBST(CONF_SUBDIRS) ! ACINCLUDE_M4_LIST="${srcdir}/acinclude.m4" DIST_MAKEFILE_LIST= for dir in $CONF_SUBDIRS; do ! ACINCLUDE_M4_LIST="$ACINCLUDE_M4_LIST ${srcdir}/$dir/acinclude.m4" DIST_MAKEFILE_LIST="$DIST_MAKEFILE_LIST$dir/Makefile " done AC_SUBST(ACINCLUDE_M4_LIST) AC_SUBST(DIST_MAKEFILE_LIST) AC_OUTPUT([Makefile doc/Makefile tests/Makefile]) Index: libtool/libtool.m4 diff -c libtool/libtool.m4:1.35.2.22 libtool/libtool.m4:1.166 *** libtool/libtool.m4:1.35.2.22 Sun May 14 01:23:17 2000 --- libtool/libtool.m4 Tue Apr 24 16:40:42 2001 *************** *** 1,5 **** ! ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ! ## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc. ## Originally by Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify --- 1,6 ---- ! # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- ! ## Copyright 1996, 1997, 1998, 1999, 2000, 2001 ! ## Free Software Foundation, Inc. ## Originally by Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify *************** *** 21,154 **** ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. ! # serial 40 AC_PROG_LIBTOOL ! AC_DEFUN(AC_PROG_LIBTOOL, [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl ! # Save cache, so that ltconfig can load it ! AC_CACHE_SAVE ! # Actually configure libtool. ac_aux_dir is where install-sh is found. ! CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ ! LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ ! LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ ! DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ! ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ ! $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ ! || AC_MSG_ERROR([libtool configure failed]) ! # Reload cache, that may have been modified by ltconfig ! AC_CACHE_LOAD ! # This can be used to rebuild libtool when needed ! LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" ! # Always use our own libtool. ! LIBTOOL='$(SHELL) $(top_builddir)/libtool' ! AC_SUBST(LIBTOOL)dnl ! # Redirect the config.log output again, so that the ltconfig log is not ! # clobbered by the next message. ! exec 5>>./config.log ! ]) ! AC_DEFUN(AC_LIBTOOL_SETUP, ! [AC_PREREQ(2.13)dnl ! AC_REQUIRE([AC_ENABLE_SHARED])dnl ! AC_REQUIRE([AC_ENABLE_STATIC])dnl ! AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl ! AC_REQUIRE([AC_CANONICAL_HOST])dnl ! AC_REQUIRE([AC_CANONICAL_BUILD])dnl ! AC_REQUIRE([AC_PROG_RANLIB])dnl ! AC_REQUIRE([AC_PROG_CC])dnl ! AC_REQUIRE([AC_PROG_LD])dnl ! AC_REQUIRE([AC_PROG_NM])dnl ! AC_REQUIRE([AC_PROG_LN_S])dnl ! dnl ! case "$target" in ! NONE) lt_target="$host" ;; ! *) lt_target="$target" ;; ! esac ! # Check for any special flags to pass to ltconfig. ! libtool_flags="--cache-file=$cache_file" ! test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" ! test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" ! test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" ! test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" ! test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ! ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], ! [libtool_flags="$libtool_flags --enable-dlopen"]) ! ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ! [libtool_flags="$libtool_flags --enable-win32-dll"]) ! AC_ARG_ENABLE(libtool-lock, ! [ --disable-libtool-lock avoid locking (might break parallel builds)]) ! test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" ! test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" ! # Some flags need to be propagated to the compiler or linker for good ! # libtool support. ! case "$lt_target" 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. ! SAVE_CFLAGS="$CFLAGS" ! CFLAGS="$CFLAGS -belf" ! AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, ! [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) ! if test x"$lt_cv_cc_needs_belf" != x"yes"; then ! # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf ! CFLAGS="$SAVE_CFLAGS" ! fi ! ;; ! ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ! [*-*-cygwin* | *-*-mingw*) ! AC_CHECK_TOOL(DLLTOOL, dlltool, false) ! AC_CHECK_TOOL(AS, as, false) ! AC_CHECK_TOOL(OBJDUMP, objdump, false) ! ;; ! ]) ! esac ! ]) # AC_LIBTOOL_DLOPEN - enable checks for dlopen support ! AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's ! AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) # AC_ENABLE_SHARED - implement the --enable-shared flag # Usage: AC_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. ! AC_DEFUN(AC_ENABLE_SHARED, [dnl ! define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} ! case "$enableval" in yes) enable_shared=yes ;; no) enable_shared=no ;; *) --- 22,2838 ---- ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. ! # serial 46 AC_PROG_LIBTOOL ! AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl ! # This can be used to rebuild libtool when needed ! LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" ! ! # Always use our own libtool. ! LIBTOOL='$(SHELL) $(top_builddir)/libtool' ! AC_SUBST(LIBTOOL)dnl ! ! # Prevent multiple expansion ! define([AC_PROG_LIBTOOL], []) ! ]) ! ! AC_DEFUN([AC_LIBTOOL_SETUP], ! [AC_PREREQ(2.13)dnl ! AC_REQUIRE([AC_ENABLE_SHARED])dnl ! AC_REQUIRE([AC_ENABLE_STATIC])dnl ! AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl ! AC_REQUIRE([AC_CANONICAL_HOST])dnl ! AC_REQUIRE([AC_CANONICAL_BUILD])dnl ! AC_REQUIRE([AC_PROG_CC])dnl ! AC_REQUIRE([AC_PROG_LD])dnl ! AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl ! AC_REQUIRE([AC_PROG_NM])dnl ! AC_REQUIRE([AC_PROG_LN_S])dnl ! AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl ! AC_REQUIRE([AC_OBJEXT])dnl ! AC_REQUIRE([AC_EXEEXT])dnl ! dnl ! ! _LT_AC_PROG_ECHO_BACKSLASH ! # Only perform the check for file, if the check method requires it ! case $deplibs_check_method in ! file_magic*) ! if test "$file_magic_cmd" = '$MAGIC_CMD'; then ! AC_PATH_MAGIC ! fi ! ;; ! esac ! ! AC_CHECK_TOOL(RANLIB, ranlib, :) ! AC_CHECK_TOOL(STRIP, strip, :) ! ! ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) ! ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ! enable_win32_dll=yes, enable_win32_dll=no) ! ! AC_ARG_ENABLE(libtool-lock, ! [ --disable-libtool-lock avoid locking (might break parallel builds)]) ! test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes ! ! # 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.$ac_objext` 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. ! SAVE_CFLAGS="$CFLAGS" ! CFLAGS="$CFLAGS -belf" ! AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, ! [AC_LANG_SAVE ! AC_LANG_C ! AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) ! AC_LANG_RESTORE]) ! if test x"$lt_cv_cc_needs_belf" != x"yes"; then ! # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf ! CFLAGS="$SAVE_CFLAGS" ! fi ! ;; ! ! ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ! [*-*-cygwin* | *-*-mingw* | *-*-pw32*) ! AC_CHECK_TOOL(DLLTOOL, dlltool, false) ! AC_CHECK_TOOL(AS, as, false) ! AC_CHECK_TOOL(OBJDUMP, objdump, false) ! ! # recent cygwin and mingw systems supply a stub DllMain which the user ! # can override, but on older systems we have to supply one ! AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, ! [AC_TRY_LINK([], ! [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); ! DllMain (0, 0, 0);], ! [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) ! ! case $host/$CC in ! *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) ! # old mingw systems require "-dll" to link a DLL, while more recent ones ! # require "-mdll" ! SAVE_CFLAGS="$CFLAGS" ! CFLAGS="$CFLAGS -mdll" ! AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, ! [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) ! CFLAGS="$SAVE_CFLAGS" ;; ! *-*-cygwin* | *-*-pw32*) ! # cygwin systems need to pass --dll to the linker, and not link ! # crt.o which will require a WinMain@16 definition. ! lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; ! esac ! ;; ! ]) ! esac ! ! _LT_AC_LTCONFIG_HACK ! ! ]) ! ! # _LT_AC_CHECK_DLFCN ! # -------------------- ! AC_DEFUN(_LT_AC_CHECK_DLFCN, ! [AC_CHECK_HEADERS(dlfcn.h) ! ])# _LT_AC_CHECK_DLFCN ! ! # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE ! # --------------------------------- ! AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], ! [AC_REQUIRE([AC_CANONICAL_HOST]) ! AC_REQUIRE([AC_PROG_NM]) ! AC_REQUIRE([AC_OBJEXT]) ! # Check for command to grab the raw symbol name followed by C symbol from nm. ! AC_MSG_CHECKING([command to parse $NM output]) ! AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl ! ! # 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='[BCDEGRST]'] ! ! # 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 \2\3 \3' ! ! # Transform an extracted symbol line into a proper C declaration ! lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" ! ! # Define system-specific variables. ! case $host_os in ! aix*) ! [symcode='[BCDT]'] ! ;; ! cygwin* | mingw* | pw32*) ! [symcode='[ABCDGISTW]'] ! ;; ! hpux*) # Its linker distinguishes data from code symbols ! lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" ! ;; ! irix*) ! [symcode='[BCDEGRST]'] ! ;; ! solaris* | sysv5*) ! [symcode='[BDT]'] ! ;; ! sysv4) ! [symcode='[DFNSTU]'] ! ;; ! esac ! ! # Handle CRLF in mingw tool chain ! opt_cr= ! case $host_os in ! mingw*) ! opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ! ;; ! 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='[ABCDGISTW]'] ! fi ! ! # Try without a prefix undercore, then with it. ! for ac_symprfx in "" "_"; do ! ! # Write the raw and C identifiers. ! [lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"] ! ! # Check to see that the pipe works correctly. ! pipe_works=no ! rm -f conftest* ! cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then ! # Try sorting and uniquifying the output. ! if sort "$nlist" | uniq > "$nlist"T; then ! mv -f "$nlist"T "$nlist" ! else ! rm -f "$nlist"T ! fi ! ! # Make sure that we snagged all the symbols we need. ! if egrep ' nm_test_var$' "$nlist" >/dev/null; then ! if egrep ' nm_test_func$' "$nlist" >/dev/null; then ! cat < conftest.$ac_ext ! #ifdef __cplusplus ! extern "C" { ! #endif ! ! EOF ! # Now generate the symbol file. ! eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' ! ! cat <> conftest.$ac_ext ! #if defined (__STDC__) && __STDC__ ! # define lt_ptr_t void * ! #else ! # define lt_ptr_t char * ! # define const ! #endif ! ! /* The mapping between symbol names and symbols. */ ! const struct { ! const char *name; ! lt_ptr_t address; ! } ! [lt_preloaded_symbols[] =] ! { ! EOF ! sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext ! cat <<\EOF >> conftest.$ac_ext ! {0, (lt_ptr_t) 0} ! }; ! ! #ifdef __cplusplus ! } ! #endif ! EOF ! # Now try linking the two files. ! mv conftest.$ac_objext conftstm.$ac_objext ! save_LIBS="$LIBS" ! save_CFLAGS="$CFLAGS" ! LIBS="conftstm.$ac_objext" ! CFLAGS="$CFLAGS$no_builtin_flag" ! if AC_TRY_EVAL(ac_link) && test -s conftest; then ! pipe_works=yes ! fi ! LIBS="$save_LIBS" ! CFLAGS="$save_CFLAGS" ! else ! echo "cannot find nm_test_func in $nlist" >&AC_FD_CC ! fi ! else ! echo "cannot find nm_test_var in $nlist" >&AC_FD_CC ! fi ! else ! echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC ! fi ! else ! echo "$progname: failed program was:" >&AC_FD_CC ! cat conftest.$ac_ext >&5 ! fi ! rm -f conftest* conftst* ! ! # Do not use the global_symbol_pipe unless it works. ! if test "$pipe_works" = yes; then ! break ! else ! lt_cv_sys_global_symbol_pipe= ! fi ! done ! ]) ! global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" ! if test -z "$lt_cv_sys_global_symbol_pipe"; then ! global_symbol_to_cdecl= ! else ! global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" ! fi ! if test -z "$global_symbol_pipe$global_symbol_to_cdecl"; then ! AC_MSG_RESULT(failed) ! else ! AC_MSG_RESULT(ok) ! fi ! ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE ! ! # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR ! # --------------------------------- ! AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], ! [# Find the correct PATH separator. Usually this is `:', but ! # DJGPP uses `;' like DOS. ! if test "X${PATH_SEPARATOR+set}" != Xset; then ! UNAME=${UNAME-`uname 2>/dev/null`} ! case X$UNAME in ! *-DOS) lt_cv_sys_path_separator=';' ;; ! *) lt_cv_sys_path_separator=':' ;; ! esac ! fi ! ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR ! ! # _LT_AC_PROG_ECHO_BACKSLASH ! # -------------------------- ! # Add some code to the start of the generated configure script which ! # will find an echo command which doesn;t interpret backslashes. ! AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], ! [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], ! [AC_DIVERT_PUSH(NOTICE)]) ! _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR ! ! # Check that we are running under the correct shell. ! SHELL=${CONFIG_SHELL-/bin/sh} ! ! case X$ECHO in ! X*--fallback-echo) ! # Remove one level of quotation (which was required for Make). ! ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ! ;; ! esac ! ! echo=${ECHO-echo} ! if test "X[$]1" = X--no-reexec; then ! # Discard the --no-reexec flag, and continue. ! shift ! elif test "X[$]1" = X--fallback-echo; then ! # Avoid inline document here, it may be left over ! : ! elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then ! # Yippee, $echo works! ! : ! else ! # Restart under the correct shell. ! exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} ! fi ! ! if test "X[$]1" = X--fallback-echo; then ! # used as fallback echo ! shift ! cat </dev/null && ! echo_test_string="`eval $cmd`" && ! (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null ! then ! break ! fi ! done ! fi ! ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! : ! else ! # The Solaris, AIX, and Digital Unix default echo programs unquote ! # backslashes. This makes it impossible to quote backslashes using ! # echo "$something" | sed 's/\\/\\\\/g' ! # ! # So, first we look for a working echo in the user's PATH. ! ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" ! for dir in $PATH /usr/ucb; do ! if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && ! test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! echo="$dir/echo" ! break ! fi ! done ! IFS="$save_ifs" ! ! if test "X$echo" = Xecho; then ! # We didn't find a better echo, so look for alternatives. ! if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! # This shell has a builtin print -r that does the trick. ! echo='print -r' ! elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && ! test "X$CONFIG_SHELL" != X/bin/ksh; then ! # If we have ksh, try running configure again with it. ! ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} ! export ORIGINAL_CONFIG_SHELL ! CONFIG_SHELL=/bin/ksh ! export CONFIG_SHELL ! exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} ! else ! # Try using printf. ! echo='printf %s\n' ! if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ! echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! # Cool, printf works ! : ! elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && ! test "X$echo_testing_string" = 'X\t' && ! echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL ! export CONFIG_SHELL ! SHELL="$CONFIG_SHELL" ! export SHELL ! echo="$CONFIG_SHELL [$]0 --fallback-echo" ! elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && ! test "X$echo_testing_string" = 'X\t' && ! echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && ! test "X$echo_testing_string" = "X$echo_test_string"; then ! echo="$CONFIG_SHELL [$]0 --fallback-echo" ! else ! # maybe with a smaller string... ! prev=: ! ! for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do ! if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null ! then ! break ! fi ! prev="$cmd" ! done ! ! if test "$prev" != 'sed 50q "[$]0"'; then ! echo_test_string=`eval $prev` ! export echo_test_string ! exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} ! else ! # Oops. We lost completely, so just stick with echo. ! echo=echo ! fi ! fi ! fi ! fi ! fi ! fi ! ! # Copy echo and quote the copy suitably for passing to libtool from ! # the Makefile, instead of quoting the original, which is used later. ! ECHO=$echo ! if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ! ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" ! fi ! ! AC_SUBST(ECHO) ! AC_DIVERT_POP ! ])# _LT_AC_PROG_ECHO_BACKSLASH ! ! # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, ! # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) ! # ------------------------------------------------------------------ ! AC_DEFUN(_LT_AC_TRY_DLOPEN_SELF, ! [if test "$cross_compiling" = yes; then : ! [$4] ! else ! AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl ! lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 ! lt_status=$lt_dlunknown ! cat > conftest.$ac_ext < ! #endif ! ! #include ! ! #ifdef RTLD_GLOBAL ! # define LT_DLGLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LT_DLGLOBAL DL_GLOBAL ! # else ! # define LT_DLGLOBAL 0 ! # endif ! #endif ! ! /* We may have to define LT_DLLAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LT_DLLAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_DLLAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LT_DLLAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LT_DLLAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LT_DLLAZY_OR_NOW DL_NOW ! # else ! # define LT_DLLAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif ! #endif ! ! #ifdef __cplusplus ! extern "C" void exit (int); ! #endif ! ! void fnord() { int i=42;} ! int main () ! { ! void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ! int status = $lt_dlunknown; ! ! if (self) ! { ! if (dlsym (self,"fnord")) status = $lt_dlno_uscore; ! else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; ! /* dlclose (self); */ ! } ! ! exit (status); ! }] ! EOF ! if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then ! (./conftest; exit; ) 2>/dev/null ! lt_status=$? ! case x$lt_status in ! x$lt_dlno_uscore) $1 ;; ! x$lt_dlneed_uscore) $2 ;; ! x$lt_unknown|x*) $3 ;; ! esac ! else : ! # compilation failed ! $3 ! fi ! fi ! rm -fr conftest* ! ])# _LT_AC_TRY_DLOPEN_SELF ! ! # AC_LIBTOOL_DLOPEN_SELF ! # ------------------- ! AC_DEFUN(AC_LIBTOOL_DLOPEN_SELF, ! [if test "x$enable_dlopen" != xyes; then ! enable_dlopen=unknown ! enable_dlopen_self=unknown ! enable_dlopen_self_static=unknown ! else ! lt_cv_dlopen=no ! lt_cv_dlopen_libs= ! ! case $host_os in ! beos*) ! lt_cv_dlopen="load_add_on" ! lt_cv_dlopen_libs= ! lt_cv_dlopen_self=yes ! ;; ! ! cygwin* | mingw* | pw32*) ! lt_cv_dlopen="LoadLibrary" ! lt_cv_dlopen_libs= ! ;; ! ! *) ! AC_CHECK_LIB(dl, dlopen, [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], ! [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen", ! [AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load", ! [AC_CHECK_LIB(svld, dlopen, ! [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], ! [AC_CHECK_LIB(dld, shl_load, ! [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ! ]) ! ]) ! ]) ! ]) ! ;; ! esac ! ! if test "x$lt_cv_dlopen" != xno; then ! enable_dlopen=yes ! else ! enable_dlopen=no ! fi ! ! case $lt_cv_dlopen in ! dlopen) ! save_CPPFLAGS="$CPPFLAGS" ! AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl ! test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" ! ! save_LDFLAGS="$LDFLAGS" ! eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" ! ! save_LIBS="$LIBS" ! LIBS="$lt_cv_dlopen_libs $LIBS" ! ! AC_CACHE_CHECK([whether a program can dlopen itself], ! lt_cv_dlopen_self, [dnl ! _LT_AC_TRY_DLOPEN_SELF( ! lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, ! lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ! ]) ! ! if test "x$lt_cv_dlopen_self" = xyes; then ! LDFLAGS="$LDFLAGS $link_static_flag" ! AC_CACHE_CHECK([whether a statically linked program can dlopen itself], ! lt_cv_dlopen_self_static, [dnl ! _LT_AC_TRY_DLOPEN_SELF( ! lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, ! lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ! ]) ! fi ! ! CPPFLAGS="$save_CPPFLAGS" ! LDFLAGS="$save_LDFLAGS" ! LIBS="$save_LIBS" ! ;; ! esac ! ! case $lt_cv_dlopen_self in ! yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; ! *) enable_dlopen_self=unknown ;; ! esac ! ! case $lt_cv_dlopen_self_static in ! yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; ! *) enable_dlopen_self_static=unknown ;; ! esac ! fi ! ])# AC_LIBTOOL_DLOPEN_SELF ! ! AC_DEFUN([_LT_AC_LTCONFIG_HACK], ! [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl ! # 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'] ! ! # Sed substitution to delay expansion of an escaped shell variable in a ! # double_quote_subst'ed string. ! delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' ! ! # Constants: ! rm="rm -f" ! ! # Global variables: ! default_ofile=libtool ! can_build_shared=yes ! ! # All known linkers require a `.a' archive for static linking (except M$VC, ! # which needs '.lib'). ! libext=a ! ltmain="$ac_aux_dir/ltmain.sh" ! ofile="$default_ofile" ! with_gnu_ld="$lt_cv_prog_gnu_ld" ! need_locks="$enable_libtool_lock" ! ! old_CC="$CC" ! old_CFLAGS="$CFLAGS" ! ! # Set sane defaults for various variables ! test -z "$AR" && AR=ar ! test -z "$AR_FLAGS" && AR_FLAGS=cru ! test -z "$AS" && AS=as ! test -z "$CC" && CC=cc ! test -z "$DLLTOOL" && DLLTOOL=dlltool ! test -z "$LD" && LD=ld ! test -z "$LN_S" && LN_S="ln -s" ! test -z "$MAGIC_CMD" && MAGIC_CMD=file ! test -z "$NM" && NM=nm ! test -z "$OBJDUMP" && OBJDUMP=objdump ! test -z "$RANLIB" && RANLIB=: ! test -z "$STRIP" && STRIP=: ! test -z "$ac_objext" && ac_objext=o ! ! if test x"$host" != x"$build"; then ! ac_tool_prefix=${host_alias}- ! else ! ac_tool_prefix= ! 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 ! ! 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 "X${COLLECT_NAMES+set}" != Xset; then ! COLLECT_NAMES= ! export COLLECT_NAMES ! fi ! ;; ! esac ! ! # Determine commands to create old-style static archives. ! old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' ! old_postinstall_cmds='chmod 644 $oldlib' ! old_postuninstall_cmds= ! ! if test -n "$RANLIB"; then ! old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" ! old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ! fi ! ! # Allow CC to be a program name with arguments. ! set dummy $CC ! compiler="[$]2" ! ! ## FIXME: this should be a separate macro ! ## ! AC_MSG_CHECKING([for objdir]) ! 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 ! AC_MSG_RESULT($objdir) ! ## ! ## END FIXME ! ! ! ## FIXME: this should be a separate macro ! ## ! AC_ARG_WITH(pic, ! [ --with-pic try to use only PIC/non-PIC objects [default=use both]], ! pic_mode="$withval", pic_mode=default) ! test -z "$pic_mode" && pic_mode=default ! ! # We assume here that the value for lt_cv_prog_cc_pic will not be cached ! # in isolation, and that seeing it set (from the cache) indicates that ! # the associated values are set (in the cache) correctly too. ! AC_MSG_CHECKING([for $compiler option to produce PIC]) ! AC_CACHE_VAL(lt_cv_prog_cc_pic, ! [ lt_cv_prog_cc_pic= ! lt_cv_prog_cc_shlib= ! lt_cv_prog_cc_wl= ! lt_cv_prog_cc_static= ! lt_cv_prog_cc_no_builtin= ! lt_cv_prog_cc_can_build_shared=$can_build_shared ! ! if test "$GCC" = yes; then ! lt_cv_prog_cc_wl='-Wl,' ! lt_cv_prog_cc_static='-static' ! ! case $host_os in ! aix*) ! # Below there is a dirty hack to force normal static linking with -ldl ! # The problem is because libdl dynamically linked with both libc and ! # libC (AIX C++ library), which obviously doesn't included in libraries ! # list by gcc. This cause undefined symbols with -static flags. ! # This hack allows C programs to be linked with "-static -ldl", but ! # we not sure about C++ programs. ! lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" ! ;; ! 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'. ! lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ! ;; ! beos* | irix5* | irix6* | osf3* | osf4* | osf5*) ! # PIC is the default for these OSes. ! ;; ! darwin* | rhapsody*) ! # PIC is the default on this platform ! # Common symbols not allowed in MH_DYLIB files ! lt_cv_prog_cc_pic='-fno-common' ! ;; ! cygwin* | mingw* | pw32* | os2*) ! # This hack is so that the source file can tell whether it is being ! # built for inclusion in a dll (and should export symbols for example). ! lt_cv_prog_cc_pic='-DDLL_EXPORT' ! ;; ! sysv4*MP*) ! if test -d /usr/nec; then ! lt_cv_prog_cc_pic=-Kconform_pic ! fi ! ;; ! *) ! lt_cv_prog_cc_pic='-fPIC' ! ;; ! esac ! else ! # PORTME Check for PIC flags for the system compiler. ! case $host_os in ! aix3* | aix4* | aix5*) ! # All AIX code is PIC. ! if test "$host_cpu" = ia64; then ! # AIX 5 now supports IA64 processor ! lt_cv_prog_cc_static='-Bstatic' ! lt_cv_prog_cc_wl='-Wl,' ! else ! lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' ! fi ! ;; ! ! hpux9* | hpux10* | hpux11*) ! # Is there a better lt_cv_prog_cc_static that works with the bundled CC? ! lt_cv_prog_cc_wl='-Wl,' ! lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" ! lt_cv_prog_cc_pic='+Z' ! ;; ! ! irix5* | irix6*) ! lt_cv_prog_cc_wl='-Wl,' ! lt_cv_prog_cc_static='-non_shared' ! # PIC (with -KPIC) is the default. ! ;; ! ! cygwin* | mingw* | pw32* | os2*) ! # This hack is so that the source file can tell whether it is being ! # built for inclusion in a dll (and should export symbols for example). ! lt_cv_prog_cc_pic='-DDLL_EXPORT' ! ;; ! ! newsos6) ! lt_cv_prog_cc_pic='-KPIC' ! lt_cv_prog_cc_static='-Bstatic' ! ;; ! ! osf3* | osf4* | osf5*) ! # All OSF/1 code is PIC. ! lt_cv_prog_cc_wl='-Wl,' ! lt_cv_prog_cc_static='-non_shared' ! ;; ! ! sco3.2v5*) ! lt_cv_prog_cc_pic='-Kpic' ! lt_cv_prog_cc_static='-dn' ! lt_cv_prog_cc_shlib='-belf' ! ;; ! ! solaris*) ! lt_cv_prog_cc_pic='-KPIC' ! lt_cv_prog_cc_static='-Bstatic' ! lt_cv_prog_cc_wl='-Wl,' ! ;; ! ! sunos4*) ! lt_cv_prog_cc_pic='-PIC' ! lt_cv_prog_cc_static='-Bstatic' ! lt_cv_prog_cc_wl='-Qoption ld ' ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! lt_cv_prog_cc_pic='-KPIC' ! lt_cv_prog_cc_static='-Bstatic' ! if test "x$host_vendor" = xsni; then ! lt_cv_prog_cc_wl='-LD' ! else ! lt_cv_prog_cc_wl='-Wl,' ! fi ! ;; ! ! uts4*) ! lt_cv_prog_cc_pic='-pic' ! lt_cv_prog_cc_static='-Bstatic' ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec ;then ! lt_cv_prog_cc_pic='-Kconform_pic' ! lt_cv_prog_cc_static='-Bstatic' ! fi ! ;; ! ! *) ! lt_cv_prog_cc_can_build_shared=no ! ;; ! esac ! fi ! ]) ! if test -z "$lt_cv_prog_cc_pic"; then ! AC_MSG_RESULT([none]) ! else ! AC_MSG_RESULT([$lt_cv_prog_cc_pic]) ! ! # Check to make sure the pic_flag actually works. ! AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) ! AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl ! save_CFLAGS="$CFLAGS" ! CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" ! AC_TRY_COMPILE([], [], [dnl ! case $host_os in ! hpux9* | hpux10* | hpux11*) ! # On HP-UX, both CC and GCC only warn that PIC is supported... then ! # they create non-PIC objects. So, if there were any warnings, we ! # assume that PIC is not supported. ! if test -s conftest.err; then ! lt_cv_prog_cc_pic_works=no ! else ! lt_cv_prog_cc_pic_works=yes ! fi ! ;; ! *) ! lt_cv_prog_cc_pic_works=yes ! ;; ! esac ! ], [dnl ! lt_cv_prog_cc_pic_works=no ! ]) ! CFLAGS="$save_CFLAGS" ! ]) ! ! if test "X$lt_cv_prog_cc_pic_works" = Xno; then ! lt_cv_prog_cc_pic= ! lt_cv_prog_cc_can_build_shared=no ! else ! lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" ! fi ! ! AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) ! fi ! ## ! ## END FIXME ! ! # Check for any special shared library compilation flags. ! if test -n "$lt_cv_prog_cc_shlib"; then ! AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) ! if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]"] >/dev/null; then : ! else ! AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) ! lt_cv_prog_cc_can_build_shared=no ! fi ! fi ! ! ## FIXME: this should be a separate macro ! ## ! AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) ! AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl ! lt_cv_prog_cc_static_works=no ! save_LDFLAGS="$LDFLAGS" ! LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" ! AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) ! LDFLAGS="$save_LDFLAGS" ! ]) ! ! # Belt *and* braces to stop my trousers falling down: ! test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= ! AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) ! ! pic_flag="$lt_cv_prog_cc_pic" ! special_shlib_compile_flags="$lt_cv_prog_cc_shlib" ! wl="$lt_cv_prog_cc_wl" ! link_static_flag="$lt_cv_prog_cc_static" ! no_builtin_flag="$lt_cv_prog_cc_no_builtin" ! can_build_shared="$lt_cv_prog_cc_can_build_shared" ! ## ! ## END FIXME ! ! ! ## FIXME: this should be a separate macro ! ## ! # Check to see if options -o and -c are simultaneously supported by compiler ! AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) ! AC_CACHE_VAL([lt_cv_compiler_c_o], [ ! $rm -r conftest 2>/dev/null ! mkdir conftest ! cd conftest ! echo "int some_variable = 0;" > conftest.$ac_ext ! mkdir out ! # According to Tom Tromey, Ian Lance Taylor reported there are C compilers ! # that will create temporary files in the current directory regardless of ! # the output directory. Thus, making CWD read-only will cause this test ! # to fail, enabling locking or at least warning the user not to do parallel ! # builds. ! chmod -w . ! save_CFLAGS="$CFLAGS" ! CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" ! compiler_c_o=no ! if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test -s out/conftest.err; then ! lt_cv_compiler_c_o=no ! else ! lt_cv_compiler_c_o=yes ! fi ! else ! # Append any errors to the config.log. ! cat out/conftest.err 1>&AC_FD_CC ! lt_cv_compiler_c_o=no ! fi ! CFLAGS="$save_CFLAGS" ! chmod u+w . ! $rm conftest* out/* ! rmdir out ! cd .. ! rmdir conftest ! $rm -r conftest 2>/dev/null ! ]) ! compiler_c_o=$lt_cv_compiler_c_o ! AC_MSG_RESULT([$compiler_c_o]) ! ! if test x"$compiler_c_o" = x"yes"; then ! # Check to see if we can write to a .lo ! AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) ! AC_CACHE_VAL([lt_cv_compiler_o_lo], [ ! lt_cv_compiler_o_lo=no ! save_CFLAGS="$CFLAGS" ! CFLAGS="$CFLAGS -c -o conftest.lo" ! AC_TRY_COMPILE([], [int some_variable = 0;], [dnl ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test -s conftest.err; then ! lt_cv_compiler_o_lo=no ! else ! lt_cv_compiler_o_lo=yes ! fi ! ]) ! CFLAGS="$save_CFLAGS" ! ]) ! compiler_o_lo=$lt_cv_compiler_o_lo ! AC_MSG_RESULT([$compiler_c_lo]) ! else ! compiler_o_lo=no ! fi ! ## ! ## END FIXME ! ! ## FIXME: this should be a separate macro ! ## ! # Check to see if we can do hard links to lock some files if needed ! hard_links="nottested" ! if test "$compiler_c_o" = no && test "$need_locks" != no; then ! # do not overwrite the value of need_locks provided by the user ! AC_MSG_CHECKING([if we can lock with hard links]) ! hard_links=yes ! $rm conftest* ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! touch conftest.a ! ln conftest.a conftest.b 2>&5 || hard_links=no ! ln conftest.a conftest.b 2>/dev/null && hard_links=no ! AC_MSG_RESULT([$hard_links]) ! if test "$hard_links" = no; then ! AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) ! need_locks=warn ! fi ! else ! need_locks=no ! fi ! ## ! ## END FIXME ! ! ## FIXME: this should be a separate macro ! ## ! if test "$GCC" = yes; then ! # Check to see if options -fno-rtti -fno-exceptions are supported by compiler ! AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) ! echo "int some_variable = 0;" > conftest.$ac_ext ! save_CFLAGS="$CFLAGS" ! CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" ! compiler_rtti_exceptions=no ! AC_TRY_COMPILE([], [int some_variable = 0;], [dnl ! # The compiler can only warn and ignore the option if not recognized ! # So say no if there are warnings ! if test -s conftest.err; then ! compiler_rtti_exceptions=no ! else ! compiler_rtti_exceptions=yes ! fi ! ]) ! CFLAGS="$save_CFLAGS" ! AC_MSG_RESULT([$compiler_rtti_exceptions]) ! ! if test "$compiler_rtti_exceptions" = "yes"; then ! no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' ! else ! no_builtin_flag=' -fno-builtin' ! fi ! fi ! ## ! ## END FIXME ! ! ## FIXME: this should be a separate macro ! ## ! # See if the linker supports building shared libraries. ! AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) ! ! allow_undefined_flag= ! no_undefined_flag= ! need_lib_prefix=unknown ! need_version=unknown ! # when you set need_version to no, make sure it does not cause -set_version ! # flags to be left without arguments ! archive_cmds= ! archive_expsym_cmds= ! old_archive_from_new_cmds= ! old_archive_from_expsyms_cmds= ! export_dynamic_flag_spec= ! whole_archive_flag_spec= ! thread_safe_flag_spec= ! hardcode_into_libs=no ! hardcode_libdir_flag_spec= ! hardcode_libdir_separator= ! hardcode_direct=no ! hardcode_minus_L=no ! hardcode_shlibpath_var=unsupported ! runpath_var= ! link_all_deplibs=unknown ! always_export_symbols=no ! export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' ! # include_expsyms should be a list of space-separated symbols to be *always* ! # included in the symbol list ! include_expsyms= ! # exclude_expsyms can be an egrep regular expression of symbols to exclude ! # it will be wrapped by ` (' and `)$', so one must not match beginning or ! # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', ! # as well as any symbol that contains `d'. ! exclude_expsyms="_GLOBAL_OFFSET_TABLE_" ! # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out ! # platforms (ab)use it in PIC code, but their linkers get confused if ! # the symbol is explicitly referenced. Since portable code cannot ! # rely on this symbol name, it's probably fine to never include it in ! # preloaded symbol tables. ! extract_expsyms_cmds= ! ! case $host_os in ! cygwin* | mingw* | pw32* ) ! # FIXME: the MSVC++ port hasn't been tested in a loooong time ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! if test "$GCC" != yes; then ! with_gnu_ld=no ! fi ! ;; ! ! esac ! ! ld_shlibs=yes ! if test "$with_gnu_ld" = yes; then ! # If archive_cmds runs LD, not CC, wlarc should be empty ! wlarc='${wl}' ! ! # See if GNU ld supports shared libraries. ! case $host_os in ! aix3* | aix4* | aix5*) ! # On AIX, the GNU linker is very broken ! # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. ! ld_shlibs=no ! cat <&2 ! ! *** Warning: the GNU linker, at least up to release 2.9.1, is reported ! *** to be unable to reliably create shared libraries on AIX. ! *** Therefore, libtool is disabling shared libraries support. If you ! *** really care for shared libraries, you may want to modify your PATH ! *** so that a non-GNU linker is found, and then restart. ! ! EOF ! ;; ! ! amigaos*) ! archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_minus_L=yes ! ! # Samuel A. Falvo II reports ! # that the semantics of dynamic libraries on AmigaOS, at least up ! # to version 4, is to share data among multiple programs linked ! # with the same dynamic library. Since this doesn't match the ! # behavior of shared libraries on other platforms, we can use ! # them. ! ld_shlibs=no ! ;; ! ! beos*) ! if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then ! allow_undefined_flag=unsupported ! # Joseph Beckenbach says some releases of gcc ! # support --undefined. This deserves some investigation. FIXME ! archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! else ! ld_shlibs=no ! fi ! ;; ! ! cygwin* | mingw* | pw32*) ! # hardcode_libdir_flag_spec is actually meaningless, as there is ! # no search path for DLLs. ! hardcode_libdir_flag_spec='-L$libdir' ! allow_undefined_flag=unsupported ! always_export_symbols=yes ! ! extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ ! sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ ! test -f $output_objdir/impgen.exe || (cd $output_objdir && \ ! if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ ! else $CC -o impgen impgen.c ; fi)~ ! $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' ! ! old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' ! ! # cygwin and mingw dlls have different entry points and sets of symbols ! # to exclude. ! # FIXME: what about values for MSVC? ! dll_entry=__cygwin_dll_entry@12 ! dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ ! case $host_os in ! mingw*) ! # mingw values ! dll_entry=_DllMainCRTStartup@12 ! dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ ! ;; ! esac ! ! # mingw and cygwin differ, and it's simplest to just exclude the union ! # of the two symbol sets. ! dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 ! ! # recent cygwin and mingw systems supply a stub DllMain which the user ! # can override, but on older systems we have to supply one (in ltdll.c) ! if test "x$lt_cv_need_dllmain" = "xyes"; then ! ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " ! ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < [$]0 > $output_objdir/$soname-ltdll.c~ ! test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' ! else ! ltdll_obj= ! ltdll_cmds= ! fi ! ! # Extract the symbol export list from an `--export-all' def file, ! # then regenerate the def file from the symbol export list, so that ! # the compiled dll only exports the symbol export list. ! # Be careful not to strip the DATA tag left be newer dlltools. ! export_symbols_cmds="$ltdll_cmds"' ! $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ ! [sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols' ! ! # If the export-symbols file already is a .def file (1st line ! # is EXPORTS), use it as is. ! # If DATA tags from a recent dlltool are present, honour them! ! archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then ! cp $export_symbols $output_objdir/$soname-def; ! else ! echo EXPORTS > $output_objdir/$soname-def; ! _lt_hint=1; ! cat $export_symbols | while read symbol; do ! set dummy \$symbol; ! case \[$]# in ! 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; ! *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; ! esac; ! _lt_hint=`expr 1 + \$_lt_hint`; ! done; ! fi~ ! '"$ltdll_cmds"' ! $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ ! $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ ! $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ ! $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ ! $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' ! wlarc= ! else ! archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! fi ! ;; ! ! solaris* | sysv5*) ! if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ! ld_shlibs=no ! cat <&2 ! ! *** Warning: The releases 2.8.* of the GNU linker cannot reliably ! *** create shared libraries on Solaris systems. Therefore, libtool ! *** is disabling shared libraries support. We urge you to upgrade GNU ! *** binutils to release 2.9.1 or newer. Another option is to modify ! *** your PATH or compiler configuration so that the native linker is ! *** used, and then restart. ! ! EOF ! elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then ! archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! ld_shlibs=no ! fi ! ;; ! ! sunos4*) ! archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! wlarc= ! hardcode_direct=yes ! hardcode_shlibpath_var=no ! ;; ! ! *) ! if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then ! archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ! archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ! else ! ld_shlibs=no ! fi ! ;; ! esac ! ! if test "$ld_shlibs" = yes; then ! runpath_var=LD_RUN_PATH ! hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' ! export_dynamic_flag_spec='${wl}--export-dynamic' ! case $host_os in ! cygwin* | mingw* | pw32*) ! # dlltool doesn't understand --whole-archive et. al. ! whole_archive_flag_spec= ! ;; ! *) ! # ancient GNU ld didn't support --whole-archive et. al. ! if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then ! whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' ! else ! whole_archive_flag_spec= ! fi ! ;; ! esac ! fi ! else ! # PORTME fill in a description of your system's linker (not GNU ld) ! case $host_os in ! aix3*) ! allow_undefined_flag=unsupported ! always_export_symbols=yes ! archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' ! # Note: this linker hardcodes the directories in LIBPATH if there ! # are no directories specified by -L. ! hardcode_minus_L=yes ! if test "$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* | aix5*) ! # When large executables or shared objects are built, AIX ld can ! # have problems creating the table of contents. If linking a library ! # or program results in "error TOC overflow" add -mminimal-toc to ! # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not ! # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. ! ! archive_cmds='' ! hardcode_libdir_separator=':' ! if test "$GCC" = yes; then ! collect2name=`${CC} -print-prog-name=collect2` ! if test -f "$collect2name" && \ ! strings "$collect2name" | grep resolve_lib_name >/dev/null ! then ! # We have reworked collect2 ! hardcode_direct=yes ! else ! # We have old collect2 ! hardcode_direct=unsupported ! # It fails to find uninstalled libraries when the uninstalled ! # path is not listed in the libpath. Setting hardcode_minus_L ! # to unsupported forces relinking ! hardcode_minus_L=yes ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_libdir_separator= ! fi ! shared_flag='-shared' ! else ! if test "$host_cpu" = ia64; then ! shared_flag='-G' ! else ! shared_flag='${wl}-bM:SRE' ! fi ! hardcode_direct=yes ! fi ! ! if test "$host_cpu" = ia64; then ! # On IA64, the linker does run time linking by default, so we don't ! # have to do anything special. ! aix_use_runtimelinking=no ! exp_sym_flag='-Bexport' ! no_entry_flag="" ! else ! # Test if we are trying to use run time linking, or normal AIX style linking. ! # If -brtl is somewhere in LDFLAGS, we need to do run time linking. ! aix_use_runtimelinking=no ! for ld_flag in $LDFLAGS; do ! if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then ! aix_use_runtimelinking=yes ! break ! fi ! done ! exp_sym_flag='-bexport' ! no_entry_flag='-bnoentry' ! fi ! # It seems that -bexpall can do strange things, so it is better to ! # generate a list of symbols to export. ! always_export_symbols=yes ! if test "$aix_use_runtimelinking" = yes; then ! hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' ! allow_undefined_flag=' -Wl,-G' ! archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" ! else ! if test "$host_cpu" = ia64; then ! hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' ! allow_undefined_flag="-znodefs" ! archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" ! else ! hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' ! # Warning - without using the other run time loading flags, -berok will ! # link without error, but may produce a broken library. ! allow_undefined_flag='${wl}-berok" ! # This is a bit strange, but is similar to how AIX traditionally builds ! # it's shared libraries. ! archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' ! fi ! fi ! ;; ! ! amigaos*) ! archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_minus_L=yes ! # see comment about different semantics on the GNU ld section ! ld_shlibs=no ! ;; ! ! cygwin* | mingw* | pw32*) ! # When not using gcc, we currently assume that we are using ! # Microsoft Visual C++. ! # hardcode_libdir_flag_spec is actually meaningless, as there is ! # no search path for DLLs. ! hardcode_libdir_flag_spec=' ' ! allow_undefined_flag=unsupported ! # Tell ltmain to make .lib files, not .a files. ! libext=lib ! # FIXME: Setting linknames here is a bad hack. ! archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' ! # The linker will automatically build a .lib file if we build a DLL. ! old_archive_from_new_cmds='true' ! # FIXME: Should let the user specify the lib program. ! old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' ! fix_srcfile_path='`cygpath -w "$srcfile"`' ! ;; ! ! darwin* | rhapsody*) ! allow_undefined_flag='-undefined suppress' ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. ! archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)' ! # We need to add '_' to the symbols in $export_symbols first ! #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' ! hardcode_direct=yes ! hardcode_shlibpath_var=no ! whole_archive_flag_spec='-all_load $convenience' ! ;; ! ! freebsd1*) ! ld_shlibs=no ! ;; ! ! # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor ! # support. Future versions do this automatically, but an explicit c++rt0.o ! # does not break anything, and helps significantly (at the cost of a little ! # extra space). ! freebsd2.2*) ! archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' ! hardcode_libdir_flag_spec='-R$libdir' ! hardcode_direct=yes ! hardcode_shlibpath_var=no ! ;; ! ! # Unfortunately, older versions of FreeBSD 2 do not have this feature. ! freebsd2*) ! archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=yes ! hardcode_minus_L=yes ! hardcode_shlibpath_var=no ! ;; ! ! # FreeBSD 3 and greater uses gcc -shared to do shared libraries. ! freebsd*) ! archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ! hardcode_libdir_flag_spec='-R$libdir' ! hardcode_direct=yes ! hardcode_shlibpath_var=no ! ;; ! ! hpux9* | hpux10* | hpux11*) ! case $host_os in ! hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; ! *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; ! esac ! hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ! hardcode_libdir_separator=: ! hardcode_direct=yes ! hardcode_minus_L=yes # Not in the search PATH, but as the default ! # location of the library. ! export_dynamic_flag_spec='${wl}-E' ! ;; ! ! irix5* | irix6*) ! if test "$GCC" = yes; then ! archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! else ! archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! fi ! hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ! hardcode_libdir_separator=: ! link_all_deplibs=yes ! ;; ! ! netbsd*) ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out ! else ! archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF ! fi ! hardcode_libdir_flag_spec='-R$libdir' ! hardcode_direct=yes ! hardcode_shlibpath_var=no ! ;; ! ! newsos6) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' ! hardcode_direct=yes ! hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ! hardcode_libdir_separator=: ! hardcode_shlibpath_var=no ! ;; ! ! openbsd*) ! archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ! 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" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' ! old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ! ;; ! ! osf3*) ! if test "$GCC" = yes; then ! allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' ! archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! else ! allow_undefined_flag=' -expect_unresolved \*' ! archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! fi ! hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ! hardcode_libdir_separator=: ! ;; ! ! osf4* | osf5*) # as osf3* with the addition of -msym flag ! if test "$GCC" = yes; then ! allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' ! archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ! hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ! else ! allow_undefined_flag=' -expect_unresolved \*' ! archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ! archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ ! $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' ! ! #Both c and cxx compiler support -rpath directly ! hardcode_libdir_flag_spec='-rpath $libdir' ! fi ! hardcode_libdir_separator=: ! ;; ! ! sco3.2v5*) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_shlibpath_var=no ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! ;; ! ! solaris*) ! no_undefined_flag=' -z defs' ! # $CC -shared without GNU ld will not create a library from C++ ! # object files and a static libstdc++, better avoid it by now ! archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ! archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' ! hardcode_libdir_flag_spec='-R$libdir' ! hardcode_shlibpath_var=no ! case $host_os in ! [solaris2.[0-5] | solaris2.[0-5].*]) ;; ! *) # Supported since Solaris 2.6 (maybe 2.5.1?) ! whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; ! esac ! link_all_deplibs=yes ! ;; ! ! sunos4*) ! if test "x$host_vendor" = xsequent; then ! # Use $CC to link under sequent, because it throws in some extra .o ! # files that make .init and .fini sections work. ! archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' ! else ! archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' ! fi ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_direct=yes ! hardcode_minus_L=yes ! hardcode_shlibpath_var=no ! ;; ! ! sysv4) ! if test "x$host_vendor" = xsno; then ! archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts' ! hardcode_direct=yes # is this really true??? ! else ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=no #Motorola manual says yes, but my tests say they lie ! fi ! runpath_var='LD_RUN_PATH' ! hardcode_shlibpath_var=no ! ;; ! ! sysv4.3*) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_shlibpath_var=no ! export_dynamic_flag_spec='-Bexport' ! ;; ! ! sysv5*) ! no_undefined_flag=' -z text' ! # $CC -shared without GNU ld will not create a library from C++ ! # object files and a static libstdc++, better avoid it by now ! archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ! archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ! $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' ! hardcode_libdir_flag_spec= ! hardcode_shlibpath_var=no ! runpath_var='LD_RUN_PATH' ! ;; ! ! uts4*) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_shlibpath_var=no ! ;; ! ! dgux*) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_libdir_flag_spec='-L$libdir' ! hardcode_shlibpath_var=no ! ;; ! ! sysv4*MP*) ! if test -d /usr/nec; then ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_shlibpath_var=no ! runpath_var=LD_RUN_PATH ! hardcode_runpath_var=yes ! ld_shlibs=yes ! fi ! ;; ! ! sysv4.2uw2*) ! archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=yes ! hardcode_minus_L=no ! hardcode_shlibpath_var=no ! hardcode_runpath_var=yes ! runpath_var=LD_RUN_PATH ! ;; ! ! sysv5uw7* | unixware7*) ! no_undefined_flag='${wl}-z ${wl}text' ! if test "$GCC" = yes; then ! archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! else ! archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ! fi ! runpath_var='LD_RUN_PATH' ! hardcode_shlibpath_var=no ! ;; ! ! *) ! ld_shlibs=no ! ;; ! esac ! fi ! AC_MSG_RESULT([$ld_shlibs]) ! test "$ld_shlibs" = no && can_build_shared=no ! ## ! ## END FIXME ! ! ## FIXME: this should be a separate macro ! ## ! # Check hardcoding attributes. ! AC_MSG_CHECKING([how to hardcode library paths into programs]) ! 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 && ! # If the only mechanism to avoid hardcoding is shlibpath_var, we ! # have to relink, otherwise we might link with an installed library ! # when we should be linking with a yet-to-be-installed one ! ## test "$hardcode_shlibpath_var" != no && ! test "$hardcode_minus_L" != no; then ! # Linking always hardcodes the temporary library directory. ! hardcode_action=relink ! else ! # We can link without hardcoding, and we can hardcode nonexisting dirs. ! hardcode_action=immediate ! fi ! else ! # We cannot hardcode anything, or else we can only hardcode existing ! # directories. ! hardcode_action=unsupported ! fi ! AC_MSG_RESULT([$hardcode_action]) ! ## ! ## END FIXME ! ! ## FIXME: this should be a separate macro ! ## ! striplib= ! old_striplib= ! AC_MSG_CHECKING([whether stripping libraries is possible]) ! if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then ! test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" ! test -z "$striplib" && striplib="$STRIP --strip-unneeded" ! AC_MSG_RESULT([yes]) ! else ! AC_MSG_RESULT([no]) ! fi ! ## ! ## END FIXME ! ! reload_cmds='$LD$reload_flag -o $output$reload_objs' ! test -z "$deplibs_check_method" && deplibs_check_method=unknown ! ! ## FIXME: this should be a separate macro ! ## ! # PORTME Fill in your ld.so characteristics ! AC_MSG_CHECKING([dynamic linker characteristics]) ! library_names_spec= ! libname_spec='lib$name' ! soname_spec= ! postinstall_cmds= ! postuninstall_cmds= ! finish_cmds= ! finish_eval= ! shlibpath_var= ! shlibpath_overrides_runpath=unknown ! version_type=none ! dynamic_linker="$host_os ld.so" ! sys_lib_dlsearch_path_spec="/lib /usr/lib" ! sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" ! ! case $host_os in ! aix3*) ! version_type=linux ! library_names_spec='${libname}${release}.so$versuffix $libname.a' ! shlibpath_var=LIBPATH ! ! # AIX has no versioning support, so we append a major version to the name. ! soname_spec='${libname}${release}.so$major' ! ;; ! ! aix4* | aix5*) ! version_type=linux ! if test "$host_cpu" = ia64; then ! # AIX 5 supports IA64 ! library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' ! shlibpath_var=LD_LIBRARY_PATH ! else ! # With GCC up to 2.95.x, collect2 would create an import file ! # for dependence libraries. The import file would start with ! # the line `#! .'. This would cause the generated library to ! # depend on `.', always an invalid library. This was fixed in ! # development snapshots of GCC prior to 3.0. ! case $host_os in ! [ aix4 | aix4.[01] | aix4.[01].*)] ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; ! esac ! # AIX (on Power*) has no versioning support, so currently we can not hardcode correct ! # soname into executable. Probably we can add versioning support to ! # collect2, so additional links can be useful in future. ! if test "$aix_use_runtimelinking" = yes; then ! # If using run time linking (on AIX 4.2 or later) use lib.so instead of ! # lib.a to let people know that these are not typical AIX shared libraries. ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! else ! # We preserve .a as extension for shared libraries through AIX4.2 ! # and later when we are not doing run time linking. ! library_names_spec='${libname}${release}.a $libname.a' ! soname_spec='${libname}${release}.so$major' ! fi ! shlibpath_var=LIBPATH ! deplibs_check_method=pass_all ! fi ! ;; ! ! amigaos*) ! library_names_spec='$libname.ixlibrary $libname.a' ! # Create ${libname}_ixlibrary.a entries in /sys/libs. ! finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | [$Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\'']`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ! ;; ! ! beos*) ! library_names_spec='${libname}.so' ! dynamic_linker="$host_os ld.so" ! shlibpath_var=LIBRARY_PATH ! ;; ! ! bsdi4*) ! version_type=linux ! need_version=no ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" ! sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" ! export_dynamic_flag_spec=-rdynamic ! # the default ld.so.conf also contains /usr/contrib/lib and ! # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow ! # libtool to hard-code these into programs ! ;; ! ! cygwin* | mingw* | pw32*) ! version_type=windows ! need_version=no ! need_lib_prefix=no ! case $GCC,$host_os in ! yes,cygwin*) ! library_names_spec='$libname.dll.a' ! soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll' ! postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ ! dldir=$destdir/`dirname \$dlpath`~ ! test -d \$dldir || mkdir -p \$dldir~ ! $install_prog .libs/$dlname \$dldir/$dlname' ! postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ ! dlpath=$dir/\$dldll~ ! $rm \$dlpath' ! ;; ! yes,mingw*) ! library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` ! ;; ! yes,pw32*) ! library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' ! ;; ! *) ! library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll $libname.lib' ! ;; ! esac ! dynamic_linker='Win32 ld.exe' ! # FIXME: first we should search . and the directory the executable is in ! shlibpath_var=PATH ! ;; ! ! darwin* | rhapsody*) ! dynamic_linker="$host_os dyld" ! version_type=darwin ! need_lib_prefix=no ! need_version=no ! # FIXME: Relying on posixy $() will cause problems for ! # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. ! library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' ! soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' ! shlibpath_overrides_runpath=yes ! shlibpath_var=DYLD_LIBRARY_PATH ! ;; ! ! freebsd1*) ! dynamic_linker=no ! ;; ! ! freebsd*) ! objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` ! version_type=freebsd-$objformat ! case $version_type in ! freebsd-elf*) ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' ! need_version=no ! need_lib_prefix=no ! ;; ! freebsd-*) ! library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' ! need_version=yes ! ;; ! esac ! shlibpath_var=LD_LIBRARY_PATH ! case $host_os in ! freebsd2*) ! shlibpath_overrides_runpath=yes ! ;; ! *) ! shlibpath_overrides_runpath=no ! hardcode_into_libs=yes ! ;; ! esac ! ;; ! ! gnu*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' ! soname_spec='${libname}${release}.so$major' ! shlibpath_var=LD_LIBRARY_PATH ! hardcode_into_libs=yes ! ;; ! ! hpux9* | hpux10* | hpux11*) ! # Give a soname corresponding to the major version so that dld.sl refuses to ! # link against other versions. ! dynamic_linker="$host_os dld.sl" ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! shlibpath_var=SHLIB_PATH ! shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH ! library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' ! soname_spec='${libname}${release}.sl$major' ! # HP-UX runs *really* slowly unless shared libraries are mode 555. ! postinstall_cmds='chmod 555 $lib' ! ;; ! ! irix5* | irix6*) ! version_type=irix ! need_lib_prefix=no ! need_version=no ! soname_spec='${libname}${release}.so$major' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' ! case $host_os in ! irix5*) ! libsuff= shlibsuff= ! ;; ! *) ! case $LD in # libtool.m4 will add one of these switches to LD ! *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; ! *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; ! *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; ! *) libsuff= shlibsuff= libmagic=never-match;; ! esac ! ;; ! esac ! shlibpath_var=LD_LIBRARY${shlibsuff}_PATH ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ! sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ! ;; ! ! # No shared lib support for Linux oldld, aout, or coff. ! linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) ! dynamic_linker=no ! ;; ! ! # This must be Linux ELF. ! linux-gnu*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=no ! # This implies no fast_install, which is unacceptable. ! # Some rework will be needed to allow for fast_install ! # before this can be enabled. ! hardcode_into_libs=yes ! ! # We used to test for /lib/ld.so.1 and disable shared libraries on ! # powerpc, because MkLinux only supported shared libraries with the ! # GNU dynamic linker. Since this was broken with cross compilers, ! # most powerpc-linux boxes support dynamic linking these days and ! # people can always --disable-shared, the test was removed, and we ! # assume the GNU/Linux dynamic linker is in use. ! dynamic_linker='GNU/Linux ld.so' ! ;; ! ! netbsd*) ! version_type=sunos ! need_lib_prefix=no ! need_version=no ! if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then ! library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! dynamic_linker='NetBSD (a.out) ld.so' ! else ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' ! soname_spec='${libname}${release}.so$major' ! dynamic_linker='NetBSD ld.elf_so' ! fi ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! ;; ! ! newsos6) ! version_type=linux ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! ;; ! ! openbsd*) ! version_type=sunos ! if test "$with_gnu_ld" = yes; then ! need_lib_prefix=no ! need_version=no ! fi ! library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' ! finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! os2*) ! libname_spec='$name' ! need_lib_prefix=no ! library_names_spec='$libname.dll $libname.a' ! dynamic_linker='OS/2 ld.exe' ! shlibpath_var=LIBPATH ! ;; ! ! osf3* | osf4* | osf5*) ! version_type=osf ! need_version=no ! soname_spec='${libname}${release}.so' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' ! shlibpath_var=LD_LIBRARY_PATH ! sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" ! sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ! ;; ! ! sco3.2v5*) ! version_type=osf ! soname_spec='${libname}${release}.so$major' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! solaris*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! hardcode_into_libs=yes ! # ldd complains unless libraries are executable ! postinstall_cmds='chmod +x $lib' ! ;; ! ! sunos4*) ! version_type=sunos ! library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' ! finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' ! shlibpath_var=LD_LIBRARY_PATH ! shlibpath_overrides_runpath=yes ! if test "$with_gnu_ld" = yes; then ! need_lib_prefix=no ! fi ! need_version=yes ! ;; ! ! sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ! version_type=linux ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' ! shlibpath_var=LD_LIBRARY_PATH ! case $host_vendor in ! sni) ! shlibpath_overrides_runpath=no ! ;; ! motorola) ! need_lib_prefix=no ! need_version=no ! shlibpath_overrides_runpath=no ! sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ! ;; ! esac ! ;; ! ! uts4*) ! version_type=linux ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! ! dgux*) ! version_type=linux ! need_lib_prefix=no ! need_version=no ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ! soname_spec='${libname}${release}.so$major' ! shlibpath_var=LD_LIBRARY_PATH ! ;; ! sysv4*MP*) ! if test -d /usr/nec ;then ! version_type=linux ! library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' ! soname_spec='$libname.so.$major' ! shlibpath_var=LD_LIBRARY_PATH ! fi ! ;; ! *) ! dynamic_linker=no ! ;; ! esac ! AC_MSG_RESULT([$dynamic_linker]) ! test "$dynamic_linker" = no && can_build_shared=no ! ## ! ## END FIXME ! ## FIXME: this should be a separate macro ! ## ! # Report the final consequences. ! AC_MSG_CHECKING([if libtool supports shared libraries]) ! AC_MSG_RESULT([$can_build_shared]) ! ## ! ## END FIXME ! if test "$hardcode_action" = relink; then ! # Fast installation is not supported ! enable_fast_install=no ! elif test "$shlibpath_overrides_runpath" = yes || ! test "$enable_shared" = no; then ! # Fast installation is not necessary ! enable_fast_install=needless ! fi ! variables_saved_for_relink="PATH $shlibpath_var $runpath_var" ! if test "$GCC" = yes; then ! variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" ! fi ! AC_LIBTOOL_DLOPEN_SELF ! ## FIXME: this should be a separate macro ! ## ! if test "$enable_shared" = yes && test "$GCC" = yes; then ! case $archive_cmds in ! *'~'*) ! # FIXME: we may have to deal with multi-command sequences. ! ;; ! '$CC '*) ! # Test whether the compiler implicitly links with -lc since on some ! # systems, -lgcc has to come before -lc. If gcc already passes -lc ! # to ld, don't add -lc before -lgcc. ! AC_MSG_CHECKING([whether -lc should be explicitly linked in]) ! AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], ! [$rm conftest* ! echo 'static int dummy;' > conftest.$ac_ext ! ! if AC_TRY_EVAL(ac_compile); then ! soname=conftest ! lib=conftest ! libobjs=conftest.$ac_objext ! deplibs= ! wl=$lt_cv_prog_cc_wl ! compiler_flags=-v ! linker_flags=-v ! verstring= ! output_objdir=. ! libname=conftest ! save_allow_undefined_flag=$allow_undefined_flag ! allow_undefined_flag= ! if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) ! then ! lt_cv_archive_cmds_need_lc=no ! else ! lt_cv_archive_cmds_need_lc=yes ! fi ! allow_undefined_flag=$save_allow_undefined_flag ! else ! cat conftest.err 1>&5 ! fi]) ! AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) ! ;; ! esac ! fi ! need_lc=${lt_cv_archive_cmds_need_lc-yes} ! ## ! ## END FIXME ! ## FIXME: this should be a separate macro ! ## ! # The second clause should only fire when bootstrapping the ! # libtool distribution, otherwise you forgot to ship ltmain.sh ! # with your package, and you will get complaints that there are ! # no rules to generate ltmain.sh. ! if test -f "$ltmain"; then ! : ! else ! # If there is no Makefile yet, we rely on a make rule to execute ! # `config.status --recheck' to rerun these tests and create the ! # libtool script then. ! test -f Makefile && make "$ltmain" ! fi ! if test -f "$ltmain"; then ! trap "$rm \"${ofile}T\"; exit 1" 1 2 15 ! $rm -f "${ofile}T" ! ! echo creating $ofile ! ! # Now quote all the things that may contain metacharacters while being ! # careful not to overquote the AC_SUBSTed values. We take copies of the ! # variables and quote the copies for generation of the libtool script. ! for var in echo old_CC old_CFLAGS \ ! AR AR_FLAGS CC LD LN_S NM SHELL \ ! reload_flag reload_cmds wl \ ! pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ ! thread_safe_flag_spec whole_archive_flag_spec libname_spec \ ! library_names_spec soname_spec \ ! RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ ! old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ ! postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ ! old_striplib striplib file_magic_cmd export_symbols_cmds \ ! deplibs_check_method allow_undefined_flag no_undefined_flag \ ! finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ ! hardcode_libdir_flag_spec hardcode_libdir_separator \ ! sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ ! compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do ! ! case $var in ! reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ ! old_postinstall_cmds | old_postuninstall_cmds | \ ! export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ ! extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ ! postinstall_cmds | postuninstall_cmds | \ ! finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) ! # Double-quote double-evaled strings. ! eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; ! *) ! eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac ! done ! cat <<__EOF__ > "${ofile}T" ! #! $SHELL ! # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. ! # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) ! # NOTE: Changes made to this file will be lost: look at ltmain.sh. ! # ! # Copyright (C) 1996-2000 Free Software Foundation, Inc. ! # Originally by Gordon Matzigkeit , 1996 ! # ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # 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. ! ! # 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 "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi ! ! # ### BEGIN LIBTOOL CONFIG ! ! # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: ! ! # Shell to use when invoking shell scripts. ! SHELL=$lt_SHELL ! ! # Whether or not to build shared libraries. ! build_libtool_libs=$enable_shared ! ! # Whether or not to add -lc for building shared libraries. ! build_libtool_need_lc=$need_lc ! ! # Whether or not to build static libraries. ! build_old_libs=$enable_static ! ! # Whether or not to optimize for fast installation. ! fast_install=$enable_fast_install ! ! # The host system. ! host_alias=$host_alias ! host=$host ! ! # An echo program that does not interpret backslashes. ! echo=$lt_echo ! ! # The archiver. ! AR=$lt_AR ! AR_FLAGS=$lt_AR_FLAGS ! ! # The default C compiler. ! CC=$lt_CC ! ! # Is the compiler the GNU C compiler? ! with_gcc=$GCC ! ! # The linker used to build libraries. ! LD=$lt_LD ! ! # Whether we need hard or soft links. ! LN_S=$lt_LN_S ! ! # A BSD-compatible nm program. ! NM=$lt_NM ! ! # A symbol stripping program ! STRIP=$STRIP ! ! # Used to examine libraries when file_magic_cmd begins "file" ! MAGIC_CMD=$MAGIC_CMD ! ! # Used on cygwin: DLL creation program. ! DLLTOOL="$DLLTOOL" ! ! # Used on cygwin: object dumper. ! OBJDUMP="$OBJDUMP" ! ! # Used on cygwin: assembler. ! AS="$AS" ! ! # The name of the directory that contains temporary libtool files. ! objdir=$objdir ! ! # How to create reloadable object files. ! reload_flag=$lt_reload_flag ! reload_cmds=$lt_reload_cmds ! ! # How to pass a linker flag through the compiler. ! wl=$lt_wl ! ! # Object file suffix (normally "o"). ! objext="$ac_objext" ! ! # Old archive suffix (normally "a"). ! libext="$libext" ! ! # Executable file suffix (normally ""). ! exeext="$exeext" ! ! # Additional compiler flags for building library objects. ! pic_flag=$lt_pic_flag ! pic_mode=$pic_mode ! ! # Does compiler simultaneously support -c and -o options? ! compiler_c_o=$lt_compiler_c_o ! ! # Can we write directly to a .lo ? ! compiler_o_lo=$lt_compiler_o_lo ! ! # Must we lock files when doing compilation ? ! need_locks=$lt_need_locks ! ! # Do we need the lib prefix for modules? ! need_lib_prefix=$need_lib_prefix ! ! # Do we need a version for libraries? ! need_version=$need_version ! ! # Whether dlopen is supported. ! dlopen_support=$enable_dlopen ! ! # Whether dlopen of programs is supported. ! dlopen_self=$enable_dlopen_self ! ! # Whether dlopen of statically linked programs is supported. ! dlopen_self_static=$enable_dlopen_self_static ! ! # Compiler flag to prevent dynamic linking. ! link_static_flag=$lt_link_static_flag ! ! # Compiler flag to turn off builtin functions. ! no_builtin_flag=$lt_no_builtin_flag ! ! # Compiler flag to allow reflexive dlopens. ! export_dynamic_flag_spec=$lt_export_dynamic_flag_spec ! ! # Compiler flag to generate shared objects directly from archives. ! whole_archive_flag_spec=$lt_whole_archive_flag_spec ! ! # Compiler flag to generate thread-safe objects. ! thread_safe_flag_spec=$lt_thread_safe_flag_spec ! ! # Library versioning type. ! version_type=$version_type ! ! # Format of library name prefix. ! libname_spec=$lt_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=$lt_library_names_spec ! ! # The coded name of the library, if different from the real name. ! soname_spec=$lt_soname_spec ! ! # Commands used to build and install an old-style archive. ! RANLIB=$lt_RANLIB ! old_archive_cmds=$lt_old_archive_cmds ! old_postinstall_cmds=$lt_old_postinstall_cmds ! old_postuninstall_cmds=$lt_old_postuninstall_cmds ! ! # Create an old-style archive from a shared archive. ! old_archive_from_new_cmds=$lt_old_archive_from_new_cmds ! ! # Create a temporary old-style archive to link instead of a shared archive. ! old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds ! ! # Commands used to build and install a shared archive. ! archive_cmds=$lt_archive_cmds ! archive_expsym_cmds=$lt_archive_expsym_cmds ! postinstall_cmds=$lt_postinstall_cmds ! postuninstall_cmds=$lt_postuninstall_cmds + # Commands to strip libraries. + old_striplib=$lt_old_striplib + striplib=$lt_striplib + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + + # Command to use when deplibs_check_method == file_magic. + file_magic_cmd=$lt_file_magic_cmd + + # Flag that allows shared libraries with undefined symbols to be built. + allow_undefined_flag=$lt_allow_undefined_flag + + # Flag that forces no undefined symbols. + no_undefined_flag=$lt_no_undefined_flag + + # Commands used to finish a libtool library installation in a directory. + finish_cmds=$lt_finish_cmds + + # Same as above, but a single script fragment to be evaled but not shown. + finish_eval=$lt_finish_eval + + # Take the output of nm and produce a listing of raw symbols and C names. + global_symbol_pipe=$lt_global_symbol_pipe + + # Transform the output of nm in a proper C declaration + global_symbol_to_cdecl=$lt_global_symbol_to_cdecl + + # This is the shared library runtime path variable. + runpath_var=$runpath_var + + # This is the shared library path variable. + shlibpath_var=$shlibpath_var + + # Is shlibpath searched before the hard-coded library search path? + shlibpath_overrides_runpath=$shlibpath_overrides_runpath + + # How to hardcode a shared library path into an executable. + hardcode_action=$hardcode_action + + # Whether we should hardcode library paths into libraries. + hardcode_into_libs=$hardcode_into_libs + + # Flag to hardcode \$libdir into a binary during linking. + # This must work even if \$libdir does not exist. + hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + + # Whether we need a single -rpath flag with a separated argument. + hardcode_libdir_separator=$lt_hardcode_libdir_separator + + # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the + # resulting binary. + hardcode_direct=$hardcode_direct + + # Set to yes if using the -LDIR flag during linking hardcodes DIR into the + # 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 + + # Variables whose values should be saved in libtool wrapper scripts and + # restored at relink time. + variables_saved_for_relink="$variables_saved_for_relink" + + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + + # Compile-time system search path for libraries + sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + + # Run-time system search path for libraries + sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + + # Fix the shell variable \$srcfile for the compiler. + fix_srcfile_path="$fix_srcfile_path" + + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols + + # The commands to list exported symbols. + export_symbols_cmds=$lt_export_symbols_cmds + + # The commands to extract the exported symbol list from a shared archive. + extract_expsyms_cmds=$lt_extract_expsyms_cmds + + # Symbols that should not be listed in the preloaded symbols. + exclude_expsyms=$lt_exclude_expsyms + + # Symbols that must always be exported. + include_expsyms=$lt_include_expsyms + + # ### END LIBTOOL CONFIG + + __EOF__ + + case $host_os in + aix3*) + cat <<\EOF >> "${ofile}T" + + # 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 "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + EOF + ;; + esac + + case $host_os in + cygwin* | mingw* | pw32* | os2*) + cat <<'EOF' >> "${ofile}T" + # This is a source program that is used to create dlls on Windows + # Don't remove nor modify the starting and closing comments + # /* ltdll.c starts here */ + # #define WIN32_LEAN_AND_MEAN + # #include + # #undef WIN32_LEAN_AND_MEAN + # #include + # + # #ifndef __CYGWIN__ + # # ifdef __CYGWIN32__ + # # define __CYGWIN__ __CYGWIN32__ + # # endif + # #endif + # + # #ifdef __cplusplus + # extern "C" { + # #endif + # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); + # #ifdef __cplusplus + # } + # #endif + # + # #ifdef __CYGWIN__ + # #include + # DECLARE_CYGWIN_DLL( DllMain ); + # #endif + # HINSTANCE __hDllInstance_base; + # + # BOOL APIENTRY + # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) + # { + # __hDllInstance_base = hInst; + # return TRUE; + # } + # /* ltdll.c ends here */ + # This is a source program that is used to create import libraries + # on Windows for dlls which lack them. Don't remove nor modify the + # starting and closing comments + # /* impgen.c starts here */ + # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. + # + # This file is part of GNU libtool. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + # */ + # + # #include /* for printf() */ + # #include /* for open(), lseek(), read() */ + # #include /* for O_RDONLY, O_BINARY */ + # #include /* for strdup() */ + # + # /* O_BINARY isn't required (or even defined sometimes) under Unix */ + # #ifndef O_BINARY + # #define O_BINARY 0 + # #endif + # + # static unsigned int + # pe_get16 (fd, offset) + # int fd; + # int offset; + # { + # unsigned char b[2]; + # lseek (fd, offset, SEEK_SET); + # read (fd, b, 2); + # return b[0] + (b[1]<<8); + # } + # + # static unsigned int + # pe_get32 (fd, offset) + # int fd; + # int offset; + # { + # unsigned char b[4]; + # lseek (fd, offset, SEEK_SET); + # read (fd, b, 4); + # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); + # } + # + # static unsigned int + # pe_as32 (ptr) + # void *ptr; + # { + # unsigned char *b = ptr; + # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); + # } + # + # int + # main (argc, argv) + # int argc; + # char *argv[]; + # { + # int dll; + # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; + # unsigned long export_rva, export_size, nsections, secptr, expptr; + # unsigned long name_rvas, nexp; + # unsigned char *expdata, *erva; + # char *filename, *dll_name; + # + # filename = argv[1]; + # + # dll = open(filename, O_RDONLY|O_BINARY); + # if (dll < 1) + # return 1; + # + # dll_name = filename; + # + # for (i=0; filename[i]; i++) + # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') + # dll_name = filename + i +1; + # + # pe_header_offset = pe_get32 (dll, 0x3c); + # opthdr_ofs = pe_header_offset + 4 + 20; + # num_entries = pe_get32 (dll, opthdr_ofs + 92); + # + # if (num_entries < 1) /* no exports */ + # return 1; + # + # export_rva = pe_get32 (dll, opthdr_ofs + 96); + # export_size = pe_get32 (dll, opthdr_ofs + 100); + # nsections = pe_get16 (dll, pe_header_offset + 4 +2); + # secptr = (pe_header_offset + 4 + 20 + + # pe_get16 (dll, pe_header_offset + 4 + 16)); + # + # expptr = 0; + # for (i = 0; i < nsections; i++) + # { + # char sname[8]; + # unsigned long secptr1 = secptr + 40 * i; + # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); + # unsigned long vsize = pe_get32 (dll, secptr1 + 16); + # unsigned long fptr = pe_get32 (dll, secptr1 + 20); + # lseek(dll, secptr1, SEEK_SET); + # read(dll, sname, 8); + # if (vaddr <= export_rva && vaddr+vsize > export_rva) + # { + # expptr = fptr + (export_rva - vaddr); + # if (export_rva + export_size > vaddr + vsize) + # export_size = vsize - (export_rva - vaddr); + # break; + # } + # } + # + # expdata = (unsigned char*)malloc(export_size); + # lseek (dll, expptr, SEEK_SET); + # read (dll, expdata, export_size); + # erva = expdata - export_rva; + # + # nexp = pe_as32 (expdata+24); + # name_rvas = pe_as32 (expdata+32); + # + # printf ("EXPORTS\n"); + # for (i = 0; i> "${ofile}T" || (rm -f "${ofile}T"; exit 1) + + mv -f "${ofile}T" "$ofile" || \ + (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") + chmod +x "$ofile" + fi + ## + ## END FIXME + + ])# _LT_AC_LTCONFIG_HACK + # AC_LIBTOOL_DLOPEN - enable checks for dlopen support ! AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's ! AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) # AC_ENABLE_SHARED - implement the --enable-shared flag # Usage: AC_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. ! AC_DEFUN([AC_ENABLE_SHARED], ! [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} ! case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) *************** *** 167,187 **** ]) # AC_DISABLE_SHARED - set the default shared flag to --disable-shared ! AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no)]) # AC_ENABLE_STATIC - implement the --enable-static flag # Usage: AC_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. ! AC_DEFUN(AC_ENABLE_STATIC, [dnl ! define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} ! case "$enableval" in yes) enable_static=yes ;; no) enable_static=no ;; *) --- 2851,2872 ---- ]) # AC_DISABLE_SHARED - set the default shared flag to --disable-shared ! AC_DEFUN([AC_DISABLE_SHARED], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no)]) # AC_ENABLE_STATIC - implement the --enable-static flag # Usage: AC_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. ! AC_DEFUN([AC_ENABLE_STATIC], ! [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} ! case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) *************** *** 200,206 **** ]) # AC_DISABLE_STATIC - set the default static flag to --disable-static ! AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no)]) --- 2885,2892 ---- ]) # AC_DISABLE_STATIC - set the default static flag to --disable-static ! AC_DEFUN([AC_DISABLE_STATIC], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no)]) *************** *** 208,221 **** # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. ! AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl ! define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(fast-install, changequote(<<, >>)dnl << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} ! case "$enableval" in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) --- 2894,2907 ---- # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. ! AC_DEFUN([AC_ENABLE_FAST_INSTALL], ! [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(fast-install, changequote(<<, >>)dnl << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} ! case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) *************** *** 233,244 **** enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl ]) ! # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install ! AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no)]) # AC_PROG_LD - find the path to the GNU or non-GNU linker ! AC_DEFUN(AC_PROG_LD, [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) --- 2919,3016 ---- enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl ]) ! # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install ! AC_DEFUN([AC_DISABLE_FAST_INSTALL], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no)]) + # AC_LIBTOOL_PICMODE - implement the --with-pic flag + # Usage: AC_LIBTOOL_PICMODE[(MODE)] + # Where MODE is either `yes' or `no'. If omitted, it defaults to + # `both'. + AC_DEFUN([AC_LIBTOOL_PICMODE], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + pic_mode=ifelse($#,1,$1,default)]) + + + # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library + AC_DEFUN([AC_PATH_TOOL_PREFIX], + [AC_MSG_CHECKING([for $1]) + AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, + [case $MAGIC_CMD in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + dnl $ac_dummy forces splitting on constant user-supplied paths. + dnl POSIX.2 word splitting is done only on the output of word expansions, + dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + + *** Warning: the command libtool uses to detect shared libraries, + *** $file_magic_cmd, produces output that libtool cannot recognize. + *** The result is that libtool may fail to recognize shared libraries + *** as such. This will affect the creation of libtool libraries that + *** depend on shared libraries, but programs linked with such libtool + *** libraries will work regardless of this problem. Nevertheless, you + *** may want to report the problem to your system manager and/or to + *** bug-libtool@gnu.org + + EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; + esac]) + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) + else + AC_MSG_RESULT(no) + fi + ]) + + + # AC_PATH_MAGIC - find a file program which can recognise a shared library + AC_DEFUN([AC_PATH_MAGIC], + [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl + AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) + if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) + else + MAGIC_CMD=: + fi + fi + ]) + + # AC_PROG_LD - find the path to the GNU or non-GNU linker ! AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) *************** *** 246,261 **** AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld ! if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) ! ac_prog=`($CC -print-prog-name=ld) 2>&5` ! case "$ac_prog" in # Accept absolute paths. ! changequote(,)dnl ! [\\/]* | [A-Za-z]:[\\/]*) ! re_direlt='/[^/][^/]*/\.\./' ! changequote([,])dnl # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do --- 3018,3037 ---- AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld ! if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) ! case $host in ! *-*-mingw*) ! # gcc leaves a trailing carriage return which upsets mingw ! ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; ! *) ! ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; ! esac ! case $ac_prog in # Accept absolute paths. ! [[\\/]* | [A-Za-z]:[\\/]*)] ! [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do *************** *** 277,293 **** 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}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ! ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # 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 --- 3053,3069 ---- else AC_MSG_CHECKING([for non-GNU ld]) fi ! AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ! lt_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 "$lt_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 *************** *** 296,304 **** 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) else --- 3072,3080 ---- done IFS="$ac_save_ifs" else ! lt_cv_path_LD="$LD" # Let the user override the test with a path. fi]) ! LD="$lt_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else *************** *** 308,363 **** AC_PROG_LD_GNU ]) ! AC_DEFUN(AC_PROG_LD_GNU, ! [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then ! ac_cv_prog_gnu_ld=yes else ! ac_cv_prog_gnu_ld=no fi]) ]) # AC_PROG_NM - find the path to a BSD-compatible name lister ! AC_DEFUN(AC_PROG_NM, [AC_MSG_CHECKING([for BSD-compatible nm]) ! AC_CACHE_VAL(ac_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ! ac_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored ! if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! ac_cv_path_NM="$ac_dir/nm -B" break ! elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! ac_cv_path_NM="$ac_dir/nm -p" break else ! ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" ! test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi]) ! NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) ]) # AC_CHECK_LIBM - check for math library ! AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= ! case "$lt_target" in ! *-*-beos* | *-*-cygwin*) # These system don't have libm ;; *-ncr-sysv4.3*) --- 3084,3324 ---- AC_PROG_LD_GNU ]) ! # AC_PROG_LD_GNU - ! AC_DEFUN([AC_PROG_LD_GNU], ! [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_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 ! lt_cv_prog_gnu_ld=yes else ! lt_cv_prog_gnu_ld=no fi]) + with_gnu_ld=$lt_cv_prog_gnu_ld + ]) + + # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker + # -- PORTME Some linkers may need a different reload flag. + AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], + [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, + [lt_cv_ld_reload_flag='-r']) + reload_flag=$lt_cv_ld_reload_flag + test -n "$reload_flag" && reload_flag=" $reload_flag" + ]) + + # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies + # -- PORTME fill in with the dynamic library characteristics + AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], + [AC_CACHE_CHECK([how to recognise dependant libraries], + lt_cv_deplibs_check_method, + [lt_cv_file_magic_cmd='$MAGIC_CMD' + lt_cv_file_magic_test_file= + lt_cv_deplibs_check_method='unknown' + # Need to set the preceding variable on all platforms that support + # interlibrary dependencies. + # 'none' -- dependencies not supported. + # `unknown' -- same as none, but documents that we really don't know. + # 'pass_all' -- all dependencies passed with no checks. + # 'test_compile' -- check by making test program. + # ['file_magic [regex]'] -- check by looking for files in library path + # which responds to the $file_magic_cmd with a given egrep regex. + # If you have `file' or equivalent on your system and you're not sure + # whether `pass_all' will *always* work, you probably want this one. + + case $host_os in + aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + + beos*) + lt_cv_deplibs_check_method=pass_all + ;; + + bsdi4*) + [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'] + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + + cygwin* | mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + + darwin* | rhapsody*) + lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' + lt_cv_file_magic_cmd='/usr/bin/file -L' + case "$host_os" in + rhapsody* | darwin1.[012]) + lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` + ;; + *) # Darwin 1.3 on + lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' + ;; + esac + ;; + + freebsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + [lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'] + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + + gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + + hpux10.20*|hpux11*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'] + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + + irix5* | irix6*) + case $host_os in + irix5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + [lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"] + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; + + # This must be Linux ELF. + linux-gnu*) + case $host_cpu in + alpha* | i*86 | powerpc* | sparc* | ia64* ) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;] + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] + else + [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'] + fi + ;; + + newos6*) + [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'] + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + + osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + + sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + + solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + + [sysv5uw[78]* | sysv4*uw2*)] + lt_cv_deplibs_check_method=pass_all + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case $host_vendor in + motorola) + [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'] + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + [lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"] + lt_cv_file_magic_test_file=/lib/libc.so + ;; + esac + ;; + esac ]) + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + ]) + # AC_PROG_NM - find the path to a BSD-compatible name lister ! AC_DEFUN([AC_PROG_NM], [AC_MSG_CHECKING([for BSD-compatible nm]) ! AC_CACHE_VAL(lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ! lt_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. ! tmp_nm=$ac_dir/${ac_tool_prefix}nm ! if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored ! # Tru64's nm complains that /dev/null is an invalid object file ! if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then ! lt_cv_path_NM="$tmp_nm -B" break ! elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ! lt_cv_path_NM="$tmp_nm -p" break else ! lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" ! test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) ! NM="$lt_cv_path_NM" AC_MSG_RESULT([$NM]) ]) # AC_CHECK_LIBM - check for math library ! AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= ! case $host in ! *-*-beos* | *-*-cygwin* | *-*-pw32*) # These system don't have libm ;; *-ncr-sysv4.3*) *************** *** 380,387 **** # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. ! AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! case "$enable_ltdl_convenience" in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; --- 3341,3349 ---- # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. ! AC_DEFUN([AC_LIBLTDL_CONVENIENCE], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl ! case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; *************** *** 401,407 **** # not flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. ! AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then --- 3363,3370 ---- # not flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. ! AC_DEFUN([AC_LIBLTDL_INSTALLABLE], ! [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then *************** *** 421,434 **** fi ]) ! dnl old names ! AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl ! AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl ! AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl ! AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl ! AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl ! AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl ! AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl ! dnl This is just to silence aclocal about the macro not being used ! ifelse([AC_DISABLE_FAST_INSTALL])dnl --- 3384,3397 ---- fi ]) ! # old names ! AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) ! AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) ! AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) ! AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) ! AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) ! AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) ! AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) ! # This is just to silence aclocal about the macro not being used ! ifelse([AC_DISABLE_FAST_INSTALL]) Index: libtool/libtoolize.in diff -c libtool/libtoolize.in:1.7.2.2 libtool/libtoolize.in:1.15 *** libtool/libtoolize.in:1.7.2.2 Tue Mar 30 11:25:27 1999 --- libtool/libtoolize.in Fri Mar 30 14:47:23 2001 *************** *** 1,7 **** #! /bin/sh # libtoolize - Prepare a package to use libtool. # @configure_input@ ! # Copyright (C) 1996-1999 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify --- 1,7 ---- #! /bin/sh # libtoolize - Prepare a package to use libtool. # @configure_input@ ! # Copyright (C) 1996-2000 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify *************** *** 38,43 **** --- 38,44 ---- aclocaldir=@aclocaldir@ libtool_m4="$aclocaldir/libtool.m4" + ltdl_m4="$aclocaldir/ltdl.m4" dry_run=no help="Try \`$progname --help' for more information." *************** *** 52,57 **** --- 53,59 ---- force= ltdl= ltdl_tar= + configure_ac= status=0 for arg *************** *** 133,140 **** esac done ! if test ! -f configure.in; then ! echo "$progname: \`configure.in' does not exist" 1>&2 echo "$help" 1>&2 exit 1 fi --- 135,146 ---- esac done ! if test -f configure.ac; then ! configure_ac=configure.ac ! elif test -f configure.in; then ! configure_ac=configure.in ! else ! echo "$progname: \`configure.ac' does not exist" 1>&2 echo "$help" 1>&2 exit 1 fi *************** *** 145,151 **** echo "$progname: cannot list files in \`$pkgdatadir'" 1>&2 exit 1 fi ! files='config.guess config.sub ltconfig ltmain.sh' auxdir=. auxdirline=`egrep '^AC_CONFIG_AUX_DIR' configure.in 2>/dev/null` --- 151,157 ---- echo "$progname: cannot list files in \`$pkgdatadir'" 1>&2 exit 1 fi ! files='config.guess config.sub ltmain.sh' auxdir=. auxdirline=`egrep '^AC_CONFIG_AUX_DIR' configure.in 2>/dev/null` *************** *** 183,195 **** fi if test -z "$automake"; then ! if egrep '^A[MC]_PROG_LIBTOOL' configure.in >/dev/null 2>&1; then : else ! echo "Remember to add \`AM_PROG_LIBTOOL' to \`configure.in'." fi ! if egrep '^AC_PROG_RANLIB' configure.in >/dev/null 2>&1; then ! echo "Using \`AC_PROG_RANLIB' is rendered obsolete by \`AM_PROG_LIBTOOL'" fi if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then --- 189,201 ---- fi if test -z "$automake"; then ! if egrep '^A[MC]_PROG_LIBTOOL' $configure_ac >/dev/null 2>&1; then : else ! echo "Remember to add \`AC_PROG_LIBTOOL' to \`$configure_ac'." fi ! if egrep '^AC_PROG_RANLIB' $configure_ac >/dev/null 2>&1; then ! echo "Using \`AC_PROG_RANLIB' is rendered obsolete by \`AC_PROG_LIBTOOL'" fi if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then *************** *** 223,228 **** --- 229,269 ---- fi else echo "You should $updatemsg." + fi + + if grep '^AC_LIB_LTDL' $configure_ac >/dev/null 2>&1; then + if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then + updatemsg="update your \`aclocal.m4' by running aclocal" + else + updatemsg="add the contents of \`$ltdl_m4' to \`aclocal.m4'" + fi + + if egrep '^AC_DEFUN\(AC_LIB_LTDL' aclocal.m4 >/dev/null 2>&1; then + # Check the version number on ltdl.m4 and the one used in aclocal.m4. + instserial=`grep '^# serial ' $ltdl_m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` + + if test -z "$instserial"; then + echo "$progname: warning: no serial number on \`$ltdl_m4'" 1>&2 + else + # If the local macro has no serial number, we assume it's ancient. + localserial=`grep '^# serial ' aclocal.m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` + + test -z "$localserial" && localserial=0 + + if test "$localserial" -lt "$instserial"; then + echo "You should $updatemsg." + elif test "$localserial" -gt "$instserial"; then + echo "$progname: \`$ltld_m4' is serial $instserial, less than $localserial in \`aclocal.m4'" 1>&2 + if test -z "$force"; then + echo "Use \`--force' to replace newer libtool files with this version." 1>&2 + exit 1 + fi + echo "To remain compatible, you should $updatemsg." + fi + fi + else + echo "You should $updatemsg." + fi fi fi Index: libtool/lineno diff -c libtool/lineno:1.2 libtool/lineno:removed *** libtool/lineno:1.2 Thu Dec 31 03:25:14 1998 --- libtool/lineno Tue Apr 24 17:24:31 2001 *************** *** 1,98 **** - #! /bin/sh - # lineno - Replace instances of @LINENO@ with the file's current line number - # Gordon Matzigkeit , 1997 - - # Copyright (C) 1992-1999 Free Software Foundation, Inc. - - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2, or (at your option) - # any later version. - - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software - # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - # 02111-1307, USA. - - AWK=${AWK-awk} - delete=no - files= - progname=`echo "$0" | sed 's%^.*/%%'` - - for arg - do - case "$arg" in - --delete) delete=yes ;; - - --help) - cat <&2 - exit 1 - ;; - - *) files="$files $arg" ;; - esac - done - - if test -z "$files"; then - echo "$progname: no FILES specified" 1>&2 - exit 1 - fi - - # Manage a temp file. - tmpfile="$progname.$$" - trap "rm -f $tmpfile; exit 1" 1 2 15 - - status=0 - for file in $files; do - if test -f "$file"; then : - else - status=1 - echo "$progname: \`$file' is not a file" 1>&2 - fi - - # Skip empty files. - test -s "$file" || continue - - # Transliterated from a section in autoconf (Autoconf 2.12). - $AWK ' - /@LINENO@/ { printf "%d:", NR } - { print } - ' $file | sed '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' > $tmpfile - - if test -s "$tmpfile"; then - cp $tmpfile $file && continue - fi - - if test "$delete" = yes; then - echo "$progname: deleting \`$file'" 1>&2 - rm -f $file - fi - done - - rm -f $tmpfile - exit $status --- 0 ---- Index: libtool/ltconfig.in diff -c libtool/ltconfig.in:1.125.2.80 libtool/ltconfig.in:removed *** libtool/ltconfig.in:1.125.2.80 Fri May 26 19:24:07 2000 --- libtool/ltconfig.in Tue Apr 24 17:24:31 2001 *************** *** 1,3114 **** - #! /bin/sh - - # ltconfig - Create a system-specific libtool. - # Copyright (C) 1996-1999 Free Software Foundation, Inc. - # Originally by Gordon Matzigkeit , 1996 - # - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by - # 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. - - # A lot of this script is taken from autoconf-2.10. - - # Check that we are running under the correct shell. - SHELL=${CONFIG_SHELL-/bin/sh} - echo=echo - if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : - elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : - else - # Restart under the correct shell. - exec "$SHELL" "$0" --no-reexec ${1+"$@"} - fi - - if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null`} - case X$UNAME in - *-DOS) PATH_SEPARATOR=';' ;; - *) PATH_SEPARATOR=':' ;; - esac - fi - - # The HP-UX ksh and POSIX shell print the target directory to stdout - # if CDPATH is set. - if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then - break - fi - done - fi - - if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || - test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH /usr/ucb; do - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running ltconfig again with it. - ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf "%s\n"' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - # Cool, printf works - : - elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && - test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && - test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi - fi - - # 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' - - # Sed substitution to delay expansion of an escaped shell variable in a - # double_quote_subst'ed string. - delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - - # The name of this program. - progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` - - # Constants: - PROGRAM=ltconfig - PACKAGE=@PACKAGE@ - VERSION=@VERSION@ - TIMESTAMP="@TIMESTAMP@" - ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' - ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' - rm="rm -f" - - help="Try \`$progname --help' for more information." - - # Global variables: - default_ofile=libtool - can_build_shared=yes - enable_shared=yes - # All known linkers require a `.a' archive for static linking (except M$VC, - # which needs '.lib'). - enable_static=yes - enable_fast_install=yes - enable_dlopen=unknown - enable_win32_dll=no - ltmain= - silent= - srcdir= - ac_config_guess= - ac_config_sub= - host= - nonopt= - ofile="$default_ofile" - verify_host=yes - with_gcc=no - with_gnu_ld=no - need_locks=yes - ac_ext=c - objext=o - libext=a - exeext= - cache_file= - - old_AR="$AR" - old_CC="$CC" - old_CFLAGS="$CFLAGS" - old_CPPFLAGS="$CPPFLAGS" - old_LDFLAGS="$LDFLAGS" - old_LD="$LD" - old_LN_S="$LN_S" - old_LIBS="$LIBS" - old_NM="$NM" - old_RANLIB="$RANLIB" - old_DLLTOOL="$DLLTOOL" - old_OBJDUMP="$OBJDUMP" - old_AS="$AS" - - # Parse the command line options. - args= - prev= - for option - do - case "$option" in - -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - eval "$prev=\$option" - prev= - continue - fi - - case "$option" in - --help) cat <&2 - echo "$help" 1>&2 - exit 1 - ;; - - *) - 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 - host="$option" - else - echo "$progname: too many arguments" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac - done - - if test -z "$ltmain"; then - echo "$progname: you must specify a LTMAIN file" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - if test ! -f "$ltmain"; then - echo "$progname: \`$ltmain' does not exist" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - # Quote any args containing shell metacharacters. - ltconfig_args= - for arg - do - case "$arg" in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ltconfig_args="$ltconfig_args '$arg'" ;; - *) ltconfig_args="$ltconfig_args $arg" ;; - esac - done - - # A relevant subset of AC_INIT. - - # File descriptor usage: - # 0 standard input - # 1 file creation - # 2 errors and warnings - # 3 some systems may open it to /dev/tty - # 4 used on the Kubota Titan - # 5 compiler messages saved in config.log - # 6 checking for... messages and results - if test "$silent" = yes; then - exec 6>/dev/null - else - exec 6>&1 - fi - exec 5>>./config.log - - # 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 "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi - if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi - - if test -n "$cache_file" && test -r "$cache_file"; then - echo "loading cache $cache_file within ltconfig" - . $cache_file - fi - - if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' - ' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi - else - ac_n= ac_c='\c' ac_t= - fi - - if test -z "$srcdir"; then - # Assume the source directory is the same one as the path to LTMAIN. - srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` - test "$srcdir" = "$ltmain" && srcdir=. - fi - - trap "$rm conftest*; exit 1" 1 2 15 - if test "$verify_host" = yes; then - # Check for config.guess and config.sub. - ac_aux_dir= - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/config.guess; then - ac_aux_dir=$ac_dir - break - fi - done - if test -z "$ac_aux_dir"; then - echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 - echo "$help" 1>&2 - exit 1 - fi - ac_config_guess=$ac_aux_dir/config.guess - ac_config_sub=$ac_aux_dir/config.sub - - # Make sure we can run config.sub. - if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : - else - echo "$progname: cannot run $ac_config_sub" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 - - host_alias=$host - case "$host_alias" in - "") - if host_alias=`$SHELL $ac_config_guess`; then : - else - echo "$progname: cannot guess host type; you must specify one" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac - host=`$SHELL $ac_config_sub $host_alias` - echo "$ac_t$host" 1>&6 - - # Make sure the host verified. - 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 - echo "$help" 1>&2 - exit 1 - else - 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 "X${COLLECT_NAMES+set}" != Xset; 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 - - # Set a sane default for `OBJDUMP'. - test -z "$OBJDUMP" && OBJDUMP=objdump - - # If RANLIB is not set, then run the test. - if test "${RANLIB+set}" != "set"; then - result=no - - echo $ac_n "checking for ranlib... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then - RANLIB="ranlib" - result="ranlib" - break - fi - 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 - - # Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. - test -z "$DLLTOOL" && DLLTOOL=dlltool - test -z "$OBJDUMP" && OBJDUMP=objdump - test -z "$AS" && AS=as - - # Check to see if we are using GCC. - if test "$with_gcc" != yes || test -z "$CC"; then - # If CC is not set, then try to find GCC or a usable CC. - if test -z "$CC"; then - echo $ac_n "checking for gcc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then - CC="gcc" - break - fi - done - IFS="$save_ifs" - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - fi - - # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". - if test -z "$CC"; then - echo $ac_n "checking for cc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - cc_rejected=no - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/cc || test -f $dir/cc$ac_exeext; then - if test "$dir/cc" = "/usr/ucb/cc"; then - cc_rejected=yes - continue - fi - CC="cc" - break - fi - done - IFS="$save_ifs" - if test $cc_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same name, so the bogon will be chosen - # first if we set CC to just the name; use the full file name. - shift - set dummy "$dir/cc" "$@" - shift - CC="$@" - fi - 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 - echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 - exit 1 - fi - fi - - # 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. - set dummy $CC - compiler="$2" - - echo $ac_n "checking for object suffix... $ac_c" 1>&6 - $rm conftest* - echo 'int i = 1;' > conftest.c - echo "$progname:@LINENO@: checking for object suffix" >& 5 - if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done - else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* - echo "$ac_t$objext" 1>&6 - - echo $ac_n "checking for executable suffix... $ac_c" 1>&6 - if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_exeext="no" - $rm conftest* - echo 'main () { return 0; }' > conftest.c - echo "$progname:@LINENO@: checking for executable suffix" >& 5 - if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c | *.err | *.$objext ) ;; - *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; - esac - done - else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* - fi - if test "X$ac_cv_exeext" = Xno; then - exeext="" - else - exeext="$ac_cv_exeext" - fi - echo "$ac_t$ac_cv_exeext" 1>&6 - - 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' - - case "$host_os" in - beos* | irix5* | irix6* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - aix*) - # Below there is a dirty hack to force normal static linking with -ldl - # The problem is because libdl dynamically linked with both libc and - # libC (AIX C++ library), which obviously doesn't included in libraries - # list by gcc. This cause undefined symbols with -static flags. - # This hack allows C programs to be linked with "-static -ldl", but - # we not sure about C++ programs. - link_static_flag="$link_static_flag ${wl}-lC" - ;; - cygwin* | mingw* | os2*) - # We can build DLLs from non-PIC. - ;; - amigaos*) - # 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' - ;; - sysv4*MP*) - if test -d /usr/nec; then - pic_flag=-Kconform_pic - fi - ;; - *) - 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* | hpux11*) - # 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' - ;; - - irix5* | irix6*) - wl='-Wl,' - link_static_flag='-non_shared' - # PIC (with -KPIC) is the default. - ;; - - cygwin* | mingw* | os2*) - # We can build DLLs from non-PIC. - ;; - - osf3* | osf4* | osf5*) - # All OSF/1 code is PIC. - wl='-Wl,' - link_static_flag='-non_shared' - ;; - - sco3.2v5*) - pic_flag='-Kpic' - link_static_flag='-dn' - special_shlib_compile_flags='-belf' - ;; - - solaris*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - sunos4*) - pic_flag='-PIC' - link_static_flag='-Bstatic' - wl='-Qoption ld ' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - uts4*) - pic_flag='-pic' - link_static_flag='-Bstatic' - ;; - sysv4*MP*) - if test -d /usr/nec ;then - pic_flag='-Kconform_pic' - link_static_flag='-Bstatic' - fi - ;; - *) - 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 "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $pic_flag -DPIC" - echo "$progname:@LINENO@: checking if $compiler PIC flag $pic_flag works" >&5 - if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - case "$host_os" in - hpux9* | hpux10* | hpux11*) - # On HP-UX, both CC and GCC only warn that PIC is supported... then they - # create non-PIC objects. So, if there were any warnings, we assume that - # PIC is not supported. - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - can_build_shared=no - pic_flag= - else - echo "$ac_t"yes 1>&6 - pic_flag=" $pic_flag" - fi - ;; - *) - echo "$ac_t"yes 1>&6 - pic_flag=" $pic_flag" - ;; - esac - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - 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 to see if options -o and -c are simultaneously supported by compiler - echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - $rm conftest* - echo "int some_variable = 0;" > conftest.c - mkdir out - # According to Tom Tromey, Ian Lance Taylor reported there are C compilers - # that will create temporary files in the current directory regardless of - # the output directory. Thus, making CWD read-only will cause this test - # to fail, enabling locking or at least warning the user not to do parallel - # builds. - chmod -w . - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -o out/conftest2.o" - echo "$progname:@LINENO@: checking if $compiler supports -c -o file.o" >&5 - if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s out/conftest.err; then - echo "$ac_t"no 1>&6 - compiler_c_o=no - else - echo "$ac_t"yes 1>&6 - compiler_c_o=yes - fi - else - # Append any errors to the config.log. - cat out/conftest.err 1>&5 - compiler_c_o=no - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - chmod u+w . - $rm conftest* out/* - rmdir out - cd .. - rmdir conftest - $rm -r conftest 2>/dev/null - - if test x"$compiler_c_o" = x"yes"; then - # Check to see if we can write to a .lo - echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -c -o conftest.lo" - echo "$progname:@LINENO@: checking if $compiler supports -c -o file.lo" >&5 - if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - compiler_o_lo=no - else - echo "$ac_t"yes 1>&6 - compiler_o_lo=yes - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - compiler_o_lo=no - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* - else - compiler_o_lo=no - fi - - # Check to see if we can do hard links to lock some files if needed - hard_links="nottested" - if test "$compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$ac_t$hard_links" 1>&6 - $rm conftest* - if test "$hard_links" = no; then - echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 - need_locks=warn - fi - else - need_locks=no - fi - - if test "$with_gcc" = yes; then - # Check to see if options -fno-rtti -fno-exceptions are supported by compiler - echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" - echo "$progname:@LINENO@: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - compiler_rtti_exceptions=no - else - echo "$ac_t"yes 1>&6 - compiler_rtti_exceptions=yes - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - compiler_rtti_exceptions=no - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* - - if test "$compiler_rtti_exceptions" = "yes"; then - no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' - else - no_builtin_flag=' -fno-builtin' - fi - - fi - - # Check for any special shared library compilation flags. - if test -n "$special_shlib_compile_flags"; then - echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 - if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : - else - echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 - can_build_shared=no - 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 conftest.dat - if ln -s X conftest.dat 2>/dev/null; then - $rm conftest.dat - LN_S="ln -s" - else - LN_S=ln - fi - if test "$LN_S" = "ln -s"; then - echo "$ac_t"yes 1>&6 - else - echo "$ac_t"no 1>&6 - 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]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # 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}${PATH_SEPARATOR}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # 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= - need_lib_prefix=unknown - need_version=unknown - # when you set need_version to no, make sure it does not cause -set_version - # flags to be left without arguments - archive_cmds= - archive_expsym_cmds= - old_archive_from_new_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - runpath_var= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an egrep regular expression of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - - case "$host_os" in - cygwin* | mingw*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$with_gcc" != yes; then - with_gnu_ld=no - fi - ;; - - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # See if GNU ld supports shared libraries. - case "$host_os" in - aix3* | aix4*) - # On AIX, the GNU linker is very broken - ld_shlibs=no - cat <&2 - - *** Warning: the GNU linker, at least up to release 2.9.1, is reported - *** to be unable to reliably create shared libraries on AIX. - *** Therefore, libtool is disabling shared libraries support. If you - *** really care for shared libraries, you may want to modify your PATH - *** so that a non-GNU linker is found, and then restart. - - EOF - ;; - - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=yes - - # Extract the symbol export list from an `--export-all' def file, - # then regenerate the def file from the symbol export list, so that - # the compiled dll only exports the symbol export list. - # Be careful not to strip the DATA tag left by newer dlltools. - export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ - $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~ - sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' - - # If DATA tags from a recent dlltool are present, honour them! - archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ - _lt_hint=1; - cat $export_symbols | while read symbol; do - set dummy \$symbol; - case \$# in - 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; - *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; - esac; - _lt_hint=`expr 1 + \$_lt_hint`; - done~ - test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ - $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ - $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ - $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' - - old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' - # can we support soname and/or expsyms with a.out? -oliva - fi - ;; - - solaris* | sysv5*) - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - - *** Warning: The releases 2.8.* of the GNU linker cannot reliably - *** create shared libraries on Solaris systems. Therefore, libtool - *** is disabling shared libraries support. We urge you to upgrade GNU - *** binutils to release 2.9.1 or newer. Another option is to modify - *** your PATH or compiler configuration so that the native linker is - *** used, and then restart. - - EOF - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - case $host_os in - cygwin* | mingw*) - # dlltool doesn't understand --whole-archive et. al. - whole_archive_flag_spec= - ;; - *) - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - ;; - esac - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case "$host_os" in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - 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*) - hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' - hardcode_libdir_separator=':' - if test "$with_gcc" = yes; then - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct=yes - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - shared_flag='-shared' - else - shared_flag='${wl}-bM:SRE' - hardcode_direct=yes - fi - allow_undefined_flag=' ${wl}-berok' - archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' - archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' - case "$host_os" in aix4.[01]|aix4.[01].*) - # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on - always_export_symbols=yes ;; - esac - ;; - - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - cygwin* | mingw*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs' - fix_srcfile_path='`cygpath -w $srcfile`' - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9* | hpux10* | hpux11*) - case "$host_os" in - hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; - *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; - esac - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_minus_L=yes # Not in the search PATH, but as the default - # location of the library. - export_dynamic_flag_spec='${wl}-E' - ;; - - irix5* | irix6*) - if test "$with_gcc" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF - fi - hardcode_libdir_flag_spec='${wl}-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - openbsd*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - 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 $deplibs $linkopts $objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' - ;; - - osf3*) - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # As osf3* with the addition of the -msym flag - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - rhapsody*) - archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flags_spec='-L$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - - solaris*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case "$host_os" in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts' - else - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' - hardcode_libdir_flag_spec= - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' - hardcode_direct=yes - hardcode_minus_L=no - hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; - - unixware7*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - fi - echo "$ac_t$ld_shlibs" 1>&6 - test "$ld_shlibs" = no && can_build_shared=no - - if test -z "$NM"; then - echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 - case "$NM" in - [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -p" - break - else - NM=${NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - 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='[BCDEGRST]' - - # 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 \2\3 \3' - - # Transform an extracted symbol line into a proper C declaration - global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" - - # Define system-specific variables. - case "$host_os" in - aix*) - symcode='[BCDT]' - ;; - cygwin* | mingw*) - symcode='[ABCDGISTW]' - ;; - hpux*) # Its linker distinguishes data from code symbols - global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" - ;; - irix*) - symcode='[BCDEGRST]' - ;; - solaris*) - symcode='[BDT]' - ;; - sysv4) - symcode='[DFNSTU]' - ;; - 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='[ABCDGISTW]' - fi - - # Try without a prefix undercore, then with it. - for ac_symprfx in "" "_"; do - - # Write the raw and C identifiers. - global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - $rm conftest* - cat > conftest.c <&5 - if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then - # Now try to grab the symbols. - nlist=conftest.nm - if { echo "$progname:@LINENO@: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then - - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if egrep ' nm_test_var$' "$nlist" >/dev/null; then - if egrep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.c - #ifdef __cplusplus - extern "C" { - #endif - - EOF - # Now generate the symbol file. - eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' - - cat <> conftest.c - #if defined (__STDC__) && __STDC__ - # define lt_ptr_t void * - #else - # define lt_ptr_t char * - # define const - #endif - - /* The mapping between symbol names and symbols. */ - const struct { - const char *name; - lt_ptr_t address; - } - lt_preloaded_symbols[] = - { - EOF - sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c - cat <<\EOF >> conftest.c - {0, (lt_ptr_t) 0} - }; - - #ifdef __cplusplus - } - #endif - EOF - # Now try linking the two files. - mv conftest.$objext conftstm.$objext - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="conftstm.$objext" - CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - pipe_works=yes - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - LIBS="$save_LIBS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - global_symbol_pipe= - fi - done - if test "$pipe_works" = yes; then - echo "${ac_t}ok" 1>&6 - else - echo "${ac_t}failed" 1>&6 - fi - - if test -z "$global_symbol_pipe"; then - global_symbol_to_cdecl= - fi - - # Check hardcoding attributes. - echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 - 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 && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$hardcode_shlibpath_var" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi - else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported - fi - echo "$ac_t$hardcode_action" 1>&6 - - - reload_flag= - reload_cmds='$LD$reload_flag -o $output$reload_objs' - echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 - # PORTME Some linkers may need a different reload flag. - reload_flag='-r' - echo "$ac_t$reload_flag" 1>&6 - test -n "$reload_flag" && reload_flag=" $reload_flag" - - # PORTME Fill in your ld.so characteristics - library_names_spec= - libname_spec='lib$name' - soname_spec= - postinstall_cmds= - postuninstall_cmds= - finish_cmds= - finish_eval= - shlibpath_var= - shlibpath_overrides_runpath=unknown - version_type=none - dynamic_linker="$host_os ld.so" - sys_lib_dlsearch_path_spec="/lib /usr/lib" - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - file_magic_cmd= - file_magic_test_file= - deplibs_check_method='unknown' - # Need to set the preceding variable on all platforms that support - # interlibrary dependencies. - # 'none' -- dependencies not supported. - # `unknown' -- same as none, but documents that we really don't know. - # 'pass_all' -- all dependencies passed with no checks. - # 'test_compile' -- check by making test program. - # 'file_magic [regex]' -- check by looking for files in library path - # which responds to the $file_magic_cmd with a given egrep regex. - # If you have `file' or equivalent on your system and you're not sure - # whether `pass_all' will *always* work, you probably want this one. - echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 - case "$host_os" in - aix3*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}.so$major' - ;; - - aix4*) - version_type=linux - # AIX has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - # We preserve .a as extension for shared libraries though AIX4.2 - # and later linker supports .so - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' - shlibpath_var=LIBPATH - deplibs_check_method=pass_all - ;; - - amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' - ;; - - beos*) - library_names_spec='${libname}.so' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - deplibs_check_method=pass_all - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - bsdi4*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/shlib/libc.so - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - export_dynamic_flag_spec=-rdynamic - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - - cygwin* | mingw*) - version_type=windows - need_version=no - need_lib_prefix=no - if test "$with_gcc" = yes; then - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' - else - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' - fi - dynamic_linker='Win32 ld.exe' - deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - file_magic_cmd='${OBJDUMP} -f' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - freebsd1*) - dynamic_linker=no - ;; - - freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case "$version_type" in - freebsd-elf*) - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /usr/lib/libc.so*` - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - deplibs_check_method=unknown - library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case "$host_os" in - freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - ;; - esac - ;; - - gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - - hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - dynamic_linker="$host_os dld.sl" - version_type=sunos - need_lib_prefix=no - need_version=no - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' - soname_spec='${libname}${release}.sl$major' - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - case "$host_os" in - hpux10.20*) - # TODO: Does this work for hpux-11 too? - deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - - irix5* | irix6*) - version_type=irix - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}.so.$major' - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' - case "$host_os" in - irix5*) - libsuff= shlibsuff= - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" - ;; - *) - case "$LD" in # libtool.m4 will add one of these switches to LD - *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /lib${libsuff}/libc.so*` - deplibs_check_method='pass_all' - ;; - - # No shared lib support for Linux oldld, aout, or coff. - linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - dynamic_linker=no - ;; - - # This must be Linux ELF. - linux-gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - deplibs_check_method=pass_all - - if test -f /lib/ld.so.1; then - dynamic_linker='GNU ld.so' - else - # Only the GNU ld.so supports shared libraries on MkLinux. - case "$host_cpu" in - powerpc*) dynamic_linker=no ;; - *) dynamic_linker='Linux ld.so' ;; - esac - fi - ;; - - netbsd*) - version_type=sunos - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' - soname_spec='${libname}${release}.so$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - ;; - - openbsd*) - version_type=sunos - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - need_version=no - fi - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - - os2*) - libname_spec='$name' - need_lib_prefix=no - library_names_spec='$libname.dll $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - - osf3* | osf4* | osf5*) - version_type=osf - need_version=no - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - shlibpath_var=LD_LIBRARY_PATH - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method='file_magic COFF format alpha shared library' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/shlib/libc.so - deplibs_check_method='pass_all' - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - - rhapsody*) - version_type=sunos - library_names_spec='${libname}.so' - soname_spec='${libname}.so' - shlibpath_var=DYLD_LIBRARY_PATH - deplibs_check_method=pass_all - ;; - - sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - - solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" - file_magic_cmd=/usr/bin/file - file_magic_test_file=/lib/libc.so - ;; - - sunos4*) - version_type=sunos - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - case "$host_vendor" in - sequent) - file_magic_cmd='/bin/file' - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - ncr) - deplibs_check_method='pass_all' - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - esac - ;; - - uts4*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - - dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' - soname_spec='$libname.so.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - - *) - dynamic_linker=no - ;; - esac - echo "$ac_t$dynamic_linker" 1>&6 - test "$dynamic_linker" = no && can_build_shared=no - - # Report the final consequences. - echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 - - # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in - # configure.in, otherwise build static only libraries. - case "$host_os" in - cygwin* | mingw* | os2*) - if test x$can_build_shared = xyes; then - test x$enable_win32_dll = xno && can_build_shared=no - echo "checking if package supports dlls... $can_build_shared" 1>&6 - fi - ;; - esac - - if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then - case "$deplibs_check_method" in - "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - egrep "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - - *** Warning: the command libtool uses to detect shared libraries, - *** $file_magic_cmd, produces output that libtool cannot recognize. - *** The result is that libtool may fail to recognize shared libraries - *** as such. This will affect the creation of libtool libraries that - *** depend on shared libraries, but programs linked with such libtool - *** libraries will work regardless of this problem. Nevertheless, you - *** may want to report the problem to your system manager and/or to - *** bug-libtool@gnu.org - - EOF - fi ;; - esac - fi - - echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case "$host_os" in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix4*) - test "$enable_shared" = yes && enable_static=no - ;; - esac - - echo "$ac_t$enable_shared" 1>&6 - - # 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 - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no - elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless - fi - - echo $ac_n "checking for objdir... $ac_c" 1>&6 - rm -f .libs 2>/dev/null - mkdir .libs 2>/dev/null - 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 - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown - else - if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then - lt_cv_dlopen=no lt_cv_dlopen_libs= - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 - echo "$progname:@LINENO@: checking for dlopen in -ldl" >&5 - ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" - LIBS="-ldl $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - LIBS="$ac_save_LIBS" - - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dlopen""... $ac_c" 1>&6 - echo "$progname:@LINENO@: checking for dlopen" >&5 - if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char dlopen(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_dlopen) || defined (__stub___dlopen) - choke me - #else - dlopen(); - #endif - - ; return 0; } - EOF - if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_dlopen=no" - fi - rm -f conftest* - fi - if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 - echo "$progname:@LINENO@: checking for dld_link in -ldld" >&5 - ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" - LIBS="-ldld $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - LIBS="$ac_save_LIBS" - - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for shl_load""... $ac_c" 1>&6 - echo "$progname:@LINENO@: checking for shl_load" >&5 - if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - /* Override any gcc2 internal prototype to avoid an error. */ - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char shl_load(); - - int main() { - - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_shl_load) || defined (__stub___shl_load) - choke me - #else - shl_load(); - #endif - - ; return 0; } - EOF - if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_shl_load=yes" - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_shl_load=no" - fi - rm -f conftest* - fi - - if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 - echo "$progname:@LINENO@: checking for shl_load in -ldld" >&5 - ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" - LIBS="-ldld $LIBS" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" - fi - rm -f conftest* - LIBS="$ac_save_LIBS" - - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" - else - echo "$ac_t""no" 1>&6 - fi - - - fi - - - fi - - - fi - - - fi - - fi - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - fi - - case "$lt_cv_dlopen" in - dlopen) - for ac_hdr in dlfcn.h; do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 - echo "$progname:@LINENO@: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - int fnord = 0; - EOF - ac_try="$ac_compile >/dev/null 2>conftest.out" - { (eval echo $progname:@LINENO@: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - else - echo "$ac_err" >&5 - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - fi - rm -f conftest* - fi - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - done - - if test "x$ac_cv_header_dlfcn_h" = xyes; then - CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - fi - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 - echo "$progname:@LINENO@: checking whether a program can dlopen itself" >&5 - if test "${lt_cv_dlopen_self+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test "$cross_compiling" = yes; then - lt_cv_dlopen_self=cross - else - cat > conftest.c < - #endif - - #include - - #ifdef RTLD_GLOBAL - # define LTDL_GLOBAL RTLD_GLOBAL - #else - # ifdef DL_GLOBAL - # define LTDL_GLOBAL DL_GLOBAL - # else - # define LTDL_GLOBAL 0 - # endif - #endif - - /* We may have to define LTDL_LAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ - #ifndef LTDL_LAZY_OR_NOW - # ifdef RTLD_LAZY - # define LTDL_LAZY_OR_NOW RTLD_LAZY - # else - # ifdef DL_LAZY - # define LTDL_LAZY_OR_NOW DL_LAZY - # else - # ifdef RTLD_NOW - # define LTDL_LAZY_OR_NOW RTLD_NOW - # else - # ifdef DL_NOW - # define LTDL_LAZY_OR_NOW DL_NOW - # else - # define LTDL_LAZY_OR_NOW 0 - # endif - # endif - # endif - # endif - #endif - - fnord() { int i=42;} - main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } - - EOF - if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null - then - lt_cv_dlopen_self=yes - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - lt_cv_dlopen_self=no - fi - rm -fr conftest* - fi - - fi - - echo "$ac_t""$lt_cv_dlopen_self" 1>&6 - - if test "$lt_cv_dlopen_self" = yes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 - echo "$progname:@LINENO@: checking whether a statically linked program can dlopen itself" >&5 - if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test "$cross_compiling" = yes; then - lt_cv_dlopen_self_static=cross - else - cat > conftest.c < - #endif - - #include - - #ifdef RTLD_GLOBAL - # define LTDL_GLOBAL RTLD_GLOBAL - #else - # ifdef DL_GLOBAL - # define LTDL_GLOBAL DL_GLOBAL - # else - # define LTDL_GLOBAL 0 - # endif - #endif - - /* We may have to define LTDL_LAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ - #ifndef LTDL_LAZY_OR_NOW - # ifdef RTLD_LAZY - # define LTDL_LAZY_OR_NOW RTLD_LAZY - # else - # ifdef DL_LAZY - # define LTDL_LAZY_OR_NOW DL_LAZY - # else - # ifdef RTLD_NOW - # define LTDL_LAZY_OR_NOW RTLD_NOW - # else - # ifdef DL_NOW - # define LTDL_LAZY_OR_NOW DL_NOW - # else - # define LTDL_LAZY_OR_NOW 0 - # endif - # endif - # endif - # endif - #endif - - fnord() { int i=42;} - main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } - - EOF - if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null - then - lt_cv_dlopen_self_static=yes - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - lt_cv_dlopen_self_static=no - fi - rm -fr conftest* - fi - - fi - - echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 - fi - ;; - esac - - case "$lt_cv_dlopen_self" in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case "$lt_cv_dlopen_self_static" in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac - fi - - # Copy echo and quote the copy, instead of the original, because it is - # used later. - ltecho="$echo" - if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ltecho="$CONFIG_SHELL \$0 --fallback-echo" - fi - LTSHELL="$SHELL" - - LTCONFIG_VERSION="$VERSION" - - # Only quote variables if we're using ltmain.sh. - case "$ltmain" in - *.sh) - # Now quote all the things that may contain metacharacters. - for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ - old_LD old_LDFLAGS old_LIBS \ - old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ - AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ - reload_flag reload_cmds wl \ - pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ - thread_safe_flag_spec whole_archive_flag_spec libname_spec \ - library_names_spec soname_spec \ - RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ - old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ - file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ - finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ - hardcode_libdir_flag_spec hardcode_libdir_separator \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do - - case "$var" in - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case "$ltecho" in - *'\$0 --fallback-echo"') - ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - - trap "$rm \"$ofile\"; exit 1" 1 2 15 - echo "creating $ofile" - $rm "$ofile" - cat < "$ofile" - #! $SHELL - - # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. - # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) - # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. - # - # Copyright (C) 1996-1999 Free Software Foundation, Inc. - # Originally by Gordon Matzigkeit , 1996 - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # 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. - - # 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 "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - - ### BEGIN LIBTOOL CONFIG - EOF - cfgfile="$ofile" - ;; - - *) - # Double-quote the variables that need it (for aesthetics). - for var in old_CC old_CFLAGS old_CPPFLAGS \ - old_LD old_LDFLAGS old_LIBS \ - old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do - eval "$var=\\\"\$var\\\"" - done - - # Just create a config file. - cfgfile="$ofile.cfg" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - echo "creating $cfgfile" - $rm "$cfgfile" - cat < "$cfgfile" - # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. - # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) - EOF - ;; - esac - - cat <> "$cfgfile" - # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - # - # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ - # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ - # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ - # DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ - # $0$ltconfig_args - # - # Compiler and other test output produced by $progname, useful for - # debugging $progname, is in ./config.log if it exists. - - # The version of $progname that generated this script. - LTCONFIG_VERSION=$LTCONFIG_VERSION - - # Shell to use when invoking shell scripts. - SHELL=$LTSHELL - - # Whether or not to build shared libraries. - build_libtool_libs=$enable_shared - - # Whether or not to build static libraries. - build_old_libs=$enable_static - - # Whether or not to optimize for fast installation. - fast_install=$enable_fast_install - - # The host system. - host_alias=$host_alias - host=$host - - # An echo program that does not interpret backslashes. - echo=$ltecho - - # The archiver. - AR=$AR - - # The default C compiler. - CC=$CC - - # The linker used to build libraries. - LD=$LD - - # Whether we need hard or soft links. - LN_S=$LN_S - - # A BSD-compatible nm program. - NM=$NM - - # Used on cygwin: DLL creation program. - DLLTOOL="$DLLTOOL" - - # Used on cygwin: object dumper. - OBJDUMP="$OBJDUMP" - - # Used on cygwin: assembler. - AS="$AS" - - # The name of the directory that contains temporary libtool files. - objdir=$objdir - - # How to create reloadable object files. - reload_flag=$reload_flag - reload_cmds=$reload_cmds - - # How to pass a linker flag through the compiler. - wl=$wl - - # Object file suffix (normally "o"). - objext="$objext" - - # Old archive suffix (normally "a"). - libext="$libext" - - # Executable file suffix (normally ""). - exeext="$exeext" - - # Additional compiler flags for building library objects. - pic_flag=$pic_flag - - # Does compiler simultaneously support -c and -o options? - compiler_c_o=$compiler_c_o - - # Can we write directly to a .lo ? - compiler_o_lo=$compiler_o_lo - - # Must we lock files when doing compilation ? - need_locks=$need_locks - - # Do we need the lib prefix for modules? - need_lib_prefix=$need_lib_prefix - - # Do we need a version for libraries? - need_version=$need_version - - # Whether dlopen is supported. - dlopen=$enable_dlopen - - # Whether dlopen of programs is supported. - dlopen_self=$enable_dlopen_self - - # Whether dlopen of statically linked programs is supported. - dlopen_self_static=$enable_dlopen_self_static - - # Compiler flag to prevent dynamic linking. - link_static_flag=$link_static_flag - - # Compiler flag to turn off builtin functions. - no_builtin_flag=$no_builtin_flag - - # Compiler flag to allow reflexive dlopens. - export_dynamic_flag_spec=$export_dynamic_flag_spec - - # Compiler flag to generate shared objects directly from archives. - whole_archive_flag_spec=$whole_archive_flag_spec - - # Compiler flag to generate thread-safe objects. - thread_safe_flag_spec=$thread_safe_flag_spec - - # Library versioning type. - version_type=$version_type - - # Format of library name prefix. - libname_spec=$libname_spec - - # List of archive names. First name is the real one, the rest are links. - # The last name is the one that the linker finds with -lNAME. - library_names_spec=$library_names_spec - - # The coded name of the library, if different from the real name. - soname_spec=$soname_spec - - # Commands used to build and install an old-style archive. - RANLIB=$RANLIB - old_archive_cmds=$old_archive_cmds - old_postinstall_cmds=$old_postinstall_cmds - old_postuninstall_cmds=$old_postuninstall_cmds - - # Create an old-style archive from a shared archive. - old_archive_from_new_cmds=$old_archive_from_new_cmds - - # Commands used to build and install a shared archive. - archive_cmds=$archive_cmds - archive_expsym_cmds=$archive_expsym_cmds - postinstall_cmds=$postinstall_cmds - postuninstall_cmds=$postuninstall_cmds - - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$deplibs_check_method - - # Command to use when deplibs_check_method == file_magic. - file_magic_cmd=$file_magic_cmd - - # Flag that allows shared libraries with undefined symbols to be built. - allow_undefined_flag=$allow_undefined_flag - - # Flag that forces no undefined symbols. - no_undefined_flag=$no_undefined_flag - - # Commands used to finish a libtool library installation in a directory. - finish_cmds=$finish_cmds - - # Same as above, but a single script fragment to be evaled but not shown. - finish_eval=$finish_eval - - # Take the output of nm and produce a listing of raw symbols and C names. - global_symbol_pipe=$global_symbol_pipe - - # Transform the output of nm in a proper C declaration - global_symbol_to_cdecl=$global_symbol_to_cdecl - - # This is the shared library runtime path variable. - runpath_var=$runpath_var - - # This is the shared library path variable. - shlibpath_var=$shlibpath_var - - # Is shlibpath searched before the hard-coded library search path? - shlibpath_overrides_runpath=$shlibpath_overrides_runpath - - # How to hardcode a shared library path into an executable. - hardcode_action=$hardcode_action - - # Flag to hardcode \$libdir into a binary during linking. - # This must work even if \$libdir does not exist. - hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec - - # Whether we need a single -rpath flag with a separated argument. - hardcode_libdir_separator=$hardcode_libdir_separator - - # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the - # resulting binary. - hardcode_direct=$hardcode_direct - - # Set to yes if using the -LDIR flag during linking hardcodes DIR into the - # 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 - - # Compile-time system search path for libraries - sys_lib_search_path_spec=$sys_lib_search_path_spec - - # Run-time system search path for libraries - sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec - - # Fix the shell variable \$srcfile for the compiler. - fix_srcfile_path="$fix_srcfile_path" - - # Set to yes if exported symbols are required. - always_export_symbols=$always_export_symbols - - # The commands to list exported symbols. - export_symbols_cmds=$export_symbols_cmds - - # Symbols that should not be listed in the preloaded symbols. - exclude_expsyms=$exclude_expsyms - - # Symbols that must always be exported. - include_expsyms=$include_expsyms - - EOF - - case "$ltmain" in - *.sh) - echo '### END LIBTOOL CONFIG' >> "$ofile" - echo >> "$ofile" - case "$host_os" in - aix3*) - cat <<\EOF >> "$ofile" - - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - EOF - ;; - esac - - # Append the ltmain.sh script. - sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - - chmod +x "$ofile" - ;; - - *) - # Compile the libtool program. - echo "FIXME: would compile $ltmain" - ;; - esac - - test -n "$cache_file" || exit 0 - - # AC_CACHE_SAVE - trap '' 1 2 15 - cat > confcache <<\EOF - # This file is a shell script that caches the results of configure - # tests run on this system so they can be shared between configure - # scripts and configure runs. It is not useful on other systems. - # If it contains results you don't want to keep, you may remove or edit it. - # - # By default, configure uses ./config.cache as the cache file, - # creating it if it does not exist already. You can give configure - # the --cache-file=FILE option to use a different cache file; that is - # what configure does when it calls configure scripts in - # subdirectories, so they share the cache. - # Giving --cache-file=/dev/null disables caching, for debugging configure. - # config.status only pays attention to the cache file if you give it the - # --recheck option to rerun configure. - # - EOF - # The following way of writing the cache mishandles newlines in values, - # but we know of no workaround that is simple, portable, and efficient. - # So, don't put newlines in cache variables' values. - # Ultrix sh set writes to stderr and can't be redirected directly, - # and sets the high bit in the cache file unless we assign to the vars. - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache - if cmp -s $cache_file confcache; then - : - else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi - fi - rm -f confcache - - exit 0 - - # Local Variables: - # mode:shell-script - # sh-indentation:2 - # End: --- 0 ---- Index: libtool/ltdl.m4 diff -c /dev/null libtool/ltdl.m4:1.21 *** /dev/null Tue Apr 24 17:24:31 2001 --- libtool/ltdl.m4 Tue Apr 24 15:53:48 2001 *************** *** 0 **** --- 1,282 ---- + ## ltdl.m4 - Configure ltdl for the target system. -*-Shell-script-*- + ## Copyright (C) 1999-2000 Free Software Foundation, Inc. + ## + ## This program is free software; you can redistribute it and/or modify + ## it under the terms of the GNU General Public License as published by + ## the Free Software Foundation; either version 2 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. + + # serial 2 AC_LIB_LTDL + + # AC_LIB_LTDL + # ----------- + AC_DEFUN(AC_LIB_LTDL, + [AC_PREREQ(2.13)dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_C_CONST])dnl + + # Perform all the checks necessary for compilation of the ltdl objects + # -- including compiler checks (above) and header checks (below). + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl + + AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dl.h sys/dl.h dld.h) + AC_CHECK_HEADERS(string.h strings.h, break) + AC_CHECK_FUNCS(strchr index, break) + AC_CHECK_FUNCS(strrchr rindex, break) + AC_CHECK_FUNCS(memcpy bcopy, break) + AC_CHECK_FUNCS(strcmp) + + AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])dnl + AC_REQUIRE([AC_LTDL_SHLIBEXT])dnl + AC_REQUIRE([AC_LTDL_SHLIBPATH])dnl + AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])dnl + AC_REQUIRE([AC_LTDL_OBJDIR])dnl + AC_REQUIRE([AC_LTDL_DLPREOPEN])dnl + AC_REQUIRE([AC_LTDL_DLLIB])dnl + AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl + AC_REQUIRE([AC_LTDL_DLSYM_USCORE])dnl + AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])dnl + ])# AC_LIB_LTDL + + # AC_LTDL_ENABLE_INSTALL + # ---------------------- + AC_DEFUN(AC_LTDL_ENABLE_INSTALL, + [AC_ARG_ENABLE(ltdl-install, + [ --enable-ltdl-install install libltdl]) + + AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) + AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) + ])])# AC_LTDL_ENABLE_INSTALL + + # AC_LTDL_SYS_DLOPEN_DEPLIBS + # -------------------------- + AC_DEFUN(AC_LTDL_SYS_DLOPEN_DEPLIBS, + [AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CACHE_CHECK([whether deplibs are loaded by dlopen], + libltdl_cv_sys_dlopen_deplibs, [dnl + # PORTME does your system automatically load deplibs for dlopen()? + libltdl_cv_sys_dlopen_deplibs=unknown + case "$host_os" in + linux*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + netbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + solaris*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + esac + ]) + if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then + AC_DEFINE(LTDL_DLOPEN_DEPLIBS, 1, + [Define if the OS needs help to load dependent libraries for dlopen(). ]) + fi + ])# AC_LTDL_SYS_DLOPEN_DEPLIBS + + # AC_LTDL_SHLIBEXT + # ---------------- + AC_DEFUN(AC_LTDL_SHLIBEXT, + [AC_REQUIRE([_LT_AC_LTCONFIG_HACK]) + AC_CACHE_CHECK([which extension is used for shared libraries], + libltdl_cv_shlibext, + [ac_last= + for ac_spec in $library_names_spec; do + ac_last="$ac_spec" + done + echo "$ac_last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest + libltdl_cv_shlibext=`cat conftest` + rm -f conftest + ]) + if test -n "$libltdl_cv_shlibext"; then + AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", + [Define to the extension used for shared libraries, say, ".so". ]) + fi + ])# AC_LTDL_SHLIBEXT + + # AC_LTDL_SHLIBPATH + # ----------------- + AC_DEFUN(AC_LTDL_SHLIBPATH, + [AC_REQUIRE([_LT_AC_LTCONFIG_HACK]) + AC_CACHE_CHECK([which variable specifies run-time library path], + libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"]) + if test -n "$libltdl_cv_shlibpath_var"; then + AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", + [Define to the name of the environment variable that determines the dynamic library search path. ]) + fi + ])# AC_LTDL_SHLIBPATH + + # AC_LTDL_SYSSEARCHPATH + # --------------------- + AC_DEFUN(AC_LTDL_SYSSEARCHPATH, + [AC_REQUIRE([_LT_AC_LTCONFIG_HACK]) + AC_CACHE_CHECK([for the default library search path], + libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) + if test -n "$libltdl_cv_sys_search_path"; then + case "$host" in + *-*-mingw*) pathsep=";" ;; + *) pathsep=":" ;; + esac + sys_search_path= + for dir in $libltdl_cv_sys_search_path; do + if test -z "$sys_search_path"; then + sys_search_path="$dir" + else + sys_search_path="$sys_search_path$pathsep$dir" + fi + done + AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path", + [Define to the system default library search path. ]) + fi + ])# AC_LTDL_SYSSEARCHPATH + + # AC_LTDL_OBJDIR + # -------------- + AC_DEFUN(AC_LTDL_OBJDIR, + [AC_CACHE_CHECK([for objdir], + libltdl_cv_objdir, [libltdl_cv_objdir="$objdir" + if test -n "$objdir"; then + : + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then + libltdl_cv_objdir=.libs + else + # MS-DOS does not allow filenames that begin with a dot. + libltdl_cv_objdir=_libs + fi + rmdir .libs 2>/dev/null + fi]) + AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries. ]) + ])# AC_LTDL_OBJDIR + + # AC_LTDL_DLPREOPEN + # ----------------- + AC_DEFUN(AC_LTDL_DLPREOPEN, + [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl + AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], + libltdl_cv_preloaded_symbols, [dnl + if test -n "$global_symbol_pipe"; then + libltdl_cv_preloaded_symbols=yes + else + libltdl_cv_preloaded_symbols=no + fi + ]) + if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then + AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, + [Define if libtool can extract symbol lists from object files. ]) + fi + ])# AC_LTDL_DLPREOPEN + + # AC_LTDL_DLLIB + # ------------- + AC_DEFUN(AC_LTDL_DLLIB, + [LIBADD_DL= + AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1, + [Define if you have the libdl library or equivalent. ]) LIBADD_DL="-ldl"], + [AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1, + [Define if you have the libdl library or equivalent.])], + [AC_CHECK_LIB(svld, dlopen, [AC_DEFINE(HAVE_LIBDL, 1, + [Define if you have the libdl library or equivalent.]) LIBADD_DL="-lsvld"] + )])]) + AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1, + [Define if you have the shl_load function.])], + [AC_CHECK_LIB(dld, shl_load, + [AC_DEFINE(HAVE_SHL_LOAD, 1, + [Define if you have the shl_load function.]) + LIBADD_DL="$LIBADD_DL -ldld"]) + ]) + AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1, + [Define if you have the GNU dld library.])dnl + test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"]) + AC_SUBST(LIBADD_DL) + + if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then + LIBS_SAVE="$LIBS" + LIBS="$LIBS $LIBADD_DL" + AC_CHECK_FUNCS(dlerror) + LIBS="$LIBS_SAVE" + fi + ])# AC_LTDL_DLLIB + + # AC_LTDL_SYMBOL_USCORE + # --------------------- + AC_DEFUN(AC_LTDL_SYMBOL_USCORE, + [dnl does the compiler prefix global symbols with an underscore? + AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl + AC_MSG_CHECKING([for _ prefix in compiled symbols]) + AC_CACHE_VAL(ac_cv_sys_symbol_underscore, + [ac_cv_sys_symbol_underscore=no + cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then + # See whether the symbols have a leading underscore. + if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then + ac_cv_sys_symbol_underscore=yes + else + if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then + : + else + echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC + fi + fi + else + echo "configure: cannot run $global_symbol_pipe" >&AC_FD_CC + fi + else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.c >&AC_FD_CC + fi + rm -rf conftest* + ]) + AC_MSG_RESULT($ac_cv_sys_symbol_underscore) + ])# AC_LTDL_SYMBOL_USCORE + + + # AC_LTDL_DLSYM_USCORE + # -------------------- + AC_DEFUN(AC_LTDL_DLSYM_USCORE, + [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl + if test x"$ac_cv_sys_symbol_underscore" = xyes; then + if test x"$ac_cv_func_dlopen" = xyes || + test x"$ac_cv_lib_dl_dlopen" = xyes ; then + AC_CACHE_CHECK([whether we have to add an underscore for dlsym], + libltdl_cv_need_uscore, [dnl + libltdl_cv_need_uscore=unknown + save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + _LT_AC_TRY_DLOPEN_SELF( + libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes, + [], libltdl_cv_need_uscore=cross) + LIBS="$save_LIBS" + ]) + fi + fi + + if test x"$libltdl_cv_need_uscore" = xyes; then + AC_DEFINE(NEED_USCORE, 1, + [Define if dlsym() requires a leading underscode in symbol names. ]) + fi + ])# AC_LTDL_DLSYM_USCORE Index: libtool/ltmain.in diff -c libtool/ltmain.in:1.135.2.46 libtool/ltmain.in:1.259 *** libtool/ltmain.in:1.135.2.46 Fri May 26 19:24:07 2000 --- libtool/ltmain.in Tue Apr 24 16:22:34 2001 *************** *** 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-1999 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify --- 1,8 ---- # ltmain.sh - Provide generalized library-building support services. ! # NOTE: Changing this file will not affect anything until you rerun configure. # ! # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 ! # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify *************** *** 83,94 **** save_LANG="$LANG"; LANG=C; export LANG fi - if test "$LTCONFIG_VERSION" != "$VERSION"; then - echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 - 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 --- 84,89 ---- *************** *** 113,128 **** 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" --- 108,123 ---- 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) ! execute_dlfiles="$execute_dlfiles $arg" ;; *) eval "$prev=\$arg" *************** *** 135,141 **** fi # Have we seen a non-optional argument yet? ! case "$arg" in --help) show_help=yes ;; --- 130,136 ---- fi # Have we seen a non-optional argument yet? ! case $arg in --help) show_help=yes ;; *************** *** 146,152 **** ;; --config) ! sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; --- 141,147 ---- ;; --config) ! sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; *************** *** 211,222 **** # 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 --- 206,217 ---- # 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 *************** *** 261,272 **** 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= --- 256,268 ---- 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= + prev= lastarg= srcfile="$nonopt" suppress_output= *************** *** 274,281 **** user_target=no for arg do # Accept any command-line options. ! case "$arg" in -o) if test "$user_target" != "no"; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 --- 270,303 ---- user_target=no for arg do + case $prev in + "") ;; + xcompiler) + # Aesthetically quote the previous argument. + prev= + lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + + case $arg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + + # Add the previous argument to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + continue + ;; + esac + # Accept any command-line options. ! case $arg in -o) if test "$user_target" != "no"; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 *************** *** 288,296 **** build_old_libs=yes continue ;; esac ! case "$user_target" in next) # The next one is the -o target name user_target=yes --- 310,362 ---- build_old_libs=yes continue ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + continue + ;; esac ! case $user_target in next) # The next one is the -o target name user_target=yes *************** *** 316,325 **** 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 --- 382,391 ---- 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 *************** *** 332,338 **** fi done ! case "$user_target" in set) ;; no) --- 398,404 ---- fi done ! case $user_target in set) ;; no) *************** *** 348,354 **** # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSfmso]' ! case "$libobj" in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; --- 414,420 ---- # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSfmso]' ! case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *************** *** 363,369 **** libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` ! case "$libobj" in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 --- 429,435 ---- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` ! case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 *************** *** 387,396 **** $run $rm $removelist trap "$run $rm $removelist; exit 1" 1 2 15 # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then ! output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit 1" 1 2 15 --- 453,473 ---- $run $rm $removelist trap "$run $rm $removelist; exit 1" 1 2 15 + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then ! output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit 1" 1 2 15 *************** *** 402,408 **** # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then ! until ln "$0" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done --- 479,485 ---- # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then ! until $run ln "$0" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done *************** *** 434,441 **** # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile ! # All platforms use -DPIC, to notify preprocessed assembler code. ! command="$base_compile $srcfile $pic_flag -DPIC" if test "$build_old_libs" = yes; then lo_libobj="$libobj" dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` --- 511,523 ---- # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile ! if test "$pic_mode" != no; then ! # All platforms use -DPIC, to notify preprocessed assembler code. ! command="$base_compile $srcfile $pic_flag -DPIC" ! else ! # Don't build PIC code ! command="$base_compile $srcfile" ! fi if test "$build_old_libs" = yes; then lo_libobj="$libobj" dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` *************** *** 506,512 **** fi # If we have no pic_flag, then copy the object into place and finish. ! if test -z "$pic_flag" && test "$build_old_libs" = yes; then # Rename the .lo from within objdir to obj if test -f $obj; then $show $rm $obj --- 588,595 ---- fi # If we have no pic_flag, then copy the object into place and finish. ! if (test -z "$pic_flag" || test "$pic_mode" != default) && ! test "$build_old_libs" = yes; then # Rename the .lo from within objdir to obj if test -f $obj; then $show $rm $obj *************** *** 546,552 **** # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then ! command="$base_compile $srcfile" if test "$compiler_c_o" = yes; then command="$command -o $obj" output_obj="$obj" --- 629,641 ---- # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then ! if test "$pic_mode" != yes; then ! # Don't build PIC code ! command="$base_compile $srcfile" ! else ! # All platforms use -DPIC, to notify preprocessed assembler code. ! command="$base_compile $srcfile $pic_flag -DPIC" ! fi if test "$compiler_c_o" = yes; then command="$command -o $obj" output_obj="$obj" *************** *** 612,628 **** # Unlock the critical section if it was locked if test "$need_locks" != no; then ! $rm "$lockfile" fi exit 0 ;; # libtool link mode ! link) modename="$modename: link" ! case "$host" in ! *-*-cygwin* | *-*-mingw* | *-*-os2*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra --- 701,717 ---- # Unlock the critical section if it was locked if test "$need_locks" != no; then ! $run $rm "$lockfile" fi exit 0 ;; # libtool link mode ! link | relink) modename="$modename: link" ! case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra *************** *** 635,813 **** # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes - - # This is a source program that is used to create dlls on Windows - # Don't remove nor modify the starting and closing comments - # /* ltdll.c starts here */ - # #define WIN32_LEAN_AND_MEAN - # #include - # #undef WIN32_LEAN_AND_MEAN - # #include - # - # #ifndef __CYGWIN__ - # # ifdef __CYGWIN32__ - # # define __CYGWIN__ __CYGWIN32__ - # # endif - # #endif - # - # #ifdef __cplusplus - # extern "C" { - # #endif - # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); - # #ifdef __cplusplus - # } - # #endif - # - # #ifdef __CYGWIN__ - # #include - # DECLARE_CYGWIN_DLL( DllMain ); - # #endif - # HINSTANCE __hDllInstance_base; - # - # BOOL APIENTRY - # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) - # { - # __hDllInstance_base = hInst; - # return TRUE; - # } - # /* ltdll.c ends here */ - # This is a source program that is used to create import libraries - # on Windows for dlls which lack them. Don't remove nor modify the - # starting and closing comments - # /* impgen.c starts here */ - # /* Copyright (C) 1999 Free Software Foundation, Inc. - # - # This file is part of GNU libtool. - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software - # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - # */ - # - # #include /* for printf() */ - # #include /* for open(), lseek(), read() */ - # #include /* for O_RDONLY, O_BINARY */ - # #include /* for strdup() */ - # - # static unsigned int - # pe_get16 (fd, offset) - # int fd; - # int offset; - # { - # unsigned char b[2]; - # lseek (fd, offset, SEEK_SET); - # read (fd, b, 2); - # return b[0] + (b[1]<<8); - # } - # - # static unsigned int - # pe_get32 (fd, offset) - # int fd; - # int offset; - # { - # unsigned char b[4]; - # lseek (fd, offset, SEEK_SET); - # read (fd, b, 4); - # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); - # } - # - # static unsigned int - # pe_as32 (ptr) - # void *ptr; - # { - # unsigned char *b = ptr; - # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); - # } - # - # int - # main (argc, argv) - # int argc; - # char *argv[]; - # { - # int dll; - # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; - # unsigned long export_rva, export_size, nsections, secptr, expptr; - # unsigned long name_rvas, nexp; - # unsigned char *expdata, *erva; - # char *filename, *dll_name; - # - # filename = argv[1]; - # - # dll = open(filename, O_RDONLY|O_BINARY); - # if (!dll) - # return 1; - # - # dll_name = filename; - # - # for (i=0; filename[i]; i++) - # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') - # dll_name = filename + i +1; - # - # pe_header_offset = pe_get32 (dll, 0x3c); - # opthdr_ofs = pe_header_offset + 4 + 20; - # num_entries = pe_get32 (dll, opthdr_ofs + 92); - # - # if (num_entries < 1) /* no exports */ - # return 1; - # - # export_rva = pe_get32 (dll, opthdr_ofs + 96); - # export_size = pe_get32 (dll, opthdr_ofs + 100); - # nsections = pe_get16 (dll, pe_header_offset + 4 +2); - # secptr = (pe_header_offset + 4 + 20 + - # pe_get16 (dll, pe_header_offset + 4 + 16)); - # - # expptr = 0; - # for (i = 0; i < nsections; i++) - # { - # char sname[8]; - # unsigned long secptr1 = secptr + 40 * i; - # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); - # unsigned long vsize = pe_get32 (dll, secptr1 + 16); - # unsigned long fptr = pe_get32 (dll, secptr1 + 20); - # lseek(dll, secptr1, SEEK_SET); - # read(dll, sname, 8); - # if (vaddr <= export_rva && vaddr+vsize > export_rva) - # { - # expptr = fptr + (export_rva - vaddr); - # if (export_rva + export_size > vaddr + vsize) - # export_size = vsize - (export_rva - vaddr); - # break; - # } - # } - # - # expdata = (unsigned char*)malloc(export_size); - # lseek (dll, expptr, SEEK_SET); - # read (dll, expdata, export_size); - # erva = expdata - export_rva; - # - # nexp = pe_as32 (expdata+24); - # name_rvas = pe_as32 (expdata+32); - # - # printf ("EXPORTS\n"); - # for (i = 0; i\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then ! case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac ! case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. *************** *** 905,911 **** finalize_command="$finalize_command @SYMFILE@" preload=yes fi ! case "$arg" in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then --- 828,834 ---- finalize_command="$finalize_command @SYMFILE@" preload=yes fi ! case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then *************** *** 934,939 **** --- 857,863 ---- dlprefiles="$dlprefiles $arg" fi prev= + continue ;; esac ;; *************** *** 958,964 **** ;; rpath | xrpath) # We need an absolute path. ! case "$arg" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 --- 882,888 ---- ;; rpath | xrpath) # We need an absolute path. ! case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 *************** *** 979,995 **** 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" --- 903,934 ---- prev= continue ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac ! fi # test -n $prev prevarg="$arg" ! case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" *************** *** 1026,1032 **** -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then ! $echo "$modename: not more than one -exported-symbols argument allowed" exit 1 fi if test "X$arg" = "X-export-symbols"; then --- 965,971 ---- -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then ! $echo "$modename: more than one -exported-symbols argument is not allowed" exit 1 fi if test "X$arg" = "X-export-symbols"; then *************** *** 1037,1094 **** continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. ! case "$dir" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then ! $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 ! $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 ! absdir="$dir" fi dir="$absdir" ;; - esac - case " $deplibs " in - *" $arg "*) ;; - *) deplibs="$deplibs $arg";; esac ! case " $lib_search_path " in ! *" $dir "*) ;; ! *) lib_search_path="$lib_search_path $dir";; esac ! case "$host" in ! *-*-cygwin* | *-*-mingw* | *-*-os2*) ! dllsearchdir=`cd "$dir" && pwd || echo "$dir"` ! case ":$dllsearchpath:" in ! ::) dllsearchpath="$dllsearchdir";; ! *":$dllsearchdir:"*) ;; ! *) dllsearchpath="$dllsearchpath:$dllsearchdir";; esac ;; esac ;; -l*) ! if test "$arg" = "-lc"; then ! case "$host" in ! *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) ! # These systems don't actually have c library (as such) continue ;; ! esac ! elif test "$arg" = "-lm"; then ! case "$host" in ! *-*-cygwin* | *-*-beos*) ! # These systems don't actually have math library (as such) ! continue ;; esac fi deplibs="$deplibs $arg" ;; -module) --- 976,1040 ---- continue ;; + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. ! case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then ! $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 ! exit 1 fi dir="$absdir" ;; esac ! case "$deplibs " in ! *" -L$dir "*) ;; ! *) ! deplibs="$deplibs -L$dir" ! lib_search_path="$lib_search_path $dir" ! ;; esac ! case $host in ! *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ! case :$dllsearchpath: in ! *":$dir:"*) ;; ! *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac + continue ;; -l*) ! if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then ! case $host in ! *-*-cygwin* | *-*-pw32* | *-*-beos*) ! # These systems don't actually have a C or math library (as such) continue ;; ! *-*-mingw* | *-*-os2*) ! # These systems don't actually have a C library (as such) ! test "X$arg" = "X-lc" && continue ;; esac fi deplibs="$deplibs $arg" + continue ;; -module) *************** *** 1096,1101 **** --- 1042,1066 ---- continue ;; + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + -no-undefined) allow_undefined=no continue *************** *** 1121,1127 **** -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. ! case "$dir" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 --- 1086,1092 ---- -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. ! case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 *************** *** 1136,1146 **** ;; -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 ;; --- 1101,1111 ---- ;; -static) ! # The effects of -static are defined in a previous loop. ! # We used to do the same as -all-static on platforms that ! # didn't have a PIC flag, but the assumption that the effects ! # would be equivalent was wrong. It would break on at least ! # Digital Unix and AIX. continue ;; *************** *** 1154,1181 **** 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 | *.obj | *.a | *.lib) ! # A standard object. ! objs="$objs $arg" ! ;; ! ! *.lo) ! # A library object. if test "$prev" = dlfiles; then ! dlfiles="$dlfiles $arg" ! if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then prev= continue else --- 1119,1189 ---- continue ;; + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + 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 ;; ! *.lo | *.$objext) ! # A library or standard object. if test "$prev" = dlfiles; then ! # This file was specified with -dlopen. ! if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then ! dlfiles="$dlfiles $arg" prev= continue else *************** *** 1188,1544 **** # Preload the old-style object. dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` prev= fi - libobjs="$libobjs $arg" ;; *.la) # A libtool-controlled library. ! dlname= ! libdir= ! library_names= ! old_library= # Check to see that this really is a libtool archive. ! if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else ! $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 exit 1 fi # If the library was installed with an old release of libtool, # it will not redefine variable installed. installed=yes # Read the .la file ! # If there is no directory component, then add one. ! case "$arg" in ! */* | *\\*) . $arg ;; ! *) . ./$arg ;; esac # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done - if test -z "$linklib"; then ! $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 exit 1 fi ! # Find the relevant object directory and library name. ! name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` ! ! if test "X$installed" = Xyes; then ! dir="$libdir" ! else ! dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` ! if test "X$dir" = "X$arg"; then ! dir="$objdir" else ! dir="$dir/$objdir" fi - fi - - if test -n "$dependency_libs"; then - # Extract -R and -L from dependency_libs - temp_deplibs= - for deplib in $dependency_libs; do - case "$deplib" in - -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - case " $rpath $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - -L*) case "$compile_command $temp_deplibs " in - *" $deplib "*) ;; - *) temp_deplibs="$temp_deplibs $deplib";; - esac - temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'` - case " $lib_search_path " in - *" $temp_dir "*) ;; - *) lib_search_path="$lib_search_path $temp_dir";; - esac - ;; - *) temp_deplibs="$temp_deplibs $deplib";; - esac - done - dependency_libs="$temp_deplibs" - fi - - if test -z "$libdir"; then - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $dir/$old_library" - old_convenience="$old_convenience $dir/$old_library" - deplibs="$deplibs$dependency_libs" - compile_command="$compile_command $dir/$old_library$dependency_libs" - finalize_command="$finalize_command $dir/$old_library$dependency_libs" continue ! fi ! # This library was specified with -dlopen. ! if test "$prev" = dlfiles; then ! dlfiles="$dlfiles $arg" ! if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then ! # If there is no dlname, no dlopen support or we're linking statically, ! # we need to preload. ! prev=dlprefiles ! else ! # We should not create a dependency on this library, but we ! # may need any libraries it requires. ! compile_command="$compile_command$dependency_libs" ! finalize_command="$finalize_command$dependency_libs" ! prev= ! continue fi ! fi ! # The library was specified with -dlpreopen. ! if test "$prev" = dlprefiles; then # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then ! dlprefiles="$dlprefiles $dir/$old_library" else ! dlprefiles="$dlprefiles $dir/$linklib" fi ! prev= fi ! if test -n "$library_names" && ! { test "$prefer_static_libs" = no || test -z "$old_library"; }; then ! link_against_libtool_libs="$link_against_libtool_libs $arg" ! if test -n "$shlibpath_var"; then ! # Make sure the rpath contains only unique directories. ! case "$temp_rpath " in ! *" $dir "*) ;; ! *) temp_rpath="$temp_rpath $dir" ;; ! esac fi ! # We need an absolute path. ! case "$dir" in ! [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; ! *) ! absdir=`cd "$dir" && pwd` ! if test -z "$absdir"; then ! $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 ! $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 ! absdir="$dir" fi ! ;; ! esac ! ! # This is the magic to use -rpath. ! # Skip directories that are in the system default run-time ! # search path, unless they have been requested with -R. ! case " $sys_lib_dlsearch_path " in ! *" $absdir "*) ;; ! *) ! case "$compile_rpath " in ! *" $absdir "*) ;; ! *) compile_rpath="$compile_rpath $absdir" esac ! ;; ! esac ! case " $sys_lib_dlsearch_path " in ! *" $libdir "*) ;; ! *) ! case "$finalize_rpath " in *" $libdir "*) ;; ! *) finalize_rpath="$finalize_rpath $libdir" esac ! ;; ! esac ! lib_linked=yes ! case "$hardcode_action" in ! immediate | unsupported) ! if test "$hardcode_direct" = no; then ! compile_command="$compile_command $dir/$linklib" ! deplibs="$deplibs $dir/$linklib" ! case "$host" in ! *-*-cygwin* | *-*-mingw* | *-*-os2*) ! dllsearchdir=`cd "$dir" && pwd || echo "$dir"` ! if test -n "$dllsearchpath"; then ! dllsearchpath="$dllsearchpath:$dllsearchdir" ! else ! dllsearchpath="$dllsearchdir" ! fi ! ;; ! esac ! elif test "$hardcode_minus_L" = no; then ! case "$host" in ! *-*-sunos*) ! compile_shlibpath="$compile_shlibpath$dir:" ;; - esac - case "$compile_command " in - *" -L$dir "*) ;; - *) compile_command="$compile_command -L$dir";; esac ! compile_command="$compile_command -l$name" ! deplibs="$deplibs -L$dir -l$name" ! elif test "$hardcode_shlibpath_var" = no; then ! case ":$compile_shlibpath:" in ! *":$dir:"*) ;; ! *) compile_shlibpath="$compile_shlibpath$dir:";; esac ! compile_command="$compile_command -l$name" ! deplibs="$deplibs -l$name" else ! lib_linked=no fi ! ;; ! relink) if test "$hardcode_direct" = yes; then ! compile_command="$compile_command $absdir/$linklib" ! deplibs="$deplibs $absdir/$linklib" elif test "$hardcode_minus_L" = yes; then ! case "$compile_command " in ! *" -L$absdir "*) ;; ! *) compile_command="$compile_command -L$absdir";; ! esac ! compile_command="$compile_command -l$name" ! deplibs="$deplibs -L$absdir -l$name" elif test "$hardcode_shlibpath_var" = yes; then ! case ":$compile_shlibpath:" in ! *":$absdir:"*) ;; ! *) compile_shlibpath="$compile_shlibpath$absdir:";; esac ! compile_command="$compile_command -l$name" ! deplibs="$deplibs -l$name" else ! lib_linked=no fi - ;; ! *) ! lib_linked=no ! ;; ! esac ! ! if test "$lib_linked" != yes; then ! $echo "$modename: configuration error: unsupported hardcode properties" ! exit 1 ! fi ! ! # Finalize command for both is simple: just hardcode it. ! if test "$hardcode_direct" = yes; then ! finalize_command="$finalize_command $libdir/$linklib" ! elif test "$hardcode_minus_L" = yes; then ! case "$finalize_command " in ! *" -L$libdir "*) ;; ! *) finalize_command="$finalize_command -L$libdir";; ! esac ! finalize_command="$finalize_command -l$name" ! elif test "$hardcode_shlibpath_var" = yes; then ! case ":$finalize_shlibpath:" in ! *":$libdir:"*) ;; ! *) finalize_shlibpath="$finalize_shlibpath$libdir:";; ! esac ! finalize_command="$finalize_command -l$name" ! else ! # We cannot seem to hardcode it, guess we'll fake it. ! case "$finalize_command " in ! *" -L$dir "*) ;; ! *) finalize_command="$finalize_command -L$libdir";; ! esac ! finalize_command="$finalize_command -l$name" fi ! else ! # Transform directly to old archives if we don't build new libraries. ! if test -n "$pic_flag" && test -z "$old_library"; then ! $echo "$modename: cannot find static library for \`$arg'" 1>&2 ! exit 1 fi # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. 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 ! case "$compile_command " in ! *" -L$dir "*) ;; ! *) compile_command="$compile_command -L$dir";; ! esac ! compile_command="$compile_command -l$name" ! case "$finalize_command " in ! *" -L$dir "*) ;; ! *) finalize_command="$finalize_command -L$dir";; ! esac ! finalize_command="$finalize_command -l$name" fi ! fi ! ! # Add in any libraries that this one depends upon. ! compile_command="$compile_command$dependency_libs" ! finalize_command="$finalize_command$dependency_libs" ! continue ! ;; ! ! # Some other compiler argument. ! *) ! # 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 "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then ! eval arg=\"$export_dynamic_flag_spec\" ! compile_command="$compile_command $arg" ! finalize_command="$finalize_command $arg" ! fi ! oldlibs= ! # calculate the name of the file, without its directory ! outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` ! libobjs_save="$libobjs" ! case "$output" in ! "") ! $echo "$modename: you must specify an output file" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! ;; ! *.a | *.lib) ! if test -n "$link_against_libtool_libs"; then ! $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 ! exit 1 fi ! if test -n "$deplibs"; then ! $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi --- 1196,2085 ---- # Preload the old-style object. dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` prev= + else + case $arg in + *.lo) libobjs="$libobjs $arg" ;; + *) objs="$objs $arg" ;; + esac fi ;; + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + *.la) # A libtool-controlled library. ! if test "$prev" = dlfiles; then ! # This library was specified with -dlopen. ! dlfiles="$dlfiles $arg" ! prev= ! elif test "$prev" = dlprefiles; then ! # The library was specified with -dlpreopen. ! dlprefiles="$dlprefiles $arg" ! prev= ! else ! deplibs="$deplibs $arg" ! fi ! 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 # arg ! ! # 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 # argument parsing loop ! ! if test -n "$prev"; then ! $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! fi ! ! if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then ! eval arg=\"$export_dynamic_flag_spec\" ! compile_command="$compile_command $arg" ! finalize_command="$finalize_command $arg" ! fi ! ! # calculate the name of the file, without its directory ! outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` ! libobjs_save="$libobjs" ! ! if test -n "$shlibpath_var"; then ! # get the directories listed in $shlibpath_var ! eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` ! else ! shlib_search_path= ! fi ! eval sys_lib_search_path=\"$sys_lib_search_path_spec\" ! eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" ! ! output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` ! if test "X$output_objdir" = "X$output"; then ! output_objdir="$objdir" ! else ! output_objdir="$output_objdir/$objdir" ! fi ! # Create the object directory. ! if test ! -d $output_objdir; then ! $show "$mkdir $output_objdir" ! $run $mkdir $output_objdir ! status=$? ! if test $status -ne 0 && test ! -d $output_objdir; then ! exit $status ! fi ! fi ! ! # Determine the type of output ! case $output in ! "") ! $echo "$modename: you must specify an output file" 1>&2 ! $echo "$help" 1>&2 ! exit 1 ! ;; ! *.$libext) linkmode=oldlib ;; ! *.lo | *.$objext) linkmode=obj ;; ! *.la) linkmode=lib ;; ! *) linkmode=prog ;; # Anything else should be a program. ! esac + specialdeplibs= + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + libs="$libs $deplib" + done + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit 1 + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test $linkmode = prog; then + # Determine which files to process + case $pass in + dlopen) + libs="$dlfiles" + save_deplibs="$deplibs" # Collect dlpreopened libraries + deplibs= + ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -l*) + if test $linkmode = oldlib && test $linkmode = obj; then + $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 + continue + fi + if test $pass = conv; then + deplibs="$deplib $deplibs" + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + # Search the libtool library + lib="$searchdir/lib${name}.la" + if test -f "$lib"; then + found=yes + break + fi + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test $pass = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test $pass = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test $pass = scan; then + deplibs="$deplib $deplibs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test $pass = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test $pass = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + if test "$deplibs_check_method" != pass_all; then + echo + echo "*** Warning: This library needs some functionality provided by $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + else + echo + echo "*** Warning: Linking the shared library $output against the" + echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test $pass != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test $found = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib'" 1>&2 + exit 1 + fi + # Check to see that this really is a libtool archive. ! if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else ! $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= # If the library was installed with an old release of libtool, # it will not redefine variable installed. installed=yes # Read the .la file ! case $lib in ! */* | *\\*) . $lib ;; ! *) . ./$lib ;; esac + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test $linkmode = oldlib && test $linkmode = obj; }; then + # Add dl[pre]opened files of deplib + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test $pass = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit 1 + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + tmp_libs="$tmp_libs $deplib" + done + elif test $linkmode != prog && test $linkmode != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit 1 + fi + continue + fi # $pass = conv + # 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 \`$lib'" 1>&2 exit 1 fi ! # This library was specified with -dlopen. ! if test $pass = dlopen; then ! if test -z "$libdir"; then ! $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 ! exit 1 ! fi ! if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then ! # If there is no dlname, no dlopen support or we're linking ! # statically, we need to preload. ! dlprefiles="$dlprefiles $lib" else ! newdlfiles="$newdlfiles $lib" fi continue ! fi # $pass = dlopen ! # We need an absolute path. ! case $ladir in ! [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; ! *) ! abs_ladir=`cd "$ladir" && pwd` ! if test -z "$abs_ladir"; then ! $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 ! $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 ! abs_ladir="$ladir" fi ! ;; ! esac ! laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` ! # Find the relevant object directory and library name. ! if test "X$installed" = Xyes; then ! if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then ! $echo "$modename: warning: library \`$lib' was moved." 1>&2 ! dir="$ladir" ! absdir="$abs_ladir" ! libdir="$abs_ladir" ! else ! dir="$libdir" ! absdir="$libdir" ! fi ! else ! dir="$ladir/$objdir" ! absdir="$abs_ladir/$objdir" ! # Remove this search path later ! notinst_path="$notinst_path $abs_ladir" ! fi # $installed = yes ! name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` ! ! # This library was specified with -dlpreopen. ! if test $pass = dlpreopen; then ! if test -z "$libdir"; then ! $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 ! exit 1 ! fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then ! newdlprefiles="$newdlprefiles $dir/$old_library" ! # Otherwise, use the dlname, so that lt_dlopen finds it. ! elif test -n "$dlname"; then ! newdlprefiles="$newdlprefiles $dir/$dlname" else ! newdlprefiles="$newdlprefiles $dir/$linklib" fi ! fi # $pass = dlpreopen ! ! if test -z "$libdir"; then ! # Link the convenience library ! if test $linkmode = lib; then ! deplibs="$dir/$old_library $deplibs" ! elif test "$linkmode,$pass" = "prog,link"; then ! compile_deplibs="$dir/$old_library $compile_deplibs" ! finalize_deplibs="$dir/$old_library $finalize_deplibs" ! else ! deplibs="$lib $deplibs" ! fi ! continue fi ! if test $linkmode = prog && test $pass != link; then ! newlib_search_path="$newlib_search_path $ladir" ! deplibs="$lib $deplibs" ! ! linkalldeplibs=no ! if test "$link_all_deplibs" != no || test -z "$library_names" || ! test "$build_libtool_libs" = no; then ! linkalldeplibs=yes fi ! tmp_libs= ! for deplib in $dependency_libs; do ! case $deplib in ! -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test ! esac ! # Need to link against all dependency_libs? ! if test $linkalldeplibs = yes; then ! deplibs="$deplib $deplibs" ! else ! # Need to hardcode shared library paths ! # or/and link against static libraries ! newdependency_libs="$deplib $newdependency_libs" fi ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac ! tmp_libs="$tmp_libs $deplib" ! done # for deplib ! continue ! fi # $linkmode = prog... ! link_static=no # Whether the deplib will be linked statically ! if test -n "$library_names" && ! { test "$prefer_static_libs" = no || test -z "$old_library"; }; then ! # Link against this shared library ! ! if test "$linkmode,$pass" = "prog,link" || ! { test $linkmode = lib && test $hardcode_into_libs = yes; }; then ! # Hardcode the library path. ! # Skip directories that are in the system default run-time ! # search path. ! case " $sys_lib_dlsearch_path " in ! *" $absdir "*) ;; ! *) ! case "$compile_rpath " in ! *" $absdir "*) ;; ! *) compile_rpath="$compile_rpath $absdir" ! esac ! ;; ! esac ! case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; ! *) ! case "$finalize_rpath " in ! *" $libdir "*) ;; ! *) finalize_rpath="$finalize_rpath $libdir" ! esac ! ;; esac ! if test $linkmode = prog; then ! # We need to hardcode the library path ! if test -n "$shlibpath_var"; then ! # Make sure the rpath contains only unique directories. ! case "$temp_rpath " in ! *" $dir "*) ;; ! *" $absdir "*) ;; ! *) temp_rpath="$temp_rpath $dir" ;; ! esac ! fi ! fi ! fi # $linkmode,$pass = prog,link... ! if test "$alldeplibs" = yes && ! { test "$deplibs_check_method" = pass_all || ! { test "$build_libtool_libs" = yes && ! test -n "$library_names"; }; }; then ! # We only need to search for static libraries ! continue ! fi ! ! if test "$installed" = no; then ! notinst_deplibs="$notinst_deplibs $lib" ! need_relink=yes ! fi ! ! if test -n "$old_archive_from_expsyms_cmds"; then ! # figure out the soname ! set dummy $library_names ! realname="$2" ! shift; shift ! libname=`eval \\$echo \"$libname_spec\"` ! # use dlname if we got it. it's perfectly good, no? ! if test -n "$dlname"; then ! soname="$dlname" ! elif test -n "$soname_spec"; then ! # bleh windows ! case $host in ! *cygwin*) ! major=`expr $current - $age` ! versuffix="-$major" ;; esac ! eval soname=\"$soname_spec\" ! else ! soname="$realname" ! fi ! ! # Make a new name for the extract_expsyms_cmds to use ! soroot="$soname" ! soname=`echo $soroot | sed -e 's/^.*\///'` ! newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" ! ! # If the library has no export list, then create one now ! if test -f "$output_objdir/$soname-def"; then : ! else ! $show "extracting exported symbol list from \`$soname'" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' ! eval cmds=\"$extract_expsyms_cmds\" ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? ! done ! IFS="$save_ifs" ! fi ! ! # Create $newlib ! if test -f "$output_objdir/$newlib"; then :; else ! $show "generating import library for \`$soname'" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' ! eval cmds=\"$old_archive_from_expsyms_cmds\" ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" || exit $? ! done ! IFS="$save_ifs" ! fi ! # make sure the library variables are pointing to the new library ! dir=$output_objdir ! linklib=$newlib ! fi # test -n $old_archive_from_expsyms_cmds ! ! if test $linkmode = prog || test "$mode" != relink; then ! add_shlibpath= ! add_dir= ! add= ! lib_linked=yes ! case $hardcode_action in ! immediate | unsupported) ! if test "$hardcode_direct" = no; then ! add="$dir/$linklib" ! elif test "$hardcode_minus_L" = no; then ! case $host in ! *-*-sunos*) add_shlibpath="$dir" ;; ! esac ! add_dir="-L$dir" ! add="-l$name" ! elif test "$hardcode_shlibpath_var" = no; then ! add_shlibpath="$dir" ! add="-l$name" ! else ! lib_linked=no ! fi ! ;; ! relink) ! if test "$hardcode_direct" = yes; then ! add="$dir/$linklib" ! elif test "$hardcode_minus_L" = yes; then ! add_dir="-L$dir" ! add="-l$name" ! elif test "$hardcode_shlibpath_var" = yes; then ! add_shlibpath="$dir" ! add="-l$name" ! else ! lib_linked=no ! fi ! ;; ! *) lib_linked=no ;; ! esac ! ! if test "$lib_linked" != yes; then ! $echo "$modename: configuration error: unsupported hardcode properties" ! exit 1 ! fi ! ! if test -n "$add_shlibpath"; then ! case :$compile_shlibpath: in ! *":$add_shlibpath:"*) ;; ! *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac ! fi ! if test $linkmode = prog; then ! test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" ! test -n "$add" && compile_deplibs="$add $compile_deplibs" else ! test -n "$add_dir" && deplibs="$add_dir $deplibs" ! test -n "$add" && deplibs="$add $deplibs" ! if test "$hardcode_direct" != yes && \ ! test "$hardcode_minus_L" != yes && \ ! test "$hardcode_shlibpath_var" = yes; then ! case :$finalize_shlibpath: in ! *":$libdir:"*) ;; ! *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; ! esac ! fi fi ! fi ! if test $linkmode = prog || test "$mode" = relink; then ! add_shlibpath= ! add_dir= ! add= ! # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then ! add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then ! add_dir="-L$libdir" ! add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then ! case :$finalize_shlibpath: in ! *":$libdir:"*) ;; ! *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac ! add="-l$name" else ! # We cannot seem to hardcode it, guess we'll fake it. ! add_dir="-L$libdir" ! add="-l$name" fi ! if test $linkmode = prog; then ! test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" ! test -n "$add" && finalize_deplibs="$add $finalize_deplibs" ! else ! test -n "$add_dir" && deplibs="$add_dir $deplibs" ! test -n "$add" && deplibs="$add $deplibs" ! fi fi ! elif test $linkmode = prog; then ! if test "$alldeplibs" = yes && ! { test "$deplibs_check_method" = pass_all || ! { test "$build_libtool_libs" = yes && ! test -n "$library_names"; }; }; then ! # We only need to search for static libraries ! continue fi + # Try to link the static library # 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_deplibs="$dir/$linklib $compile_deplibs" ! finalize_deplibs="$dir/$linklib $finalize_deplibs" else ! compile_deplibs="-l$name -L$dir $compile_deplibs" ! finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi ! elif test "$build_libtool_libs" = yes; then ! # Not a shared library ! if test "$deplibs_check_method" != pass_all; then ! # We're trying link a shared library against a static one ! # but the system doesn't support it. ! # Just print a warning and add the library to dependency_libs so ! # that the program can be linked against the static library. ! echo ! echo "*** Warning: This library needs some functionality provided by $lib." ! echo "*** I have the capability to make that library automatically link in when" ! echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have." ! if test "$module" = yes; then ! echo "*** Therefore, libtool will create a static module, that should work " ! echo "*** as long as the dlopening application is linked with the -dlopen flag." ! if test -z "$global_symbol_pipe"; then ! echo ! echo "*** However, this would only work if libtool was able to extract symbol" ! echo "*** lists from a program, using \`nm' or equivalent, but libtool could" ! echo "*** not find such a program. So, this module is probably useless." ! echo "*** \`nm' from GNU binutils and a full rebuild may help." ! fi ! if test "$build_old_libs" = no; then ! build_libtool_libs=module ! build_old_libs=yes ! else ! build_libtool_libs=no ! fi ! fi ! else ! convenience="$convenience $dir/$old_library" ! old_convenience="$old_convenience $dir/$old_library" ! deplibs="$dir/$old_library $deplibs" ! link_static=yes ! fi ! fi # link shared/static library? ! ! if test $linkmode = lib; then ! if test -n "$dependency_libs" && ! { test $hardcode_into_libs != yes || test $build_old_libs = yes || ! test $link_static = yes; }; then ! # Extract -R from dependency_libs ! temp_deplibs= ! for libdir in $dependency_libs; do ! case $libdir in ! -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` ! case " $xrpath " in ! *" $temp_xrpath "*) ;; ! *) xrpath="$xrpath $temp_xrpath";; ! esac;; ! *) temp_deplibs="$temp_deplibs $libdir";; ! esac ! done ! dependency_libs="$temp_deplibs" ! fi ! newlib_search_path="$newlib_search_path $absdir" ! # Link against this library ! test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" ! # ... and its dependency_libs ! tmp_libs= ! for deplib in $dependency_libs; do ! newdependency_libs="$deplib $newdependency_libs" ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac ! tmp_libs="$tmp_libs $deplib" ! done ! if test $link_all_deplibs != no; then ! # Add the search paths of all dependency libraries ! for deplib in $dependency_libs; do ! case $deplib in ! -L*) path="$deplib" ;; ! *.la) ! dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` ! test "X$dir" = "X$deplib" && dir="." ! # We need an absolute path. ! case $dir in ! [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; ! *) ! absdir=`cd "$dir" && pwd` ! if test -z "$absdir"; then ! $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 ! absdir="$dir" ! fi ! ;; ! esac ! if grep "^installed=no" $deplib > /dev/null; then ! path="-L$absdir/$objdir" ! else ! eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ! if test -z "$libdir"; then ! $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 ! exit 1 ! fi ! if test "$absdir" != "$libdir"; then ! $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 ! fi ! path="-L$absdir" ! fi ! ;; ! *) continue ;; ! esac ! case " $deplibs " in ! *" $path "*) ;; ! *) deplibs="$deplibs $path" ;; ! esac ! done ! fi # link_all_deplibs != no ! fi # linkmode = lib ! done # for deplib in $libs ! if test $pass = dlpreopen; then ! # Link the dlpreopened libraries before other libraries ! for deplib in $save_deplibs; do ! deplibs="$deplib $deplibs" ! done fi + if test $pass != dlopen; then + test $pass != scan && dependency_libs="$newdependency_libs" + if test $pass != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi ! if test "$linkmode,$pass" != "prog,link"; then ! vars="deplibs" ! else ! vars="compile_deplibs finalize_deplibs" ! fi ! for var in $vars dependency_libs; do ! # Add libraries to $var in reverse order ! eval tmp_libs=\"\$$var\" ! new_libs= ! for deplib in $tmp_libs; do ! case $deplib in ! -L*) new_libs="$deplib $new_libs" ;; ! *) ! case " $specialdeplibs " in ! *" $deplib "*) new_libs="$deplib $new_libs" ;; ! *) ! case " $new_libs " in ! *" $deplib "*) ;; ! *) new_libs="$deplib $new_libs" ;; ! esac ! ;; ! esac ! ;; ! esac ! done ! tmp_libs= ! for deplib in $new_libs; do ! case $deplib in ! -L*) ! case " $tmp_libs " in ! *" $deplib "*) ;; ! *) tmp_libs="$tmp_libs $deplib" ;; ! esac ! ;; ! *) tmp_libs="$tmp_libs $deplib" ;; ! esac ! done ! eval $var=\"$tmp_libs\" ! done # for var fi + if test "$pass" = "conv" && + { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then + libs="$deplibs" # reset libs + deplibs= + fi + done # for pass + if test $linkmode = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + case $linkmode in + oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi *************** *** 1566,1576 **** # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" ;; ! *.la) # Make sure we only generate libraries of the form `libNAME.la'. ! case "$outputname" in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval libname=\"$libname_spec\" --- 2107,2118 ---- # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" + objs="$objs$old_deplibs" ;; ! lib) # Make sure we only generate libraries of the form `libNAME.la'. ! case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval libname=\"$libname_spec\" *************** *** 1589,1616 **** libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; ! esac ! ! output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` ! if test "X$output_objdir" = "X$output"; then ! output_objdir="$objdir" ! else ! output_objdir="$output_objdir/$objdir" ! fi if test -n "$objs"; then ! $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 ! exit 1 ! fi ! ! # How the heck are we supposed to write a wrapper for a shared library? ! if test -n "$link_against_libtool_libs"; then ! $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 ! exit 1 fi ! if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then ! $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 fi set dummy $rpath --- 2131,2152 ---- libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; ! esac if test -n "$objs"; then ! if test "$deplibs_check_method" != pass_all; then ! $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 ! exit 1 ! else ! echo ! echo "*** Warning: Linking the shared library $output against the non-libtool" ! echo "*** objects $objs is not portable!" ! libobjs="$libobjs $objs" ! fi fi ! if test "$dlself" != no; then ! $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath *************** *** 1628,1634 **** build_libtool_libs=convenience build_old_libs=yes fi - dependency_libs="$deplibs" if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 --- 2164,2169 ---- *************** *** 1655,1662 **** 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 --- 2190,2197 ---- age="$4" # Check that each of the things are valid numbers. ! case $current in ! 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 *************** *** 1664,1671 **** ;; 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 --- 2199,2206 ---- ;; esac ! case $revision in ! 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 *************** *** 1673,1680 **** ;; 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 --- 2208,2215 ---- ;; esac ! case $age in ! 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 *************** *** 1692,1703 **** major= versuffix= verstring= ! case "$version_type" in none) ;; irix) major=`expr $current - $age + 1` - versuffix="$major.$revision" verstring="sgi$major.$revision" # Add in all the interfaces that we are compatible with. --- 2227,2257 ---- major= versuffix= verstring= ! case $version_type in none) ;; + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + irix) major=`expr $current - $age + 1` verstring="sgi$major.$revision" # Add in all the interfaces that we are compatible with. *************** *** 1707,1712 **** --- 2261,2270 ---- loop=`expr $loop - 1` verstring="sgi$major.$iface:$verstring" done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" ;; linux) *************** *** 1736,1756 **** versuffix=".$current.$revision" ;; - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - windows) ! # Like Linux, but with '-' rather than '.', since we only ! # want one extension on Windows 95. major=`expr $current - $age` ! versuffix="-$major-$age-$revision" ;; *) --- 2294,2304 ---- versuffix=".$current.$revision" ;; windows) ! # Use '-' rather than '.', since we only want one ! # extension on DOS 8.3 filesystems. major=`expr $current - $age` ! versuffix="-$major" ;; *) *************** *** 1777,1783 **** versuffix= verstring="" fi ! # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then --- 2325,2331 ---- versuffix= verstring="" fi ! # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then *************** *** 1789,1822 **** # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi - - dependency_libs="$deplibs" - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody*) - # rhapsody is a little odd... - deplibs="$deplibs -framework System" - ;; - *) - # Add libc to deplibs on all other systems. - deplibs="$deplibs -lc" - ;; - esac fi ! # Create the output directory, or remove our outputs if we need to. ! if test -d $output_objdir; then $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* - else - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status - fi fi # Now set the variables for building old libraries. --- 2337,2348 ---- # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi ! if test "$mode" != relink; then ! # Remove our outputs. $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* fi # Now set the variables for building old libraries. *************** *** 1827,1833 **** --- 2353,2422 ---- oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi + # Eliminate all temporary directories. + for path in $notinst_path; do + lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` + deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` + dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` + done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test $hardcode_into_libs != yes || test $build_old_libs = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test $build_libtool_need_lc = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname *************** *** 1842,1848 **** major="" newdeplibs= droppeddeps=no ! case "$deplibs_check_method" in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check --- 2431,2437 ---- major="" newdeplibs= droppeddeps=no ! case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check *************** *** 1867,1873 **** for i in $deplibs; do name="`expr $i : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. ! if test "$name" != "" ; then libname=`eval \\$echo \"$libname_spec\"` deplib_matches=`eval \\$echo \"$library_names_spec\"` set dummy $deplib_matches --- 2456,2462 ---- for i in $deplibs; do name="`expr $i : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. ! if test -n "$name" && test "$name" != "0"; then libname=`eval \\$echo \"$libname_spec\"` deplib_matches=`eval \\$echo \"$library_names_spec\"` set dummy $deplib_matches *************** *** 1892,1898 **** for i in $deplibs; do name="`expr $i : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. ! if test "$name" != "" ; then $rm conftest $CC -o conftest conftest.c $i # Did it work? --- 2481,2487 ---- for i in $deplibs; do name="`expr $i : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. ! if test -n "$name" && test "$name" != "0"; then $rm conftest $CC -o conftest conftest.c $i # Did it work? *************** *** 1928,1946 **** ;; file_magic*) set dummy $deplibs_check_method ! file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`" for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. ! if test "$name" != "" ; then libname=`eval \\$echo \"$libname_spec\"` ! for i in $lib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then ! continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. --- 2517,2535 ---- ;; file_magic*) set dummy $deplibs_check_method ! file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. ! if test -n "$name" && test "$name" != "0"; then libname=`eval \\$echo \"$libname_spec\"` ! for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then ! continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. *************** *** 1950,1956 **** potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | sed 's/.* -> //'` ! case "$potliblink" in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac --- 2539,2545 ---- potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | sed 's/.* -> //'` ! case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac *************** *** 1978,1983 **** --- 2567,2606 ---- fi done # Gone through all deplibs. ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name="`expr $a_deplib : '-l\(.*\)'`" + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + if eval echo \"$potent_lib\" 2>/dev/null \ + | sed 10q \ + | egrep "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + echo "*** Warning: This library needs some functionality provided by $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; none | unknown | *) newdeplibs="" if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ *************** *** 2000,2005 **** --- 2623,2635 ---- libname=$libname_save name=$name_save + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + if test "$droppeddeps" = yes; then if test "$module" = yes; then echo *************** *** 2025,2030 **** --- 2655,2675 ---- echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." + + if test $allow_undefined = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi fi fi # Done checking deplibs! *************** *** 2035,2043 **** library_names= old_library= dlname= ! # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Get the real and link names of the library. eval library_names=\"$library_names_spec\" set dummy $library_names --- 2680,2743 ---- library_names= old_library= dlname= ! # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + if test $hardcode_into_libs = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + 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 + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + 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 + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + # Get the real and link names of the library. eval library_names=\"$library_names_spec\" set dummy $library_names *************** *** 2049,2054 **** --- 2749,2755 ---- else soname="$realname" fi + test -z "$dlname" && dlname=$soname lib="$output_objdir/$realname" for link *************** *** 2120,2126 **** for xlib in $convenience; do # Extract the objects. ! case "$xlib" in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac --- 2821,2827 ---- for xlib in $convenience; do # Extract the objects. ! case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac *************** *** 2145,2151 **** if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" ! linkopts="$linkopts $flag" fi # Do each of the archive commands. --- 2846,2857 ---- if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" ! linker_flags="$linker_flags $flag" ! fi ! ! # Make a backup of the uninstalled library when relinking ! if test "$mode" = relink; then ! $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. *************** *** 2162,2167 **** --- 2868,2879 ---- done IFS="$save_ifs" + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + exit 0 + fi + # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then *************** *** 2178,2189 **** fi ;; ! *.lo | *.o | *.obj) ! if test -n "$link_against_libtool_libs"; then ! $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 ! exit 1 ! fi ! if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi --- 2890,2896 ---- fi ;; ! obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi *************** *** 2208,2216 **** $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi ! case "$output" in *.lo) ! if test -n "$objs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit 1 fi --- 2915,2923 ---- $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi ! case $output in *.lo) ! if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit 1 fi *************** *** 2234,2240 **** gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec ! wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then --- 2941,2947 ---- gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec ! wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then *************** *** 2253,2259 **** for xlib in $convenience; do # Extract the objects. ! case "$xlib" in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac --- 2960,2966 ---- for xlib in $convenience; do # Extract the objects. ! case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac *************** *** 2277,2283 **** fi # Create the old-style object. ! reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" output="$obj" eval cmds=\"$reload_cmds\" --- 2984,2990 ---- fi # Create the old-style object. ! reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" eval cmds=\"$reload_cmds\" *************** *** 2312,2318 **** exit 0 fi ! if test -n "$pic_flag"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" --- 3019,3025 ---- exit 0 fi ! if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" *************** *** 2348,2355 **** exit 0 ;; ! # Anything else should be a program. ! *) if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi --- 3055,3064 ---- exit 0 ;; ! prog) ! case $host in ! *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; ! esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi *************** *** 2359,2378 **** fi if test "$preload" = yes; then ! if test "$dlopen" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." ! fi fi ! if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. - case "$compile_rpath " in - *" $libdir "*) ;; - *) compile_rpath="$compile_rpath $libdir" ;; - esac case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; --- 3068,3094 ---- fi if test "$preload" = yes; then ! if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." ! fi fi ! ! case $host in ! *-*-rhapsody* | *-*-darwin1.[012]) ! # On Rhapsody replace the C library is the System framework ! compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ! finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ! ;; ! esac ! ! compile_command="$compile_command $compile_deplibs" ! finalize_command="$finalize_command $finalize_deplibs" ! if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; *************** *** 2390,2396 **** hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. ! case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) --- 3106,3112 ---- hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. ! case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) *************** *** 2408,2413 **** --- 3124,3137 ---- *) perm_rpath="$perm_rpath $libdir" ;; esac fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + ;; + esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && *************** *** 2426,2432 **** hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. ! case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) --- 3150,3156 ---- hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. ! case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) *************** *** 2453,2475 **** fi finalize_rpath="$rpath" - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - - # Create the binary in the object directory, then wrap it. - if test ! -d $output_objdir; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status - fi - fi - if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` --- 3177,3182 ---- *************** *** 2486,2492 **** fi if test -n "$dlsyms"; then ! case "$dlsyms" in "") ;; *.c) # Discover the nlist of each of the dlfiles. --- 3193,3199 ---- fi if test -n "$dlsyms"; then ! case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. *************** *** 2518,2524 **** test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. ! progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" --- 3225,3231 ---- test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. ! progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" *************** *** 2528,2534 **** $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi ! if test -n "$export_symbols_regex"; then $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' --- 3235,3241 ---- $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi ! if test -n "$export_symbols_regex"; then $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' *************** *** 2617,2629 **** fi pic_flag_for_symtable= ! case "$host" in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. ! *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; --- 3324,3336 ---- fi pic_flag_for_symtable= ! case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. ! *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; *************** *** 2662,2668 **** finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi ! if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" --- 3369,3375 ---- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi ! if test $need_relink = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" *************** *** 2671,2677 **** $show "$link_command" $run eval "$link_command" status=$? ! # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" --- 3378,3384 ---- $show "$link_command" $run eval "$link_command" status=$? ! # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" *************** *** 2685,2691 **** # We should set the shlibpath_var rpath= for dir in $temp_rpath; do ! case "$dir" in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" --- 3392,3398 ---- # We should set the shlibpath_var rpath= for dir in $temp_rpath; do ! case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" *************** *** 2727,2737 **** fi fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" ! $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else --- 3434,3457 ---- fi fi + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit 0 + fi + if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" ! $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else *************** *** 2751,2757 **** # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` ! # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname --- 3471,3477 ---- # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` ! # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname *************** *** 2763,2774 **** # Quote the relink command for shipping. if test -n "$relink_command"; then relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then ! case "$0" in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac --- 3483,3506 ---- # Quote the relink command for shipping. if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="cd `pwd`; $relink_command" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then ! case $0 in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac *************** *** 2784,2789 **** --- 3516,3526 ---- case $output in *.exe) output=`echo $output|sed 's,.exe$,,'` ;; esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) exeext=.exe ;; + *) exeext= ;; + esac $rm $output trap "$rm $output; exit 1" 1 2 15 *************** *** 2813,2819 **** # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: ! link_against_libtool_libs='$link_against_libtool_libs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then --- 3550,3556 ---- # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: ! notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then *************** *** 2846,2852 **** # 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 --- 3583,3589 ---- # 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 *************** *** 2862,2870 **** if test "$fast_install" = yes; then echo >> $output "\ ! program=lt-'$outputname' progdir=\"\$thisdir/$objdir\" ! if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then --- 3599,3607 ---- if test "$fast_install" = yes; then echo >> $output "\ ! program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" ! if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then *************** *** 2881,2887 **** # relink executable if necessary if test -n \"\$relink_command\"; then ! if (cd \"\$thisdir\" && eval \$relink_command); then : else $rm \"\$progdir/\$file\" exit 1 --- 3618,3624 ---- # relink executable if necessary if test -n \"\$relink_command\"; then ! if (eval \$relink_command); then : else $rm \"\$progdir/\$file\" exit 1 *************** *** 2931,2939 **** # Run the actual program with our arguments. " case $host in ! # win32 systems need to use the prog path for dll ! # lookup to work ! *-*-cygwin*) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " --- 3668,3676 ---- # Run the actual program with our arguments. " case $host in ! # win32 systems need to use the prog path for dll ! # lookup to work ! *-*-cygwin* | *-*-pw32*) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " *************** *** 2987,2993 **** oldobjs="$libobjs_save" build_libtool_libs=no else ! oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` fi addlibs="$old_convenience" fi --- 3724,3730 ---- oldobjs="$libobjs_save" build_libtool_libs=no else ! oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` fi addlibs="$old_convenience" fi *************** *** 3003,3013 **** exit $status fi generated="$generated $gentop" ! # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. ! case "$xlib" in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac --- 3740,3750 ---- exit $status fi generated="$generated $gentop" ! # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. ! case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac *************** *** 3068,3086 **** fi # Now create the libtool archive. ! case "$output" in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" ! if test -n "$xrpath"; then ! temp_xrpath= ! for libdir in $xrpath; do ! temp_xrpath="$temp_xrpath -R$libdir" ! done ! dependency_libs="$temp_xrpath $dependency_libs" ! fi # Only create the output if not a dry run. if test -z "$run"; then --- 3805,3830 ---- fi # Now create the libtool archive. ! case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" ! # Preserve any variables that may affect compiler behavior ! for var in $variables_saved_for_relink; do ! if eval test -z \"\${$var+set}\"; then ! relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" ! elif eval var_value=\$$var; test -z "$var_value"; then ! relink_command="$var=; export $var; $relink_command" ! else ! var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` ! relink_command="$var=\"$var_value\"; export $var; $relink_command" ! fi ! done ! # Quote the link command for shipping. ! relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" ! relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` # Only create the output if not a dry run. if test -z "$run"; then *************** *** 3090,3097 **** --- 3834,3885 ---- break fi output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" fi $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP *************** *** 3100,3106 **** # It is necessary for linking the library. # The name that we can dlopen(3). ! dlname='$dlname' # Names of this library. library_names='$library_names' --- 3888,3894 ---- # It is necessary for linking the library. # The name that we can dlopen(3). ! dlname='$tdlname' # Names of this library. library_names='$library_names' *************** *** 3119,3134 **** # Is this an already installed library? installed=$installed # Directory that this library needs to be installed in: ! libdir='$install_libdir'\ ! " done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" ! $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? ;; esac exit 0 --- 3907,3929 ---- # Is this an already installed library? installed=$installed + # Files to dlopen/dlpreopen + dlopen='$dlfiles' + dlpreopen='$dlprefiles' + # Directory that this library needs to be installed in: ! libdir='$install_libdir'" ! if test "$installed" = no && test $need_relink = yes; then ! $echo >> $output "\ ! relink_command=\"$relink_command\"" ! fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" ! $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit 0 *************** *** 3140,3149 **** # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). ! if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` ! case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; --- 3935,3946 ---- # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). ! if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || ! # Allow the use of GNU shtool's install command. ! $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` ! case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; *************** *** 3159,3165 **** # 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\"" ;; --- 3956,3962 ---- # 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\"" ;; *************** *** 3182,3188 **** continue fi ! case "$arg" in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; --- 3979,3985 ---- continue fi ! case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; *************** *** 3207,3213 **** # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` ! case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; --- 4004,4010 ---- # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` ! case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; *************** *** 3258,3268 **** 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 --- 4055,4065 ---- 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 *************** *** 3284,3291 **** for file in $files; do # Do each installation. ! case "$file" in ! *.a | *.lib) # Do the static libraries later. staticlibs="$staticlibs $file" ;; --- 4081,4088 ---- for file in $files; do # Do each installation. ! case $file in ! *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *************** *** 3301,3308 **** library_names= old_library= # If there is no directory component, then add one. ! case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac --- 4098,4106 ---- library_names= old_library= + relink_command= # If there is no directory component, then add one. ! case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac *************** *** 3321,3330 **** 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 --- 4119,4138 ---- esac fi ! dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" + if test -n "$relink_command"; then + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + continue + fi + fi + # See the names of the shared library. set dummy $library_names if test -n "$2"; then *************** *** 3332,3340 **** 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 $? if test $# -gt 0; then # Delete the old symlinks, and create new ones. --- 4140,4155 ---- shift shift + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + # Install the shared library and build the symlinks. ! $show "$install_prog $dir/$srcname $destdir/$realname" ! $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? ! if test -n "$stripme" && test -n "$striplib"; then ! $show "$striplib $destdir/$realname" ! $run eval "$striplib $destdir/$realname" || exit $? ! fi if test $# -gt 0; then # Delete the old symlinks, and create new ones. *************** *** 3381,3391 **** fi # Deduce the name of the destination old-style object file. ! case "$destfile" in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; ! *.o | *.obj) staticdest="$destfile" destfile= ;; --- 4196,4206 ---- fi # Deduce the name of the destination old-style object file. ! case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; ! *.$objext) staticdest="$destfile" destfile= ;; *************** *** 3424,3462 **** # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then ! link_against_libtool_libs= relink_command= # If there is no directory component, then add one. ! case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac # Check the variables that should have been set. ! if test -z "$link_against_libtool_libs"; then $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 exit 1 fi finalize=yes ! for lib in $link_against_libtool_libs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. ! case "$lib" in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi ! libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then --- 4239,4284 ---- # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then ! notinst_deplibs= relink_command= # If there is no directory component, then add one. ! case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Check the variables that should have been set. ! if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 exit 1 fi finalize=yes ! for lib in $notinst_deplibs; 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'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then *************** *** 3468,3473 **** --- 4290,4296 ---- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi + file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` *************** *** 3489,3494 **** --- 4312,4334 ---- fi fi + # remove .exe since cygwin /usr/bin/install will append another + # one anyways + case $install_prog,$host in + /usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`echo $destfile | sed -e 's,.exe$,,'` + ;; + esac + ;; + esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" *************** *** 3505,3510 **** --- 4345,4355 ---- $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' *************** *** 3565,3571 **** fi # Exit here if they wanted silent mode. ! test "$show" = : && exit 0 echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" --- 4410,4416 ---- fi # Exit here if they wanted silent mode. ! test "$show" = ":" && exit 0 echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" *************** *** 3575,3581 **** echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" ! echo "specify the full pathname of the library, or use \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" --- 4420,4426 ---- echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" ! echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" *************** *** 3625,3631 **** fi dir= ! case "$file" in *.la) # Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : --- 4470,4476 ---- fi dir= ! case $file in *.la) # Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : *************** *** 3640,3646 **** library_names= # If there is no directory component, then add one. ! case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac --- 4485,4491 ---- library_names= # If there is no directory component, then add one. ! case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac *************** *** 3695,3707 **** 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 .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. ! case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac --- 4540,4552 ---- 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 .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. ! case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac *************** *** 3718,3725 **** if test -z "$run"; then if test -n "$shlibpath_var"; then ! # Export the shlibpath_var. ! eval "export $shlibpath_var" fi # Restore saved enviroment variables --- 4563,4570 ---- if test -z "$run"; then if test -n "$shlibpath_var"; then ! # Export the shlibpath_var. ! eval "export $shlibpath_var" fi # Restore saved enviroment variables *************** *** 3738,3760 **** else # Display what would be done. if test -n "$shlibpath_var"; then ! eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" ! $echo "export $shlibpath_var" fi $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 --- 4583,4612 ---- else # Display what would be done. if test -n "$shlibpath_var"; then ! eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" ! $echo "export $shlibpath_var" fi $echo "$cmd$args" exit 0 fi ;; ! # libtool clean and uninstall mode ! clean | uninstall) ! modename="$modename: $mode" rm="$nonopt" files= + rmforce= + exit_status=0 + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + for arg do ! case $arg in ! -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac *************** *** 3766,3779 **** 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 .*$PACKAGE") >/dev/null 2>&1; then --- 4618,4659 ---- exit 1 fi + rmdirs= + for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` ! if test "X$dir" = "X$file"; then ! dir=. ! objdir="$objdir" ! else ! objdir="$dir/$objdir" ! fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test $mode = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test $mode = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi rmfiles="$file" ! case $name in *.la) # Possibly a libtool archive, so verify it. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then *************** *** 3781,3818 **** # Delete the libtool libraries and symlinks. for n in $library_names; do ! rmfiles="$rmfiles $dir/$n" done ! 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. ! eval cmds=\"$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. ! eval cmds=\"$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 ;; --- 4661,4703 ---- # Delete the libtool libraries and symlinks. for n in $library_names; do ! rmfiles="$rmfiles $objdir/$n" done ! test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" ! test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ! if test $mode = uninstall; then ! if test -n "$library_names"; then ! # Do each command in the postuninstall commands. ! eval cmds=\"$postuninstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" ! if test $? != 0 && test "$rmforce" != yes; then ! exit_status=1 ! fi ! done IFS="$save_ifs" ! fi ! if test -n "$old_library"; then ! # Do each command in the old_postuninstall commands. ! eval cmds=\"$old_postuninstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' ! for cmd in $cmds; do ! IFS="$save_ifs" ! $show "$cmd" ! $run eval "$cmd" ! if test $? != 0 && test "$rmforce" != yes; then ! exit_status=1 ! fi ! done IFS="$save_ifs" ! fi ! # FIXME: should reinstall the best remaining shared library. fi fi ;; *************** *** 3821,3837 **** oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` rmfiles="$rmfiles $dir/$oldobj" fi - $show "$rm $rmfiles" - $run $rm $rmfiles ;; *) ! $show "$rm $rmfiles" ! $run $rm $rmfiles ;; esac done ! exit 0 ;; "") --- 4706,4740 ---- oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` rmfiles="$rmfiles $dir/$oldobj" fi ;; *) ! # Do a test to see if this is a libtool program. ! if test $mode = clean && ! (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then ! relink_command= ! . $dir/$file ! ! rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" ! if test "$fast_install" = yes && test -n "$relink_command"; then ! rmfiles="$rmfiles $objdir/lt-$name" ! fi ! fi ;; esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 done ! ! # Try to remove the ${objdir}s in the directories where we deleted files ! for dir in $rmdirs; do ! if test -d "$dir"; then ! $show "rmdir $dir" ! $run rmdir $dir >/dev/null 2>&1 ! fi ! done ! ! exit $exit_status ;; "") *************** *** 3847,3853 **** fi # test -z "$show_help" # We need to display help for each of the modes. ! case "$mode" in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... --- 4750,4756 ---- fi # test -z "$show_help" # We need to display help for each of the modes. ! case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... *************** *** 3866,3871 **** --- 4769,4775 ---- MODE must be one of the following: + clean remove files from the build directory 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 *************** *** 3878,3883 **** --- 4782,4801 ---- exit 0 ;; + clean) + $echo \ + "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + + Remove files from the build 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, object or program, all the files associated + with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE *************** *** 3887,3892 **** --- 4805,4812 ---- This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file *************** *** 3966,3971 **** --- 4886,4893 ---- -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable -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 Index: libtool/demo/Makefile.am diff -c libtool/demo/Makefile.am:1.14.2.8 libtool/demo/Makefile.am:1.23 *** libtool/demo/Makefile.am:1.14.2.8 Sun Apr 25 01:35:26 1999 --- libtool/demo/Makefile.am Sun Apr 22 16:21:58 2001 *************** *** 120,126 **** # If this one passes with pass_all, it is likely that pass_all works EXTRA_LIBRARIES = libhell0.a libhell0_a_SOURCES = hello.c foo.c ! EXTRA_LTLIBRARIES += libhell1.la libhell2.la libhell1_la_SOURCES = hell1.c libhell1_la_LIBADD = -L. -lhell0 libhell1_la_LDFLAGS = -rpath $(libdir) --- 120,126 ---- # If this one passes with pass_all, it is likely that pass_all works EXTRA_LIBRARIES = libhell0.a libhell0_a_SOURCES = hello.c foo.c ! EXTRA_LTLIBRARIES = libhell1.la libhell2.la libhell1_la_SOURCES = hell1.c libhell1_la_LIBADD = -L. -lhell0 libhell1_la_LDFLAGS = -rpath $(libdir) *************** *** 129,135 **** libhell2_la_LIBADD = -L. -lhell0 libhell2_la_LDFLAGS = -rpath $(libdir) libhell2_la_DEPENDENCIES = libhell0.a ! EXTRA_PROGRAMS += hell0 hell0_SOURCES = main.c hell0_LDADD = libhell1.la libhell2.la $(LIBM) --- 129,135 ---- libhell2_la_LIBADD = -L. -lhell0 libhell2_la_LDFLAGS = -rpath $(libdir) libhell2_la_DEPENDENCIES = libhell0.a ! EXTRA_PROGRAMS = hell0 hell0_SOURCES = main.c hell0_LDADD = libhell1.la libhell2.la $(LIBM) Index: libtool/demo/configure.in diff -c libtool/demo/configure.in:1.13.2.2 libtool/demo/configure.in:1.17 *** libtool/demo/configure.in:1.13.2.2 Tue Mar 30 11:25:35 1999 --- libtool/demo/configure.in Wed Sep 20 17:10:41 2000 *************** *** 10,16 **** AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) ! if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then STATIC=-static else STATIC= --- 10,16 ---- AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) ! if ./libtool --features | grep '^enable static libraries$' > /dev/null 2>&1; then STATIC=-static else STATIC= Index: libtool/depdemo/Makefile.am diff -c /dev/null libtool/depdemo/Makefile.am:1.9 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/Makefile.am Fri Mar 19 16:27:10 1999 *************** *** 0 **** --- 1,24 ---- + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = no-dependencies foreign + + SUBDIRS = l1 l2 l3 l4 + + EXTRA_DIST = sysdep.h + + bin_PROGRAMS = depdemo depdemo.static + + depdemo_SOURCES = main.c + depdemo_LDADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la \ + $(top_builddir)/l4/libl4.la + depdemo_DEPENDENCIES = $(top_builddir)/l1/libl1.la \ + $(top_builddir)/l2/libl2.la $(top_builddir)/l4/libl4.la + + depdemo_static_SOURCES = $(depdemo_SOURCES) + depdemo_static_LDADD = $(depdemo_LDADD) + depdemo_static_DEPENDENCIES = $(depdemo_DEPENDENCIES) + depdemo_static_LDFLAGS = $(STATIC) + + $(OBJECTS): libtool + libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status --recheck Index: libtool/depdemo/README diff -c /dev/null libtool/depdemo/README:1.2 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/README Sun May 23 03:03:23 1999 *************** *** 0 **** --- 1,11 ---- + This is depdemo, an example package that uses GNU libtool with an + Automake-generated environment to build many interdependent libraries + and a test program. + + There are four libraries: l1, l2, l3 and l4. + l1 depends on nothing. + l2 depends on l1. + l3 depends on l1 and l2. + l4 depends on l3 and libm. + + The test program uses l1, l2 and l4. Index: libtool/depdemo/configure.in diff -c /dev/null libtool/depdemo/configure.in:1.11 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/configure.in Tue Mar 30 11:22:29 1999 *************** *** 0 **** --- 1,30 ---- + dnl Process this file with autoconf to create configure. + + AC_INIT(main.c) + AM_INIT_AUTOMAKE(depdemo,0.1) + + AC_PROG_CC + AC_EXEEXT + AM_PROG_LIBTOOL + AC_SUBST(LIBTOOL_DEPS) + + if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then + STATIC=-static + else + STATIC= + fi + AC_SUBST(STATIC) + + AC_CHECK_HEADERS(math.h) + + AC_CHECK_LIBM + AC_SUBST(LIBM) + + dnl Output the makefile + AC_OUTPUT( + Makefile + l1/Makefile + l2/Makefile + l3/Makefile + l4/Makefile + ) Index: libtool/depdemo/main.c diff -c /dev/null libtool/depdemo/main.c:1.9 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/main.c Tue Sep 5 05:54:02 2000 *************** *** 0 **** --- 1,42 ---- + /* main.c -- inter-library dependency test program + Copyright (C) 1998, 1999, 2000 Free Software Foundation + by Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "l1/l1.h" + #include "l2/l2.h" + #include "l4/l4.h" + #include + #include + + int + main (argc,argv) + int argc; + char **argv; + { + printf("dependencies:\n"); + func_l1(0); + func_l2(0); + func_l4(0); + if (argc == 2 && strcmp (argv[1], "-alt") == 0 + && var_l1 + var_l2 + var_l4 == 8) + return 0; + if (var_l1 + var_l2 + var_l4 != 20) + return 1; + return 0; + } Index: libtool/depdemo/sysdep.h diff -c /dev/null libtool/depdemo/sysdep.h:1.6 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/sysdep.h Wed Jan 19 12:34:36 2000 *************** *** 0 **** --- 1,47 ---- + /* sysdep.h -- system dependent declarations + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + /* Only include this header file once. */ + #ifndef _SYSDEP_H_ + #define _SYSDEP_H_ 1 + + /* __BEGIN_DECLS should be used at the beginning of your declarations, + so that C++ compilers don't mangle their names. Use __END_DECLS at + the end of C declarations. */ + #undef __BEGIN_DECLS + #undef __END_DECLS + #ifdef __cplusplus + # define __BEGIN_DECLS extern "C" { + # define __END_DECLS } + #else + # define __BEGIN_DECLS /* empty */ + # define __END_DECLS /* empty */ + #endif + + /* __P is a macro used to wrap function prototypes, so that compilers + that don't understand ANSI C prototypes still work, and ANSI C + compilers can issue warnings about type mismatches. */ + #undef __P + #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) + # define __P(protos) protos + #else + # define __P(protos) () + #endif + + #endif /* !_SYSDEP_H_ */ Index: libtool/depdemo/l1/.cvsignore diff -c /dev/null libtool/depdemo/l1/.cvsignore:1.1 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/l1/.cvsignore Tue Mar 16 23:06:47 1999 *************** *** 0 **** --- 1,6 ---- + .deps + .libs + Makefile + Makefile.in + *.lo + *.la Index: libtool/depdemo/l1/Makefile.am diff -c /dev/null libtool/depdemo/l1/Makefile.am:1.4 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/l1/Makefile.am Fri Apr 2 01:37:03 1999 *************** *** 0 **** --- 1,8 ---- + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = no-dependencies foreign + + INCLUDES = -I$(top_srcdir) + + lib_LTLIBRARIES = libl1.la + libl1_la_SOURCES = l1.c l1.h Index: libtool/depdemo/l1/l1.c diff -c /dev/null libtool/depdemo/l1/l1.c:1.7 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/l1/l1.c Wed Jan 19 12:34:36 2000 *************** *** 0 **** --- 1,36 ---- + /* l1.c -- trivial test library + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "l1/l1.h" + #include + + int var_l1 = 0; + + int + func_l1(indent) + int indent; + { + int i; + + for (i = 0; i < indent; i++) + putchar(' '); + printf("l1 (%i)\n", var_l1); + var_l1++; + return 0; + } Index: libtool/depdemo/l1/l1.h diff -c /dev/null libtool/depdemo/l1/l1.h:1.5 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/l1/l1.h Wed Jan 19 12:34:37 2000 *************** *** 0 **** --- 1,31 ---- + /* l1.h -- interface to a trivial library + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + /* Only include this header file once. */ + #ifndef _L1_H_ + #define _L1_H_ 1 + + #include "sysdep.h" + + __BEGIN_DECLS + extern int var_l1; + int func_l1 __P((int)); + __END_DECLS + + #endif /* !_L1_H_ */ Index: libtool/depdemo/l2/.cvsignore diff -c /dev/null libtool/depdemo/l2/.cvsignore:1.1 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/l2/.cvsignore Tue Mar 16 23:06:54 1999 *************** *** 0 **** --- 1,6 ---- + .deps + .libs + Makefile + Makefile.in + *.lo + *.la Index: libtool/depdemo/l2/Makefile.am diff -c /dev/null libtool/depdemo/l2/Makefile.am:1.4 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/l2/Makefile.am Fri Apr 2 01:37:07 1999 *************** *** 0 **** --- 1,9 ---- + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = no-dependencies foreign + + INCLUDES = -I$(top_srcdir) + + lib_LTLIBRARIES = libl2.la + libl2_la_SOURCES = l2.c l2.h + libl2_la_LIBADD = $(top_builddir)/l1/libl1.la Index: libtool/depdemo/l2/l2.c diff -c /dev/null libtool/depdemo/l2/l2.c:1.7 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/l2/l2.c Wed Jan 19 12:34:37 2000 *************** *** 0 **** --- 1,39 ---- + /* l2.c -- trivial test library + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "l2/l2.h" + + #include "l1/l1.h" + #include + + int var_l2 = 0; + + int + func_l2(indent) + int indent; + { + int i; + + for (i = 0; i < indent; i++) + putchar(' '); + printf("l2 (%i)\n", var_l2); + func_l1(indent+1); + var_l2 += var_l1; + return 0; + } Index: libtool/depdemo/l2/l2.h diff -c /dev/null libtool/depdemo/l2/l2.h:1.5 *** /dev/null Tue Apr 24 17:25:30 2001 --- libtool/depdemo/l2/l2.h Wed Jan 19 12:34:37 2000 *************** *** 0 **** --- 1,31 ---- + /* l2.h -- interface to a trivial library + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + /* Only include this header file once. */ + #ifndef _L2_H_ + #define _L2_H_ 1 + + #include "sysdep.h" + + __BEGIN_DECLS + extern int var_l2; + int func_l2 __P((int)); + __END_DECLS + + #endif /* !_L2_H_ */ Index: libtool/depdemo/l3/.cvsignore diff -c /dev/null libtool/depdemo/l3/.cvsignore:1.1 *** /dev/null Tue Apr 24 17:25:59 2001 --- libtool/depdemo/l3/.cvsignore Tue Mar 16 23:07:00 1999 *************** *** 0 **** --- 1,6 ---- + .deps + .libs + Makefile + Makefile.in + *.lo + *.la Index: libtool/depdemo/l3/Makefile.am diff -c /dev/null libtool/depdemo/l3/Makefile.am:1.5 *** /dev/null Tue Apr 24 17:25:59 2001 --- libtool/depdemo/l3/Makefile.am Fri Jul 2 16:19:20 1999 *************** *** 0 **** --- 1,11 ---- + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = no-dependencies foreign + + INCLUDES = -I$(top_srcdir) + + extradir = $(libdir)/extra + + extra_LTLIBRARIES = libl3.la + libl3_la_SOURCES = l3.c l3.h + libl3_la_LIBADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la Index: libtool/depdemo/l3/l3.c diff -c /dev/null libtool/depdemo/l3/l3.c:1.7 *** /dev/null Tue Apr 24 17:25:59 2001 --- libtool/depdemo/l3/l3.c Wed Jan 19 12:34:37 2000 *************** *** 0 **** --- 1,41 ---- + /* l3.c -- trivial test library + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "l3/l3.h" + + #include "l1/l1.h" + #include "l2/l2.h" + #include + + int var_l3 = 0; + + int + func_l3(indent) + int indent; + { + int i; + + for (i = 0; i < indent; i++) + putchar(' '); + printf("l3 (%i)\n", var_l3); + func_l1(indent+1); + func_l2(indent+1); + var_l3 += var_l1 + var_l2; + return 0; + } Index: libtool/depdemo/l3/l3.h diff -c /dev/null libtool/depdemo/l3/l3.h:1.5 *** /dev/null Tue Apr 24 17:25:59 2001 --- libtool/depdemo/l3/l3.h Wed Jan 19 12:34:37 2000 *************** *** 0 **** --- 1,31 ---- + /* l3.h -- interface to a trivial library + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + /* Only include this header file once. */ + #ifndef _L3_H_ + #define _L3_H_ 1 + + #include "sysdep.h" + + __BEGIN_DECLS + extern int var_l3; + int func_l3 __P((int)); + __END_DECLS + + #endif /* !_L3_H_ */ Index: libtool/depdemo/l4/.cvsignore diff -c /dev/null libtool/depdemo/l4/.cvsignore:1.1 *** /dev/null Tue Apr 24 17:25:59 2001 --- libtool/depdemo/l4/.cvsignore Tue Mar 16 23:07:04 1999 *************** *** 0 **** --- 1,6 ---- + .deps + .libs + Makefile + Makefile.in + *.lo + *.la Index: libtool/depdemo/l4/Makefile.am diff -c /dev/null libtool/depdemo/l4/Makefile.am:1.5 *** /dev/null Tue Apr 24 17:25:59 2001 --- libtool/depdemo/l4/Makefile.am Fri Apr 2 01:37:11 1999 *************** *** 0 **** --- 1,9 ---- + ## Process this file with automake to produce Makefile.in + + AUTOMAKE_OPTIONS = no-dependencies foreign + + INCLUDES = -I$(top_srcdir) + + lib_LTLIBRARIES = libl4.la + libl4_la_SOURCES = l4.c l4.h + libl4_la_LIBADD = $(top_builddir)/l3/libl3.la $(LIBM) Index: libtool/depdemo/l4/l4.c diff -c /dev/null libtool/depdemo/l4/l4.c:1.7 *** /dev/null Tue Apr 24 17:25:59 2001 --- libtool/depdemo/l4/l4.c Wed Jan 19 12:34:37 2000 *************** *** 0 **** --- 1,46 ---- + /* l4.c -- trivial test library + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include "l4/l4.h" + + #include "l3/l3.h" + #include + + #ifdef HAVE_MATH_H + #include + #endif + + int var_l4 = 0; + + int + func_l4(indent) + int indent; + { + int i; + + for (i = 0; i < indent; i++) + putchar(' '); + printf("l4 (%i)\n", var_l4); + func_l3(indent+1); + for (i = 0; i <= indent; i++) + putchar(' '); + printf("libm [sin(1.5) = %f]\n", sin(1.5)); + var_l4 += var_l3; + return 0; + } Index: libtool/depdemo/l4/l4.h diff -c /dev/null libtool/depdemo/l4/l4.h:1.5 *** /dev/null Tue Apr 24 17:25:59 2001 --- libtool/depdemo/l4/l4.h Wed Jan 19 12:34:37 2000 *************** *** 0 **** --- 1,31 ---- + /* l4.h -- interface to a trivial library + Copyright (C) 1998-1999 Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + /* Only include this header file once. */ + #ifndef _L4_H_ + #define _L4_H_ 1 + + #include "sysdep.h" + + __BEGIN_DECLS + extern int var_l4; + int func_l4 __P((int)); + __END_DECLS + + #endif /* !_L4_H_ */ Index: libtool/doc/Makefile.am diff -c libtool/doc/Makefile.am:1.1.1.6.4.1 libtool/doc/Makefile.am:1.3 *** libtool/doc/Makefile.am:1.1.1.6.4.1 Sat Mar 20 14:04:31 1999 --- libtool/doc/Makefile.am Sat Apr 7 17:29:06 2001 *************** *** 2,5 **** AUTOMAKE_OPTIONS = gnits info_TEXINFOS = libtool.texi ! libtool_TEXINFOS = PLATFORMS --- 2,5 ---- AUTOMAKE_OPTIONS = gnits info_TEXINFOS = libtool.texi ! libtool_TEXINFOS = PLATFORMS fdl.texi Index: libtool/doc/PLATFORMS diff -c libtool/doc/PLATFORMS:1.13.2.15 libtool/doc/PLATFORMS:1.42 *** libtool/doc/PLATFORMS:1.13.2.15 Tue Dec 7 13:43:23 1999 --- libtool/doc/PLATFORMS Tue Apr 24 11:07:31 2001 *************** *** 2,19 **** canonical host name compiler libtool results (tools versions) release ------------------------------------------------------- ! alpha-dec-osf4.0* gcc 1.3.3 ok ! (egcs-1.1.2) ! alpha-dec-osf4.0* cc 1.3.3 ok alpha-dec-osf3.2 gcc 0.8 ok alpha-dec-osf3.2 cc 0.8 ok alpha-dec-osf2.1 gcc 1.2f NS ! alpha*-unknown-linux-gnu gcc 1.3.3 ok (egcs-1.1.2, GNU ld 2.9.1.0.23) hppa2.0w-hp-hpux11.00 cc 1.2f ok ! hppa2.0-hp-hpux10.20 cc 1.3.4 ok ! hppa1.1-hp-hpux10.20 gcc 1.3.4 ok ! hppa1.1-hp-hpux10.20 cc 1.3.4 ok hppa1.1-hp-hpux10.10 gcc 1.2f ok hppa1.1-hp-hpux10.10 cc 1.2f ok hppa1.1-hp-hpux9.07 gcc 1.2f ok --- 2,19 ---- canonical host name compiler libtool results (tools versions) release ------------------------------------------------------- ! alpha-dec-osf5.1 cc 1.3e ok (1.910) ! alpha-dec-osf4.0f gcc 1.3e ok (1.910) ! alpha-dec-osf4.0f cc 1.3e ok (1.910) alpha-dec-osf3.2 gcc 0.8 ok alpha-dec-osf3.2 cc 0.8 ok alpha-dec-osf2.1 gcc 1.2f NS ! alpha*-unknown-linux-gnu gcc 1.3b ok (egcs-1.1.2, GNU ld 2.9.1.0.23) hppa2.0w-hp-hpux11.00 cc 1.2f ok ! hppa2.0-hp-hpux10.20 cc 1.3.2 ok ! hppa1.1-hp-hpux10.20 gcc 1.2f ok ! hppa1.1-hp-hpux10.20 cc 1.3c ok (1.821) hppa1.1-hp-hpux10.10 gcc 1.2f ok hppa1.1-hp-hpux10.10 cc 1.2f ok hppa1.1-hp-hpux9.07 gcc 1.2f ok *************** *** 23,63 **** hppa1.1-hp-hpux9.01 gcc 1.2f ok hppa1.1-hp-hpux9.01 cc 1.2f ok i*86-*-beos gcc 1.2f ok i*86-*-bsdi4.0 gcc 1.2f ok - i*86-*-bsdi4.0.1 gcc 1.2f ok i*86-*-bsdi3.1 gcc 1.2e NS i*86-*-bsdi3.0 gcc 1.2e NS i*86-*-bsdi2.1 gcc 1.2e NS ! i*86-pc-cygwin gcc 1.3.4 NS (egcs-1.1 stock b20.1 compiler) i*86-*-dguxR4.20MU01 gcc 1.2 ok ! i*86-*-freebsdelf4.0 gcc 1.2f ok ! i*86-*-freebsdelf3.1 gcc 1.2f ok i*86-*-freebsd3.0 gcc 1.2e ok ! i*86-*-freebsd2.2.8 gcc 1.2f ok ! i*86-*-freebsd2.2.6 gcc 1.3.3 ok (egcs-1.1 & gcc-2.7.2.1, native ld) i*86-*-freebsd2.1.5 gcc 0.5 ok ! i*86-*-gnu gcc 1.3.3 ok ! i*86-*-netbsd1.4 gcc 1.3 ok (egcs-1.1.1) ! i*86-*-netbsd1.3.3 gcc 1.3 ok ! (gcc-2.7.2.2) i*86-*-netbsd1.3.2 gcc 1.2e ok i*86-*-netbsd1.3I gcc 1.2e ok (egcs 1.1?) i*86-*-netbsd1.2 gcc 0.9g ok ! i*86-*-linux-gnu gcc 1.3.4 ok ! (gcc-2.95.2, GNU ld 2.9.5) i*86-*-linux-gnulibc1 gcc 1.2f ok ! i*86-*-openbsd2.4 gcc 1.2f ok ! i*86-*-solaris2.7 gcc 1.3.3 ok (egcs-1.1.2, native ld) i*86-*-solaris2.6 gcc 1.2f ok i*86-*-solaris2.5.1 gcc 1.2f ok i*86-ncr-sysv4.3.03 gcc 1.2f ok i*86-ncr-sysv4.3.03 cc 1.2e ok (cc -Hnocopyr) m68k-next-nextstep3 gcc 1.2f NS m68k-sun-sunos4.1.1 gcc 1.2f NS (gcc-2.5.7) --- 23,88 ---- hppa1.1-hp-hpux9.01 gcc 1.2f ok hppa1.1-hp-hpux9.01 cc 1.2f ok i*86-*-beos gcc 1.2f ok + i*86-*-bsdi4.0.1 gcc 1.3c ok + (gcc-2.7.2.1) i*86-*-bsdi4.0 gcc 1.2f ok i*86-*-bsdi3.1 gcc 1.2e NS i*86-*-bsdi3.0 gcc 1.2e NS i*86-*-bsdi2.1 gcc 1.2e NS ! i*86-pc-cygwin gcc 1.3b NS (egcs-1.1 stock b20.1 compiler) i*86-*-dguxR4.20MU01 gcc 1.2 ok ! i*86-*-freebsd4.3 gcc 1.3e ok (1.912) ! i*86-*-freebsdelf4.0 gcc 1.3c ok ! (egcs-1.1.2) ! i*86-*-freebsdelf3.2 gcc 1.3c ok ! (gcc-2.7.2.1) ! i*86-*-freebsdelf3.1 gcc 1.3c ok ! (gcc-2.7.2.1) ! i*86-*-freebsdelf3.0 gcc 1.3c ok i*86-*-freebsd3.0 gcc 1.2e ok ! i*86-*-freebsd2.2.8 gcc 1.3c ok ! (gcc-2.7.2.1) ! i*86-*-freebsd2.2.6 gcc 1.3b ok (egcs-1.1 & gcc-2.7.2.1, native ld) i*86-*-freebsd2.1.5 gcc 0.5 ok ! i*86-*-netbsd1.5 gcc 1.3e ok (1.901) ! (egcs-1.1.2) ! i*86-*-netbsd1.4 gcc 1.3c ok (egcs-1.1.1) ! i*86-*-netbsd1.4.3A gcc 1.3e ok (1.901) ! i*86-*-netbsd1.3.3 gcc 1.3c ok ! (gcc-2.7.2.2+myc2) i*86-*-netbsd1.3.2 gcc 1.2e ok i*86-*-netbsd1.3I gcc 1.2e ok (egcs 1.1?) i*86-*-netbsd1.2 gcc 0.9g ok ! i*86-*-linux-gnu gcc 1.3e ok (1.901) ! (Red Hat 7.0, gcc "2.96") ! i*86-*-linux-gnu gcc 1.3e ok (1.911) ! (SuSE 7.0, gcc 2.95.2) i*86-*-linux-gnulibc1 gcc 1.2f ok ! i*86-*-openbsd2.5 gcc 1.3c ok ! (gcc-2.8.1) ! i*86-*-openbsd2.4 gcc 1.3c ok ! (gcc-2.8.1) ! i*86-*-solaris2.7 gcc 1.3b ok (egcs-1.1.2, native ld) i*86-*-solaris2.6 gcc 1.2f ok i*86-*-solaris2.5.1 gcc 1.2f ok i*86-ncr-sysv4.3.03 gcc 1.2f ok i*86-ncr-sysv4.3.03 cc 1.2e ok (cc -Hnocopyr) + i*86-pc-sco3.2v5.0.5 cc 1.3c ok + i*86-pc-sco3.2v5.0.5 gcc 1.3c ok + (gcc 95q4c) + i*86-pc-sco3.2v5.0.5 gcc 1.3c ok + (egcs-1.1.2) + i*86-sco-sysv5uw7.1.1 gcc 1.3e ok (1.901) + (gcc-2.95.2, SCO linker) + i*86-UnixWare7.1.0-sysv5 cc 1.3c ok + i*86-UnixWare7.1.0-sysv5 gcc 1.3c ok + (egcs-1.1.1) m68k-next-nextstep3 gcc 1.2f NS m68k-sun-sunos4.1.1 gcc 1.2f NS (gcc-2.5.7) *************** *** 67,75 **** mips-sgi-irix6.5 gcc 1.2f ok (gcc-2.8.1) mips-sgi-irix6.4 gcc 1.2f ok ! mips-sgi-irix6.3 gcc 1.3.3 ok (egcs-1.1.2, native ld) ! mips-sgi-irix6.3 cc 1.3.3 ok (cc 7.0) mips-sgi-irix6.2 gcc 1.2f ok mips-sgi-irix6.2 cc 0.9 ok --- 92,100 ---- mips-sgi-irix6.5 gcc 1.2f ok (gcc-2.8.1) mips-sgi-irix6.4 gcc 1.2f ok ! mips-sgi-irix6.3 gcc 1.3b ok (egcs-1.1.2, native ld) ! mips-sgi-irix6.3 cc 1.3b ok (cc 7.0) mips-sgi-irix6.2 gcc 1.2f ok mips-sgi-irix6.2 cc 0.9 ok *************** *** 78,87 **** mips-sgi-irix5.3 gcc 1.2f NS (gcc-2.6.3) mips-sgi-irix5.3 cc 0.8 ok ! mips-sgi-irix5.2 gcc 1.3.3 ok (egcs-1.1.2, native ld) ! mips-sgi-irix5.2 cc 1.3.3 ok (cc 3.18) mipsel-unknown-openbsd2.1 gcc 1.0 ok powerpc-ibm-aix4.3.1.0 gcc 1.2f ok (egcs-1.1.1) --- 103,116 ---- mips-sgi-irix5.3 gcc 1.2f NS (gcc-2.6.3) mips-sgi-irix5.3 cc 0.8 ok ! mips-sgi-irix5.2 gcc 1.3b ok (egcs-1.1.2, native ld) ! mips-sgi-irix5.2 cc 1.3b ok (cc 3.18) + mips-sni-sysv4 cc 1.3.5 ok + (Siemens C-compiler) + mips-sni-sysv4 gcc 1.3.5 ok + (gcc-2.7.2.3, GNU assembler 2.8.1, native ld) mipsel-unknown-openbsd2.1 gcc 1.0 ok powerpc-ibm-aix4.3.1.0 gcc 1.2f ok (egcs-1.1.1) *************** *** 99,112 **** (gcc-2.7.2) rs6000-ibm-aix3.2.5 gcc 1.0i ok rs6000-ibm-aix3.2.5 xlc 1.0i ok ! sparc-sun-solaris2.7 gcc 1.3.3 ok ! (egcs-1.1.2, GNU ld 2.9.1 & native ld) ! sparc-sun-solaris2.6 gcc 1.3.2 ok ! (egcs-1.1.2, GNU ld 2.9.1 & native ld) ! sparc-sun-solaris2.5.1 gcc 1.2f ok ! sparc-sun-solaris2.5 gcc 1.3.3 ok (egcs-1.1.2, GNU ld 2.9.1 & native ld) ! sparc-sun-solaris2.5 cc 1.3.3 ok (SC 3.0.1) sparc-sun-solaris2.4 gcc 1.0a ok sparc-sun-solaris2.4 cc 1.0a ok --- 128,143 ---- (gcc-2.7.2) rs6000-ibm-aix3.2.5 gcc 1.0i ok rs6000-ibm-aix3.2.5 xlc 1.0i ok ! sparc-sun-solaris2.8 gcc 1.3e ok (1.913) ! (gcc-2.95.3 & native ld) ! sparc-sun-solaris2.7 gcc 1.3e ok (1.913) ! (gcc-2.95.3 & native ld) ! sparc-sun-solaris2.6 gcc 1.3e ok (1.913) ! (gcc-2.95.3 & native ld) ! sparc-sun-solaris2.5.1 gcc 1.3e ok (1.911) ! sparc-sun-solaris2.5 gcc 1.3b ok (egcs-1.1.2, GNU ld 2.9.1 & native ld) ! sparc-sun-solaris2.5 cc 1.3b ok (SC 3.0.1) sparc-sun-solaris2.4 gcc 1.0a ok sparc-sun-solaris2.4 cc 1.0a ok *************** *** 115,126 **** sparc-sun-sunos4.1.4 cc 1.0f ok sparc-sun-sunos4.1.3_U1 gcc 1.2f ok sparc-sun-sunos4.1.3C gcc 1.2f ok ! sparc-sun-sunos4.1.3 gcc 1.3.3 ok (egcs-1.1.2, GNU ld 2.9.1 & native ld) ! sparc-sun-sunos4.1.3 cc 1.3.3 ok sparc-unknown-bsdi4.0 gcc 1.2c ok sparc-unknown-linux-gnulibc1 gcc 1.2f ok ! sparc-unknown-linux-gnu gcc 1.3.3 ok (egcs-1.1.2, GNU ld 2.9.1.0.23) sparc64-unknown-linux-gnu gcc 1.2f ok --- 146,157 ---- sparc-sun-sunos4.1.4 cc 1.0f ok sparc-sun-sunos4.1.3_U1 gcc 1.2f ok sparc-sun-sunos4.1.3C gcc 1.2f ok ! sparc-sun-sunos4.1.3 gcc 1.3b ok (egcs-1.1.2, GNU ld 2.9.1 & native ld) ! sparc-sun-sunos4.1.3 cc 1.3b ok sparc-unknown-bsdi4.0 gcc 1.2c ok sparc-unknown-linux-gnulibc1 gcc 1.2f ok ! sparc-unknown-linux-gnu gcc 1.3b ok (egcs-1.1.2, GNU ld 2.9.1.0.23) sparc64-unknown-linux-gnu gcc 1.2f ok Index: libtool/doc/fdl.texi diff -c /dev/null libtool/doc/fdl.texi:1.2 *** /dev/null Tue Apr 24 17:25:59 2001 --- libtool/doc/fdl.texi Sat Dec 23 08:30:43 2000 *************** *** 0 **** --- 1,382 ---- + @node GNU Free Documentation License + @unnumbered GNU Free Documentation License + + @c This file is intended to be included in another file. + + @center Version 1.1, March 2000 + + @display + Copyright (C) 2000 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + @end display + + @unnumberedsec Preamble + + The purpose of this License is to make a manual, textbook, or other + written document ``free'' in the sense of freedom: to assure everyone + the effective freedom to copy and redistribute it, with or without + modifying it, either commercially or noncommercially. Secondarily, + this License preserves for the author and publisher a way to get + credit for their work, while not being considered responsible for + modifications made by others. + + This License is a kind of ``copyleft'', which means that derivative + works of the document must themselves be free in the same sense. It + complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for free + software, because free software needs free documentation: a free + program should come with manuals providing the same freedoms that the + software does. But this License is not limited to software manuals; + it can be used for any textual work, regardless of subject matter or + whether it is published as a printed book. We recommend this License + principally for works whose purpose is instruction or reference. + + @unnumberedsec APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work that contains a + notice placed by the copyright holder saying it can be distributed + under the terms of this License. The ``Document'', below, refers to any + such manual or work. Any member of the public is a licensee, and is + addressed as ``you''. + + A ``Modified Version'' of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A ``Secondary Section'' is a named appendix or a front-matter section of + the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall subject + (or to related matters) and contains nothing that could fall directly + within that overall subject. (For example, if the Document is in part a + textbook of mathematics, a Secondary Section may not explain any + mathematics.) The relationship could be a matter of historical + connection with the subject or with related matters, or of legal, + commercial, philosophical, ethical or political position regarding + them. + + The ``Invariant Sections'' are certain Secondary Sections whose titles + are designated, as being those of Invariant Sections, in the notice + that says that the Document is released under this License. + + The ``Cover Texts'' are certain short passages of text that are listed, + as Front-Cover Texts or Back-Cover Texts, in the notice that says that + the Document is released under this License. + + A ``Transparent'' copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, whose contents can be viewed and edited directly and + straightforwardly with generic text editors or (for images composed of + pixels) generic paint programs or (for drawings) some widely available + drawing editor, and that is suitable for input to text formatters or + for automatic translation to a variety of formats suitable for input + to text formatters. A copy made in an otherwise Transparent file + format whose markup has been designed to thwart or discourage + subsequent modification by readers is not Transparent. A copy that is + not ``Transparent" is called "Opaque''. + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, SGML + or XML using a publicly available DTD, and standard-conforming simple + HTML designed for human modification. Opaque formats include + PostScript, PDF, proprietary formats that can be read and edited only + by proprietary word processors, SGML or XML for which the DTD and/or + processing tools are not generally available, and the + machine-generated HTML produced by some word processors for output + purposes only. + + The ``Title Page'' means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the material + this License requires to appear in the title page. For works in + formats which do not have any title page as such, ``Title Page'' means + the text near the most prominent appearance of the work's title, + preceding the beginning of the body of the text. + + @unnumberedsec VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License applies + to the Document are reproduced in all copies, and that you add no other + conditions whatsoever to those of this License. You may not use + technical measures to obstruct or control the reading or further + copying of the copies you make or distribute. However, you may accept + compensation in exchange for copies. If you distribute a large enough + number of copies you must also follow the conditions in section 3. + + You may also lend copies, under the same conditions stated above, and + you may publicly display copies. + + @unnumberedsec COPYING IN QUANTITY + + If you publish printed copies of the Document numbering more than 100, + and the Document's license notice requires Cover Texts, you must enclose + the copies in covers that carry, clearly and legibly, all these Cover + Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on + the back cover. Both covers must also clearly and legibly identify + you as the publisher of these copies. The front cover must present + the full title with all words of the title equally prominent and + visible. You may add other material on the covers in addition. + Copying with changes limited to the covers, as long as they preserve + the title of the Document and satisfy these conditions, can be treated + as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto adjacent + pages. + + If you publish or distribute Opaque copies of the Document numbering + more than 100, you must either include a machine-readable Transparent + copy along with each Opaque copy, or state in or with each Opaque copy + a publicly-accessible computer-network location containing a complete + Transparent copy of the Document, free of added material, which the + general network-using public has access to download anonymously at no + charge using public-standard network protocols. If you use the latter + option, you must take reasonably prudent steps, when you begin + distribution of Opaque copies in quantity, to ensure that this + Transparent copy will remain thus accessible at the stated location + until at least one year after the last time you distribute an Opaque + copy (directly or through your agents or retailers) of that edition to + the public. + + It is requested, but not required, that you contact the authors of the + Document well before redistributing any large number of copies, to give + them a chance to provide you with an updated version of the Document. + + @unnumberedsec MODIFICATIONS + + You may copy and distribute a Modified Version of the Document under + the conditions of sections 2 and 3 above, provided that you release + the Modified Version under precisely this License, with the Modified + Version filling the role of the Document, thus licensing distribution + and modification of the Modified Version to whoever possesses a copy + of it. In addition, you must do these things in the Modified Version: + + @enumerate A + @item + Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. + + @item + List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than five). + + @item + State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + @item + Preserve all the copyright notices of the Document. + + @item + Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + @item + Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. + + @item + Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. + + @item + Include an unaltered copy of this License. + + @item + Preserve the section entitled ``History'', and its title, and add to + it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section entitled ``History'' in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. + + @item + Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the ``History'' section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. + + @item + In any section entitled ``Acknowledgements" or "Dedications'', + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. + + @item + Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. + + @item + Delete any section entitled ``Endorsements''. Such a section + may not be included in the Modified Version. + + @item + Do not retitle any existing section as ``Endorsements'' + or to conflict in title with any Invariant Section. + @end enumerate + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no material + copied from the Document, you may at your option designate some or all + of these sections as invariant. To do this, add their titles to the + list of Invariant Sections in the Modified Version's license notice. + These titles must be distinct from any other section titles. + + You may add a section entitled ``Endorsements'', provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text has + been approved by an organization as the authoritative definition of a + standard. + + You may add a passage of up to five words as a Front-Cover Text, and a + passage of up to 25 words as a Back-Cover Text, to the end of the list + of Cover Texts in the Modified Version. Only one passage of + Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document already + includes a cover text for the same cover, previously added by you or + by arrangement made by the same entity you are acting on behalf of, + you may not add another; but you may replace the old one, on explicit + permission from the previous publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this License + give permission to use their names for publicity for or to assert or + imply endorsement of any Modified Version. + + @unnumberedsec COMBINING DOCUMENTS + + You may combine the Document with other documents released under this + License, under the terms defined in section 4 above for modified + versions, provided that you include in the combination all of the + Invariant Sections of all of the original documents, unmodified, and + list them all as Invariant Sections of your combined work in its + license notice. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name but + different contents, make the title of each such section unique by + adding at the end of it, in parentheses, the name of the original + author or publisher of that section if known, or else a unique number. + Make the same adjustment to the section titles in the list of + Invariant Sections in the license notice of the combined work. + + In the combination, you must combine any sections entitled ``History'' + in the various original documents, forming one section entitled + ``History"; likewise combine any sections entitled "Acknowledgements'', + and any sections entitled ``Dedications''. You must delete all sections + entitled ``Endorsements.'' + + @unnumberedsec COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other documents + released under this License, and replace the individual copies of this + License in the various documents with a single copy that is included in + the collection, provided that you follow the rules of this License for + verbatim copying of each of the documents in all other respects. + + You may extract a single document from such a collection, and distribute + it individually under this License, provided you insert a copy of this + License into the extracted document, and follow this License in all + other respects regarding verbatim copying of that document. + + @unnumberedsec AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other separate + and independent documents or works, in or on a volume of a storage or + distribution medium, does not as a whole count as a Modified Version + of the Document, provided no compilation copyright is claimed for the + compilation. Such a compilation is called an ``aggregate'', and this + License does not apply to the other self-contained works thus compiled + with the Document, on account of their being thus compiled, if they + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one quarter + of the entire aggregate, the Document's Cover Texts may be placed on + covers that surround only the Document within the aggregate. + Otherwise they must appear on covers around the whole aggregate. + + @unnumberedsec TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section 4. + Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License provided that you also include the + original English version of this License. In case of a disagreement + between the translation and the original English version of this + License, the original English version will prevail. + + @unnumberedsec TERMINATION + + You may not copy, modify, sublicense, or distribute the Document except + as expressly provided for under this License. Any other attempt to + copy, modify, sublicense or distribute the Document is void, and will + automatically terminate your rights under this License. However, + parties who have received copies, or rights, from you under this + License will not have their licenses terminated so long as such + parties remain in full compliance. + + @unnumberedsec FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions + of the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + http://www.gnu.org/copyleft/. + + Each version of the License is given a distinguishing version number. + If the Document specifies that a particular numbered version of this + License ``or any later version'' applies to it, you have the option of + following the terms and conditions either of that specified version or + of any later version that has been published (not as a draft) by the + Free Software Foundation. If the Document does not specify a version + number of this License, you may choose any version ever published (not + as a draft) by the Free Software Foundation. + + + + @unnumberedsec ADDENDUM: How to use this License for your documents + + To use this License in a document you have written, include a copy of + the License in the document and put the following copyright and + license notices just after the title page: + + @display + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + @end display + + If you have no Invariant Sections, write ``with no Invariant Sections'' + instead of saying which ones are invariant. If you have no + Front-Cover Texts, write ``no Front-Cover Texts'' instead of + ``Front-Cover Texts being LIST''; likewise for Back-Cover Texts. + + If your document contains nontrivial examples of program code, we + recommend releasing these examples in parallel under your choice of + free software license, such as the GNU General Public License, + to permit their use in free software. Index: libtool/doc/libtool.texi diff -c libtool/doc/libtool.texi:1.47.2.27 libtool/doc/libtool.texi:1.116 *** libtool/doc/libtool.texi:1.47.2.27 Tue Nov 2 04:36:23 1999 --- libtool/doc/libtool.texi Thu Apr 5 16:43:39 2001 *************** *** 24,54 **** @ifinfo This file documents GNU Libtool @value{VERSION} ! Copyright (C) 1996-1999 Free Software Foundation, Inc. ! Permission is granted to make and distribute verbatim copies of this ! manual provided the copyright notice and this permission notice are ! preserved on all copies. @ignore Permission is granted to process this file through TeX and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph - @end ignore - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the - entire resulting derived work is distributed under the terms of a - permission notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation - approved by the Foundation. @end ifinfo - @titlepage @title GNU Libtool @subtitle For version @value{VERSION}, @value{UPDATED} --- 24,46 ---- @ifinfo This file documents GNU Libtool @value{VERSION} ! Copyright (C) 1996-2000 Free Software Foundation, Inc. ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.1 ! or any later version published by the Free Software Foundation; ! with the no Invariant Sections, with no Front-Cover Texts, ! and with no Back-Cover Texts. A copy of the license is included in ! the section entitled "GNU Free Documentation License". @ignore Permission is granted to process this file through TeX and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph @end ignore @end ifinfo @titlepage @title GNU Libtool @subtitle For version @value{VERSION}, @value{UPDATED} *************** *** 59,79 **** @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1996-1999 Free Software Foundation, Inc. - Permission is granted to make and distribute verbatim copies of this - manual provided the copyright notice and this permission notice are - preserved on all copies. - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the - entire resulting derived work is distributed under the terms of a - permission notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation - approved by the Free Software Foundation. @end titlepage @c Put everything in one index (arbitrarily chosen to be the concept index). --- 51,65 ---- @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1996-2000 Free Software Foundation, Inc. ! ! Permission is granted to copy, distribute and/or modify this document ! under the terms of the GNU Free Documentation License, Version 1.1 ! or any later version published by the Free Software Foundation; ! with the no Invariant Sections, with no Front-Cover Texts, ! and with no Back-Cover Texts. A copy of the license is included in ! the section entitled "GNU Free Documentation License". @end titlepage @c Put everything in one index (arbitrarily chosen to be the concept index). *************** *** 108,113 **** --- 94,100 ---- * Other languages:: Using libtool without a C compiler. * Troubleshooting:: When libtool doesn't work as advertised. * Maintaining:: Information used by the libtool maintainer. + * GNU Free Documentation License:: License for this manual. * Index:: Full index. @detailmenu --- The Detailed Node Listing --- *************** *** 136,142 **** * 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. Integrating libtool with your package --- 123,130 ---- * Execute mode:: Debugging libtool-generated programs. * Install mode:: Making libraries and executables public. * Finish mode:: Completing a library installation. ! * Uninstall mode:: Removing installed executables and libraries. ! * Clean mode:: Removing uninstalled executables and libraries. Integrating libtool with your package *************** *** 148,156 **** Configuring libtool ! * Invoking ltconfig:: @code{ltconfig} command line options. ! * ltconfig example:: Manually configuring a @code{libtool}. ! * AM_PROG_LIBTOOL:: Configuring @code{libtool} in @file{configure.in}. Including libtool in your package --- 136,142 ---- Configuring libtool ! * AC_PROG_LIBTOOL:: Configuring @code{libtool} in @file{configure.in}. Including libtool in your package *************** *** 179,184 **** --- 165,173 ---- * Libltdl interface:: How to use libltdl in your programs. * Modules for libltdl:: Creating modules that can be @code{dlopen}ed. + * Thread Saftey in libltdl:: Registering callbacks for multi-thread safety. + * User defined module data:: Associating data with loaded modules. + * Module loaders for libltdl:: Creating user defined module loaders. * Distributing libltdl:: How to distribute libltdl with your package. Using libtool with other languages *************** *** 213,218 **** --- 202,208 ---- * References:: Finding more information. * Compilers:: Creating object files from source files. * Reloadable objects:: Binding object files together. + * Multiple dependencies:: Removing duplicate dependant libraries. * Archivers:: Programs that create static archives. @end detailmenu *************** *** 723,731 **** @samp{-lm}, the library libhello.la depended upon. Nice, huh? Since libtool created a wrapper script, you should use libtool to ! install it and debug it too. However, since the program does not depend on any uninstalled libtool library, it is probably usable even without ! the wrapper script. Libtool could probably be made smarter to avoid the creation of the wrapper script in this case, but this is left as an exercise for the reader. --- 713,721 ---- @samp{-lm}, the library libhello.la depended upon. Nice, huh? Since libtool created a wrapper script, you should use libtool to ! install it and debug it too. However, since the program does not depend on any uninstalled libtool library, it is probably usable even without ! the wrapper script. Libtool could probably be made smarter to avoid the creation of the wrapper script in this case, but this is left as an exercise for the reader. *************** *** 1009,1022 **** But libtool libraries are more than just collections of object files: they can also carry library dependency information, which old archives ! do not. If you want to create a libtool static convenience library, you can omit the @samp{-rpath} flag and use @samp{-static} to indicate that you're only interested in a static library. When you link a program with such a library, libtool will actually link all object files and dependency libraries into the program. ! If you omit both @samp{-rpath} and @samp{-static}, libtool create a ! libtool convenience library that can be used to create other libtool libraries, even shared ones. Just like in the static case, the library behaves as an alias to a set of object files and dependency libraries, but in this case the object files are suitable for inclusion in shared --- 999,1012 ---- But libtool libraries are more than just collections of object files: they can also carry library dependency information, which old archives ! do not. If you want to create a libtool static convenience library, you can omit the @samp{-rpath} flag and use @samp{-static} to indicate that you're only interested in a static library. When you link a program with such a library, libtool will actually link all object files and dependency libraries into the program. ! If you omit both @samp{-rpath} and @samp{-static}, libtool will create a ! convenience library that can be used to create other libtool libraries, even shared ones. Just like in the static case, the library behaves as an alias to a set of object files and dependency libraries, but in this case the object files are suitable for inclusion in shared *************** *** 1024,1033 **** directly or indirectly, into a single program or library, otherwise you may get errors about symbol redefinitions. ! When GNU automake is used, you should use @code{noinst_LTLIBRARIES} ! instead of @code{lib_LTLIBRARIES} for convenience libraries, so that ! the @samp{-rpath} option is not passed when they are linked. ! As a rule of thumb, link a libtool convenience library into at most one libtool library, and never into a program, and link libtool static convenience libraries only into programs, and only if you need to carry --- 1014,1023 ---- directly or indirectly, into a single program or library, otherwise you may get errors about symbol redefinitions. ! When GNU automake is used, you should use @code{noinst_LTLIBRARIES} ! instead of @code{lib_LTLIBRARIES} for convenience libraries, so that ! the @samp{-rpath} option is not passed when they are linked. ! As a rule of thumb, link a libtool convenience library into at most one libtool library, and never into a program, and link libtool static convenience libraries only into programs, and only if you need to carry *************** *** 1105,1111 **** Create a library or an executable. @item uninstall ! Delete libraries or executables. @end table @item --version --- 1095,1104 ---- Create a library or an executable. @item uninstall ! Delete installed libraries or executables. ! ! @item clean ! Delete uninstalled libraries or executables. @end table @item --version *************** *** 1122,1128 **** * 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. @end menu @node Compile mode --- 1115,1122 ---- * Execute mode:: Debugging libtool-generated programs. * Install mode:: Making libraries and executables public. * Finish mode:: Completing a library installation. ! * Uninstall mode:: Removing installed executables and libraries. ! * Clean mode:: Removing uninstalled executables and libraries. @end menu @node Compile mode *************** *** 1142,1147 **** --- 1136,1144 ---- If shared libraries are being built, any necessary PIC generation flags are substituted into the compilation command. + You can pass compiler and linker specific flags using @samp{-Wc,@var{flag}} + and @samp{-Xcompiler @var{flag}} or @samp{-Wl,@var{flag}} and + @samp{-Xlinker @var{flag}}, respectively. If the @samp{-static} option is given, then a @samp{.o} file is built, even if libtool was configured with @samp{--disable-static}. *************** *** 1217,1224 **** (@pxref{Dlopened modules}). @item -export-symbols @var{symfile} ! Tells the linker to export only the symbols listed in @var{symfile}. ! The symbol file should end in @samp{.sym} and must contain the name of one symbol per line. This option has no effect on some platforms. By default all symbols are exported. --- 1214,1221 ---- (@pxref{Dlopened modules}). @item -export-symbols @var{symfile} ! Tells the linker to export only the symbols listed in @var{symfile}. ! The symbol file should end in @samp{.sym} and must contain the name of one symbol per line. This option has no effect on some platforms. By default all symbols are exported. *************** *** 1237,1248 **** executable. @item -module ! Creates a library that can be dlopened (@pxref{Dlopened modules}). This option doesn't work for programs. Module names don't need to be prefixed with 'lib'. ! In order to prevent name clashes, however, 'libname' and 'name' must not be used at the same time in your package. @item -no-undefined Declare that @var{output-file} does not depend on any other libraries. Some platforms cannot create shared libraries that depend on other --- 1234,1254 ---- executable. @item -module ! Creates a library that can be dlopened (@pxref{Dlopened modules}). This option doesn't work for programs. Module names don't need to be prefixed with 'lib'. ! In order to prevent name clashes, however, 'libname' and 'name' must not be used at the same time in your package. + @item -no-fast-install + Disable fast-install mode for the executable @var{output-file}. Useful + if the program won't be necessarily installed. + + @item -no-install + Link an executable @var{output-file} that can't be installed and + therefore doesn't need a wrapper script. Useful if the program is only + used in the build tree, e.g., for testing or generating other files. + @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 *************** *** 1279,1284 **** --- 1285,1294 ---- 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. + + @item -Wl,@var{flag} + @itemx -Xlinker @var{flag} + Pass a linker specific flag directly to the linker. @end table If the @var{output-file} ends in @samp{.la}, then a libtool library is *************** *** 1363,1368 **** --- 1373,1392 ---- The remaining @var{mode-args} are either flags for the deletion program (beginning with a `-'), or the names of files to delete. + @node Clean mode + @section Clean mode + @cindex clean mode + @cindex mode, clean + + @dfn{Clean} mode deletes uninstalled libraries, executables, objects + and libtool's temporary files associated with them. + + The first @var{mode-arg} is the name of the program to use to delete + files (typically @file{/bin/rm}). + + The remaining @var{mode-args} are either flags for the deletion program + (beginning with a `-'), or the names of files to delete. + @node Integrating libtool @chapter Integrating libtool with your package *************** *** 1503,1738 **** @file{config.h} header file), after which you can run @code{make} and build the package. ! Libtool has its own equivalent to the @code{configure} script, ! @code{ltconfig}. @menu ! * Invoking ltconfig:: @code{ltconfig} command line options. ! * ltconfig example:: Manually configuring a @code{libtool}. ! * AM_PROG_LIBTOOL:: Configuring @code{libtool} in @file{configure.in}. @end menu - - @node Invoking ltconfig - @subsection Invoking @code{ltconfig} - @pindex ltconfig - @cindex ltconfig command options - @cindex options, ltconfig command - @cindex command options, ltconfig - - @code{ltconfig} runs a series of configuration tests, then creates a - system-specific @code{libtool} in the current directory. The - @code{ltconfig} program has the following synopsis: - - @example - ltconfig [@var{option}]@dots{} @var{ltmain} [@var{host}] - @end example - - @noindent - and accepts the following options: - - @table @samp - @item --debug - Dump a trace of shell script execution to standard output. This - produces a lot of output, so you may wish to pipe it to @code{less} (or - @code{more}) or redirect to a file. - - @item --disable-shared - Create a @code{libtool} that only builds static libraries. - - @item --disable-static - Create a @code{libtool} that builds only shared libraries if they are - available. If only static libraries can be built, then this flag has - no effect. - - @item --disable-fast-install - On platforms in which installable executables, that are created by - default, are not suitable for execution in the build directory, create a - @code{libtool} that links executables that search for uninstalled - libraries by default, and relinks them at install time. It is ignored - on platforms in which a single executable is enough. - - @item --enable-dlopen - Test whether some dlopening mechanism is supported. If this flag is not - given, or no working dlopening mechanism is found, create a - @code{libtool} that performs dlpreopening of all dlopened modules. - - @item --help - Display a help message and exit. - - @item --no-verify - Do not use @code{config.sub} to verify that @var{host} is a valid - canonical host system name. - - @item --output=@var{file} - @item -o @var{file} - Instead of creating a libtool script called @code{libtool}, create one - called @var{file}. This can be useful if you want to create libtool - scripts for cross-compilers, or you want to have more than one libtool - in the same directory. - - @item --quiet - @itemx --silent - Do not print informational messages when running configuration tests. - - @item --srcdir=@var{dir} - Look for @code{config.guess} and @code{config.sub} in @var{dir}. - - @item --version - Print @code{ltconfig} version information and exit. - - @item --with-gcc - Assume that the GNU C compiler will be used when invoking the created - @code{libtool} to compile and link object files. - - @item --with-gnu-ld - Assume that the C compiler uses the GNU linker. - - @item --disable-lock - Create a @code{libtool} that does not perform locking to ensure proper - parallel compilation if the C compiler does not support @samp{-c} and - @samp{-o} together. - - @item --cache-file=@var{file} - Use this @var{file} as a cache for results of a few tests. This is - usually @file{config.cache} used by @code{configure}. By default, no - cache file is used. - @end table - - @var{ltmain} is the @code{ltmain.sh} shell script fragment that provides - the basic libtool functionality (@pxref{Distributing}). ! @var{host} is the canonical host system name, which by default is ! guessed by running @code{config.guess}. - @code{ltconfig} also recognizes the following environment variables: - - @defvar CC - The C compiler that will be used by the generated @code{libtool}. If - this is not set, @code{ltconfig} will look for @code{gcc} or @code{cc}. - @end defvar - - @defvar CFLAGS - Compiler flags used to generate standard object files. If this is not - set, @code{ltconfig} will not use any such flags. It affects only the - way @code{ltconfig} runs tests, not the produced @code{libtool}. - @end defvar - - @defvar CPPFLAGS - C preprocessor flags. If this is not set, @code{ltconfig} will not use - any such flags. It affects only the way @code{ltconfig} runs tests, not - the produced @code{libtool}. - @end defvar - - @defvar LD - The system linker to use (if the generated @code{libtool} requires one). - If this is not set, @code{ltconfig} will try to find out what is the - linker used by @var{CC}. - @end defvar - - @defvar LDFLAGS - The flags to be used by @code{ltconfig} when it links a program. If - this is not set, @code{ltconfig} will not use any such flags. It - affects only the way @code{ltconfig} runs tests, not the produced - @code{libtool}. - @end defvar - - @defvar LIBS - The libraries to be used by @code{ltconfig} when it links a program. If - this is not set, @code{ltconfig} will not use any such flags. It - affects only the way @code{ltconfig} runs tests, not the produced - @code{libtool}. - @end defvar - - @defvar NM - Program to use rather than checking for @code{nm}. - @end defvar - - @defvar RANLIB - Program to use rather than checking for @code{ranlib}. - @end defvar - - @defvar LN_S - A command that creates a link of a program, a soft-link if possible, a - hard-link otherwise. - @end defvar - - @defvar DLLTOOL - Program to use rather than checking for @code{dlltool}. Only meaningful - for Cygwin/MS-Windows. - @end defvar - - @defvar OBJDUMP - Program to use rather than checking for @code{objdump}. Only meaningful - for Cygwin/MS-Windows. - @end defvar - - @defvar AS - Program to use rather than checking for @code{as}. Only meaningful for - Cygwin/MS-Windows. - @end defvar - - @node ltconfig example - @subsection Using @code{ltconfig} - - Here is a simple example of using @code{ltconfig} to configure libtool - on a NetBSD/i386 1.2 system: - - @example - burger$ @kbd{./ltconfig ltmain.sh} - checking host system type... i386-unknown-netbsd1.2 - checking for ranlib... ranlib - checking for gcc... gcc - checking whether we are using GNU C... yes - checking for gcc option to produce PIC... -fPIC -DPIC - checking for gcc option to statically link programs... -static - checking if ld is GNU ld... no - checking if ld supports shared libraries... yes - checking dynamic linker characteristics... netbsd1.2 ld.so - checking if libtool supports shared libraries... yes - checking whether to build shared libraries... yes - creating libtool - burger$ - @end example - - This example shows how to configure @code{libtool} for cross-compiling - to a i486 GNU/Hurd 0.1 system (assuming compiler tools reside in - @file{/local/i486-gnu/bin}): - - @example - burger$ export PATH=/local/i486-gnu/bin:$PATH - burger$ ./ltconfig ltmain.sh i486-gnu0.1 - checking host system type... i486-unknown-gnu0.1 - checking for ranlib... ranlib - checking for gcc... gcc - checking whether we are using GNU C... yes - checking for gcc option to produce PIC... -fPIC -DPIC - checking for gcc option to statically link programs... -static - checking if ld is GNU ld... yes - checking if GNU ld supports shared libraries... yes - checking dynamic linker characteristics... gnu0.1 ld.so - checking if libtool supports shared libraries... yes - checking whether to build shared libraries... yes - creating libtool - burger$ - @end example - - @node AM_PROG_LIBTOOL - @subsection The @code{AM_PROG_LIBTOOL} macro - If you are using GNU Autoconf (or Automake), you should add a call to ! @code{AM_PROG_LIBTOOL} to your @file{configure.in} file. This macro ! offers seamless integration between the @code{configure} script and ! @code{ltconfig}: ! @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 --- 1527,1557 ---- @file{config.h} header file), after which you can run @code{make} and build the package. ! Libtool adds its own tests to your @code{configure} script in order to ! generate a libtool script for the installer's host machine. @menu ! * AC_PROG_LIBTOOL:: Configuring @code{libtool} in @file{configure.in}. @end menu ! @node AC_PROG_LIBTOOL ! @subsection The @code{AC_PROG_LIBTOOL} macro If you are using GNU Autoconf (or Automake), you should add a call to ! @code{AC_PROG_LIBTOOL} to your @file{configure.in} file. This macro ! adds many new tests to the @code{configure} script so that the generated ! libtool script will understand the characteristics of the host: ! @defmac AC_PROG_LIBTOOL ! @defmacx AM_PROG_LIBTOOL Add support for the @samp{--enable-shared} and @samp{--disable-shared} ! @code{configure} flags.@footnote{@code{AC_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).} @code{AM_PROG_LIBTOOL} was the ! old name for this macro, and although supported at the moment is ! deprecated. 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 *************** *** 1743,1749 **** # Turn off shared libraries during beta-testing, since they # make the build process take too long. AC_DISABLE_SHARED ! AM_PROG_LIBTOOL @end example The user may specify modified forms of the configure flags --- 1562,1568 ---- # Turn off shared libraries during beta-testing, since they # make the build process take too long. AC_DISABLE_SHARED ! AC_PROG_LIBTOOL @end example The user may specify modified forms of the configure flags *************** *** 1762,1780 **** comma-separated @var{pkgs} list, and every other package with @samp{--disable-shared}. The @samp{--enable-static=@var{pkgs}} flag behaves similarly, but it uses @samp{--enable-static} and ! @samp{--disable-static}. The same applies to the @samp{--enable-fast-install=@var{pkgs}} flag, which uses @samp{--enable-fast-install} and @samp{--disable-fast-install}. The package name @samp{default} matches any packages which have not set their name in the @code{PACKAGE} environment variable. ! This macro also sets the shell variable @var{LIBTOOL_DEPS}, that you can use to automatically update the libtool script if it becomes out-of-date. In order to do that, add to your @file{configure.in}: @example ! AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) @end example --- 1581,1599 ---- comma-separated @var{pkgs} list, and every other package with @samp{--disable-shared}. The @samp{--enable-static=@var{pkgs}} flag behaves similarly, but it uses @samp{--enable-static} and ! @samp{--disable-static}. The same applies to the @samp{--enable-fast-install=@var{pkgs}} flag, which uses @samp{--enable-fast-install} and @samp{--disable-fast-install}. The package name @samp{default} matches any packages which have not set their name in the @code{PACKAGE} environment variable. ! This macro also sets the shell variable @var{LIBTOOL_DEPS}, that you can use to automatically update the libtool script if it becomes out-of-date. In order to do that, add to your @file{configure.in}: @example ! AC_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) @end example *************** *** 1796,1802 **** Enable checking for dlopen support. This macro should be used if the package makes use of the @samp{-dlopen} and @samp{-dlpreopen} flags, otherwise libtool will assume that the system does not support dlopening. ! The macro must be called @strong{before} @code{AM_PROG_LIBTOOL}. @end defmac @defmac AC_LIBTOOL_WIN32_DLL --- 1615,1621 ---- Enable checking for dlopen support. This macro should be used if the package makes use of the @samp{-dlopen} and @samp{-dlpreopen} flags, otherwise libtool will assume that the system does not support dlopening. ! The macro must be called @strong{before} @code{AC_PROG_LIBTOOL}. @end defmac @defmac AC_LIBTOOL_WIN32_DLL *************** *** 1807,1821 **** assume that the package libraries are not dll clean and will build only static libraries on win32 hosts. ! @code{AM_PROG_LIBTOOL} must be called @strong{after} this macro, and provision must be made to pass @samp{-no-undefined} to @code{libtool} ! in link mode from the package @code{Makefile}. Naturally, passing ! @samp{-no-undefined} means that all the library symbols @strong{really are} ! defined at link time! @end defmac @defmac AC_DISABLE_FAST_INSTALL ! Change the default behaviour for @code{AM_PROG_LIBTOOL} to disable optimization for fast installation. The user may still override this default, depending on platform support, by specifying @samp{--enable-fast-install}. --- 1626,1640 ---- assume that the package libraries are not dll clean and will build only static libraries on win32 hosts. ! This macro must be called @strong{before} @code{AC_PROG_LIBTOOL}, and provision must be made to pass @samp{-no-undefined} to @code{libtool} ! in link mode from the package @code{Makefile}. Naturally, if you pass ! @samp{-no-undefined}, you must ensure that all the library symbols ! @strong{really are} defined at link time! @end defmac @defmac AC_DISABLE_FAST_INSTALL ! Change the default behaviour for @code{AC_PROG_LIBTOOL} to disable optimization for fast installation. The user may still override this default, depending on platform support, by specifying @samp{--enable-fast-install}. *************** *** 1823,1845 **** @defmac AC_DISABLE_SHARED @defmacx AM_DISABLE_SHARED ! Change the default behaviour for @code{AM_PROG_LIBTOOL} to disable shared libraries. The user may still override this default by specifying @samp{--enable-shared}. @end defmac @defmac AC_DISABLE_STATIC @defmacx AM_DISABLE_STATIC ! Change the default behaviour for @code{AM_PROG_LIBTOOL} to disable static libraries. The user may still override this default by specifying @samp{--enable-static}. @end defmac @pindex aclocal When you invoke the @code{libtoolize} program (@pxref{Invoking libtoolize}), it will tell you where to find a definition of ! @code{AM_PROG_LIBTOOL}. If you use Automake, the @code{aclocal} program ! will automatically add @code{AM_PROG_LIBTOOL} support to your @code{configure} script. Nevertheless, it is advisable to include a copy of @file{libtool.m4} in --- 1642,1735 ---- @defmac AC_DISABLE_SHARED @defmacx AM_DISABLE_SHARED ! Change the default behaviour for @code{AC_PROG_LIBTOOL} to disable shared libraries. The user may still override this default by specifying @samp{--enable-shared}. @end defmac @defmac AC_DISABLE_STATIC @defmacx AM_DISABLE_STATIC ! Change the default behaviour for @code{AC_PROG_LIBTOOL} to disable static libraries. The user may still override this default by specifying @samp{--enable-static}. @end defmac + The tests in @code{AC_PROG_LIBTOOL} also recognize the following + environment variables: + + @defvar CC + The C compiler that will be used by the generated @code{libtool}. If + this is not set, @code{AC_PROG_LIBTOOL} will look for @code{gcc} or + @code{cc}. + @end defvar + + @defvar CFLAGS + Compiler flags used to generate standard object files. If this is not + set, @code{AC_PROG_LIBTOOL} will not use any such flags. It affects + only the way @code{AC_PROG_LIBTOOL} runs tests, not the produced + @code{libtool}. + @end defvar + + @defvar CPPFLAGS + C preprocessor flags. If this is not set, @code{AC_PROG_LIBTOOL} will + not use any such flags. It affects only the way @code{AC_PROG_LIBTOOL} + runs tests, not the produced @code{libtool}. + @end defvar + + @defvar LD + The system linker to use (if the generated @code{libtool} requires one). + If this is not set, @code{AC_PROG_LIBTOOL} will try to find out what is + the linker used by @var{CC}. + @end defvar + + @defvar LDFLAGS + The flags to be used by @code{ltconfig} when it links a program. If + this is not set, @code{AC_PROG_LIBTOOL} will not use any such flags. It + affects only the way @code{AC_PROG_LIBTOOL} runs tests, not the produced + @code{libtool}. + @end defvar + + @defvar LIBS + The libraries to be used by @code{AC_PROG_LIBTOOL} when it links a + program. If this is not set, @code{AC_PROG_LIBTOOL} will not use any + such flags. It affects only the way @code{AC_PROG_LIBTOOL} runs tests, + not the produced @code{libtool}. + @end defvar + + @defvar NM + Program to use rather than checking for @code{nm}. + @end defvar + + @defvar RANLIB + Program to use rather than checking for @code{ranlib}. + @end defvar + + @defvar LN_S + A command that creates a link of a program, a soft-link if possible, a + hard-link otherwise. @code{AC_PROG_LIBTOOL} will check for a suitable + program if this variable is not set. + @end defvar + + @defvar DLLTOOL + Program to use rather than checking for @code{dlltool}. Only meaningful + for Cygwin/MS-Windows. + @end defvar + + @defvar OBJDUMP + Program to use rather than checking for @code{objdump}. Only meaningful + for Cygwin/MS-Windows. + @end defvar + + @defvar AS + Program to use rather than checking for @code{as}. Only used on + Cygwin/MS-Windows at the moment. + @end defvar + @pindex aclocal When you invoke the @code{libtoolize} program (@pxref{Invoking libtoolize}), it will tell you where to find a definition of ! @code{AC_PROG_LIBTOOL}. If you use Automake, the @code{aclocal} program ! will automatically add @code{AC_PROG_LIBTOOL} support to your @code{configure} script. Nevertheless, it is advisable to include a copy of @file{libtool.m4} in *************** *** 1865,1873 **** @pindex config.sub Canonical system name validation subroutine script. - @item ltconfig - Generate a libtool script for a given system. - @item ltmain.sh @pindex ltmain.sh A generic script implementing basic libtool functionality. --- 1755,1760 ---- *************** *** 1909,1915 **** 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 --- 1796,1802 ---- 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{AC_PROG_LIBTOOL} appears in your @file{configure.in}. @item --copy *************** *** 1977,1992 **** Manual}), and a few other functions. @end defvar ! 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 @code{AC_OUTPUT} in your @file{configure.in}: @example ! LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'` AC_SUBST(LTLIBOBJS) ! LTALLOCA=`echo "$ALLOCA" | sed 's/\.o/.lo/g'` AC_SUBST(LTALLOCA) AC_OUTPUT(@dots{}) @end example --- 1864,1879 ---- Manual}), and a few other functions. @end defvar ! Unfortunately, the stable release of Autoconf (2.13, 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 @code{AC_OUTPUT} in your @file{configure.in}: @example ! LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'` AC_SUBST(LTLIBOBJS) ! LTALLOCA=`echo "$ALLOCA" | sed 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'` AC_SUBST(LTALLOCA) AC_OUTPUT(@dots{}) @end example *************** *** 2005,2013 **** When you are developing a package, it is often worthwhile to configure your package with the @samp{--disable-shared} flag, or to override the ! defaults for @code{AM_PROG_LIBTOOL} by using the ! @code{AM_DISABLE_SHARED} Autoconf macro (@pxref{AM_PROG_LIBTOOL, , The ! @code{AM_PROG_LIBTOOL} macro}). This prevents libtool from building shared libraries, which has several advantages: @itemize @bullet --- 1892,1900 ---- 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{AC_PROG_LIBTOOL} by using the ! @code{AC_DISABLE_SHARED} Autoconf macro (@pxref{AC_PROG_LIBTOOL, , The ! @code{AC_PROG_LIBTOOL} macro}). This prevents libtool from building shared libraries, which has several advantages: @itemize @bullet *************** *** 2348,2403 **** Here are the relevant portions of that file: @example ! /* __BEGIN_DECLS should be used at the beginning of your declarations, ! so that C++ compilers don't mangle their names. Use __END_DECLS at the end of C declarations. */ ! #undef __BEGIN_DECLS ! #undef __END_DECLS #ifdef __cplusplus ! # define __BEGIN_DECLS extern "C" @{ ! # define __END_DECLS @} #else ! # define __BEGIN_DECLS /* empty */ ! # define __END_DECLS /* empty */ #endif ! /* __P is a macro used to wrap function prototypes, so that compilers ! that don't understand ANSI C prototypes still work, and ANSI C ! compilers can issue warnings about type mismatches. */ ! #undef __P #if defined (__STDC__) || defined (_AIX) \ || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ || defined(WIN32) || defined(__cplusplus) ! # define __P(protos) protos #else ! # define __P(protos) () #endif @end example These macros are used in @file{foo.h} as follows: @example ! #ifndef _FOO_H_ ! #define _FOO_H_ 1 /* The above macro definitions. */ ! @dots{} ! __BEGIN_DECLS ! int foo __P((void)); ! int hello __P((void)); ! __END_DECLS ! #endif /* !_FOO_H_ */ @end example ! Note that the @file{#ifndef _FOO_H_} prevents the body of @file{foo.h} from being read more than once in a given compilation. ! Feel free to copy the definitions of @code{__P}, @code{__BEGIN_DECLS}, ! and @code{__END_DECLS} into your own headers. Then, you may use them to create header files that are valid for C++, ANSI, and non-ANSI ! compilers. Do not be naive about writing portable code. Following the tips given above will help you miss the most obvious problems, but there are --- 2235,2301 ---- Here are the relevant portions of that file: @example ! /* BEGIN_C_DECLS should be used at the beginning of your declarations, ! so that C++ compilers don't mangle their names. Use END_C_DECLS at the end of C declarations. */ ! #undef BEGIN_C_DECLS ! #undef END_C_DECLS #ifdef __cplusplus ! # define BEGIN_C_DECLS extern "C" @{ ! # define END_C_DECLS @} #else ! # define BEGIN_C_DECLS /* empty */ ! # define END_C_DECLS /* empty */ #endif ! /* PARAMS is a macro used to wrap function prototypes, so that ! compilers that don't understand ANSI C prototypes still work, ! and ANSI C compilers can issue warnings about type mismatches. */ ! #undef PARAMS #if defined (__STDC__) || defined (_AIX) \ || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ || defined(WIN32) || defined(__cplusplus) ! # define PARAMS(protos) protos #else ! # define PARAMS(protos) () #endif @end example These macros are used in @file{foo.h} as follows: @example ! #ifndef FOO_H ! #define FOO_H 1 /* The above macro definitions. */ ! #include "@dots{}" ! ! BEGIN_C_DECLS ! ! int foo PARAMS((void)); ! int hello PARAMS((void)); ! END_C_DECLS ! #endif /* !FOO_H */ @end example ! Note that the @file{#ifndef FOO_H} prevents the body of @file{foo.h} from being read more than once in a given compilation. ! Also the only thing that must go outside the ! @code{BEGIN_C_DECLS}/@code{END_C_DECLS} pair are @code{#include} lines. ! Strictly speaking it is only C symbol names that need to be protected, ! but your header files will be more maintainable if you have a single ! pair of of these macros around the majority of the header contents. ! ! You should use these definitions of @code{PARAMS}, @code{BEGIN_C_DECLS}, ! and @code{END_C_DECLS} into your own headers. Then, you may use them to create header files that are valid for C++, ANSI, and non-ANSI ! compilers@footnote{We used to recommend @code{__P}, ! @code{__BEGIN_DECLS} and @code{__END_DECLS}. This was bad advice since ! symbols (even preprocessor macro names) that begin with an underscore ! are reserved for the use of the compiler.}. Do not be naive about writing portable code. Following the tips given above will help you miss the most obvious problems, but there are *************** *** 2410,2417 **** pointer type, and so need to use @code{char *} in its place. @item ! The @code{const} and @code{signed} keywords are not supported by some ! compilers, especially pre-ANSI compilers. @item The @code{long double} type is not supported by many compilers. --- 2308,2315 ---- pointer type, and so need to use @code{char *} in its place. @item ! The @code{const}, @code{inline} and @code{signed} keywords are not ! supported by some compilers, especially pre-ANSI compilers. @item The @code{long double} type is not supported by many compilers. *************** *** 2444,2454 **** inter-library dependencies: for every library @file{lib@var{name}} that your own library depends on, simply add a corresponding @code{-l@var{name}} option to the link line when you create your ! library.@footnote{Unfortunately, as of libtool version @value{VERSION}, ! there is no way to specify inter-library dependencies on libtool ! libraries that have not yet been installed. Libtool 1.4 will support ! this feature.} To make an example of our @file{libhello} ! that depends on @file{libm}: @example burger$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \ --- 2342,2349 ---- inter-library dependencies: for every library @file{lib@var{name}} that your own library depends on, simply add a corresponding @code{-l@var{name}} option to the link line when you create your ! library. To make an example of our ! @file{libhello} that depends on @file{libm}: @example burger$ @kbd{libtool gcc -g -O -o libhello.la foo.lo hello.lo \ *************** *** 2518,2527 **** modules. However, you should indicate that your package is willing to use such support, by using the macro @samp{AC_LIBTOOL_DLOPEN} in @file{configure.in}. If this macro is not used (or it is used ! @emph{after} @samp{AM_PROG_LIBTOOL}), libtool will assume no dlopening mechanism is available, and will try to simulate it. ! This chapter discusses how you as a dlopen application developer might use libtool to generate dlopen-accessible modules. @menu --- 2413,2422 ---- modules. However, you should indicate that your package is willing to use such support, by using the macro @samp{AC_LIBTOOL_DLOPEN} in @file{configure.in}. If this macro is not used (or it is used ! @emph{after} @samp{AC_PROG_LIBTOOL}), libtool will assume no dlopening mechanism is available, and will try to simulate it. ! This chapter discusses how you as a dlopen application developer might use libtool to generate dlopen-accessible modules. @menu *************** *** 2538,2546 **** in order to be dynamically resolved with the @code{dlsym} (or equivalent) function. ! Libtool provides the @samp{-export-dynamic} and @samp{-module} ! link flags (@pxref{Link mode}), which do this declaration. ! You need to use these flags if you are linking an application program that dlopens other modules or a libtool library that will also be dlopened. For example, if we wanted to build a shared library, @file{libhello}, --- 2433,2441 ---- in order to be dynamically resolved with the @code{dlsym} (or equivalent) function. ! Libtool provides the @samp{-export-dynamic} and @samp{-module} ! link flags (@pxref{Link mode}), which do this declaration. ! You need to use these flags if you are linking an application program that dlopens other modules or a libtool library that will also be dlopened. For example, if we wanted to build a shared library, @file{libhello}, *************** *** 2570,2576 **** Libtool provides special support for dlopening libtool object and libtool library files, so that their symbols can be resolved @emph{even on platforms without any @code{dlopen} and @code{dlsym} ! functions.}. Consider the following alternative ways of loading code into your program, in order of increasing ``laziness'': --- 2465,2471 ---- Libtool provides special support for dlopening libtool object and libtool library files, so that their symbols can be resolved @emph{even on platforms without any @code{dlopen} and @code{dlsym} ! functions}. Consider the following alternative ways of loading code into your program, in order of increasing ``laziness'': *************** *** 2608,2614 **** application to dlopen by using the @samp{-dlopen} or @samp{-dlpreopen} flags when you link your program (@pxref{Link mode}). ! @deftypefn {Structure} {struct} lt_dlsymlist @{ @w{const char *@var{name};} @w{lt_ptr_t @var{address};} @} The @var{name} attribute is a null-terminated character string of the symbol name, such as @code{"fprintf"}. The @var{address} attribute is a generic pointer to the appropriate object, such as @code{&fprintf}. --- 2503,2509 ---- application to dlopen by using the @samp{-dlopen} or @samp{-dlpreopen} flags when you link your program (@pxref{Link mode}). ! @deftypefn {Structure} {struct} lt_dlsymlist @{ @w{const char *@var{name};} @w{lt_ptr @var{address};} @} The @var{name} attribute is a null-terminated character string of the symbol name, such as @code{"fprintf"}. The @var{address} attribute is a generic pointer to the appropriate object, such as @code{&fprintf}. *************** *** 2616,2623 **** @deftypevar {const lt_dlsymlist *} lt_preloaded_symbols An array of @var{lt_symbol} structures, representing all the preloaded ! symbols linked into the program. For each @samp{-dlpreloaded} file ! there is an element with the @var{name} of the file and a @var{address} of @code{0}, followed by all symbols exported from this file. For the executable itself the special name @@PROGRAM@@ is used. The last element has a @var{name} and @var{address} of @code{0}. --- 2511,2518 ---- @deftypevar {const lt_dlsymlist *} lt_preloaded_symbols An array of @var{lt_symbol} structures, representing all the preloaded ! symbols linked into the program. For each @samp{-dlpreloaded} file ! there is an element with the @var{name} of the file and a @var{address} of @code{0}, followed by all symbols exported from this file. For the executable itself the special name @@PROGRAM@@ is used. The last element has a @var{name} and @var{address} of @code{0}. *************** *** 2634,2640 **** @cindex names of dynamic modules @cindex dynamic modules, names ! After a library has been linked with @samp{-module}, it can be dlopened. Unfortunately, because of the variation in library names, your package needs to determine the correct file to dlopen. --- 2529,2535 ---- @cindex names of dynamic modules @cindex dynamic modules, names ! After a library has been linked with @samp{-module}, it can be dlopened. Unfortunately, because of the variation in library names, your package needs to determine the correct file to dlopen. *************** *** 2673,2679 **** @item Dlopen functions are generally only available on shared library platforms. If you want your package to be portable to static platforms, ! you have to use either libltdl (@pxref{Using libltdl}) or develop your own alternatives to dlopening dynamic code. Most reasonable solutions involve writing wrapper functions for the @code{dlopen} family, which do package-specific tricks when dlopening --- 2568,2574 ---- @item Dlopen functions are generally only available on shared library platforms. If you want your package to be portable to static platforms, ! you have to use either libltdl (@pxref{Using libltdl}) or develop your own alternatives to dlopening dynamic code. Most reasonable solutions involve writing wrapper functions for the @code{dlopen} family, which do package-specific tricks when dlopening *************** *** 2733,2747 **** with the following exception: @quotation ! As a special exception to the GNU Library General Public License, ! if you distribute this file as part of a program that uses GNU libtool ! to create libraries and programs, you may include it under the same distribution terms that you use for the rest of that program. @end quotation @menu * Libltdl interface:: How to use libltdl in your programs. * Modules for libltdl:: Creating modules that can be @code{dlopen}ed. * Distributing libltdl:: How to distribute libltdl with your package. @end menu --- 2628,2645 ---- with the following exception: @quotation ! As a special exception to the GNU Lesser General Public License, ! if you distribute this file as part of a program or library that ! is built using GNU libtool, you may include it under the same distribution terms that you use for the rest of that program. @end quotation @menu * Libltdl interface:: How to use libltdl in your programs. * Modules for libltdl:: Creating modules that can be @code{dlopen}ed. + * Thread Saftey in libltdl:: Registering callbacks for multi-thread safety. + * User defined module data:: Associating data with loaded modules. + * Module loaders for libltdl:: Creating user defined module loaders. * Distributing libltdl:: How to distribute libltdl with your package. @end menu *************** *** 2760,2765 **** --- 2658,2673 ---- @end example @noindent + The last release of libltdl used some symbols that violated the + @sc{posix} namespace conventions. These symbols are now deprecated, + and have been replaced by those described here. If you have code that + relies on the old deprecated symbol names, defining + @samp{LT_NON_POSIX_NAMESPACE} before you include @file{ltdl.h} provides + conversion macros. Whichever set of symbols you use, the new api is + not binary compatible with the last, so you will need to recompile + your application in order to use this version of libltdl. + + @noindent Note that libltdl is not threadsafe, i.e. a multithreaded application has to use a mutex for libltdl. It was reported that GNU/Linux's glibc 2.0's @code{dlopen} with @samp{RTLD_LAZY} (which libltdl uses by *************** *** 2772,2784 **** @noindent The following types are defined in @file{ltdl.h}: ! @deftp {Type} lt_ptr_t ! @code{lt_ptr_t} is a generic pointer. @end deftp @deftp {Type} lt_dlhandle ! @code{lt_dlhandle} is a module "handle". ! Every dlopened module has a handle associated with it. @end deftp @deftp {Type} lt_dlsymlist --- 2680,2692 ---- @noindent The following types are defined in @file{ltdl.h}: ! @deftp {Type} lt_ptr ! @code{lt_ptr} is a generic pointer. @end deftp @deftp {Type} lt_dlhandle ! @code{lt_dlhandle} is a module "handle". ! Every lt_dlopened module has a handle associated with it. @end deftp @deftp {Type} lt_dlsymlist *************** *** 2799,2805 **** @deftypefun int lt_dlexit (void) Shut down libltdl and close all modules. ! This function will only then shut down libltdl when it was called as many times as @code{lt_dlinit} has been successfully called. Return 0 on success, otherwise the number of errors. @end deftypefun --- 2707,2713 ---- @deftypefun int lt_dlexit (void) Shut down libltdl and close all modules. ! This function will only then shut down libltdl when it was called as many times as @code{lt_dlinit} has been successfully called. Return 0 on success, otherwise the number of errors. @end deftypefun *************** *** 2807,2822 **** @deftypefun lt_dlhandle lt_dlopen (const char *@var{filename}) Open the module with the file name @var{filename} and return a handle for it. @code{lt_dlopen} is able to open libtool dynamic ! modules, preloaded static modules, the program itself and ! native dynamic libraries. Unresolved symbols in the module are resolved using its dependency libraries (not implemented yet) and previously dlopened modules. If the executable using this module was linked with the @code{-export-dynamic} flag, then the global symbols in the executable will also be used to resolve references in the module. ! ! If @var{filename} is NULL and the program was linked with @code{-export-dynamic} or @code{-dlopen self}, @code{lt_dlopen} will return a handle for the program itself, which can be used to access its symbols. --- 2715,2730 ---- @deftypefun lt_dlhandle lt_dlopen (const char *@var{filename}) Open the module with the file name @var{filename} and return a handle for it. @code{lt_dlopen} is able to open libtool dynamic ! modules, preloaded static modules, the program itself and ! native dynamic libraries. Unresolved symbols in the module are resolved using its dependency libraries (not implemented yet) and previously dlopened modules. If the executable using this module was linked with the @code{-export-dynamic} flag, then the global symbols in the executable will also be used to resolve references in the module. ! ! If @var{filename} is @code{NULL} and the program was linked with @code{-export-dynamic} or @code{-dlopen self}, @code{lt_dlopen} will return a handle for the program itself, which can be used to access its symbols. *************** *** 2824,2849 **** If libltdl cannot find the library and the file name @var{filename} does not have a directory component it will additionally search in the following search paths for the module (in the order as follows): ! @enumerate 1 @item user-defined search path: This search path can be set by the program using the functions @code{lt_dlsetsearchpath} and @code{lt_dladdsearchdir}. ! @item libltdl's search path: This search path is the value of the environment variable @var{LTDL_LIBRARY_PATH}. ! @item system library search path: ! The system dependent library search path (e.g. on Linux it is @var{LD_LIBRARY_PATH}). @end enumerate Each search path must be a colon-separated list of absolute directories, for example, @code{"/usr/lib/mypkg:/lib/foo"}. ! If the same module is loaded several times, the same handle is returned. ! If @code{lt_dlopen} fails for any reason, it returns NULL. @end deftypefun @deftypefun lt_dlhandle lt_dlopenext (const char *@var{filename}) --- 2732,2757 ---- If libltdl cannot find the library and the file name @var{filename} does not have a directory component it will additionally search in the following search paths for the module (in the order as follows): ! @enumerate 1 @item user-defined search path: This search path can be set by the program using the functions @code{lt_dlsetsearchpath} and @code{lt_dladdsearchdir}. ! @item libltdl's search path: This search path is the value of the environment variable @var{LTDL_LIBRARY_PATH}. ! @item system library search path: ! The system dependent library search path (e.g. on Linux it is @var{LD_LIBRARY_PATH}). @end enumerate Each search path must be a colon-separated list of absolute directories, for example, @code{"/usr/lib/mypkg:/lib/foo"}. ! If the same module is loaded several times, the same handle is returned. ! If @code{lt_dlopen} fails for any reason, it returns @code{NULL}. @end deftypefun @deftypefun lt_dlhandle lt_dlopenext (const char *@var{filename}) *************** *** 2854,2865 **** @enumerate 1 @item the libtool archive extension @samp{.la} ! @item the extension used for native dynamic libraries on the host platform, e.g., @samp{.so}, @samp{.sl}, etc. @end enumerate ! This lookup strategy was designed to allow programs that don't ! have knowledge about native dynamic libraries naming conventions to be able to @code{dlopen} such libraries as well as libtool modules transparently. @end deftypefun --- 2762,2773 ---- @enumerate 1 @item the libtool archive extension @samp{.la} ! @item the extension used for native dynamic libraries on the host platform, e.g., @samp{.so}, @samp{.sl}, etc. @end enumerate ! This lookup strategy was designed to allow programs that don't ! have knowledge about native dynamic libraries naming conventions to be able to @code{dlopen} such libraries as well as libtool modules transparently. @end deftypefun *************** *** 2870,2892 **** then the module is unloaded. Return 0 on success. @end deftypefun ! ! @deftypefun lt_ptr_t lt_dlsym (lt_dlhandle @var{handle}, const char *@var{name}) ! Return the address in the module @var{handle}, where the symbol given ! by the null terminated string @var{name} is loaded. ! If the symbol cannot be found, NULL is returned. @end deftypefun ! ! @deftypefun {const char *} lt_dlerror (void) ! Return a human readable string describing the most recent error that occurred from any of libltdl's functions. ! Return NULL if no errors have occurred since initialization or since it was last called. @end deftypefun ! @deftypefun int lt_dlpreload (const lt_dlsymlist *@var{preloaded}) Register the list of preloaded modules @var{preloaded}. ! If @var{preloaded} is NULL, then all previously registered symbol lists, except the list set by @code{lt_dlpreload_default}, are deleted. Return 0 on success. @end deftypefun --- 2778,2800 ---- then the module is unloaded. Return 0 on success. @end deftypefun ! ! @deftypefun lt_ptr lt_dlsym (lt_dlhandle @var{handle}, const char *@var{name}) ! Return the address in the module @var{handle}, where the symbol given ! by the null-terminated string @var{name} is loaded. ! If the symbol cannot be found, @code{NULL} is returned. @end deftypefun ! ! @deftypefun {const char *}lt_dlerror (void) ! Return a human readable string describing the most recent error that occurred from any of libltdl's functions. ! Return @code{NULL} if no errors have occurred since initialization or since it was last called. @end deftypefun ! @deftypefun int lt_dlpreload (const lt_dlsymlist *@var{preloaded}) Register the list of preloaded modules @var{preloaded}. ! If @var{preloaded} is @code{NULL}, then all previously registered symbol lists, except the list set by @code{lt_dlpreload_default}, are deleted. Return 0 on success. @end deftypefun *************** *** 2904,2910 **** @defmac LTDL_SET_PRELOADED_SYMBOLS() Set the default list of preloaded symbols. ! Should be used in your program to initialize libltdl's list of preloaded modules. @example --- 2812,2818 ---- @defmac LTDL_SET_PRELOADED_SYMBOLS() Set the default list of preloaded symbols. ! Should be used in your program to initialize libltdl's list of preloaded modules. @example *************** *** 2919,2925 **** @end defmac @deftypefun int lt_dladdsearchdir (const char *@var{search_dir}) ! Add the search directory @var{search_dir} to the user-defined library search path. Return 0 on success. @end deftypefun --- 2827,2833 ---- @end defmac @deftypefun int lt_dladdsearchdir (const char *@var{search_dir}) ! Add the search directory @var{search_dir} to the user-defined library search path. Return 0 on success. @end deftypefun *************** *** 2929,2940 **** directories. Return 0 on success. @end deftypefun ! @deftypefun {const char *} lt_dlgetsearchpath (void) Return the current user-defined library search path. @end deftypefun ! @deftypevar {lt_ptr_t (*} lt_dlmalloc ) (size_t size) ! @deftypevarx {void (*} lt_dlfree ) (lt_ptr_t ptr) These variables are set to @code{malloc} and @code{free}, by default, but you can set them to any other functions that provides equivalent functionality. However, you must not modify their values after calling --- 2837,2865 ---- directories. Return 0 on success. @end deftypefun ! @deftypefun {const char *}lt_dlgetsearchpath (void) Return the current user-defined library search path. @end deftypefun + + @deftypefun int lt_dlmakeresident (lt_dlhandle @var{handle}) + Mark a module so that it cannot be @samp{lt_dlclose}d. This can be + useful if a module implements some core functionality in your project, + which would cause your code to crash if removed. Return 0 on success. + + If you use @samp{lt_dlopen (NULL)} to get a @var{handle} for the running + binary, that handle will always be marked as resident, and consequently + cannot be successfully @samp{lt_dlclose}d. + @end deftypefun ! @deftypefun int lt_dlisresident (lt_dlhandle @var{handle}) ! Check whether a particular module has been marked as resident, returning 1 ! if it has or 0 otherwise. If there is an error while executing this ! function, return -1 and set an error message for retrieval with ! @code{lt_dlerror}. ! @end deftypefun ! ! @deftypevar {lt_ptr (*) (size_t @var{size})} lt_dlmalloc ! @deftypevarx {void (*) (lt_ptr @var{ptr})} lt_dlfree These variables are set to @code{malloc} and @code{free}, by default, but you can set them to any other functions that provides equivalent functionality. However, you must not modify their values after calling *************** *** 2966,2980 **** Internal symbols must be named in such a way that they won't conflict with other modules, for example, by prefixing them with "_modulename_". Although some platforms support having the same symbols defined more than ! once it is generally not portable and it makes it impossible to dlpreopen ! such modules. libltdl will automatically cut the prefix off to get the real name of the symbol. Additionally, it supports modules which don't use a prefix so that you can also dlopen non-libtool modules. @file{foo1.c} gives an example of a portable libtool module. ! Exported symbols are prefixed with "foo1_LTX_", internal symbols ! with "_foo1_". Aliases are defined at the beginning so that the code ! is more readable. @example /* aliases for the exported symbols */ --- 2891,2905 ---- Internal symbols must be named in such a way that they won't conflict with other modules, for example, by prefixing them with "_modulename_". Although some platforms support having the same symbols defined more than ! once it is generally not portable and it makes it impossible to dlpreopen ! such modules. libltdl will automatically cut the prefix off to get the real name of the symbol. Additionally, it supports modules which don't use a prefix so that you can also dlopen non-libtool modules. @file{foo1.c} gives an example of a portable libtool module. ! Exported symbols are prefixed with "foo1_LTX_", internal symbols ! with "_foo1_". Aliases are defined at the beginning so that the code ! is more readable. @example /* aliases for the exported symbols */ *************** *** 2991,3002 **** /* an exported function */ int foo() @{ ! return _foo_helper(); @} @end example @noindent ! The @file{Makefile.am} contains the necessary rules to build the module @file{foo1.la}: @example --- 2916,2927 ---- /* an exported function */ int foo() @{ ! return _foo1_helper(); @} @end example @noindent ! The @file{Makefile.am} contains the necessary rules to build the module @file{foo1.la}: @example *************** *** 3008,3027 **** ... @end example @node Distributing libltdl @section How to distribute libltdl with your package Even though libltdl is installed together with libtool, you may wish to ! include libltdl in the distribution of your package, for the convenience of users of your package that don't have libtool or libltdl installed. ! In this case, you may decide which flavor of libltdl you want to use: a ! convenience library or an installable libtool library. One advantage of the convenience library is that it is not installed, so the fact that you use libltdl will not be apparent to the user, and it will not overwrite a pre-installed version of libltdl a user might have. ! On the other hand, if you want to upgrade libltdl for any reason ! (e.g. a bugfix) you'll have to recompile your package instead of just replacing an installed version of libltdl. However, if your programs or libraries are linked with other libraries that use such a pre-installed version of libltdl, you may get linker --- 2933,3386 ---- ... @end example + + @node Thread Saftey in libltdl + @section Using libtldl in a multi threaded environment + + Using the @code{lt_dlmutex_register()} function, and by providing some + appropriate callback function definitions, libltdl can be used in a + multi-threaded environment. + + @deftypefn {Type} void lt_dlmutex_lock (void) + This is the type of a function pointer holding the address of a function + which will be called at the start of parts of the libltdl implementation + code which require a mutex lock. + + Because libltdl is inherantly recursive, it is important that the + locking mechanism employed by these callback functions are reentrant, or + else strange problems will occur. + @end deftypefn + + @deftypefn {Type} void lt_dlmutex_unlock (void) + The type of a matching unlock function. + @end deftypefn + + @deftypefn {Type} void lt_dlmutex_seterror @w{(const char *@var{error});} + Many of the functions in the libltdl @sc{api} have a special return + value to indicate to the client that an error has occured. Normally (in + single threaded applications) a string describing that error can be + retrieved from internal storage with @code{lt_dlerror()}. + + A function of this type must be registered with the library in order for + it to work in a multi-threaded context. The function should store any + error message passed in thread local storage. + @end deftypefn + + @deftypefn {Type} {const char *} lt_dlmutex_geterror (void) + The type of a matching callback function to retrieve the last stored + error message from thread local storage. + + When regeistered correctly this function will be used by + @code{lt_dlerror())} from all threads to retrieve error messages for the + client. + @end deftypefn + + @deftypefn {Function} int lt_dlmutex_register (@w{lt_dlmutex_lock *@var{lock}}, @w{lt_dlmutex_unlock *@var{unlock}}, @w{lt_dlmutex_set_error *@var{seterror}}, @w{lt_dlmutex_geterror *@var{geterror})} + Use this function to register one of each of function ttypes described + above in preparation for multi-threaded use of libltdl. All arguments + must be valid non-@code{NULL} function addresses, or else all + @code{NULL} to return to single threaded operation. + @end deftypefn + + + @node User defined module data + @section Data associated with loaded modules + + Some of the internal information about each loaded module that is + maintained by libltdl is available to the user, in the form of this + structure: + + @deftypefn {Type} {struct} lt_dlinfo @{ @w{char *@var{filename};} @w{char *@var{name};} @w{int @var{ref_count};} @} + @code{lt_dlinfo} is used to store information about a module. + The @var{filename} attribute is a null-terminated character string of + the real module file name. If the module is a libtool module then + @var{name} is its module name (e.g. @code{"libfoo"} for + @code{"dir/libfoo.la"}), otherwise it is set to @code{NULL}. The + @var{ref_count} attribute is a reference counter that describes how + often the same module is currently loaded. + @end deftypefn + + The following function will return a pointer to libltdl's internal copy + of this structure for the given @var{handle}: + + @deftypefun {const lt_dlinfo *} lt_dlgetinfo (@w{lt_dlhandle @var{handle}}) + Return a pointer to a struct that contains some information about + the module @var{handle}. The contents of the struct must not be modified. + Return @code{NULL} on failure. + @end deftypefun + + Furthermore, in order to save you from having to keep a list of the + handles of all the modules you have loaded, these functions allow you to + iterate over libltdl's list of loaded modules: + + @deftypefun int lt_dlforeach (@w{int (*@var{func}) (lt_dlhandle @var{handle}, lt_ptr @var{data})}, @w{lt_ptr @var{data}}) + For each loaded module call the function @var{func}. The argument + @var{handle} is the handle of one of the loaded modules, @var{data} is + the @var{data} argument passed to @code{lt_dlforeach}. + As soon as @var{func} returns a non-zero value for one of the handles, + @code{lt_dlforeach} will stop calling @var{func} and immediately return 1. + Otherwise 0 is returned. + @end deftypefun + + @deftypefun lt_dlhandle lt_dlhandle_next (@w{lt_dlhandle place}) + Iterate over the loaded module handles, returning the first handle in the + list if @var{place} is @code{NULL}, and the next one on subsequent calls. + If @var{place} is the last element in the list of loaded modules, this + function returns @code{NULL}. + @end deftypefun + + Of course, you would still need to maintain your own list of loaded + module handles to parallel the list maintained by libltdl if there are + any other data that you need to associate with each handle for the + purposes of your application. However, if you use the following + @sc{api} calls to associate your application data with individual module + handles as they are loaded there is actually no need to do that. You + must first obtain a unique caller id from libltdl which you subsequently + use to retrieve the data you stored earlier. This allows for different + libraries that each wish to store their own data against loaded modules + to do so without interfering with one another's data. + + @deftp {Type} lt_dlcaller_id + The opaque type used to hold individual data set keys. + @end deftp + + @deftypefun lt_dlcaller_id lt_dlcaller_register (void) + Use this to obtain a unique key to store and retrieve individual sets of + per module data. + @end deftypefun + + @deftypefun lt_ptr lt_dlcaller_set_data (@w{lt_dlcaller_id @var{key}}, @w{lt_dlhandle @var{handle}}, @w{lt_ptr @var{data}}) + Set @var{data} as the set of data uniquely associated with @var{key} and + @var{handle} for later retrieval. This function returns the @var{data} + previously associated with @var{key} and @var{handle} if any. A result of + 0, may indicate that a diagnostic for the last error (if any) is available + from @code{lt_dlerror()}. + + For example, to correctly remove some associated data: + + @example + lt_ptr stale = lt_dlcaller_set_data (key, handle, 0); + if (stale == NULL) + @{ + char *error_msg = lt_dlerror (); + + if (error_msg != NULL) + @{ + my_error_handler (error_msg); + return STATUS_FAILED; + @} + @} + else + @{ + free (stale); + @} + @end example + @end deftypefun + + @deftypefun lt_ptr lt_dlcaller_get_data (@w{lt_dlcaller_id @var{key}}, @w{lt_dlhandle @var{handle}}) + Return the address of the data associated with @var{key} and + @var{handle}, or else @code{NULL} if there is none. + @end deftypefun + + The preceding functions can be combined with @code{lt_dlforeach} to + implement search and apply operations without the need for your + application to track the modules that have been loaded and unloaded: + + @example + int + my_dlcaller_callback (lt_dlhandle handle, lt_ptr key_ptr) + @{ + struct my_module_data *my_data; + + my_data = lt_dlcaller_get_data (handle, (lt_dlcaller_id) *key_ptr); + + return process (my_data); + @} + + int + my_dlcaller_foreach (lt_dlcaller_id key) + @{ + lt_dlforeach (my_dlcaller_callback, (lt_ptr) &key); + @} + @end example + + + @node Module loaders for libltdl + @section How to create and register new module loaders + + Sometimes libltdl's many ways of gaining access to modules are not + sufficient for the purposes of a project. You can write your own + loader, and register it with libltdl so that @code{lt_dlopen} will be + able to use it. + + Writing a loader involves writing at least three functions which can be + called by @code{lt_dlopen}, @code{lt_dlsym} and @code{lt_dlclose}. + Optionally, you can provide a finalisation function to perform any + cleanup operations when @code{lt_dlexit} executes, and a symbol prefix + string which will be prepended to any symbols passed to @code{lt_dlsym}. + These functions must match the function pointer types below, after + which they can be allocated to an instance of @code{lt_user_dlloader} + and registered. + + Registering the loader requires that you choose a name for it, so that it + can be recognised by @code{lt_dlloader_find} and removed with + @code{lt_dlloader_remove}. The name you choose must be unique, and not + already in use by libltdl's builtin loaders: + + @table @asis + @item "dlopen" + The system dynamic library loader, if one exists. + @item "dld" + The @sc{gnu} dld loader, if @file{libdld} was installed when libltdl was + built. + @item "dlpreload" + The loader for @code{lt_dlopen}ing of preloaded static modules. + @end table + + The prefix "dl" is reserved for loaders supplied with future versions of + libltdl, so you should not use that for your own loader names. + + @noindent + The following types are defined in @file{ltdl.h}: + + @deftp {Type} lt_module + @code{lt_module} is a dlloader dependent module. + The dynamic module loader extensions communicate using these low + level types. + @end deftp + + @deftp {Type} lt_dlloader + @code{lt_dlloader} is a handle for module loader types. + @end deftp + + @deftp {Type} lt_dlloader_data + @code{lt_dlloader_data} is used for specifying loader instance data. + @end deftp + + @deftypefn {Type} {struct} lt_user_dlloader @{@w{const char *@var{sym_prefix};} @w{lt_module_open *@var{module_open};}@w{lt_module_close *@var{module_close};} @w{lt_find_sym *@var{find_sym};} @w{lt_dlloader_exit *@var{dlloader_exit};} @w{lt_dlloader_data @var{dlloader_data};} @} + If you want to define a new way to open dynamic modules, and have the + @code{lt_dlopen} @sc{api} use it, you need to instantiate one of these + structures and pass it to @code{lt_dlloader_add}. You can pass whatever + you like in the @var{dlloader_data} field, and it will be passed back as + the value of the first parameter to each of the functions specified in + the function pointer fields. + @end deftypefn + + @deftypefn {Type} lt_module lt_module_open (@w{lt_user_data @var{loader_data},} @w{const char *@var{filename}}) + The type of the loader function for an @code{lt_dlloader} module + loader. The value set in the dlloader_data field of the @code{struct + lt_user_dlloader} structure will be passed into this function in the + @var{loader_data} parameter. Implementation of such a function should + attempt to load the named module, and return an @code{lt_module} + suitable for passing in to the associated @code{lt_module_close} and + @code{lt_sym_find} function pointers. If the function fails it should + return @code{NULL}, and set the error message with @code{lt_dlseterror}. + @end deftypefn + + @deftypefn {Type} int lt_module_close (@w{lt_dlloader_data @var{loader_data},} @w{lt_module @var{module}}) + The type of the unloader function for a user defined module loader. + Implementatation of such a function should attempt to release + any resources tied up by the @var{module} module, and then unload it + from memory. If the function fails for some reason, set the error + message with @code{lt_dlseterror} and return non-zero. + @end deftypefn + + @deftypefn {Type} lt_ptr lt_find_sym (@w{lt_user_data @var{loader_data},} @w{lt_module @var{module},} @w{const char *@var{symbol}}) + The type of the symbol lookup function for a user defined module loader. + Implementation of such a function should return the address of the named + @var{symbol} in the module @var{module}, or else set the error message + with @code{lt_dlseterror} and return @code{NULL} if lookup fails. + @end deftypefn + + @deftypefn {Type} int lt_dlloader_exit (@w{lt_user_data @var{loader_data}}) + The type of the finalisation function for a user defined module loader. + Implementation of such a function should free any resources associated + with the loader, including any user specified data in the + @code{dlloader_data} field of the @code{lt_user_dlloader}. If non-@code{NULL}, + the function will be called by @code{lt_dlexit}, and + @code{lt_dlloader_remove}. + @end deftypefn + + For example: + + @example + int + register_myloader (void) + @{ + lt_user_dlloader dlloader; + + /* User modules are responsible for their own initialisation. */ + if (myloader_init () != 0) + return MYLOADER_INIT_ERROR; + + dlloader.sym_prefix = NULL; + dlloader.module_open = myloader_open; + dlloader.module_close = myloader_close; + dlloader.find_sym = myloader_find_sym. + dlloader.dlloader_exit = myloader_exit; + dlloader.dlloader_data = (lt_user_data)myloader_function; + + /* Add my loader as the default module loader. */ + if (lt_dlloader_add (lt_dlloader_next (NULL), &dlloader, "myloader") != 0) + return ERROR; + + return OK; + @} + @end example + + Note that if there is any initialisation required for the loader, + it must be performed manually before the loader is registered -- + libltdl doesn't handle user loader initialisation. + + Finalisation @emph{is} handled by libltdl however, and it is important + to ensure the @code{dlloader_exit} callback releases any resources claimed + during the initialisation phase. + + @page + @noindent + libltdl provides the following functions for writing your own module + loaders: + + @deftypefun int lt_dlloader_add (@w{lt_dlloader *@var{place},} @w{lt_user_dlloader *@var{dlloader},} @w{const char *@var{loader_name}}) + Add a new module loader to the list of all loaders, either as the + last loader (if @var{place} is @code{NULL}), else immediately before the + loader passed as @var{place}. @var{loader_name} will be returned by + @code{lt_dlloader_name} if it is subsequently passed a newly + registered loader. These @var{loader_name}s must be unique, or + @code{lt_dlloader_remove} and @code{lt_dlloader_find} cannot + work. Returns 0 for success. + + @example + @{ + /* Make myloader be the last one. */ + if (lt_dlloader_add (NULL, myloader) != 0) + perror (lt_dlerror ()); + @} + @end example + @end deftypefun + + @deftypefun int lt_dlloader_remove (@w{const char *@var{loader_name}}) + Remove the loader identified by the unique name, @var{loader_name}. + Before this can succeed, all modules opened by the named loader must + have been closed. Returns 0 for success, otherwise an error message can + be obtained from @code{lt_dlerror}. + + @example + @{ + /* Remove myloader. */ + if (lt_dlloader_remove ("myloader") != 0) + perror (lt_dlerror ()); + @} + @end example + @end deftypefun + + @deftypefun {lt_dlloader *}lt_dlloader_next (@w{lt_dlloader *@var{place}}) + Iterate over the module loaders, returning the first loader if @var{place} is + @code{NULL}, and the next one on subsequent calls. The handle is for use with + @code{lt_dlloader_add}. + + @example + @{ + /* Make myloader be the first one. */ + if (lt_dlloader_add (lt_dlloader_next (NULL), myloader) != 0) + return ERROR; + @} + @end example + @end deftypefun + + @deftypefun {lt_dlloader *}lt_dlloader_find (@w{const char *@var{loader_name}}) + Return the first loader with a matching @var{loader_name} identifier, or else + @code{NULL}, if the identifier is not found. + + The identifiers which may be used by libltdl itself, if the host + architecture supports them are @dfn{dlopen}@footnote{This is used for + the host dependent module loading @sc{api} -- @code{shl_load} and + @code{LoadLibrary} for example}, @dfn{dld} and @dfn{dlpreload}. + + @example + @{ + /* Add a user loader as the next module loader to be tried if + the standard dlopen loader were to fail when lt_dlopening. */ + if (lt_dlloader_add (lt_dlloader_find ("dlopen"), myloader) != 0) + return ERROR; + @} + @end example + @end deftypefun + + @deftypefun {const char *}lt_dlloader_name (@w{lt_dlloader *@var{place}}) + Return the identifying name of @var{PLACE}, as obtained from + @code{lt_dlloader_next} or @code{lt_dlloader_find}. If this function fails, + it will return @code{NULL} and set an error for retrieval with + @code{lt_dlerror}. + @end deftypefun + + @deftypefun {lt_user_data *}lt_dlloader_data (@w{lt_dlloader *@var{place}}) + Return the address of the @code{dlloader_data} of @var{PLACE}, as + obtained from @code{lt_dlloader_next} or @code{lt_dlloader_find}. If + this function fails, it will return @code{NULL} and set an error for + retrieval with @code{lt_dlerror}. + @end deftypefun + + @subsection Error handling within user module loaders + + @deftypefun int lt_dladderror (@w{const char *@var{diagnostic}}) + This function allows you to integrate your own error messages into + @code{lt_dlerror}. Pass in a suitable diagnostic message for return by + @code{lt_dlerror}, and an error identifier for use with + @code{lt_dlseterror} is returned. + + If the allocation of an identifier fails, this function returns -1. + + @example + int myerror = lt_dladderror ("Doh!"); + if (myerror < 0) + perror (lt_dlerror ()); + @end example + @end deftypefun + + @deftypefun int lt_dlseterror (@w{int @var{errorcode}}) + When writing your own module loaders, you should use this function to + raise errors so that they are propogated through the @code{lt_dlerror} + interface. All of the standard errors used by libltdl are declared in + @file{ltdl.h}, or you can add more of your own with + @code{lt_dladderror}. This function returns 0 on success. + + @example + if (lt_dlseterror (LTDL_ERROR_NO_MEMORY) != 0) + perror (lt_dlerror ()); + @end example + @end deftypefun + @node Distributing libltdl @section How to distribute libltdl with your package Even though libltdl is installed together with libtool, you may wish to ! include libltdl in the distribution of your package, for the convenience of users of your package that don't have libtool or libltdl installed. ! In this case, you must decide whether to manually add the @code{ltdl} ! objects to your package, or else which flavor of libltdl you want to use: ! a convenience library or an installable libtool library. ! ! The most simplistic way to add @code{libltdl} to your package is to copy ! the source files, @file{ltdl.c} and @file{ltdl.h}, to a source directory ! withing your package and to build and link them along with the rest of ! your sources. To help you do this, the m4 macros for autoconf are ! available in @file{ltdl.m4}. You must ensure that they are available in ! @file{aclocal.m4} before you run autoconf -- by appending the contents ! of @file{ltdl.m4} to @file{acinclude.m4}, if you are using automake, or ! to @file{aclocal.m4} if you are not. Having made the macros available, ! you must add a call to the @samp{AC_LIB_LTDL} macro to your package's ! @file{configure.in} to perform the configure time checks required to ! build @file{ltdl.o} correctly. This method has problems if you then try ! to link the package binaries with an installed libltdl, or a library ! which depends on libltdl: you may have problems with duplicate symbol ! definitions. One advantage of the convenience library is that it is not installed, so the fact that you use libltdl will not be apparent to the user, and it will not overwrite a pre-installed version of libltdl a user might have. ! On the other hand, if you want to upgrade libltdl for any reason ! (e.g. a bugfix) you'll have to recompile your package instead of just replacing an installed version of libltdl. However, if your programs or libraries are linked with other libraries that use such a pre-installed version of libltdl, you may get linker *************** *** 3032,3042 **** which don't depend on other libraries that might use libltdl too. In order to enable this flavor of libltdl, you should add the line @samp{AC_LIBLTDL_CONVENIENCE} to your @file{configure.in}, ! @emph{before} @samp{AM_PROG_LIBTOOL}. In order to select the installable version of libltdl, you should add a call of the macro @samp{AC_LIBLTDL_INSTALLABLE} to your ! @file{configure.in} @emph{before} @samp{AM_PROG_LIBTOOL}. This macro will check whether libltdl is already installed and, if not, request the libltdl embedded in your package to be built and installed. Note, however, that no version checking is performed. The user may override --- 3391,3401 ---- which don't depend on other libraries that might use libltdl too. In order to enable this flavor of libltdl, you should add the line @samp{AC_LIBLTDL_CONVENIENCE} to your @file{configure.in}, ! @emph{before} @samp{AC_PROG_LIBTOOL}. In order to select the installable version of libltdl, you should add a call of the macro @samp{AC_LIBLTDL_INSTALLABLE} to your ! @file{configure.in} @emph{before} @samp{AC_PROG_LIBTOOL}. This macro will check whether libltdl is already installed and, if not, request the libltdl embedded in your package to be built and installed. Note, however, that no version checking is performed. The user may override *************** *** 3049,3055 **** to a subdirectory @samp{libltdl} in your package. Both macros accept an optional argument to specify the location of the @samp{libltdl} directory. By the default both macros assume that it ! is @samp{$@{top_builddir@}/libltdl}. Whatever macro you use, it is up to you to ensure that your @file{configure.in} will configure libltdl, using --- 3408,3414 ---- to a subdirectory @samp{libltdl} in your package. Both macros accept an optional argument to specify the location of the @samp{libltdl} directory. By the default both macros assume that it ! is @samp{$@{top_srcdir@}/libltdl}. Whatever macro you use, it is up to you to ensure that your @file{configure.in} will configure libltdl, using *************** *** 3066,3072 **** If you're using the convenience libltdl, @var{LIBLTDL} will be the pathname for the convenience version of libltdl and @var{INCLTDL} will be @samp{-I} followed by the directory that contains libltdl, both starting ! with @samp{$@{top_builddir@}/}. If you request an installed version of libltdl and one is found@footnote{Even if libltdl is installed, --- 3425,3431 ---- If you're using the convenience libltdl, @var{LIBLTDL} will be the pathname for the convenience version of libltdl and @var{INCLTDL} will be @samp{-I} followed by the directory that contains libltdl, both starting ! with @samp{$@{top_builddir@}/} or @samp{$@{top_srcdir@}/}, respectively. If you request an installed version of libltdl and one is found@footnote{Even if libltdl is installed, *************** *** 3085,3091 **** and link it with @samp{$(LIBLTDL)}, using libtool. You should probably also add @samp{AC_LIBTOOL_DLOPEN} to your ! @file{configure.in} @emph{before} @samp{AM_PROG_LIBTOOL}, otherwise libtool will assume no dlopening mechanism is supported, and revert to dlpreopening, which is probably not what you want. --- 3444,3450 ---- and link it with @samp{$(LIBLTDL)}, using libtool. You should probably also add @samp{AC_LIBTOOL_DLOPEN} to your ! @file{configure.in} @emph{before} @samp{AC_PROG_LIBTOOL}, otherwise libtool will assume no dlopening mechanism is supported, and revert to dlpreopening, which is probably not what you want. *************** *** 3110,3116 **** dnl Check for dlopen support AC_LIBTOOL_DLOPEN dnl Configure libtool ! AM_PROG_LIBTOOL dnl Configure libltdl AC_CONFIG_SUBDIRS(libltdl) ... --- 3469,3475 ---- dnl Check for dlopen support AC_LIBTOOL_DLOPEN dnl Configure libtool ! AC_PROG_LIBTOOL dnl Configure libltdl AC_CONFIG_SUBDIRS(libltdl) ... *************** *** 3124,3132 **** INCLUDES = $(INCLTDL) myprog_LDFLAGS = -export-dynamic ! # The quotes around -dlopen below fool automake into accepting it ! myprog_LDADD = $(LIBLTDL) "-dlopen" self "-dlopen" libfoo.la ! myprog_DEPENDENCIES = $(LIBLTDL) libfoo.la ... @end example --- 3483,3491 ---- INCLUDES = $(INCLTDL) myprog_LDFLAGS = -export-dynamic ! # The quotes around -dlopen below fool automake <= 1.4 into accepting it ! myprog_LDADD = $(LIBLTDL) "-dlopen" self "-dlopen" foo1.la ! myprog_DEPENDENCIES = $(LIBLTDL) foo1.la ... @end example *************** *** 3271,3276 **** --- 3630,3637 ---- @itemx demo-static.test @itemx demo-shared.test @itemx demo-nofast.test + @itemx demo-pic.test + @itemx demo-nopic.test @pindex demo-conf.test @pindex demo-exec.test @pindex demo-inst.test *************** *** 3279,3284 **** --- 3640,3647 ---- @pindex demo-static.test @pindex demo-shared.test @pindex demo-nofast.test + @pindex demo-pic.test + @pindex demo-nopic.test These programs check to see that the @file{demo} subdirectory of the libtool distribution can be configured, built, installed, and uninstalled correctly. *************** *** 3293,3299 **** (@samp{--disable-shared}), and @file{demo-shared.test} builds only shared libraries (@samp{--disable-static}). @file{demo-nofast.test} configures @file{demo/libtool} to ! disable the fast-install mode (@samp{--enable-fast-install=no}. @item deplibs.test @pindex deplibs.test --- 3656,3665 ---- (@samp{--disable-shared}), and @file{demo-shared.test} builds only shared libraries (@samp{--disable-static}). @file{demo-nofast.test} configures @file{demo/libtool} to ! disable the fast-install mode (@samp{--enable-fast-install=no}). ! @file{demo-pic.test} configures @file{demo/libtool} to ! prefer building PIC code (@samp{--with-pic}), @file{demo-nopic.test} ! to prefer non-PIC code (@samp{--without-pic}). @item deplibs.test @pindex deplibs.test *************** *** 3321,3326 **** --- 3687,3726 ---- Checks whether libtool will not try to link with a previously installed version of a library when it should be linking with a just-built one. + @item depdemo-conf.test + @itemx depdemo-exec.test + @itemx depdemo-inst.test + @itemx depdemo-make.test + @itemx depdemo-unst.test + @itemx depdemo-static.test + @itemx depdemo-shared.test + @itemx depdemo-nofast.test + @pindex depdemo-conf.test + @pindex depdemo-exec.test + @pindex depdemo-inst.test + @pindex depdemo-make.test + @pindex depdemo-unst.test + @pindex depdemo-static.test + @pindex depdemo-shared.test + @pindex depdemo-nofast.test + These programs check to see that the @file{depdemo} subdirectory of the + libtool distribution can be configured, built, installed, and + uninstalled correctly. + + The @file{depdemo} subdirectory contains a demonstration of inter-library + dependencies with libtool. The test programs link some interdependent + libraries. + + The tests @file{depdemo-make.test}, @file{depdemo-exec.test}, + @file{depdemo-inst.test} and @file{depdemo-unst.test} are executed + four times, under four different libtool configurations: + @file{depdemo-conf.test} configures @file{depdemo/libtool} to build both + static and shared libraries, @file{depdemo-static.test} builds only static + libraries (@samp{--disable-shared}), and @file{depdemo-shared.test} builds + only shared libraries (@samp{--disable-static}). + @file{depdemo-nofast.test} configures @file{depdemo/libtool} to + disable the fast-install mode (@samp{--enable-fast-install=no}. + @item mdemo-conf.test @itemx mdemo-exec.test @itemx mdemo-inst.test *************** *** 3359,3365 **** @item assign.test @pindex assign.test ! Checks whether we don't put break or continue on the same line as an assignment in the libtool script. @item link.test --- 3759,3765 ---- @item assign.test @pindex assign.test ! Checks whether we don't put break or continue on the same line as an assignment in the libtool script. @item link.test *************** *** 3470,3476 **** worthwhile to send e-mail to @value{MAILLIST}, to make sure that you are not duplicating existing work. ! If you find that any porting documentation is missing, please complain! Complaints with patches and improvements to the documentation, or to libtool itself, are more than welcome. --- 3870,3876 ---- worthwhile to send e-mail to @value{MAILLIST}, to make sure that you are not duplicating existing work. ! If you find that any porting documentation is missing, please complain! Complaints with patches and improvements to the documentation, or to libtool itself, are more than welcome. *************** *** 3520,3527 **** the information to them. To do the port yourself, you'll definitely need to modify the ! @code{ltconfig} script in order to make platform-specific changes to the ! configuration process. You should search the script for the @code{PORTME} keyword, which will give you some hints on what you'll need to change. In general, all that is involved is modifying the appropriate configuration variables (@pxref{libtool script contents}). --- 3920,3927 ---- the information to them. To do the port yourself, you'll definitely need to modify the ! @code{libtool.m4} macros in order to make platform-specific changes to ! the configuration process. You should search that file for the @code{PORTME} keyword, which will give you some hints on what you'll need to change. In general, all that is involved is modifying the appropriate configuration variables (@pxref{libtool script contents}). *************** *** 3530,3537 **** yours, and make your changes based on that. In some cases, however, your system will differ significantly from every other supported system, and it may be necessary to add new configuration variables, and modify ! the @code{ltmain.sh} script accordingly. Be sure to write to the ! mailing list before you make changes to @code{ltmain.sh}, since they may have advice on the most effective way of accomplishing what you want. @node Porting inter-library dependencies --- 3930,3937 ---- yours, and make your changes based on that. In some cases, however, your system will differ significantly from every other supported system, and it may be necessary to add new configuration variables, and modify ! the @code{ltmain.in} script accordingly. Be sure to write to the ! mailing list before you make changes to @code{ltmain.in}, since they may have advice on the most effective way of accomplishing what you want. @node Porting inter-library dependencies *************** *** 3544,3550 **** Kuratomi @email{badger@@prtr-13.ucsc.edu}. Here's a shortened version of the message that contained his patch: ! The basic architecture is this: in @file{ltconfig.in}, the person who writes libtool makes sure @samp{$deplibs} is included in @samp{$archive_cmds} somewhere and also sets the variable @samp{$deplibs_check_method}, and maybe @samp{$file_magic_cmd} when --- 3944,3950 ---- Kuratomi @email{badger@@prtr-13.ucsc.edu}. Here's a shortened version of the message that contained his patch: ! The basic architecture is this: in @file{libtool.m4}, the person who writes libtool makes sure @samp{$deplibs} is included in @samp{$archive_cmds} somewhere and also sets the variable @samp{$deplibs_check_method}, and maybe @samp{$file_magic_cmd} when *************** *** 3558,3569 **** @vindex file_magic_test_file looks in the library link path for libraries that have the right libname. Then it runs @samp{$file_magic_cmd} on the library and checks ! for a match against @samp{regex} using @code{egrep}. When ! @var{file_magic_test_file} is set in @file{ltconfig}, it is used as an argument to @samp{$file_magic_cmd} in order to verify whether the regular expression matches its output, and warn the user otherwise. ! @item test_compile @vindex test_compile just checks whether it is possible to link a program out of a list of libraries, and checks which of those are listed in the output of --- 3958,3969 ---- @vindex file_magic_test_file looks in the library link path for libraries that have the right libname. Then it runs @samp{$file_magic_cmd} on the library and checks ! for a match against @var{regex} using @code{egrep}. When ! @var{file_magic_test_file} is set by @file{libtool.m4}, it is used as an argument to @samp{$file_magic_cmd} in order to verify whether the regular expression matches its output, and warn the user otherwise. ! @item test_compile @vindex test_compile just checks whether it is possible to link a program out of a list of libraries, and checks which of those are listed in the output of *************** *** 3585,3591 **** @item unknown @vindex unknown ! is the default for all systems unless overridden in @file{ltconfig.in}. It is the same as @samp{none}, but it documents that we really don't know what the correct value should be, and we welcome patches that improve it. --- 3985,3991 ---- @item unknown @vindex unknown ! is the default for all systems unless overridden in @file{libtool.m4}. It is the same as @samp{none}, but it documents that we really don't know what the correct value should be, and we welcome patches that improve it. *************** *** 3638,3643 **** --- 4038,4044 ---- * References:: Finding more information. * Compilers:: Creating object files from source files. * Reloadable objects:: Binding object files together. + * Multiple dependencies:: Removing duplicate dependant libraries. * Archivers:: Programs that create static archives. @end menu *************** *** 3655,3660 **** --- 4056,4075 ---- Sun's free service area (@url{http://www.sun.com/service/online/free.html}) and documentation server (@url{http://docs.sun.com/}). + + @item + Compaq's Tru64 UNIX online documentation is at + (@url{http://tru64unix.compaq.com/faqs/publications/pub_page/doc_list.html}) + with C++ documentation at + (@url{http://tru64unix.compaq.com/cplus/docs/index.htm}). + + @item + Hewlett-Packard has online documentation at + (@url{http://docs.hp.com/index.html}). + + @item + IBM has online documentation at + (@url{http://www.rs6000.ibm.com/resource/aix_resource/Pubs/}). @end itemize @node Compilers *************** *** 3721,3726 **** --- 4136,4163 ---- reloadable object may be treated as exactly equivalent to other objects. + @node Multiple dependencies + @subsection Multiple dependencies + + On most modern platforms the order that dependent libraries are listed + has no effect on object generation. In theory, there are platforms + which require libraries which provide missing symbols to other libraries + to listed after those libraries whose symbols they provide. + + Particularly, if a pair of static archives each resolve some of the + other's symbols, it might be necessary to list one of those archives + both before and after the other one. Libtool does not currently cope + with this situation well, since dupicate libraries are removed from + thr link line. + + If you find yourself developing on a host that requires you to list + libraries multiple times in order for it to generate correctly linked + objects, you can defeat libtool's removal algorithm like this: + + @example + $ libtool ... -lfoo -lbar -Wl,-lfoo + @end example + @node Archivers @subsection Archivers *************** *** 3739,3750 **** @cindex implementation of libtool @cindex libtool implementation ! The @code{libtool} script is generated by @code{ltconfig} ! (@pxref{Configuring}). From libtool version 0.7 to 1.0, this script simply set shell variables, then sourced the libtool backend, ! @code{ltmain.sh}. @code{ltconfig} from libtool version 1.1 and later ! inlines the contents of @code{ltmain.sh} into the generated ! @code{libtool}, which improves performance on many systems. The convention used for naming variables which hold shell commands for delayed evaluation, is to use the suffix @code{_cmd} where a single --- 4176,4194 ---- @cindex implementation of libtool @cindex libtool implementation ! Since version 1.4, the @code{libtool} script is generated by ! @code{configure} (@pxref{Configuring}). In earlier versions, ! @code{configure} achieved this by calling a helper script called ! @file{ltconfig}. From libtool version 0.7 to 1.0, this script simply set shell variables, then sourced the libtool backend, ! @code{ltmain.sh}. @code{ltconfig} from libtool version 1.1 through 1.3 ! inlined the contents of @code{ltmain.sh} into the generated ! @code{libtool}, which improved performance on many systems. The tests ! that @file{ltconfig} used to perform are now kept in @file{libtool.m4} ! where thay can be written using Autoconf. This has the runtime ! performance benefits of inlined @code{ltmain.sh}, @emph{and} improves ! the build time a little while considerably easing the amount of raw ! shell code that used to need maintaining. The convention used for naming variables which hold shell commands for delayed evaluation, is to use the suffix @code{_cmd} where a single *************** *** 3754,3760 **** evaluation units with the @code{~} character where necessary. Here is a listing of each of the configuration variables, and how they ! are used within @code{ltmain.sh}: @defvar AR The name of the system library archiver. --- 4198,4204 ---- evaluation units with the @code{~} character where necessary. Here is a listing of each of the configuration variables, and how they ! are used within @code{ltmain.sh} (@pxref{Configuring}): @defvar AR The name of the system library archiver. *************** *** 3769,3780 **** linking and possibly shared libraries. @end defvar - @defvar LTCONFIG_VERSION - This is set to the version number of the @code{ltconfig} script, to - prevent mismatches between the configuration information in - @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: --- 4213,4218 ---- *************** *** 3818,3823 **** --- 4256,4272 ---- not used. @end defvar + @defvar old_archive_from_expsyms_cmds + If a static library must be created from the export symbol list in order to + correctly link with a shared library, @samp{old_archive_from_expsyms_cmds} + contains the commands needed to create that static library. When these + commands are executed, the variable @var{soname} contains the name of the + shared library in question, and the @var{$objdir/$newlib} contains the + path of the static library these commands should build. After executing + these commands, libtool will proceed to link against @var{$objdir/$newlib} + instead of @var{soname}. + @end defvar + @defvar build_libtool_libs Whether libtool should build shared libraries on this system. Set to @samp{yes} or @samp{no}. *************** *** 3829,3845 **** @end defvar @defvar compiler_c_o ! Whether the compiler supports the @code{-c} and @code{-o} options simultaneously. Set to @samp{yes} or @samp{no}. @end defvar @defvar compiler_o_lo ! Whether the compiler supports compiling directly to a ".lo" file, i.e whether object files do not have to have the suffix ".o". Set to @samp{yes} or @samp{no}. @end defvar ! @defvar dlopen Whether @code{dlopen} is supported on the platform. Set to @samp{yes} or @samp{no}. @end defvar --- 4278,4294 ---- @end defvar @defvar compiler_c_o ! Whether the compiler supports the @code{-c} and @code{-o} options simultaneously. Set to @samp{yes} or @samp{no}. @end defvar @defvar compiler_o_lo ! Whether the compiler supports compiling directly to a ".lo" file, i.e whether object files do not have to have the suffix ".o". Set to @samp{yes} or @samp{no}. @end defvar ! @defvar dlopen_support Whether @code{dlopen} is supported on the platform. Set to @samp{yes} or @samp{no}. @end defvar *************** *** 3874,3879 **** --- 4323,4335 ---- file @var{export_symbols}. @end defvar + @defvar extract_expsyms_cmds + Commands to extract the exported symbols list from a shared library. + These commands are executed if there is no file @var{$objdir/$soname-def}, + and should write the names of the exported symbols to that file, for + the use of @samp{old_archive_from_expsyms_cmds}. + @end defvar + @defvar fast_install Determines whether libtool will privilege the installer or the developer. The assumption is that installers will seldom run programs *************** *** 3942,3947 **** --- 4398,4409 ---- @var{hardcode_libdir_flag_spec} is specified. @end defvar + @defvar hardcode_into_libs + Whether the platform supports hardcoding of run-paths into libraries. + If enabled, linking of programs will be much simpler but libraries will + need to be relinked during installation. Set to @samp{yes} or @samp{no}. + @end defvar + @defvar hardcode_libdir_flag_spec Flag to hardcode a @var{libdir} variable into a binary, so that the dynamic linker searches @var{libdir} for shared libraries at runtime. *************** *** 3994,3999 **** --- 4456,4467 ---- the file name that the linker finds when given @samp{-l@var{name}}. @end defvar + @defvar link_all_deplibs + Whether libtool must link a program against all its dependency libraries. + Set to @samp{yes} or @samp{no}. Default is @samp{unknown}, which is + a synonym for @samp{yes}. + @end defvar + @defvar link_static_flag Linker flag (passed through the C compiler) used to prevent dynamic linking. *************** *** 4001,4007 **** @defvar need_lib_prefix Whether libtool should automatically prefix module names with 'lib'. ! Set to @samp{yes} or @samp{no}. By default, it is @samp{unknown}, which means the same as @samp{yes}, but documents that we are not really sure about it. @samp{yes} means that it is possible both to @code{dlopen} and to --- 4469,4475 ---- @defvar need_lib_prefix Whether libtool should automatically prefix module names with 'lib'. ! Set to @samp{yes} or @samp{no}. By default, it is @samp{unknown}, which means the same as @samp{yes}, but documents that we are not really sure about it. @samp{yes} means that it is possible both to @code{dlopen} and to *************** *** 4012,4024 **** @defvar need_version Whether versioning is required for libraries, i.e. whether the dynamic linker requires a version suffix for all libraries. ! Set to @samp{yes} or @samp{no}. By default, it is @samp{unknown}, which means the same as @samp{yes}, but documents that we are not really sure about it. @end defvar @defvar need_locks ! Whether files must be locked to prevent conflicts when compiling simultaneously. Set to @samp{yes} or @samp{no}. @end defvar --- 4480,4492 ---- @defvar need_version Whether versioning is required for libraries, i.e. whether the dynamic linker requires a version suffix for all libraries. ! Set to @samp{yes} or @samp{no}. By default, it is @samp{unknown}, which means the same as @samp{yes}, but documents that we are not really sure about it. @end defvar @defvar need_locks ! Whether files must be locked to prevent conflicts when compiling simultaneously. Set to @samp{yes} or @samp{no}. @end defvar *************** *** 4085,4090 **** --- 4553,4565 ---- the file. @end defvar + @defvar striplib + @defvarx old_striplib + Command to strip a shared (@code{striplib}) or static (@code{old_striplib}) + library, respectively. If these variables are empty, the strip flag + in the install mode will be ignored for libraries (@pxref{Install mode}). + @end defvar + @defvar sys_lib_dlsearch_path_spec Expression to get the run-time system library search path. Directories that appear in this list are never hard-coded into executables. *************** *** 4107,4113 **** @defvar version_type The library version numbering type. One of @samp{libtool}, ! @samp{linux}, @samp{osf}, @samp{sunos}, or @samp{none}. @end defvar @defvar whole_archive_flag_spec --- 4582,4589 ---- @defvar version_type The library version numbering type. One of @samp{libtool}, ! @samp{freebsd-aout}, @samp{freebsd-elf}, @samp{irix}, @samp{linux}, ! @samp{osf}, @samp{sunos}, @samp{windows}, or @samp{none}. @end defvar @defvar whole_archive_flag_spec *************** *** 4120,4126 **** @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. --- 4596,4602 ---- @end defvar Variables ending in @samp{_cmds} or @samp{_eval} contain a ! @samp{~}-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. *************** *** 4142,4150 **** @item Rather than reconfiguring libtool every time I make a change to ! @code{ltconfig.in} or @code{ltmain.in}, I keep a permanent ! @code{libtool} script in my @var{PATH}, which sources @code{ltmain.in} ! directly. The following steps describe how to create such a script, where @code{/home/src/libtool} is the directory containing the libtool source --- 4618,4625 ---- @item Rather than reconfiguring libtool every time I make a change to ! @code{ltmain.in}, I keep a permanent @code{libtool} script in my ! @var{PATH}, which sources @code{ltmain.in} directly. The following steps describe how to create such a script, where @code{/home/src/libtool} is the directory containing the libtool source *************** *** 4153,4167 **** @var{PATH}: @example ! trick$ @kbd{cd ~/bin} ! trick$ @kbd{sed '/^# ltmain\.sh/q' /home/src/libtool/libtool > libtool} ! trick$ @kbd{cat >> libtool ! LTCONFIG_VERSION="@@VERSION@@" ! . /home/src/libtool/ltmain.in ! ^D} ! trick$ @kbd{chmod +x libtool} ! trick$ @kbd{libtool --version} ! ltmain.sh (GNU @@PACKAGE@@) @@VERSION@@ trick$ @end example @end itemize --- 4628,4639 ---- @var{PATH}: @example ! trick$ cd ~/bin ! trick$ sed '/^# ltmain\.sh/q' /home/src/libtool/libtool > libtool ! trick$ echo '. /home/src/libtool/ltmain.in' >> libtool ! trick$ chmod +x libtool ! trick$ libtool --version ! ltmain.sh (GNU @@PACKAGE@@) @@VERSION@@@@TIMESTAMP@@ trick$ @end example @end itemize *************** *** 4169,4175 **** The output of the final @samp{libtool --version} command shows that the @code{ltmain.in} script is being used directly. Now, modify @code{~/bin/libtool} or @code{/home/src/libtool/ltmain.in} directly in ! order to test new changes without having to rerun @code{ltconfig}. @page @node Index --- 4641,4649 ---- The output of the final @samp{libtool --version} command shows that the @code{ltmain.in} script is being used directly. Now, modify @code{~/bin/libtool} or @code{/home/src/libtool/ltmain.in} directly in ! order to test new changes without having to rerun @code{configure}. ! ! @include fdl.texi @page @node Index Index: libtool/libltdl/Makefile.am diff -c libtool/libltdl/Makefile.am:1.27.2.5 libtool/libltdl/Makefile.am:1.40 *** libtool/libltdl/Makefile.am:1.27.2.5 Tue Nov 2 04:36:23 1999 --- libtool/libltdl/Makefile.am Sun Jan 28 18:01:41 2001 *************** *** 13,20 **** noinst_LTLIBRARIES = libltdlc.la endif libltdl_la_SOURCES = ltdl.c ! libltdl_la_LDFLAGS = -version-info 1:2:1 libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c --- 13,24 ---- noinst_LTLIBRARIES = libltdlc.la endif + ## Make sure these will be cleaned even when they're not built by + ## default. + CLEANFILES = libltdl.la libltdlc.la + libltdl_la_SOURCES = ltdl.c ! libltdl_la_LDFLAGS = -no-undefined -version-info 3:0:0 libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c Index: libtool/libltdl/configure.in diff -c libtool/libltdl/configure.in:1.38.2.11 libtool/libltdl/configure.in:1.56 *** libtool/libltdl/configure.in:1.38.2.11 Thu Jun 10 07:42:34 1999 --- libtool/libltdl/configure.in Tue Apr 24 16:22:35 2001 *************** *** 2,9 **** AC_INIT(ltdl.c) if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then ! if test -f ${srcdir}/ltconfig && test -f ${srcdir}/ltmain.sh; then # if libltdl is libtoolized, it is assumed to be stand-alone and # installed unless the command line overrides it (tested above) enable_ltdl_install=yes --- 2,16 ---- AC_INIT(ltdl.c) + dnl We shouldn't be using these internal macros of autoconf, + dnl but CONFIG_AUX_DIR($with_auxdir) breaks automake. + AC_ARG_WITH(auxdir, + [ --with-auxdir=DIR path to autoconf auxiliary files], + [AC_CONFIG_AUX_DIRS($with_auxdir)], + [AC_CONFIG_AUX_DIR_DEFAULT]) + if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then ! if test -f ${srcdir}/ltmain.sh; then # if libltdl is libtoolized, it is assumed to be stand-alone and # installed unless the command line overrides it (tested above) enable_ltdl_install=yes *************** *** 14,368 **** fi fi ! AM_INIT_AUTOMAKE(libltdl,1.0,-) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_PROG_CC AC_C_CONST AC_C_INLINE AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) - - AC_ARG_ENABLE(ltdl-install, - [ --enable-ltdl-install install libltdl]) - - AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) - AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) - - dnl Read the libtool configuration - rm -f conftest - ./libtool --config > conftest - . ./conftest - rm -f conftest - - AC_CACHE_CHECK([which extension is used for shared libraries], - libltdl_cv_shlibext, [dnl - ( - last= - for spec in $library_names_spec; do - last="$spec" - done - changequote(, ) - echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest - changequote([, ]) - ) - libltdl_cv_shlibext=`cat conftest` - rm -f conftest - ]) - if test -n "$libltdl_cv_shlibext"; then - AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", - [Define to the extension used for shared libraries, say, ".so". ]) - fi - - AC_CACHE_CHECK([which variable specifies run-time library path], - libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"]) - if test -n "$libltdl_cv_shlibpath_var"; then - AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", - [Define to the name of the environment variable that determines the dynamic library search path. ]) - fi - - AC_CACHE_CHECK([for objdir], - libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"]) - test -z "$libltdl_cv_objdir" && libltdl_cv_objdir=".libs" - AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries. ]) - - AC_HEADER_STDC - AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h) - AC_CHECK_HEADERS(string.h strings.h, break) - AC_CHECK_FUNCS(strchr index, break) - AC_CHECK_FUNCS(strrchr rindex, break) - - AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], - libltdl_cv_preloaded_symbols, [dnl - if test -n "$global_symbol_pipe"; then - libltdl_cv_preloaded_symbols=yes - else - libltdl_cv_preloaded_symbols=no - fi - ]) - if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then - AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, - [Define if libtool can extract symbol lists from object files. ]) - fi - - LIBADD_DL= - AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1) LIBADD_DL="-ldl"], - [AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1)])]) - AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1)], - [AC_CHECK_LIB(dld, shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1) LIBADD_DL="$LIBADD_DL -ldld"])]) - AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1)dnl - test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"]) - AC_SUBST(LIBADD_DL) - - if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then - LIBS_SAVE="$LIBS" - LIBS="$LIBS $LIBADD_DL" - AC_CHECK_FUNCS(dlerror) - LIBS="$LIBS_SAVE" - fi - - dnl Check for command to grab the raw symbol name followed - dnl by C symbol name from nm. - AC_REQUIRE([AC_CANONICAL_HOST])dnl - AC_REQUIRE([AC_PROG_NM])dnl - # Check for command to grab the raw symbol name followed by C symbol from nm. - AC_MSG_CHECKING([command to parse $NM output]) - AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe, - [# These are sane defaults that work on at least a few old systems. - # {They come from Ultrix. What could be older than Ultrix?!! ;)} - - changequote(,)dnl - # Character class describing NM global symbol codes. - ac_symcode='[BCDEGRST]' - - # Regexp to match symbols that can be accessed directly from C. - ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - - # Transform the above into a raw symbol and a C symbol. - ac_symxfrm='\1 \2\3 \3' - - # Transform an extracted symbol line into a proper C declaration - ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" - - # Define system-specific variables. - case "$host_os" in - aix*) - ac_symcode='[BCDT]' - ;; - cygwin* | mingw*) - ac_symcode='[ABCDGISTW]' - ;; - hpux*) - ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" - ;; - irix*) - ac_symcode='[BCDEGRST]' - ;; - solaris*) - ac_symcode='[BDT]' - ;; - esac - - # If we're using GNU nm, then use its standard symbol codes. - if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then - ac_symcode='[ABCDGISTW]' - fi - changequote([,])dnl - - # Try without a prefix undercore, then with it. - for ac_symprfx in "" "_"; do - - ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'" ! # Check to see that the pipe works correctly. ! ac_pipe_works=no ! rm -f conftest.$ac_ext ! cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then ! ! # Try sorting and uniquifying the output. ! if sort "$ac_nlist" | uniq > "$ac_nlist"T; then ! mv -f "$ac_nlist"T "$ac_nlist" ! else ! rm -f "$ac_nlist"T ! fi ! ! # Make sure that we snagged all the symbols we need. ! if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then ! if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then ! cat < conftest.c ! #ifdef __cplusplus ! extern "C" { ! #endif ! ! EOF ! # Now generate the symbol file. ! eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c' ! ! cat <> conftest.c ! #if defined (__STDC__) && __STDC__ ! # define lt_ptr_t void * ! #else ! # define lt_ptr_t char * ! # define const ! #endif ! ! /* The mapping between symbol names and symbols. */ ! const struct { ! const char *name; ! lt_ptr_t address; ! } ! changequote(,)dnl ! lt_preloaded_symbols[] = ! changequote([,])dnl ! { ! EOF ! sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c ! cat <<\EOF >> conftest.c ! {0, (lt_ptr_t) 0} ! }; ! ! #ifdef __cplusplus ! } ! #endif ! EOF ! # Now try linking the two files. ! mv conftest.$ac_objext conftstm.$ac_objext ! ac_save_LIBS="$LIBS" ! ac_save_CFLAGS="$CFLAGS" ! LIBS="conftstm.$ac_objext" ! CFLAGS="$CFLAGS$no_builtin_flag" ! if AC_TRY_EVAL(ac_link) && test -s conftest; then ! ac_pipe_works=yes ! else ! echo "configure: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC ! fi ! LIBS="$ac_save_LIBS" ! CFLAGS="$ac_save_CFLAGS" ! else ! echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC ! fi ! else ! echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC ! fi ! else ! echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC ! fi ! else ! echo "$progname: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC ! fi ! rm -rf conftest* conftst* ! ! # Do not use the global_symbol_pipe unless it works. ! if test "$ac_pipe_works" = yes; then ! if test x"$ac_symprfx" = x"_"; then ! ac_cv_sys_symbol_underscore=yes ! else ! ac_cv_sys_symbol_underscore=no ! fi ! break ! else ! ac_cv_sys_global_symbol_pipe= ! fi ! done ! ]) ! ! ac_result=yes ! if test -z "$ac_cv_sys_global_symbol_pipe"; then ! ac_result=no ! fi ! AC_MSG_RESULT($ac_result) ! ! dnl does the compiler prefix global symbols with an underscore? ! AC_MSG_CHECKING([for _ prefix in compiled symbols]) ! AC_CACHE_VAL(ac_cv_sys_symbol_underscore, ! [ac_cv_sys_symbol_underscore=no ! cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then ! # See whether the symbols have a leading underscore. ! if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ! ac_cv_sys_symbol_underscore=yes ! else ! if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then ! : ! else ! echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC ! fi ! fi ! else ! echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC ! fi ! else ! echo "configure: failed program was:" >&AC_FD_CC ! cat conftest.c >&AC_FD_CC ! fi ! rm -rf conftest* ! ]) ! AC_MSG_RESULT($ac_cv_sys_symbol_underscore) ! ! if test x"$ac_cv_sys_symbol_underscore" = xyes; then ! if test x"$ac_cv_func_dlopen" = xyes || ! test x"$ac_cv_lib_dl_dlopen" = xyes ; then ! AC_CACHE_CHECK([whether we have to add an underscore for dlsym], ! libltdl_cv_need_uscore, [dnl ! AC_TRY_RUN([ ! #if HAVE_DLFCN_H ! #include ! #endif ! ! #include ! ! #ifdef RTLD_GLOBAL ! # define LTDL_GLOBAL RTLD_GLOBAL ! #else ! # ifdef DL_GLOBAL ! # define LTDL_GLOBAL DL_GLOBAL ! # else ! # define LTDL_GLOBAL 0 ! # endif ! #endif ! ! /* We may have to define LTDL_LAZY_OR_NOW in the command line if we ! find out it does not work in some platform. */ ! #ifndef LTDL_LAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LTDL_LAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LTDL_LAZY_OR_NOW DL_LAZY ! # else ! # ifdef RTLD_NOW ! # define LTDL_LAZY_OR_NOW RTLD_NOW ! # else ! # ifdef DL_NOW ! # define LTDL_LAZY_OR_NOW DL_NOW ! # else ! # define LTDL_LAZY_OR_NOW 0 ! # endif ! # endif ! # endif ! # endif ! #endif ! ! fnord() { int i=42;} ! main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); ! if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); ! if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); } ! ], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes, ! libltdl_cv_need_uscore=cross ! )]) ! fi ! fi ! ! if test x"$libltdl_cv_need_uscore" = xyes; then ! AC_DEFINE(NEED_USCORE, 1, ! [Define if dlsym() requires a leading underscode in symbol names. ]) ! fi dnl Output the makefile AC_OUTPUT(Makefile) --- 21,39 ---- fi fi ! AM_INIT_AUTOMAKE(libltdl,1.1,-) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_PROG_CC AC_C_CONST AC_C_INLINE + + AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) ! AC_LIB_LTDL dnl Output the makefile AC_OUTPUT(Makefile) Index: libtool/libltdl/ltdl.c diff -c libtool/libltdl/ltdl.c:1.64.2.18 libtool/libltdl/ltdl.c:1.134 *** libtool/libltdl/ltdl.c:1.64.2.18 Tue Nov 2 04:36:23 1999 --- libtool/libltdl/ltdl.c Tue Apr 24 15:53:48 2001 *************** *** 1,332 **** /* ltdl.c -- system independent dlopen wrapper ! Copyright (C) 1998-1999 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. This library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ! As a special exception to the GNU Library General Public License, ! if you distribute this file as part of a program that uses GNU libtool ! to create libraries and programs, you may include it under the same distribution terms that you use for the rest of that program. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! Library General Public License for more details. ! You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ ! #define _LTDL_COMPILE_ #if HAVE_CONFIG_H ! #include #endif ! #if HAVE_STRING_H ! #include #endif ! #if HAVE_STRINGS_H ! #include #endif #if HAVE_CTYPE_H ! #include #endif #if HAVE_MALLOC_H ! #include #endif #if HAVE_MEMORY_H ! #include #endif ! #if HAVE_STDLIB_H ! #include ! #endif - #if HAVE_STDIO_H - #include - #endif - #include "ltdl.h" ! /* max. filename length */ ! #ifndef LTDL_FILENAME_MAX ! #define LTDL_FILENAME_MAX 1024 #endif - #undef LTDL_READTEXT_MODE /* fopen() mode flags for reading a text file */ ! #ifdef _WIN32 ! #define LTDL_READTEXT_MODE "rt" #else ! #define LTDL_READTEXT_MODE "r" #endif - #undef LTDL_SYMBOL_LENGTH /* This is the maximum symbol size that won't require malloc/free */ ! #define LTDL_SYMBOL_LENGTH 128 - #undef LTDL_SYMBOL_OVERHEAD /* This accounts for the _LTX_ separator */ ! #define LTDL_SYMBOL_OVERHEAD 5 ! static const char objdir[] = LTDL_OBJDIR; #ifdef LTDL_SHLIB_EXT ! static const char shlib_ext[] = LTDL_SHLIB_EXT; #endif - static const char unknown_error[] = "unknown error"; - static const char dlopen_not_supported_error[] = "dlopen support not available"; - static const char file_not_found_error[] = "file not found"; - static const char no_symbols_error[] = "no symbols defined"; - static const char cannot_open_error[] = "can't open the module"; - static const char cannot_close_error[] = "can't close the module"; - static const char symbol_error[] = "symbol not found"; - static const char memory_error[] = "not enough memory"; - static const char invalid_handle_error[] = "invalid handle"; - static const char buffer_overflow_error[] = "internal buffer overflow"; - static const char shutdown_error[] = "library already shutdown"; - - #ifndef HAVE_PRELOADED_SYMBOLS - /* If libtool won't define it, we'd better do */ - const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } }; - #endif - - static const char *last_error = 0; - - lt_ptr_t (*lt_dlmalloc) LTDL_PARAMS((size_t size)) = (lt_ptr_t(*)LTDL_PARAMS((size_t)))malloc; - void (*lt_dlfree) LTDL_PARAMS((lt_ptr_t ptr)) = (void(*)LTDL_PARAMS((lt_ptr_t)))free; - - typedef struct lt_dltype_t { - struct lt_dltype_t *next; - const char *sym_prefix; /* prefix for symbols */ - int (*mod_init) LTDL_PARAMS((void)); - int (*mod_exit) LTDL_PARAMS((void)); - int (*lib_open) LTDL_PARAMS((lt_dlhandle handle, const char *filename)); - int (*lib_close) LTDL_PARAMS((lt_dlhandle handle)); - lt_ptr_t (*find_sym) LTDL_PARAMS((lt_dlhandle handle, const char *symbol)); - } lt_dltype_t; - - #define LTDL_TYPE_TOP 0 - - typedef struct lt_dlhandle_t { - struct lt_dlhandle_t *next; - lt_dltype_t *type; /* dlopening interface */ - char *filename; /* file name */ - char *name; /* module name */ - int usage; /* usage */ - int depcount; /* number of dependencies */ - lt_dlhandle *deplibs; /* dependencies */ - lt_ptr_t handle; /* system handle */ - lt_ptr_t system; /* system specific data */ - } lt_dlhandle_t; - #undef strdup - #define strdup xstrdup ! static inline char * ! strdup(str) ! const char *str; { ! char *tmp; ! if (!str) ! return 0; ! tmp = (char*) lt_dlmalloc(strlen(str)+1); ! if (tmp) ! strcpy(tmp, str); ! return tmp; } - #if ! HAVE_STRCHR - # if HAVE_INDEX ! # define strchr index - # else ! # define strchr xstrchr ! static inline const char* ! strchr(str, ch) ! const char *str; ! int ch; { ! const char *p; ! for (p = str; *p != (char)ch && *p != '\0'; p++) ! /*NOWORK*/; ! return (*p == (char)ch) ? p : 0; } ! # endif #endif - #if ! HAVE_STRRCHR ! # if HAVE_RINDEX ! # define strrchr rindex ! # else ! # define strrchr xstrrchr ! static inline const char* strrchr(str, ch) ! const char *str; ! int ch; { ! const char *p; ! for (p = str; *p != '\0'; p++) ! /*NOWORK*/; ! ! while (*p != (char)ch && p >= str) ! p--; ! return (*p == (char)ch) ? p : 0; } # endif #endif ! #if HAVE_LIBDL /* dynamic linking with dlopen/dlsym */ #if HAVE_DLFCN_H ! # include #endif #ifdef RTLD_GLOBAL ! # define LTDL_GLOBAL RTLD_GLOBAL #else ! # ifdef DL_GLOBAL ! # define LTDL_GLOBAL DL_GLOBAL ! # else ! # define LTDL_GLOBAL 0 ! # endif ! #endif ! /* We may have to define LTDL_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ ! #ifndef LTDL_LAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LTDL_LAZY_OR_NOW RTLD_LAZY ! # else ! # ifdef DL_LAZY ! # define LTDL_LAZY_OR_NOW DL_LAZY # else ! # ifdef RTLD_NOW ! # define LTDL_LAZY_OR_NOW RTLD_NOW ! # else # ifdef DL_NOW ! # define LTDL_LAZY_OR_NOW DL_NOW ! # else ! # define LTDL_LAZY_OR_NOW 0 # endif ! # endif ! # endif ! # endif #endif - static int - sys_dl_init LTDL_PARAMS((void)) - { - return 0; - } - - static int - sys_dl_exit LTDL_PARAMS((void)) - { - return 0; - } - - static int - sys_dl_open (handle, filename) - lt_dlhandle handle; - const char *filename; - { - handle->handle = dlopen(filename, LTDL_GLOBAL | LTDL_LAZY_OR_NOW); - if (!handle->handle) { #if HAVE_DLERROR ! last_error = dlerror(); #else ! last_error = cannot_open_error; #endif ! return 1; ! } ! return 0; } static int ! sys_dl_close (handle) ! lt_dlhandle handle; { ! if (dlclose(handle->handle) != 0) { ! #if HAVE_DLERROR ! last_error = dlerror(); ! #else ! last_error = cannot_close_error; ! #endif ! return 1; ! } ! return 0; } ! static lt_ptr_t ! sys_dl_sym (handle, symbol) ! lt_dlhandle handle; ! const char *symbol; { ! lt_ptr_t address = dlsym(handle->handle, symbol); ! ! if (!address) ! #if HAVE_DLERROR ! last_error = dlerror(); ! #else ! last_error = symbol_error; ! #endif ! return address; } ! static ! lt_dltype_t ! #ifdef NEED_USCORE ! sys_dl = { LTDL_TYPE_TOP, "_", sys_dl_init, sys_dl_exit, ! sys_dl_open, sys_dl_close, sys_dl_sym }; ! #else ! sys_dl = { LTDL_TYPE_TOP, 0, sys_dl_init, sys_dl_exit, ! sys_dl_open, sys_dl_close, sys_dl_sym }; ! #endif - #undef LTDL_TYPE_TOP - #define LTDL_TYPE_TOP &sys_dl ! #endif #if HAVE_SHL_LOAD /* dynamic linking with shl_load (HP-UX) (comments from gmodule) */ #ifdef HAVE_DL_H ! #include #endif /* some flags are missing on some systems, so we provide --- 1,649 ---- /* ltdl.c -- system independent dlopen wrapper ! Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. This library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ! As a special exception to the GNU Lesser General Public License, ! if you distribute this file as part of a program or library that ! is built using GNU libtool, you may include it under the same distribution terms that you use for the rest of that program. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! Lesser General Public License for more details. ! You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ #if HAVE_CONFIG_H ! # include #endif ! #if HAVE_STDIO_H ! # include #endif ! #if HAVE_STDLIB_H ! # include ! #endif ! ! #if HAVE_STRING_H ! # include ! #else ! # if HAVE_STRINGS_H ! # include ! # endif #endif #if HAVE_CTYPE_H ! # include #endif #if HAVE_MALLOC_H ! # include #endif #if HAVE_MEMORY_H ! # include #endif ! #include "ltdl.h" ! ! /* --- WINDOWS SUPPORT --- */ ! ! ! #ifdef DLL_EXPORT ! # define LT_GLOBAL_DATA __declspec(dllexport) ! #else ! # define LT_GLOBAL_DATA #endif /* fopen() mode flags for reading a text file */ ! #undef LT_READTEXT_MODE ! #ifdef __WINDOWS__ ! # define LT_READTEXT_MODE "rt" #else ! # define LT_READTEXT_MODE "r" ! #endif ! ! ! ! ! /* --- MANIFEST CONSTANTS --- */ ! ! ! /* max. filename length */ ! #ifndef LT_FILENAME_MAX ! # define LT_FILENAME_MAX 1024 #endif /* This is the maximum symbol size that won't require malloc/free */ ! #undef LT_SYMBOL_LENGTH ! #define LT_SYMBOL_LENGTH 128 /* This accounts for the _LTX_ separator */ ! #undef LT_SYMBOL_OVERHEAD ! #define LT_SYMBOL_OVERHEAD 5 ! ! ! ! ! /* --- TYPE DEFINITIONS -- */ ! ! ! /* This type is used for the array of caller data sets in each handler. */ ! typedef struct { ! lt_dlcaller_id key; ! lt_ptr data; ! } lt_caller_data; ! ! ! ! /* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */ ! ! ! /* Extract the diagnostic strings from the error table macro in the same ! order as the enumberated indices in ltdl.h. */ ! ! static const char *lt_dlerror_strings[] = ! { ! #define LT_ERROR(name, diagnostic) (diagnostic), ! lt_dlerror_table ! #undef LT_ERROR ! ! 0 ! }; ! ! /* This structure is used for the list of registered loaders. */ ! struct lt_dlloader { ! struct lt_dlloader *next; ! const char *loader_name; /* identifying name for each loader */ ! const char *sym_prefix; /* prefix for symbols */ ! lt_module_open *module_open; ! lt_module_close *module_close; ! lt_find_sym *find_sym; ! lt_dlloader_exit *dlloader_exit; ! lt_user_data dlloader_data; ! }; ! ! struct lt_dlhandle_struct { ! struct lt_dlhandle_struct *next; ! lt_dlloader *loader; /* dlopening interface */ ! lt_dlinfo info; ! int depcount; /* number of dependencies */ ! lt_dlhandle *deplibs; /* dependencies */ ! lt_module module; /* system module handle */ ! lt_ptr system; /* system specific data */ ! lt_caller_data *caller_data; /* per caller associated data */ ! int flags; /* various boolean stats */ ! }; ! ! /* Various boolean flags can be stored in the flags field of an ! lt_dlhandle_struct... */ ! #define LT_DLGET_FLAG(handle, flag) (((handle)->flags & (flag)) == (flag)) ! #define LT_DLSET_FLAG(handle, flag) ((handle)->flags |= (flag)) ! ! #define LT_DLRESIDENT_FLAG (0x01 << 0) ! /* ...add more flags here... */ ! ! #define LT_DLIS_RESIDENT(handle) LT_DLGET_FLAG(handle, LT_DLRESIDENT_FLAG) ! ! ! #define LT_DLSTRERROR(name) lt_dlerror_strings[LT_CONC(LT_ERROR_,name)] ! ! static const char objdir[] = LTDL_OBJDIR; #ifdef LTDL_SHLIB_EXT ! static const char shlib_ext[] = LTDL_SHLIB_EXT; #endif + #ifdef LTDL_SYSSEARCHPATH + static const char sys_search_path[] = LTDL_SYSSEARCHPATH; + #endif ! ! /* --- MUTEX LOCKING --- */ ! ! ! /* Macros to make it easier to run the lock functions only if they have ! been registered. The reason for the complicated lock macro is to ! ensure that the stored error message from the last error is not ! accidentally erased if the current function doesn't generate an ! error of its own. */ ! #define MUTEX_LOCK() LT_STMT_START { \ ! if (mutex_lock) (*mutex_lock)(); } LT_STMT_END ! #define MUTEX_UNLOCK() LT_STMT_START { \ ! if (mutex_unlock) (*mutex_unlock)(); } LT_STMT_END ! #define MUTEX_SETERROR(errormsg) LT_STMT_START { \ ! if (mutex_seterror) (*mutex_seterror) (errormsg); \ ! else last_error = (errormsg); } LT_STMT_END ! #define MUTEX_GETERROR(errormsg) LT_STMT_START { \ ! if (mutex_seterror) errormsg = (*mutex_geterror)(); \ ! else (errormsg) = last_error; } LT_STMT_END ! ! /* The mutex functions stored here are global, and are necessarily the ! same for all threads that wish to share access to libltdl. */ ! static lt_dlmutex_lock *mutex_lock = 0; ! static lt_dlmutex_unlock *mutex_unlock = 0; ! static lt_dlmutex_seterror *mutex_seterror = 0; ! static lt_dlmutex_geterror *mutex_geterror = 0; ! static const char *last_error = 0; ! ! ! /* Either set or reset the mutex functions. Either all the arguments must ! be valid functions, or else all can be NULL to turn off locking entirely. ! The registered functions should be manipulating a static global lock ! from the lock() and unlock() callbacks, which needs to be reentrant. */ ! int ! lt_dlmutex_register (lock, unlock, seterror, geterror) ! lt_dlmutex_lock *lock; ! lt_dlmutex_unlock *unlock; ! lt_dlmutex_seterror *seterror; ! lt_dlmutex_geterror *geterror; { ! lt_dlmutex_unlock *old_unlock = unlock; ! int errors = 0; ! ! /* Lock using the old lock() callback, if any. */ ! MUTEX_LOCK (); ! ! if ((lock && unlock && seterror && geterror) ! || !(lock || unlock || seterror || geterror)) ! { ! mutex_lock = lock; ! mutex_unlock = unlock; ! mutex_geterror = geterror; ! } ! else ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_MUTEX_ARGS)); ! ++errors; ! } ! /* Use the old unlock() callback we saved earlier, if any. Otherwise ! record any errors using internal storage. */ ! if (old_unlock) ! (*old_unlock) (); ! ! /* Return the number of errors encountered during the execution of ! this function. */ ! return errors; } ! ! /* --- MEMORY HANDLING --- */ ! LT_GLOBAL_DATA lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)) ! = (lt_ptr (*) LT_PARAMS((size_t))) malloc; ! LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)) ! = (void (*) LT_PARAMS((lt_ptr))) free; ! static lt_ptr rpl_realloc LT_PARAMS((lt_ptr ptr, ! size_t size)); ! ! #define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp))) ! #define LT_DLREALLOC(tp, p, n) ((tp *) rpl_realloc ((p), (n) * sizeof(tp))) ! #define LT_DLFREE(p) \ ! LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END ! ! #define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \ ! if ((p) != (q)) { lt_dlfree (p); (p) = (q); } \ ! } LT_STMT_END ! ! ! ! /* --- ERROR MESSAGES --- */ ! ! ! static const char **user_error_strings = 0; ! static int errorcount = LT_ERROR_MAX; ! ! int ! lt_dladderror (diagnostic) ! const char *diagnostic; { ! int index = 0; ! int result = -1; ! const char **temp = (const char **) 0; ! ! MUTEX_LOCK (); ! ! index = errorcount - LT_ERROR_MAX; ! temp = LT_DLREALLOC (const char *, user_error_strings, 1 + index); ! if (temp == 0) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! } ! else ! { ! user_error_strings = temp; ! user_error_strings[index] = diagnostic; ! result = errorcount++; ! } ! MUTEX_UNLOCK (); ! return result; } ! int ! lt_dlseterror (index) ! int index; ! { ! int errors = 0; ! ! MUTEX_LOCK (); ! ! if (index >= errorcount || index < 0) ! { ! /* Ack! Error setting the error message! */ ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_ERRORCODE)); ! ++errors; ! } ! else if (index < LT_ERROR_MAX) ! { ! /* No error setting the error message! */ ! MUTEX_SETERROR (lt_dlerror_strings[errorcount]); ! } ! else ! { ! /* No error setting the error message! */ ! MUTEX_SETERROR (user_error_strings[errorcount - LT_ERROR_MAX]); ! } ! ! MUTEX_UNLOCK (); ! ! return errors; ! } ! ! ! ! ! /* --- REPLACEMENT FUNCTIONS --- */ ! ! ! #undef strdup ! #define strdup rpl_strdup ! ! static char * ! strdup(str) ! const char *str; ! { ! char *tmp = 0; ! ! if (str) ! { ! tmp = LT_DLMALLOC (char, 1+ strlen (str)); ! if (tmp) ! { ! strcpy(tmp, str); ! } ! } ! ! return tmp; ! } ! ! ! #if ! HAVE_STRCMP ! ! #undef strcmp ! #define strcmp rpl_strcmp + static int + strcmp (str1, str2) + const char *str1; + const char *str2; + { + if (str1 == str2) + return 0; + if (str1 == 0) + return -1; + if (str2 == 0) + return 1; + + for (;*str1 && *str2; ++str1, ++str2) + { + if (*str1 != *str2) + break; + } + + return (int)(*str1 - *str2); + } #endif ! #if ! HAVE_STRCHR ! # if HAVE_INDEX ! # define strchr index ! # else ! # define strchr rpl_strchr ! static const char* ! strchr(str, ch) ! const char *str; ! int ch; ! { ! const char *p; ! ! for (p = str; *p != (char)ch && *p != '\0'; ++p) ! /*NOWORK*/; ! ! return (*p == (char)ch) ? p : 0; ! } ! ! # endif ! #endif /* !HAVE_STRCHR */ ! ! #if ! HAVE_STRRCHR ! # if HAVE_RINDEX ! # define strrchr rindex ! # else ! # define strrchr rpl_strrchr ! static const char* strrchr(str, ch) ! const char *str; ! int ch; { ! const char *p, *q = 0; ! for (p = str; *p != '\0'; ++p) ! { ! if (*p == (char) ch) ! { ! q = p; ! } ! } ! return q; } # endif + #endif + + /* NOTE: Neither bcopy nor the memcpy implementation below can + reliably handle copying in overlapping areas of memory, so + do not rely on this behaviour when invoking memcpy later. */ + #if ! HAVE_MEMCPY + + # if HAVE_BCOPY + # define memcpy(dest, src, size) bcopy (src, dest, size) + # else + # define memcpy rpl_memcpy + static char * + memcpy (dest, src, size) + char *dest; + const char *src; + size_t size; + { + size_t i = 0; + + for (i = 0; i < size; ++i) + { + dest[i] = src[i]; + } + + return dest; + } + + # endif #endif + + /* According to Alexandre Oliva , + ``realloc is not entirely portable'' + In any case we want to use the allocator supplied by the user without + burdening them with an lt_dlrealloc function pointer to maintain. + Instead implement our own version (with known boundary conditions) + using lt_dlmalloc and lt_dlfree. */ + static lt_ptr + rpl_realloc (ptr, size) + lt_ptr ptr; + size_t size; + { + if (size < 1) + { + /* For zero or less bytes, free the original memory */ + if (ptr != 0) + { + lt_dlfree (ptr); + } + + return (lt_ptr) 0; + } + else if (ptr == 0) + { + /* Allow reallocation of a NULL pointer. */ + return lt_dlmalloc (size); + } + else + { + /* Allocate a new block, copy and free the old block. */ + lt_ptr mem = lt_dlmalloc (size); + + if (mem) + { + memcpy (mem, ptr, size); + lt_dlfree (ptr); + } + + /* Note that the contents of PTR are not damaged if there is + insufficient memory to realloc. */ + return mem; + } + } + + ! ! /* --- DLOPEN() INTERFACE LOADER --- */ ! ! ! /* The Cygwin dlopen implementation prints a spurious error message to ! stderr if its call to LoadLibrary() fails for any reason. We can ! mitigate this by not using the Cygwin implementation, and falling ! back to our own LoadLibrary() wrapper. */ ! #if HAVE_LIBDL && !defined(__CYGWIN__) /* dynamic linking with dlopen/dlsym */ #if HAVE_DLFCN_H ! # include #endif + #if HAVE_SYS_DL_H + # include + #endif + #ifdef RTLD_GLOBAL ! # define LT_GLOBAL RTLD_GLOBAL #else ! # ifdef DL_GLOBAL ! # define LT_GLOBAL DL_GLOBAL ! # endif ! #endif /* !RTLD_GLOBAL */ ! #ifndef LT_GLOBAL ! # define LT_GLOBAL 0 ! #endif /* !LT_GLOBAL */ ! /* We may have to define LT_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ ! #ifndef LT_LAZY_OR_NOW ! # ifdef RTLD_LAZY ! # define LT_LAZY_OR_NOW RTLD_LAZY # else ! # ifdef DL_LAZY ! # define LT_LAZY_OR_NOW DL_LAZY ! # endif ! # endif /* !RTLD_LAZY */ ! #endif ! #ifndef LT_LAZY_OR_NOW ! # ifdef RTLD_NOW ! # define LT_LAZY_OR_NOW RTLD_NOW ! # else # ifdef DL_NOW ! # define LT_LAZY_OR_NOW DL_NOW # endif ! # endif /* !RTLD_NOW */ #endif + #ifndef LT_LAZY_OR_NOW + # define LT_LAZY_OR_NOW 0 + #endif /* !LT_LAZY_OR_NOW */ #if HAVE_DLERROR ! # define DLERROR(arg) dlerror () #else ! # define DLERROR(arg) LT_DLSTRERROR (arg) #endif ! ! static lt_module ! sys_dl_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; ! { ! lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW); ! ! if (!module) ! { ! MUTEX_SETERROR (DLERROR (CANNOT_OPEN)); ! } ! ! return module; } static int ! sys_dl_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! int errors = 0; ! ! if (dlclose (module) != 0) ! { ! MUTEX_SETERROR (DLERROR (CANNOT_CLOSE)); ! ++errors; ! } ! ! return errors; } ! static lt_ptr ! sys_dl_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_ptr address = dlsym (module, symbol); ! ! if (!address) ! { ! MUTEX_SETERROR (DLERROR (SYMBOL_NOT_FOUND)); ! } ! ! return address; } ! static struct lt_user_dlloader sys_dl = ! { ! # ifdef NEED_USCORE ! "_", ! # else ! 0, ! # endif ! sys_dl_open, sys_dl_close, sys_dl_sym, 0, 0 }; ! #endif /* HAVE_LIBDL */ ! ! ! ! /* --- SHL_LOAD() INTERFACE LOADER --- */ #if HAVE_SHL_LOAD /* dynamic linking with shl_load (HP-UX) (comments from gmodule) */ #ifdef HAVE_DL_H ! # include #endif /* some flags are missing on some systems, so we provide *************** *** 337,1621 **** * BIND_DEFERRED - Delay code symbol resolution until actual reference. * * Optionally: ! * BIND_FIRST - Place the library at the head of the symbol search order. ! * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all unsatisfied ! * symbols as fatal. This flag allows binding of unsatisfied code ! * symbols to be deferred until use. ! * [Perl: For certain libraries, like DCE, deferred binding often ! * causes run time problems. Adding BIND_NONFATAL to BIND_IMMEDIATE ! * still allows unresolved references in situations like this.] ! * BIND_NOSTART - Do not call the initializer for the shared library when the ! * library is loaded, nor on a future call to shl_unload(). ! * BIND_VERBOSE - Print verbose messages concerning possible unsatisfied symbols. * * hp9000s700/hp9000s800: ! * BIND_RESTRICTED - Restrict symbols visible by the library to those present at ! * library load time. ! * DYNAMIC_PATH - Allow the loader to dynamically search for the library specified ! * by the path argument. */ #ifndef DYNAMIC_PATH ! #define DYNAMIC_PATH 0 ! #endif /* DYNAMIC_PATH */ #ifndef BIND_RESTRICTED ! #define BIND_RESTRICTED 0 ! #endif /* BIND_RESTRICTED */ ! #define LTDL_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) ! static int ! sys_shl_init LTDL_PARAMS((void)) { ! return 0; } static int ! sys_shl_exit LTDL_PARAMS((void)) { ! return 0; ! } ! static int ! sys_shl_open (handle, filename) ! lt_dlhandle handle; ! const char *filename; ! { ! handle->handle = shl_load(filename, LTDL_BIND_FLAGS, 0L); ! if (!handle->handle) { ! last_error = cannot_open_error; ! return 1; ! } ! return 0; } ! static int ! sys_shl_close (handle) ! lt_dlhandle handle; { ! if (shl_unload((shl_t) (handle->handle)) != 0) { ! last_error = cannot_close_error; ! return 1; } ! return 0; } ! static lt_ptr_t ! sys_shl_sym (handle, symbol) ! lt_dlhandle handle; ! const char *symbol; ! { ! lt_ptr_t address; ! if (handle->handle && shl_findsym((shl_t*) &(handle->handle), ! symbol, TYPE_UNDEFINED, &address) == 0) ! if (address) ! return address; ! last_error = symbol_error; ! return 0; ! } - static - lt_dltype_t - sys_shl = { LTDL_TYPE_TOP, 0, sys_shl_init, sys_shl_exit, - sys_shl_open, sys_shl_close, sys_shl_sym }; - #undef LTDL_TYPE_TOP - #define LTDL_TYPE_TOP &sys_shl ! #endif ! #if HAVE_DLD ! /* dynamic linking with dld */ ! #if HAVE_DLD_H ! #include #endif ! static int ! sys_dld_init LTDL_PARAMS((void)) ! { ! return 0; ! } ! static int ! sys_dld_exit LTDL_PARAMS((void)) ! { ! return 0; ! } ! static int ! sys_dld_open (handle, filename) ! lt_dlhandle handle; ! const char *filename; ! { ! handle->handle = strdup(filename); ! if (!handle->handle) { ! last_error = memory_error; ! return 1; ! } ! if (dld_link(filename) != 0) { ! last_error = cannot_open_error; ! lt_dlfree(handle->handle); ! return 1; } ! return 0; } static int ! sys_dld_close (handle) ! lt_dlhandle handle; { ! if (dld_unlink_by_file((char*)(handle->handle), 1) != 0) { ! last_error = cannot_close_error; ! return 1; ! } ! lt_dlfree(handle->filename); ! return 0; } ! static lt_ptr_t ! sys_dld_sym (handle, symbol) ! lt_dlhandle handle; ! const char *symbol; { ! lt_ptr_t address = dld_get_func(symbol); ! ! if (!address) ! last_error = symbol_error; ! return address; } ! static ! lt_dltype_t ! sys_dld = { LTDL_TYPE_TOP, 0, sys_dld_init, sys_dld_exit, ! sys_dld_open, sys_dld_close, sys_dld_sym }; ! #undef LTDL_TYPE_TOP ! #define LTDL_TYPE_TOP &sys_dld - #endif - #ifdef _WIN32 ! /* dynamic linking for Win32 */ - #include ! static int ! sys_wll_init LTDL_PARAMS((void)) ! { ! return 0; ! } ! static int ! sys_wll_exit LTDL_PARAMS((void)) ! { ! return 0; ! } ! /* Forward declaration; required to implement handle search below. */ ! static lt_dlhandle handles; ! static int ! sys_wll_open (handle, filename) ! lt_dlhandle handle; ! const char *filename; ! { ! lt_dlhandle cur; ! char *searchname = NULL; ! char *ext = strrchr(filename, '.'); ! ! if (ext) { ! /* FILENAME already has an extension. */ ! searchname = strdup(filename); ! } else { ! /* Append a `.' to stop Windows from adding an ! implicit `.dll' extension. */ ! searchname = (char*)lt_dlmalloc(2+ strlen(filename)); ! strcpy(searchname, filename); ! strcat(searchname, "."); ! } ! ! handle->handle = LoadLibrary(searchname); ! lt_dlfree(searchname); ! ! /* libltdl expects this function to fail if it is unable ! to physically load the library. Sadly, LoadLibrary ! will search the loaded libraries for a match and return ! one of them if the path search load fails. ! ! We check whether LoadLibrary is returning a handle to ! an already loaded module, and simulate failure if we ! find one. */ ! cur = handles; ! while (cur) { ! if (!cur->handle) { ! cur = 0; ! break; ! } ! if (cur->handle == handle->handle) ! break; ! cur = cur->next; ! } ! if (cur || !handle->handle) { ! last_error = cannot_open_error; ! return 1; ! } ! return 0; } static int ! sys_wll_close (handle) ! lt_dlhandle handle; { ! if (FreeLibrary(handle->handle) == 0) { ! last_error = cannot_close_error; ! return 1; ! } ! return 0; } ! static lt_ptr_t ! sys_wll_sym (handle, symbol) ! lt_dlhandle handle; ! const char *symbol; { ! lt_ptr_t address = GetProcAddress(handle->handle, symbol); ! ! if (!address) ! last_error = symbol_error; ! return address; } ! static ! lt_dltype_t ! sys_wll = { LTDL_TYPE_TOP, 0, sys_wll_init, sys_wll_exit, ! sys_wll_open, sys_wll_close, sys_wll_sym }; ! #undef LTDL_TYPE_TOP ! #define LTDL_TYPE_TOP &sys_wll - #endif - #ifdef __BEOS__ ! /* dynamic linking for BeOS */ - #include ! static int ! sys_bedl_init LTDL_PARAMS((void)) ! { ! return 0; ! } ! static int ! sys_bedl_exit LTDL_PARAMS((void)) { ! return 0; ! } ! static int ! sys_bedl_open (handle, filename) ! lt_dlhandle handle; ! const char *filename; ! { ! image_id image = 0; ! ! if (filename) { ! image = load_add_on(filename); ! } else { ! image_info info; ! int32 cookie = 0; ! if (get_next_image_info(0, &cookie, &info) == B_OK) ! image = load_add_on(info.name); ! } ! if (image <= 0) { ! last_error = cannot_open_error; ! return 1; ! } ! handle->handle = (void*) image; ! return 0; } static int ! sys_bedl_close (handle) ! lt_dlhandle handle; { ! if (unload_add_on((image_id)handle->handle) != B_OK) { ! last_error = cannot_close_error; ! return 1; ! } ! return 0; } ! static lt_ptr_t ! sys_bedl_sym (handle, symbol) ! lt_dlhandle handle; ! const char *symbol; { ! lt_ptr_t address = 0; ! image_id image = (image_id)handle->handle; ! ! if (get_image_symbol(image, symbol, B_SYMBOL_TYPE_ANY, ! &address) != B_OK) { ! last_error = symbol_error; ! return 0; ! } ! return address; } ! static ! lt_dltype_t ! sys_bedl = { LTDL_TYPE_TOP, 0, sys_bedl_init, sys_bedl_exit, ! sys_bedl_open, sys_bedl_close, sys_bedl_sym }; ! #undef LTDL_TYPE_TOP ! #define LTDL_TYPE_TOP &sys_bedl - #endif /* emulate dynamic linking using preloaded_symbols */ ! typedef struct lt_dlsymlists_t { ! struct lt_dlsymlists_t *next; ! const lt_dlsymlist *syms; } lt_dlsymlists_t; ! static const lt_dlsymlist *default_preloaded_symbols = 0; ! static lt_dlsymlists_t *preloaded_symbols = 0; static int ! presym_init LTDL_PARAMS((void)) { ! preloaded_symbols = 0; ! if (default_preloaded_symbols) ! return lt_dlpreload(default_preloaded_symbols); ! return 0; } static int ! presym_free_symlists LTDL_PARAMS((void)) { ! lt_dlsymlists_t *lists = preloaded_symbols; ! ! while (lists) { ! lt_dlsymlists_t *tmp = lists; ! ! lists = lists->next; ! lt_dlfree(tmp); ! } ! preloaded_symbols = 0; ! return 0; } static int ! presym_exit LTDL_PARAMS((void)) { ! presym_free_symlists(); ! return 0; } static int presym_add_symlist (preloaded) ! const lt_dlsymlist *preloaded; { ! lt_dlsymlists_t *tmp; ! lt_dlsymlists_t *lists = preloaded_symbols; ! ! while (lists) { ! if (lists->syms == preloaded) ! return 0; ! lists = lists->next; ! } ! ! tmp = (lt_dlsymlists_t*) lt_dlmalloc(sizeof(lt_dlsymlists_t)); ! if (!tmp) { ! last_error = memory_error; ! return 1; ! } ! tmp->syms = preloaded; ! tmp->next = 0; ! if (!preloaded_symbols) ! preloaded_symbols = tmp; ! else { ! /* append to the end */ ! lists = preloaded_symbols; ! while (lists->next) ! lists = lists->next; ! lists->next = tmp; } ! return 0; } ! static int ! presym_open (handle, filename) ! lt_dlhandle handle; ! const char *filename; ! { ! lt_dlsymlists_t *lists = preloaded_symbols; ! ! if (!lists) { ! last_error = no_symbols_error; ! return 1; ! } ! if (!filename) ! filename = "@PROGRAM@"; ! while (lists) { ! const lt_dlsymlist *syms = lists->syms; ! ! while (syms->name) { ! if (!syms->address && ! strcmp(syms->name, filename) == 0) { ! handle->handle = (lt_ptr_t) syms; ! return 0; ! } ! syms++; ! } ! lists = lists->next; } ! last_error = file_not_found_error; ! return 1; } static int ! presym_close (handle) ! lt_dlhandle handle; { ! /* Just to silence gcc -Wall */ ! handle = 0; ! return 0; } ! static lt_ptr_t ! presym_sym (handle, symbol) ! lt_dlhandle handle; ! const char *symbol; { ! lt_dlsymlist *syms = (lt_dlsymlist*)(handle->handle); ! syms++; ! while (syms->address) { ! if (strcmp(syms->name, symbol) == 0) ! return syms->address; ! syms++; } ! last_error = symbol_error; ! return 0; } - static - lt_dltype_t - presym = { LTDL_TYPE_TOP, 0, presym_init, presym_exit, - presym_open, presym_close, presym_sym }; - #undef LTDL_TYPE_TOP - #define LTDL_TYPE_TOP &presym - static char *user_search_path = 0; - static lt_dlhandle handles = 0; - static int initialized = 0; ! static lt_dltype_t *types = LTDL_TYPE_TOP; ! #undef LTDL_TYPE_TOP int ! lt_dlinit LTDL_PARAMS((void)) { ! /* initialize libltdl */ ! lt_dltype_t **type = &types; ! int typecount = 0; ! ! if (initialized) { /* Initialize only at first call. */ ! initialized++; ! return 0; ! } ! handles = 0; ! user_search_path = 0; /* empty search path */ ! ! while (*type) { ! if ((*type)->mod_init()) ! *type = (*type)->next; /* Remove it from the list */ ! else { ! type = &(*type)->next; /* Keep it */ ! typecount++; ! } } ! if (typecount == 0) { ! last_error = dlopen_not_supported_error; ! return 1; ! } ! last_error = 0; ! initialized = 1; ! return 0; } int lt_dlpreload (preloaded) ! const lt_dlsymlist *preloaded; { ! if (preloaded) ! return presym_add_symlist(preloaded); ! presym_free_symlists(); ! if (default_preloaded_symbols) ! return lt_dlpreload(default_preloaded_symbols); ! return 0; } int lt_dlpreload_default (preloaded) ! const lt_dlsymlist *preloaded; { ! default_preloaded_symbols = preloaded; ! return 0; } int ! lt_dlexit LTDL_PARAMS((void)) { ! /* shut down libltdl */ ! lt_dltype_t *type = types; ! int errors; ! ! if (!initialized) { ! last_error = shutdown_error; ! return 1; ! } ! if (initialized != 1) { /* shut down only at last call. */ ! initialized--; ! return 0; ! } ! /* close all modules */ ! errors = 0; ! while (handles) { ! /* FIXME: what if a module depends on another one? */ ! if (lt_dlclose(handles)) ! errors++; ! } ! initialized = 0; ! while (type) { ! if (type->mod_exit()) ! errors++; ! type = type->next; ! } ! return errors; } static int tryall_dlopen (handle, filename) ! lt_dlhandle *handle; ! const char *filename; { ! lt_dlhandle cur; ! lt_dltype_t *type = types; ! const char *saved_error = last_error; ! ! /* check whether the module was already opened */ ! cur = handles; ! while (cur) { ! if (!cur->filename && !filename) ! break; ! if (cur->filename && filename && ! strcmp(cur->filename, filename) == 0) ! break; ! cur = cur->next; ! } ! if (cur) { ! cur->usage++; ! *handle = cur; ! return 0; ! } ! ! cur = *handle; ! if (filename) { ! cur->filename = strdup(filename); ! if (!cur->filename) { ! last_error = memory_error; ! return 1; ! } ! } else ! cur->filename = 0; ! while (type) { ! if (type->lib_open(cur, filename) == 0) ! break; ! type = type->next; ! } ! if (!type) { ! if (cur->filename) ! lt_dlfree(cur->filename); ! return 1; ! } ! cur->type = type; ! last_error = saved_error; ! return 0; } static int find_module (handle, dir, libdir, dlname, old_name, installed) ! lt_dlhandle *handle; ! const char *dir; ! const char *libdir; ! const char *dlname; ! const char *old_name; ! int installed; ! { ! int error; ! char *filename; ! /* try to open the old library first; if it was dlpreopened, ! we want the preopened version of it, even if a dlopenable ! module is available */ ! if (old_name && tryall_dlopen(handle, old_name) == 0) ! return 0; ! /* try to open the dynamic library */ ! if (dlname) { ! /* try to open the installed module */ ! if (installed && libdir) { ! filename = (char*) ! lt_dlmalloc(strlen(libdir)+1+strlen(dlname)+1); ! if (!filename) { ! last_error = memory_error; ! return 1; ! } ! strcpy(filename, libdir); ! strcat(filename, "/"); ! strcat(filename, dlname); ! error = tryall_dlopen(handle, filename) == 0; ! lt_dlfree(filename); ! if (error) ! return 0; ! } ! /* try to open the not-installed module */ ! if (!installed) { ! filename = (char*) ! lt_dlmalloc((dir ? strlen(dir) : 0) ! + strlen(objdir) + strlen(dlname) + 1); ! if (!filename) { ! last_error = memory_error; ! return 1; ! } ! if (dir) ! strcpy(filename, dir); ! else ! *filename = 0; ! strcat(filename, objdir); ! strcat(filename, dlname); ! ! error = tryall_dlopen(handle, filename) == 0; ! lt_dlfree(filename); ! if (error) ! return 0; ! } ! /* hmm, maybe it was moved to another directory */ ! { ! filename = (char*) ! lt_dlmalloc((dir ? strlen(dir) : 0) ! + strlen(dlname) + 1); ! if (dir) ! strcpy(filename, dir); ! else ! *filename = 0; ! strcat(filename, dlname); ! error = tryall_dlopen(handle, filename) == 0; ! lt_dlfree(filename); ! if (error) ! return 0; ! } } ! last_error = file_not_found_error; ! return 1; } ! static lt_ptr_t find_file (basename, search_path, pdir, handle) ! const char *basename; ! const char *search_path; ! char **pdir; ! lt_dlhandle *handle; ! { ! /* when handle != NULL search a library, otherwise a file */ ! /* return NULL on failure, otherwise the file/handle */ ! ! char *filename = 0; ! int filenamesize = 0; ! const char *next = search_path; ! int lenbase = strlen(basename); ! ! if (!next || !*next) { ! last_error = file_not_found_error; ! return 0; ! } ! while (next) { ! int lendir; ! const char *cur = next; ! ! next = strchr(cur, ':'); ! if (!next) ! next = cur + strlen(cur); ! lendir = next - cur; ! if (*next == ':') ! ++next; ! else ! next = 0; ! if (lendir == 0) ! continue; ! if (lendir + 1 + lenbase >= filenamesize) { ! if (filename) ! lt_dlfree(filename); ! filenamesize = lendir + 1 + lenbase + 1; ! filename = (char*) lt_dlmalloc(filenamesize); ! if (!filename) { ! last_error = memory_error; ! return 0; ! } ! } ! strncpy(filename, cur, lendir); ! if (filename[lendir-1] != '/') ! filename[lendir++] = '/'; ! strcpy(filename+lendir, basename); ! if (handle) { ! if (tryall_dlopen(handle, filename) == 0) { ! lt_dlfree(filename); ! return (lt_ptr_t) handle; ! } ! } else { ! FILE *file = fopen(filename, LTDL_READTEXT_MODE); ! if (file) { ! if (*pdir) ! lt_dlfree(*pdir); ! filename[lendir] = '\0'; ! *pdir = strdup(filename); ! if (!*pdir) { ! /* We could have even avoided the ! strdup, but there would be some ! memory overhead. */ ! *pdir = filename; ! } else ! lt_dlfree(filename); ! return (lt_ptr_t) file; ! } } } ! if (filename) ! lt_dlfree(filename); ! last_error = file_not_found_error; ! return 0; } static int load_deplibs(handle, deplibs) ! lt_dlhandle handle; ! const char *deplibs; { ! /* FIXME: load deplibs */ ! handle->depcount = 0; ! handle->deplibs = 0; ! /* Just to silence gcc -Wall */ ! deplibs = 0; ! return 0; } static int unload_deplibs(handle) ! lt_dlhandle handle; { ! /* FIXME: unload deplibs */ ! /* Just to silence gcc -Wall */ ! handle = 0; ! return 0; } ! static inline int trim (dest, str) ! char **dest; ! const char *str; { ! /* remove the leading and trailing "'" from str ! and store the result in dest */ ! char *tmp; ! const char *end = strrchr(str, '\''); ! int len = strlen(str); ! ! if (*dest) ! lt_dlfree(*dest); ! if (len > 3 && str[0] == '\'') { ! tmp = (char*) lt_dlmalloc(end - str); ! if (!tmp) { ! last_error = memory_error; ! return 1; ! } ! strncpy(tmp, &str[1], (end - str) - 1); ! tmp[len-3] = '\0'; ! *dest = tmp; ! } else ! *dest = 0; ! return 0; ! } ! ! static inline int ! free_vars(dir, name, dlname, oldname, libdir, deplibs) ! char *dir; ! char *name; ! char *dlname; ! char *oldname; ! char *libdir; ! char *deplibs; ! { ! if (dir) ! lt_dlfree(dir); ! if (name) ! lt_dlfree(name); ! if (dlname) ! lt_dlfree(dlname); ! if (oldname) ! lt_dlfree(oldname); ! if (libdir) ! lt_dlfree(libdir); ! if (deplibs) ! lt_dlfree(deplibs); ! return 0; } lt_dlhandle lt_dlopen (filename) ! const char *filename; { ! lt_dlhandle handle, newhandle; ! const char *basename, *ext; ! const char *saved_error = last_error; ! char *dir = 0, *name = 0; ! ! if (!filename) { ! handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t)); ! if (!handle) { ! last_error = memory_error; ! return 0; ! } ! handle->usage = 0; ! handle->depcount = 0; ! handle->deplibs = 0; ! newhandle = handle; ! if (tryall_dlopen(&newhandle, 0) != 0) { ! lt_dlfree(handle); ! return 0; ! } ! goto register_handle; ! } ! basename = strrchr(filename, '/'); ! if (basename) { ! basename++; ! dir = (char*) lt_dlmalloc(basename - filename + 1); ! if (!dir) { ! last_error = memory_error; ! return 0; ! } ! strncpy(dir, filename, basename - filename); ! dir[basename - filename] = '\0'; ! } else ! basename = filename; ! /* check whether we open a libtool module (.la extension) */ ! ext = strrchr(basename, '.'); ! if (ext && strcmp(ext, ".la") == 0) { ! /* this seems to be a libtool module */ ! FILE *file; ! int i; ! char *dlname = 0, *old_name = 0; ! char *libdir = 0, *deplibs = 0; ! char *line; ! int error = 0; ! /* if we can't find the installed flag, it is probably an ! installed libtool archive, produced with an old version ! of libtool */ ! int installed = 1; ! ! /* extract the module name from the file name */ ! name = (char*) lt_dlmalloc(ext - basename + 1); ! if (!name) { ! last_error = memory_error; ! if (dir) ! lt_dlfree(dir); ! return 0; ! } ! /* canonicalize the module name */ ! for (i = 0; i < ext - basename; i++) ! if (isalnum((int)(basename[i]))) ! name[i] = basename[i]; ! else ! name[i] = '_'; ! name[ext - basename] = '\0'; ! /* now try to open the .la file */ ! file = fopen(filename, LTDL_READTEXT_MODE); ! if (!file) ! last_error = file_not_found_error; ! if (!file && !dir) { ! /* try other directories */ ! file = (FILE*) find_file(basename, ! user_search_path, ! &dir, 0); ! if (!file) ! file = (FILE*) find_file(basename, ! getenv("LTDL_LIBRARY_PATH"), ! &dir, 0); #ifdef LTDL_SHLIBPATH_VAR ! if (!file) ! file = (FILE*) find_file(basename, ! getenv(LTDL_SHLIBPATH_VAR), ! &dir, 0); ! #endif ! } ! if (!file) { ! if (name) ! lt_dlfree(name); ! if (dir) ! lt_dlfree(dir); ! return 0; ! } ! line = (char*) lt_dlmalloc(LTDL_FILENAME_MAX); ! if (!line) { ! fclose(file); ! last_error = memory_error; ! return 0; ! } ! /* read the .la file */ ! while (!feof(file)) { ! if (!fgets(line, LTDL_FILENAME_MAX, file)) ! break; ! if (line[0] == '\n' || line[0] == '#') ! continue; ! # undef STR_DLNAME ! # define STR_DLNAME "dlname=" ! if (strncmp(line, STR_DLNAME, ! sizeof(STR_DLNAME) - 1) == 0) ! error = trim(&dlname, ! &line[sizeof(STR_DLNAME) - 1]); ! else ! # undef STR_OLD_LIBRARY ! # define STR_OLD_LIBRARY "old_library=" ! if (strncmp(line, STR_OLD_LIBRARY, ! sizeof(STR_OLD_LIBRARY) - 1) == 0) ! error = trim(&old_name, ! &line[sizeof(STR_OLD_LIBRARY) - 1]); ! else ! # undef STR_LIBDIR ! # define STR_LIBDIR "libdir=" ! if (strncmp(line, STR_LIBDIR, ! sizeof(STR_LIBDIR) - 1) == 0) ! error = trim(&libdir, ! &line[sizeof(STR_LIBDIR) - 1]); ! else ! # undef STR_DL_DEPLIBS ! # define STR_DL_DEPLIBS "dl_dependency_libs=" ! if (strncmp(line, STR_DL_DEPLIBS, ! sizeof(STR_DL_DEPLIBS) - 1) == 0) ! error = trim(&deplibs, ! &line[sizeof(STR_DL_DEPLIBS) - 1]); ! else ! if (strcmp(line, "installed=yes\n") == 0) ! installed = 1; ! else ! if (strcmp(line, "installed=no\n") == 0) ! installed = 0; ! if (error) ! break; ! } ! fclose(file); ! lt_dlfree(line); ! /* allocate the handle */ ! handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t)); ! if (!handle || error) { ! if (handle) ! lt_dlfree(handle); ! if (!error) ! last_error = memory_error; ! free_vars(name, dir, dlname, old_name, libdir, deplibs); ! return 0; ! } ! handle->usage = 0; ! if (load_deplibs(handle, deplibs) == 0) { ! newhandle = handle; ! /* find_module may replace newhandle */ ! if (find_module(&newhandle, dir, libdir, ! dlname, old_name, installed)) { ! unload_deplibs(handle); ! error = 1; ! } ! } else ! error = 1; ! if (error) { ! lt_dlfree(handle); ! free_vars(name, dir, dlname, old_name, libdir, deplibs); ! return 0; ! } ! if (handle != newhandle) { ! unload_deplibs(handle); } ! } else { ! /* not a libtool module */ ! handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t)); ! if (!handle) { ! last_error = memory_error; ! if (dir) ! lt_dlfree(dir); ! return 0; } ! handle->usage = 0; ! /* non-libtool modules don't have dependencies */ ! handle->depcount = 0; ! handle->deplibs = 0; ! newhandle = handle; ! if (tryall_dlopen(&newhandle, filename) ! && (dir ! || (!find_file(basename, user_search_path, ! 0, &newhandle) ! && !find_file(basename, ! getenv("LTDL_LIBRARY_PATH"), ! 0, &newhandle) #ifdef LTDL_SHLIBPATH_VAR ! && !find_file(basename, ! getenv(LTDL_SHLIBPATH_VAR), ! 0, &newhandle) ! #endif ! ))) { ! lt_dlfree(handle); ! if (dir) ! lt_dlfree(dir); ! return 0; ! } } ! register_handle: ! if (newhandle != handle) { ! lt_dlfree(handle); ! handle = newhandle; ! } ! if (!handle->usage) { ! handle->usage = 1; ! handle->name = name; ! handle->next = handles; ! handles = handle; ! } else if (name) ! lt_dlfree(name); ! if (dir) ! lt_dlfree(dir); ! last_error = saved_error; ! return handle; } lt_dlhandle lt_dlopenext (filename) ! const char *filename; { ! lt_dlhandle handle; ! char *tmp; ! int len; ! const char *saved_error = last_error; ! ! if (!filename) ! return lt_dlopen(filename); ! len = strlen(filename); ! if (!len) { ! last_error = file_not_found_error; ! return 0; ! } ! /* try the normal file name */ ! handle = lt_dlopen(filename); ! if (handle) ! return handle; ! /* try "filename.la" */ ! tmp = (char*) lt_dlmalloc(len+4); ! if (!tmp) { ! last_error = memory_error; ! return 0; ! } ! strcpy(tmp, filename); ! strcat(tmp, ".la"); ! handle = lt_dlopen(tmp); ! if (handle) { ! last_error = saved_error; ! lt_dlfree(tmp); ! return handle; ! } #ifdef LTDL_SHLIB_EXT ! /* try "filename.EXT" */ ! if (strlen(shlib_ext) > 3) { ! lt_dlfree(tmp); ! tmp = (char*) lt_dlmalloc(len + strlen(shlib_ext) + 1); ! if (!tmp) { ! last_error = memory_error; ! return 0; ! } ! strcpy(tmp, filename); ! } else ! tmp[len] = '\0'; ! strcat(tmp, shlib_ext); ! handle = lt_dlopen(tmp); ! if (handle) { ! last_error = saved_error; ! lt_dlfree(tmp); ! return handle; ! } ! #endif ! last_error = file_not_found_error; ! lt_dlfree(tmp); ! return 0; } int lt_dlclose (handle) ! lt_dlhandle handle; { ! lt_dlhandle cur, last; ! ! /* check whether the handle is valid */ ! last = cur = handles; ! while (cur && handle != cur) { ! last = cur; ! cur = cur->next; ! } ! if (!cur) { ! last_error = invalid_handle_error; ! return 1; ! } ! handle->usage--; ! if (!handle->usage) { ! int error; ! ! if (handle != handles) ! last->next = handle->next; ! else ! handles = handle->next; ! error = handle->type->lib_close(handle); ! error += unload_deplibs(handle); ! if (handle->filename) ! lt_dlfree(handle->filename); ! if (handle->name) ! lt_dlfree(handle->name); ! lt_dlfree(handle); ! return error; } ! return 0; } ! lt_ptr_t lt_dlsym (handle, symbol) ! lt_dlhandle handle; ! const char *symbol; { ! int lensym; ! char lsym[LTDL_SYMBOL_LENGTH]; ! char *sym; ! lt_ptr_t address; ! ! if (!handle) { ! last_error = invalid_handle_error; ! return 0; ! } ! if (!symbol) { ! last_error = symbol_error; ! return 0; ! } ! lensym = strlen(symbol); ! if (handle->type->sym_prefix) ! lensym += strlen(handle->type->sym_prefix); ! if (handle->name) ! lensym += strlen(handle->name); ! if (lensym + LTDL_SYMBOL_OVERHEAD < LTDL_SYMBOL_LENGTH) ! sym = lsym; ! else ! sym = (char*) lt_dlmalloc(lensym + LTDL_SYMBOL_OVERHEAD + 1); ! if (!sym) { ! last_error = buffer_overflow_error; ! return 0; ! } ! if (handle->name) { ! const char *saved_error = last_error; ! ! /* this is a libtool module */ ! if (handle->type->sym_prefix) { ! strcpy(sym, handle->type->sym_prefix); ! strcat(sym, handle->name); ! } else ! strcpy(sym, handle->name); ! strcat(sym, "_LTX_"); ! strcat(sym, symbol); ! /* try "modulename_LTX_symbol" */ ! address = handle->type->find_sym(handle, sym); ! if (address) { ! if (sym != lsym) ! lt_dlfree(sym); ! return address; ! } ! last_error = saved_error; ! } ! /* otherwise try "symbol" */ ! if (handle->type->sym_prefix) { ! strcpy(sym, handle->type->sym_prefix); ! strcat(sym, symbol); ! } else ! strcpy(sym, symbol); ! address = handle->type->find_sym(handle, sym); ! if (sym != lsym) ! lt_dlfree(sym); ! return address; } const char * ! lt_dlerror LTDL_PARAMS((void)) { ! const char *error = last_error; ! ! last_error = 0; ! return error; } int lt_dladdsearchdir (search_dir) ! const char *search_dir; { ! if (!search_dir || !strlen(search_dir)) ! return 0; ! if (!user_search_path) { ! user_search_path = strdup(search_dir); ! if (!user_search_path) { ! last_error = memory_error; ! return 1; ! } ! } else { ! char *new_search_path = (char*) ! lt_dlmalloc(strlen(user_search_path) + ! strlen(search_dir) + 2); /* ':' + '\0' == 2 */ ! if (!new_search_path) { ! last_error = memory_error; ! return 1; ! } ! strcpy(new_search_path, user_search_path); ! strcat(new_search_path, ":"); ! strcat(new_search_path, search_dir); ! lt_dlfree(user_search_path); ! user_search_path = new_search_path; } ! return 0; } int lt_dlsetsearchpath (search_path) ! const char *search_path; { ! if (user_search_path) ! lt_dlfree(user_search_path); ! user_search_path = 0; /* reset the search path */ ! if (!search_path || !strlen(search_path)) ! return 0; ! user_search_path = strdup(search_path); ! if (!user_search_path) ! return 1; ! return 0; } const char * ! lt_dlgetsearchpath LTDL_PARAMS((void)) { ! return user_search_path; } --- 654,3110 ---- * BIND_DEFERRED - Delay code symbol resolution until actual reference. * * Optionally: ! * BIND_FIRST - Place the library at the head of the symbol search ! * order. ! * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all ! * unsatisfied symbols as fatal. This flag allows ! * binding of unsatisfied code symbols to be deferred ! * until use. ! * [Perl: For certain libraries, like DCE, deferred ! * binding often causes run time problems. Adding ! * BIND_NONFATAL to BIND_IMMEDIATE still allows ! * unresolved references in situations like this.] ! * BIND_NOSTART - Do not call the initializer for the shared library ! * when the library is loaded, nor on a future call to ! * shl_unload(). ! * BIND_VERBOSE - Print verbose messages concerning possible ! * unsatisfied symbols. * * hp9000s700/hp9000s800: ! * BIND_RESTRICTED - Restrict symbols visible by the library to those ! * present at library load time. ! * DYNAMIC_PATH - Allow the loader to dynamically search for the ! * library specified by the path argument. */ #ifndef DYNAMIC_PATH ! # define DYNAMIC_PATH 0 ! #endif #ifndef BIND_RESTRICTED ! # define BIND_RESTRICTED 0 ! #endif ! #define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) ! static lt_module ! sys_shl_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; { ! static shl_t self = (shl_t) 0; ! lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L); ! ! /* Since searching for a symbol against a NULL module handle will also ! look in everything else that was already loaded and exported with ! the -E compiler flag, we always cache a handle saved before any ! modules are loaded. */ ! if (!self) ! { ! lt_ptr address; ! shl_findsym (&self, "main", TYPE_UNDEFINED, &address); ! } ! ! if (!filename) ! { ! module = self; ! } ! else ! { ! module = shl_load (filename, LT_BIND_FLAGS, 0L); ! ! if (!module) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); ! } ! } ! ! return module; } static int ! sys_shl_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! int errors = 0; ! if (module && (shl_unload ((shl_t) (module)) != 0)) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ! ++errors; ! } ! ! return errors; } ! static lt_ptr ! sys_shl_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_ptr address = 0; ! ! /* sys_shl_open should never return a NULL module handle */ ! if (module == (lt_module) 0) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! } ! else if (!shl_findsym((shl_t*) &module, symbol, TYPE_UNDEFINED, &address)) ! { ! if (!address) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); } ! } ! ! return address; } ! static struct lt_user_dlloader sys_shl = { ! 0, sys_shl_open, sys_shl_close, sys_shl_sym, 0, 0 ! }; ! #endif /* HAVE_SHL_LOAD */ ! ! /* --- LOADLIBRARY() INTERFACE LOADER --- */ ! #ifdef __WINDOWS__ ! /* dynamic linking for Win32 */ ! #include ! ! /* Forward declaration; required to implement handle search below. */ ! static lt_dlhandle handles; ! ! static lt_module ! sys_wll_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; ! { ! lt_dlhandle cur; ! lt_module module = 0; ! const char *errormsg = 0; ! char *searchname = 0; ! char *ext; ! char self_name_buf[MAX_PATH]; ! ! if (!filename) ! { ! /* Get the name of main module */ ! *self_name_buf = 0; ! GetModuleFileName (NULL, self_name_buf, sizeof (self_name_buf)); ! filename = ext = self_name_buf; ! } ! else ! { ! ext = strrchr (filename, '.'); ! } ! ! if (ext) ! { ! /* FILENAME already has an extension. */ ! searchname = strdup (filename); ! } ! else ! { ! /* Append a `.' to stop Windows from adding an ! implicit `.dll' extension. */ ! searchname = LT_DLMALLOC (char, 2+ strlen (filename)); ! if (!searchname) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return 0; ! } ! strcpy (searchname, filename); ! strcat (searchname, "."); ! } ! ! #if __CYGWIN__ ! { ! char wpath[MAX_PATH]; ! cygwin_conv_to_full_win32_path(searchname, wpath); ! module = LoadLibrary(wpath); ! } ! #else ! module = LoadLibrary (searchname); #endif + LT_DLFREE (searchname); ! /* libltdl expects this function to fail if it is unable ! to physically load the library. Sadly, LoadLibrary ! will search the loaded libraries for a match and return ! one of them if the path search load fails. ! We check whether LoadLibrary is returning a handle to ! an already loaded module, and simulate failure if we ! find one. */ ! MUTEX_LOCK (); ! cur = handles; ! while (cur) ! { ! if (!cur->module) ! { ! cur = 0; ! break; ! } ! if (cur->module == module) ! { ! break; } ! ! cur = cur->next; ! } ! MUTEX_UNLOCK (); ! ! if (cur || !module) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); ! module = 0; ! } ! ! return module; } static int ! sys_wll_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! int errors = 0; ! ! if (FreeLibrary(module) == 0) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ! ++errors; ! } ! ! return errors; } ! static lt_ptr ! sys_wll_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_ptr address = GetProcAddress (module, symbol); ! ! if (!address) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! } ! ! return address; } ! static struct lt_user_dlloader sys_wll = { ! 0, sys_wll_open, sys_wll_close, sys_wll_sym, 0, 0 ! }; ! #endif /* __WINDOWS__ */ ! ! /* --- LOAD_ADD_ON() INTERFACE LOADER --- */ ! #ifdef __BEOS__ ! /* dynamic linking for BeOS */ ! #include ! static lt_module ! sys_bedl_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; ! { ! image_id image = 0; ! if (filename) ! { ! image = load_add_on (filename); ! } ! else ! { ! image_info info; ! int32 cookie = 0; ! if (get_next_image_info (0, &cookie, &info) == B_OK) ! image = load_add_on (info.name); ! } ! if (image <= 0) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); ! image = 0; ! } ! ! return (lt_module) image; } static int ! sys_bedl_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! int errors = 0; ! ! if (unload_add_on ((image_id) module) != B_OK) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ! ++errors; ! } ! ! return errors; } ! static lt_ptr ! sys_bedl_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_ptr address = 0; ! image_id image = (image_id) module; ! ! if (get_image_symbol (image, symbol, B_SYMBOL_TYPE_ANY, address) != B_OK) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! address = 0; ! } ! ! return address; } ! static struct lt_user_dlloader sys_bedl = { ! 0, sys_bedl_open, sys_bedl_close, sys_bedl_sym, 0, 0 ! }; ! #endif /* __BEOS__ */ ! ! /* --- DLD_LINK() INTERFACE LOADER --- */ ! #if HAVE_DLD ! /* dynamic linking with dld */ ! ! #if HAVE_DLD_H ! #include ! #endif ! ! static lt_module ! sys_dld_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; { ! lt_module module = strdup (filename); ! if (!module) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! module = 0; ! } ! else if (dld_link (filename) != 0) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); ! LT_DLFREE (module); ! module = 0; ! } ! ! return module; } static int ! sys_dld_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! int errors = 0; ! ! if (dld_unlink_by_file ((char*)(module), 1) != 0) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ! ++errors; ! } ! else ! { ! LT_DLFREE (module); ! } ! ! return errors; } ! static lt_ptr ! sys_dld_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_ptr address = dld_get_func (symbol); ! ! if (!address) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! } ! ! return address; } ! static struct lt_user_dlloader sys_dld = { ! 0, sys_dld_open, sys_dld_close, sys_dld_sym, 0, 0 ! }; ! #endif /* HAVE_DLD */ + + + /* --- DLPREOPEN() INTERFACE LOADER --- */ + + /* emulate dynamic linking using preloaded_symbols */ ! typedef struct lt_dlsymlists_t ! { ! struct lt_dlsymlists_t *next; ! const lt_dlsymlist *syms; } lt_dlsymlists_t; ! static const lt_dlsymlist *default_preloaded_symbols = 0; ! static lt_dlsymlists_t *preloaded_symbols = 0; static int ! presym_init (loader_data) ! lt_user_data loader_data; { ! int errors = 0; ! ! MUTEX_LOCK (); ! ! preloaded_symbols = 0; ! if (default_preloaded_symbols) ! { ! errors = lt_dlpreload (default_preloaded_symbols); ! } ! ! MUTEX_UNLOCK (); ! ! return errors; } static int ! presym_free_symlists () { ! lt_dlsymlists_t *lists; ! ! MUTEX_LOCK (); ! ! lists = preloaded_symbols; ! while (lists) ! { ! lt_dlsymlists_t *tmp = lists; ! ! lists = lists->next; ! LT_DLFREE (tmp); ! } ! preloaded_symbols = 0; ! ! MUTEX_UNLOCK (); ! ! return 0; } static int ! presym_exit (loader_data) ! lt_user_data loader_data; { ! presym_free_symlists (); ! return 0; } static int presym_add_symlist (preloaded) ! const lt_dlsymlist *preloaded; { ! lt_dlsymlists_t *tmp; ! lt_dlsymlists_t *lists; ! int errors = 0; ! ! MUTEX_LOCK (); ! ! lists = preloaded_symbols; ! while (lists) ! { ! if (lists->syms == preloaded) ! { ! goto done; } ! lists = lists->next; ! } ! ! tmp = LT_DLMALLOC (lt_dlsymlists_t, 1); ! if (tmp) ! { ! tmp->syms = preloaded; ! tmp->next = preloaded_symbols; ! preloaded_symbols = tmp; ! } ! else ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! ++errors; ! } ! ! done: ! MUTEX_UNLOCK (); ! return errors; } ! static lt_module ! presym_open (loader_data, filename) ! lt_user_data loader_data; ! const char *filename; ! { ! lt_dlsymlists_t *lists; ! lt_module module = (lt_module) 0; ! ! MUTEX_LOCK (); ! lists = preloaded_symbols; ! ! if (!lists) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_SYMBOLS)); ! goto done; ! } ! ! if (!filename) ! { ! filename = "@PROGRAM@"; ! } ! ! while (lists) ! { ! const lt_dlsymlist *syms = lists->syms; ! ! while (syms->name) ! { ! if (!syms->address && strcmp(syms->name, filename) == 0) ! { ! module = (lt_module) syms; ! goto done; ! } ! ++syms; } ! ! lists = lists->next; ! } ! ! MUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ! ! done: ! MUTEX_UNLOCK (); ! return module; } static int ! presym_close (loader_data, module) ! lt_user_data loader_data; ! lt_module module; { ! /* Just to silence gcc -Wall */ ! module = 0; ! return 0; } ! static lt_ptr ! presym_sym (loader_data, module, symbol) ! lt_user_data loader_data; ! lt_module module; ! const char *symbol; { ! lt_dlsymlist *syms = (lt_dlsymlist*) module; ! ++syms; ! while (syms->address) ! { ! if (strcmp(syms->name, symbol) == 0) ! { ! return syms->address; } ! ! ++syms; ! } ! ! MUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! ! return 0; } + + static struct lt_user_dlloader presym = { + 0, presym_open, presym_close, presym_sym, presym_exit, 0 + }; ! ! /* --- DYNAMIC MODULE LOADING --- */ + + static char *user_search_path= 0; + static lt_dlloader *loaders = 0; + static lt_dlhandle handles = 0; + static int initialized = 0; + + /* Initialize libltdl. */ int ! lt_dlinit () { ! int errors = 0; ! ! MUTEX_LOCK (); ! ! /* Initialize only at first call. */ ! if (++initialized == 1) ! { ! handles = 0; ! user_search_path = 0; /* empty search path */ ! ! #if HAVE_LIBDL && !defined(__CYGWIN__) ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen"); ! #endif ! #if HAVE_SHL_LOAD ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_shl, "dlopen"); ! #endif ! #ifdef __WINDOWS__ ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_wll, "dlopen"); ! #endif ! #ifdef __BEOS__ ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_bedl, "dlopen"); ! #endif ! #if HAVE_DLD ! errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dld, "dld"); ! #endif ! errors += lt_dlloader_add (lt_dlloader_next (0), &presym, "dlpreload"); ! ! if (presym_init (presym.dlloader_data)) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INIT_LOADER)); ! ++errors; ! } ! else if (errors != 0) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (DLOPEN_NOT_SUPPORTED)); ! ++errors; } ! } ! ! MUTEX_UNLOCK (); ! ! return errors; } int lt_dlpreload (preloaded) ! const lt_dlsymlist *preloaded; { ! int errors = 0; ! ! if (preloaded) ! { ! errors = presym_add_symlist (preloaded); ! } ! else ! { ! const char *errormsg = 0; ! ! presym_free_symlists(); ! ! MUTEX_LOCK (); ! if (default_preloaded_symbols) ! { ! errors = lt_dlpreload (default_preloaded_symbols); ! } ! MUTEX_UNLOCK (); ! } ! ! return errors; } int lt_dlpreload_default (preloaded) ! const lt_dlsymlist *preloaded; { ! MUTEX_LOCK (); ! default_preloaded_symbols = preloaded; ! MUTEX_UNLOCK (); ! return 0; } int ! lt_dlexit () { ! /* shut down libltdl */ ! lt_dlloader *loader; ! const char *errormsg; ! int errors = 0; ! ! MUTEX_LOCK (); ! loader = loaders; ! ! if (!initialized) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (SHUTDOWN)); ! ++errors; ! goto done; ! } ! ! /* shut down only at last call. */ ! if (--initialized == 0) ! { ! int level; ! ! while (handles && LT_DLIS_RESIDENT (handles)) ! { ! handles = handles->next; ! } ! ! /* close all modules */ ! for (level = 1; handles; ++level) ! { ! lt_dlhandle cur = handles; ! int saw_nonresident = 0; ! ! while (cur) ! { ! lt_dlhandle tmp = cur; ! cur = cur->next; ! if (!LT_DLIS_RESIDENT (tmp)) ! saw_nonresident = 1; ! if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level) ! { ! if (lt_dlclose (tmp)) ! { ! ++errors; ! } ! } ! } ! /* done if only resident modules are left */ ! if (!saw_nonresident) ! break; ! } ! ! /* close all loaders */ ! while (loader) ! { ! lt_dlloader *next = loader->next; ! lt_user_data data = loader->dlloader_data; ! if (loader->dlloader_exit && loader->dlloader_exit (data)) ! { ! ++errors; ! } ! ! LT_DLMEM_REASSIGN (loader, next); ! } ! loaders = 0; ! } ! ! done: ! MUTEX_UNLOCK (); ! return errors; } static int tryall_dlopen (handle, filename) ! lt_dlhandle *handle; ! const char *filename; { ! lt_dlhandle cur; ! lt_dlloader *loader; ! const char *saved_error; ! int errors = 0; ! ! MUTEX_GETERROR (saved_error); ! MUTEX_LOCK (); ! ! cur = handles; ! loader = loaders; ! ! /* check whether the module was already opened */ ! while (cur) ! { ! /* try to dlopen the program itself? */ ! if (!cur->info.filename && !filename) ! { ! break; ! } ! ! if (cur->info.filename && filename ! && strcmp (cur->info.filename, filename) == 0) ! { ! break; ! } ! ! cur = cur->next; ! } ! ! if (cur) ! { ! ++cur->info.ref_count; ! *handle = cur; ! goto done; ! } ! ! cur = *handle; ! if (filename) ! { ! cur->info.filename = strdup (filename); ! if (!cur->info.filename) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! ++errors; ! goto done; ! } ! } ! else ! { ! cur->info.filename = 0; ! } ! ! while (loader) ! { ! lt_user_data data = loader->dlloader_data; ! ! cur->module = loader->module_open (data, filename); ! ! if (cur->module != 0) ! { ! break; ! } ! loader = loader->next; ! } ! ! if (!loader) ! { ! LT_DLFREE (cur->info.filename); ! ++errors; ! goto done; ! } ! ! cur->loader = loader; ! last_error = saved_error; ! ! done: ! MUTEX_UNLOCK (); ! ! return errors; } static int find_module (handle, dir, libdir, dlname, old_name, installed) ! lt_dlhandle *handle; ! const char *dir; ! const char *libdir; ! const char *dlname; ! const char *old_name; ! int installed; ! { ! int error; ! char *filename; ! ! /* try to open the old library first; if it was dlpreopened, ! we want the preopened version of it, even if a dlopenable ! module is available */ ! if (old_name && tryall_dlopen(handle, old_name) == 0) ! { ! return 0; ! } ! ! /* try to open the dynamic library */ ! if (dlname) ! { ! size_t len; ! ! /* try to open the installed module */ ! if (installed && libdir) ! { ! len = strlen (libdir) + 1 + strlen (dlname); ! filename = LT_DLMALLOC (char, 1+ len); ! ! if (!filename) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return 1; ! } ! ! sprintf (filename, "%s/%s", libdir, dlname); ! error = (tryall_dlopen (handle, filename) != 0); ! LT_DLFREE (filename); ! ! if (!error) ! { ! return 0; ! } ! } ! ! /* try to open the not-installed module */ ! if (!installed) ! { ! len = (dir ? strlen (dir) : 0) + strlen (objdir) + strlen (dlname); ! filename = LT_DLMALLOC (char, 1+ len); ! ! if (!filename) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return 1; ! } ! ! if (dir) ! { ! strcpy (filename, dir); ! } ! else ! { ! *filename = 0; ! } ! strcat(filename, objdir); ! strcat(filename, dlname); ! ! error = tryall_dlopen (handle, filename) != 0; ! LT_DLFREE (filename); ! if (!error) ! { ! return 0; ! } ! } ! ! /* maybe it was moved to another directory */ ! { ! len = (dir ? strlen (dir) : 0) + strlen (dlname); ! filename = LT_DLMALLOC (char, 1+ len); ! ! if (dir) ! { ! strcpy (filename, dir); ! } ! else ! { ! *filename = 0; ! } ! strcat(filename, dlname); ! ! error = (tryall_dlopen (handle, filename) != 0); ! LT_DLFREE (filename); ! if (!error) ! { ! return 0; ! } ! } ! } ! ! return 1; ! } ! ! static char* ! canonicalize_path (path) ! const char *path; ! { ! char *canonical = 0; ! ! if (path && *path) ! { ! char *ptr = strdup (path); ! canonical = ptr; ! ! #ifdef LT_DIRSEP_CHAR ! /* Avoid this overhead where '/' is the only separator. */ ! while (ptr = strchr (ptr, LT_DIRSEP_CHAR)) ! { ! *ptr++ = '/'; } ! #endif ! } ! ! return canonical; } ! static lt_ptr find_file (basename, search_path, pdir, handle) ! const char *basename; ! const char *search_path; ! char **pdir; ! lt_dlhandle *handle; ! { ! /* When handle != NULL search a library, otherwise a file ! return NULL on failure, otherwise the file/handle. */ ! ! lt_ptr result = 0; ! char *filename = 0; ! int filenamesize= 0; ! int lenbase = strlen (basename); ! char *canonical = 0; ! char *next = 0; ! ! MUTEX_LOCK (); ! ! if (!search_path || !*search_path) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ! goto cleanup; ! } ! ! canonical = canonicalize_path (search_path); ! if (!canonical) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! goto cleanup; ! } ! ! next = canonical; ! while (next) ! { ! int lendir; ! char *cur = next; ! ! next = strchr (cur, LT_PATHSEP_CHAR); ! if (!next) ! { ! next = cur + strlen (cur); ! } ! ! lendir = next - cur; ! if (*next == LT_PATHSEP_CHAR) ! { ! ++next; ! } ! else ! { ! next = 0; ! } ! ! if (lendir == 0) ! { ! continue; ! } ! ! if (lendir + 1 + lenbase >= filenamesize) ! { ! LT_DLFREE (filename); ! filenamesize = lendir + 1 + lenbase + 1; ! filename = LT_DLMALLOC (char, filenamesize); ! ! if (!filename) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! goto cleanup; ! } ! } ! ! strncpy(filename, cur, lendir); ! if (filename[lendir-1] != '/') ! { ! filename[lendir++] = '/'; ! } ! strcpy(filename+lendir, basename); ! if (handle) ! { ! if (tryall_dlopen (handle, filename) == 0) ! { ! result = (lt_ptr) handle; ! goto cleanup; ! } ! } ! else ! { ! FILE *file = fopen (filename, LT_READTEXT_MODE); ! if (file) ! { ! LT_DLFREE (*pdir); ! ! filename[lendir] = '\0'; ! *pdir = strdup(filename); ! if (!*pdir) ! { ! /* We could have even avoided the strdup, ! but there would be some memory overhead. */ ! *pdir = filename; ! filename = 0; } + + result = (lt_ptr) file; + goto cleanup; + } } ! } ! ! MUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ! ! cleanup: ! LT_DLFREE (filename); ! LT_DLFREE (canonical); ! ! MUTEX_UNLOCK (); ! ! return result; } static int load_deplibs(handle, deplibs) ! lt_dlhandle handle; ! char *deplibs; { ! #if LTDL_DLOPEN_DEPLIBS ! char *p, *save_search_path; ! int depcount = 0; ! int i; ! char **names = 0; ! #endif ! int errors = 0; ! ! handle->depcount = 0; ! ! #if LTDL_DLOPEN_DEPLIBS ! if (!deplibs) ! { ! return errors; ! } ! ++errors; ! ! MUTEX_LOCK (); ! save_search_path = strdup (user_search_path); ! if (user_search_path && !save_search_path) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! goto cleanup; ! } ! ! /* extract search paths and count deplibs */ ! p = deplibs; ! while (*p) ! { ! if (!isspace ((int) *p)) ! { ! char *end = p+1; ! while (*end && !isspace((int) *end)) ! { ! ++end; ! } ! ! if (strncmp(p, "-L", 2) == 0 || strncmp(p, "-R", 2) == 0) ! { ! char save = *end; ! *end = 0; /* set a temporary string terminator */ ! if (lt_dladdsearchdir(p+2)) ! { ! goto cleanup; ! } ! *end = save; ! } ! else ! { ! ++depcount; ! } ! ! p = end; ! } ! else ! { ! ++p; ! } ! } ! ! /* restore the old search path */ ! LT_DLFREE (user_search_path); ! user_search_path = save_search_path; ! ! MUTEX_UNLOCK (); ! ! if (!depcount) ! { ! errors = 0; ! goto cleanup; ! } ! ! names = LT_DLMALLOC (char *, depcount * sizeof (char*)); ! if (!names) ! { ! goto cleanup; ! } ! ! /* now only extract the actual deplibs */ ! depcount = 0; ! p = deplibs; ! while (*p) ! { ! if (isspace ((int) *p)) ! { ! ++p; ! } ! else ! { ! char *end = p+1; ! while (*end && !isspace ((int) *end)) ! { ! ++end; ! } ! ! if (strncmp(p, "-L", 2) != 0 && strncmp(p, "-R", 2) != 0) ! { ! char *name; ! char save = *end; ! *end = 0; /* set a temporary string terminator */ ! if (strncmp(p, "-l", 2) == 0) ! { ! name = LT_DLMALLOC (char, 3+ /* "lib" */ strlen (p+2) + 1); ! if (name) ! { ! sprintf (name, "lib%s", p+2); ! } ! } ! else ! { ! name = strdup(p); ! } ! ! if (name) ! { ! names[depcount++] = name; ! } ! else ! { ! goto cleanup_names; ! } ! *end = save; ! } ! p = end; ! } ! } ! ! /* load the deplibs (in reverse order) ! At this stage, don't worry if the deplibs do not load correctly, ! they may already be statically linked into the loading application ! for instance. There will be a more enlightening error message ! later on if the loaded module cannot resolve all of its symbols. */ ! if (depcount) ! { ! int j = 0; ! ! handle->deplibs = (lt_dlhandle*) LT_DLMALLOC (lt_dlhandle *, depcount); ! if (!handle->deplibs) ! { ! goto cleanup; ! } ! ! for (i = 0; i < depcount; ++i) ! { ! handle->deplibs[j] = lt_dlopenext(names[depcount-1-i]); ! if (handle->deplibs[j]) ! { ! ++j; ! } ! } ! ! handle->depcount = j; /* Number of successfully loaded deplibs */ ! errors = 0; ! } ! ! cleanup_names: ! for (i = 0; i < depcount; ++i) ! { ! LT_DLFREE (names[i]); ! } ! ! cleanup: ! LT_DLFREE (names); ! #endif ! ! return errors; } static int unload_deplibs(handle) ! lt_dlhandle handle; { ! int i; ! int errors = 0; ! ! if (handle->depcount) ! { ! for (i = 0; i < handle->depcount; ++i) ! { ! if (!LT_DLIS_RESIDENT (handle->deplibs[i])) ! { ! errors += lt_dlclose (handle->deplibs[i]); ! } ! } ! } ! ! return errors; } ! static int trim (dest, str) ! char **dest; ! const char *str; { ! /* remove the leading and trailing "'" from str ! and store the result in dest */ ! const char *end = strrchr (str, '\''); ! int len = strlen (str); ! char *tmp; ! ! LT_DLFREE (*dest); ! ! if (len > 3 && str[0] == '\'') ! { ! tmp = LT_DLMALLOC (char, end - str); ! if (!tmp) ! { ! last_error = LT_DLSTRERROR (NO_MEMORY); ! return 1; ! } ! ! strncpy(tmp, &str[1], (end - str) - 1); ! tmp[len-3] = '\0'; ! *dest = tmp; ! } ! else ! { ! *dest = 0; ! } ! ! return 0; ! } ! ! static int ! free_vars( dlname, oldname, libdir, deplibs) ! char *dlname; ! char *oldname; ! char *libdir; ! char *deplibs; ! { ! LT_DLFREE (dlname); ! LT_DLFREE (oldname); ! LT_DLFREE (libdir); ! LT_DLFREE (deplibs); ! ! return 0; } lt_dlhandle lt_dlopen (filename) ! const char *filename; { ! lt_dlhandle handle = 0, newhandle; ! const char *ext; ! const char *saved_error; ! char *canonical = 0, *basename = 0, *dir = 0, *name = 0; ! ! MUTEX_GETERROR (saved_error); ! ! /* dlopen self? */ ! if (!filename) ! { ! handle = (lt_dlhandle) LT_DLMALLOC (struct lt_dlhandle_struct, 1); ! if (!handle) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return 0; ! } ! ! handle->info.ref_count = 0; ! handle->depcount = 0; ! handle->deplibs = 0; ! handle->caller_data = 0; ! newhandle = handle; ! ! /* lt_dlclose()ing yourself is very bad! Disallow it. */ ! LT_DLSET_FLAG (handle, LT_DLRESIDENT_FLAG); ! ! if (tryall_dlopen (&newhandle, 0) != 0) ! { ! LT_DLFREE (handle); ! return 0; ! } ! goto register_handle; ! } ! ! canonical = canonicalize_path (filename); ! if (!canonical) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! LT_DLFREE (handle); ! return 0; ! } ! ! /* If the canonical module name is a path (relative or absolute) ! then split it into a directory part and a name part. */ ! basename = strrchr (canonical, '/'); ! if (basename) ! { ! ++basename; ! dir = LT_DLMALLOC (char, basename - canonical + 1); ! if (!dir) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! handle = 0; ! goto cleanup; ! } ! ! strncpy (dir, canonical, basename - canonical); ! dir[basename - canonical] = '\0'; ! } ! else ! { ! basename = canonical; ! } ! ! /* Check whether we are opening a libtool module (.la extension). */ ! ext = strrchr(basename, '.'); ! if (ext && strcmp(ext, ".la") == 0) ! { ! /* this seems to be a libtool module */ ! FILE *file = 0; ! int i; ! char *dlname = 0, *old_name = 0; ! char *libdir = 0, *deplibs = 0; ! char *line; ! size_t line_len; ! int error = 0; ! ! /* if we can't find the installed flag, it is probably an ! installed libtool archive, produced with an old version ! of libtool */ ! int installed = 1; ! ! /* extract the module name from the file name */ ! name = LT_DLMALLOC (char, ext - basename + 1); ! if (!name) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! handle = 0; ! goto cleanup; ! } ! ! /* canonicalize the module name */ ! for (i = 0; i < ext - basename; ++i) ! { ! if (isalnum ((int)(basename[i]))) ! { ! name[i] = basename[i]; ! } ! else ! { ! name[i] = '_'; ! } ! } ! ! name[ext - basename] = '\0'; ! ! /* Now try to open the .la file. If there is no directory name ! component, try to find it first in user_search_path and then other ! prescribed paths. Otherwise (or in any case if the module was not ! yet found) try opening just the module name as passed. */ ! if (!dir) ! { ! file = (FILE*) find_file(basename, user_search_path, &dir, 0); ! if (!file) ! { ! file = (FILE*) find_file(basename, getenv("LTDL_LIBRARY_PATH"), ! &dir, 0); ! } ! #ifdef LTDL_SHLIBPATH_VAR ! if (!file) ! { ! file = (FILE*) find_file(basename, getenv(LTDL_SHLIBPATH_VAR), ! &dir, 0); ! } ! #endif ! #ifdef LTDL_SYSSEARCHPATH ! if (!file) ! { ! file = (FILE*) find_file(basename, sys_search_path, &dir, 0); ! } ! #endif ! } ! if (!file) ! { ! file = fopen (filename, LT_READTEXT_MODE); ! } ! if (!file) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ! } ! ! if (!file) ! { ! handle = 0; ! goto cleanup; ! } ! ! line_len = LT_FILENAME_MAX; ! line = LT_DLMALLOC (char, line_len); ! if (!line) ! { ! fclose (file); ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! handle = 0; ! goto cleanup; ! } ! ! /* read the .la file */ ! while (!feof(file)) ! { ! if (!fgets (line, line_len, file)) ! { ! break; ! } ! ! ! /* Handle the case where we occasionally need to read a line ! that is longer than the initial buffer size. */ ! while (line[strlen(line) -1] != '\n') ! { ! line = LT_DLREALLOC (char, line, line_len *2); ! if (!fgets (&line[line_len -1], line_len +1, file)) ! { ! break; } ! line_len *= 2; ! } ! ! if (line[0] == '\n' || line[0] == '#') ! { ! continue; ! } ! ! #undef STR_DLNAME ! #define STR_DLNAME "dlname=" ! if (strncmp (line, STR_DLNAME, sizeof (STR_DLNAME) - 1) == 0) ! { ! error = trim (&dlname, &line[sizeof (STR_DLNAME) - 1]); ! } ! ! #undef STR_OLD_LIBRARY ! #define STR_OLD_LIBRARY "old_library=" ! else if (strncmp (line, STR_OLD_LIBRARY, ! sizeof (STR_OLD_LIBRARY) - 1) == 0) ! { ! error = trim (&old_name, &line[sizeof (STR_OLD_LIBRARY) - 1]); ! } ! #undef STR_LIBDIR ! #define STR_LIBDIR "libdir=" ! else if (strncmp (line, STR_LIBDIR, sizeof (STR_LIBDIR) - 1) == 0) ! { ! error = trim (&libdir, &line[sizeof(STR_LIBDIR) - 1]); ! } ! ! #undef STR_DL_DEPLIBS ! #define STR_DL_DEPLIBS "dependency_libs=" ! else if (strncmp (line, STR_DL_DEPLIBS, ! sizeof (STR_DL_DEPLIBS) - 1) == 0) ! { ! error = trim (&deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]); ! } ! else if (strcmp (line, "installed=yes\n") == 0) ! { ! installed = 1; ! } ! else if (strcmp (line, "installed=no\n") == 0) ! { ! installed = 0; ! } ! ! #undef STR_LIBRARY_NAMES ! #define STR_LIBRARY_NAMES "library_names=" ! else if (! dlname && strncmp (line, STR_LIBRARY_NAMES, ! sizeof (STR_LIBRARY_NAMES) - 1) == 0) ! { ! char *last_libname; ! error = trim (&dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]); ! if (! error && dlname && ! (last_libname = strrchr (dlname, ' ')) != NULL) ! { ! last_libname = strdup (last_libname + 1); ! LT_DLMEM_REASSIGN (dlname, last_libname); } ! } ! ! if (error) ! { ! break; ! } ! } ! ! fclose (file); ! LT_DLFREE (line); ! ! /* allocate the handle */ ! handle = (lt_dlhandle) LT_DLMALLOC (struct lt_dlhandle_struct, 1); ! if (!handle || error) ! { ! LT_DLFREE (handle); ! if (!error) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! } ! ! free_vars (dlname, old_name, libdir, deplibs); ! /* handle is already set to 0 */ ! goto cleanup; ! } ! ! handle->info.ref_count = 0; ! if (load_deplibs (handle, deplibs) == 0) ! { ! newhandle = handle; ! /* find_module may replace newhandle */ ! if (find_module (&newhandle, dir, libdir, dlname, old_name, installed)) ! { ! unload_deplibs (handle); ! error = 1; ! } ! } ! else ! { ! error = 1; ! } ! ! free_vars (dlname, old_name, libdir, deplibs); ! if (error) ! { ! LT_DLFREE (handle); ! goto cleanup; ! } ! ! if (handle != newhandle) ! { ! unload_deplibs (handle); ! } ! } ! else ! { ! /* not a libtool module */ ! handle = (lt_dlhandle) LT_DLMALLOC (struct lt_dlhandle_struct, 1); ! if (!handle) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! /* handle is already set to 0 */ ! goto cleanup; ! } ! handle->info.ref_count = 0; ! /* non-libtool modules don't have dependencies */ ! handle->depcount = 0; ! handle->deplibs = 0; ! newhandle = handle; ! ! /* If the module has no directory name component, try to find it ! first in user_search_path and then other prescribed paths. ! Otherwise (or in any case if the module was not yet found) try ! opening just the module name as passed. */ ! if ((dir || (!find_file (basename, user_search_path, 0, &newhandle) ! && !find_file (basename, getenv ("LTDL_LIBRARY_PATH"), ! 0, &newhandle) #ifdef LTDL_SHLIBPATH_VAR ! && !find_file (basename, getenv (LTDL_SHLIBPATH_VAR), ! 0, &newhandle) ! #endif ! #ifdef LTDL_SYSSEARCHPATH ! && !find_file (basename, sys_search_path, 0, &newhandle) ! #endif ! )) && tryall_dlopen (&newhandle, filename)) ! { ! LT_DLFREE (handle); ! goto cleanup; } ! } ! ! register_handle: ! LT_DLMEM_REASSIGN (handle, newhandle); ! ! if (handle->info.ref_count == 0) ! { ! handle->info.ref_count = 1; ! handle->info.name = name; ! handle->next = handles; ! ! MUTEX_LOCK (); ! handles = handle; ! MUTEX_UNLOCK (); ! ! name = 0; /* don't free this during `cleanup' */ ! } ! ! MUTEX_SETERROR (saved_error); ! ! cleanup: ! LT_DLFREE (dir); ! LT_DLFREE (name); ! LT_DLFREE (canonical); ! ! return handle; } lt_dlhandle lt_dlopenext (filename) ! const char *filename; { ! lt_dlhandle handle; ! char *tmp; ! int len; ! const char *saved_error; ! ! MUTEX_GETERROR (saved_error); ! ! if (!filename) ! { ! return lt_dlopen (filename); ! } ! ! len = strlen (filename); ! if (!len) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ! return 0; ! } ! ! /* try "filename.la" */ ! tmp = LT_DLMALLOC (char, len+4); ! if (!tmp) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return 0; ! } ! strcpy (tmp, filename); ! strcat (tmp, ".la"); ! handle = lt_dlopen (tmp); ! if (handle) ! { ! MUTEX_SETERROR (saved_error); ! LT_DLFREE (tmp); ! return handle; ! } ! #ifdef LTDL_SHLIB_EXT ! /* try "filename.EXT" */ ! if (strlen(shlib_ext) > 3) ! { ! LT_DLFREE (tmp); ! tmp = LT_DLMALLOC (char, len + strlen (shlib_ext) + 1); ! if (!tmp) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return 0; ! } ! strcpy (tmp, filename); ! } ! else ! { ! tmp[len] = '\0'; ! } ! ! strcat(tmp, shlib_ext); ! handle = lt_dlopen (tmp); ! if (handle) ! { ! MUTEX_SETERROR (saved_error); ! LT_DLFREE (tmp); ! return handle; ! } ! #endif ! ! /* try the normal file name */ ! handle = lt_dlopen (filename); ! if (handle) ! { ! return handle; ! } ! ! MUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ! LT_DLFREE (tmp); ! return 0; } int lt_dlclose (handle) ! lt_dlhandle handle; { ! lt_dlhandle cur, last; ! int errors = 0; ! ! MUTEX_LOCK (); ! ! /* check whether the handle is valid */ ! last = cur = handles; ! while (cur && handle != cur) ! { ! last = cur; ! cur = cur->next; ! } ! ! if (!cur) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! ++errors; ! goto done; ! } ! ! handle->info.ref_count--; ! ! /* Note that even with resident modules, we must track the ref_count ! correctly incase the user decides to reset the residency flag ! later (even though the API makes no provision for that at the ! moment). */ ! if (handle->info.ref_count <= 0 && !LT_DLIS_RESIDENT (handle)) ! { ! lt_user_data data = handle->loader->dlloader_data; ! ! if (handle != handles) ! { ! last->next = handle->next; ! } ! else ! { ! handles = handle->next; } ! ! errors += handle->loader->module_close (data, handle->module); ! errors += unload_deplibs(handle); ! ! LT_DLFREE (handle->info.filename); ! LT_DLFREE (handle->info.name); ! LT_DLFREE (handle); ! ! goto done; ! } ! ! if (LT_DLIS_RESIDENT (handle)) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (CLOSE_RESIDENT_MODULE)); ! ++errors; ! } ! ! done: ! MUTEX_UNLOCK (); ! ! return errors; } ! lt_ptr lt_dlsym (handle, symbol) ! lt_dlhandle handle; ! const char *symbol; { ! int lensym; ! char lsym[LT_SYMBOL_LENGTH]; ! char *sym; ! lt_ptr address; ! lt_user_data data; ! ! if (!handle) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! return 0; ! } ! ! if (!symbol) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! return 0; ! } ! ! lensym = strlen(symbol); ! if (handle->loader->sym_prefix) ! { ! lensym += strlen(handle->loader->sym_prefix); ! } ! ! if (handle->info.name) ! { ! lensym += strlen(handle->info.name); ! } ! ! if (lensym + LT_SYMBOL_OVERHEAD < LT_SYMBOL_LENGTH) ! { ! sym = lsym; ! } ! else ! { ! sym = LT_DLMALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1); ! } ! ! if (!sym) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (BUFFER_OVERFLOW)); ! return 0; ! } ! ! data = handle->loader->dlloader_data; ! if (handle->info.name) ! { ! const char *saved_error; ! ! MUTEX_GETERROR (saved_error); ! ! /* this is a libtool module */ ! if (handle->loader->sym_prefix) ! { ! strcpy(sym, handle->loader->sym_prefix); ! strcat(sym, handle->info.name); ! } ! else ! { ! strcpy(sym, handle->info.name); ! } ! ! strcat(sym, "_LTX_"); ! strcat(sym, symbol); ! ! /* try "modulename_LTX_symbol" */ ! address = handle->loader->find_sym (data, handle->module, sym); ! if (address) ! { ! if (sym != lsym) ! { ! LT_DLFREE (sym); ! } ! return address; ! } ! MUTEX_SETERROR (saved_error); ! } ! ! /* otherwise try "symbol" */ ! if (handle->loader->sym_prefix) ! { ! strcpy(sym, handle->loader->sym_prefix); ! strcat(sym, symbol); ! } ! else ! { ! strcpy(sym, symbol); ! } ! ! address = handle->loader->find_sym (data, handle->module, sym); ! if (sym != lsym) ! { ! LT_DLFREE (sym); ! } ! ! return address; } const char * ! lt_dlerror () { ! const char *error; ! ! MUTEX_GETERROR (error); ! MUTEX_SETERROR (0); ! ! return error; } int lt_dladdsearchdir (search_dir) ! const char *search_dir; { ! int errors = 0; ! ! if (!search_dir || !strlen(search_dir)) ! { ! return errors; ! } ! ! MUTEX_LOCK (); ! if (!user_search_path) ! { ! user_search_path = strdup (search_dir); ! if (!user_search_path) ! { ! last_error = LT_DLSTRERROR (NO_MEMORY); ! ++errors; ! } ! } ! else ! { ! size_t len = strlen (user_search_path) + 1 + strlen (search_dir); ! char *new_search_path = LT_DLMALLOC (char, 1+ len); ! ! if (!new_search_path) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! ++errors; ! } ! else ! { ! sprintf (new_search_path, "%s%c%s", user_search_path, ! LT_PATHSEP_CHAR, search_dir); ! ! LT_DLMEM_REASSIGN (user_search_path, new_search_path); } ! } ! MUTEX_UNLOCK (); ! ! return errors; } int lt_dlsetsearchpath (search_path) ! const char *search_path; { ! int errors = 0; ! ! MUTEX_LOCK (); ! LT_DLFREE (user_search_path); ! MUTEX_UNLOCK (); ! ! if (!search_path || !strlen (search_path)) ! { ! return errors; ! } ! ! MUTEX_LOCK (); ! user_search_path = strdup (search_path); ! if (!user_search_path) ! { ! ++errors; ! } ! MUTEX_UNLOCK (); ! ! return errors; } const char * ! lt_dlgetsearchpath () ! { ! const char *saved_path; ! ! MUTEX_LOCK (); ! saved_path = user_search_path; ! MUTEX_UNLOCK (); ! ! return saved_path; ! } ! ! int ! lt_dlmakeresident (handle) ! lt_dlhandle handle; { ! int errors = 0; ! ! if (!handle) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! ++errors; ! } ! else ! { ! LT_DLSET_FLAG (handle, LT_DLRESIDENT_FLAG); ! } ! ! return errors; ! } ! ! int ! lt_dlisresident (handle) ! lt_dlhandle handle; ! { ! if (!handle) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! return -1; ! } ! ! return LT_DLIS_RESIDENT (handle); ! } ! ! ! ! ! /* --- MODULE INFORMATION --- */ ! ! const lt_dlinfo * ! lt_dlgetinfo (handle) ! lt_dlhandle handle; ! { ! if (!handle) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ! return 0; ! } ! ! return &(handle->info); ! } ! ! lt_dlhandle ! lt_dlhandle_next (place) ! lt_dlhandle place; ! { ! return place ? place->next : (lt_dlhandle) 0; ! } ! ! int ! lt_dlforeach (func, data) ! int (*func) LT_PARAMS((lt_dlhandle handle, lt_ptr data)); ! lt_ptr data; ! { ! int errors = 0; ! lt_dlhandle cur; ! ! MUTEX_LOCK (); ! ! cur = handles; ! while (cur) ! { ! lt_dlhandle tmp = cur; ! ! cur = cur->next; ! if ((*func) (tmp, data)) ! { ! ++errors; ! break; ! } ! } ! ! MUTEX_UNLOCK (); ! ! return errors; ! } ! ! lt_dlcaller_id ! lt_dlcaller_register () ! { ! static int last_caller_id = -1; ! int result; ! ! MUTEX_LOCK (); ! result = ++last_caller_id; ! MUTEX_UNLOCK (); ! ! return result; ! } ! ! #define N_ELEMENTS(a) (sizeof(a) / sizeof(*(a))) ! ! lt_ptr ! lt_dlcaller_set_data (key, handle, data) ! lt_dlcaller_id key; ! lt_dlhandle handle; ! lt_ptr data; ! { ! int n_elements = 0; ! lt_ptr stale = (lt_ptr) 0; ! int i; ! ! /* This needs to be locked so that the caller data can be updated ! simultaneously by different threads. */ ! MUTEX_LOCK (); ! ! if (handle->caller_data) ! n_elements = N_ELEMENTS (handle->caller_data); ! ! for (i = 0; i < n_elements; ++i) ! { ! if (handle->caller_data[i].key == key) ! { ! stale = handle->caller_data[i].data; ! break; ! } ! } ! ! /* Ensure that there is enough room in this handle's caller_data ! array to accept a new element. */ ! if (i == n_elements) ! { ! lt_caller_data *temp ! = LT_DLREALLOC (lt_caller_data, handle->caller_data, 1+ n_elements); ! ! if (temp == 0) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! stale = (lt_ptr) 0; ! goto done; ! } ! else ! { ! handle->caller_data = temp; ! } ! ! /* We only need this if we needed to allocate a new caller_data. */ ! handle->caller_data[i].key = key; ! } ! ! handle->caller_data[i].data = data; ! ! done: ! MUTEX_UNLOCK (); ! ! return stale; ! } ! ! lt_ptr ! lt_dlcaller_get_data (key, handle) ! lt_dlcaller_id key; ! lt_dlhandle handle; ! { ! lt_ptr result = (lt_ptr) 0; ! int n_elements = 0; ! ! /* This needs to be locked so that the caller data isn't updated by ! another thread part way through this function. */ ! MUTEX_LOCK (); ! ! if (handle->caller_data) ! n_elements = N_ELEMENTS (handle->caller_data); ! ! /* Locate the index of the element with a matching KEY. */ ! { ! int i; ! for (i = 0; i < n_elements; ++i) ! { ! if (handle->caller_data[i].key == key) ! { ! result = handle->caller_data[i].data; ! break; ! } ! } ! } ! ! MUTEX_UNLOCK (); ! ! return result; ! } ! ! ! ! /* --- USER MODULE LOADER API --- */ ! ! ! int ! lt_dlloader_add (place, dlloader, loader_name) ! lt_dlloader *place; ! const struct lt_user_dlloader *dlloader; ! const char *loader_name; ! { ! int errors = 0; ! lt_dlloader *node = 0, *ptr = 0; ! ! if ((dlloader == 0) /* diagnose null parameters */ ! || (dlloader->module_open == 0) ! || (dlloader->module_close == 0) ! || (dlloader->find_sym == 0)) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ! return 1; ! } ! ! /* Create a new dlloader node with copies of the user callbacks. */ ! node = LT_DLMALLOC (lt_dlloader, 1); ! if (node == 0) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return 1; ! } ! ! node->next = 0; ! node->loader_name = loader_name; ! node->sym_prefix = dlloader->sym_prefix; ! node->dlloader_exit = dlloader->dlloader_exit; ! node->module_open = dlloader->module_open; ! node->module_close = dlloader->module_close; ! node->find_sym = dlloader->find_sym; ! node->dlloader_data = dlloader->dlloader_data; ! ! MUTEX_LOCK (); ! if (!loaders) ! { ! /* If there are no loaders, NODE becomes the list! */ ! loaders = node; ! } ! else if (!place) ! { ! /* If PLACE is not set, add NODE to the end of the ! LOADERS list. */ ! for (ptr = loaders; ptr->next; ptr = ptr->next) ! { ! /*NOWORK*/; ! } ! ! ptr->next = node; ! } ! else if (loaders == place) ! { ! /* If PLACE is the first loader, NODE goes first. */ ! node->next = place; ! loaders = node; ! } ! else ! { ! /* Find the node immediately preceding PLACE. */ ! for (ptr = loaders; ptr->next != place; ptr = ptr->next) ! { ! /*NOWORK*/; ! } ! ! if (ptr->next != place) ! { ! last_error = LT_DLSTRERROR (INVALID_LOADER); ! ++errors; ! } ! else ! { ! /* Insert NODE between PTR and PLACE. */ ! node->next = place; ! ptr->next = node; ! } ! } ! ! MUTEX_UNLOCK (); ! ! return errors; ! } ! ! int ! lt_dlloader_remove (loader_name) ! const char *loader_name; ! { ! lt_dlloader *place = lt_dlloader_find (loader_name); ! lt_dlhandle handle; ! int errors = 0; ! ! if (!place) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ! return 1; ! } ! ! MUTEX_LOCK (); ! ! /* Fail if there are any open modules which use this loader. */ ! for (handle = handles; handle; handle = handle->next) ! { ! if (handle->loader == place) ! { ! MUTEX_SETERROR (LT_DLSTRERROR (REMOVE_LOADER)); ! ++errors; ! goto done; ! } ! } ! ! if (place == loaders) ! { ! /* PLACE is the first loader in the list. */ ! loaders = loaders->next; ! } ! else ! { ! /* Find the loader before the one being removed. */ ! lt_dlloader *prev; ! for (prev = loaders; prev->next; prev = prev->next) ! { ! if (!strcmp (prev->next->loader_name, loader_name)) ! { ! break; ! } ! } ! ! place = prev->next; ! prev->next = prev->next->next; ! } ! ! if (place->dlloader_exit) ! { ! errors = place->dlloader_exit (place->dlloader_data); ! } ! ! LT_DLFREE (place); ! ! done: ! MUTEX_UNLOCK (); ! ! return errors; ! } ! ! lt_dlloader * ! lt_dlloader_next (place) ! lt_dlloader *place; ! { ! lt_dlloader *next; ! ! MUTEX_LOCK (); ! next = place ? place->next : loaders; ! MUTEX_UNLOCK (); ! ! return next; ! } ! ! const char * ! lt_dlloader_name (place) ! lt_dlloader *place; ! { ! const char *name = 0; ! ! if (place) ! { ! MUTEX_LOCK (); ! name = place ? place->loader_name : 0; ! MUTEX_UNLOCK (); ! } ! else ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ! } ! ! return name; ! } ! ! lt_user_data * ! lt_dlloader_data (place) ! lt_dlloader *place; ! { ! lt_user_data *data = 0; ! ! if (place) ! { ! MUTEX_LOCK (); ! data = place ? &(place->dlloader_data) : 0; ! MUTEX_UNLOCK (); ! } ! else ! { ! MUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ! } ! ! return data; ! } ! ! lt_dlloader * ! lt_dlloader_find (loader_name) ! const char *loader_name; ! { ! lt_dlloader *place = 0; ! ! MUTEX_LOCK (); ! for (place = loaders; place; place = place->next) ! { ! if (strcmp (place->loader_name, loader_name) == 0) ! { ! break; ! } ! } ! MUTEX_UNLOCK (); ! ! return place; } Index: libtool/libltdl/ltdl.h diff -c libtool/libltdl/ltdl.h:1.19.2.5 libtool/libltdl/ltdl.h:1.53 *** libtool/libltdl/ltdl.h:1.19.2.5 Tue Nov 2 04:36:23 1999 --- libtool/libltdl/ltdl.h Fri Feb 23 14:58:20 2001 *************** *** 1,92 **** /* ltdl.h -- generic dlopen functions ! Copyright (C) 1998-1999 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. This library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ! As a special exception to the GNU Library General Public License, ! if you distribute this file as part of a program that uses GNU libtool ! to create libraries and programs, you may include it under the same distribution terms that you use for the rest of that program. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! Library General Public License for more details. ! You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Only include this header file once. */ ! #ifndef _LTDL_H_ ! #define _LTDL_H_ 1 ! /* __BEGIN_DECLS should be used at the beginning of your declarations, ! so that C++ compilers don't mangle their names. Use __END_DECLS at the end of C declarations. */ - #undef __BEGIN_DECLS - #undef __END_DECLS #ifdef __cplusplus ! # define __BEGIN_DECLS extern "C" { ! # define __END_DECLS } #else ! # define __BEGIN_DECLS /* empty */ ! # define __END_DECLS /* empty */ #endif ! /* LTDL_PARAMS is a macro used to wrap function prototypes, so that compilers that don't understand ANSI C prototypes still work, and ANSI C ! compilers can issue warnings about type mismatches. */ ! #undef LTDL_PARAMS ! #undef lt_ptr_t #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) ! # define LTDL_PARAMS(protos) protos ! # define lt_ptr_t void* #else ! # define LTDL_PARAMS(protos) () ! # define lt_ptr_t char* #endif ! #include ! #ifdef _LTDL_COMPILE_ ! typedef struct lt_dlhandle_t *lt_dlhandle; #else ! typedef lt_ptr_t lt_dlhandle; #endif typedef struct { ! const char *name; ! lt_ptr_t address; } lt_dlsymlist; ! __BEGIN_DECLS ! extern int lt_dlinit LTDL_PARAMS((void)); ! extern int lt_dlpreload LTDL_PARAMS((const lt_dlsymlist *preloaded)); ! extern int lt_dlpreload_default LTDL_PARAMS((const lt_dlsymlist *preloaded)); ! extern int lt_dlexit LTDL_PARAMS((void)); ! extern lt_dlhandle lt_dlopen LTDL_PARAMS((const char *filename)); ! extern lt_dlhandle lt_dlopenext LTDL_PARAMS((const char *filename)); ! extern int lt_dlclose LTDL_PARAMS((lt_dlhandle handle)); ! extern lt_ptr_t lt_dlsym LTDL_PARAMS((lt_dlhandle handle, const char *name)); ! extern const char *lt_dlerror LTDL_PARAMS((void)); ! extern int lt_dladdsearchdir LTDL_PARAMS((const char *search_dir)); ! extern int lt_dlsetsearchpath LTDL_PARAMS((const char *search_path)); ! extern const char *lt_dlgetsearchpath LTDL_PARAMS((void)); ! ! extern const lt_dlsymlist lt_preloaded_symbols[]; ! #define LTDL_SET_PRELOADED_SYMBOLS() lt_dlpreload_default(lt_preloaded_symbols) ! ! extern lt_ptr_t (*lt_dlmalloc)LTDL_PARAMS((size_t size)); ! extern void (*lt_dlfree)LTDL_PARAMS((lt_ptr_t ptr)); ! __END_DECLS ! #endif /* !_LTDL_H_ */ --- 1,344 ---- /* ltdl.h -- generic dlopen functions ! Copyright (C) 1998-2000 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. This library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ! As a special exception to the GNU Lesser General Public License, ! if you distribute this file as part of a program or library that ! is built using GNU libtool, you may include it under the same distribution terms that you use for the rest of that program. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! Lesser General Public License for more details. ! You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Only include this header file once. */ ! #ifndef LTDL_H ! #define LTDL_H 1 ! #include /* for size_t declaration */ ! ! ! /* --- MACROS FOR PORTABILITY --- */ ! ! ! /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, ! so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at the end of C declarations. */ #ifdef __cplusplus ! # define LT_BEGIN_C_DECLS extern "C" { ! # define LT_END_C_DECLS } #else ! # define LT_BEGIN_C_DECLS /* empty */ ! # define LT_END_C_DECLS /* empty */ #endif ! LT_BEGIN_C_DECLS ! ! ! /* LT_PARAMS is a macro used to wrap function prototypes, so that compilers that don't understand ANSI C prototypes still work, and ANSI C ! compilers can issue warnings about type mismatches. */ #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) ! # define LT_PARAMS(protos) protos ! # define lt_ptr void* #else ! # define LT_PARAMS(protos) () ! # define lt_ptr char* #endif ! /* LT_STMT_START/END are used to create macros which expand to a ! a single compound statement in a portable way. */ ! #if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) ! # define LT_STMT_START (void)( ! # define LT_STMT_END ) ! #else ! # if (defined (sun) || defined (__sun__)) ! # define LT_STMT_START if (1) ! # define LT_STMT_END else (void)0 ! # else ! # define LT_STMT_START do ! # define LT_STMT_END while (0) ! # endif ! #endif ! /* LT_CONC creates a new concatenated symbol for the compiler ! in a portable way. */ ! #if defined(__STDC__) || defined(__cplusplus) ! # define LT_CONC(s,t) s##t #else ! # define LT_CONC(s,t) s/**/t #endif + + + + /* --- WINDOWS SUPPORT --- */ + + + /* Canonicalise Windows and Cygwin recognition macros. */ + #ifdef __CYGWIN32__ + # ifndef __CYGWIN__ + # define __CYGWIN__ __CYGWIN32__ + # endif + #endif + #if defined(_WIN32) || defined(WIN32) + # ifndef __WINDOWS__ + # ifdef _WIN32 + # define __WINDOWS__ _WIN32 + # else + # ifdef WIN32 + # define __WINDOWS__ WIN32 + # endif + # endif + # endif + #endif + + #ifdef __WINDOWS__ + # ifndef __CYGWIN__ + /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory + separator when it is set. */ + # define LT_DIRSEP_CHAR '\\' + # define LT_PATHSEP_CHAR ';' + # endif + #endif + #ifndef LT_PATHSEP_CHAR + # define LT_PATHSEP_CHAR ':' + #endif + + /* DLL building support on win32 hosts; mostly to workaround their + ridiculous implementation of data symbol exporting. */ + #ifndef LT_SCOPE + # ifdef __WINDOWS__ + # ifdef DLL_EXPORT /* defined by libtool (if required) */ + # define LT_SCOPE __declspec(dllexport) + # endif + # ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */ + # define LT_SCOPE extern __declspec(dllimport) + # endif + # endif + # ifndef LT_SCOPE /* static linking or !__WINDOWS__ */ + # define LT_SCOPE extern + # endif + #endif + + + + + /* --- DYNAMIC MODULE LOADING API --- */ + + + typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */ + + /* Initialisation and finalisation functions for libltdl. */ + extern int lt_dlinit LT_PARAMS((void)); + extern int lt_dlexit LT_PARAMS((void)); + + /* Module search path manipultation. */ + extern int lt_dladdsearchdir LT_PARAMS((const char *search_dir)); + extern int lt_dlsetsearchpath LT_PARAMS((const char *search_path)); + extern const char *lt_dlgetsearchpath LT_PARAMS((void)); + + /* Portable libltdl versions of the system dlopen() API. */ + extern lt_dlhandle lt_dlopen LT_PARAMS((const char *filename)); + extern lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename)); + extern lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle, + const char *name)); + extern const char *lt_dlerror LT_PARAMS((void)); + extern int lt_dlclose LT_PARAMS((lt_dlhandle handle)); + + /* Module residency management. */ + extern int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle)); + extern int lt_dlisresident LT_PARAMS((lt_dlhandle handle)); + + + + + /* --- MUTEX LOCKING --- */ + + + typedef void lt_dlmutex_lock LT_PARAMS((void)); + typedef void lt_dlmutex_unlock LT_PARAMS((void)); + typedef void lt_dlmutex_seterror LT_PARAMS((const char *error)); + typedef const char *lt_dlmutex_geterror LT_PARAMS((void)); + + extern int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock, + lt_dlmutex_unlock *unlock, + lt_dlmutex_seterror *seterror, + lt_dlmutex_geterror *geterror)); + + + + + /* --- MEMORY HANDLING --- */ + + + /* Pointers to memory management functions to be used by libltdl. */ + LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)); + LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)); + + + + + /* --- PRELOADED MODULE SUPPORT --- */ + + + /* A preopened symbol. Arrays of this type comprise the exported + symbols for a dlpreopened module. */ typedef struct { ! const char *name; ! lt_ptr address; } lt_dlsymlist; ! extern int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded)); ! extern int lt_dlpreload_default ! LT_PARAMS((const lt_dlsymlist *preloaded)); ! ! #define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \ ! extern const lt_dlsymlist lt_preloaded_symbols[]; \ ! lt_dlpreload_default(lt_preloaded_symbols); \ ! }LT_STMT_END ! ! ! ! ! /* --- MODULE INFORMATION --- */ ! ! ! /* Read only information pertaining to a loaded module. */ ! typedef struct { ! char *filename; /* file name */ ! char *name; /* module name */ ! int ref_count; /* number of times lt_dlopened minus ! number of times lt_dlclosed. */ ! } lt_dlinfo; ! ! extern const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); ! extern lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)); ! extern int lt_dlforeach LT_PARAMS(( ! int (*func) (lt_dlhandle handle, lt_ptr data), ! lt_ptr data)); ! ! /* Associating user data with loaded modules. */ ! typedef unsigned lt_dlcaller_id; ! ! extern lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void)); ! extern lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key, ! lt_dlhandle handle, ! lt_ptr data)); ! extern lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key, ! lt_dlhandle handle)); ! ! ! ! /* --- USER MODULE LOADER API --- */ ! ! ! typedef struct lt_dlloader lt_dlloader; ! typedef lt_ptr lt_user_data; ! typedef lt_ptr lt_module; ! ! /* Function pointer types for creating user defined module loaders. */ ! typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data, ! const char *filename)); ! typedef int lt_module_close LT_PARAMS((lt_user_data loader_data, ! lt_module handle)); ! typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data, ! lt_module handle, ! const char *symbol)); ! typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data)); ! ! struct lt_user_dlloader { ! const char *sym_prefix; ! lt_module_open *module_open; ! lt_module_close *module_close; ! lt_find_sym *find_sym; ! lt_dlloader_exit *dlloader_exit; ! lt_user_data dlloader_data; ! }; ! ! extern lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place)); ! extern lt_dlloader *lt_dlloader_find LT_PARAMS(( ! const char *loader_name)); ! extern const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place)); ! extern lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place)); ! extern int lt_dlloader_add LT_PARAMS((lt_dlloader *place, ! const struct lt_user_dlloader *dlloader, ! const char *loader_name)); ! extern int lt_dlloader_remove LT_PARAMS(( ! const char *loader_name)); ! ! ! ! /* --- ERROR MESSAGE HANDLING --- */ ! ! ! /* Defining error strings alongside their symbolic names in a macro in ! this way allows us to expand the macro in different contexts with ! confidence that the enumeration of symbolic names will map correctly ! onto the table of error strings. */ ! #define lt_dlerror_table \ ! LT_ERROR(UNKNOWN, "unknown error") \ ! LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \ ! LT_ERROR(INVALID_LOADER, "invalid loader") \ ! LT_ERROR(INIT_LOADER, "loader initialization failed") \ ! LT_ERROR(REMOVE_LOADER, "loader removal failed") \ ! LT_ERROR(FILE_NOT_FOUND, "file not found") \ ! LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \ ! LT_ERROR(NO_SYMBOLS, "no symbols defined") \ ! LT_ERROR(CANNOT_OPEN, "can't open the module") \ ! LT_ERROR(CANNOT_CLOSE, "can't close the module") \ ! LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \ ! LT_ERROR(NO_MEMORY, "not enough memory") \ ! LT_ERROR(INVALID_HANDLE, "invalid module handle") \ ! LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \ ! LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \ ! LT_ERROR(SHUTDOWN, "library already shutdown") \ ! LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \ ! LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") ! ! /* Enumerate the symbolic error names. */ ! enum { ! #define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name), ! lt_dlerror_table ! #undef LT_ERROR ! ! LT_ERROR_MAX ! }; ! ! /* These functions are only useful from inside custom module loaders. */ ! extern int lt_dladderror LT_PARAMS((const char *diagnostic)); ! extern int lt_dlseterror LT_PARAMS((int errorcode)); ! ! ! ! ! /* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */ ! ! ! #ifdef LT_NON_POSIX_NAMESPACE ! # define lt_ptr_t lt_ptr ! # define lt_module_t lt_module ! # define lt_module_open_t lt_module_open ! # define lt_module_close_t lt_module_close ! # define lt_find_sym_t lt_find_sym ! # define lt_dlloader_exit_t lt_dlloader_exit ! # define lt_dlloader_t lt_dlloader ! # define lt_dlloader_data_t lt_user_data ! #endif ! LT_END_C_DECLS ! #endif /* !LTDL_H */ Index: libtool/mail/c++ diff -c libtool/mail/c++:1.4.4.1 libtool/mail/c++:1.6 *** libtool/mail/c++:1.4.4.1 Fri May 21 08:41:10 1999 --- libtool/mail/c++ Mon Jul 10 00:37:12 2000 *************** *** 393,402 **** by bambam.m-tech.ab.ca (8.8.7/8.8.7) with ESMTP id MAA30151 for ; Tue, 13 Oct 1998 12:14:55 -0600 Received: from proxy.grad.kiev.ua (grad-UTC-28k8.ukrtel.net [195.5.25.54]) ! by m> $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 ;; --- 746,758 ---- aix4*) --- 393,621 ---- by bambam.m-tech.ab.ca (8.8.7/8.8.7) with ESMTP id MAA30151 for ; Tue, 13 Oct 1998 12:14:55 -0600 Received: from proxy.grad.kiev.ua (grad-UTC-28k8.ukrtel.net [195.5.25.54]) ! by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id NAA14314 ! for ; Tue, 13 Oct 1998 13:56:26 -0400 ! Received: from Shevchenko.Kiev.UA (cam [10.0.0.50]) ! by proxy.grad.kiev.ua (8.8.8/8.8.7) with ESMTP id UAA04080 ! for ; Tue, 13 Oct 1998 20:54:29 +0300 (EEST) ! (envelope-from Ruslan@Shevchenko.Kiev.UA) ! Sender: rssh@proxy.grad.kiev.ua ! Message-ID: <3623937C.7E903DF8@Shevchenko.Kiev.UA> ! Date: Tue, 13 Oct 1998 20:53:00 +0300 ! From: Ruslan Shevchenko ! Reply-To: rssh@grad.kiev.ua ! X-Mailer: Mozilla 4.05 [en] (X11; I; FreeBSD 2.2.5-STABLE i386) ! MIME-Version: 1.0 ! To: bug-libtool@gnu.org ! Subject: overriding ARFLAGS. ! Content-Type: multipart/mixed; boundary="------------E06156B73BE5D4D4AD2BF900" ! Xref: trick.fig.org libtool:1683 ! Lines: 221 ! X-Gnus-Article-Number: 7 Mon Nov 2 17:16:26 1998 ! ! This is a multi-part message in MIME format. ! --------------E06156B73BE5D4D4AD2BF900 ! Content-Type: text/plain; charset=koi8-r ! Content-Transfer-Encoding: 7bit ! ! As I noted few days ago, the process of building a library (static or ! shared) ! with C++ can include addition steps, such as template instaniation. ! ! In libtool AR can be overrided from configure ${AR}, but ${ARFLAGS} ! (cru) ! is hardcoded into ltconfig.sh ! ! setting ${ARFLAGS} as variable (or cru if "$ARFLAGS" is empty ) actually ! enable ! building of templated C++ variables (static only yet) by overriding AR ! and ARFLAGS ! from configure. ! ! So, I attached to this messages diff, which change cru to ${ARFLAGS} in ! ltconfig.in (and therefore in ltconfig) ! ! Also, I think somewhere in documentation must exists the next note ! about ! Sun Solaris Workshop: ! /-------- ! When you want build libraries with implicit templates instaniated in, ! You must puss to ltconfig next envirowmnent variables: ! AR=CC ! ARFLAGS=$CXXFLAGS -xar -o ! ----------/ ! ! ! ! ! ! ! ! ! -- ! @= ! //RSSH ! mailto:Ruslan@Shevchenko.Kiev.UA ! ! CORBA in Ukraine & ex-USSR: http://www.corbadev.kiev.ua ! --------------E06156B73BE5D4D4AD2BF900 ! Content-Type: text/plain; charset=koi8-r; name="libtool.diff" ! Content-Transfer-Encoding: 7bit ! Content-Disposition: inline; filename="libtool.diff" ! ! Only in libtool-1.2-patched: Makefile ! Only in libtool-1.2-patched: config.cache ! Only in libtool-1.2-patched: config.log ! Only in libtool-1.2-patched: config.status ! Common subdirectories: libtool-1.2/demo and libtool-1.2-patched/demo ! Common subdirectories: libtool-1.2/doc and libtool-1.2-patched/doc ! Only in libtool-1.2-patched: libtool ! Only in libtool-1.2-patched: libtoolize ! diff -c libtool-1.2/ltconfig libtool-1.2-patched/ltconfig ! *** libtool-1.2/ltconfig Fri Mar 20 10:00:29 1998 ! --- libtool-1.2-patched/ltconfig Tue Oct 13 20:01:31 1998 ! *************** ! *** 89,95 **** ! --- 89,101 ---- ! with_gcc=no ! with_gnu_ld=no ! ! + if test "x$ARFLAGS" = x ! + then ! + ARFLAGS=cru ! + fi ! + ! old_AR="$AR" ! + old_ARFLAGS="$ARFLAGS" ! old_CC="$CC" ! old_CFLAGS="$CFLAGS" ! old_CPPFLAGS="$CPPFLAGS" ! *************** ! *** 320,326 **** ! 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= ! ! --- 326,332 ---- ! esac ! ! # Determine commands to create old-style static archives. ! ! old_archive_cmds='$AR $ARFLAGS $oldlib$oldobjs' ! old_postinstall_cmds='chmod 644 $oldlib' ! old_postuninstall_cmds= ! ! *************** ! *** 732,738 **** ! 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 ! --- 738,744 ---- ! 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 $ARFLAGS $lib $objdir/$soname' ! # Note: this linker hardcodes the directories in LIBPATH if there ! # are no directories specified by -L. ! hardcode_minus_L=yes ! *************** ! *** 745,757 **** ! ! 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 ;; + --- 751,763 ---- + + aix4*) + allow_undefined_flag=unsupported + ! archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR $ARFLAGS $lib $objdir/$soname' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + + amigaos*) + ! archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR $ARFLAGS $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + diff -c libtool-1.2/ltconfig.in libtool-1.2-patched/ltconfig.in + *** libtool-1.2/ltconfig.in Wed Mar 11 18:10:51 1998 + --- libtool-1.2-patched/ltconfig.in Tue Oct 13 20:44:56 1998 + *************** + *** 320,331 **** + 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 + --- 320,332 ---- + esac + + # Determine commands to create old-style static archives. + ! old_archive_cmds='$AR $ARFLAGS $oldlib$oldobjs' + old_postinstall_cmds='chmod 644 $oldlib' + old_postuninstall_cmds= + + # Set a sane default for `AR'. + test -z "$AR" && AR=ar + + test -z "$ARFLAGS" && ARFLAGS=cru + + # If RANLIB is not set, then run the test. + if test "${RANLIB+set}" != "set"; then + *************** + *** 732,738 **** + 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 + --- 733,739 ---- + 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 $ARFLAGS $lib $objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + *************** + *** 745,757 **** + + 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 + ;; --- 746,758 ---- aix4*) *************** *** 466,470 **** --- 685,845 ---- Object Developer WorldCom, Inc. + From libtool-request@gnu.org Wed Jun 9 13:20 EST 1999 + Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8]) + by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id NAA03816 + for ; Wed, 9 Jun 1999 13:20:28 -0300 (EST) + Received: from mescaline.gnu.org (mescaline.gnu.org [158.121.106.21]) + by grande.dcc.unicamp.br (8.9.1/8.9.1) with ESMTP id NAA01398 + for ; Wed, 9 Jun 1999 13:19:57 -0300 (EST) + Received: (from slist@localhost) + by mescaline.gnu.org (8.9.1a/8.9.1) id MAA06914 + for oliva@dcc.unicamp.br; Wed, 9 Jun 1999 12:23:06 -0400 + Received: from pen.sentuny.com.au (pen.sentuny.com.au [203.12.98.6]) + by mescaline.gnu.org (8.9.1a/8.9.1) with SMTP id MAA05773 + for ; Wed, 9 Jun 1999 12:16:37 -0400 + Received: (qmail 6298 invoked by uid 1000); 9 Jun 1999 16:16:33 -0000 + Received: from localhost (sendmail-bs@127.0.0.1) + by localhost with SMTP; 9 Jun 1999 16:16:32 -0000 + Resent-Date: Wed, 9 Jun 1999 12:23:06 -0400 + Date: Thu, 10 Jun 1999 02:16:32 +1000 (EST) + From: "Ron O'Hara" + To: libtool@gnu.org + Subject: AIX, C++, shared multi-thread libraries and libtool + X-Gnus-Mail-Source: file:/n/mail.spool/oliva + Message-ID: + MIME-Version: 1.0 + Resent-Message-ID: <"MVHQY2.0.OQ1.hDfNt"@mescaline.gnu.org> + Resent-From: libtool@gnu.org + X-Mailing-List: archive/latest/1500 + X-Loop: libtool@gnu.org + Precedence: list + Resent-Sender: libtool-request@gnu.org + Content-Type: TEXT/PLAIN; charset=US-ASCII + X-Content-Length: 857 + Xref: saci.lsd.dcc.unicamp.br libtool-cxx:9 + Lines: 28 + X-Gnus-Article-Number: 9 Fri Jun 25 20:06:59 1999 + + + AIX, C++, shared multi-thread libraries and libtool + + Ughh ... what a combination + + Anyway... it appears that for AIX4.2.1.0 creating shared libraries is very + tricky. You must use the 'makeC++SharedLib_r' script that IBM supplies. + Not the xlC_r compiler as libtool does. + + In addition, I kept getting unresolved symbols when linking against my own + libraries. I needed to set 'always_export_symbols=yes' even though the + -bexpall flag is supposed to fix that.. + + To do that I had to edit 'ltconfig.in' (about line 1262 for libtool-1.3.2) + and set it always on - regardless of the host_os version. + + I can now get it all to link, but this is sure an ugly monster !! and the + executable files are definitely HUGE + + + + + ------------------------------------------------------------------ + email: rono@sentuny.com.au + BH: (GMT) +353 21 281469 + Mobile: +61 419 873 801 + + From marcusd@cathcart.sysc.pdx.edu Fri Jun 18 17:46 EST 1999 + Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8]) + by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id RAA19966 + for ; Fri, 18 Jun 1999 17:46:53 -0300 (EST) + Received: from cathcart.sysc.pdx.edu (cathcart.sysc.pdx.edu [131.252.30.67]) + by grande.dcc.unicamp.br (8.9.1/8.9.1) with ESMTP id RAA20228 + for ; Fri, 18 Jun 1999 17:46:47 -0300 (EST) + Received: (from marcusd@localhost) + by cathcart.sysc.pdx.edu (8.9.3/8.9.3/Debian/GNU) id NAA30172; + Fri, 18 Jun 1999 13:50:02 -0700 + To: Alexandre Oliva + Cc: libtool@gnu.org + Subject: Re: constructors in HPUX/SOM shared libraries + References: <199905161700.LAA01572@pojoaque.santafe.edu> + From: marcusd@cathcart.sysc.pdx.edu (Marcus G. Daniels) + Date: 18 Jun 1999 13:50:01 -0700 + In-Reply-To: Alexandre Oliva's message of "23 May 1999 09:10:18 -0300" + X-Gnus-Mail-Source: file:/n/mail.spool/oliva + Message-ID: + User-Agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.3.10 + MIME-Version: 1.0 + Content-Type: text/plain; charset=us-ascii + X-Content-Length: 1653 + Xref: saci.lsd.dcc.unicamp.br libtool-cxx:10 + Lines: 68 + X-Gnus-Article-Number: 10 Fri Jun 25 20:06:59 1999 + + >>>>> "AO" == Alexandre Oliva writes: + + AO> IMO, the way to go is to try to use gcc -shared to create shared + AO> libraries, because then gcc's collect2 will (is supposed to?) take + AO> care of the magic for constructors to run. + + Unfortunately, it doesn't. Of course, with glibc or Solaris, a GNU + as/ld equipped GCC will do the job: + + marcusd@cathcart[~] $ cat constructor.c + void tryme (void) __attribute__ ((constructor)); + + void + tryme (void) + { + printf ("constructor\n"); + } + + marcusd@cathcart[~] $ cat test-constructor.c + #include + + main () + { + void *handle = dlopen ("./libconstructor.so", RTLD_GLOBAL | RTLD_LAZY); + printf ("%p\n", handle); + printf ("main\n"); + } + + marcusd@cathcart[~] $ gcc -fPIC -c constructor.c + marcusd@cathcart[~] $ gcc -shared constructor.o -o libconstructor.so + marcusd@cathcart[~] $ gcc test-constructor.c -ldl + marcusd@cathcart[~] $ ./a.out + constructor + 0x80496a8 + main + + However, the equivalent on HPsUX fails: + + mgd@pajarito[~] $ cat test-constructor.c + #include + #define SHL_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) + main () + { + shl_t handle; + + handle = shl_load ("./libconstructor.sl", SHL_FLAGS, 0L); + printf ("%x\n", handle); + + printf ("main\n"); + } + + mgd@pajarito[~] $ gcc -c -fPIC constructor.c + mgd@pajarito[~] $ gcc -fPIC -shared constructor.o -o libconstructor.sl + mgd@pajarito[~] $ gcc test-constructor.c -ldld + mgd@pajarito[~] $ ./a.out + 7b031748 + main + + However, there is a flag to the HP linker that provides the needed + feature: + + mgd@pajarito[~] $ gcc -Wl,+I,tryme -fPIC -shared constructor.o -o libconstructor.sl + mgd@pajarito[~] $ ./a.out + constructor + 7b031748 + main Index: libtool/mail/cygwin32 diff -c libtool/mail/cygwin32:1.4 libtool/mail/cygwin32:1.7 *** libtool/mail/cygwin32:1.4 Wed Nov 4 02:15:05 1998 --- libtool/mail/cygwin32 Fri Oct 27 13:04:28 2000 *************** *** 93,95 **** --- 93,960 ---- Ian + When libtool links DLLs, it strips some command line switches. It's probably + the case that this is ok for most situations. However, this potentially breaks + Mingw32 support in the Cygwin environment. + + In order to get Mingw32 support in Cygwin, the compiler must be invoked with + the -mno-cygwin switch. If libtool strips this switch out during the link + process, the resulting binary will get linked with the wrong import libraries. + + The following is a small example. I've edited the output a bit for + readability. When I send this email, long lines will get broken up, so it + still might be a bit difficult to read. + + ------------------------- + + $ libtool --version + ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11) + + + $ cat xx.c + + extern __declspec(dllexport) int func(void); + + int func() + { + } + + + $ libtool --mode=compile gcc -mno-cygwin -c xx.c + mkdir .libs + gcc -mno-cygwin -c -DPIC xx.c -o .libs/xx.lo + mv -f .libs/xx.lo xx.o + ln -s xx.o xx.lo + + $ libtool --mode=link gcc -mno-cygwin -o libxx.la xx.lo \ + -version-info 0:0:0 -no-undefined -rpath /usr/local/lib + + rm -fr .libs/libxx.la .libs/libxx.* .libs/libxx.* + + generating symbol list for `libxx.la' + + test -f .libs/libxx-0-0-0.dll-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here + \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < + /usr/local/bin/libtool > .libs/libxx-0-0-0.dll-ltdll.c + + test -f .libs/libxx-0-0-0.dll-ltdll.o || (cd .libs && gcc -c + libxx-0-0-0.dll-ltdll.c) + + dlltool --export-all --exclude-symbols + DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def + .libs/libxx-0-0-0.dll-def .libs/libxx-0-0-0.dll-ltdll.o xx.o + + sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < .libs/libxx-0-0-0.dll-def > + .libs/libxx.exp + + echo EXPORTS > .libs/libxx-0-0-0.dll-def + + _lt_hint=1; for symbol in `cat .libs/libxx.exp`; do echo " $symbol @ + $_lt_hint; " >> .libs/libxx-0-0-0.dll-def; _lt_hint=`expr 1 + $_lt_hint`; done + + test -f .libs/libxx-0-0-0.dll-ltdll.c || sed -e "/^# \/\* ltdll\.c starts + here\*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < + /usr/local/bin/libtool > .libs/libxx-0-0-0.dll-ltdll.c + + test -f .libs/libxx-0-0-0.dll-ltdll.o || (cd .libs && gcc -c + libxx-0-0-0.dll-ltdll.c) + + + gcc -Wl,--base-file,.libs/libxx-0-0-0.dll-base -Wl,--dll -nostartfiles -Wl,-e, + __cygwin_dll_entry@12 -o .libs/libxx-0-0-0.dll .libs/libxx-0-0-0.dll-ltdll.o + xx.o + + dlltool --as=as --dllname libxx-0-0-0.dll --exclude-symbols + DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def + .libs/libxx-0-0-0.dll-def --base-file .libs/libxx-0-0-0.dll-base --output-exp + .libs/libxx-0-0-0.dll-exp + + gcc -Wl,--base-file,.libs/libxx-0-0-0.dll-base + .libs/libxx-0-0-0.dll-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 + -o .libs/libxx-0-0-0.dll .libs/libxx-0-0-0.dll-ltdll.o xx.o + + dlltool --as=as --dllname libxx-0-0-0.dll --exclude-symbols + DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def + .libs/libxx-0-0-0.dll-def --base-file .libs/libxx-0-0-0.dll-base --output-exp + .libs/libxx-0-0-0.dll-exp + + gcc + .libs/libxx-0-0-0.dll-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 + -o .libs/libxx-0-0-0.dll .libs/libxx-0-0-0.dll-ltdll.o xx.o + + (cd .libs && rm -f libxx.a && ln -s libxx-0-0-0.dll libxx.a) + + dlltool --as=as --dllname libxx-0-0-0.dll --def + .libs/libxx-0-0-0.dll-def --output-lib .libs/libxx.a + + creating libxx.la + + (cd .libs && rm -f libxx.la && ln -s ../libxx.la libxx.la) + + --------------- + + Notice how the 'gcc' lines do not contain the -mno-cygwin switch. This switch + should not get stripped. + + Jon Leichter + jon@symas.com + + + "Gary V. Vaughan" wrote: + > + > On Wed, Aug 30, 2000 at 10:51:36AM -0400, Charles Wilson wrote: + > > No, it can't. Currently, libtool itself doesn't support *building* + > > dlls. + > + > Ouch. Yes it does. I added support around Christmas 1998, and have + > been maintaining it ever since. + + Thanks for the correction. + + > + > Yes it does. And provided your libraries don't trip over the stupid + > dll limitation of "to export a non-function symbol you must edit your + > sources", it works easily. Even if you do export data symbols, + > libtool woll build and link against a dll for you (even generating an + > import lib along the way). + > + > Unfortunately libtool was developed for Unix and assumes a featureful + > shared library architecture, which doesn't map very easily onto win32 + > dll's. + > + > I will be able to simplify the dll build process a little when DJ's + > patches to binutils arrive in a cygwin release (did this happen in + > 1.1? I have been so busy with m4 that I only upgraded from b20.1 a few + > weeks ago). + + They landed in binutils-20000625, and were finetuned/tweaked to a fairly + stable point by binutils-20000722 (the current version in /latest). + + Also, there were a few additions that changed ld's default search order + for libraries: + -Bstatic -lfoo : + looks for libfoo.a + -Bdynamic -lfoo : + looks for libfoo.dll.a (default name for an import lib) + then foo.dll.a (alt. name for an import lib) + then libfoo.dll (link directly to a dll) + then foo.dll (ditto, alt. name) + finally, libfoo.a (fall back to static lib) + + The spec file for gcc (as of 2.95.2-2) changed so that: + gcc -static calls 'ld -Bstatic' + gcc calls 'ld -Bdynamic' + + Finally, 'gcc -shared' will build a dll, but you need to pass linker + options like '-Wl,--out-implib=libfoo.dll.a' explicitly. + + FWIW, all of the (non-libtool) libraries I've dll-ized do not use + dlltool at all, and rely only on gcc (and ld, indirectly). + + --Chuck + + -- + Want to unsubscribe from this list? + Send a message to cygwin-unsubscribe@sourceware.cygnus.com + From gary Tue Oct 3 18:51:55 2000 + Return-Path: + Received: from pop3.mail.demon.net + by localhost with POP3 (fetchmail-5.3.4) + for gary@localhost (single-drop); Tue, 03 Oct 2000 18:51:55 +0100 (BST) + Received: from punt-2.mail.demon.net by mailstore + for gvaughan@oranda.demon.co.uk id 970581289:20:22249:24; + Tue, 03 Oct 2000 13:54:49 GMT + Received: from sourceware.cygnus.com ([205.180.83.71]) by punt-2.mail.demon.net + id aa2022220; 3 Oct 2000 13:54 GMT + Received: (qmail 29977 invoked by alias); 3 Oct 2000 13:52:38 -0000 + Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm + Precedence: bulk + List-Unsubscribe: + List-Subscribe: + List-Archive: + List-Post: + List-Help: , + Sender: cygwin-owner@sources.redhat.com + Delivered-To: mailing list cygwin@sources.redhat.com + Received: (qmail 29933 invoked from network); 3 Oct 2000 13:52:34 -0000 + Received: from mumnunah.cs.mu.oz.au (203.19.244.130) + by sourceware.cygnus.com with SMTP; 3 Oct 2000 13:52:34 -0000 + Received: from murlibobo.cs.mu.OZ.AU (murlibobo.cs.mu.OZ.AU [128.250.29.17]) by mumnunah.cs.mu.OZ.AU with ESMTP + id AAA23121; Wed, 4 Oct 2000 00:52:14 +1100 (EST) + Received: (from fjh@localhost) by murlibobo.cs.mu.OZ.AU (8.8.5/8.7.3) id AAA11289; Wed, 4 Oct 2000 00:52:13 +1100 (EST) + Date: Wed, 4 Oct 2000 00:52:13 +1100 + From: Fergus Henderson + To: "Gary V. Vaughan" , cygwin@sources.redhat.com, + cgf@cygnus.com + Subject: Re: linking against shared libraries + Message-ID: <20001004005212.A9274@murlibobo.cs.mu.OZ.AU> + References: <012a01c02033$936effc0$f7c723cb@lifelesswks> <20000917010735.G606@demon.co.uk> <20000916234420.A23827@cygnus.com> <20000917122440.I606@demon.co.uk> <20000917122837.A24997@cygnus.com> + Mime-Version: 1.0 + Content-Type: text/plain; charset=us-ascii + X-Mailer: Mutt 0.95.1i + In-Reply-To: <20000917122837.A24997@cygnus.com>; from Chris Faylor on Sun, Sep 17, 2000 at 12:28:37PM -0400 + Status: RO + Content-Length: 2625 + Lines: 51 + + On 17-Sep-2000, Chris Faylor wrote: + > On Sun, Sep 17, 2000 at 12:24:40PM +0100, Gary V. Vaughan wrote: + > >If you are interested, I will add an entry to my TODO list to see if I + > >can take some of the nicities from the libtldl LoadLibrary wrapper + > >code and apply them to the Cygwin LoadLibrary wrapper? (Automatic `_' + > >prefixing for example). + > + > Is this a characteristic of normal linux/UNIX dlsym? + + AFAIK, Unix systems that support dlopen() don't prefix C symbol + names with `_' when compiling them to assembler in the first place, + so the issue is moot. At least this is the case on Solaris (2.7), + Linux (>= libc6), and OSF1 (3.2 ), which are the systems that + I have easily available right now. dlopen() originated on Solaris, + according to the Linux man page. + + On systems such as Cygwin which do prefix C names with `_' when + compiling to assembler, whether dlopen() should prefix the name with an + underscore depends on whether the name that the user is trying to look + up is an assembly name or a C name. If it's a C name, then it's right + for dlopen() to prefix the name with an underscore, to match what the + C compiler does, but if it's an assembly name, then doing that would + be wrong. Unfortunately the interface to dlopen() provides the + dlopen() implementation with no clues as to which one the user meant. + The documentation for dlopen() says that the argument is the "symbol + name", which is ambiguous, but could be read as implying that it is + supposed to be the assembly name. However, in practice most uses of + dlopen() tend to be passing C names rather than assembler names. + + Probably most uses of dlopen() are for C names, and so inserting + the prefix would work well in most cases. However, inserting the + prefix would also make it impossible to look up assember names that + don't start with underscore using dlopen(). + + It's a bit like the issue of text-versus-binary: + the original unix-only interface didn't need to distinguish + between the different cases (text/binary or C/asm/whatever), + but in the Windows environment, you do need to make such + distinctions. So some programs will need source modifications. + The best you can do is to choose the default carefully, + and make it easy to override the default for programs for which + the default is not appropriate. + + -- + Fergus Henderson | "I have always known that the pursuit + WWW: | of excellence is a lethal habit" + PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp. + + -- + Want to unsubscribe from this list? + Send a message to cygwin-unsubscribe@sourceware.cygnus.com + + On Sun, Sep 03, 2000 at 01:34:23AM -0400, Charles Wilson wrote: + > "Gary V. Vaughan" wrote: + > + > > > Now, suppose that the png folks release a newer version, say png-2.1.x + > > > that exposes some additional features, but is backwards compatible with + > > > png-2.0.x. Great. You build it, but create: + > > > + > > > libpng31.dll.a (embeds the name libpng31.dll.a) + > > > libpng.dll.a -> libpng31.dll.a + > > > libpng3.dll (replaces the old version (*)) + > > + > > I don't think we need anything more than + > > + > > a replacement libpng3.dll + > + > Not so. Remember, libpng-2.1.x can include additional functions that + > were not included by libpng-2.0.x, as long as it includes all of the + > 'old' functions/vars without modification. So, you need to update the + > import lib as well as the dll, so that new packages that use the + > additional functions will work. + + Oops. I hadn't thought of that. Good point. + + > > Otherwise we are still in violent agreement. + > + > I agree. + + =)O| + + > > > > Maybe Cygwin should put all of it's libtool built libraries (or any + > > > > others that are correctly versioned w.r.t the runtime loader) into a + > > > > single directory that is near the front of the default path. /usr/lib + > > > > seems like a good place. + > > > + > > > That's part of my 'easy' solution above. It may fix the cygwin problem, + > > > but the requirement is not nice to native apps or other unix-on-win + > > > emulations that the user may have. + > > > + > > > Relying on 'get dll's from same dir as .exe' works -- but only if EVERY + > > > cygwin exe and EVERY cygwin dll are piled into the same dir. + > > + > > Can't we assume that the native dll's we rely on are outside cygwin's + > > control and can be relied upon to be managed by the operating system + > > (I'm thinking of stuff in the SYSTEM directory), and that non-cygwin + > > libraries (such as Pauls pw dlls) will not be installed into the + > > cygwin binary search path? In which case I think it is okay to + > > install all cygwin dlls and import libs to /usr/lib, making sure that + > > cygwin.bat (or any other cygwin startup methods) put /usr/lib first in + > > $PATH. + > + > this works for the 'sandbox user' -- Michael Ring's 'user 1' in this + > message: + > http://sources.redhat.com/ml/cygwin/2000-08/msg01241.html + > + > It doesn't work for Michael's 'user 2' -- the guy who normally runs in + > cmd.exe/command.com, but relies on cygwin commands every once in a + > while. He doesn't use bash, but likes the cygwin-perl or grep every + > once and a while. User 2 will have the cygwin directories somewhere in + > her path -- but not necessarily first. + + We could tell these people to put C:/cygwin/usr/bin at the front of + their PATH... + + > > Does cygwin ld use -rpath yet? + > + > I don't think so. -rpath is something that ld.so uses; Windows doesn't + > have ld.so. Windows *always* loads dll's according to the following + > search order: + > current directory + > app's load directory + > global executable search path + > + > The only two exceptions I know of are: + > + > 1) In Win2K, if there is a file called 'app.exe.local' in the same + > directory as app.exe, then all dll's will be loaded from the app's load + > directory -- even if explicitly dlopened() with an absolute path that + > points elsewhere. the .local. may also override the 'current directory' + > part of the search order listed above, but I'm not sure. + + Holy cr@p! What happened to simplicity? If Bill has decided that he + can't understand how to write a decent shared library system, and + want's to relegate dll's to LoadLibrary() objects, why doesn't he just + say so? Wouldn't it be easier to statically link a Win2k program that + twiddle about with all this .local mess? + + > 2) You can put something called 'AppPath' in the registry, which will + > influence the directories that are searched. I don't know where in the + > list above that the directories listed in the 'AppPath' key are + > inserted. + + This sounds promising. I'll see if I can find any details on it. + + > > I am prepared to work on having libtool do the right thing as far + > > as possible. + > + > What was the right thing, again? :-) + + Based on our conversation so far: + + * When building a libtool (.la) library, create libfoo.la, + libfoo.dll, libfoo.dll.a and libfoo.a, where: + - is the earliest fully supported interface number + - libfoo.dll.a is the import library for libfoo.dll + + * When installing a libtool (.la) library: + - libfoo.la goes to $prefix/lib + - libfoo.dll goes to $prefix/bin + - libfoo.dll.a goes to $prefix/lib + - libfoo.a goes to $prefix/lib + + * When linking against libfoo.la + - use libfoo.dll.a unless -static or -all-static + - otherwise use libfoo.a + + * When linking against -lfoo + - if libfoo.la is found, behave as above + - else let ld (or gcc) do its thing + + Which is especially cool, because I don't think I need to worry about + dealing with direct linkage to dlls (I can just punt and let gcc/ld do + the hard work) which removes a whole pile of spaghetti where I had to + cope with compiling the impgen code correctly in cross compilation + environments! + + > > By default libtool always searches for a dll to link against and + > > generates the implib on the fly if a suitable one is found. + + This won't be necessary under the new scheme =)O| + + > There are occaisions where you want to link to an import lib in + > preference to a dll -- for instance, libcygwin.a is an import lib, but + > contains initializer code and actual function implementations for some + > functions that are not included in the dll itself. If you attempt to + > link directly to cygwin1.dll, the link fails because those things are + > missing from the virtual on-the-fly implib. + + I didn't know about that. Thanks. + + > But where do you put the dll? It has to go into the executable PATH so + > that the windows loader can find it. Do you copy it into /usr/lib, so + > that the default ld search path will find it? Do you add /usr/bin to + > the linktime library search path (-L/usr/bin)? Perhaps a symlink in + > /usr/lib, pointing to /usr/bin/libfoo.dll is all you need. + > + > However!!! Ld uses the following library name search order when hunting + > for -lfoo: + > + > libfoo.dll.a + > foo.dll.a + > libfoo.a <<<< NOTE!! + > libfoo.dll + > foo.dll + + Or that. Thanks again! Libtool already provides --disable-static if + the user wants to build and install only the dll parts of the library. + + For this to work (that is, in order for me to be able to punt to gcc/ld + in the majority of cases) I must generate dll names that will be + found, so the cygfoo.dll idea is out (Sorry Paul!). + + Although this doesn't help ``User 2'' very much, he is no worse off + than before if I change libtool's behaviour in this way. Here's a + thought: For each dll using application linked, I could have libtool + install a .bat script to C:/cygwin/launch (or similar) which would set + the PATH environment correctly for that application. As long as + ``User 2'' has the launch directory higher in his PATH than the actual + binary directory, this would guarantee correct dll selection. + + This would give ``User 1'' many of the advantages shared libraries + offer on Unix, without sinking into DLL Hell. Assuming that everyone + buys into it. The only reason shared libraries work properly on Unix + is that everyone has to agree to conform to the runtime loader's + versioning scheme -- so don't give some excuse about ``if we don't + want to change the core cygwin dll's to conform this won't work''. On + my linux box, I can move my libc around or drop several incompatible + versions of libc into my filesystem, and my applications will stop + loading the intended libraries too. No surprises there! + + Cheers, + Gary. + -- + ___ _ ___ __ _ mailto: gvv@techie.com + / __|__ _ _ ___ _| | / / | / /_ _ _ _ __ _| |_ __ _ ___ gary@gnu.org + | (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \ + \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/ + home page: /___/ /___/ gpg public key: + http://www.oranda.demon.co.uk http://www.oranda.demon.co.uk/key.asc + + -- + Want to unsubscribe from this list? + Send a message to cygwin-unsubscribe@sourceware.cygnus.com + On Sun, Sep 03, 2000 at 04:39:51PM -0300, Alexandre Oliva wrote: + > On Sep 3, 2000, "Gary V. Vaughan" wrote: + > + > > * When installing a libtool (.la) library: + > > - libfoo.la goes to $prefix/lib + > > - libfoo.dll goes to $prefix/bin + > > - libfoo.dll.a goes to $prefix/lib + > > - libfoo.a goes to $prefix/lib + > + > Nope. libfoo.la goes wherever -rpath specified when the library was + > created; it should be the same directory that is specified at install + > time. This is often $(libdir), but it doesn't have to be. + > + > I don't know how to arrange for an additional directory (bindir) to + > be specifiable without introducing an additional command-line option. + > Remember, libtool doesn't know about prefix, libdir or bindir, it just + > knows about what it's given in the command line. + + Hmm. I hadn't thought of that. Still, at least the principle of the + thing is right now, I think... + + Cheers, + Gary. + -- + ___ _ ___ __ _ mailto: gvv@techie.com + / __|__ _ _ ___ _| | / / | / /_ _ _ _ __ _| |_ __ _ ___ gary@gnu.org + | (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \ + \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/ + home page: /___/ /___/ gpg public key: + http://www.oranda.demon.co.uk http://www.oranda.demon.co.uk/key.asc + + There's an easier way -- one command! 'gcc -shared' will create a dll + for you. Just do: + + $(BASE)=foo + + gcc -shared -o cyg$(BASE).dll -Wl,--out-implib=lib$(BASE).dll.a \ + -Wl,--export-all -Wl,--enable-auto-image-base \ + -Wl,--output-def=cyg$(BASE).def $(OBJS) + + Grab any of the packages in the 'contrib' directory and look an the + makefiles (you might need to do a minimal 'configure' first, to + customize the Makefile for cygwin before using it as a model) + + --Chuck + + Jrgen Schuck wrote: + > + > I'm not sure about the kind of object that 'gcc -shared' + > produces. But I think it won't be what you might expect. + > In Windows shared sobjects are DLL's. You probably will + > have to convert your Makefiles to cproduce DLL's instead + > of UNIX-style .so files. + > + > I did the same task when porting a TCL-extension from + > UNIX to Cygwin. The Makefile (SVR4) changes from + > + > libTclDM20.so: + > ld -G -o $@ $(OBJS) + > + > to + > + > LOAD = TclDM20 + > DEF = $(LOAD).def + > BAS = $(LOAD).base + > EXP = $(LOAD).exp + > $(DLL): $(OBJS) + > echo EXPORTS >$(DEF) + > nm $+ | grep '^........ [T] _' | sed 's/[^_]*_//' >>$(DEF) + > $(LD) --base-file $(BAS) -dll -o $@ $+ -e _dll_entry@12 \ + > -L`dirname \`gcc -print-file-name=libgcc.a\`` \ + > $(LIBS) -lgcc -lcygwin -lkernel32 -lgcc + > dlltool --as=as -dllname $@ --def $(DEF) \ + > --base-file $(BAS) --output-exp $(EXP) + > $(LD) --base-file $(BAS) $(EXP) -dll -o $@ $+ -e _dll_entry@12 \ + > -L`dirname \`gcc -print-file-name=libgcc.a\`` \ + > $(LIBS) -lgcc -lcygwin -lkernel32 -lgcc + > dlltool --as=as -dllname $@ --def $(DEF) \ + > --base-file $(BAS) --output-exp $(EXP) + > $(LD) $(EXP) -dll -o $@ $+ -e _dll_entry@12 \ + > -L`dirname \`gcc -print-file-name=libgcc.a\`` \ + > $(LIBS) -lgcc -lcygwin -lkernel32 -lgcc + > + > For further information see + > http://sources.redhat.com/cygwin/docs.html, + > section "Writing DLLs". Reading these docs you + > will find two further modules: dll_init.c and + > dll_fixup.c. I didn't put them into my DLL because + > the resulting DLL crashes the TCL-interpreter. + > + > Furthermore I found it very helpful to take a + > look into the Makefiles of the DLL-generating + > packages of the Cygwin-distribution: tcl, wish + > and tix. + > + > Jrgen Schuck + > PCM-Kundenbetreuung + > Business Unit Information + > _________________________________________________ + > MATERNA GmbH Information & Communications + > Vosskuhle 37 * 44141 Dortmund + > Tel.: 0231 - 5599 - 191 * Fax: -272 + > Handy: 0172 - 23 70 148 * http://www.materna.de + > + > -- + > Want to unsubscribe from this list? + > Send a message to cygwin-unsubscribe@sourceware.cygnus.com + + -- + Want to unsubscribe from this list? + Send a message to cygwin-unsubscribe@sourceware.cygnus.com + From gary Tue Oct 10 18:50:22 2000 + Return-Path: + Received: from pop3.mail.demon.net + by localhost with POP3 (fetchmail-5.3.4) + for gary@localhost (single-drop); Tue, 10 Oct 2000 18:50:22 +0100 (BST) + Received: from punt-2.mail.demon.net by mailstore + for gvaughan@oranda.demon.co.uk id 971135226:20:06380:2; + Mon, 09 Oct 2000 23:47:06 GMT + Received: from sourceware.cygnus.com ([205.180.83.71]) by punt-2.mail.demon.net + id aa2005552; 9 Oct 2000 23:46 GMT + Received: (qmail 16236 invoked by alias); 9 Oct 2000 23:46:45 -0000 + Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm + Precedence: bulk + List-Unsubscribe: + List-Subscribe: + List-Archive: + List-Post: + List-Help: , + Sender: cygwin-owner@sources.redhat.com + Delivered-To: mailing list cygwin@sources.redhat.com + Received: (qmail 16211 invoked from network); 9 Oct 2000 23:46:43 -0000 + Received: from mail.ee.gatech.edu (130.207.230.10) + by sourceware.cygnus.com with SMTP; 9 Oct 2000 23:46:43 -0000 + Received: from ece.gatech.edu (s02-pm03.gatech.campuscwix.net [168.14.1.69]) + by mail.ee.gatech.edu (8.11.0/8.11.0) with ESMTP id e99NkTO15440; + Mon, 9 Oct 2000 19:46:30 -0400 (EDT) + Message-ID: <39E259A7.CBAD325F@ece.gatech.edu> + Date: Mon, 09 Oct 2000 19:49:59 -0400 + From: Charles Wilson + X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) + X-Accept-Language: en + MIME-Version: 1.0 + To: cygwin@sourceware.cygnus.com + Subject: Re: AW: Linking Dynamic Libraries + References: <004501c031f0$10478ad0$0d33028b@zapperlot.materna.de> <39E1CC08.F475851F@ece.gatech.edu> <39E2468B.BFDD3AB7@ihug.co.nz> + Content-Type: text/plain; charset=us-ascii + Content-Transfer-Encoding: 7bit + Status: RO + Content-Length: 5252 + Lines: 189 + + You still need to worry about things like __declspec(dllexport) and + __declspec(dllimport). Here's a patch for your files. + + (Yes, you are correct; the option is '--export-all-symbols' not + '--export-all') + + As far as documentation, there's the mailing list, and 'ld --help' and + Mumit's (really out-of-date) dll-helpers packaqe at + http://www.xraylith.wisc.edu/~khan/software/gnu-win32/dllhelpers.html. + Would you like to update that package for the current capabilities of + ld/gcc ? Mumit's tutorial is heavily 'dlltool' based, rather than 'gcc + -shared' or 'ld' based. + + NOTE 1: I had to remove "-Wl,--export-all-symbols" from the options; + with export-all I got a stack dump even with my other changes. I'm not + sure why. + + NOTE 2: I used the extension '.dll.a' for the import library; cygwin's + linker will search for 'libfoo.dll.a' in preference to 'libfoo.a'; + libfoo.a is assumed to be a static library (although the linker will use + libfoo.a if .dll.a is not found) + + --Chuck + + + diff -u demo-orig/Makefile demo/Makefile + --- demo-orig/Makefile Mon Oct 9 19:34:15 2000 + +++ demo/Makefile Mon Oct 9 19:45:10 2000 + @@ -3,7 +3,7 @@ + EXENAME = demo + EXEOBJ = demo.o + CPLUS = g++ -W -Wall -Werror + -LINKDLL = g++ -shared -Wl,--export-all -Wl,--enable-auto-image-base + +LINKDLL = g++ -shared -Wl,--enable-auto-image-base + LINKEXE = g++ -L. + + .DELETE_ON_ERROR: + @@ -13,13 +13,16 @@ + all: $(DLLNAME).dll $(EXENAME) + + clean: + - rm -f $(DLLOBJ) $(DLLNAME).dll lib$(DLLNAME).a $(EXEOBJ) + $(EXENAME).exe + + rm -f $(DLLOBJ) $(DLLNAME).dll lib$(DLLNAME).dll.a $(EXEOBJ) + $(EXENAME).exe + + %.o: %.cpp + $(CPLUS) -c $< -o $@ + + +$(DLLOBJ): $(DLLOBJ:.o=.cpp) + + $(CPLUS) -DBUILD_DLL -c $< -o $@ + + + $(DLLNAME).dll: $(DLLOBJ) + - $(LINKDLL) $(DLLOBJ) -o $(DLLNAME).dll + -Wl,--out-implib=lib$(DLLNAME).a + + $(LINKDLL) $(DLLOBJ) -o $(DLLNAME).dll + -Wl,--out-implib=lib$(DLLNAME).dll.a + + $(EXENAME): $(EXEOBJ) $(DLLNAME).dll + $(LINKEXE) $(EXEOBJ) -l$(DLLNAME) -o $(EXENAME) + diff -u demo-orig/foo.hpp demo/foo.hpp + --- demo-orig/foo.hpp Mon Oct 9 19:35:58 2000 + +++ demo/foo.hpp Mon Oct 9 19:35:50 2000 + @@ -3,7 +3,12 @@ + + #include + + -extern std::string global_mangle(const std::string& source); + - + +#ifdef BUILD_DLL + +#define FOO_EXPORT __declspec(dllexport) + +#else + +#define FOO_EXPORT __declspec(dllimport) + #endif + + +extern FOO_EXPORT std::string global_mangle(const std::string& source); + + + +#endif + + Ross Smith wrote: + > + > "Charles S. Wilson" wrote: + > > + > > There's an easier way -- one command! 'gcc -shared' will create a dll + > > for you. Just do: + > > + > > $(BASE)=foo + > > + > > gcc -shared -o cyg$(BASE).dll -Wl,--out-implib=lib$(BASE).dll.a \ + > > -Wl,--export-all -Wl,--enable-auto-image-base \ + > > -Wl,--output-def=cyg$(BASE).def $(OBJS) + > + > I can't get this to work. Whenever I link with the import lib produced + > this way, the resulting program crashes with a STATUS_ACCESS_VIOLATION. + > (See attached code.) I don't even need to call any of the DLL functions + > to trigger it -- just linking with -lfoo makes it unworkable. What am I + > doing wrong? + > + > And where is all this stuff documented anyway? The ld docs mention + > --export-all-symbols (not --export-all), but not any of the others. + > + > -------------------- cut here -------------------- + > + > // demo.cpp + > + > #include "foo.hpp" + > #include + > #include + > + > int main() { + > std::string thing("thing"); + > std::cout << thing << std::endl; + > // std::cout << global_mangle(thing) << std::endl; + > return 0; + > } + > + > -------------------- cut here -------------------- + > + > // foo.hpp + > + > #ifndef FOO_HEADER + > #define FOO_HEADER + > + > #include + > + > extern std::string global_mangle(const std::string& source); + > + > #endif + > + > -------------------- cut here -------------------- + > + > // foo.cpp + > + > #include "foo.hpp" + > + > std::string global_mangle(const std::string& source) { + > return source + "_global"; + > } + > + > -------------------- cut here -------------------- + > + > // Makefile + > + > DLLNAME = foo + > DLLOBJ = foo.o + > EXENAME = demo + > EXEOBJ = demo.o + > CPLUS = g++ -W -Wall -Werror + > LINKDLL = g++ -shared -Wl,--export-all -Wl,--enable-auto-image-base + > LINKEXE = g++ -L. + > + > .DELETE_ON_ERROR: + > + > .PHONY: all clean + > + > all: $(DLLNAME).dll $(EXENAME) + > + > clean: + > rm -f $(DLLOBJ) $(DLLNAME).dll lib$(DLLNAME).a $(EXEOBJ) + > $(EXENAME).exe + > + > %.o: %.cpp + > $(CPLUS) -c $< -o $@ + > + > $(DLLNAME).dll: $(DLLOBJ) + > $(LINKDLL) $(DLLOBJ) -o $(DLLNAME).dll + > -Wl,--out-implib=lib$(DLLNAME).a + > + > $(EXENAME): $(EXEOBJ) $(DLLNAME).dll + > $(LINKEXE) $(EXEOBJ) -l$(DLLNAME) -o $(EXENAME) + > + > demo.o: demo.cpp foo.hpp + > foo.o: foo.cpp foo.hpp + > + > -------------------- cut here -------------------- + > + > -- + > Ross Smith The Internet Group, Auckland, New Zealand + > ======================================================================== + > "C++ is to programming as sex is to reproduction. Better ways might + > technically exist but they're not nearly as much fun." -- Nikolai Irgens + > + > -- + > Want to unsubscribe from this list? + > Send a message to cygwin-unsubscribe@sourceware.cygnus.com + + -- + Want to unsubscribe from this list? + Send a message to cygwin-unsubscribe@sourceware.cygnus.com + + From gary Wed Oct 11 18:38:50 2000 + Return-Path: + Received: from pop3.mail.demon.net + by localhost with POP3 (fetchmail-5.3.4) + for gary@localhost (single-drop); Wed, 11 Oct 2000 18:38:50 +0100 (BST) + Received: from punt-1.mail.demon.net by mailstore + for gvaughan@oranda.demon.co.uk id 971256552:10:18423:4; + Wed, 11 Oct 2000 09:29:12 GMT + Received: from sourceware.cygnus.com ([205.180.83.71]) by punt-1.mail.demon.net + id aa1018296; 11 Oct 2000 9:29 GMT + Received: (qmail 10937 invoked by alias); 11 Oct 2000 09:28:33 -0000 + Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm + Precedence: bulk + List-Unsubscribe: + List-Subscribe: + List-Archive: + List-Post: + List-Help: , + Sender: cygwin-owner@sources.redhat.com + Delivered-To: mailing list cygwin@sources.redhat.com + Received: (qmail 10909 invoked from network); 11 Oct 2000 09:28:30 -0000 + Received: from web6405.mail.yahoo.com (128.11.22.153) + by sourceware.cygnus.com with SMTP; 11 Oct 2000 09:28:30 -0000 + Message-ID: <20001011092829.19377.qmail@web6405.mail.yahoo.com> + Received: from [203.97.2.247] by web6405.mail.yahoo.com; Wed, 11 Oct 2000 22:28:29 NZDT + Date: Wed, 11 Oct 2000 22:28:29 +1300 (NZDT) + From: =?iso-8859-1?q?Danny=20Smith?= + Subject: Re: AW: Linking Dynamic Libraries + To: cygwin@sources.redhat.com + MIME-Version: 1.0 + Content-Type: text/plain; charset=iso-8859-1 + Content-Transfer-Encoding: 8bit + Status: RO + Content-Length: 1133 + Lines: 38 + + Ross Smith wrote: + > + > Charles Wilson wrote: + > > + > > You still need to worry about things like __declspec(dllexport) and + > > __declspec(dllimport). + > + > What's the point of --export-all-symbols then? I was under the + > impression that it was intended to duplicate the Unix convention, + where + > all external symbols are automatically exported from a .so. + (Actually, + > the help refers to "global" symbols, not "external", but I assumed + that + > just meant that whoever wrote the help didn't know C++.) + + + If you really want to --export-all in C++, this is a workaround. + Create a def with dlltool: + dlltool --export-all --output-def foo_.def --dllname foo.dll *.o + + Then look at the def file. Do you still really want to export-all? + + To use that def file with ld -shared you need to get rid of the + comments (demangled names) + cut does the job: + cut -d ';' -f 1 foo_.def >foo.def + + Cheers + + + _____________________________________________________________________________ + http://clubs.yahoo.com.au - Yahoo! Clubs + - Join a club or build your own! + + -- + Want to unsubscribe from this list? + Send a message to cygwin-unsubscribe@sourceware.cygnus.com + Index: libtool/mail/deplibs.html diff -c libtool/mail/deplibs.html:1.1.4.1 libtool/mail/deplibs.html:1.1 *** libtool/mail/deplibs.html:1.1.4.1 Fri May 21 08:41:10 1999 --- libtool/mail/deplibs.html Wed Jan 13 13:39:13 1999 *************** *** 210,212 **** --- 210,213 ----
Gordon Matzigkeit <gord@profitpress.com>
+ \ No newline at end of file Index: libtool/mail/patches diff -c /dev/null libtool/mail/patches:1.1 *** /dev/null Tue Apr 24 17:26:49 2001 --- libtool/mail/patches Thu Jul 29 16:40:57 1999 *************** *** 0 **** --- 1,104 ---- + Date: Thu, 29 Jul 1999 14:56:40 +0200 (CEST) + From: Peter Breitenlohner + Reply-To: Peter Breitenlohner + To: bug-libtool@gnu.org + Subject: a suggestion for libtool (1.3.2) + Message-ID: + MIME-Version: 1.0 + Content-Type: MULTIPART/MIXED; BOUNDARY="1803957763-1087116776-933253000=:8802" + Resent-Message-ID: <"2rP1j3.0.z77.p-4et"@mescaline.gnu.org> + Resent-From: bug-libtool@gnu.org + X-Mailing-List: archive/latest/952 + X-Loop: bug-libtool@gnu.org + Precedence: list + Resent-Sender: bug-libtool-request@gnu.org + Resent-Bcc: + X-UIDL: e9e213a8e1d8afc0286b4a4305ab5a36 + Status: RO + X-Status: A + Content-Length: 4085 + Lines: 83 + + This message is in MIME format. The first part should be readable text, + while the remaining parts are likely unreadable without MIME-aware tools. + Send mail to mime@docserver.cac.washington.edu for more info. + + --1803957763-1087116776-933253000=:8802 + Content-Type: TEXT/PLAIN; charset=US-ASCII + + With our setup I found it necessary to apply the following patch to ltmain.sh + (1.3.2) although it should, of course, be applied to ltmain.in instead. + + Let me explain the functionality of this modification and its necessity + arising from our situation. + + 1. + Gcc (or rather the ld invoked by gcc) searches for libraries in more + directories than those specified with "-L" or the standard ones /lib, + /usr/lib, and /usr/local/lib. Most notably there is /usr//lib or + /usr/local//lib, depending on where gcc was installed. + + According to the general libtool philosophy, when + gcc foo.o bar.o -ltest -o foo + succeeds in locating libtest.so (or libtest.a) in /usr//lib, then + libtool --mode=link gcc bar.lo -ltest -rpath -o bar.la + should equally succeed in locating /usr//lib/libtest.so. + + Note that with different incarnations of gcc for different s one + certainly wouldn't want to add "-L/usr//lib" to the command line. + The proposed modification uses "gcc -print-file-name=libtest.so" to locate + the dependency libraries. + + 2. + My actual situation is as follows: + We have a lot of users on our Linux systems (neither RedHat, nor SuSe, nor + Debian, nor ...) and some groups `absolutely need libc5' whereas others + `absolutely need glibc'. In order to allow for coexistence of libc (5.4.38 + or so) and glibc (first 2.0.6, now 2.1.1) for quite some time as well as for a + really smooth transition, gcc behaves as either "gcc -b i486-pc-linux-gnulibc1" + or "gcc -b i486-pc-linux-gnu", depending on the value of an environment + variable. Actually /usr/bin/gcc is a symbolic link to a small shell script + that invokes either /usr/i486-pc-linux-gnulibc1/bin/gcc or + /usr/i486-pc-linux-gnu/bin/gcc and similarly for the binutils; + consequently, there are libc5 and glibc vesions of shared libraries, e.g. + /usr/i486-pc-linux-gnulibc1/lib/libncurses.so and + /usr/i486-pc-linux-gnu/lib/libncurses.so etc. + + All that worked really nice, until I recently tried to compile + w3c-libwww-5.2.8 that uses libtool. First I had to replace their libtool-1.2e + (which couldn't resolve shared library dependencies at all) by version 1.3.2 + in order to locate libdl.so etc. (in /lib), but still had problems to locate + libz.so (in /usr//lib) until I manufactured the patch. + + regards + Peter Breitenlohner + + + --1803957763-1087116776-933253000=:8802 + Content-Type: TEXT/PLAIN; charset=US-ASCII; name="libtool-1.3.2-diff" + Content-Transfer-Encoding: BASE64 + Content-ID: + Content-Description: + + diff -ur libtool-1.3.2.orig/ltmain.sh libtool-1.3.2/ltmain.sh + --- libtool-1.3.2.orig/ltmain.sh Wed May 26 02:31:24 1999 + +++ libtool-1.3.2/ltmain.sh Tue Jul 27 09:43:49 1999 + @@ -1902,7 +1902,15 @@ + # If $name is empty we are operating on a -L argument. + if test "$name" != "" ; then + libname=`eval \\$echo \"$libname_spec\"` + - for i in $lib_search_path; do + + # First try to locate the library through gcc + + gcc_path= + + if test "$CC" = "gcc" ; then + + eval library_names=\"$library_names_spec\" + + set dummy $library_names + + eval potlib="\$$#" + + gcc_path="`gcc -print-file-name=$potlib | sed 's%/*'$potlib'$%%'`" + + fi + + for i in $gcc_path $lib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + + --1803957763-1087116776-933253000=:8802-- Index: libtool/mdemo/Makefile.am diff -c libtool/mdemo/Makefile.am:1.34.2.3 libtool/mdemo/Makefile.am:1.43 *** libtool/mdemo/Makefile.am:1.34.2.3 Tue Mar 30 15:33:30 1999 --- libtool/mdemo/Makefile.am Tue Sep 5 04:03:05 2000 *************** *** 2,21 **** AUTOMAKE_OPTIONS = no-dependencies foreign ! INCLUDES = -I$(srcdir)/../libltdl EXTRA_DIST = acinclude.m4 ! lib_LTLIBRARIES = foo1.la libfoo2.la foo1_la_SOURCES = foo1.c foo1_la_LIBADD = $(LIBM) foo1_la_LDFLAGS = -module -avoid-version libfoo2_la_SOURCES = foo2.c ! libfoo2_la_LIBADD = $(LIBM) ! libfoo2_la_LDFLAGS = -module -export-symbols-regex "libfoo2.*" noinst_HEADERS = foo.h bin_PROGRAMS = mdemo mdemo.static --- 2,24 ---- AUTOMAKE_OPTIONS = no-dependencies foreign ! INCLUDES = $(INCLTDL) EXTRA_DIST = acinclude.m4 ! lib_LTLIBRARIES = libsub.la foo1.la libfoo2.la foo1_la_SOURCES = foo1.c foo1_la_LIBADD = $(LIBM) foo1_la_LDFLAGS = -module -avoid-version libfoo2_la_SOURCES = foo2.c ! libfoo2_la_LIBADD = $(LIBM) libsub.la ! libfoo2_la_LDFLAGS = -no-undefined -module -export-symbols-regex "libfoo2.*" + libsub_la_SOURCES = sub.c + libsub_la_LDFLAGS = -no-undefined + noinst_HEADERS = foo.h bin_PROGRAMS = mdemo mdemo.static *************** *** 33,41 **** mdemo_SOURCES = main.c mdemo_LDFLAGS = -export-dynamic ## The quotes around -dlopen below fool automake into accepting it ! mdemo_LDADD = @LIBLTDL@ "-dlopen" self \ "-dlopen" foo1.la "-dlopen" libfoo2.la ! mdemo_DEPENDENCIES = @LIBLTDL@ foo1.la libfoo2.la # Create a statically linked version of mdemo. mdemo_static_SOURCES = $(mdemo_SOURCES) --- 36,44 ---- mdemo_SOURCES = main.c mdemo_LDFLAGS = -export-dynamic ## The quotes around -dlopen below fool automake into accepting it ! mdemo_LDADD = @LIBLTDL@ libsub.la "-dlopen" self \ "-dlopen" foo1.la "-dlopen" libfoo2.la ! mdemo_DEPENDENCIES = @LIBLTDL@ libsub.la foo1.la libfoo2.la # Create a statically linked version of mdemo. mdemo_static_SOURCES = $(mdemo_SOURCES) Index: libtool/mdemo/README diff -c libtool/mdemo/README:1.4 libtool/mdemo/README:1.5 *** libtool/mdemo/README:1.4 Tue Jan 12 12:42:47 1999 --- libtool/mdemo/README Fri Jan 14 05:50:21 2000 *************** *** 8,10 **** --- 8,17 ---- All exported symbols are prefixed with "libname_LTX_" to avoid symbols conflicts, especially when linking statically. libltdl will automatically cut the prefix off to get the real name. + + Note that on Windows, for the purposes of illustrating ltdl, the + libraries *are* built as dll's, but do not have the __declspec + machinery to make them suitable for loading at link time. This is + only for clarity inside this example, look at the example in ../demo + to see how the __declspec macros should be set up. + Index: libtool/mdemo/configure.in diff -c libtool/mdemo/configure.in:1.15.2.4 libtool/mdemo/configure.in:1.24 *** libtool/mdemo/configure.in:1.15.2.4 Sun May 14 01:12:14 2000 --- libtool/mdemo/configure.in Sun Sep 3 22:10:30 2000 *************** *** 8,15 **** --- 8,17 ---- AC_EXEEXT AC_LIBLTDL_CONVENIENCE(../libltdl) + AC_SUBST(INCLTDL) AC_SUBST(LIBLTDL) + AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) Index: libtool/mdemo/foo.h diff -c libtool/mdemo/foo.h:1.6.4.1 libtool/mdemo/foo.h:1.10 *** libtool/mdemo/foo.h:1.6.4.1 Thu Jul 1 07:48:44 1999 --- libtool/mdemo/foo.h Wed Feb 23 15:10:05 2000 *************** *** 26,29 **** --- 26,31 ---- #define HELLO_RET 0xe110 #define FOO_RET 0xf00 + extern void sub(); + #endif /* !_FOO_H_ */ Index: libtool/mdemo/foo1.c diff -c libtool/mdemo/foo1.c:1.8.4.1 libtool/mdemo/foo1.c:1.12 *** libtool/mdemo/foo1.c:1.8.4.1 Thu Jul 1 07:48:44 1999 --- libtool/mdemo/foo1.c Wed Feb 23 15:10:05 2000 *************** *** 36,41 **** --- 36,42 ---- int _foo1_helper() { + sub(); return FOO_RET; } Index: libtool/mdemo/foo2.c diff -c libtool/mdemo/foo2.c:1.7.4.1 libtool/mdemo/foo2.c:1.11 *** libtool/mdemo/foo2.c:1.7.4.1 Thu Jul 1 07:48:44 1999 --- libtool/mdemo/foo2.c Wed Feb 23 15:10:05 2000 *************** *** 36,41 **** --- 36,42 ---- int _foo2_helper() { + sub(); return FOO_RET; } Index: libtool/mdemo/main.c diff -c libtool/mdemo/main.c:1.16.2.2 libtool/mdemo/main.c:1.19 *** libtool/mdemo/main.c:1.16.2.2 Thu Jul 1 07:48:44 1999 --- libtool/mdemo/main.c Wed Jan 12 16:28:09 2000 *************** *** 1,5 **** /* main.c -- mdemo test program ! Copyright (C) 1998-1999 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. --- 1,5 ---- /* main.c -- mdemo test program ! Copyright (C) 1998-2000 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. *************** *** 27,32 **** --- 27,33 ---- char *filename; { lt_dlhandle handle; + const lt_dlinfo *info; int (*pfoo1)() = 0; int (*pfoo2)() = 0; int (*phello)() = 0; *************** *** 39,49 **** fprintf (stderr, "error was: %s\n", lt_dlerror()); return 1; } - phello = (int(*)())lt_dlsym(handle, "hello"); - pfoo1 = (int(*)())lt_dlsym(handle, "foo1"); - pfoo2 = (int(*)())lt_dlsym(handle, "foo2"); - pnothing = (int*)lt_dlsym(handle, "nothing"); if (phello) { int value = (*phello) (); --- 40,60 ---- fprintf (stderr, "error was: %s\n", lt_dlerror()); return 1; } + info = lt_dlgetinfo(handle); + if (!info) { + fprintf (stderr, "can't get module info: %s\n", lt_dlerror()); + return 1; + } + if (info->name) { + printf ("module name: %s\n", info->name); + } else { + printf ("module is not a libtool module\n"); + } + printf ("module filename: %s\n", info->filename); + printf ("module reference count: %i\n", info->ref_count); + + phello = (int(*)())lt_dlsym(handle, "hello"); if (phello) { int value = (*phello) (); *************** *** 55,72 **** --- 66,87 ---- else { fprintf (stderr, "did not find the `hello' function\n"); + fprintf (stderr, "error was: %s\n", lt_dlerror()); ret = 1; } + pnothing = (int*)lt_dlsym(handle, "nothing"); /* Try assigning to the nothing variable. */ if (pnothing) *pnothing = 1; else { fprintf (stderr, "did not find the `nothing' variable\n"); + fprintf (stderr, "error was: %s\n", lt_dlerror()); ret = 1; } + pfoo1 = (int(*)())lt_dlsym(handle, "foo1"); /* Just call the functions and check return values. */ if (pfoo1) { *************** *** 75,92 **** else ret = 1; } ! else if (pfoo2) ! { ! if ((*pfoo2) () == FOO_RET) ! printf("foo2 is ok!\n"); ! else ret = 1; ! } ! else ! { ! fprintf (stderr, "did not find the `foo' function\n"); ! ret = 1; ! } ! lt_dlclose(handle); return ret; } --- 90,110 ---- else ret = 1; } ! else { ! pfoo2 = (int(*)())lt_dlsym(handle, "foo2"); ! if (pfoo2) ! { ! if ((*pfoo2) () == FOO_RET) ! printf("foo2 is ok!\n"); ! else ret = 1; ! } ! else ! { ! fprintf (stderr, "did not find any of the `foo' functions\n"); ! fprintf (stderr, "error was: %s\n", lt_dlerror()); ! ret = 1; ! } ! } lt_dlclose(handle); return ret; } *************** *** 113,121 **** fprintf (stderr, "error was: %s\n", lt_dlerror()); return 1; } - pmyfunc = (int(*)())lt_dlsym(handle, "myfunc"); - pmyvar = (int*)lt_dlsym(handle, "myvar"); if (pmyfunc) { int value = (*pmyfunc) (); --- 131,138 ---- fprintf (stderr, "error was: %s\n", lt_dlerror()); return 1; } + pmyfunc = (int(*)())lt_dlsym(handle, "myfunc"); if (pmyfunc) { int value = (*pmyfunc) (); *************** *** 127,141 **** --- 144,161 ---- else { fprintf (stderr, "did not find the `myfunc' function\n"); + fprintf (stderr, "error was: %s\n", lt_dlerror()); ret = 1; } + pmyvar = (int*)lt_dlsym(handle, "myvar"); /* Try assigning to the variable. */ if (pmyvar) *pmyvar = 1; else { fprintf (stderr, "did not find the `myvar' variable\n"); + fprintf (stderr, "error was: %s\n", lt_dlerror()); ret = 1; } Index: libtool/mdemo/sub.c diff -c /dev/null libtool/mdemo/sub.c:1.1 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/mdemo/sub.c Wed Feb 23 15:10:05 2000 *************** *** 0 **** --- 1,27 ---- + /* sub.c -- trivial test library + Copyright (C) 1998-1999 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + + #include + + void + sub() + { + printf ("sub() called\n"); + } Index: libtool/tests/Makefile.am diff -c libtool/tests/Makefile.am:1.13.2.9 libtool/tests/Makefile.am:1.28 *** libtool/tests/Makefile.am:1.13.2.9 Tue Apr 6 23:01:47 1999 --- libtool/tests/Makefile.am Tue Apr 24 10:13:01 2001 *************** *** 5,28 **** TESTS = cdemo-static.test cdemo-make.test cdemo-exec.test \ demo-static.test demo-make.test demo-exec.test \ demo-inst.test demo-unst.test \ mdemo-static.test mdemo-make.test mdemo-exec.test \ mdemo-inst.test mdemo-unst.test \ cdemo-conf.test cdemo-make.test cdemo-exec.test \ demo-conf.test demo-make.test demo-exec.test \ demo-inst.test demo-unst.test deplibs.test \ mdemo-conf.test mdemo-make.test mdemo-exec.test \ mdemo-inst.test mdemo-unst.test dryrun.test \ demo-nofast.test demo-make.test demo-exec.test \ demo-inst.test demo-unst.test \ cdemo-shared.test cdemo-make.test cdemo-exec.test \ demo-shared.test demo-make.test demo-exec.test demo-inst.test \ hardcode.test build-relink.test noinst-link.test demo-unst.test \ mdemo-shared.test mdemo-make.test mdemo-exec.test \ mdemo-inst.test mdemo-unst.test \ assign.test link.test link-2.test nomode.test \ quote.test sh.test suffix.test ! cdemo-static.test: $(top_builddir)/libtool $(top_builddir)/libtool: cd $(top_builddir) && $(MAKE) all --- 5,39 ---- TESTS = cdemo-static.test cdemo-make.test cdemo-exec.test \ demo-static.test demo-make.test demo-exec.test \ demo-inst.test demo-unst.test \ + depdemo-static.test depdemo-make.test \ + depdemo-exec.test depdemo-inst.test depdemo-unst.test \ mdemo-static.test mdemo-make.test mdemo-exec.test \ mdemo-inst.test mdemo-unst.test \ cdemo-conf.test cdemo-make.test cdemo-exec.test \ demo-conf.test demo-make.test demo-exec.test \ demo-inst.test demo-unst.test deplibs.test \ + depdemo-conf.test depdemo-make.test \ + depdemo-exec.test depdemo-inst.test depdemo-unst.test \ mdemo-conf.test mdemo-make.test mdemo-exec.test \ mdemo-inst.test mdemo-unst.test dryrun.test \ demo-nofast.test demo-make.test demo-exec.test \ demo-inst.test demo-unst.test \ + demo-pic.test demo-make.test demo-exec.test \ + demo-nopic.test demo-make.test demo-exec.test \ + depdemo-nofast.test depdemo-make.test \ + depdemo-exec.test depdemo-inst.test depdemo-unst.test \ cdemo-shared.test cdemo-make.test cdemo-exec.test \ demo-shared.test demo-make.test demo-exec.test demo-inst.test \ hardcode.test build-relink.test noinst-link.test demo-unst.test \ + depdemo-shared.test depdemo-make.test \ + depdemo-exec.test depdemo-inst.test build-relink2.test \ + depdemo-unst.test \ mdemo-shared.test mdemo-make.test mdemo-exec.test \ mdemo-inst.test mdemo-unst.test \ assign.test link.test link-2.test nomode.test \ quote.test sh.test suffix.test ! demo-conf.test: $(top_builddir)/libtool $(top_builddir)/libtool: cd $(top_builddir) && $(MAKE) all *************** *** 34,42 **** LIBS = @LIBS@ # Be sure to reexport important environment variables. ! TESTS_ENVIRONMENT = CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ ! LD="$(LD)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \ ! LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" EXTRA_DIST = defs $(TESTS) --- 45,54 ---- LIBS = @LIBS@ # Be sure to reexport important environment variables. ! TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ ! CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \ ! LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ ! OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" EXTRA_DIST = defs $(TESTS) *************** *** 44,48 **** --- 56,61 ---- clean-local: -test -f ../cdemo/Makefile && cd ../cdemo && $(MAKE) distclean -test -f ../demo/Makefile && cd ../demo && $(MAKE) distclean + -test -f ../depdemo/Makefile && cd ../depdemo && $(MAKE) distclean -test -f ../mdemo/Makefile && cd ../mdemo && $(MAKE) distclean rm -rf _inst Index: libtool/tests/assign.test diff -c libtool/tests/assign.test:1.1.1.1 libtool/tests/assign.test:1.2 *** libtool/tests/assign.test:1.1.1.1 Sun Jun 22 13:00:03 1997 --- libtool/tests/assign.test Wed Sep 6 10:31:09 2000 *************** *** 12,18 **** . $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 --- 12,18 ---- . $srcdir/defs || exit 1 # Check that test -e isn't used in our portable shell scripts. ! if egrep -n '[^ ]=[^ ].*(break|continue)' $srcdir/../ltmain.sh; then echo "cannot use \`break' or \`continue' on the same line as an assignment" exit 1 fi Index: libtool/tests/build-relink.test diff -c libtool/tests/build-relink.test:1.4.4.3 libtool/tests/build-relink.test:1.11 *** libtool/tests/build-relink.test:1.4.4.3 Sun Mar 21 03:25:20 1999 --- libtool/tests/build-relink.test Tue Sep 5 04:03:06 2000 *************** *** 58,63 **** --- 58,70 ---- exit 1 fi + hardcode_into_libs=NONE + eval `egrep -e '^hardcode_into_libs=' ./libtool 2>/dev/null` + if test "$hardcode_into_libs" = NONE; then + echo "hardcode_into_libs not set in ../demo/libtool" 1>&2 + exit 1 + fi + ./hell # so that it links on-demand if needed echo "removing libhello.la from ../demo" Index: libtool/tests/build-relink2.test diff -c /dev/null libtool/tests/build-relink2.test:1.5 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/build-relink2.test Tue Sep 5 05:54:02 2000 *************** *** 0 **** --- 1,125 ---- + #! /bin/sh + # build-relink2.test - check to see whether shlibpath overrides runpath + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Check that things are built. + if test -f $prefix/lib/extra/libl3.la && cd ../depdemo && test -f l3/libl3.la; then : + else + echo "You must run depdemo-inst.test before $0" 1>&2 + exit 77 + fi + + # Check to make sure we have a dynamic library. + library_names=NONE + eval `egrep -e '^library_names=' ./l3/libl3.la 2>/dev/null` + + if test "$library_names" = NONE; then + echo "library_names not set in ../depdemo/l3/libl3.la" 1>&2 + exit 1 + elif test -z "$library_names"; then + echo "= Exiting: ../depdemo/l3/libl3.la is not a shared library" + exit 77 + fi + + # Unfortunately, we need access to libtool internals for this test. + objdir=NONE + eval `egrep -e '^objdir=' ./libtool 2>/dev/null` + if test "$objdir" = NONE; then + echo "objdir not set in ../depdemo/libtool" 1>&2 + exit 1 + fi + + shlibpath_overrides_runpath=NONE + eval `egrep -e '^shlibpath_overrides_runpath=' ./libtool 2>/dev/null` + if test "$shlibpath_overrides_runpath" = NONE; then + echo "shlibpath_overrides_runpath not set in ../depdemo/libtool" 1>&2 + exit 1 + fi + + hardcode_action=NONE + eval `egrep -e '^hardcode_action=' ./libtool 2>/dev/null` + if test "$hardcode_action" = NONE; then + echo "hardcode_action not set in ../depdemo/libtool" 1>&2 + exit 1 + fi + + hardcode_direct=NONE + eval `egrep -e '^hardcode_direct=' ./libtool 2>/dev/null` + if test "$hardcode_direct" = NONE; then + echo "hardcode_direct not set in ../depdemo/libtool" 1>&2 + exit 1 + fi + + hardcode_into_libs=NONE + eval `egrep -e '^hardcode_into_libs=' ./libtool 2>/dev/null` + if test "$hardcode_into_libs" = NONE; then + echo "hardcode_into_libs not set in ../depdemo/libtool" 1>&2 + exit 1 + fi + + ./depdemo # so that it links on-demand if needed + + echo "removing libl3.la from ../depdemo/l3" + rm -rf l3/libl3.la l3/$objdir + + echo "running ../depdemo/depdemo" + if ./depdemo || + # On AIX 4.1, when the installed copy of libl3 is loaded, it brings + # with it the installed copies of libl1 and libl2, with disjoint + # counters var_l1 and var_l2. This is arguably acceptable behavior, + # but it's definitely not enough of a reason for the test to fail. + ./depdemo -alt; then + : + elif test "x,$hardcode_action,$hardcode_direct" = x,relink,yes; then + echo "Ok, uninstalled programs fail after uninstalled libraries are removed" + echo "This works in other configurations, but not in this particular one" + else + echo "= Exiting: ../depdemo/depdemo does not run, maybe libl3 was not installed" + exit 1 + fi + + echo "linking a broken ../depdemo/l3/libl3.la" + if (cd l3; $make libl3.la libl3_la_OBJECTS=../l2/l2.lo); then + : + else + echo "= Exiting: cannot link broken libl3.la" + exit 1 + fi + rm -f l3/libl3.la + + echo "running ../depdemo/depdemo with broken libl3.la" + if (./depdemo) 2>&1; then + echo "= Exiting: ../depdemo/depdemo runs even though libl3.la is incomplete" + echo "shlibpath_overrides_runpath should be set to no" + exit 1 + else + echo "Failed, as expected" + fi + + if test "x$hardcode_action" = xrelink; then + echo "= Exiting: install-time relinking is required" + exit 0 + fi + + if test "$shlibpath_overrides_runpath" != yes; then + rm -f $objdir/lt-depdemo || exit 1 + cp $objdir/depdemo $objdir/lt-depdemo || exit 1 + echo "running ../depdemo/depdemo with installed libl3.la" + if ./depdemo; then + echo "Worked, as expected" + else + echo "shlibpath_overrides_runpath should be set to yes" + status=1 + fi + rm -f $objdir/lt-depdemo + fi + + exit $status Index: libtool/tests/cdemo-conf.test diff -c libtool/tests/cdemo-conf.test:1.1.4.1 libtool/tests/cdemo-conf.test:1.3 *** libtool/tests/cdemo-conf.test:1.1.4.1 Fri Mar 19 09:58:37 1999 --- libtool/tests/cdemo-conf.test Mon Sep 4 00:46:01 2000 *************** *** 25,31 **** # Configure the demonstration. echo "= Configuring in ../cdemo (prefix=$prefix)" ! CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : --- 25,31 ---- # Configure the demonstration. echo "= Configuring in ../cdemo (prefix=$prefix)" ! CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : Index: libtool/tests/cdemo-shared.test diff -c libtool/tests/cdemo-shared.test:1.1.4.1 libtool/tests/cdemo-shared.test:1.3 *** libtool/tests/cdemo-shared.test:1.1.4.1 Fri Mar 19 09:58:38 1999 --- libtool/tests/cdemo-shared.test Mon Sep 4 00:46:01 2000 *************** *** 25,31 **** # Configure the demonstration. echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-static" ! CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-static || exit 1 if egrep '^build_old_libs=no' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : --- 25,31 ---- # Configure the demonstration. echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-static" ! CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-static || exit 1 if egrep '^build_old_libs=no' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : Index: libtool/tests/cdemo-static.test diff -c libtool/tests/cdemo-static.test:1.2.4.1 libtool/tests/cdemo-static.test:1.4 *** libtool/tests/cdemo-static.test:1.2.4.1 Fri Mar 19 09:58:39 1999 --- libtool/tests/cdemo-static.test Mon Sep 4 00:46:01 2000 *************** *** 25,31 **** # Configure the demonstration. echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-shared" ! CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-shared || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=no' libtool > /dev/null; then : --- 25,31 ---- # Configure the demonstration. echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-shared" ! CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-shared || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=no' libtool > /dev/null; then : Index: libtool/tests/demo-conf.test diff -c libtool/tests/demo-conf.test:1.1.1.6.4.1 libtool/tests/demo-conf.test:1.3 *** libtool/tests/demo-conf.test:1.1.1.6.4.1 Fri Mar 19 09:58:39 1999 --- libtool/tests/demo-conf.test Mon Sep 4 00:46:01 2000 *************** *** 25,31 **** # Configure the demonstration. echo "= Configuring in ../demo (prefix=$prefix)" ! CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : --- 25,31 ---- # Configure the demonstration. echo "= Configuring in ../demo (prefix=$prefix)" ! CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : Index: libtool/tests/demo-nofast.test diff -c libtool/tests/demo-nofast.test:1.1.4.1 libtool/tests/demo-nofast.test:1.3 *** libtool/tests/demo-nofast.test:1.1.4.1 Fri Mar 19 09:58:40 1999 --- libtool/tests/demo-nofast.test Mon Sep 4 00:46:01 2000 *************** *** 25,31 **** # Configure the demonstration. echo "= Configuring in ../demo (prefix=$prefix)" ! CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --enable-fast-install=no || exit 1 if egrep '^hardcode_action=relink' libtool > /dev/null; then rm -f Makefile && exit 77 --- 25,31 ---- # Configure the demonstration. echo "= Configuring in ../demo (prefix=$prefix)" ! CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --enable-fast-install=no || exit 1 if egrep '^hardcode_action=relink' libtool > /dev/null; then rm -f Makefile && exit 77 Index: libtool/tests/demo-nopic.test diff -c /dev/null libtool/tests/demo-nopic.test:1.2 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/demo-nopic.test Mon Sep 4 00:46:01 2000 *************** *** 0 **** --- 1,30 ---- + #! /bin/sh + # demo-nopic.test - try configuring the ../demo subdirectory + + # Test script header. + need_prefix=no + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../demo || mkdir ../demo + + # Change to our build directory. + cd ../demo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../demo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../demo (prefix=$prefix) with --without-pic" + CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --with-pic=no || exit 1 + + exit 0 Index: libtool/tests/demo-pic.test diff -c /dev/null libtool/tests/demo-pic.test:1.2 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/demo-pic.test Mon Sep 4 00:46:01 2000 *************** *** 0 **** --- 1,30 ---- + #! /bin/sh + # demo-pic.test - try configuring the ../demo subdirectory + + # Test script header. + need_prefix=no + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../demo || mkdir ../demo + + # Change to our build directory. + cd ../demo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../demo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../demo (prefix=$prefix) with --with-pic" + CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --with-pic=yes || exit 1 + + exit 0 Index: libtool/tests/demo-shared.test diff -c libtool/tests/demo-shared.test:1.1.4.1 libtool/tests/demo-shared.test:1.3 *** libtool/tests/demo-shared.test:1.1.4.1 Fri Mar 19 09:58:40 1999 --- libtool/tests/demo-shared.test Mon Sep 4 00:46:01 2000 *************** *** 25,31 **** # Configure the demonstration. echo "= Configuring in ../demo (prefix=$prefix) with --disable-static" ! CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-static || exit 1 if egrep '^build_old_libs=no' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : --- 25,31 ---- # Configure the demonstration. echo "= Configuring in ../demo (prefix=$prefix) with --disable-static" ! CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-static || exit 1 if egrep '^build_old_libs=no' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : Index: libtool/tests/demo-static.test diff -c libtool/tests/demo-static.test:1.1.4.1 libtool/tests/demo-static.test:1.3 *** libtool/tests/demo-static.test:1.1.4.1 Fri Mar 19 09:58:41 1999 --- libtool/tests/demo-static.test Mon Sep 4 00:46:01 2000 *************** *** 25,31 **** # Configure the demonstration. echo "= Configuring in ../demo (prefix=$prefix) with --disable-shared" ! CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-shared || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=no' libtool > /dev/null; then : --- 25,31 ---- # Configure the demonstration. echo "= Configuring in ../demo (prefix=$prefix) with --disable-shared" ! CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --disable-shared || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=no' libtool > /dev/null; then : Index: libtool/tests/depdemo-conf.test diff -c /dev/null libtool/tests/depdemo-conf.test:1.4 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/depdemo-conf.test Mon Sep 4 00:46:01 2000 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # depdemo-conf.test - try configuring the ./depdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../depdemo || mkdir ../depdemo + + # Change to our build directory. + cd ../depdemo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../depdemo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../depdemo (prefix=$prefix)" + CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --prefix=$prefix || exit 1 + + if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/depdemo-exec.test diff -c /dev/null libtool/tests/depdemo-exec.test:1.3 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/depdemo-exec.test Fri Mar 19 09:58:50 1999 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # depdemo-exec.test - check that programs in the ../depdemo subdirectory are viable + + # Test script header. + need_prefix=no + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + if test -f ../depdemo/depdemo; then : + else + echo "You must run depdemo-make.test before running $0" 1>&2 + exit 77 + fi + + # Check to see if the programs really run. + echo "Executing uninstalled programs in ../depdemo" + + status=0 + if ../depdemo/depdemo.static; then : + else + echo "$0: cannot execute ../depdemo/depdemo.static" 1>&2 + status=1 + fi + + if ../depdemo/depdemo; then : + else + echo "$0: cannot execute ../depdemo/depdemo" 1>&2 + status=1 + fi + + exit $status Index: libtool/tests/depdemo-inst.test diff -c /dev/null libtool/tests/depdemo-inst.test:1.3 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/depdemo-inst.test Fri Mar 19 09:58:50 1999 *************** *** 0 **** --- 1,47 ---- + #! /bin/sh + # depdemo-inst.test - try installing from the ../depdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Check that things are built. + if test -f ../depdemo/depdemo; then : + else + echo "You must run depdemo-make.test before $0" 1>&2 + exit 77 + fi + + # Change to our build directory. + cd ../depdemo || exit 1 + + echo "= Running $make install in ../depdemo" + $make install || exit 1 + + echo "= Executing installed programs" + + status=0 + if $prefix/bin/depdemo.static; then : + else + echo "$0: cannot execute $prefix/bin/depdemo.static" 1>&2 + status=1 + fi + + if $prefix/bin/depdemo; then : + else + echo "$0: cannot execute $prefix/bin/depdemo" 1>&2 + + # Simple check to see if they are superuser. + if test -w /; then : + else + echo "You may need to run $0 as the superuser." + fi + status=1 + fi + + exit $status Index: libtool/tests/depdemo-make.test diff -c /dev/null libtool/tests/depdemo-make.test:1.3 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/depdemo-make.test Fri Mar 19 09:58:50 1999 *************** *** 0 **** --- 1,25 ---- + #! /bin/sh + # depdemo-make.test - try building in the ../depdemo subdirectory + + # Test script header. + need_prefix=no + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + if test -f ../depdemo/Makefile; then : + else + echo "You must run depdemo-conf.test before running $0" 1>&2 + exit 77 + fi + + # Change to our build directory. + cd ../depdemo || exit 1 + + # Do the actual build. + echo "Making in ../depdemo" + $make || exit 1 + exit 0 Index: libtool/tests/depdemo-nofast.test diff -c /dev/null libtool/tests/depdemo-nofast.test:1.3 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/depdemo-nofast.test Mon Sep 4 00:46:01 2000 *************** *** 0 **** --- 1,34 ---- + #! /bin/sh + # depdemo-conf.test - try configuring the ./depdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../depdemo || mkdir ../depdemo + + # Change to our build directory. + cd ../depdemo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../depdemo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../depdemo (prefix=$prefix)" + CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --prefix=$prefix --enable-fast-install=no || exit 1 + + if egrep '^hardcode_action=relink' libtool > /dev/null; then + rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/depdemo-shared.test diff -c /dev/null libtool/tests/depdemo-shared.test:1.4 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/depdemo-shared.test Mon Sep 4 00:46:01 2000 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # depdemo-conf.test - try configuring the ../depdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../depdemo || mkdir ../depdemo + + # Change to our build directory. + cd ../depdemo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../depdemo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../depdemo (prefix=$prefix) with --disable-static" + CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --prefix=$prefix --disable-static || exit 1 + + if egrep '^build_old_libs=no' libtool > /dev/null && + egrep '^build_libtool_libs=yes' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/depdemo-static.test diff -c /dev/null libtool/tests/depdemo-static.test:1.4 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/depdemo-static.test Mon Sep 4 00:46:01 2000 *************** *** 0 **** --- 1,35 ---- + #! /bin/sh + # depdemo-conf.test - try configuring the ../depdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Maybe we have a VPATH build, in which case, create a new subdir. + test -d ../depdemo || mkdir ../depdemo + + # Change to our build directory. + cd ../depdemo || exit 1 + + # Possibly clean up the distribution. + if test -f Makefile; then + echo "= Running $make distclean in ../depdemo" + $make distclean + fi + rm -f config.cache + + # Configure the demonstration. + echo "= Configuring in ../depdemo (prefix=$prefix) with --disable-shared" + CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../depdemo/configure --srcdir=$srcdir/../depdemo --prefix=$prefix --disable-shared || exit 1 + + if egrep '^build_old_libs=yes' libtool > /dev/null && + egrep '^build_libtool_libs=no' libtool > /dev/null; then : + else rm -f Makefile && exit 77 + fi + + exit 0 Index: libtool/tests/depdemo-unst.test diff -c /dev/null libtool/tests/depdemo-unst.test:1.4 *** /dev/null Tue Apr 24 17:27:09 2001 --- libtool/tests/depdemo-unst.test Sat Mar 20 20:51:35 1999 *************** *** 0 **** --- 1,32 ---- + #! /bin/sh + # depdemo.test - try uninstalling in the ../depdemo subdirectory + + # Test script header. + need_prefix=yes + if test -z "$srcdir"; then + srcdir=`echo "$0" | sed 's%/[^/]*$%%'` + test "$srcdir" = "$0" && srcdir=. + test "${VERBOSE+set}" != "set" && VERBOSE=yes + fi + . $srcdir/defs || exit 1 + + # Make sure it was installed already + if test "$prefix/bin/hell" && cd ../depdemo && test -f Makefile; then : + else + echo "You must run depdemo-inst.test before $0." 1>&2 + exit 77 + fi + + echo "= Running $make uninstall in ../depdemo" + $make uninstall || exit 1 + + # See that there were no files leftover in $prefix. + # Ignore dotfiles, so that .nfsXXX files don't screw up the test. + leftovers=`find $prefix ! -type d ! -name '.*' -print` + if test -n "$leftovers"; then + echo "= Leftover after make uninstall:" + ls -l $leftovers + exit 1 + fi + + exit 0 Index: libtool/tests/dryrun.test diff -c libtool/tests/dryrun.test:1.1.2.5 libtool/tests/dryrun.test:1.8 *** libtool/tests/dryrun.test:1.1.2.5 Wed Apr 7 12:35:58 1999 --- libtool/tests/dryrun.test Mon Sep 4 01:20:02 2000 *************** *** 42,58 **** mv $objdir/libtool.new libtool # main.o is not compiled with libtool, but it depends on it, so make ! # sure it is up-to-date ! $make main.o || exit 1 echo "= Making object files in ../mdemo (dry run)" ls -l . $objdir > $before ! force_dry_run=yes $make foo1.lo foo2.lo || exit $? ls -l . $objdir > $after cmp $before $after > /dev/null || exit 1 # Now really make them echo "= Making object files in ../mdemo" ! $make foo1.lo foo2.lo || exit 1 echo "= Making libraries in ../mdemo (dry run)" ls -l . $objdir > $before --- 42,59 ---- mv $objdir/libtool.new libtool # main.o is not compiled with libtool, but it depends on it, so make ! # sure it is up-to-date. libfoo2.la is linked with libsub.la, so make ! # sure it exists, otherwise libtool will complain. ! $make main.$OBJEXT || exit 1 echo "= Making object files in ../mdemo (dry run)" ls -l . $objdir > $before ! force_dry_run=yes $make foo1.lo foo2.lo sub.lo || exit $? ls -l . $objdir > $after cmp $before $after > /dev/null || exit 1 # Now really make them echo "= Making object files in ../mdemo" ! $make foo1.lo foo2.lo libsub.la || exit 1 echo "= Making libraries in ../mdemo (dry run)" ls -l . $objdir > $before *************** *** 65,76 **** echo "= Making programs in ../mdemo (dry run)" ls -l . $objdir > $before ! force_dry_run=yes $make mdemo mdemo.static 1>&2 || exit $? ls -l . $objdir > $after cmp $before $after > /dev/null || exit 1 # Now really make them echo "= Making programs in ../mdemo" ! $make mdemo mdemo.static || exit 1 echo "= Running $make install in ../mdemo (dry run)" # Libtool does not create these directories --- 66,77 ---- echo "= Making programs in ../mdemo (dry run)" ls -l . $objdir > $before ! force_dry_run=yes $make mdemo$EXEEXT mdemo.static 1>&2 || exit $? ls -l . $objdir > $after cmp $before $after > /dev/null || exit 1 # Now really make them echo "= Making programs in ../mdemo" ! $make mdemo$EXEEXT mdemo.static || exit 1 echo "= Running $make install in ../mdemo (dry run)" # Libtool does not create these directories *************** *** 88,94 **** echo "= Running $make uninstall in ../mdemo (dry run)" # Libtool does not uninstall the programs, remove them first ! rm -f $prefix/bin/mdemo $prefix/bin/mdemo.static ls -l . $objdir > $before ls -lR $prefix >> $before force_dry_run=yes $make uninstall 1>&2 || exit $? --- 89,95 ---- echo "= Running $make uninstall in ../mdemo (dry run)" # Libtool does not uninstall the programs, remove them first ! rm -f $prefix/bin/mdemo$EXEEXT $prefix/bin/mdemo.static ls -l . $objdir > $before ls -lR $prefix >> $before force_dry_run=yes $make uninstall 1>&2 || exit $? Index: libtool/tests/hardcode.test diff -c libtool/tests/hardcode.test:1.2.2.1 libtool/tests/hardcode.test:1.4 *** libtool/tests/hardcode.test:1.2.2.1 Fri Mar 19 09:58:41 1999 --- libtool/tests/hardcode.test Wed Sep 6 10:31:09 2000 *************** *** 40,46 **** echo "= Running $make hardcode in ../demo" $make hardcode || exit 1 ! echo "= Finding ltconfig's guesses at hardcoding values" status=0 hardcode_direct=NONE hardcode_minus_L=NONE --- 40,46 ---- echo "= Running $make hardcode in ../demo" $make hardcode || exit 1 ! echo "= Finding libtool.m4's guesses at hardcoding values" status=0 hardcode_direct=NONE hardcode_minus_L=NONE Index: libtool/tests/mdemo-conf.test diff -c libtool/tests/mdemo-conf.test:1.4.2.1 libtool/tests/mdemo-conf.test:1.6 *** libtool/tests/mdemo-conf.test:1.4.2.1 Fri Mar 19 09:58:42 1999 --- libtool/tests/mdemo-conf.test Mon Sep 4 00:46:01 2000 *************** *** 25,31 **** # Configure the demonstration. echo "= Configuring in ../mdemo (prefix=$prefix)" ! CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : --- 25,31 ---- # Configure the demonstration. echo "= Configuring in ../mdemo (prefix=$prefix)" ! CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : Index: libtool/tests/mdemo-exec.test diff -c libtool/tests/mdemo-exec.test:1.8.2.1 libtool/tests/mdemo-exec.test:1.10 *** libtool/tests/mdemo-exec.test:1.8.2.1 Fri Mar 19 09:58:42 1999 --- libtool/tests/mdemo-exec.test Sun Sep 3 18:20:16 2000 *************** *** 22,34 **** status=0 if ../mdemo/mdemo.static ../mdemo/foo1.la ../mdemo/libfoo2.la; then : else ! echo "$0: cannot execute ../mdemo/mdemo.static" 1>&2 status=1 fi if ../mdemo/mdemo ../mdemo/foo1.la ../mdemo/libfoo2.la; then : else ! echo "$0: cannot execute ../mdemo/mdemo" 1>&2 status=1 fi --- 22,34 ---- status=0 if ../mdemo/mdemo.static ../mdemo/foo1.la ../mdemo/libfoo2.la; then : else ! echo "$0: execution of ../mdemo/mdemo.static failed" 1>&2 status=1 fi if ../mdemo/mdemo ../mdemo/foo1.la ../mdemo/libfoo2.la; then : else ! echo "$0: execution of ../mdemo/mdemo failed" 1>&2 status=1 fi Index: libtool/tests/mdemo-shared.test diff -c libtool/tests/mdemo-shared.test:1.2.2.1 libtool/tests/mdemo-shared.test:1.4 *** libtool/tests/mdemo-shared.test:1.2.2.1 Fri Mar 19 09:58:43 1999 --- libtool/tests/mdemo-shared.test Mon Sep 4 00:46:01 2000 *************** *** 25,31 **** # Configure the demonstration. echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-static" ! CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-static || exit 1 if egrep '^build_old_libs=no' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : --- 25,31 ---- # Configure the demonstration. echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-static" ! CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-static || exit 1 if egrep '^build_old_libs=no' libtool > /dev/null && egrep '^build_libtool_libs=yes' libtool > /dev/null; then : Index: libtool/tests/mdemo-static.test diff -c libtool/tests/mdemo-static.test:1.2.2.1 libtool/tests/mdemo-static.test:1.4 *** libtool/tests/mdemo-static.test:1.2.2.1 Fri Mar 19 09:58:43 1999 --- libtool/tests/mdemo-static.test Mon Sep 4 00:46:01 2000 *************** *** 25,31 **** # Configure the demonstration. echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-shared" ! CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-shared || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=no' libtool > /dev/null; then : --- 25,31 ---- # Configure the demonstration. echo "= Configuring in ../mdemo (prefix=$prefix) with --disable-shared" ! CONFIG_SITE=/dev/null/config/site ${CONFIG_SHELL-/bin/sh} $srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix --disable-shared || exit 1 if egrep '^build_old_libs=yes' libtool > /dev/null && egrep '^build_libtool_libs=no' libtool > /dev/null; then : Index: libtool/tests/quote.test diff -c libtool/tests/quote.test:1.1.1.6 libtool/tests/quote.test:1.4 *** libtool/tests/quote.test:1.1.1.6 Sun Apr 19 12:21:49 1998 --- libtool/tests/quote.test Tue Apr 24 16:22:35 2001 *************** *** 36,42 **** # This shell has a builtin print -r that does the trick. echo='print -r' elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then ! # If we have ksh, try running ltconfig again with it. CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} --- 36,42 ---- # This shell has a builtin print -r that does the trick. echo='print -r' elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then ! # If we have ksh, try running $0 again with it. CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} *************** *** 63,80 **** 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" ;; --- 63,83 ---- case "$mode" in compile) preargs="gcc -c" + preflag= flag="-DVAR=" postargs="foo.c" ;; link) preargs="gcc -o hell -g -O" ! preflag=-Wl, ! flag="-someflag=" postargs="foo.o" ;; install) preargs="install -c" + preflag= flag="--something=" postargs="hell /usr/local/bin/hell" ;; *************** *** 82,90 **** # 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" ;; *) --- 85,97 ---- # Trivial. $echo "= trying: no quoting" ! result=`$libtool -n --mode=$mode $preargs ${preflag}"${flag}test" $postargs` || status=1 ! # We used to have the contents of $match in the case statement, ! # without an intermediate variable, but it would fail on at least ! # Solaris' and HP-UX's /bin/sh. Ugh! ! match="$preargs ${preflag}${flag}test " case "$result" in ! *"$match"*) $echo "= passed: $result" ;; *) *************** *** 96,104 **** # 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" ;; *) --- 103,112 ---- # Metacharacters that should be backslashified. for mchar in \\ \" \` \$; do $echo "= trying: \\$mchar quoting" ! result=`$libtool -n --mode=$mode $preargs ${preflag}"${flag}${mchar}test${mchar}" $postargs` || status=1 ! match="$preargs ${preflag}${flag}\\${mchar}test\\${mchar} " case "$result" in ! *"$match"*) $echo "= passed: $result" ;; *) *************** *** 113,121 **** "'" " " " "; 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" ;; *) --- 121,130 ---- "'" " " " "; do $echo "= trying: \"$mchar\" quoting" ! result=`$libtool -n --mode=$mode $preargs ${preflag}"${flag}${mchar}test${mchar}" $postargs` || status=1 ! match="$preargs ${preflag}\"${flag}${mchar}test${mchar}\" " case "$result" in ! *"$match"*) $echo "= passed: $result" ;; *) Index: libtool/tests/sh.test diff -c libtool/tests/sh.test:1.4 libtool/tests/sh.test:1.6 *** libtool/tests/sh.test:1.4 Sat Mar 13 14:20:33 1999 --- libtool/tests/sh.test Wed Sep 6 10:31:09 2000 *************** *** 12,18 **** # 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 --- 12,18 ---- # Check all the "portable" shell scripts. status=0 ! scripts="$srcdir/../ltmain.sh" # Check for bad binary operators. if egrep -n -e "if[ ]+[\"']?\\$.*(=|-[lg][te]|-eq|-ne)" $scripts; then *************** *** 53,58 **** --- 53,65 ---- # Check for uses of Xsed without corresponding echo "X if egrep -n -e '\$Xsed' $scripts | egrep -v -n -e '\$echo \\*"X'; then echo "occurrences of \`\$Xsed\' without \`echo \"X\' on the same line" + status=1 + fi + + # Check for quotes within backquotes within quotes "`"bar"`" + if egrep -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | \ + egrep -v "### testsuite: skip nested quoting test$"; then + echo "nested quotes are dangerous" status=1 fi