From 1b69786a3f08b642576462e9882533839c7d3c9d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Feb 2013 12:25:47 +0100 Subject: [PATCH] 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 Reviewed-by: Joerg Bornemann --- configure | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 2d6dd73c4e..5575ecb6a0 100755 --- a/configure +++ b/configure @@ -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 ;;