libtool-patches
[Top][All Lists]
Advanced

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

[PATCH] Darwin & -shrext link option


From: Robert Boehne
Subject: [PATCH] Darwin & -shrext link option
Date: Mon, 06 Jan 2003 23:07:26 -0600

Hello,

I've found some problems with Darwin and the previous patch
for the -shrext link option.  One, the current method always
gives "dylib" as the file extention because the conditional
is evaluated at the wrong time.
There is actually a second fix in this patch for Darwin regarding
the sys_lib_search_path_spec output from gcc -print-search-dirs.
Apple's gcc returns one directory on each line, while gcc returns
a colon-separated list of directories.  The modification herein
fixes this so a proper list is created.


2003-01-06  Robert Boehne  <address@hidden>

        * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Modify the
        "-shrext" option so that is works properly under Darwin.
        Modify the processing of 'gcc -print-search-dirs' under
        Darwin to make it behave like GNU gcc does.
        (AC_LIBTOOL_CONFIG): Single quote $shrext.
        * ltimain.in: Expand shared_ext just before it is used
        so that it can be conditional on the value of $module.


Robert Boehne wrote:
> 
> Hello,
> 
> I am checking in this patch with a one-line modification as per Charles'
> comment.
> This patch should not change default behavior, only allow for other
> names to be explicitly specified.  Some Matlab users have been waiting
> for this for quite some time, so I hope they try this out (you know who
> you are!).
> 
> Thanks to Charles and Ralph.
> 
> Robert
> 
> Charles Wilson wrote:
> >
> > Robert Boehne wrote:
> > >>and X's Java won't load a module named *.dylib.  I don't see why
> > >>this can't be used under Cyg/Ming/win & pw32, so I removed the
> > >>references that stated it was not supported there.  I can't say
> > >>that it will work there, is there some OS restriciton that prevents it?
> >
> > Yes.  If the extention isn't ".dll", the windows loader won't load it as
> > an intrinsic dependency.  However,
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/loadlibrary.asp(It
> >
> > seems to imply that LoadLibrary(filename) might succeed, even if
> > filename doesn't end in .dll or .exe.  (e.g. dlopen() might load a
> > module whose filename doesn't end in .dll/.exe)
> >
> > >>@@ -4986,6 +4993,8 @@
> > >>       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
> > >>       # Tell ltmain to make .lib files, not .a files.
> > >>       libext=lib
> > >>+      # Tell ltmain to make .dll files, not .so files.
> > >>+      shrext="dll"
> > >>       # FIXME: Setting linknames here is a bad hack.
> > >>       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs 
> > >> $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link 
> > >> -dll~linknames='
> > >>       # The linker will automatically build a .lib file if we build a 
> > >> DLL.
> >
> > This stanza only takes effect on cygwin/mingw/pw/... when the compiler
> > is NOT gcc (and we assume then that the compiler is MSVC). But, if you
> > ARE using gcc -- which is the typical case on cygwin/mingw/pw/... --
> > then shrext is not set to "dll".  This is bad.
> >
> > Following the lead of hpux, you ALSO need to set shrext=dll in
> > AC_LIBTOOL_SYS_DYNAMIC_LINKER:
> >
> > @@ -1172,6 +1172,7 @@
> >         dlpath=$dir/\$dldll~
> >          $rm \$dlpath'
> >       shlibpath_overrides_runpath=yes
> > +    shrext=dll
> >
> >       case $host_os in
> >       cygwin*)
> >
> > --Chuck
> 
> _______________________________________________
> Libtool-patches mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/libtool-patches
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.287
diff -u -r1.287 libtool.m4
--- libtool.m4  31 Dec 2002 05:43:23 -0000      1.287
+++ libtool.m4  7 Jan 2003 04:51:30 -0000
@@ -1078,11 +1078,11 @@
 case $host_os in
 aix3*)
   version_type=linux
-  library_names_spec='${libname}${release}.${shrext}$versuffix $libname.a'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.${shrext}$major'
+  soname_spec='${libname}${release}.${shared_ext}$major'
   ;;
 
 aix4* | aix5*)
@@ -1092,7 +1092,7 @@
   hardcode_into_libs=yes
   if test "$host_cpu" = ia64; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}.${shrext}$major 
