Commit 22ddc1de authored by Sam Lantinga's avatar Sam Lantinga

Date: Mon, 17 Nov 2003 23:12:59 +0100

From: Max Horn
Subject: SDL building "the unix way" on OS X

I just noticed that building current SDL CVS "the unix way" (using
configure/make) is (and has been for some time, it seems) broken.
That's because Sam updated to a newer libtool version, which removed my
"-framework" patches.

Attached is a patch which once again makes ltmain.sh aware of
"-framework". Note that this is simply a backport of the corresponding
changes in libtool CVS (i.e. the next libtool release will contain
those same changes).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40742
parent 9a9e553e
...@@ -1148,6 +1148,19 @@ EOF ...@@ -1148,6 +1148,19 @@ EOF
finalize_command="$finalize_command $qarg" finalize_command="$finalize_command $qarg"
continue continue
;; ;;
framework)
case $host in
*-*-darwin*)
case "$deplibs " in
*" $qarg.framework "*) ;;
*) deplibs="$deplibs $qarg.framework" # this is fixed later
;;
esac
;;
esac
prev=
continue
;;
*) *)
eval "$prev=\"\$arg\"" eval "$prev=\"\$arg\""
prev= prev=
...@@ -1459,6 +1472,11 @@ EOF ...@@ -1459,6 +1472,11 @@ EOF
continue continue
;; ;;
-framework)
prev=framework
continue
;;
# Some other compiler flag. # Some other compiler flag.
-* | +*) -* | +*)
# Unknown arguments in both finalize_command and compile_command need # Unknown arguments in both finalize_command and compile_command need
...@@ -1868,6 +1886,18 @@ EOF ...@@ -1868,6 +1886,18 @@ EOF
fi fi
fi fi
;; # -l ;; # -l
*.framework)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
if test "$linkmode" = lib ; then
newdependency_libs="$deplib $newdependency_libs"
fi
fi
continue
;;
-L*) -L*)
case $linkmode in case $linkmode in
lib) lib)
...@@ -1996,6 +2026,13 @@ EOF ...@@ -1996,6 +2026,13 @@ EOF
*) . ./$lib ;; *) . ./$lib ;;
esac esac
case $host in
*-*-darwin*)
# Convert "-framework foo" to "foo.framework" in dependency_libs
test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.framework/g'`
;;
esac
if test "$linkmode,$pass" = "lib,link" || if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan" || test "$linkmode,$pass" = "prog,scan" ||
{ test "$linkmode" != prog && test "$linkmode" != lib; }; then { test "$linkmode" != prog && test "$linkmode" != lib; }; then
...@@ -2568,14 +2605,18 @@ EOF ...@@ -2568,14 +2605,18 @@ EOF
if test -f "$path/$depdepl" ; then if test -f "$path/$depdepl" ; then
depdepl="$path/$depdepl" depdepl="$path/$depdepl"
fi fi
newlib_search_path="$newlib_search_path $path" # do not add paths which are already there
path="" case " $newlib_search_path " in
*" $path "*) ;;
*) newlib_search_path="$newlib_search_path $path";;
esac
fi fi
path=""
;; ;;
*) *)
path="-L$path" path="-L$path"
;; ;;
esac esac
;; ;;
-l*) -l*)
...@@ -2594,6 +2635,15 @@ EOF ...@@ -2594,6 +2635,15 @@ EOF
*) continue ;; *) continue ;;
esac esac
;; ;;
*.framework)
case $host in
*-*-darwin*)
depdepl="$deplib"
;;
esac
;;
*) continue ;; *) continue ;;
esac esac
case " $deplibs " in case " $deplibs " in
...@@ -3446,6 +3496,13 @@ EOF ...@@ -3446,6 +3496,13 @@ EOF
fi fi
fi fi
fi fi
# Time to change all our "foo.framework" stuff back to "-framework foo"
case $host in
*-*-darwin*)
newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
;;
esac
# Done checking deplibs! # Done checking deplibs!
deplibs=$newdeplibs deplibs=$newdeplibs
fi fi
...@@ -4025,12 +4082,15 @@ EOF ...@@ -4025,12 +4082,15 @@ EOF
esac esac
case $host in case $host in
*darwin*) *-*-darwin*)
# Don't allow lazy linking, it breaks C++ global constructors # Don't allow lazy linking, it breaks C++ global constructors
if test "$tagname" = CXX ; then if test "$tagname" = CXX ; then
compile_command="$compile_command ${wl}-bind_at_load" compile_command="$compile_command ${wl}-bind_at_load"
finalize_command="$finalize_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load"
fi fi
# Time to change all our "foo.framework" stuff back to "-framework foo"
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
;; ;;
esac esac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment