]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (dependency_libs) [darwin]: Remove -framework stuff from
authorPeter O'Gorman <peter@pogma.com>
Mon, 21 Jun 2004 14:52:57 +0000 (14:52 +0000)
committerPeter O'Gorman <peter@pogma.com>
Mon, 21 Jun 2004 14:52:57 +0000 (14:52 +0000)
dependency_libs. Instead, invent a new .la var "inherited_linker_flags"
to keep any linker flags which should be used when linking the library,
but are outside the usual -L -l, -R etc that can be used in
dependency_libs. Any unusual flags in dependency_libs cause recent
versions of libtool to die with "cannot find the library `'", so
it is required to move frameworks out of there. :(

ChangeLog
ltmain.in

index e60159bd74f2172b95ec40b63f2cfb718aeb9882..aec4d61aaac913e247da5c7a98e3a4c51255586d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-06-21  Peter O'Gorman  <peter@pogma.com>
+
+       * ltmain.in (dependency_libs) [darwin]: Remove -framework stuff from
+       dependency_libs. Instead, invent a new .la var "inherited_linker_flags"
+       to keep any linker flags which should be used when linking the library,
+       but are outside the usual -L -l, -R etc that can be used in
+       dependency_libs. Any unusual flags in dependency_libs cause recent
+       versions of libtool to die with "cannot find the library `'", so
+       it is required to move frameworks out of there. :(
+       
 2004-06-21  Gary V. Vaughan  <gary@gnu.org>
 
        From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>:
index 93611e56a0f52d86668fd967bfed1b089a1ba748..aa8cff5bbc5893e78fba48688161dc3fa20e891d 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1904,7 +1904,7 @@ EOF
        case $pass in
        dlopen) libs="$dlfiles" ;;
        dlpreopen) libs="$dlprefiles" ;;
-       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+       link) libs="$deplibs %DEPLIBS% $dependency_libs $inherited_linker_flags" ;;
        esac
       fi
       if test "$pass" = dlopen; then
@@ -2004,7 +2004,10 @@ EOF
          else
            deplibs="$deplib $deplibs"
            if test "$linkmode" = lib ; then
-             newdependency_libs="$deplib $newdependency_libs"
+               case "$inherited_linker_flags " in
+                   *" $deplib "*) ;;
+                   * ) inherited_linker_flags="$inherited_linker_flags $deplib" ;;
+               esac
            fi
          fi
          continue
@@ -2126,6 +2129,7 @@ EOF
        libdir=
        library_names=
        old_library=
+       inherited_linker_flags=
        # If the library was installed with an old release of libtool,
        # it will not redefine variables installed, or shouldnotlink
        installed=yes
@@ -2139,8 +2143,11 @@ EOF
 
        case $host in
        *-*-darwin*)
-         # Convert "-framework foo" to "foo.ltframework" in dependency_libs
-         test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+         # Convert "-framework foo" to "foo.ltframework"
+         if test -n "$inherited_linker_flags"; then
+           inherited_linker_flags=`$echo "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+         fi
+         dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
          ;;
        esac
 
@@ -2689,7 +2696,7 @@ EOF
 
          if test "$link_all_deplibs" != no; then
            # Add the search paths of all dependency libraries
-           for deplib in $dependency_libs; do
+           for deplib in $dependency_libs $inherited_linker_flags; do
              case $deplib in
              -L*) path="$deplib" ;;
              *.la)
@@ -2763,14 +2770,6 @@ EOF
                esac
                ;;
 
-             *.ltframework)
-               case $host in
-                 *-*-darwin*)
-                   depdepl="$deplib"
-                   ;;
-               esac
-               ;;
-
              *) continue ;;
              esac
              case " $deplibs " in
@@ -3635,16 +3634,17 @@ EOF
            fi
          fi
        fi
-       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
-       case $host in
-         *-*-darwin*)
-           newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-           dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-           ;;
-       esac
        # Done checking deplibs!
        deplibs=$newdeplibs
       fi
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+       *-*-darwin*)
+         newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         inherited_linker_flags=`$echo "X $inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         deplibs=`$echo "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         ;;
+      esac
 
       # All the library-specific variables (install_libdir is set above).
       library_names=
@@ -5518,6 +5518,9 @@ library_names='$library_names'
 # The name of the static archive.
 old_library='$old_library'
 
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$inherited_linker_flags'
+
 # Libraries that this one depends upon.
 dependency_libs='$dependency_libs'