summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2011-09-22 13:18:11 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-22 18:59:45 +0100
commitd6d4dcaf18e060644ffed5af991ba63e22367394 (patch)
tree38ffbf3432cd850fc3b09fb8315da0aedb3258a3
parent69bf30596c2555b4430383d7edc4f1dbe04e72fc (diff)
Fix cross-compilation that uses fontconfig / freetype
config.tests/unix/freetype.pri has a !cross_compile flag, so we must find freetype using the proper detection methods. The detection was inside an X11 section of configure, so move that out. And use the results of that detection, now that QMAKE_CFLAGS_X11 isn't used (since we're not building X11 in QtPlatformSupport). Change-Id: Ic8f5cfb7263849bfb12967756def2b5aaa244872 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-rwxr-xr-xconfigure54
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/fontconfig.pri1
2 files changed, 28 insertions, 27 deletions
diff --git a/configure b/configure
index 195960a1b7..502f466251 100755
--- a/configure
+++ b/configure
@@ -4744,33 +4744,6 @@ if [ "$PLATFORM_X11" = "yes" ]; then
fi
fi
- # auto-detect FontConfig support
- if [ "$CFG_FONTCONFIG" != "no" ]; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
- QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
- QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
- else
- QT_CFLAGS_FONTCONFIG=
- QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
- fi
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
- CFG_FONTCONFIG=yes
- QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
- QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
- CFG_LIBFREETYPE=system
- else
- if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "FontConfig 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_FONTCONFIG=no
- fi
- fi
- fi
-
# auto-detect Session Management support
if [ "$CFG_SM" = "auto" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/sm "Session Management" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
@@ -4919,6 +4892,33 @@ if [ "$PLATFORM_X11" = "yes" ]; then
fi
fi # X11
+# auto-detect FontConfig support
+if [ "$CFG_FONTCONFIG" != "no" ]; then
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
+ QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
+ QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
+ else
+ QT_CFLAGS_FONTCONFIG=
+ QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
+ fi
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
+ CFG_FONTCONFIG=yes
+ QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
+ QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
+ CFG_LIBFREETYPE=system
+ else
+ if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "FontConfig 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_FONTCONFIG=no
+ fi
+ fi
+fi
+
if [ "$BUILD_ON_MAC" = "yes" ]; then
if [ "$CFG_PHONON" != "no" ]; then
diff --git a/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri b/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri
index af9bd0a01c..bd7294b818 100644
--- a/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri
+++ b/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri
@@ -3,3 +3,4 @@ HEADERS += $$PWD/qfontconfigdatabase_p.h \
SOURCES += $$PWD/qfontconfigdatabase.cpp \
$$PWD/qfontenginemultifontconfig.cpp
DEFINES -= QT_NO_FONTCONFIG
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_FONTCONFIG