fix all "qt style yes options" which start with -l

7de9d3709 broke them, because suddenly every -l* switch was parsed as a
library. fix this by re-arranging how the options are parsed.
this obsoletes d7ab351cdd as well, by being more generic.

fwiw, this syntax is stupid to start with, because all unknown -l*
options are implicitly libraries and create confusing configure
failures. emulating the compiler/linker command lines isn't such a great
idea ...

Task-number: QTBUG-29174
Change-Id: I11bac7a6f458664dff8cbe57ed9cd33a08d5e9ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-02-12 12:25:47 +01:00 committed by The Qt Project
parent ec145129c3
commit 1b69786a3f

34
configure vendored
View File

@ -1110,18 +1110,10 @@ while [ "$#" -gt 0 ]; do
VAL=`echo $1 | sed 's,-R,,'`
fi
;;
-largefile)
VAR="largefile"
VAL="yes"
;;
-l?*|-l)
-l) # -lfoo is handled differently
VAR="add_link"
if [ "$1" = "-l" ]; then
shift
VAL="$1"
else
VAL=`echo $1 | sed 's,-l,,'`
fi
shift
VAL="$1"
;;
-F?*|-F)
VAR="add_fpath"
@ -1132,14 +1124,10 @@ while [ "$#" -gt 0 ]; do
VAL=`echo $1 | sed 's,-F,,'`
fi
;;
-fw?*|-fw)
-fw) # -fwfoo is handled differently
VAR="add_framework"
if [ "$1" = "-fw" ]; then
shift
VAL="$1"
else
VAL=`echo $1 | sed 's,-fw,,'`
fi
shift
VAL="$1"
;;
-W*)
VAR="add_warn"
@ -2130,6 +2118,16 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
l*) # -lfoo
L_FLAGS="$L_FLAGS -l\"${VAR#l}\""
;;
fw*) # -fwfoo
if [ "$BUILD_ON_MAC" = "yes" ]; then
L_FLAGS="$L_FLAGS -framework \"${VAR#fw}\""
else
UNKNOWN_OPT=yes
fi
;;
*)
UNKNOWN_OPT=yes
;;