]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) Fixed a problem
authorRobert Boehne <rboehne@ricardo-us.com>
Fri, 31 Aug 2001 16:59:56 +0000 (16:59 +0000)
committerRobert Boehne <rboehne@gnu.org>
Fri, 31 Aug 2001 16:59:56 +0000 (16:59 +0000)
with export_symbols_cmds not being set for CXX tags, and
not being properly set for any tag under AIX/Power.

ChangeLog
libtool.m4

index 6d70bd69fa0763974a36e46952a50581d88797f4..ddd1f6187da14b4c6987e234bb065f4c83566932 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-31  Robert Boehne  <rboehne@ricardo-us.com>
+
+       * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) Fixed a problem
+       with export_symbols_cmds not being set for CXX tags, and
+       not being properly set for any tag under AIX/Power.
+
 2001-08-19  Ossama Othman  <ossama@uci.edu>
 
        * libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG): Corrected and improved
index 62aa5910128e8683359725a3ac401bf1566010df..fef643d08877464bbde919e2a6c20c28712ae4ab 100644 (file)
@@ -3801,7 +3801,8 @@ AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
-ifelse([$1],[CXX],[
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
   # C++ specific cases for pic, static, wl, etc.
   if test "$GXX" = yes; then
     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -4035,7 +4036,7 @@ ifelse([$1],[CXX],[
     esac
   fi
 ],
-[AC_MSG_CHECKING([for $compiler option to produce PIC])
+[
   if test "$GCC" = yes; then
     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
@@ -4219,7 +4220,26 @@ esac
 # See if the linker supports building shared libraries.
 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[],[
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  cygwin* | mingw* | pw32*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+],[
   runpath_var=
   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
   
@@ -4498,6 +4518,13 @@ EOF
         exp_sym_flag='-Bexport'
         no_entry_flag=""
       else
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
+          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+       else
+         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+       fi
         aix_use_runtimelinking=no
   
         # Test if we are trying to use run time linking or normal