${libname}${release}.${shrext}$versuffix $libname.${shrext}'
+    library_names_spec='${libname}${release}.${shared_ext}$major 
${libname}${release}.${shared_ext}$versuffix $libname.${shared_ext}'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
@@ -1118,12 +1118,12 @@
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
+      library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
     else
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
       library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}.${shrext}$major'
+      soname_spec='${libname}${release}.${shared_ext}$major'
     fi
     shlibpath_var=LIBPATH
   fi
@@ -1136,7 +1136,7 @@
   ;;
 
 beos*)
-  library_names_spec='${libname}.${shrext}'
+  library_names_spec='${libname}.${shared_ext}'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
@@ -1144,8 +1144,8 @@
 bsdi4*)
   version_type=linux
   need_version=no
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
-  soname_spec='${libname}${release}.${shrext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
+  soname_spec='${libname}${release}.${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib 
/usr/local/lib"
@@ -1178,12 +1178,12 @@
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | 
$SED -e 's/[[.]]/-/g'`${versuffix}.${shrext}'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | 
$SED -e 's/[[.]]/-/g'`${versuffix}.${shared_ext}'
       sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
       ;;
     mingw*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 
's/[[.]]/-/g'`${versuffix}.${shrext}'
+      soname_spec='${libname}`echo ${release} | $SED -e 
's/[[.]]/-/g'`${versuffix}.${shared_ext}'
       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 ';[c-zC-Z]:/' >/dev/null]; 
then
         # It is most probably a Windows format PATH printed by
@@ -1199,13 +1199,13 @@
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo 
${release} | $SED -e 's/[.]/-/g'`${versuffix}.${shrext}'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo 
${release} | $SED -e 's/[.]/-/g'`${versuffix}.${shared_ext}'
       ;;
     esac
     ;;
 
   *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 
's/[[.]]/-/g'`${versuffix}.${shrext} $libname.lib'
+    library_names_spec='${libname}`echo ${release} | $SED -e 
's/[[.]]/-/g'`${versuffix}.${shared_ext} $libname.lib'
     ;;
   esac
   dynamic_linker='Win32 ld.exe'
@@ -1221,19 +1221,21 @@
   # FIXME: Relying on posixy $() will cause problems for
   #        cross-compilation, but unfortunately the echo tests do not
   #        yet detect zsh echo's removal of \ escapes.
-  library_names_spec='${libname}${release}${versuffix}.$shrext 
${libname}${release}${major}.$shrext ${libname}.$shrext'
-  soname_spec='${libname}${release}${major}.$shrext'
+  library_names_spec='${libname}${release}${versuffix}.$shared_ext 
${libname}${release}${major}.$shared_ext ${libname}.$shared_ext'
+  soname_spec='${libname}${release}${major}.$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext='$(test .$module = .yes && echo so || echo dylib)'
+  shrext='$(test .$module = .yes && echo dylib || echo so)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" 
| sed -e 's/libraries:/\nlibraries:/' | grep "^libraries:" | sed -e 
"s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g"`
   ;;
 
 dgux*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.$shrext'
-  soname_spec='${libname}${release}.${shrext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.$shared_ext'
+  soname_spec='${libname}${release}.${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -1246,12 +1248,12 @@
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext} $libname.${shrext}'
+      library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext} $libname.${shared_ext}'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}.${shrext}$versuffix 
$libname.${shrext}$versuffix'
+      library_names_spec='${libname}${release}.${shared_ext}$versuffix 
$libname.${shared_ext}$versuffix'
       need_version=yes
       ;;
   esac
@@ -1275,8 +1277,8 @@
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}${major} ${libname}.${shrext}'
-  soname_spec='${libname}${release}.${shrext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}${major} ${libname}.${shared_ext}'
+  soname_spec='${libname}${release}.${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   hardcode_into_libs=yes
   ;;
@@ -1292,8 +1294,8 @@
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
-    soname_spec='${libname}${release}.${shrext}$major'
+    library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
+    soname_spec='${libname}${release}.${shared_ext}$major'
     if test "X$HPUX_IA64_MODE" = X32; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 
/usr/local/lib"
     else
@@ -1304,8 +1306,8 @@
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
-    soname_spec='${libname}${release}.${shrext}$major'
+    library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
+    soname_spec='${libname}${release}.${shared_ext}$major'
     shrext="sl"
   fi
   # HP-UX runs *really* slowly unless shared libraries are mode 555.
