diff -uNr libtool.ORIG/ltconfig libtool/ltconfig --- libtool.ORIG/ltconfig Thu Oct 11 23:44:50 2001 +++ libtool/ltconfig Thu Oct 11 18:02:58 2001 @@ -170,7 +170,7 @@ PROGRAM=ltconfig PACKAGE=libtool VERSION=1.3.5 -TIMESTAMP=" (1.3 2000/11/22 00:47:10)" +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' rm="rm -f" @@ -675,10 +675,11 @@ # we not sure about C++ programs. link_static_flag="$link_static_flag ${wl}-lC" ;; - cygwin* | mingw* | os2* ) + cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; darwin* | rhapsody*) + # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files pic_flag='-fno-common' ;; @@ -777,8 +778,8 @@ echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pic_flag -DPIC" - echo "$progname:780: checking if $compiler PIC flag $pic_flag works" >&5 - if { (eval echo $progname:781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then + echo "$progname:781: checking if $compiler PIC flag $pic_flag works" >&5 + if { (eval echo $progname:782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then # Append any warnings to the config.log. cat conftest.err 1>&5 @@ -830,8 +831,8 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.o" -echo "$progname:833: checking if $compiler supports -c -o file.o" >&5 -if { (eval echo $progname:834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then +echo "$progname:834: checking if $compiler supports -c -o file.o" >&5 +if { (eval echo $progname:835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -863,8 +864,8 @@ echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" - echo "$progname:866: checking if $compiler supports -c -o file.lo" >&5 -if { (eval echo $progname:867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then + echo "$progname:867: checking if $compiler supports -c -o file.lo" >&5 +if { (eval echo $progname:868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -915,8 +916,8 @@ echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" - echo "$progname:918: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - if { (eval echo $progname:919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then + echo "$progname:919: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + if { (eval echo $progname:920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -959,8 +960,8 @@ echo 'main(){return(0);}' > conftest.c save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $link_static_flag" -echo "$progname:962: checking if $compiler static flag $link_static_flag works" >&5 -if { (eval echo $progname:963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +echo "$progname:963: checking if $compiler static flag $link_static_flag works" >&5 +if { (eval echo $progname:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then echo "$ac_t$link_static_flag" 1>&6 else echo "$ac_t"none 1>&6 @@ -992,7 +993,7 @@ if test "$with_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 - echo "$progname:995: checking for ld used by GCC" >&5 + echo "$progname:996: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1016,10 +1017,10 @@ esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld... $ac_c" 1>&6 - echo "$progname:1019: checking for GNU ld" >&5 + echo "$progname:1020: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 - echo "$progname:1022: checking for non-GNU ld" >&5 + echo "$progname:1023: checking for non-GNU ld" >&5 fi if test -z "$LD"; then @@ -1372,11 +1373,19 @@ ;; darwin* | rhapsody*) - allow_undefined_flag='-undefined warning' - archive_cmds='$CC $(if test .$module = .yes; then echo -bundle; else echo -dynamiclib; fi) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts' + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag='-undefined suppress' + ;; + *) # Darwin 1.3 on + # allow_undefined_flag='-flat_namespace -undefined suppress' + allow_undefined_flag='-undefined error' + ;; + esac + archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -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 $lib' hardcode_direct=yes - hardcode_libdir_flag_spec='-install_name $libdir/$(basename $lib)' hardcode_shlibpath_var=no whole_archive_flag_spec='-all_load $convenience' ;; @@ -1658,11 +1667,11 @@ main(){nm_test_var='a';nm_test_func();return(0);} EOF - echo "$progname:1661: checking if global_symbol_pipe works" >&5 - if { (eval echo $progname:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then + echo "$progname:1669: checking if global_symbol_pipe works" >&5 + if { (eval echo $progname:1670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then # Now try to grab the symbols. nlist=conftest.nm - if { echo "$progname:1665: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then + if { echo "$progname:1673: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -1714,7 +1723,7 @@ save_CFLAGS="$CFLAGS" LIBS="conftstm.$objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo $progname:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then pipe_works=yes else echo "$progname: failed program was:" >&5 @@ -1924,20 +1933,22 @@ ;; darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no deplibs_check_method='file_magic Mach-O dynamically linked shared library' - file_magic_cmd=/usr/bin/file + file_magic_cmd='/usr/bin/file -L' case "$host_os" in - rhapsody* | darwin1.[12]) - file_magic_test_file=`ls /System/Library/Frameworks/System.framework/Versions/*/System | head -1` + rhapsody* | darwin1.[012]) + file_magic_test_file='/System/Library/Frameworks/System.framework/System' ;; *) # Darwin 1.3 on - file_magic_test_file=`ls /usr/lib/libSystem.*.dylib | head -1` + file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac - library_names_spec='${libname}.$(if test .$module = .yes; then echo so; else echo dylib; fi)' - need_lib_prefix=no - need_version=no - #postinstall_cmds='chmod +x $lib' + library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' + soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH ;; @@ -2264,7 +2275,7 @@ if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then lt_cv_dlopen=no lt_cv_dlopen_libs= echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "$progname:2267: checking for dlopen in -ldl" >&5 +echo "$progname:2277: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2272,7 +2283,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2304,12 +2315,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "$progname:2307: checking for dlopen" >&5 +echo "$progname:2317: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2334,7 +2345,7 @@ ; return 0; } EOF -if { (eval echo $progname:2337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" else @@ -2351,7 +2362,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 -echo "$progname:2354: checking for dld_link in -ldld" >&5 +echo "$progname:2364: checking for dld_link in -ldld" >&5 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2359,7 +2370,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2391,12 +2402,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "$progname:2394: checking for shl_load" >&5 +echo "$progname:2404: checking for shl_load" >&5 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2421,7 +2432,7 @@ ; return 0; } EOF -if { (eval echo $progname:2424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shl_load=yes" else @@ -2439,7 +2450,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "$progname:2442: checking for shl_load in -ldld" >&5 +echo "$progname:2452: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2447,7 +2458,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2504,17 +2515,17 @@ for ac_hdr in dlfcn.h; do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "$progname:2507: checking for $ac_hdr" >&5 +echo "$progname:2517: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int fnord = 0; EOF ac_try="$ac_compile >/dev/null 2>conftest.out" -{ (eval echo $progname:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo $progname:2527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2542,7 +2553,7 @@ LIBS="$lt_cv_dlopen_libs $LIBS" echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2545: checking whether a program can dlopen itself" >&5 +echo "$progname:2555: checking whether a program can dlopen itself" >&5 if test "${lt_cv_dlopen_self+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2550,7 +2561,7 @@ lt_cv_dlopen_self=cross else cat > conftest.c < @@ -2596,7 +2607,7 @@ if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF -if { (eval echo $progname:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo $progname:2609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self=yes else @@ -2615,7 +2626,7 @@ if test "$lt_cv_dlopen_self" = yes; then LDFLAGS="$LDFLAGS $link_static_flag" echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2618: checking whether a statically linked program can dlopen itself" >&5 +echo "$progname:2628: checking whether a statically linked program can dlopen itself" >&5 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2623,7 +2634,7 @@ lt_cv_dlopen_self_static=cross else cat > conftest.c < @@ -2669,7 +2680,7 @@ if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF -if { (eval echo $progname:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo $progname:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self_static=yes else diff -uNr libtool.ORIG/ltmain.sh libtool/ltmain.sh --- libtool.ORIG/ltmain.sh Thu Oct 11 23:44:50 2001 +++ libtool/ltmain.sh Thu Oct 11 18:00:50 2001 @@ -55,7 +55,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.3.5 -TIMESTAMP=" (1.3 2000/11/22 00:47:10)" +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" default_mode= help="Try \`$progname --help' for more information." @@ -247,6 +247,13 @@ fi ;; esac + elif test ."$mode" = .link; then + case "$nonopt" in + *cc | *++ | gcc* | *-gcc*) + CC=$nonopt + ;; + esac + fi fi # Only execute mode is allowed to have -dlopen flags. @@ -1079,9 +1086,10 @@ # These systems don't actually have c library (as such) continue ;; - *-*-rhapsody*) + *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" + continue ;; esac elif test "$arg" = "-lm"; then @@ -1090,9 +1098,10 @@ # These systems don't actually have math library (as such) continue ;; - *-*-rhapsody*) + *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody math library is in the System framework deplibs="$deplibs -framework System" + continue ;; esac fi @@ -1761,6 +1770,16 @@ versuffix="-$major-$age-$revision" ;; + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 @@ -1771,7 +1790,16 @@ # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= - verstring="0.0" + case "$version_type" in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring="" + ;; + *) + verstring="0.0" + ;; + esac if test "$need_version" = no; then versuffix= else @@ -1803,7 +1831,7 @@ *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; - *-*-rhapsody*) + *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;;