From: Robert Boehne Date: Fri, 31 Aug 2001 16:59:56 +0000 (+0000) Subject: * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) Fixed a problem X-Git-Tag: release-1-4d~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9f6feb80b1441244cafaefe412743a5215dff78;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 6d70bd69f..ddd1f6187 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-07-31 Robert Boehne + + * 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 * libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG): Corrected and improved diff --git a/libtool.m4 b/libtool.m4 index 62aa59101..fef643d08 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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