[Development] DEFAULT_INCDIR and DEFAULT_LIBDIR in Qt 5.8/configure

René J.V. Bertin rjvbertin at gmail.com
Wed Jan 18 09:51:43 CET 2017


Among the tweak I have in my script to build Qt for installation into /opt/local, using dependencies from there, I have a patch for qtbase/configure that prunes a number of unnecessary/undesirable items from DEFAULT_INCDIR and DEFAULT_LIBDIR (see below). 

I cannot seem to find any trace of those variables in the Qt 5.8 build system, and the only info I've gleaned from Google shows that those variables were used frequently in the configure invocation.

How does this work out with Qt 5.8? Can I assume that there is no more need to remove undesirable elements from the 2 default search paths, or do I have to apply my filter elsewhere? 


The filter most likely dates back to Qt 5.5; I haven't checked to what extent it still removed anything in Qt 5.7 :
 [ "$OPT_VERBOSE" = "yes" ] && tty=/dev/stderr
 eval "`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK "$awkprog" | tee $tty`"
 unset tty
+# remove unnecessary and unwanted paths (for MacPorts we don't want /usr/local/include either)
+DEFAULT_INCDIRS=`echo ${DEFAULT_INCDIRS} | sed -e 's|/usr/include/[xi][0-9][^-]*-linux-gnu[^ ]*||g' -e 's|/usr/lib/gcc/[xi][0-9][^-]*-linux-gnu/[^ ]*||g' -e 's|/usr/include/c++[^ ]*||g' -e 's|/usr/local/include||g'`
+DEFAULT_LIBDIRS=`echo ${DEFAULT_LIBDIRS} | sed -e 's|/usr/lib/[xi][0-9][^-]*-linux-gnu||g' -e 's|/lib/[xi][0-9][^-]*-linux-gnu||g' -e 's|/usr/lib/gcc/[xi][0-9][^-]*-linux-gnu/[0-9][^ ]*||g'`
 echo "Done running configuration tests."

More information about the Development mailing list