Index: libtool/ChangeLog diff -c libtool/ChangeLog:1.922.2.54 libtool/ChangeLog:1.922.2.111 *** libtool/ChangeLog:1.922.2.54 Mon Sep 10 23:33:37 2001 --- libtool/ChangeLog Tue Oct 22 22:54:36 2002 *************** *** 1,5 **** --- 1,323 ---- + 2002-10-22 Robert Boehne + + GNU libtool 1.4.3 was released. + + * configure.in: Bumped version to 1.4.3. + * config.sub, config.guess: Synchronised from ftp.gnu.org. + * NEWS: Updated. + + 2002-10-22 Albert Chin-A-Young + + * libltdl/ltdl.c: Init char * to NULL, not 0. And, for + some char * values, set *[var] = 0 to *[var] = '\0'. + + 2002-10-22 Brad Smith + + * libtool.m4: $linker_flag -> $compiler_flag for OpenBSD + archive_cmds entries using $CC. + + 2002-10-22 Alexandre Duret-Lutz + + * ltdl.m4 (AC_LIB_LTDL, AC_LTDL_ENABLE_INSTALL, + AC_LTDL_SYS_DLOPEN_DEPLIBS, AC_LTDL_SHLIBEXT, AC_LTDL_SHLIBPATH, + AC_LTDL_SYSSEARCHPATH, AC_LTDL_OBJDIR, AC_LTDL_DLPREOPEN, + AC_LTDL_DLLIB, AC_LTDL_SYMBOL_USCORE, AC_LTDL_DLSYM_USCORE): Quote + macro name in definition. + + 2002-10-22 Albert Chin-A-Young + + * libtool.m4: When a module is built for AIX, the 'lib' + prefix isn't needed, neither is the version. AIX dlopen + will honor the RPATH in a library. + + 2002-10-20 Alexandre Duret-Lutz + + * libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Honor + ac_exeext. + + 2002-10-14 Albert Chin-A-Young + + * libtool.m4: If ld is being used on IRIX to embed the + runtmie path, use -rpath, not -Wl,-rpath. Embed the runtime + path into libraries for AIX (supported on AIX 4.3.2+). + Embed the runtime path into Tru64 libraries, even though it + doesn't make much sense unless using Tru64 UNIX 5.1 with a + specific patch and >5.1. + + 2002-10-11 Albert Chin-A-Young + + * libtool.m4 (aix): When LDFLAGS="-Wl,-brtl,[other options]", + the "-brtl" special-case code for AIX never gets triggered + because were are being too specific about how we search for + "-brtl". Use case statement to avoid this. Remove extraneous + semicolon. + * ltmain.in: Recognize the IBM xlc compiler family. + + 2002-10-11 Christoph Egger + + * libtool.m4 (darwin): Add -install_name to the link line only + when -dynamiclib is specified for a module. + * ltmain.in (darwin): Use -bind_at_load when linking shared + libraries. + + 2002-09-09 Albert Chin-A-Young + + * libtool.m4: Custom $symcode for Tru64 UNIX to catch 'Q', + read-only constants. + + 2002-09-09 Rainer Orth + + * libtool.m4 (osf[345]): Append $major to soname_spec. + Reflect this in library_names_spec. + * ltmain.in (osf): Prefix $major with '.' for use as extension. + + 2002-06-26 Bob Friesenhahn + + * libtool.m4 (sys_lib_search_path_spec): Remove extraneous '=' + character which appears in gcc 3.1 -print-search-dirs output. + + 2002-06-23 Albert Chin-A-Young + + * ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): HP/UX needs + libltdl_cv_sys_dlopen_deplibs set to yes. + + 2002-06-23 Gary V. Vaughan + + * libltdl/ltdl.c (argz_insert): Actually, BEFORE can be NULL + when *PARGZ_LEN is non-NULL, so the assertion to the contrary was + bogus. + Reported by Bob Friesenhahn + and Albert Chin-A-Young + + 2002-06-21 Gary V. Vaughan + + * libltdl/ltdl.c (foreach_dirinpath): Ensure that filename is '\0' + terminated by all code paths. + Reported by Lutz Müller + + 2002-06-20 Gary V. Vaughan + + From Kevin Ryde : + * doc/libtool.texi (Platform quirks): s/dependan/dependen/ + * TODO: Ditto. + + 2002-06-13 Rainer Orth + + * ltmain.in (irix, nonstopux): Set major before use. + + 2002-06-11 Daniel Kobras + + * libltdl/ltdl.c (try_dlopen): Don't return bogus handle to user + if tryall_dlopen() fails. + + 2002-05-06 Paul Eggert + + * libtool.m4 (_LT_AC_LTCONFIG_HACK): head -1 -> sed 1q to + port to POSIX 1003.1-2001 hosts, like textutils 2.0.21 with + _POSIX2_VERSION=200112. + + 2002-05-06 Paul Eggert + + * ltmain.in: Don't assume that "sort +2" works, as POSIX + 1003.1-2001 says that "sort +2" is supposed to sort the file + named "+2". An example host that behaves like this is + textutils 2.0.21 with _POSIX2_VERSION=200112. + + 2002-05-02 Dave Vasilevsky + + * ltmain.in: Remove convenience libraries from deplibs for Darwin. + + 2002-05-02 Fritz Elfert + + * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS): Modify archive_expsym_cmds + to catch properly handle dll alias symbols. + + 2002-04-14 Jean-Frederic Clere + + * libtool.m4: Update support for Fujistu-Siemens Computers (FSC). + * ltmain.in: Add support for EBCDIC based systems. + + 2002-03-16 Gary V. Vaughan + + * TODO: Removed obsolete comments about RMS' package system. + + 2002-03-07 Albert Chin-A-Young + + * libtool.m4: Allow LT_AC_PROG_SED to work under autoconf + 2.13 and 2.5x with $ECHO_N/$ECHO_C and $ac_n/$ac_c. + + 2002-02-25 Albert Chin-A-Young + + * ltmain.in: Quote $pic_mode. + + 2002-02-25 Albert Chin-A-Young + + * ltmain.in: Fix version string under IRIX. + + 2002-02-25 Albert Chin-A-Young + + * libtool.m4 (LT_AC_PROG_SED): Use $ac_n and $ac_c rather than + $ECHO_N and $ECHO_C for new LT_AC_PROG_SED macro. + $ECHO_N and $ECHO_C defined for autoconf 2.50 and above only. + + 2002-02-01 Robert Boehne + + * libtool.m4 (LT_AC_PROG_SED): New macro tests sed for truncation of + output. AC_REQUIRE the new macro. + * ltmain.in: Use $SED rather than plan old sed, as set by the new + macro LT_AC_PROG_SED. + + 2002-01-14 Ossama Othman + + From Roger Leigh : + * libtoolize.in (auxdirline): Fixed hardcoded value of + "configure.in." Instead use "$configure_ac" variable. Corrects + AC_CONFIG_AUX_DIR support when using new style `configure.ac.' + + * doc/libtool.texi: Corrected typo. "Safety" not "Saftey". + + 2002-01-14 Robert Boehne + + * libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Add mips/mipsel to list of + architectures for linux. + + 2002-01-10 Volker Christian + + * libltdl/ltdl.c (find_handle_callback): treat the result of a call + to access(2) correctly when deciding whether a library can be found + in a directory from user_search_path. + + 2001-11-28 Robert Boehne + + With help from Michael Matz : + * ltmain.in: Add a new command line argument + --preserve-dup-deps for preserving duplicate + dependent libraries. + * libtool.texi: Document it. + + 2001-11-28 Gary V. Vaughan + + * libtoolize.in: The test for whether AC_PROG_LIBTOOL is defined + in aclocal.m4 had bitrotted slightly. + Reported by Takahiko Kawasaki + + 2001-11-27 Donald D. Anderson + + * ltmain.in: Treat freebsd like openbsd, in that -lc/-lc_r should + not be explicitly used. ld handles this depending on the presence + of the -pthread option. + + 2001-11-15 Guido Draheim + + * ltdl.m4: Changed "underscode to underscore". + + 2001-11-15 Gary V. Vaughan + + From Joseph S. Myers : + * ltmain.in: Typo. + + 2001-11-15 Mo DeJong + + * ltmain.in: Place parens around a generated relink_command + so it is run is a subshell. This avoids an install error + where libtool ended up in the wrong directory after + relinking a .la file. + + 2001-11-15 Guido Draheim + + * ltmain.in: Display better and different error messages when + library linkage fails in various ways. + + 2001-10-28 Gary V. Vaughan + + From Tom Bates : + * libtool.m4 [mips-compaq-nonstopux]: New port. + * ltmain.in [mips-compaq-nonstopux]: Support + $version_type == nonstopux. + * NEWS: Updated. + + 2001-10-28 Albert Chin-A-Young + + * libltdl/ltdl.c (foreach_dirinpath): change some types to size_t + from int because strlen() returns size_t. argz_len changed to + size_t because argzize_path() takes 3rd argument as size_t, not + int. + Based on lint run from Bob Friesenhahn + + 2001-10-27 Gary V. Vaughan + + * ltdl.m4 (AC_WITH_LTDL): New macro to add `--with-included-ltdl' + option to configure, but to find an appropriate ltdl library and + append the right options to link it. + + 2001-10-04 Albert Chin-A-Young + + * libltdl/ltdl.c: Match function return type with prototype + (add static initializer to file_not_found). + + 2001-09-30 Gary V. Vaughan + + * libtool.m4 (AC_LIBLTDL_CONVENIENCE): s/INCLTDL/LTDLINCL/ for + consistency with gettext's INTLINCL. Keep the old symbol too for + backwards compatibility. + (AC_LIBLTDL_INSTALLABLE): Ditto. + * doc/libtool.texi (Distributing libltdl): Adjust documentation. + + 22001-09-22 Albert Chin-A-Young + + * ltdl.m4 (AC_LTDL_DLLIB): Even though HP-UX 10.20 and 11.00 + support shl_load *and* dlopen, dlopen works correctly only + with a patch. Because we want to avoid the situation where we + build on a system with the patch but deploy on a system without, + use shl_load exclusively if found. + + 2001-09-21 Gary V. Vaughan + + From Tor Lillqvist : + * ltmain.in [cygwin* mingw*]: Take care of the difference between + wrapper script name and executable name. + + * libtool.m4 (archive_cmds) [darwin1.[0-2]]: Darwin uses zsh-3.1.6 + for /bin/sh, and that shell does not handle escaped quotes + properly yet. + Reported by Christopher Pfisterer + + 2001-09-21 Albert Chin-A-Young + + * libltdl/ltdl.c: Match function return type with prototype + (add static initializer to some functions) to prevent warnings + from HP-UX cc. + + 2001-09-21 Gary V. Vaughan + + * libltdl/ltdl.c: Added support for dmalloc, and uncovered some + memory bugs as a result. + + 2001-09-13 Gary V. Vaughan + + * ltmain.in (exec_cmd): Don't overquote or we end up with this: + $ libtool --mode=execute echo foo + "foo" + Reported by Rob Browning + + 2001-09-13 Assar Westerlund + + * ltdl.m4 (AC_LTDL_DLLIB): call dlopen with arguments so the test + does not fail due to a prototype in dlfcn.h + 2001-09-11 Gary V. Vaughan + * libltdl/Makefile.am (OBJECTS): In addition to making $(OBJECTS) + depend on libtool -- which causes Automake 1.4 to generate the + ibtool script in this directory during bootstrap -- also add + libltdl_la_OBJECTS and libltdlc_la_OBJECTS, the Automake 1.5 + equivalents. + * NEWS: Updated. + + * bootstrap: Be robust to having no files that need removing. + + * configure.in: Bumped version to 1.4.2a. + GNU libtool 1.4.2 was released. * configure.in: Bumped version to 1.4.2. *************** *** 48,54 **** (AC_PROG_LD): Don't forget to AC_REQUIRE it! Be careful not to set IFS="${IFS}$PATH_SEPARATOR" for PATH splitting, otherwise spaces in directory names will be lost. ! (AC_PROG_NM): Dittp. * ltmain.in: Default IFS once, at the start. Reported by Akim Demaille --- 366,372 ---- (AC_PROG_LD): Don't forget to AC_REQUIRE it! Be careful not to set IFS="${IFS}$PATH_SEPARATOR" for PATH splitting, otherwise spaces in directory names will be lost. ! (AC_PROG_NM): Ditto. * ltmain.in: Default IFS once, at the start. Reported by Akim Demaille *************** *** 3842,3845 **** Continued in ChangeLog.0 ! $Revision: 1.922.2.54 $ $Date: 2001/09/11 03:33:37 $ --- 4160,4163 ---- Continued in ChangeLog.0 ! $Revision: 1.922.2.111 $ $Date: 2002/10/23 02:54:36 $ Index: libtool/NEWS diff -c libtool/NEWS:1.91.2.7 libtool/NEWS:1.91.2.10 *** libtool/NEWS:1.91.2.7 Mon Sep 10 23:33:37 2001 --- libtool/NEWS Tue Oct 22 22:54:36 2002 *************** *** 1,9 **** NEWS - list of user-visible changes between releases of GNU Libtool New in 1.4.2: 2001-09-11; CVS version 1.4.1a, Gary V. Vaughan: * libltdl now builds on solaris again * diagnose and warn about not-quite-working combinations of gcc and ! * ld on solaris * Improved OpenBSD support. * Improved cygwin support. * Bugfixes. --- 1,16 ---- NEWS - list of user-visible changes between releases of GNU Libtool + New in 1.4.3: 2002-10-13; CVS version 1.4.2a, Robert Boehne: + * The libltdl subdirectory now bootstraps correctly with Automake 1.5. + * srcdir != builddir builds with Automake 1.5 work correctly. + * Support for mips-compaq-nonstopux. + * New command line argument, --preserve-dup-deps prevents removal of + duplicate dependent libraries. + New in 1.4.2: 2001-09-11; CVS version 1.4.1a, Gary V. Vaughan: * libltdl now builds on solaris again * diagnose and warn about not-quite-working combinations of gcc and ! ld on solaris. * Improved OpenBSD support. * Improved cygwin support. * Bugfixes. Index: libtool/TODO diff -c libtool/TODO:1.46.2.1 libtool/TODO:1.46.2.3 *** libtool/TODO:1.46.2.1 Sun Sep 2 21:48:29 2001 --- libtool/TODO Thu Jun 20 03:06:29 2002 *************** *** 7,13 **** * Fix the following bugs in libltdl: - 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. --- 7,13 ---- * Fix the following bugs in libltdl: - 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. *************** *** 55,62 **** * Godmar Back writes: libltdl uses such stdio functions as fopen, fgets, feof, fclose, and others. ! These functions are not async-signal-safe. While this does not make ! libltdl unusable, it restricts its usefulness and puts an unnecessary burden on the user. As a remedy, I'd recommend to replace those functions with functions --- 55,62 ---- * Godmar Back writes: libltdl uses such stdio functions as fopen, fgets, feof, fclose, and others. ! These functions are not async-signal-safe. While this does not make ! libltdl unusable, it restricts its usefulness and puts an unnecessary burden on the user. As a remedy, I'd recommend to replace those functions with functions *************** *** 66,72 **** out from which you can steal the latter. I believe relying on async-signal-safe functions to the greatest extent ! possible would greatly improve libltdl's ability to be embedded in and used by other systems. * Arrange that EXEEXT suffixes are stripped from wrapper script names --- 66,72 ---- out from which you can steal the latter. I believe relying on async-signal-safe functions to the greatest extent ! possible would greatly improve libltdl's ability to be embedded in and used by other systems. * Arrange that EXEEXT suffixes are stripped from wrapper script names *************** *** 81,87 **** 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| --- 81,87 ---- each object compilation line. * jeffdb@goodnet.com writes ! all you need to do for mutually dependent .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| *************** *** 145,157 **** Things to think about: ********************** - - * Talk with RMS about his so-called `automatic package generation - tool.' This is probably what Thomas has been murmuring about for the - Hurd. We'll need to integrate package-supplied programs such as - libtool into that scheme, since it manages some of the preinstall and - postinstall commands, but isn't installed itself. Probably, things - like libtool should be distributed as part of such a binary package. * Maybe implement full support for other orthogonal library types (libhello_g, libhello_p, 64 vs 32-bit ABI's, etc). Make these types --- 145,150 ---- Index: libtool/bootstrap diff -c libtool/bootstrap:1.16.2.3 libtool/bootstrap:1.16.2.4 *** libtool/bootstrap:1.16.2.3 Mon Sep 10 18:25:55 2001 --- libtool/bootstrap Tue Sep 11 15:09:39 2001 *************** *** 3,9 **** # helps bootstrapping libtool, when checked out from CVS # requires GNU autoconf and GNU automake ! find . \( -name autom4te.cache -o -name libtool \) -print | xargs rm -r file=Makefile.in --- 3,9 ---- # helps bootstrapping libtool, when checked out from CVS # requires GNU autoconf and GNU automake ! find . \( -name autom4te.cache -o -name libtool \) -exec rm -r {} \; file=Makefile.in Index: libtool/config.guess diff -c libtool/config.guess:1.9.2.2 libtool/config.guess:1.9.2.3 *** libtool/config.guess:1.9.2.2 Mon Sep 10 23:33:37 2001 --- libtool/config.guess Tue Oct 22 22:54:36 2002 *************** *** 1,9 **** #! /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-09-04' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by --- 1,9 ---- #! /bin/sh # Attempt to guess a canonical system name. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! timestamp='2002-10-21' # 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 *************** *** 24,31 **** # 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 . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and --- 24,32 ---- # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. ! # Originally written by Per Bothner . ! # Please send patches to . Submit a context ! # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and *************** *** 87,116 **** 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. ! set_cc_for_build='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 1994-08-24) --- 88,127 ---- exit 1 fi + trap 'exit 1' 1 2 15 ! # CC_FOR_BUILD -- compiler used by this script. Note that the use of a ! # compiler to aid in system detection is discouraged as it requires ! # temporary files to be created and, as you can see below, it is a ! # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. ! # This shell variable is my proudest work .. or something. --bje ! ! set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; ! (old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) ! || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; ! dummy=$tmpdir/dummy ; ! files="$dummy.c $dummy.o $dummy.rel $dummy" ; ! trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; ! case $CC_FOR_BUILD,$HOST_CC,$CC in ! ,,) echo "int x;" > $dummy.c ; ! for c in cc gcc c89 c99 ; do ! if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; ! rm -f $files ; 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 ; ! unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) *************** *** 127,155 **** case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) ! # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # 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 ;; ! mac68k) machine=m68k-apple ;; ! macppc) machine=powerpc-apple ;; ! hp3[0-9][05]) machine=m68k-hp ;; ! 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) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null --- 138,167 ---- case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) ! # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. ! # ! # Note: NetBSD doesn't particularly care about the vendor ! # portion of the name. We always set it to "unknown". ! sysctl="sysctl -n hw.machine_arch" ! UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ ! /usr/sbin/$sysctl 2>/dev/null || echo unknown)` ! case "${UNAME_MACHINE_ARCH}" in ! armeb) machine=armeb-unknown ;; ! arm*) machine=arm-unknown ;; ! sh3el) machine=shl-unknown ;; ! sh3eb) machine=sh-unknown ;; ! *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. ! case "${UNAME_MACHINE_ARCH}" in ! arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null *************** *** 172,177 **** --- 184,228 ---- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` *************** *** 180,185 **** --- 231,237 ---- # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. + eval $set_cc_for_build cat <$dummy.s .data \$Lformat: *************** *** 205,214 **** jsr \$26,exit .end main EOF ! eval $set_cc_for_build ! $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then ! case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; --- 257,265 ---- jsr \$26,exit .end main EOF ! $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null if test "$?" = 0 ; then ! case `$dummy` in 0-0) UNAME_MACHINE="alpha" ;; *************** *** 230,238 **** 2-1307) UNAME_MACHINE="alphaev68" ;; esac fi ! rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) --- 281,292 ---- 2-1307) UNAME_MACHINE="alphaev68" ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; esac fi ! rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) *************** *** 247,275 **** Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; ! arc64:OpenBSD:*:*) ! echo mips64el-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! arc:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! hkmips:OpenBSD:*:*) ! echo mips-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! pmax:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! sgi:OpenBSD:*:*) ! echo mips-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! wgrisc:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition --- 301,311 ---- Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; ! *:[Mm]orph[Oo][Ss]:*:*) ! echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition *************** *** 291,296 **** --- 327,336 ---- NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *************** *** 319,325 **** echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) ! UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) --- 359,365 ---- echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) ! UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) *************** *** 333,344 **** aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - sparc*:NetBSD:*) - echo `uname -p`-unknown-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor --- 373,378 ---- *************** *** 365,382 **** *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; --- 399,404 ---- *************** *** 415,429 **** exit (-1); } 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 ;; --- 437,457 ---- exit (-1); } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c \ ! && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; *************** *** 496,503 **** 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 echo rs6000-ibm-aix3.2.4 --- 524,531 ---- exit(0); } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 *************** *** 506,512 **** 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 --- 534,540 ---- fi exit 0 ;; *:AIX:*:[45]) ! IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else *************** *** 546,555 **** 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 --- 574,581 ---- 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][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 *************** *** 558,570 **** case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; esac ;; esac ! fi ;; ! esac ! if [ "${HP_ARCH}" = "" ]; then ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include --- 584,596 ---- case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac ! fi ! if [ "${HP_ARCH}" = "" ]; then ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include *************** *** 597,606 **** exit (0); } 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 ;; --- 623,632 ---- exit (0); } EOF ! (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` ! if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi ! rm -f $dummy.c $dummy && rmdir $tmpdir ! fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; *************** *** 635,642 **** 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 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) --- 661,668 ---- exit (0); } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) *************** *** 664,672 **** parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; --- 690,695 ---- *************** *** 685,693 **** C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; --- 708,713 ---- *************** *** 709,726 **** 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 ;; --- 729,740 ---- *************** *** 731,740 **** echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ! exit 0 ;; ! *:OpenBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin --- 745,763 ---- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) ! # Determine whether the default compiler uses glibc. ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #include ! #if __GLIBC__ >= 2 ! LIBC=gnu ! #else ! LIBC= ! #endif ! EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ! rm -f $dummy.c && rmdir $tmpdir ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin *************** *** 745,750 **** --- 768,776 ---- i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:3*) + echo i386-pc-interix3 + 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 *************** *** 770,785 **** 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:*:*) ! case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in ! big) echo mips-unknown-linux-gnu && exit 0 ;; ! little) echo mipsel-unknown-linux-gnu && exit 0 ;; ! esac ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu --- 796,825 ---- echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #undef CPU ! #undef mips ! #undef mipsel ! #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ! CPU=mipsel ! #else ! #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ! CPU=mips ! #else ! CPU= ! #endif ! #endif ! EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ! rm -f $dummy.c && rmdir $tmpdir ! test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu *************** *** 828,834 **** # 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_targets=`cd /; ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// --- 868,875 ---- # 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. ! # Set LC_ALL=C to ensure ld outputs messages in English. ! ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// *************** *** 840,846 **** ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; --- 881,887 ---- ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; *************** *** 852,883 **** esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build ! cat >$dummy.c < ! #ifdef __cplusplus ! #include /* for printf() prototype */ ! int main (int argc, char *argv[]) { ! #else ! int main (argc, argv) int argc; char *argv[]; { ! #endif ! #ifdef __ELF__ ! # ifdef __GLIBC__ ! # if __GLIBC__ >= 2 ! printf ("%s-pc-linux-gnu\n", argv[1]); ! # else ! printf ("%s-pc-linux-gnulibc1\n", argv[1]); ! # endif ! # else ! printf ("%s-pc-linux-gnulibc1\n", argv[1]); ! # endif ! #else ! printf ("%s-pc-linux-gnuaout\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 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) --- 893,921 ---- esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #include ! #ifdef __ELF__ ! # ifdef __GLIBC__ ! # if __GLIBC__ >= 2 ! LIBC=gnu ! # else ! LIBC=gnulibc1 ! # endif ! # else ! LIBC=gnulibc1 ! # endif ! #else ! #ifdef __INTEL_COMPILER ! LIBC=gnu ! #else ! LIBC=gnuaout ! #endif ! #endif EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ! rm -f $dummy.c && rmdir $tmpdir ! test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) *************** *** 915,927 **** UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then ! UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` ! (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 ! (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 ! (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 ! (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else --- 953,965 ---- UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then ! UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` ! (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 ! (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 ! (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 ! (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else *************** *** 954,962 **** # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; ! 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` --- 992,1003 ---- # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; ! 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` *************** *** 1047,1052 **** --- 1088,1096 ---- SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *************** *** 1057,1071 **** echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) ! if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi ! echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; ! NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) --- 1101,1117 ---- echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) ! UNAME_PROCESSOR=`uname -p` ! if test "$UNAME_PROCESSOR" = "x86"; then ! UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi ! echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; ! NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) *************** *** 1237,1244 **** } 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. --- 1283,1290 ---- } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. Index: libtool/config.sub diff -c libtool/config.sub:1.8.2.2 libtool/config.sub:1.8.2.3 *** libtool/config.sub:1.8.2.2 Mon Sep 10 23:33:37 2001 --- libtool/config.sub Tue Oct 22 22:54:36 2002 *************** *** 1,9 **** #! /bin/sh # Configuration validation subroutine script. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ! # Free Software Foundation, Inc. ! timestamp='2001-09-07' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software --- 1,9 ---- #! /bin/sh # Configuration validation subroutine script. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! timestamp='2002-09-05' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software *************** *** 29,35 **** # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. ! # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. --- 29,36 ---- # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. ! # Please send patches to . Submit a context ! # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. *************** *** 117,123 **** # 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* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; --- 118,124 ---- # 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* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *************** *** 226,257 **** 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ! | c4x | clipper \ ! | d10v | d30v | dsp16xx \ ! | fr30 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | m32r | m68000 | m68k | m88k | mcore \ ! | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ ! | mips64vr4100 | mips64vr4100el | mips64vr4300 \ ! | mips64vr4300el | mips64vr5000 | mips64vr5000el \ ! | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ ! | mipsisa32 \ | mn10200 | mn10300 \ | ns16k | ns32k \ ! | openrisc \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ ! | s390 | s390x \ ! | sh | sh[34] | sh[34]eb | shbe | shle \ ! | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ ! | stormy16 | strongarm \ | tahoe | thumb | tic80 | tron \ ! | v850 \ | we32k \ ! | x86 | xscale \ | z8k) basic_machine=$basic_machine-unknown ;; --- 227,268 ---- 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ! | clipper \ ! | d10v | d30v | dlx | dsp16xx \ ! | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ + | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ ! | mips | mipsbe | mipseb | mipsel | mipsle \ ! | mips16 \ ! | mips64 | mips64el \ ! | mips64vr | mips64vrel \ ! | mips64orion | mips64orionel \ ! | mips64vr4100 | mips64vr4100el \ ! | mips64vr4300 | mips64vr4300el \ ! | mips64vr5000 | mips64vr5000el \ ! | mipsisa32 | mipsisa32el \ ! | mipsisa64 | mipsisa64el \ ! | mipsisa64sb1 | mipsisa64sb1el \ ! | mipsisa64sr71k | mipsisa64sr71kel \ ! | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ns16k | ns32k \ ! | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ ! | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ ! | sh64 | sh64le \ ! | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ ! | strongarm \ | tahoe | thumb | tic80 | tron \ ! | v850 | v850e \ | we32k \ ! | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; *************** *** 278,315 **** 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ ! | alphapca5[67]-* | arc-* \ ! | arm-* | armbe-* | armle-* | armv*-* \ | bs2000-* \ ! | c[123]* | c30-* | [cjt]90-* | c54x-* \ ! | clipper-* | cray2-* | cydra-* \ ! | d10v-* | d30v-* \ | elxsi-* \ ! | f30[01]-* | f700-* | fr30-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | m32r-* \ ! | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ ! | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ ! | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ ! | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ ! | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ ! | s390-* | s390x-* \ ! | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ ! | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ ! | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ ! | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ ! | v850-* | vax-* \ | we32k-* \ ! | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ | ymp-* \ | z8k-*) ;; --- 289,339 ---- 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ ! | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ ! | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ ! | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ ! | avr-* \ | bs2000-* \ ! | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ ! | clipper-* | cydra-* \ ! | d10v-* | d30v-* | dlx-* \ | elxsi-* \ ! | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ | m32r-* \ ! | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ ! | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ ! | mips16-* \ ! | mips64-* | mips64el-* \ ! | mips64vr-* | mips64vrel-* \ ! | mips64orion-* | mips64orionel-* \ ! | mips64vr4100-* | mips64vr4100el-* \ ! | mips64vr4300-* | mips64vr4300el-* \ ! | mips64vr5000-* | mips64vr5000el-* \ ! | mipsisa32-* | mipsisa32el-* \ ! | mipsisa64-* | mipsisa64el-* \ ! | mipsisa64sb1-* | mipsisa64sb1el-* \ ! | mipsisa64sr71k-* | mipsisa64sr71kel-* \ ! | mipstx39 | mipstx39el \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ ! | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ ! | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ ! | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ ! | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ! | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ ! | v850-* | v850e-* | vax-* \ | we32k-* \ ! | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ ! | xtensa-* \ | ymp-* \ | z8k-*) ;; *************** *** 374,379 **** --- 398,407 ---- basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd *************** *** 394,409 **** basic_machine=c38-convex os=-bsd ;; ! cray | ymp) ! basic_machine=ymp-cray ! os=-unicos ! ;; ! cray2) ! basic_machine=cray2-cray ! os=-unicos ! ;; ! [cjt]90) ! basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) --- 422,429 ---- basic_machine=c38-convex os=-bsd ;; ! cray | j90) ! basic_machine=j90-cray os=-unicos ;; crds | unos) *************** *** 418,423 **** --- 438,451 ---- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola *************** *** 598,611 **** basic_machine=m68k-atari os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; --- 626,631 ---- *************** *** 620,625 **** --- 640,649 ---- basic_machine=m68k-rom68k os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) basic_machine=i386-pc os=-msdos *************** *** 699,704 **** --- 723,732 ---- basic_machine=hppa1.1-oki os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose *************** *** 721,739 **** pbb) basic_machine=m68k-tti ;; ! 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-*) --- 749,767 ---- pbb) basic_machine=m68k-tti ;; ! pc532 | pc532-*) basic_machine=ns32k-pc532 ;; ! pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; ! pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; ! pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) *************** *** 748,769 **** power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ! ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ! ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ! ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ! ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; --- 776,797 ---- power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ! ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ! ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ! ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ! ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; *************** *** 784,793 **** --- 812,833 ---- rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; sequent) basic_machine=i386-sequent ;; *************** *** 795,801 **** basic_machine=sh-hitachi os=-hms ;; ! sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks ;; --- 835,841 ---- basic_machine=sh-hitachi os=-hms ;; ! sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; *************** *** 861,870 **** basic_machine=i386-sequent os=-dynix ;; t3e) ! basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff --- 901,922 ---- basic_machine=i386-sequent os=-dynix ;; + t3d) + basic_machine=alpha-cray + os=-unicos + ;; t3e) ! basic_machine=alphaev5-cray ! os=-unicos ! ;; ! t90) ! basic_machine=t90-cray os=-unicos ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff *************** *** 875,880 **** --- 927,936 ---- tx39el) basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; *************** *** 899,906 **** os=-vms ;; vpp*|vx|vx-*) ! basic_machine=f301-fujitsu ! ;; vxworks960) basic_machine=i960-wrs os=-vxworks --- 955,962 ---- os=-vms ;; vpp*|vx|vx-*) ! basic_machine=f301-fujitsu ! ;; vxworks960) basic_machine=i960-wrs os=-vxworks *************** *** 925,937 **** basic_machine=i386-pc os=-windows32-msvcrt ;; ! xmp) ! basic_machine=xmp-cray ! os=-unicos ! ;; ! xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim --- 981,993 ---- basic_machine=i386-pc os=-windows32-msvcrt ;; ! xps | xps100) basic_machine=xps100-honeywell ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim *************** *** 952,964 **** op60c) basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm ;; --- 1008,1013 ---- *************** *** 978,990 **** we32k) basic_machine=we32k-att ;; ! sh3 | sh4 | sh3eb | sh4eb) basic_machine=sh-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; ! cydra) basic_machine=cydra-cydrome ;; orion) --- 1027,1042 ---- we32k) basic_machine=we32k-att ;; ! sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; + sh64) + basic_machine=sh64-unknown + ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; ! cydra) basic_machine=cydra-cydrome ;; orion) *************** *** 999,1008 **** pmac | pmac-mpw) basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; --- 1051,1056 ---- *************** *** 1068,1074 **** | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ! | -os2* | -vos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) --- 1116,1123 ---- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ! | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ ! | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) *************** *** 1120,1133 **** -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) ! os=-nextstep2 ;; -nsk*) os=-nsk --- 1169,1188 ---- -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) ! os=-nextstep2 ;; -nsk*) os=-nsk *************** *** 1166,1173 **** -xenix) os=-xenix ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ! os=-mint ;; -none) ;; --- 1221,1228 ---- -xenix) os=-xenix ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ! os=-mint ;; -none) ;; *************** *** 1200,1209 **** arm*-semi) os=-aout ;; pdp10-*) os=-tops20 ;; ! pdp11-*) os=-none ;; *-dec | vax-*) --- 1255,1265 ---- arm*-semi) os=-aout ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; ! pdp11-*) os=-none ;; *-dec | vax-*) *************** *** 1230,1235 **** --- 1286,1294 ---- mips*-*) os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; *************** *** 1293,1311 **** *-next) os=-nextstep3 ;; ! *-gould) os=-sysv ;; ! *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; ! *-sgi) os=-irix ;; ! *-siemens) os=-sysv4 ;; *-masscomp) --- 1352,1370 ---- *-next) os=-nextstep3 ;; ! *-gould) os=-sysv ;; ! *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; ! *-sgi) os=-irix ;; ! *-siemens) os=-sysv4 ;; *-masscomp) *************** *** 1377,1383 **** -ptx*) vendor=sequent ;; ! -vxsim* | -vxworks*) vendor=wrs ;; -aux*) --- 1436,1442 ---- -ptx*) vendor=sequent ;; ! -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) Index: libtool/configure.in diff -c libtool/configure.in:1.52.2.4 libtool/configure.in:1.52.2.6 *** libtool/configure.in:1.52.2.4 Mon Sep 10 23:33:37 2001 --- libtool/configure.in Tue Oct 22 22:54:37 2002 *************** *** 2,8 **** AC_INIT(ltmain.in) ! AM_INIT_AUTOMAKE(libtool, 1.4.2) # 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 --- 2,8 ---- AC_INIT(ltmain.in) ! AM_INIT_AUTOMAKE(libtool, 1.4.3) # This is a sanity check so we can see which version is used in bug reports. # It is assumed that we only want to see the date extension for cvs libtool Index: libtool/libtool.m4 diff -c libtool/libtool.m4:1.166.2.27 libtool/libtool.m4:1.166.2.49 *** libtool/libtool.m4:1.166.2.27 Mon Sep 10 23:18:52 2001 --- libtool/libtool.m4 Tue Oct 22 20:55:33 2002 *************** *** 49,54 **** --- 49,56 ---- AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl + AC_REQUIRE([LT_AC_PROG_SED])dnl + AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl AC_REQUIRE([AC_OBJEXT])dnl *************** *** 216,224 **** lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; ! irix*) symcode='[[BCDEGRST]]' ;; solaris* | sysv5*) symcode='[[BDT]]' ;; --- 218,229 ---- lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; ! irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; + osf*) + symcode='[[BCDEGQRST]]' + ;; solaris* | sysv5*) symcode='[[BDT]]' ;; *************** *** 315,321 **** 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" --- 320,326 ---- save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" ! if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS="$save_LIBS" *************** *** 865,871 **** # 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*) --- 870,876 ---- # like `-m68040'. lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; ! beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; darwin* | rhapsody*) *************** *** 908,914 **** 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. --- 913,919 ---- lt_cv_prog_cc_pic='+Z' ;; ! irix5* | irix6* | nonstopux*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' # PIC (with -KPIC) is the default. *************** *** 952,962 **** 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*) --- 957,963 ---- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ! lt_cv_prog_cc_wl='-Wl,' ;; uts4*) *************** *** 1341,1347 **** # 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; --- 1342,1348 ---- # 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`sed 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; *************** *** 1350,1355 **** --- 1351,1357 ---- set dummy \$symbol; case \[$]# in 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; + 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; esac; _lt_hint=`expr 1 + \$_lt_hint`; *************** *** 1462,1471 **** # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do ! if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break ! fi done esac --- 1464,1475 ---- # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do ! case $ld_flag in ! *-brtl*) aix_use_runtimelinking=yes break ! ;; ! esac done esac *************** *** 1579,1586 **** esac # 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='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' hardcode_direct=yes --- 1583,1591 ---- esac # 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. Also zsh mangles ! # `"' quotes if we put them in here... so don't! ! archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' hardcode_direct=yes *************** *** 1632,1644 **** 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 ;; --- 1637,1650 ---- export_dynamic_flag_spec='${wl}-E' ;; ! irix5* | irix6* | nonstopux*) 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' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 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' + hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: link_all_deplibs=yes ;; *************** *** 1666,1672 **** hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else --- 1672,1678 ---- hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else *************** *** 1676,1682 **** hardcode_libdir_flag_spec='-R$libdir' ;; *) ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac --- 1682,1688 ---- hardcode_libdir_flag_spec='-R$libdir' ;; *) ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac *************** *** 1788,1800 **** ;; sysv4) ! if test "x$host_vendor" = xsno; then ! archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' ! 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 ;; --- 1794,1816 ---- ;; sysv4) ! case $host_vendor in ! sni) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=yes # is this really true??? ! ;; ! siemens) ! ## LD is ld it makes a PLAMLIB ! ## CC just makes a GrossModule. ! archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! reload_cmds='$CC -r -o $output$reload_objs' ! hardcode_direct=no ! ;; ! motorola) ! 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 ! ;; ! esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; *************** *** 1947,1952 **** --- 1963,1971 ---- aix4* | aix5*) version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' *************** *** 1985,1990 **** --- 2004,2010 ---- fi shlibpath_var=LIBPATH fi + hardcode_into_libs=yes ;; amigaos*) *************** *** 2032,2038 **** ;; 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' --- 2052,2058 ---- ;; 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" -e "s,=/,/,g"` ;; yes,pw32*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' *************** *** 2115,2128 **** 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= ;; *) --- 2135,2151 ---- postinstall_cmds='chmod 555 $lib' ;; ! irix5* | irix6* | nonstopux*) ! case $host_os in ! nonstopux*) version_type=nonstopux ;; ! *) version_type=irix ;; ! esac 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* | nonstopux*) libsuff= shlibsuff= ;; *) *************** *** 2226,2236 **** 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*) --- 2249,2260 ---- osf3* | osf4* | osf5*) version_type=osf need_version=no ! soname_spec='${libname}${release}.so$major' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $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" + hardcode_into_libs=yes ;; sco3.2v5*) *************** *** 2273,2278 **** --- 2297,2308 ---- case $host_vendor in sni) shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no ;; motorola) need_lib_prefix=no *************** *** 2447,2453 **** # 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 \ --- 2477,2483 ---- # 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 SED \ 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 \ *************** *** 2509,2516 **** # 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. --- 2539,2549 ---- # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # A sed that does not truncate output. + SED=$lt_SED + # 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. *************** *** 3273,3279 **** # 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= --- 3306,3312 ---- # 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 dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= *************** *** 3348,3356 **** 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" ;; --- 3381,3389 ---- lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; ! irix5* | irix6* | nonstopux*) case $host_os in ! irix5* | nonstopux*) # 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" ;; *************** *** 3372,3378 **** # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | hppa* | 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 --- 3405,3411 ---- # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM *************** *** 3443,3448 **** --- 3476,3484 ---- 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 ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; esac ;; esac *************** *** 3508,3519 **** ]) # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl convenience library and INCLTDL to the include flags for # the libltdl header and adds --enable-ltdl-convenience to the ! # configure arguments. Note that LIBLTDL and INCLTDL are not # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed ! # with '${top_builddir}/' and INCLTDL will be prefixed with # '${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. --- 3544,3555 ---- ]) # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl convenience library and LTDLINCL to the include flags for # the libltdl header and adds --enable-ltdl-convenience to the ! # configure arguments. Note that LIBLTDL and LTDLINCL are not # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed ! # with '${top_builddir}/' and LTDLINCL will be prefixed with # '${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. *************** *** 3525,3540 **** ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la ! INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl installable library and INCLTDL to the include flags for # the libltdl header and adds --enable-ltdl-install to the configure ! # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will ! # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed # with '${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. --- 3561,3578 ---- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la ! LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ! # For backwards non-gettext consistent compatibility... ! INCLTDL="$LTDLINCL" ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl installable library and LTDLINCL to the include flags for # the libltdl header and adds --enable-ltdl-install to the configure ! # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will ! # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed # with '${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. *************** *** 3552,3563 **** if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la ! INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" ! INCLTDL= fi ]) # old names --- 3590,3603 ---- if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la ! LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" ! LTDLINCL= fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" ]) # old names *************** *** 3571,3573 **** --- 3611,3704 ---- # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) + + ############################################################ + # NOTE: This macro has been submitted for inclusion into # + # GNU Autoconf as AC_PROG_SED. When it is available in # + # a released version of Autoconf we should remove this # + # macro and use it instead. # + ############################################################ + # LT_AC_PROG_SED + # -------------- + # Check for a fully-functional sed program, that truncates + # as few characters as possible. Prefer GNU sed if found. + AC_DEFUN([LT_AC_PROG_SED], + [AC_MSG_CHECKING([for a sed that does not truncate output]) + AC_CACHE_VAL(lt_cv_path_SED, + [# Loop through the user's path and test for sed and gsed. + # Then use that list of sed's as ones to test for truncation. + as_executable_p="test -f" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" + fi + done + done + done + + # Create a temporary directory, and hook for its removal unless debugging. + $debug || + { + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 + } + + # Create a (secure) tmp directory for tmp files. + : ${TMPDIR=/tmp} + { + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { + tmp=$TMPDIR/sed$$-$RANDOM + (umask 077 && mkdir $tmp) + } || + { + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } + } + _max=0 + _count=0 + # Add /usr/xpg4/bin/sed as it is typically found on Solaris + # along with /bin/sed that truncates output. + for _sed in $_sed_list /usr/xpg4/bin/sed; do + test ! -f ${_sed} && break + cat /dev/null > "$tmp/sed.in" + _count=0 + echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" + # Check for GNU sed and select it if it is found. + if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then + lt_cv_path_SED=${_sed} + break + fi + while true; do + cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" + mv "$tmp/sed.tmp" "$tmp/sed.in" + cp "$tmp/sed.in" "$tmp/sed.nl" + echo >>"$tmp/sed.nl" + ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break + cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break + # 40000 chars as input seems more than enough + test $_count -gt 10 && break + _count=`expr $_count + 1` + if test $_count -gt $_max; then + _max=$_count + lt_cv_path_SED=$_sed + fi + done + done + rm -rf "$tmp" + ]) + if test "X$SED" != "X"; then + lt_cv_path_SED=$SED + else + SED=$lt_cv_path_SED + fi + AC_MSG_RESULT([$SED]) + ]) Index: libtool/libtoolize.in diff -c libtool/libtoolize.in:1.15 libtool/libtoolize.in:1.15.2.2 *** libtool/libtoolize.in:1.15 Fri Mar 30 17:47:23 2001 --- libtool/libtoolize.in Mon Jan 14 14:04:40 2002 *************** *** 154,160 **** files='config.guess config.sub ltmain.sh' auxdir=. ! auxdirline=`egrep '^AC_CONFIG_AUX_DIR' configure.in 2>/dev/null` if test -n "$auxdirline"; then # Handle explicit AC_CONFIG_AUX_DIR settings. auxdir=`echo "$auxdirline" | sed 's/^AC_CONFIG_AUX_DIR(\([^)]*\)).*$/\1/'` --- 154,160 ---- files='config.guess config.sub ltmain.sh' auxdir=. ! auxdirline=`egrep '^AC_CONFIG_AUX_DIR' $configure_ac 2>/dev/null` if test -n "$auxdirline"; then # Handle explicit AC_CONFIG_AUX_DIR settings. auxdir=`echo "$auxdirline" | sed 's/^AC_CONFIG_AUX_DIR(\([^)]*\)).*$/\1/'` *************** *** 204,210 **** updatemsg="add the contents of \`$libtool_m4' to \`aclocal.m4'" fi ! if egrep '^AC_DEFUN\(A[MC]_PROG_LIBTOOL' aclocal.m4 >/dev/null 2>&1; then # Check the version number on libtool.m4 and the one used in aclocal.m4. instserial=`grep '^# serial ' $libtool_m4 | grep 'A[MC]_PROG_LIBTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` --- 204,210 ---- updatemsg="add the contents of \`$libtool_m4' to \`aclocal.m4'" fi ! if egrep '^AC_DEFUN\(\[A[MC]_PROG_LIBTOOL' aclocal.m4 >/dev/null 2>&1; then # Check the version number on libtool.m4 and the one used in aclocal.m4. instserial=`grep '^# serial ' $libtool_m4 | grep 'A[MC]_PROG_LIBTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` Index: libtool/ltdl.m4 diff -c libtool/ltdl.m4:1.21.2.4 libtool/ltdl.m4:1.21.2.10 *** libtool/ltdl.m4:1.21.2.4 Mon Sep 10 23:18:52 2001 --- libtool/ltdl.m4 Tue Oct 22 20:34:55 2002 *************** *** 20,32 **** ## 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 # ----------- # Perform all the checks necessary for compilation of the ltdl objects # -- including compiler checks and header checks. ! AC_DEFUN(AC_LIB_LTDL, [AC_PREREQ(2.13) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_C_CONST]) --- 20,80 ---- ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. ! # serial 5 AC_LIB_LTDL ! ! # AC_WITH_LTDL ! # ------------ ! # Clients of libltdl can use this macro to allow the installer to ! # choose between a shipped copy of the ltdl sources or a preinstalled ! # version of the library. ! AC_DEFUN([AC_WITH_LTDL], ! [AC_REQUIRE([AC_LIB_LTDL]) ! AC_SUBST([LIBLTDL]) ! AC_SUBST([INCLTDL]) ! ! # Unless the user asks us to check, assume no installed ltdl exists. ! use_installed_libltdl=no ! ! AC_ARG_WITH([included_ltdl], ! [ --with-included-ltdl use the GNU ltdl sources included here]) ! ! if test "x$with_included_ltdl" != xyes; then ! # We are not being forced to use the included libltdl sources, so ! # decide whether there is a useful installed version we can use. ! AC_CHECK_HEADER([ltdl.h], ! [AC_CHECK_LIB([ltdl], [lt_dlcaller_register], ! [with_included_ltdl=no], ! [with_included_ltdl=yes]) ! ]) ! fi ! ! if test "x$enable_ltdl_install" != xyes; then ! # If the user did not specify an installable libltdl, then default ! # to a convenience lib. ! AC_LIBLTDL_CONVENIENCE ! fi ! ! if test "x$with_included_ltdl" = xno; then ! # If the included ltdl is not to be used. then Use the ! # preinstalled libltdl we found. ! AC_DEFINE([HAVE_LTDL], 1, ! [Define this if a modern libltdl is already installed]) ! LIBLTDL=-lltdl ! fi ! ! # Report our decision... ! AC_MSG_CHECKING([whether to use included libltdl]) ! AC_MSG_RESULT([$with_included_ltdl]) ! ! AC_CONFIG_SUBDIRS([libltdl]) ! ])# AC_WITH_LTDL ! # AC_LIB_LTDL # ----------- # Perform all the checks necessary for compilation of the ltdl objects # -- including compiler checks and header checks. ! AC_DEFUN([AC_LIB_LTDL], [AC_PREREQ(2.13) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_C_CONST]) *************** *** 59,65 **** # AC_LTDL_ENABLE_INSTALL # ---------------------- ! AC_DEFUN(AC_LTDL_ENABLE_INSTALL, [AC_ARG_ENABLE(ltdl-install, [ --enable-ltdl-install install libltdl]) --- 107,113 ---- # AC_LTDL_ENABLE_INSTALL # ---------------------- ! AC_DEFUN([AC_LTDL_ENABLE_INSTALL], [AC_ARG_ENABLE(ltdl-install, [ --enable-ltdl-install install libltdl]) *************** *** 69,81 **** # 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 ;; --- 117,132 ---- # 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 + hpux10*|hpux11*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; linux*) libltdl_cv_sys_dlopen_deplibs=yes ;; *************** *** 98,104 **** # 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, --- 149,155 ---- # 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, *************** *** 118,124 **** # 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"]) --- 169,175 ---- # 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"]) *************** *** 130,136 **** # 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"]) --- 181,187 ---- # 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"]) *************** *** 154,160 **** # 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 --- 205,211 ---- # 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 *************** *** 176,182 **** # 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 --- 227,233 ---- # 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 *************** *** 194,220 **** # 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" --- 245,287 ---- # AC_LTDL_DLLIB # ------------- ! AC_DEFUN([AC_LTDL_DLLIB], [LIBADD_DL= AC_SUBST(LIBADD_DL) + 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([dl], [dlopen], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + LIBADD_DL="-ldl"], + [AC_TRY_LINK([#if HAVE_DLFCN_H + # include + #endif + ], + [dlopen(0, 0);], + [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_LIB([dld], [dld_link], + [AC_DEFINE([HAVE_DLD], [1], + [Define if you have the GNU dld library.]) + LIBADD_DL="$LIBADD_DL -ldld" + ]) + ]) + ]) + ]) + ]) + ]) + if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then LIBS_SAVE="$LIBS" LIBS="$LIBS $LIBADD_DL" *************** *** 225,231 **** # 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]) --- 292,298 ---- # 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]) *************** *** 264,270 **** # 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 || --- 331,337 ---- # 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 || *************** *** 284,290 **** 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 --- 351,357 ---- if test x"$libltdl_cv_need_uscore" = xyes; then AC_DEFINE(NEED_USCORE, 1, ! [Define if dlsym() requires a leading underscore in symbol names. ]) fi ])# AC_LTDL_DLSYM_USCORE Index: libtool/ltmain.in diff -c libtool/ltmain.in:1.259.2.9 libtool/ltmain.in:1.259.2.26 *** libtool/ltmain.in:1.259.2.9 Mon Sep 10 20:05:33 2001 --- libtool/ltmain.in Fri Oct 11 12:06:07 2002 *************** *** 49,55 **** fi # The name of this program. ! progname=`$echo "$0" | sed 's%^.*/%%'` modename="$progname" # Constants. --- 49,55 ---- fi # The name of this program. ! progname=`$echo "$0" | ${SED} 's%^.*/%%'` modename="$progname" # Constants. *************** *** 67,76 **** # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' ! SP2NL='tr \040 \012' ! NL2SP='tr \015\012 \040\040' # NLS nuisances. # Only set LANG and LC_ALL to C if already set. --- 67,85 ---- # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' ! # test EBCDIC or ASCII ! case `echo A|od -x` in ! *[Cc]1*) # EBCDIC based system ! SP2NL="tr '\100' '\n'" ! NL2SP="tr '\r\n' '\100\100'" ! ;; ! *) # Assume ASCII based system ! SP2NL="tr '\040' '\012'" ! NL2SP="tr '\015\012' '\040\040'" ! ;; ! esac # NLS nuisances. # Only set LANG and LC_ALL to C if already set. *************** *** 144,150 **** ;; --config) ! sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; --- 153,159 ---- ;; --config) ! ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; *************** *** 177,182 **** --- 186,193 ---- --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; + --preserve-dup-deps) duplicate_deps="yes" ;; + --quiet | --silent) show=: ;; *************** *** 215,221 **** # Infer the operation mode. if test -z "$mode"; then case $nonopt in ! *cc | *++ | gcc* | *-gcc*) mode=link for arg do --- 226,232 ---- # Infer the operation mode. if test -z "$mode"; then case $nonopt in ! *cc | *++ | gcc* | *-gcc* | xlc*) mode=link for arg do *************** *** 467,473 **** 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 --- 478,484 ---- 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 *************** *** 992,998 **** # 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" ;; --- 1003,1009 ---- # 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* | no/*-*-nonstopux*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; *************** *** 1043,1056 **** # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; ! *-*-openbsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in ! *-*-openbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; --- 1054,1067 ---- # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; ! *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in ! *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue ;; *************** *** 1330,1338 **** # 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= --- 1341,1351 ---- # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do ! if test "X$duplicate_deps" = "Xyes" ; then ! case "$libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac ! fi libs="$libs $deplib" done deplibs= *************** *** 1461,1470 **** 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" --- 1474,1485 ---- lib) if test "$deplibs_check_method" != pass_all; then echo ! echo "*** Warning: Trying to link with static lib archive $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" ! echo "*** because the file extensions .$libext of this argument makes me believe" ! echo "*** that it is just a static archive that I should not used here." else echo echo "*** Warning: Linking the shared library $output against the" *************** *** 1508,1514 **** 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 --- 1523,1529 ---- 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 *************** *** 1555,1563 **** 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 --- 1570,1580 ---- tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" ! if test "X$duplicate_deps" = "Xyes" ; then ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac ! fi tmp_libs="$tmp_libs $deplib" done elif test $linkmode != prog && test $linkmode != lib; then *************** *** 1680,1688 **** # 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 --- 1697,1707 ---- # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi ! if test "X$duplicate_deps" = "Xyes" ; then ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac ! fi tmp_libs="$tmp_libs $deplib" done # for deplib continue *************** *** 1766,1773 **** # 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 : --- 1785,1792 ---- # 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 : *************** *** 1926,1938 **** # 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" --- 1945,1958 ---- # 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 system can not link to static lib archive $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 "*** But as you try to build a module library, libtool will still create " ! echo "*** a static module, that should work as long as the dlopening application" ! echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" *************** *** 1981,1989 **** 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 --- 2001,2011 ---- tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" ! if test "X$duplicate_deps" = "Xyes" ; then ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac ! fi tmp_libs="$tmp_libs $deplib" done *************** *** 2009,2015 **** 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 --- 2031,2037 ---- 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 *************** *** 2273,2288 **** versuffix=".$current"; ;; ! irix) major=`expr $current - $age + 1` ! verstring="sgi$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test $loop != 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` ! verstring="sgi$major.$iface:$verstring" done # Before this point, $major must not contain `.'. --- 2295,2315 ---- versuffix=".$current"; ;; ! irix | nonstopux) major=`expr $current - $age + 1` ! ! case $version_type in ! nonstopux) verstring_prefix=nonstopux ;; ! *) verstring_prefix=sgi ;; ! esac ! verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test $loop != 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` ! verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. *************** *** 2296,2302 **** ;; osf) ! major=`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" --- 2323,2329 ---- ;; osf) ! major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" *************** *** 2388,2396 **** # 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 --- 2415,2423 ---- # 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 *************** *** 2441,2447 **** *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; ! *-*-openbsd*) # Do not include libc due to us having libc/libc_r. ;; *) --- 2468,2474 ---- *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; ! *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. ;; *) *************** *** 2502,2519 **** else droppeddeps=yes echo ! echo "*** Warning: This library needs some functionality provided by $i." 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 newdeplibs="$newdeplibs $i" fi done else ! # Error occured in the first compile. Let's try to salvage the situation: ! # Compile a seperate program for each library. for i in $deplibs; do name="`expr $i : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. --- 2529,2548 ---- else droppeddeps=yes echo ! echo "*** Warning: dynamic linker does not accept needed library $i." 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 I believe you do not have" ! echo "*** because a test_compile did reveal that the linker did not use it for" ! echo "*** its dynamic dependency list that programs get resolved with at runtime." fi else newdeplibs="$newdeplibs $i" fi done else ! # Error occured in the first compile. Let's try to salvage ! # the situation: Compile a separate program for each library. for i in $deplibs; do name="`expr $i : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. *************** *** 2532,2541 **** else droppeddeps=yes echo ! echo "*** Warning: This library needs some functionality provided by $i." 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 droppeddeps=yes --- 2561,2572 ---- else droppeddeps=yes echo ! echo "*** Warning: dynamic linker does not accept needed library $i." 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" ! echo "*** because a test_compile did reveal that the linker did not use this one" ! echo "*** as a dynamic dependency that programs can get resolved with at runtime." fi else droppeddeps=yes *************** *** 2574,2587 **** # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do ! potliblink=`ls -ld $potlib | sed 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ ! | sed 10q \ | egrep "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" --- 2605,2618 ---- # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do ! potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ ! | ${SED} 10q \ | egrep "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" *************** *** 2592,2601 **** 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. --- 2623,2639 ---- if test -n "$a_deplib" ; then droppeddeps=yes echo ! echo "*** Warning: linker path does not have real file for library $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" ! echo "*** because I did check the linker path looking for a file starting" ! if test -z "$potlib" ; then ! echo "*** with $libname but no candidates were found. (...for file magic test)" ! else ! echo "*** with $libname and none of the candidates passed a file format test" ! echo "*** using a file magic. Last file checked: $potlib" ! fi fi else # Add a -L argument. *************** *** 2614,2621 **** 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="" --- 2652,2660 ---- 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 + potlib="$potent_lib" # see symlink-check below in file_magic test if eval echo \"$potent_lib\" 2>/dev/null \ ! | ${SED} 10q \ | egrep "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" *************** *** 2626,2635 **** 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. --- 2665,2681 ---- if test -n "$a_deplib" ; then droppeddeps=yes echo ! echo "*** Warning: linker path does not have real file for library $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" ! echo "*** because I did check the linker path looking for a file starting" ! if test -z "$potlib" ; then ! echo "*** with $libname but no candidates were found. (...for regex pattern test)" ! else ! echo "*** with $libname and none of the candidates passed a file format test" ! echo "*** using a regex pattern. Last file checked: $potlib" ! fi fi else # Add a -L argument. *************** *** 2894,2900 **** --- 2940,2957 ---- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval cmds=\"$archive_expsym_cmds\" else + save_deplibs="$deplibs" + for conv in $convenience; do + tmp_deplibs= + for test_deplib in $deplibs; do + if test "$test_deplib" != "$conv"; then + tmp_deplibs="$tmp_deplibs $test_deplib" + fi + done + deplibs="$tmp_deplibs" + done eval cmds=\"$archive_cmds\" + deplibs="$save_deplibs" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do *************** *** 3093,3099 **** 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 --- 3150,3156 ---- 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 *************** *** 3115,3120 **** --- 3172,3184 ---- # 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 /'` + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac ;; esac *************** *** 3281,3289 **** if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols ! $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else ! $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi --- 3345,3353 ---- if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols ! $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else ! $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi *************** *** 3291,3297 **** for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" ! name=`echo "$arg" | sed -e 's%^.*/%%'` $run eval 'echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done --- 3355,3361 ---- for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" ! name=`echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval 'echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done *************** *** 3306,3312 **** fi # Try sorting and uniquifying the output. ! if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S --- 3370,3382 ---- fi # Try sorting and uniquifying the output. ! if grep -v "^: " < "$nlist" | ! if sort -k 3 /dev/null 2>&1; then ! sort -k 3 ! else ! sort +2 ! fi | ! uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S *************** *** 3528,3534 **** 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 --- 3598,3604 ---- 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 *************** *** 3548,3554 **** # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in ! *.exe) output=`echo $output|sed 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in --- 3618,3624 ---- # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in ! *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *************** *** 3572,3578 **** # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed='sed -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout --- 3642,3648 ---- # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout *************** *** 3610,3616 **** test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. ! file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` --- 3680,3686 ---- test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. ! file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` *************** *** 3623,3629 **** fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` ! file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` done # Try to get the absolute directory name. --- 3693,3699 ---- fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` ! file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. *************** *** 3637,3643 **** progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ ! { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" --- 3707,3713 ---- progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ ! { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" *************** *** 3683,3689 **** $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var ! # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var --- 3753,3759 ---- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var ! # The second colon is a workaround for a bug in BeOS R4 ${SED} $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var *************** *** 3858,3864 **** 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. --- 3928,3934 ---- 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. *************** *** 3875,3881 **** 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 --- 3945,3951 ---- 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 *************** *** 3889,3895 **** 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 --- 3959,3965 ---- 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 *************** *** 3900,3906 **** 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 --- 3970,3976 ---- 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 *************** *** 4124,4130 **** *.la) # Check to see that this really is a libtool archive. ! if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 --- 4194,4200 ---- *.la) # Check to see that this really is a libtool archive. ! if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 *************** *** 4273,4291 **** fi # Do a test to see if this is really a libtool program. ! if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 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 --- 4343,4369 ---- fi # Do a test to see if this is really a libtool program. ! case $host in ! *cygwin*|*mingw*) ! wrapper=`echo $file | ${SED} -e 's,.exe$,,'` ! ;; ! *) ! wrapper=$file ! ;; ! esac ! if (${SED} -e '4q' $wrapper | 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 ! */* | *\\*) . $wrapper ;; ! *) . ./$wrapper ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then ! $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit 1 fi *************** *** 4310,4317 **** relink_command= # If there is no directory component, then add one. case $file in ! */* | *\\*) . $file ;; ! *) . ./$file ;; esac outputname= --- 4388,4395 ---- relink_command= # If there is no directory component, then add one. case $file in ! */* | *\\*) . $wrapper ;; ! *) . ./$wrapper ;; esac outputname= *************** *** 4359,4365 **** destfile=$destfile.exe ;; *:*.exe) ! destfile=`echo $destfile | sed -e 's,.exe$,,'` ;; esac ;; --- 4437,4443 ---- destfile=$destfile.exe ;; *:*.exe) ! destfile=`echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; *************** *** 4507,4513 **** case $file in *.la) # Check to see that this really is a libtool archive. ! if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 --- 4585,4591 ---- case $file in *.la) # Check to see that this really is a libtool archive. ! if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 *************** *** 4578,4584 **** -*) ;; *) # 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 ;; --- 4656,4662 ---- -*) ;; *) # 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 ;; *************** *** 4610,4616 **** fi # Now prepare to actually exec the command. ! exec_cmd='"$cmd"$args' else # Display what would be done. if test -n "$shlibpath_var"; then --- 4688,4694 ---- fi # Now prepare to actually exec the command. ! exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then *************** *** 4687,4693 **** case $name in *.la) # Possibly a libtool archive, so verify it. ! if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. --- 4765,4771 ---- case $name in *.la) # Possibly a libtool archive, so verify it. ! if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. *************** *** 4742,4748 **** *) # 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 --- 4820,4826 ---- *) # 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 Index: libtool/doc/libtool.texi diff -c libtool/doc/libtool.texi:1.116.2.1 libtool/doc/libtool.texi:1.116.2.4 *** libtool/doc/libtool.texi:1.116.2.1 Mon Sep 10 18:25:55 2001 --- libtool/doc/libtool.texi Mon Jan 14 14:04:40 2002 *************** *** 165,171 **** * 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. --- 165,171 ---- * Libltdl interface:: How to use libltdl in your programs. * Modules for libltdl:: Creating modules that can be @code{dlopen}ed. ! * Thread Safety 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. *************** *** 1063,1068 **** --- 1063,1077 ---- Display basic configuration options. This provides a way for packages to determine whether shared or static libraries will be built. + @item --preserve-dup-deps + Do not remove duplicate dependencies in libraries. When building packages + with static libraries, the libraries may depend circularly on each other + (shared libs can too, but for those it doesn't matter), so there are + situations, where -la -lb -la is required, and the second -la may not be + stripped or the link will fail. In cases where these duplications are + required, this option will preserve them, only stripping the libraries + that libtool knows it can safely. + @item --finish Same as @samp{--mode=finish}. *************** *** 2637,2643 **** @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. --- 2646,2652 ---- @menu * Libltdl interface:: How to use libltdl in your programs. * Modules for libltdl:: Creating modules that can be @code{dlopen}ed. ! * Thread Safety 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. *************** *** 2934,2940 **** @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 --- 2943,2949 ---- @end example ! @node Thread Safety in libltdl @section Using libtldl in a multi threaded environment Using the @code{lt_dlmutex_register()} function, and by providing some *************** *** 3416,3429 **** sub-makes within libltdl's directory, using automake's @var{SUBDIRS}, for example. Both macros define the shell variables @var{LIBLTDL}, to the link flag that you should use to link with libltdl, and ! @var{INCLTDL}, to the preprocessor flag that you should use to compile with programs that include @file{ltdl.h}. It is up to you to use @samp{AC_SUBST} to ensure that this variable will be available in @file{Makefile}s, or add them to variables that are @samp{AC_SUBST}ed by default, such as @var{LIBS} and @var{CPPFLAGS}. 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. --- 3425,3438 ---- sub-makes within libltdl's directory, using automake's @var{SUBDIRS}, for example. Both macros define the shell variables @var{LIBLTDL}, to the link flag that you should use to link with libltdl, and ! @var{LTDLINCL}, to the preprocessor flag that you should use to compile with programs that include @file{ltdl.h}. It is up to you to use @samp{AC_SUBST} to ensure that this variable will be available in @file{Makefile}s, or add them to variables that are @samp{AC_SUBST}ed by default, such as @var{LIBS} and @var{CPPFLAGS}. If you're using the convenience libltdl, @var{LIBLTDL} will be the ! pathname for the convenience version of libltdl and @var{LTDLINCL} will be @samp{-I} followed by the directory that contains libltdl, both starting with @samp{$@{top_builddir@}/} or @samp{$@{top_srcdir@}/}, respectively. *************** *** 3432,3446 **** @samp{AC_LIBLTDL_INSTALLABLE} may fail to detect it, if libltdl depends on symbols provided by libraries other than the C library. In this case, it will needlessly build and install libltdl.}, @var{LIBLTDL} will ! be set to @samp{-lltdl} and @var{INCLTDL} will be empty (which is just a blind assumption that @file{ltdl.h} is somewhere in the include path if libltdl is in the library path). If an installable version of libltdl must be built, its pathname, starting with @samp{$@{top_builddir@}/}, ! will be stored in @var{LIBLTDL}, and @var{INCLTDL} will be set just like in the case of convenience library. So, when you want to link a program with libltdl, be it a convenience, ! installed or installable library, just compile with @samp{$(INCLTDL)} and link it with @samp{$(LIBLTDL)}, using libtool. You should probably also add @samp{AC_LIBTOOL_DLOPEN} to your --- 3441,3455 ---- @samp{AC_LIBLTDL_INSTALLABLE} may fail to detect it, if libltdl depends on symbols provided by libraries other than the C library. In this case, it will needlessly build and install libltdl.}, @var{LIBLTDL} will ! be set to @samp{-lltdl} and @var{LTDLINCL} will be empty (which is just a blind assumption that @file{ltdl.h} is somewhere in the include path if libltdl is in the library path). If an installable version of libltdl must be built, its pathname, starting with @samp{$@{top_builddir@}/}, ! will be stored in @var{LIBLTDL}, and @var{LTDLINCL} will be set just like in the case of convenience library. So, when you want to link a program with libltdl, be it a convenience, ! installed or installable library, just compile with @samp{$(LTDLINCL)} and link it with @samp{$(LIBLTDL)}, using libtool. You should probably also add @samp{AC_LIBTOOL_DLOPEN} to your *************** *** 3463,3470 **** dnl Enable building of the convenience library dnl and set LIBLTDL accordingly AC_LIBLTDL_CONVENIENCE ! dnl Substitute INCLTDL and LIBLTDL in the Makefiles ! AC_SUBST(INCLTDL) AC_SUBST(LIBLTDL) dnl Check for dlopen support AC_LIBTOOL_DLOPEN --- 3472,3479 ---- dnl Enable building of the convenience library dnl and set LIBLTDL accordingly AC_LIBLTDL_CONVENIENCE ! dnl Substitute LTDLINCL and LIBLTDL in the Makefiles ! AC_SUBST(LTDLINCL) AC_SUBST(LIBLTDL) dnl Check for dlopen support AC_LIBTOOL_DLOPEN *************** *** 3480,3486 **** ... SUBDIRS = libltdl ! INCLUDES = $(INCLTDL) myprog_LDFLAGS = -export-dynamic # The quotes around -dlopen below fool automake <= 1.4 into accepting it --- 3489,3495 ---- ... SUBDIRS = libltdl ! INCLUDES = $(LTDLINCL) myprog_LDFLAGS = -export-dynamic # The quotes around -dlopen below fool automake <= 1.4 into accepting it *************** *** 4106,4115 **** @table @code @item aix3* @itemx aix4* ! AIX compilers have no PIC flags, since AIX has been ported only to ! PowerPC and RS/6000 chips. @footnote{All code compiled for the PowerPC ! and RS/6000 chips (@code{powerpc-*-*}, @code{powerpcle-*-*}, and ! @code{rs6000-*-*}) is position-independent, regardless of the operating system or compiler suite. So, ``regular objects'' can be used to build shared libraries on these systems and no special PIC compiler flags are required.} --- 4115,4124 ---- @table @code @item aix3* @itemx aix4* ! Most AIX compilers have no PIC flags, since AIX (with the exception of ! AIX for IA-64) runs on PowerPC and RS/6000 chips. @footnote{All code compiled ! for the PowerPC and RS/6000 chips (@code{powerpc-*-*}, @code{powerpcle-*-*}, ! and @code{rs6000-*-*}) is position-independent, regardless of the operating system or compiler suite. So, ``regular objects'' can be used to build shared libraries on these systems and no special PIC compiler flags are required.} *************** *** 4148,4162 **** 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 --- 4157,4165 ---- 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 ! the link line by default. Libtool provides the command line option ! @samp{--preserve-dup-deps} to preserve all duplicate dependencies ! in cases where it is necessary. @node Archivers @subsection Archivers Index: libtool/libltdl/Makefile.am diff -c libtool/libltdl/Makefile.am:1.40.2.1 libtool/libltdl/Makefile.am:1.40.2.2 *** libtool/libltdl/Makefile.am:1.40.2.1 Mon Sep 10 21:22:03 2001 --- libtool/libltdl/Makefile.am Tue Sep 11 15:28:19 2001 *************** *** 27,33 **** ## Because we do not have automatic dependency tracking: ltdl.lo: ltdl.h config.h ! $(OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck --- 27,33 ---- ## Because we do not have automatic dependency tracking: ltdl.lo: ltdl.h config.h ! $(OBJECTS) $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck Index: libtool/libltdl/ltdl.c diff -c libtool/libltdl/ltdl.c:1.134.2.6 libtool/libltdl/ltdl.c:1.134.2.15 *** libtool/libltdl/ltdl.c:1.134.2.6 Mon Sep 10 23:18:52 2001 --- libtool/libltdl/ltdl.c Tue Oct 22 21:39:55 2002 *************** *** 94,99 **** --- 94,103 ---- #include "ltdl.h" + #if WITH_DMALLOC + # include + #endif + *************** *** 166,171 **** --- 170,187 ---- /* The following macros reduce the amount of typing needed to cast assigned memory. */ + #if WITH_DMALLOC + + #define LT_DLMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) + #define LT_DLREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) + #define LT_DLFREE(p) \ + LT_STMT_START { if (p) (p) = (xfree (p), (lt_ptr) 0); } LT_STMT_END + + #define LT_EMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) + #define LT_EREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) + + #else + #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) \ *************** *** 174,181 **** #define LT_EMALLOC(tp, n) ((tp *) lt_emalloc ((n) * sizeof(tp))) #define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) #define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \ ! if ((p) != (q)) { lt_dlfree (p); (p) = (q); (q) = 0; } \ } LT_STMT_END --- 190,199 ---- #define LT_EMALLOC(tp, n) ((tp *) lt_emalloc ((n) * sizeof(tp))) #define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) + #endif + #define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \ ! if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; } \ } LT_STMT_END *************** *** 187,197 **** static char *strdup LT_PARAMS((const char *str)); ! char * strdup(str) const char *str; { ! char *tmp = 0; if (str) { --- 205,215 ---- static char *strdup LT_PARAMS((const char *str)); ! static char * strdup(str) const char *str; { ! char *tmp = NULL; if (str) { *************** *** 213,228 **** static int strcmp LT_PARAMS((const char *str1, const char *str2)); ! 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) --- 231,246 ---- static int strcmp LT_PARAMS((const char *str1, const char *str2)); ! static int strcmp (str1, str2) const char *str1; const char *str2; { if (str1 == str2) return 0; ! if (str1 == NULL) return -1; ! if (str2 == NULL) return 1; for (;*str1 && *str2; ++str1, ++str2) *************** *** 245,251 **** static const char *strchr LT_PARAMS((const char *str, int ch)); ! const char* strchr(str, ch) const char *str; int ch; --- 263,269 ---- static const char *strchr LT_PARAMS((const char *str, int ch)); ! static const char* strchr(str, ch) const char *str; int ch; *************** *** 271,282 **** static const char *strrchr LT_PARAMS((const char *str, int ch)); ! const char* strrchr(str, ch) const char *str; int ch; { ! const char *p, *q = 0; for (p = str; *p != LT_EOS_CHAR; ++p) { --- 289,300 ---- static const char *strrchr LT_PARAMS((const char *str, int ch)); ! static const char* strrchr(str, ch) const char *str; int ch; { ! const char *p, *q = NULL; for (p = str; *p != LT_EOS_CHAR; ++p) { *************** *** 305,311 **** static lt_ptr memcpy LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); ! lt_ptr memcpy (dest, src, size) lt_ptr dest; const lt_ptr src; --- 323,329 ---- static lt_ptr memcpy LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); ! static lt_ptr memcpy (dest, src, size) lt_ptr dest; const lt_ptr src; *************** *** 329,335 **** static lt_ptr memmove LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); ! lt_ptr memmove (dest, src, size) lt_ptr dest; const lt_ptr src; --- 347,353 ---- static lt_ptr memmove LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); ! static lt_ptr memmove (dest, src, size) lt_ptr dest; const lt_ptr src; *************** *** 364,385 **** #undef realloc #define realloc rpl_realloc ! lt_ptr realloc (ptr, size) lt_ptr ptr; size_t size; { ! if (size <= 0) { /* 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); --- 382,403 ---- #undef realloc #define realloc rpl_realloc ! static lt_ptr realloc (ptr, size) lt_ptr ptr; size_t size; { ! if (size == 0) { /* For zero or less bytes, free the original memory */ ! if (ptr != NULL) { lt_dlfree (ptr); } return (lt_ptr) 0; } ! else if (ptr == NULL) { /* Allow reallocation of a NULL pointer. */ return lt_dlmalloc (size); *************** *** 408,414 **** static error_t argz_append LT_PARAMS((char **pargz, size_t *pargz_len, const char *buf, size_t buf_len)); ! error_t argz_append (pargz, pargz_len, buf, buf_len) char **pargz; size_t *pargz_len; --- 426,432 ---- static error_t argz_append LT_PARAMS((char **pargz, size_t *pargz_len, const char *buf, size_t buf_len)); ! static error_t argz_append (pargz, pargz_len, buf, buf_len) char **pargz; size_t *pargz_len; *************** *** 450,456 **** static error_t argz_create_sep LT_PARAMS((const char *str, int delim, char **pargz, size_t *pargz_len)); ! error_t argz_create_sep (str, delim, pargz, pargz_len) const char *str; int delim; --- 468,474 ---- static error_t argz_create_sep LT_PARAMS((const char *str, int delim, char **pargz, size_t *pargz_len)); ! static error_t argz_create_sep (str, delim, pargz, pargz_len) const char *str; int delim; *************** *** 458,464 **** size_t *pargz_len; { size_t argz_len; ! char *argz = 0; assert (str); assert (pargz); --- 476,482 ---- size_t *pargz_len; { size_t argz_len; ! char *argz = NULL; assert (str); assert (pargz); *************** *** 513,519 **** static error_t argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, char *before, const char *entry)); ! error_t argz_insert (pargz, pargz_len, before, entry) char **pargz; size_t *pargz_len; --- 531,537 ---- static error_t argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, char *before, const char *entry)); ! static error_t argz_insert (pargz, pargz_len, before, entry) char **pargz; size_t *pargz_len; *************** *** 524,534 **** assert (pargz_len); assert (entry && *entry); - /* Either PARGZ/PARGZ_LEN is empty and BEFORE is NULL, - or BEFORE points into an address within the ARGZ vector. */ - assert ((!*pargz && !*pargz_len && !before) - || ((*pargz <= before) && (before < (*pargz + *pargz_len)))); - /* No BEFORE address indicates ENTRY should be inserted after the current last element. */ if (!before) --- 542,547 ---- *************** *** 575,581 **** static char *argz_next LT_PARAMS((char *argz, size_t argz_len, const char *entry)); ! char * argz_next (argz, argz_len, entry) char *argz; size_t argz_len; --- 588,594 ---- static char *argz_next LT_PARAMS((char *argz, size_t argz_len, const char *entry)); ! static char * argz_next (argz, argz_len, entry) char *argz; size_t argz_len; *************** *** 620,626 **** static void argz_stringify LT_PARAMS((char *argz, size_t argz_len, int sep)); ! void argz_stringify (argz, argz_len, sep) char *argz; size_t argz_len; --- 633,639 ---- static void argz_stringify LT_PARAMS((char *argz, size_t argz_len, int sep)); ! static void argz_stringify (argz, argz_len, sep) char *argz; size_t argz_len; *************** *** 744,754 **** /* 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 *lt_dlmutex_lock_func = 0; ! static lt_dlmutex_unlock *lt_dlmutex_unlock_func = 0; ! static lt_dlmutex_seterror *lt_dlmutex_seterror_func = 0; ! static lt_dlmutex_geterror *lt_dlmutex_geterror_func = 0; ! static const char *lt_dllast_error = 0; /* Either set or reset the mutex functions. Either all the arguments must --- 757,767 ---- /* 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 *lt_dlmutex_lock_func = NULL; ! static lt_dlmutex_unlock *lt_dlmutex_unlock_func = NULL; ! static lt_dlmutex_seterror *lt_dlmutex_seterror_func = NULL; ! static lt_dlmutex_geterror *lt_dlmutex_geterror_func = NULL; ! static const char *lt_dllast_error = NULL; /* Either set or reset the mutex functions. Either all the arguments must *************** *** 797,803 **** /* --- ERROR HANDLING --- */ ! static const char **user_error_strings = 0; static int errorcount = LT_ERROR_MAX; int --- 810,816 ---- /* --- ERROR HANDLING --- */ ! static const char **user_error_strings = NULL; static int errorcount = LT_ERROR_MAX; int *************** *** 806,812 **** { int errindex = 0; int result = -1; ! const char **temp = (const char **) 0; assert (diagnostic); --- 819,825 ---- { int errindex = 0; int result = -1; ! const char **temp = NULL; assert (diagnostic); *************** *** 856,862 **** return errors; } ! lt_ptr lt_emalloc (size) size_t size; { --- 869,875 ---- return errors; } ! static lt_ptr lt_emalloc (size) size_t size; { *************** *** 866,872 **** return mem; } ! lt_ptr lt_erealloc (addr, size) lt_ptr addr; size_t size; --- 879,885 ---- return mem; } ! static lt_ptr lt_erealloc (addr, size) lt_ptr addr; size_t size; *************** *** 877,890 **** return mem; } ! char * lt_estrdup (str) const char *str; { ! char *dup = strdup (str); ! if (LT_STRLEN (str) && !dup) LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return dup; } --- 890,903 ---- return mem; } ! static char * lt_estrdup (str) const char *str; { ! char *copy = strdup (str); ! if (LT_STRLEN (str) && !copy) LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); ! return copy; } *************** *** 1118,1124 **** 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) --- 1131,1137 ---- lt_module module; const char *symbol; { ! lt_ptr address = NULL; /* sys_shl_open should never return a NULL module handle */ if (module == (lt_module) 0) *************** *** 1162,1177 **** 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; } --- 1175,1190 ---- const char *filename; { lt_dlhandle cur; ! lt_module module = NULL; ! const char *errormsg = NULL; ! char *searchname = NULL; 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; } *************** *** 1221,1227 **** { if (!cur->module) { ! cur = 0; break; } --- 1234,1240 ---- { if (!cur->module) { ! cur = NULL; break; } *************** *** 1237,1243 **** if (cur || !module) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); ! module = 0; } return module; --- 1250,1256 ---- if (cur || !module) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); ! module = NULL; } return module; *************** *** 1343,1355 **** 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) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! address = 0; } return address; --- 1356,1368 ---- lt_module module; const char *symbol; { ! lt_ptr address = NULL; image_id image = (image_id) module; if (get_image_symbol (image, symbol, B_SYMBOL_TYPE_ANY, address) != B_OK) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); ! address = NULL; } return address; *************** *** 1386,1392 **** { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); LT_DLFREE (module); ! module = 0; } return module; --- 1399,1405 ---- { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); LT_DLFREE (module); ! module = NULL; } return module; *************** *** 1448,1455 **** 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) --- 1461,1468 ---- const lt_dlsymlist *syms; } lt_dlsymlists_t; ! static const lt_dlsymlist *default_preloaded_symbols = NULL; ! static lt_dlsymlists_t *preloaded_symbols = NULL; static int presym_init (loader_data) *************** *** 1459,1465 **** LT_DLMUTEX_LOCK (); ! preloaded_symbols = 0; if (default_preloaded_symbols) { errors = lt_dlpreload (default_preloaded_symbols); --- 1472,1478 ---- LT_DLMUTEX_LOCK (); ! preloaded_symbols = NULL; if (default_preloaded_symbols) { errors = lt_dlpreload (default_preloaded_symbols); *************** *** 1485,1491 **** lists = lists->next; LT_DLFREE (tmp); } ! preloaded_symbols = 0; LT_DLMUTEX_UNLOCK (); --- 1498,1504 ---- lists = lists->next; LT_DLFREE (tmp); } ! preloaded_symbols = NULL; LT_DLMUTEX_UNLOCK (); *************** *** 1594,1600 **** lt_module module; { /* Just to silence gcc -Wall */ ! module = 0; return 0; } --- 1607,1613 ---- lt_module module; { /* Just to silence gcc -Wall */ ! module = NULL; return 0; } *************** *** 1685,1697 **** static int lt_argz_insertinorder LT_PARAMS((char **pargz, size_t *pargz_len, const char *entry)); static int lt_dlpath_insertdir LT_PARAMS((char **ppath, char *before, const char *dir)); ! static char *user_search_path= 0; ! static lt_dlloader *loaders = 0; ! static lt_dlhandle handles = 0; static int initialized = 0; /* Initialize libltdl. */ --- 1698,1718 ---- static int lt_argz_insertinorder LT_PARAMS((char **pargz, size_t *pargz_len, const char *entry)); + static int lt_argz_insertdir LT_PARAMS((char **pargz, + size_t *pargz_len, + const char *dirnam, + struct dirent *dp)); static int lt_dlpath_insertdir LT_PARAMS((char **ppath, char *before, const char *dir)); + static int list_files_by_dir LT_PARAMS((const char *dirnam, + char **pargz, + size_t *pargz_len)); + static int file_not_found LT_PARAMS((void)); ! static char *user_search_path= NULL; ! static lt_dlloader *loaders = NULL; ! static lt_dlhandle handles = NULL; static int initialized = 0; /* Initialize libltdl. */ *************** *** 1705,1712 **** /* 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"); --- 1726,1733 ---- /* Initialize only at first call. */ if (++initialized == 1) { ! handles = NULL; ! user_search_path = NULL; /* empty search path */ #if HAVE_LIBDL && !defined(__CYGWIN__) errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen"); *************** *** 1841,1847 **** LT_DLMEM_REASSIGN (loader, next); } ! loaders = 0; } done: --- 1862,1868 ---- LT_DLMEM_REASSIGN (loader, next); } ! loaders = NULL; } done: *************** *** 1902,1908 **** } else { ! cur->info.filename = 0; } while (loader) --- 1923,1929 ---- } else { ! cur->info.filename = NULL; } while (loader) *************** *** 1911,1917 **** cur->module = loader->module_open (data, filename); ! if (cur->module != 0) { break; } --- 1932,1938 ---- cur->module = loader->module_open (data, filename); ! if (cur->module != NULL) { break; } *************** *** 1942,1948 **** const char *dlname; { int error = 0; ! char *filename = 0; size_t filename_len = 0; size_t dirname_len = LT_STRLEN (dirname); --- 1963,1969 ---- const char *dlname; { int error = 0; ! char *filename = NULL; size_t filename_len = 0; size_t dirname_len = LT_STRLEN (dirname); *************** *** 1952,1958 **** #ifdef LT_DIRSEP_CHAR /* Only canonicalized names (i.e. with DIRSEP chars already converted) should make it into this function: */ ! assert (strchr (dirname, LT_DIRSEP_CHAR) == 0); #endif if (dirname[dirname_len -1] == '/') --- 1973,1979 ---- #ifdef LT_DIRSEP_CHAR /* Only canonicalized names (i.e. with DIRSEP chars already converted) should make it into this function: */ ! assert (strchr (dirname, LT_DIRSEP_CHAR) == NULL); #endif if (dirname[dirname_len -1] == '/') *************** *** 2036,2042 **** const char *path; char **pcanonical; { ! char *canonical = 0; assert (path && *path); assert (pcanonical); --- 2057,2063 ---- const char *path; char **pcanonical; { ! char *canonical = NULL; assert (path && *path); assert (pcanonical); *************** *** 2138,2148 **** { int result = 0; int filenamesize = 0; ! int lenbase = LT_STRLEN (base_name); size_t argz_len = 0; ! char * argz = 0; ! char * filename = 0; ! char * canonical = 0; LT_DLMUTEX_LOCK (); --- 2159,2169 ---- { int result = 0; int filenamesize = 0; ! size_t lenbase = LT_STRLEN (base_name); size_t argz_len = 0; ! char *argz = NULL; ! char *filename = NULL; ! char *canonical = NULL; LT_DLMUTEX_LOCK (); *************** *** 2159,2168 **** goto cleanup; { ! char *dir_name = 0; while ((dir_name = argz_next (argz, argz_len, dir_name))) { ! int lendir = LT_STRLEN (dir_name); if (lendir +1 +lenbase >= filenamesize) { --- 2180,2189 ---- goto cleanup; { ! char *dir_name = NULL; while ((dir_name = argz_next (argz, argz_len, dir_name))) { ! size_t lendir = LT_STRLEN (dir_name); if (lendir +1 +lenbase >= filenamesize) { *************** *** 2173,2179 **** goto cleanup; } ! strncpy (filename, dir_name, lendir); if (base_name && *base_name) { if (filename[lendir -1] != '/') --- 2194,2202 ---- goto cleanup; } ! assert (filenamesize > lendir); ! strcpy (filename, dir_name); ! if (base_name && *base_name) { if (filename[lendir -1] != '/') *************** *** 2224,2230 **** LT_DLFREE (*pdir); *pdir = lt_estrdup (filename); ! is_done = (*pdir == 0) ? -1 : 1; } return is_done; --- 2247,2253 ---- LT_DLFREE (*pdir); *pdir = lt_estrdup (filename); ! is_done = (*pdir == NULL) ? -1 : 1; } return is_done; *************** *** 2236,2242 **** const char *base_name; char **pdir; { ! FILE *file = 0; foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file); --- 2259,2265 ---- const char *base_name; char **pdir; { ! FILE *file = NULL; foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file); *************** *** 2249,2265 **** lt_ptr data; lt_ptr ignored; { ! lt_dlhandle *handle = (lt_dlhandle *) data; ! int found = access (filename, R_OK); /* Bail out if file cannot be read... */ ! if (!found) return 0; /* Try to dlopen the file, but do not continue searching in any case. */ if (tryall_dlopen (handle, filename) != 0) ! *handle = 0; return 1; } --- 2272,2288 ---- lt_ptr data; lt_ptr ignored; { ! lt_dlhandle *handle = (lt_dlhandle *) data; ! int notfound = access (filename, R_OK); /* Bail out if file cannot be read... */ ! if (notfound) return 0; /* Try to dlopen the file, but do not continue searching in any case. */ if (tryall_dlopen (handle, filename) != 0) ! *handle = NULL; return 1; } *************** *** 2288,2297 **** char *deplibs; { #if LTDL_DLOPEN_DEPLIBS ! char *p, *save_search_path = 0; int depcount = 0; int i; ! char **names = 0; #endif int errors = 0; --- 2311,2320 ---- char *deplibs; { #if LTDL_DLOPEN_DEPLIBS ! char *p, *save_search_path = NULL; int depcount = 0; int i; ! char **names = NULL; #endif int errors = 0; *************** *** 2327,2333 **** 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; --- 2350,2356 ---- 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; *************** *** 2384,2390 **** { char *name; char save = *end; ! *end = 0; /* set a temporary string terminator */ if (strncmp(p, "-l", 2) == 0) { size_t name_len = 3+ /* "lib" */ LT_STRLEN (p + 2); --- 2407,2413 ---- { char *name; char save = *end; ! *end = '\0'; /* set a temporary string terminator */ if (strncmp(p, "-l", 2) == 0) { size_t name_len = 3+ /* "lib" */ LT_STRLEN (p + 2); *************** *** 2473,2479 **** /* remove the leading and trailing "'" from str and store the result in dest */ const char *end = strrchr (str, '\''); ! int len = LT_STRLEN (str); char *tmp; LT_DLFREE (*dest); --- 2496,2502 ---- /* remove the leading and trailing "'" from str and store the result in dest */ const char *end = strrchr (str, '\''); ! size_t len = LT_STRLEN (str); char *tmp; LT_DLFREE (*dest); *************** *** 2490,2496 **** } else { ! *dest = 0; } return 0; --- 2513,2519 ---- } else { ! *dest = NULL; } return 0; *************** *** 2511,2532 **** return 0; } ! int try_dlopen (phandle, filename) lt_dlhandle *phandle; const char *filename; { ! const char * ext = 0; ! const char * saved_error = 0; ! char * canonical = 0; ! char * base_name = 0; ! char * dir = 0; ! char * name = 0; int errors = 0; lt_dlhandle newhandle; assert (phandle); ! assert (*phandle == 0); LT_DLMUTEX_GETERROR (saved_error); --- 2534,2555 ---- return 0; } ! static int try_dlopen (phandle, filename) lt_dlhandle *phandle; const char *filename; { ! const char * ext = NULL; ! const char * saved_error = NULL; ! char * canonical = NULL; ! char * base_name = NULL; ! char * dir = NULL; ! char * name = NULL; int errors = 0; lt_dlhandle newhandle; assert (phandle); ! assert (*phandle == NULL); LT_DLMUTEX_GETERROR (saved_error); *************** *** 2534,2540 **** if (!filename) { *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); ! if (*phandle == 0) return 1; memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); --- 2557,2563 ---- if (!filename) { *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); ! if (*phandle == NULL) return 1; memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); *************** *** 2591,2604 **** if (ext && strcmp (ext, archive_ext) == 0) { /* this seems to be a libtool module */ ! FILE * file = 0; ! char * dlname = 0; ! char * old_name = 0; ! char * libdir = 0; ! char * deplibs = 0; ! char * line = 0; size_t line_len; - int i; /* if we can't find the installed flag, it is probably an installed libtool archive, produced with an old version --- 2614,2626 ---- if (ext && strcmp (ext, archive_ext) == 0) { /* this seems to be a libtool module */ ! FILE * file = NULL; ! char * dlname = NULL; ! char * old_name = NULL; ! char * libdir = NULL; ! char * deplibs = NULL; ! char * line = NULL; size_t line_len; /* if we can't find the installed flag, it is probably an installed libtool archive, produced with an old version *************** *** 2614,2636 **** } /* canonicalize the module name */ ! for (i = 0; i < ext - base_name; ++i) ! { ! if (isalnum ((int)(base_name[i]))) ! { ! name[i] = base_name[i]; ! } ! else ! { ! name[i] = '_'; ! } ! } ! name[ext - base_name] = LT_EOS_CHAR; ! /* 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) { const char *search_path; --- 2636,2661 ---- } /* canonicalize the module name */ ! { ! size_t i; ! for (i = 0; i < ext - base_name; ++i) ! { ! if (isalnum ((int)(base_name[i]))) ! { ! name[i] = base_name[i]; ! } ! else ! { ! name[i] = '_'; ! } ! } ! name[ext - base_name] = LT_EOS_CHAR; ! } ! /* 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) { const char *search_path; *************** *** 2689,2695 **** /* read the .la file */ while (!feof (file)) { ! if (!fgets (line, line_len, file)) { break; } --- 2714,2720 ---- /* read the .la file */ while (!feof (file)) { ! if (!fgets (line, (int) line_len, file)) { break; } *************** *** 2699,2705 **** while (line[LT_STRLEN(line) -1] != '\n') { line = LT_DLREALLOC (char, line, line_len *2); ! if (!fgets (&line[line_len -1], line_len +1, file)) { break; } --- 2724,2730 ---- while (line[LT_STRLEN(line) -1] != '\n') { line = LT_DLREALLOC (char, line, line_len *2); ! if (!fgets (&line[line_len -1], (int) line_len +1, file)) { break; } *************** *** 2757,2763 **** errors += trim (&dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]); if (!errors && dlname ! && (last_libname = strrchr (dlname, ' ')) != 0) { last_libname = lt_estrdup (last_libname + 1); if (!last_libname) --- 2782,2788 ---- errors += trim (&dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]); if (!errors && dlname ! && (last_libname = strrchr (dlname, ' ')) != NULL) { last_libname = lt_estrdup (last_libname + 1); if (!last_libname) *************** *** 2778,2784 **** /* allocate the handle */ *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); ! if (*phandle == 0) ++errors; if (errors) --- 2803,2809 ---- /* allocate the handle */ *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); ! if (*phandle == NULL) ++errors; if (errors) *************** *** 2822,2828 **** { /* not a libtool module */ *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); ! if (*phandle == 0) { ++errors; goto cleanup; --- 2847,2853 ---- { /* not a libtool module */ *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); ! if (*phandle == NULL) { ++errors; goto cleanup; *************** *** 2847,2853 **** #endif ))) { ! tryall_dlopen (&newhandle, filename); } if (!newhandle) --- 2872,2881 ---- #endif ))) { ! if (tryall_dlopen (&newhandle, filename) != 0) ! { ! newhandle = NULL; ! } } if (!newhandle) *************** *** 2886,2892 **** lt_dlopen (filename) const char *filename; { ! lt_dlhandle handle = 0; /* Just incase we missed a code path in try_dlopen() that reports an error, but forgets to reset handle... */ --- 2914,2920 ---- lt_dlopen (filename) const char *filename; { ! lt_dlhandle handle = NULL; /* Just incase we missed a code path in try_dlopen() that reports an error, but forgets to reset handle... */ *************** *** 2898,2907 **** /* If the last error messge store was `FILE_NOT_FOUND', then return non-zero. */ ! int file_not_found () { ! const char *error = 0; LT_DLMUTEX_GETERROR (error); if (error == LT_DLSTRERROR (FILE_NOT_FOUND)) --- 2926,2935 ---- /* If the last error messge store was `FILE_NOT_FOUND', then return non-zero. */ ! static int file_not_found () { ! const char *error = NULL; LT_DLMUTEX_GETERROR (error); if (error == LT_DLSTRERROR (FILE_NOT_FOUND)) *************** *** 2918,2929 **** lt_dlopenext (filename) const char *filename; { ! lt_dlhandle handle = 0; ! char * tmp = 0; ! char * ext = 0; ! int len; int errors = 0; - int file_found = 1; /* until proven otherwise */ if (!filename) { --- 2946,2956 ---- lt_dlopenext (filename) const char *filename; { ! lt_dlhandle handle = NULL; ! char * tmp = NULL; ! char * ext = NULL; ! size_t len; int errors = 0; if (!filename) { *************** *** 3002,3008 **** } ! int lt_argz_insert (pargz, pargz_len, before, entry) char **pargz; size_t *pargz_len; --- 3029,3035 ---- } ! static int lt_argz_insert (pargz, pargz_len, before, entry) char **pargz; size_t *pargz_len; *************** *** 3028,3040 **** return 0; } ! int lt_argz_insertinorder (pargz, pargz_len, entry) char **pargz; size_t *pargz_len; const char *entry; { ! char *before = 0; assert (pargz); assert (pargz_len); --- 3055,3067 ---- return 0; } ! static int lt_argz_insertinorder (pargz, pargz_len, entry) char **pargz; size_t *pargz_len; const char *entry; { ! char *before = NULL; assert (pargz); assert (pargz_len); *************** *** 3052,3067 **** return lt_argz_insert (pargz, pargz_len, before, entry); } ! int lt_argz_insertdir (pargz, pargz_len, dirnam, dp) char **pargz; size_t *pargz_len; const char *dirnam; struct dirent *dp; { ! char *buf = 0; size_t buf_len = 0; ! char *end = 0; size_t end_offset = 0; size_t dir_len = 0; int errors = 0; --- 3079,3094 ---- return lt_argz_insert (pargz, pargz_len, before, entry); } ! static int lt_argz_insertdir (pargz, pargz_len, dirnam, dp) char **pargz; size_t *pargz_len; const char *dirnam; struct dirent *dp; { ! char *buf = NULL; size_t buf_len = 0; ! char *end = NULL; size_t end_offset = 0; size_t dir_len = 0; int errors = 0; *************** *** 3118,3130 **** return errors; } ! int list_files_by_dir (dirnam, pargz, pargz_len) const char *dirnam; char **pargz; size_t *pargz_len; { ! DIR *dirp = 0; int errors = 0; assert (dirnam && *dirnam); --- 3145,3157 ---- return errors; } ! static int list_files_by_dir (dirnam, pargz, pargz_len) const char *dirnam; char **pargz; size_t *pargz_len; { ! DIR *dirp = NULL; int errors = 0; assert (dirnam && *dirnam); *************** *** 3135,3141 **** dirp = opendir (dirnam); if (dirp) { ! struct dirent *dp = 0; while ((dp = readdir (dirp))) if (dp->d_name[0] != '.') --- 3162,3168 ---- dirp = opendir (dirnam); if (dirp) { ! struct dirent *dp = NULL; while ((dp = readdir (dirp))) if (dp->d_name[0] != '.') *************** *** 3166,3172 **** = (int (*) LT_PARAMS((const char *filename, lt_ptr data))) data1; int is_done = 0; ! char *argz = 0; size_t argz_len = 0; if (list_files_by_dir (dirname, &argz, &argz_len) != 0) --- 3193,3199 ---- = (int (*) LT_PARAMS((const char *filename, lt_ptr data))) data1; int is_done = 0; ! char *argz = NULL; size_t argz_len = 0; if (list_files_by_dir (dirname, &argz, &argz_len) != 0) *************** *** 3175,3181 **** goto cleanup; { ! char *filename = 0; while ((filename = argz_next (argz, argz_len, filename))) if ((is_done = (*func) (filename, data2))) break; --- 3202,3208 ---- goto cleanup; { ! char *filename = NULL; while ((filename = argz_next (argz, argz_len, filename))) if ((is_done = (*func) (filename, data2))) break; *************** *** 3285,3290 **** --- 3312,3320 ---- errors += handle->loader->module_close (data, handle->module); errors += unload_deplibs(handle); + /* It is up to the callers to free the data itself. */ + LT_DLFREE (handle->caller_data); + LT_DLFREE (handle->info.filename); LT_DLFREE (handle->info.name); LT_DLFREE (handle); *************** *** 3309,3315 **** lt_dlhandle handle; const char *symbol; { ! int lensym; char lsym[LT_SYMBOL_LENGTH]; char *sym; lt_ptr address; --- 3339,3345 ---- lt_dlhandle handle; const char *symbol; { ! size_t lensym; char lsym[LT_SYMBOL_LENGTH]; char *sym; lt_ptr address; *************** *** 3409,3423 **** return error ? error : LT_DLSTRERROR (UNKNOWN); } ! int lt_dlpath_insertdir (ppath, before, dir) char **ppath; char *before; const char *dir; { int errors = 0; ! char *canonical = 0; ! char *argz = 0; size_t argz_len = 0; assert (ppath); --- 3439,3453 ---- return error ? error : LT_DLSTRERROR (UNKNOWN); } ! static int lt_dlpath_insertdir (ppath, before, dir) char **ppath; char *before; const char *dir; { int errors = 0; ! char *canonical = NULL; ! char *argz = NULL; size_t argz_len = 0; assert (ppath); *************** *** 3432,3444 **** assert (canonical && *canonical); /* If *PPATH is empty, set it to DIR. */ ! if (*ppath == 0) { assert (!before); /* BEFORE cannot be set without PPATH. */ assert (dir); /* Without DIR, don't call this function! */ *ppath = lt_estrdup (dir); ! if (*ppath == 0) ++errors; return errors; --- 3462,3474 ---- assert (canonical && *canonical); /* If *PPATH is empty, set it to DIR. */ ! if (*ppath == NULL) { assert (!before); /* BEFORE cannot be set without PPATH. */ assert (dir); /* Without DIR, don't call this function! */ *ppath = lt_estrdup (dir); ! if (*ppath == NULL) ++errors; return errors; *************** *** 3672,3678 **** 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 --- 3702,3708 ---- lt_ptr data; { int n_elements = 0; ! lt_ptr stale = NULL; int i; /* This needs to be locked so that the caller data can be updated *************** *** 3701,3707 **** if (!temp) { ! stale = 0; goto done; } --- 3731,3737 ---- if (!temp) { ! stale = NULL; goto done; } *************** *** 3761,3772 **** 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)) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); return 1; --- 3791,3802 ---- const char *loader_name; { int errors = 0; ! lt_dlloader *node = NULL, *ptr = NULL; ! if ((dlloader == NULL) /* diagnose null parameters */ ! || (dlloader->module_open == NULL) ! || (dlloader->module_close == NULL) ! || (dlloader->find_sym == NULL)) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); return 1; *************** *** 3777,3783 **** if (!node) return 1; ! node->next = 0; node->loader_name = loader_name; node->sym_prefix = dlloader->sym_prefix; node->dlloader_exit = dlloader->dlloader_exit; --- 3807,3813 ---- if (!node) return 1; ! node->next = NULL; node->loader_name = loader_name; node->sym_prefix = dlloader->sym_prefix; node->dlloader_exit = dlloader->dlloader_exit; *************** *** 3913,3919 **** lt_dlloader_name (place) lt_dlloader *place; { ! const char *name = 0; if (place) { --- 3943,3949 ---- lt_dlloader_name (place) lt_dlloader *place; { ! const char *name = NULL; if (place) { *************** *** 3933,3939 **** lt_dlloader_data (place) lt_dlloader *place; { ! lt_user_data *data = 0; if (place) { --- 3963,3969 ---- lt_dlloader_data (place) lt_dlloader *place; { ! lt_user_data *data = NULL; if (place) { *************** *** 3953,3959 **** lt_dlloader_find (loader_name) const char *loader_name; { ! lt_dlloader *place = 0; LT_DLMUTEX_LOCK (); for (place = loaders; place; place = place->next) --- 3983,3989 ---- lt_dlloader_find (loader_name) const char *loader_name; { ! lt_dlloader *place = NULL; LT_DLMUTEX_LOCK (); for (place = loaders; place; place = place->next)