# Description: Fix ltmain.sh to handle -Wl,--as-needed properly
# Origin: vendor
# Forwarded: not-needed
Index: gtk2-engines-aurora2/ltmain.sh
===================================================================
--- gtk2-engines-aurora2.orig/ltmain.sh 2009-12-22 16:25:37.576986936 +0800
+++ gtk2-engines-aurora2/ltmain.sh 2009-12-22 16:25:49.569467206 +0800
@@ -1794,6 +1794,11 @@
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
;;
+ -Wl,--as-needed)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
-Wl,*)
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
arg=
@@ -2134,6 +2139,15 @@
lib=
found=no
case $deplib in
+ -Wl,--as-needed)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"