From 4d7921b819c9966eb0732a3e672f18833d65c7fc Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 14 Aug 2012 22:09:33 +0200 Subject: make configure set up QMAKE_DEFAULT_{INC,LIB}DIRS hard-coding it in unix.conf was no particularly good idea for hopefully obvious reasons. the windows version is so far just a stub that does what the makespecs hard-coded - more doesn't seem worth the effort. the guys interested in x-building may want to rectify it at some point, but it's not going to be easy. Change-Id: I8fedd841a8416f8c0c57018752eae9510b5d00d0 Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- configure | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 0b9eac8df3..cbd92daf06 100755 --- a/configure +++ b/configure @@ -2542,6 +2542,7 @@ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then exit 1 fi fi +TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS` GCC_MACHINE_DUMP= case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac @@ -2567,7 +2568,6 @@ fi # auto-detect support for separate debug info in objcopy if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then - TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS` TEST_OBJCOPY=`getXQMakeConf QMAKE_OBJCOPY` COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS" if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then @@ -2632,6 +2632,20 @@ else CFG_FRAMEWORK=no fi +# auto-detect default include and library search paths +gccout=`$TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null` +libdirs=`echo "$gccout" | sed -n -e 's/^LIBRARY_PATH=\(.*\)/\1/p'` +DEFAULT_LIBDIRS=`IFS=:; for i in $libdirs; do test -d "$i" && cd "$i" && pwd; done | sort -u` +DEFAULT_INCDIRS=`echo "$gccout" | awk ' +/^End of search/ { yup=0 } +yup { print substr($0, 2) } +/^\#include