From 22a7d59a995429a4419e9329d05d4d37030e3004 Mon Sep 17 00:00:00 2001 From: kramm Date: Sat, 29 May 2004 15:31:36 +0000 Subject: [PATCH] automake/autoconf fluctuations --- config.sub | 3 ++ ltmain.sh | 110 ++++++++++++++++++++++++++++-------------------------------- 2 files changed, 55 insertions(+), 58 deletions(-) diff --git a/config.sub b/config.sub index 1dea9b7..9738dd0 100644 --- a/config.sub +++ b/config.sub @@ -367,6 +367,9 @@ case $basic_machine in basic_machine=a29k-none os=-bsd ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl os=-sysv diff --git a/ltmain.sh b/ltmain.sh index 32384b6..dbb5277 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -219,17 +219,6 @@ if test -n "$prevopt"; then exit 1 fi -# Mandrake: (gc) It's bad to link C++ code with GCC, so we need to use the compiler name if provided -if test "$mode" = link && test -n "$archive_cmds" && test -x "/usr/bin/perl"; then - case $nonopt in - *cc | *++ | gcc* | *-gcc* | egcs*) - archive_cmds=`echo $archive_cmds | perl -pe 's/^\S+\s+//'` - archive_cmds="$nonopt $archive_cmds" - archive_expsym_cmds=`echo $archive_expsym_cmds | perl -pe 's/^\S+\s+//'` - archive_expsym_cmds="$nonopt $archive_expsym_cmds" - esac -fi - # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. @@ -1225,6 +1214,11 @@ compiler." continue ;; + -Kthread | -mthreads | -mt | -pthread | -pthreads | -threads | -qthreaded | -kthread ) + compiler_flags="$compiler_flags $arg" + continue + ;; + # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need @@ -1404,7 +1398,7 @@ compiler." ;; esac for pass in $passes; do - if test $linkmode = prog; then + if test "$linkmode" = prog; then # Determine which files to process case $pass in dlopen) @@ -1421,11 +1415,11 @@ compiler." found=no case $deplib in -l*) - if test $linkmode = oldlib && test $linkmode = obj; then + if test "$linkmode" = oldlib && test "$linkmode" = obj; then $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 continue fi - if test $pass = conv; then + if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi @@ -1445,7 +1439,7 @@ compiler." finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi @@ -1454,16 +1448,16 @@ compiler." case $linkmode in lib) deplibs="$deplib $deplibs" - test $pass = conv && continue + test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) - if test $pass = conv; then + if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi - if test $pass = scan; then + if test "$pass" = scan; then deplibs="$deplib $deplibs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` else @@ -1478,7 +1472,7 @@ compiler." continue ;; # -L -R*) - if test $pass = link; then + if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in @@ -1491,7 +1485,7 @@ compiler." ;; *.la) lib="$deplib" ;; *.$libext) - if test $pass = conv; then + if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi @@ -1514,7 +1508,7 @@ compiler." continue ;; prog) - if test $pass != link; then + if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -1525,7 +1519,7 @@ compiler." esac # linkmode ;; # *.$libext *.lo | *.$objext) - if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" @@ -1541,7 +1535,7 @@ compiler." continue ;; esac # case $deplib - if test $found = yes || test -f "$lib"; then : + if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit 1 @@ -1575,13 +1569,13 @@ compiler." if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || - { test $linkmode = oldlib && test $linkmode = obj; }; then + { test "$linkmode" = oldlib && test "$linkmode" = obj; }; then # Add dl[pre]opened files of deplib test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi - if test $pass = conv; then + if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then @@ -1602,7 +1596,7 @@ compiler." fi tmp_libs="$tmp_libs $deplib" done - elif test $linkmode != prog && test $linkmode != lib; then + elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit 1 fi @@ -1620,7 +1614,7 @@ compiler." fi # This library was specified with -dlopen. - if test $pass = dlopen; then + if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit 1 @@ -1669,7 +1663,7 @@ compiler." name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. - if test $pass = dlpreopen; then + if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit 1 @@ -1688,7 +1682,7 @@ compiler." if test -z "$libdir"; then # Link the convenience library - if test $linkmode = lib; then + if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" @@ -1699,7 +1693,7 @@ compiler." continue fi - if test $linkmode = prog && test $pass != link; then + if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" @@ -1715,7 +1709,7 @@ compiler." -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? - if test $linkalldeplibs = yes; then + if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths @@ -1738,7 +1732,7 @@ compiler." # Link against this shared library if test "$linkmode,$pass" = "prog,link" || - { test $linkmode = lib && test $hardcode_into_libs = yes; }; then + { test "$linkmode" = lib && test "$hardcode_into_libs" = yes; }; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. @@ -1760,7 +1754,7 @@ compiler." esac ;; esac - if test $linkmode = prog; then + if test "$linkmode" = prog; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. @@ -1844,7 +1838,7 @@ compiler." linklib=$newlib fi # test -n $old_archive_from_expsyms_cmds - if test $linkmode = prog || test "$mode" != relink; then + if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= @@ -1893,7 +1887,7 @@ compiler." *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi - if test $linkmode = prog; then + if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else @@ -1910,7 +1904,7 @@ compiler." fi fi - if test $linkmode = prog || test "$mode" = relink; then + if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= @@ -1950,7 +1944,7 @@ compiler." add="-l$name" fi - if test $linkmode = prog; then + if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else @@ -1958,7 +1952,7 @@ compiler." test -n "$add" && deplibs="$add $deplibs" fi fi - elif test $linkmode = prog; then + elif test "$linkmode" = prog; then if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && @@ -2018,10 +2012,10 @@ compiler." fi fi # link shared/static library? - if test $linkmode = lib; then + if test "$linkmode" = lib; then if test -n "$dependency_libs" && - { test $hardcode_into_libs != yes || test $build_old_libs = yes || - test $link_static = yes; }; then + { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || + test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do @@ -2052,7 +2046,7 @@ compiler." tmp_libs="$tmp_libs $deplib" done - if test $link_all_deplibs != no; then + if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in @@ -2095,15 +2089,15 @@ compiler." fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test $pass = dlpreopen; then + if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi - if test $pass != dlopen; then - test $pass != scan && dependency_libs="$newdependency_libs" - if test $pass != conv; then + if test "$pass" != dlopen; then + test "$pass" != scan && dependency_libs="$newdependency_libs" + if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do @@ -2161,7 +2155,7 @@ compiler." deplibs= fi done # for pass - if test $linkmode = prog; then + if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi @@ -2473,7 +2467,7 @@ compiler." *) finalize_rpath="$finalize_rpath $libdir" ;; esac done - if test $hardcode_into_libs != yes || test $build_old_libs = yes; then + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi @@ -2516,7 +2510,7 @@ compiler." ;; *) # Add libc to deplibs on all other systems if necessary. - if test $build_libtool_need_lc = "yes"; then + if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; @@ -2788,7 +2782,7 @@ EOF echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." - if test $allow_undefined = no; then + if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" @@ -2815,7 +2809,7 @@ EOF # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then - if test $hardcode_into_libs = yes; then + if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= @@ -3523,7 +3517,7 @@ static const void *lt_preloaded_setup() { finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi - if test $need_relink = no || test "$build_libtool_libs" != yes; then + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" @@ -4109,7 +4103,7 @@ dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test $need_relink = yes; then + if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi @@ -4851,10 +4845,10 @@ relink_command=\"$relink_command\"" objdir="$dir/$objdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test $mode = uninstall && objdir="$dir" + test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates - if test $mode = clean; then + if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; @@ -4886,9 +4880,9 @@ relink_command=\"$relink_command\"" rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - if test $mode = uninstall; then + if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" @@ -4932,7 +4926,7 @@ relink_command=\"$relink_command\"" *) # Do a test to see if this is a libtool program. - if test $mode = clean && + if test "$mode" = clean && (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$file -- 1.7.10.4