@@ -1319,8 +1321,8 @@
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}.${shrext}$major'
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major ${libname}${release}.${shrext} 
$libname.${shrext}'
+  soname_spec='${libname}${release}.${shared_ext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major ${libname}${release}.${shared_ext} 
$libname.${shared_ext}'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -1347,12 +1349,11 @@
 
 # This must be Linux ELF.
 linux*)
-  shrext="so"
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
-  soname_spec='${libname}${release}.${shrext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
+  soname_spec='${libname}${release}.${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -1375,12 +1376,12 @@
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}.${shrext}$versuffix'
+    library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}.${shared_ext}$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major ${libname}${release}.${shrext} 
${libname}.${shrext}'
-    soname_spec='${libname}${release}.${shrext}$major'
+    library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major ${libname}${release}.${shared_ext} 
${libname}.${shared_ext}'
+    soname_spec='${libname}${release}.${shared_ext}$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -1390,7 +1391,7 @@
 
 newsos6)
   version_type=linux
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -1399,8 +1400,8 @@
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
-  soname_spec='${libname}${release}.${shrext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
+  soname_spec='${libname}${release}.${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -1409,7 +1410,7 @@
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}.${shrext}$versuffix'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}.${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
@@ -1430,7 +1431,7 @@
   libname_spec='$name'
   shrext="dll"
   need_lib_prefix=no
-  library_names_spec='$libname.${shrext} $libname.a'
+  library_names_spec='$libname.${shared_ext} $libname.a'
   dynamic_linker='OS/2 ld.exe'
   shlibpath_var=LIBPATH
   ;;
@@ -1439,8 +1440,8 @@
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}.${shrext}$major'
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
+  soname_spec='${libname}${release}.${shared_ext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc 
/usr/lib /usr/local/lib /var/shlib"
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
@@ -1448,8 +1449,8 @@
 
 sco3.2v5*)
   version_type=osf
-  soname_spec='${libname}${release}.${shrext}$major'
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
+  soname_spec='${libname}${release}.${shared_ext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -1457,8 +1458,8 @@
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
-  soname_spec='${libname}${release}.${shrext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
+  soname_spec='${libname}${release}.${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -1468,7 +1469,7 @@
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}.${shrext}$versuffix'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}.${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
@@ -1480,8 +1481,8 @@
 
 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
   version_type=linux
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
-  soname_spec='${libname}${release}.${shrext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
+  soname_spec='${libname}${release}.${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -1505,16 +1506,16 @@
 sysv4*MP*)
   if test -d /usr/nec ;then
     version_type=linux
-    library_names_spec='$libname.${shrext}.$versuffix 
$libname.${shrext}.$major $libname.${shrext}'
-    soname_spec='$libname.${shrext}.$major'
+    library_names_spec='$libname.${shared_ext}.$versuffix 
$libname.${shared_ext}.$major $libname.${shared_ext}'
+    soname_spec='$libname.${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 uts4*)
   version_type=linux
-  library_names_spec='${libname}${release}.${shrext}$versuffix 
${libname}${release}.${shrext}$major $libname.${shrext}'
-  soname_spec='${libname}${release}.${shrext}$major'
+  library_names_spec='${libname}${release}.${shared_ext}$versuffix 
${libname}${release}.${shared_ext}$major $libname.${shared_ext}'
+  soname_spec='${libname}${release}.${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -2732,6 +2733,7 @@
   ;;
 
   darwin* | rhapsody*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
     case "$host_os" in
     rhapsody* | darwin1.[[012]])
       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
@@ -2753,28 +2755,6 @@
     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
     ;;
 
-  darwin* | rhapsody*)
-    case "$host_os" in
-      rhapsody* | darwin1.[[012]])
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-      ;;
-    *) # Darwin 1.3 on
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined 
suppress'
-      ;;
-    esac
-
-    # FIXME: Relying on posixy $() will cause problems for
-    #        cross-compilation, but unfortunately the echo tests do not
-    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
-    #         `"' quotes if we put them in here... so don't!
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load 
-keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test 
.$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o 
$lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo 
-install_name $rpath/$soname $verstring)'
-    # We need to add '_' to the symbols in $export_symbols first
-    #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, 
$1)"' && strip -s $export_symbols'
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
-    ;;
-
   dgux*)
     case $cc_basename in
       ec++)
