]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4: (dyld/darwin*) Much improved port.
authorWilfredo Sanchez <wsanchez@apple.com>
Sat, 16 Dec 2000 13:08:14 +0000 (13:08 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sat, 16 Dec 2000 13:08:14 +0000 (13:08 +0000)
* ltmain.in: (dyld/darwin*) Much improved port.

ChangeLog
libtool.m4
ltmain.in

index d44f10120a8122f04a009cec5a8dc88b636d2ac7..4b3888c13795977a8635086b9e7069cd2f80d5bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-12-16   Wilfredo Sanchez  <wsanchez@apple.com>
+
+       * libtool.m4: (dyld/darwin*) Much improved port.
+       * ltmain.in: (dyld/darwin*) Much improved port.
+       
 2000-12-16  Sascha Schumann <sascha@schumann.cx>
 
        * libtool.m4: Accept darwin as an alias for rhapsody.
index 89e2e4fe6cd9481088a509d4549f92d365bf5ff6..bdb75f9a64208fa59fd1afc8019f6a3706db4a0f 100644 (file)
@@ -1434,6 +1434,18 @@ else
     fix_srcfile_path='`cygpath -w "$srcfile"`'
     ;;
 
+  darwin* | rhapsody*)
+    allow_undefined_flag='-undefined warning'
+    [archive_cmds='$CC `if [ "$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'
+    hardcode_shlibpath_var=no
+    whole_archive_flag_spec='-all_load'
+    ;;
+    
   freebsd1*)
     ld_shlibs=no
     ;;
@@ -1549,12 +1561,6 @@ else
     hardcode_libdir_flag_spec='-rpath $libdir'
     hardcode_libdir_separator=:
     ;;
-  rhapsody*|darwin*)
-    archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linker_flags'
-    hardcode_libdir_flags_spec='-L$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
 
   sco3.2v5*)
     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
@@ -1799,6 +1805,15 @@ cygwin* | mingw* | pw32*)
   shlibpath_var=PATH
   ;;
 
+darwin*|rhapsody*)
+  need_lib_prefix=no
+  need_lib_prefix=no
+  library_names_spec='${libname}.`if [ "$module" = "yes"; then echo so; else echo dylib; fi`'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
 freebsd1*)
   dynamic_linker=no
   ;;
@@ -1963,14 +1978,6 @@ osf3* | osf4* | osf5*)
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
   ;;
 
-rhapsody*|darwin*)
-  version_type=sunos
-  library_names_spec='${libname}.so'
-  soname_spec='${libname}.so'
-  shlibpath_var=DYLD_LIBRARY_PATH
-  deplibs_check_method=pass_all
-  ;;
-
 sco3.2v5*)
   version_type=osf
   soname_spec='${libname}${release}.so$major'
@@ -3014,6 +3021,12 @@ 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`
+  ;;
+
 freebsd*)
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     case "$host_cpu" in
index 22dee29805d08778da33148a3bad24bebcacdfb9..c6bfb7eb5971026c8e8de08a3b0f9f35de96c335 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1026,6 +1026,10 @@ compiler."
            # These systems don't actually have c library (as such)
            continue
            ;;
+         *-*-rhapsody* | *-*-darwin*)
+           # Darwin C library is in the System framework
+           deplibs="$deplibs -framework System"
+           ;;
          esac
        elif test "$arg" = "-lm"; then
          case "$host" in
@@ -1033,6 +1037,10 @@ compiler."
            # These systems don't actually have math library (as such)
            continue
            ;;
+         *-*-rhapsody* | *-*-darwin*)
+           # Darwin math library is in the System framework
+           deplibs="$deplibs -framework System"
+           ;;
          esac
        fi
        deplibs="$deplibs $arg"
@@ -1059,7 +1067,7 @@ compiler."
          fast_install=no
          ;;
         *-*-rhapsody*|*-*-darwin*)
-         # rhapsody is a little odd...
+         # Darwin C library is in the System framework
          deplibs="$deplibs -framework System"
          ;;
        *)