]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4: Fixed support for Darwin and Rhapsody. Now correctly
authorChristoph Pfisterer <cp@chrisp.de>
Sun, 1 Apr 2001 13:46:08 +0000 (13:46 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sun, 1 Apr 2001 13:46:08 +0000 (13:46 +0000)
hardcodes the library path and adds versioning. Other small
fixes.
* ltmain.in: Fixed special cases for libc and libm on Rhapsody and
Darwin. One of them was misplaced. Added version_type case for
Rhapsody and Darwin, named "darwin".

ChangeLog
NEWS
libtool.m4
ltmain.in

index 72aeaac55a737093ca557e1dc2170ea3391eb274..84b1424bbaf4ed6816e4a2663c4cf127ec529dd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-04-01  Christoph Pfisterer  <cp@chrisp.de>
+
+       * libtool.m4: Fixed support for Darwin and Rhapsody. Now correctly
+       hardcodes the library path and adds versioning. Other small
+       fixes.
+       * ltmain.in: Fixed special cases for libc and libm on Rhapsody and
+       Darwin. One of them was misplaced. Added version_type case for
+       Rhapsody and Darwin, named "darwin".
+
 2001-03-31  Gary V. Vaughan  <gvv@techie.com>
 
        * ltmain.in: Remove the code for stripping duplicate deplibs
diff --git a/NEWS b/NEWS
index 17f0a16171d588f9892ccbb5216b41decaa2a437..856adf8c64dba9dcb5f1128badaa35fd6a1edc33 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,8 +26,8 @@ New in 1.3d: 2000-??-??; CVS version 1.3c, Libtool team:
 * libltdl can now be built as a dll with win32.
 * m4 macros needed to configure libltdl split out into libltdl/ltdl.m4.
 * New port to NEWS-OS Release 6.
-* Improved support for mingw32, NetBSD, Compaq Tru64 V5.0 and Digital
-  Unix V4.*.
+* Improved support for darwin (rhapsody), mingw32, NetBSD, Compaq Tru64 V5.0
+  and Digital Unix V4.*.
 * Initial support for ia64 linux.
 * Initial support for a.out freebsd shared libs.
 * Initial support for Paul Sokolovsky's pw32 POSIX over win32 layer.
index 9222786edcb9dc34e715a91e6c3bcc422e90b52a..d9ed6c96302bef54a6cdc98d7fcdd35a894a4c39 100644 (file)
@@ -807,9 +807,6 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic,
     lt_cv_prog_cc_static='-static'
 
     case $host_os in
-    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
     aix*)
       # Below there is a dirty hack to force normal static linking with -ldl
       # The problem is because libdl dynamically linked with both libc and
@@ -819,17 +816,25 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic,
       # we not sure about C++ programs.
       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
       ;;
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_cv_prog_cc_pic='-DDLL_EXPORT'
-      ;;
     amigaos*)
       # FIXME: we need at least 68020 code to build shared libraries, but
       # adding the `-m68020' flag to GCC prevents building anything better,
       # like `-m68040'.
       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
       ;;
+    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_cv_prog_cc_pic='-fno-common'
+      ;;
+    cygwin* | mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_cv_prog_cc_pic='-DDLL_EXPORT'
+      ;;
     sysv4*MP*)
       if test -d /usr/nec; then
         lt_cv_prog_cc_pic=-Kconform_pic
@@ -1454,15 +1459,13 @@ else
     ;;
 
   darwin* | rhapsody*)
-    allow_undefined_flag='-undefined warning'
-    archive_cmds='$CC `if test "$module" = "yes"; then echo -bundle; else
-      echo -dynamiclib; fi` -o $lib $libobjs $deplibs $linkopts'
-    archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
-    ## What we need is to hardcode the path to the library, not the search path
-    #hardcode_direct=yes
-    #hardcode_libdir_flag_spec='-install_name $libdir/$lib'
+    allow_undefined_flag='-undefined suppress'
+    archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`'
+    # We need to add '_' to the symbols in $export_symbols first
+    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+    hardcode_direct=yes
     hardcode_shlibpath_var=no
-    whole_archive_flag_spec='-all_load'
+    whole_archive_flag_spec='-all_load $convenience'
     ;;
 
   freebsd1*)
@@ -1859,12 +1862,14 @@ cygwin* | mingw* | pw32*)
   ;;
 
 darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}.`if test "$module" = "yes"; then echo so; else echo dylib; fi`'
+  library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`'
+  soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  postinstall_cmds='chmod +x $lib'
   ;;
 
 freebsd1*)
@@ -3064,10 +3069,16 @@ cygwin* | mingw* | pw32*)
   lt_cv_file_magic_cmd='$OBJDUMP -f'
   ;;
 
-darwin*|rhapsody*)
-  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
-  lt_cv_file_magiic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
+darwin* | rhapsody*)
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  case "$host_os" in
+  rhapsody* | darwin1.[012])
+    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
+    ;;
+  *) # Darwin 1.3 on
+    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+    ;;
+  esac
   ;;
 
 freebsd*)
index 2ef4ef52a2bf72d2edd247bb7022c9e15555e0f0..c93aec8eb5ea140800b61433f6bee464573c5022 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1027,9 +1027,10 @@ compiler."
            # These systems don't actually have c library (as such)
            continue
            ;;
-         *-*-rhapsody* | *-*-darwin*)
-           # Darwin C library is in the System framework
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C library is in the System framework
            deplibs="$deplibs -framework System"
+           continue
            ;;
          esac
        elif test "$arg" = "-lm"; then
@@ -1038,9 +1039,10 @@ compiler."
            # These systems don't actually have math library (as such)
            continue
            ;;
-         *-*-rhapsody* | *-*-darwin*)
-           # Darwin math library is in the System framework
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody math library is in the System framework
            deplibs="$deplibs -framework System"
+           continue
            ;;
          esac
        fi
@@ -1067,10 +1069,6 @@ compiler."
          $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
          fast_install=no
          ;;
-        *-*-rhapsody* | *-*-darwin*)
-         # Darwin C library is in the System framework
-         deplibs="$deplibs -framework System"
-         ;;
        *)
          no_install=yes
          ;;
@@ -2243,6 +2241,26 @@ compiler."
        case $version_type in
        none) ;;
 
+       darwin)
+         # Like Linux, but with the current version available in
+         # verstring for coding it into the library header
+         major=.`expr $current - $age`
+         versuffix="$major.$age.$revision"
+         # Darwin ld doesn't like 0 for these options...
+         minor_current=`expr $current + 1`
+         verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+         ;;
+
+       freebsd-aout)
+         major=".$current"
+         versuffix=".$current.$revision";
+         ;;
+
+       freebsd-elf)
+         major=".$current"
+         versuffix=".$current";
+         ;;
+
        irix)
          major=`expr $current - $age + 1`
          verstring="sgi$major.$revision"
@@ -2287,16 +2305,6 @@ compiler."
          versuffix=".$current.$revision"
          ;;
 
-       freebsd-aout)
-         major=".$current"
-         versuffix=".$current.$revision";
-         ;;
-
-       freebsd-elf)
-         major=".$current"
-         versuffix=".$current";
-         ;;
-
        windows)
          # Use '-' rather than '.', since we only want one
          # extension on DOS 8.3 filesystems.
@@ -2404,6 +2412,10 @@ compiler."
          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
            # these systems don't actually have a c library (as such)!
            ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C library is in the System framework
+           deplibs="$deplibs -framework System"
+           ;;
          *)
            # Add libc to deplibs on all other systems if necessary.
            if test $build_libtool_need_lc = "yes"; then