From c6b91576a6fbb45449261e48a72ad9a24e41bf3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Hunold?= Date: Tue, 7 Jan 2014 08:17:57 +0100 Subject: Use custom -I,-D and -L flags when building arch-test Needed for using alternate stdlib implementation like libc++ with clang. Change-Id: I1782f62f5e2ea95e6cff8a1ed646362c0a31645c Reviewed-by: Thiago Macieira Reviewed-by: Oswald Buddenhagen --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index b16b79fa81..aaa59bdf17 100755 --- a/configure +++ b/configure @@ -4153,7 +4153,7 @@ compileTest() # Use config.tests/arch/arch.pro to have the compiler tell us what the target architecture is OUTFILE=$outpath/arch.result -"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "target" +"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "target" $I_FLAGS $D_FLAGS $L_FLAGS if [ $? -eq 0 ]; then eval `cat "$OUTFILE"` else @@ -4166,7 +4166,7 @@ rm -f "$OUTFILE" 2>/dev/null if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then # Do the same test again, using the host compiler - SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "host" + SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "host" $I_FLAGS $D_FLAGS $L_FLAGS if [ $? -eq 0 ]; then eval `cat "$OUTFILE"` else -- cgit v1.2.3 From d94830035bba0efd411478d96268e43d927cc27a Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 14 Jan 2014 10:42:15 +0100 Subject: Run non-xcb X tests also with -no-xcb Passing -no-xcb disables xcb and related configuration tests completely so for example QT_NO_XRENDER is not defined. This results in linker errors in glxconvenience with -no-xcb since the XRender calls are compiled in without linking to the library. The XRender, XInput and such tests are not strictly xcb related and may be used from elsewhere, for example glxconvenience which has nothing to do with xcb. Therefore these tests are moved in configure so that they are run even when xcb is disabled. Task-number: QTBUG-35644 Change-Id: I77871612ea5f6711ecafd8ca53aac6c516c19e2e Reviewed-by: Oswald Buddenhagen --- configure | 72 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'configure') diff --git a/configure b/configure index aaa59bdf17..23ffd43ca9 100755 --- a/configure +++ b/configure @@ -5120,6 +5120,42 @@ if compileTest x11/xlib "XLib"; then QT_CONFIG="$QT_CONFIG xlib" fi +# auto-detect Xrender support +if [ "$CFG_XRENDER" != "no" ]; then + if compileTest x11/xrender "Xrender"; then + CFG_XRENDER=yes + QT_CONFIG="$QT_CONFIG xrender" + else + if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo "Xrender support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else + CFG_XRENDER=no + fi + fi +fi + +# auto-detect XInput2 support +if [ "$CFG_XINPUT2" != "no" ]; then + if compileTest x11/xinput2 "XInput2"; then + CFG_XINPUT2=yes + CFG_XINPUT=no + else + if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo "XInput2 support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else + CFG_XINPUT2=no + fi + fi +fi + if [ "$CFG_XCB" != "no" ]; then if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`" @@ -5179,42 +5215,6 @@ if [ "$CFG_XCB" != "no" ]; then QT_CONFIG="$QT_CONFIG xcb-sm" fi fi - - # auto-detect Xrender support - if [ "$CFG_XRENDER" != "no" ]; then - if compileTest x11/xrender "Xrender"; then - CFG_XRENDER=yes - QT_CONFIG="$QT_CONFIG xrender" - else - if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then - echo "Xrender support cannot be enabled due to functionality tests!" - echo " Turn on verbose messaging (-v) to $0 to see the final report." - echo " If you believe this message is in error you may use the continue" - echo " switch (-continue) to $0 to continue." - exit 101 - else - CFG_XRENDER=no - fi - fi - fi - - # auto-detect XInput2 support. Needed by xcb too. - if [ "$CFG_XINPUT2" != "no" ]; then - if compileTest x11/xinput2 "XInput2"; then - CFG_XINPUT2=yes - CFG_XINPUT=no - else - if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then - echo "XInput2 support cannot be enabled due to functionality tests!" - echo " Turn on verbose messaging (-v) to $0 to see the final report." - echo " If you believe this message is in error you may use the continue" - echo " switch (-continue) to $0 to continue." - exit 101 - else - CFG_XINPUT2=no - fi - fi - fi else if [ "$CFG_XCB" != "auto" ]; then echo "The test for linking against libxcb failed!" -- cgit v1.2.3 From bd57e8638866e4f74922dd7a644c6bc0c212a585 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 5 Dec 2013 19:44:09 +0100 Subject: consistently use single quotes to quote sed & tr arguments ... except where they actually contain variable expansions. unescaped backslashes in double quoted strings aren't nice, and apparently actually break with old solaris shells. Task-number: QTBUG-14167 Change-Id: I703694b6ac7ab71d9293c049d77212e20dd5bcb0 Reviewed-by: Thiago Macieira --- configure | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 23ffd43ca9..9646fd31e5 100755 --- a/configure +++ b/configure @@ -95,7 +95,7 @@ if [ x"$1" = x"-top-level" ]; then fi # later cache the command line in config.status -OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"` +OPT_CMDLINE=`echo $@ | sed 's,-v ,,g; s,-v$,,g'` # initialize global variables QMAKE_SWITCHES= @@ -170,7 +170,7 @@ expandQMakeConf() { while read line; do case "$line" in include*) - inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"` + inc_file=`echo "$line" | sed -n -e '/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p'` current_dir=`dirname "$1"` conf_file="$current_dir/$inc_file" if [ ! -f "$conf_file" ]; then @@ -450,7 +450,7 @@ resolveDeviceMkspec() match_count=$(echo "$result" | wc -w) if [ "$match_count" -gt 1 ]; then echo >&2 "Error: Multiple matches for device '$1'. Candidates are:" - tabbed_result=$(echo "$result" | sed "s,^, ,") + tabbed_result=$(echo "$result" | sed 's,^, ,') echo >&2 "$tabbed_result" echo "undefined" elif [ "$match_count" -eq 0 ]; then @@ -828,33 +828,33 @@ while [ "$#" -gt 0 ]; do case "$1" in #Autoconf style options --enable-*) - VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"` + VAR=`echo $1 | sed 's,^--enable-\(.*\),\1,'` VAL=yes ;; --disable-*) - VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"` + VAR=`echo $1 | sed 's,^--disable-\(.*\),\1,'` VAL=no ;; --*=*) - VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"` - VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"` + VAR=`echo $1 | sed 's,^--\(.*\)=.*,\1,'` + VAL=`echo $1 | sed 's,^--.*=\(.*\),\1,'` ;; --no-*) - VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"` + VAR=`echo $1 | sed 's,^--no-\(.*\),\1,'` VAL=no ;; --*) - VAR=`echo $1 | sed "s,^--\(.*\),\1,"` + VAR=`echo $1 | sed 's,^--\(.*\),\1,'` VAL=yes ;; #Qt plugin options -no-*-*|-plugin-*-*|-qt-*-*) - VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"` - VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"` + VAR=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'` + VAL=`echo $1 | sed 's,^-\([^-]*\).*,\1,'` ;; #Qt style no options -no-*) - VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"` + VAR=`echo $1 | sed 's,^-no-\(.*\),\1,'` VAL=no ;; #Qt style options that pass an argument @@ -899,14 +899,14 @@ while [ "$#" -gt 0 ]; do -android-ndk-host| \ -android-arch| \ -android-toolchain-version) - VAR=`echo $1 | sed "s,^-\(.*\),\1,"` + VAR=`echo $1 | sed 's,^-\(.*\),\1,'` shift VAL="$1" ;; #Qt style complex options in one command -enable-*|-disable-*) - VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"` - VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"` + VAR=`echo $1 | sed 's,^-\([^-]*\)-.*,\1,'` + VAL=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'` ;; -system-proxies) VAR=system-proxies @@ -918,8 +918,8 @@ while [ "$#" -gt 0 ]; do ;; #Qt Builtin/System style options -no-*|-system-*|-qt-*) - VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"` - VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"` + VAR=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'` + VAL=`echo $1 | sed 's,^-\([^-]*\)-.*,\1,'` ;; #Options that cannot be generalized -k|-continue) @@ -947,7 +947,7 @@ while [ "$#" -gt 0 ]; do fi ;; -hostprefix) - VAR=`echo $1 | sed "s,^-\(.*\),\1,"` + VAR=`echo $1 | sed 's,^-\(.*\),\1,'` # this option may or may not be followed by an argument if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then VAL=$outpath @@ -1037,7 +1037,7 @@ while [ "$#" -gt 0 ]; do ;; #General options, including Qt style yes options -*) - VAR=`echo $1 | sed "s,^-\(.*\),\1,"` + VAR=`echo $1 | sed 's,^-\(.*\),\1,'` VAL="yes" ;; *) @@ -1395,7 +1395,7 @@ while [ "$#" -gt 0 ]; do fi ;; feature-*) - FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + FEATURE=`echo $VAR | sed 's,^[^-]*-\([^-]*\),\1,' | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if [ "$VAL" = "no" ]; then QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE" elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then @@ -1907,8 +1907,8 @@ while [ "$#" -gt 0 ]; do fi # now $VAL is "no", "qt", or "plugin" OPT="$VAL" - VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"` - VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"` + VAL=`echo $VAR | sed 's,^[^-]*-\([^-]*\).*,\1,'` + VAR=`echo $VAR | sed 's,^\([^-]*\).*,\1,'` # Grab the available values case "$VAR" in @@ -1974,7 +1974,7 @@ while [ "$#" -gt 0 ]; do fi elif [ "$VAL" = "no" ]; then if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then - QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"` + QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed 's, -d,,'` else OPT_VERBOSE=no fi @@ -3044,7 +3044,7 @@ elif [ "$Edition" = "Preview" ]; then done elif [ "$Edition" != "OpenSource" ]; then if [ -n "$ExpiryDate" ]; then - ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"` + ExpiryDate=`echo $ExpiryDate | sed -e 's,-,,g' | tr -d '\n\r'` [ -z "$ExpiryDate" ] && ExpiryDate="0" Today=`date +%Y%m%d` if [ "$Today" -gt "$ExpiryDate" ]; then @@ -3564,7 +3564,7 @@ if [ -z "$CFG_BUILD_PARTS" ]; then # don't build tools by default when cross-compiling if [ "$PLATFORM" != "$XPLATFORM" ]; then - CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"` + CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed 's, tools,,g'` fi fi for nobuild in $CFG_NOBUILD_PARTS; do @@ -4015,7 +4015,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1 - sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp" + sed 's,^.*/\([^/]*.o\):,\1:,g' "$mkfile" >"$mkfile.tmp" sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile" rm "$mkfile.tmp" fi @@ -6322,10 +6322,10 @@ EOF cfgdNeg= if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then # QT_NO_option can be forcefully turned on by QT_option - cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"` + cfgdNeg=`echo $cfgd | sed 's,QT_NO_,QT_,'` elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then # QT_option can be forcefully turned off by QT_NO_option - cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"` + cfgdNeg=`echo $cfgd | sed 's,QT_,QT_NO_,'` fi if [ -z $cfgdNeg ]; then -- cgit v1.2.3 From eae8abbc188db559bb1509dbcab6807252edc32e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 14 Jan 2014 15:30:35 +0100 Subject: Fix detecting the system path The normalize function don't do well it's job. Given a path like that, the regexp "/[^/]+/.." will match 3 times /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../include/c++/4.8.2 [ ][ ][ ] The second match is wrong as it will remove /../.. Use sub instead of gsub which only remove one match at the time. Change-Id: I0657bc603e521c9e53b9f50d2481dce184b64bad Reviewed-by: Thiago Macieira Reviewed-by: Oswald Buddenhagen --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 9646fd31e5..90c349cfc7 100755 --- a/configure +++ b/configure @@ -3508,7 +3508,7 @@ function normalize(dir) { do { odir = dir - gsub(/\/[^\/]+\/\.\./, "", dir) + sub(/\/[^\/]+\/\.\./, "", dir) } while (dir != odir); do { odir = dir -- cgit v1.2.3