]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
sync from mainline
authorRobert Boehne <rboehne@gnu.org>
Sat, 16 Mar 2002 17:35:53 +0000 (17:35 +0000)
committerBruce Korb <bkorb@gnu.org>
Sat, 16 Mar 2002 17:35:53 +0000 (17:35 +0000)
ChangeLog
libtool.m4
ltmain.in

index f5a826627a18628548b9858b58790f67e87146fe..2192f08762c2583c519aa70c6875b6382e043670 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2002-03-14  Robert Boehne  <rboehne@gnu.org>
+
+       ltmain.in: Touch-up to make testsuite pass, and default tagname
+       to CC when it isn't explicitly set.
+
+2002-03-14  Anthony Green  <green@redhat.com>
+
+       * libtool.m4 (AC_LIBTOOL_PROG_CC_C_O): Albert Chin's gcj fix.
+       (AC_LIBTOOL_PROG_COMPILER_PIC): Per Bothner's change for not
+       using -DPIC with gcj.
+
 2002-03-11  Bruce Korb  <bkorb@gnu.org>
 
        * ltmain.in(compile): bring a touch of order to the option processing
index 0da7338363e6a66b6f7e57b506d32117392798c0..2ba05336bedf0163f9cb7bf02ac0bd391e750c26 100644 (file)
@@ -832,8 +832,8 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
                   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
          [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
                   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
-         [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
-                  GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
+         [$1],[GCJ],[save_GCJFLAGS="$CFLAGS"
+                  CFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
    # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
@@ -856,7 +856,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    fi
    ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
          [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
-         [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
+         [$1],[GCJ],[CFLAGS="$save_CFLAGS"])
    chmod u+w .
    $rm conftest* out/*
    rmdir out
@@ -984,7 +984,20 @@ shlibpath_overrides_runpath=unknown
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
+  if echo "$sys_lib_search_path_spec" | egrep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
 need_lib_prefix=unknown
 hardcode_into_libs=no
 
@@ -3177,7 +3190,7 @@ objext=o
 _LT_AC_TAGVAR(objext, $1)=$objext
 
 # Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
+lt_simple_compile_test_code="class foo {};"
 
 # Code to be used in simple link tests
 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
@@ -4316,7 +4329,7 @@ AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])], [],
     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
      "" | " "*) ;;
      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
@@ -4330,7 +4343,7 @@ case "$host_os" in
     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
     ;;
   *)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])"
     ;;
 esac
 ])
index 7a1bdd6a09e41303e2a822e446bd8f04fe3fd892..a5134efe2e76cfc27dd1074b0581c7f4e8ff5534 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -105,6 +105,9 @@ execute_dlfiles=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
 
+# set the tag name so that it defaults to CC
+tagname="CC"
+
 # Parse our command line options once, thoroughly.
 while test "$#" -gt 0
 do
@@ -324,7 +327,8 @@ if test -z "$show_help"; then
     do
       case "$arg_mode" in
       arg  )
-       lastarg="$arg"  # do not "continue".  Instead, add this to base_compile
+       # do not "continue".  Instead, add this to base_compile
+       lastarg="$arg"
        arg_mode=normal
        ;;