freebsd-ports/games/xpuyopuyo/files/patch-ltmain.sh
Dmitry Marakasov 991a538711 - Fix build WITH_MIKMOD
PR:		125974
Submitted by:	Tsurutani Naoki <turutani at scphys dot kyoto-u dot ac dot jp>
Approved by:	maintainer timeout
2008-09-04 00:50:08 +00:00

41 lines
1.3 KiB
Bash

--- ltmain.sh.orig 2008-07-26 17:06:14.000000000 +0900
+++ ltmain.sh 2008-07-26 17:06:24.000000000 +0900
@@ -1710,6 +1710,38 @@
lib=
found=no
case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $deplib"
+ fi
+
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ ;;
+ *)
+ ;;
+ esac # linkmode
+
+ continue
+ ;;
-l*)
if test $linkmode != lib && test $linkmode != prog; then
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2