summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2012-09-15 22:12:53 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-19 07:04:04 (GMT)
commit1861f0317d4058482667154131f8eb6488db407e (patch)
tree536e07c6fc9a5b7d30b237396defbdd2f3a540ab /configure
parentb3c21d93f66617b87b341911d329c0b1ad6af485 (diff)
downloadQt-1861f0317d4058482667154131f8eb6488db407e.zip
Qt-1861f0317d4058482667154131f8eb6488db407e.tar.gz
Qt-1861f0317d4058482667154131f8eb6488db407e.tar.bz2
configure: postpone pkg-config detection until after qmake is built
pkg-config isn't used before qmake is built, so these tests can take place afterward. This is preparation for using qmake to resolve PKG_CONFIG in mkspecs. Change-Id: Icedf9ebd80bbac3fe1e5d7eeca358cb0fc9de072 Reviewed-by: Peter Kümmel <syntheticpp@gmx.net> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure110
1 files changed, 55 insertions, 55 deletions
diff --git a/configure b/configure
index 53dc37b..3488769 100755
--- a/configure
+++ b/configure
@@ -3327,64 +3327,9 @@ if [ "$OPT_VERBOSE" = "yes" ]; then
fi
#-------------------------------------------------------------------------------
-# write out device config before we run the test.
-#-------------------------------------------------------------------------------
-DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
-if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
- rm -f "$DEVICE_VARS_FILE"
-else
- mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
- DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
-fi
-
-#-------------------------------------------------------------------------------
# tests that don't need qmake (must be run before displaying help)
#-------------------------------------------------------------------------------
-if [ -z "$PKG_CONFIG" ]; then
- # See if PKG_CONFIG is set in the mkspec:
- PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
-fi
-if [ -z "$PKG_CONFIG" ]; then
- PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
-fi
-
-# Work out if we can use pkg-config
-if [ "$QT_CROSS_COMPILE" = "yes" ]; then
- if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
- echo >&2 ""
- echo >&2 "You have asked to use pkg-config and are cross-compiling."
- echo >&2 "Please make sure you have a correctly set-up pkg-config"
- echo >&2 "environment!"
- echo >&2 ""
- if [ -z "$PKG_CONFIG_PATH" ]; then
- echo >&2 ""
- echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
- echo >&2 "the host compiler's .pc files will be used. This is probably"
- echo >&2 "not what you want."
- echo >&2 ""
- elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
- echo >&2 ""
- echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
- echo >&2 "been set. This means your toolchain's .pc files must contain"
- echo >&2 "the paths to the toolchain's libraries & headers. If configure"
- echo >&2 "tests are failing, please check these files."
- echo >&2 ""
- fi
- else
- echo >&2 ""
- echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
- echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
- echo >&2 "dependencies"
- echo >&2 ""
- PKG_CONFIG=""
- fi
-fi
-
-if [ ! -n "$PKG_CONFIG" ]; then
- QT_CONFIG="$QT_CONFIG no-pkg-config"
-fi
-
# process CFG_MAC_ARCHS
if [ "$PLATFORM_MAC" = "yes" ]; then
# check -arch arguments for validity.
@@ -5054,6 +4999,61 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
fi # Build qmake
#-------------------------------------------------------------------------------
+# write out device config before we run the test.
+#-------------------------------------------------------------------------------
+DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
+if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
+ rm -f "$DEVICE_VARS_FILE"
+else
+ mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
+ DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
+fi
+
+if [ -z "$PKG_CONFIG" ]; then
+ # See if PKG_CONFIG is set in the mkspec:
+ PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
+fi
+if [ -z "$PKG_CONFIG" ]; then
+ PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
+fi
+
+# Work out if we can use pkg-config
+if [ "$QT_CROSS_COMPILE" = "yes" ]; then
+ if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
+ echo >&2 ""
+ echo >&2 "You have asked to use pkg-config and are cross-compiling."
+ echo >&2 "Please make sure you have a correctly set-up pkg-config"
+ echo >&2 "environment!"
+ echo >&2 ""
+ if [ -z "$PKG_CONFIG_PATH" ]; then
+ echo >&2 ""
+ echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
+ echo >&2 "the host compiler's .pc files will be used. This is probably"
+ echo >&2 "not what you want."
+ echo >&2 ""
+ elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
+ echo >&2 ""
+ echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
+ echo >&2 "been set. This means your toolchain's .pc files must contain"
+ echo >&2 "the paths to the toolchain's libraries & headers. If configure"
+ echo >&2 "tests are failing, please check these files."
+ echo >&2 ""
+ fi
+ else
+ echo >&2 ""
+ echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
+ echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
+ echo >&2 "dependencies"
+ echo >&2 ""
+ PKG_CONFIG=""
+ fi
+fi
+
+if [ ! -n "$PKG_CONFIG" ]; then
+ QT_CONFIG="$QT_CONFIG no-pkg-config"
+fi
+
+#-------------------------------------------------------------------------------
# tests that need qmake
#-------------------------------------------------------------------------------