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
This commit is contained in:
parent
9a9e553e1d
commit
22ddc1ded0
1 changed files with 64 additions and 4 deletions
66
ltmain.sh
66
ltmain.sh
|
@ -1148,6 +1148,19 @@ EOF
|
|||
finalize_command="$finalize_command $qarg"
|
||||
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\""
|
||||
prev=
|
||||
|
@ -1459,6 +1472,11 @@ EOF
|
|||
continue
|
||||
;;
|
||||
|
||||
-framework)
|
||||
prev=framework
|
||||
continue
|
||||
;;
|
||||
|
||||
# Some other compiler flag.
|
||||
-* | +*)
|
||||
# Unknown arguments in both finalize_command and compile_command need
|
||||
|
@ -1868,6 +1886,18 @@ EOF
|
|||
fi
|
||||
fi
|
||||
;; # -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*)
|
||||
case $linkmode in
|
||||
lib)
|
||||
|
@ -1996,6 +2026,13 @@ EOF
|
|||
*) . ./$lib ;;
|
||||
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" ||
|
||||
test "$linkmode,$pass" = "prog,scan" ||
|
||||
{ test "$linkmode" != prog && test "$linkmode" != lib; }; then
|
||||
|
@ -2568,9 +2605,13 @@ EOF
|
|||
if test -f "$path/$depdepl" ; then
|
||||
depdepl="$path/$depdepl"
|
||||
fi
|
||||
newlib_search_path="$newlib_search_path $path"
|
||||
path=""
|
||||
# do not add paths which are already there
|
||||
case " $newlib_search_path " in
|
||||
*" $path "*) ;;
|
||||
*) newlib_search_path="$newlib_search_path $path";;
|
||||
esac
|
||||
fi
|
||||
path=""
|
||||
;;
|
||||
*)
|
||||
path="-L$path"
|
||||
|
@ -2594,6 +2635,15 @@ EOF
|
|||
*) continue ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
*.framework)
|
||||
case $host in
|
||||
*-*-darwin*)
|
||||
depdepl="$deplib"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
*) continue ;;
|
||||
esac
|
||||
case " $deplibs " in
|
||||
|
@ -3446,6 +3496,13 @@ EOF
|
|||
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!
|
||||
deplibs=$newdeplibs
|
||||
fi
|
||||
|
@ -4025,12 +4082,15 @@ EOF
|
|||
esac
|
||||
|
||||
case $host in
|
||||
*darwin*)
|
||||
*-*-darwin*)
|
||||
# Don't allow lazy linking, it breaks C++ global constructors
|
||||
if test "$tagname" = CXX ; then
|
||||
compile_command="$compile_command ${wl}-bind_at_load"
|
||||
finalize_command="$finalize_command ${wl}-bind_at_load"
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue