libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_LIBTOOL_SYS_DYNAMIC_LINKER test tags compiler to see if it is GCC, no


From: Peter O'Gorman
Subject: AC_LIBTOOL_SYS_DYNAMIC_LINKER test tags compiler to see if it is GCC, not the CC compiler.
Date: Fri, 14 May 2004 23:37:09 +0900
User-agent: Mozilla Thunderbird 0.5+ (Macintosh/20040224)

I just realized that I never applied this, even though I asked about it ages ago, I never committed it.

Okay to apply? (I know Gary is awake :-p)

Peter
Index: ChangeLog
2004-04-16  Peter O'Gorman  <address@hidden>

        * m4/libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Make this an m4_defun,
        test the tags compiler to see if it is GCC, not the CC compiler.

from  Scott James Remnant  <address@hidden>
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.62
diff -u -3 -p -u -r1.62 libtool.m4
--- m4/libtool.m4 15 Apr 2004 17:05:26 -0000 1.62
+++ m4/libtool.m4 16 Apr 2004 01:05:35 -0000
@@ -1537,9 +1537,14 @@ _LT_DECL([], [striplib], [1])
 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
 # -----------------------------
 # PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+m4_defun([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 [AC_REQUIRE([LT_AC_PROG_EGREP])
 AC_MSG_CHECKING([dynamic linker characteristics])
+m4_case([$1],
+       [C], [withGCC=$GCC],
+       [CXX], [withGCC=$GXX],
+       [F77], [withGCC=$G77],
+       [withGCC=$GCC])
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -1553,7 +1558,7 @@ shlibpath_overrides_runpath=unknown
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
+if test "$withGCC" = yes; then
   sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | 
$SED -e "s/^libraries://" -e "s,=/,/,g"`
   if echo "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
     # if the path contains ";" then we assume it to be the separator
@@ -1664,7 +1669,7 @@ cygwin* | mingw* | pw32*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
+  case $withGCC,$host_os in
   yes,cygwin* | yes,mingw* | yes,pw32*)
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
@@ -1727,7 +1732,7 @@ darwin* | rhapsody*)
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
+  if test "$withGCC" = yes; then
     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" 
"$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | $GREP 
"^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, 
,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
   else
     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]