@@ -2911,8 +2891,8 @@
        # KCC will only create a shared library if the output file
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
        # to its proper name (with version) after linking.
-       _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | $SED -e 
"s/\.${shrext}\..*/\.${shrext}/"`; $CC $predep_objects $libobjs $deplibs 
$postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib 
$lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | $SED -e 
"s/\.${shrext}\..*/\.${shrext}/"`; $CC $predep_objects $libobjs $deplibs 
$postdep_objects $compiler_flags --soname $soname -o \$templib 
${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+       _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | $SED -e 
"s/\.${shared_ext}\..*/\.${shared_ext}/"`; $CC $predep_objects $libobjs 
$deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv 
\$templib $lib'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | $SED -e 
"s/\.${shared_ext}\..*/\.${shared_ext}/"`; $CC $predep_objects $libobjs 
$deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib 
${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
        # Commands to make compiler produce verbose output that lists
        # what "hidden" libraries, object files and flags are used when
        # linking a shared library.
@@ -2921,7 +2901,7 @@
        # explicitly linking system object files so we need to strip them
        # from the output so that they don't get included in the library
        # dependencies.
-       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o 
libconftest.$shrext 2>&1 | grep "ld"`; rm -f libconftest.$shrext; list=""; for 
z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; 
*) list="$list $z";;esac; done; echo $list'
+       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o 
libconftest.$shared_ext 2>&1 | grep "ld"`; rm -f libconftest.$shared_ext; 
list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; 
*.$objext);; *) list="$list $z";;esac; done; echo $list'
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -3000,7 +2980,7 @@
        # KCC will only create a shared library if the output file
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
        # to its proper name (with version) after linking.
-       _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | $SED -e 
"s/\.${shrext}\..*/\.${shrext}/"`; $CC $predep_objects $libobjs $deplibs 
$postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib 
$lib'
+       _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | $SED -e 
"s/\.${shared_ext}\..*/\.${shared_ext}/"`; $CC $predep_objects $libobjs 
$deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv 
\$templib $lib'
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -3060,7 +3040,7 @@
        # KCC will only create a shared library if the output file
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
        # to its proper name (with version) after linking.
-       _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | $SED -e 
"s/\.${shrext}\..*/\.${shrext}/"`; $CC $predep_objects $libobjs $deplibs 
$postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib 
$lib'
+       _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | $SED -e 
"s/\.${shared_ext}\..*/\.${shared_ext}/"`; $CC $predep_objects $libobjs 
$deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv 
\$templib $lib'
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -3828,7 +3808,7 @@
 libext="$libext"
 
 # Shared library suffix (normally "so").
-shrext="$shrext"
+shrext='$shrext'
 
 # Executable file suffix (normally "").
 exeext="$exeext"
@@ -3980,7 +3960,7 @@
 # Whether we need a single -rpath flag with a separated argument.
 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
 
-# Set to yes if using DIR/libNAME.${shrext} during linking hardcodes DIR into 
the
+# Set to yes if using DIR/libNAME.${shared_ext} during linking hardcodes DIR 
into the
 # resulting binary.
 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
 
@@ -5074,6 +5054,7 @@
       ;;
 
     darwin* | rhapsody*)
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
       case "$host_os" in
       rhapsody* | darwin1.[[012]])
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.318
diff -u -r1.318 ltmain.in
--- ltmain.in   1 Jan 2003 01:57:47 -0000       1.318
+++ ltmain.in   7 Jan 2003 04:51:35 -0000
@@ -2660,6 +2660,7 @@
       case $outputname in
       lib*)
        name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+       eval shared_ext=\"$shrext\"
        eval libname=\"$libname_spec\"
        ;;
       *)
@@ -2671,6 +2672,7 @@
        if test "$need_lib_prefix" != no; then
          # Add the "lib" prefix for modules if required
          name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+         eval shared_ext=\"$shrext\"
          eval libname=\"$libname_spec\"
        else
          libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
@@ -3385,6 +3387,7 @@
        fi
 
        # Get the real and link names of the library.
+       eval shared_ext=\"$shrext\"
        eval library_names=\"$library_names_spec\"
        set dummy $library_names
        realname="$2"

reply via email to

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