comparison ltmain.sh @ 741:97b9c301df94

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).
author Sam Lantinga <slouken@libsdl.org>
date Tue, 18 Nov 2003 14:25:12 +0000
parents 0f4f974d0201
children f9d0e03fc2ff
comparison
equal deleted inserted replaced
740:e70f80e98f60 741:97b9c301df94
1146 prev= 1146 prev=
1147 compile_command="$compile_command $qarg" 1147 compile_command="$compile_command $qarg"
1148 finalize_command="$finalize_command $qarg" 1148 finalize_command="$finalize_command $qarg"
1149 continue 1149 continue
1150 ;; 1150 ;;
1151 framework)
1152 case $host in
1153 *-*-darwin*)
1154 case "$deplibs " in
1155 *" $qarg.framework "*) ;;
1156 *) deplibs="$deplibs $qarg.framework" # this is fixed later
1157 ;;
1158 esac
1159 ;;
1160 esac
1161 prev=
1162 continue
1163 ;;
1151 *) 1164 *)
1152 eval "$prev=\"\$arg\"" 1165 eval "$prev=\"\$arg\""
1153 prev= 1166 prev=
1154 continue 1167 continue
1155 ;; 1168 ;;
1454 continue 1467 continue
1455 ;; 1468 ;;
1456 1469
1457 -XCClinker) 1470 -XCClinker)
1458 prev=xcclinker 1471 prev=xcclinker
1472 continue
1473 ;;
1474
1475 -framework)
1476 prev=framework
1459 continue 1477 continue
1460 ;; 1478 ;;
1461 1479
1462 # Some other compiler flag. 1480 # Some other compiler flag.
1463 -* | +*) 1481 -* | +*)
1866 *) ;; 1884 *) ;;
1867 esac 1885 esac
1868 fi 1886 fi
1869 fi 1887 fi
1870 ;; # -l 1888 ;; # -l
1889 *.framework)
1890 if test "$linkmode,$pass" = "prog,link"; then
1891 compile_deplibs="$deplib $compile_deplibs"
1892 finalize_deplibs="$deplib $finalize_deplibs"
1893 else
1894 deplibs="$deplib $deplibs"
1895 if test "$linkmode" = lib ; then
1896 newdependency_libs="$deplib $newdependency_libs"
1897 fi
1898 fi
1899 continue
1900 ;;
1871 -L*) 1901 -L*)
1872 case $linkmode in 1902 case $linkmode in
1873 lib) 1903 lib)
1874 deplibs="$deplib $deplibs" 1904 deplibs="$deplib $deplibs"
1875 test "$pass" = conv && continue 1905 test "$pass" = conv && continue
1992 2022
1993 # Read the .la file 2023 # Read the .la file
1994 case $lib in 2024 case $lib in
1995 */* | *\\*) . $lib ;; 2025 */* | *\\*) . $lib ;;
1996 *) . ./$lib ;; 2026 *) . ./$lib ;;
2027 esac
2028
2029 case $host in
2030 *-*-darwin*)
2031 # Convert "-framework foo" to "foo.framework" in dependency_libs
2032 test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.framework/g'`
2033 ;;
1997 esac 2034 esac
1998 2035
1999 if test "$linkmode,$pass" = "lib,link" || 2036 if test "$linkmode,$pass" = "lib,link" ||
2000 test "$linkmode,$pass" = "prog,scan" || 2037 test "$linkmode,$pass" = "prog,scan" ||
2001 { test "$linkmode" != prog && test "$linkmode" != lib; }; then 2038 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2566 depdepl=$tmp 2603 depdepl=$tmp
2567 done 2604 done
2568 if test -f "$path/$depdepl" ; then 2605 if test -f "$path/$depdepl" ; then
2569 depdepl="$path/$depdepl" 2606 depdepl="$path/$depdepl"
2570 fi 2607 fi
2571 newlib_search_path="$newlib_search_path $path" 2608 # do not add paths which are already there
2572 path="" 2609 case " $newlib_search_path " in
2610 *" $path "*) ;;
2611 *) newlib_search_path="$newlib_search_path $path";;
2612 esac
2573 fi 2613 fi
2614 path=""
2574 ;; 2615 ;;
2575 *) 2616 *)
2576 path="-L$path" 2617 path="-L$path"
2577 ;; 2618 ;;
2578 esac 2619 esac
2579 2620
2580 ;; 2621 ;;
2581 -l*) 2622 -l*)
2582 case $host in 2623 case $host in
2583 *-*-darwin*) 2624 *-*-darwin*)
2592 path="" 2633 path=""
2593 ;; 2634 ;;
2594 *) continue ;; 2635 *) continue ;;
2595 esac 2636 esac
2596 ;; 2637 ;;
2638
2639 *.framework)
2640 case $host in
2641 *-*-darwin*)
2642 depdepl="$deplib"
2643 ;;
2644 esac
2645 ;;
2646
2597 *) continue ;; 2647 *) continue ;;
2598 esac 2648 esac
2599 case " $deplibs " in 2649 case " $deplibs " in
2600 *" $depdepl "*) ;; 2650 *" $depdepl "*) ;;
2601 *) deplibs="$deplibs $depdepl" ;; 2651 *) deplibs="$deplibs $depdepl" ;;
3444 build_libtool_libs=no 3494 build_libtool_libs=no
3445 fi 3495 fi
3446 fi 3496 fi
3447 fi 3497 fi
3448 fi 3498 fi
3499 # Time to change all our "foo.framework" stuff back to "-framework foo"
3500 case $host in
3501 *-*-darwin*)
3502 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
3503 dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
3504 ;;
3505 esac
3449 # Done checking deplibs! 3506 # Done checking deplibs!
3450 deplibs=$newdeplibs 3507 deplibs=$newdeplibs
3451 fi 3508 fi
3452 3509
3453 # All the library-specific variables (install_libdir is set above). 3510 # All the library-specific variables (install_libdir is set above).
4023 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 4080 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4024 ;; 4081 ;;
4025 esac 4082 esac
4026 4083
4027 case $host in 4084 case $host in
4028 *darwin*) 4085 *-*-darwin*)
4029 # Don't allow lazy linking, it breaks C++ global constructors 4086 # Don't allow lazy linking, it breaks C++ global constructors
4030 if test "$tagname" = CXX ; then 4087 if test "$tagname" = CXX ; then
4031 compile_command="$compile_command ${wl}-bind_at_load" 4088 compile_command="$compile_command ${wl}-bind_at_load"
4032 finalize_command="$finalize_command ${wl}-bind_at_load" 4089 finalize_command="$finalize_command ${wl}-bind_at_load"
4033 fi 4090 fi
4091 # Time to change all our "foo.framework" stuff back to "-framework foo"
4092 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
4093 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
4034 ;; 4094 ;;
4035 esac 4095 esac
4036 4096
4037 compile_command="$compile_command $compile_deplibs" 4097 compile_command="$compile_command $compile_deplibs"
4038 finalize_command="$finalize_command $finalize_deplibs" 4098 finalize_command="$finalize_command $finalize_deplibs"