diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 74 |
1 files changed, 70 insertions, 4 deletions
@@ -47,6 +47,11 @@ QMAKE_VARS_FILE=.qmake.vars # utility functions #------------------------------------------------------------------------------- +shellEscape() +{ + echo "$@" | sed 's/ /\ /g' +} + # Adds a new qmake variable to the cache # Usage: QMakeVar mode varname contents # where mode is one of: set, add, del @@ -89,6 +94,29 @@ getQMakeConf() { print }' "$tmpSPEC/qmake.conf" } +# relies on $TEST_COMPILER being set correctly +compilerSupportsFlag() +{ + cat >conftest.cpp <<EOF +int main() { return 0; } +EOF + "$TEST_COMPILER" "$@" -o /dev/null conftest.cpp + ret=$? + rm -f conftest.cpp conftest.o + return $? +} + +# relies on $TEST_COMPILER being set correctly +linkerSupportsFlag() +{ + lflags=-Wl + for flag; do + safe_flag=`shellEscape "$flag"` + lflags=$lflags,$safe_flag + done + compilerSupportsFlag "$lflags" +} + #------------------------------------------------------------------------------- # operating system detection #------------------------------------------------------------------------------- @@ -563,6 +591,7 @@ MIN_DBUS_1_VERSION=0.62 CFG_CONFIGURE_EXIT_ON_ERROR=yes CFG_PROFILE=no CFG_EXCEPTIONS=unspecified +CFG_SCRIPT=auto # (yes|no|auto) CFG_SCRIPTTOOLS=auto # (yes|no|auto) CFG_XMLPATTERNS=auto # (yes|no|auto) CFG_INCREMENTAL=auto @@ -850,7 +879,7 @@ while [ "$#" -gt 0 ]; do VAL=no ;; #Qt style yes options - -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-svg|-webkit|-scripttools|-rpath|-force-pkg-config) + -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-svg|-webkit|-script|-scripttools|-rpath|-force-pkg-config) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL=yes ;; @@ -1749,6 +1778,17 @@ while [ "$#" -gt 0 ]; do fi fi ;; + script) + if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then + CFG_SCRIPT="yes" + else + if [ "$VAL" = "no" ]; then + CFG_SCRIPT="no" + else + UNKNOWN_OPT=yes + fi + fi + ;; scripttools) if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then CFG_SCRIPTTOOLS="yes" @@ -3165,7 +3205,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir [-no-openssl] [-openssl] [-openssl-linked] [-no-multimedia] [-multimedia] [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] - [-no-scripttools] [-scripttools] + [-no-script] [-script] [-no-scripttools] [-scripttools] [additional platform specific options (see below)] @@ -3314,6 +3354,9 @@ fi + -webkit ............ Build the WebKit module. WebKit is built if a decent C++ compiler is used. + -no-script ......... Do not build the QtScript module. + + -script ............ Build the QtScript module. + -no-scripttools .... Do not build the QtScriptTools module. + -scripttools ....... Build the QtScriptTools module. @@ -6297,13 +6340,28 @@ else QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WEBKIT" fi -if [ "$CFG_SCRIPTTOOLS" = "auto" ]; then +if [ "$CFG_SCRIPT" = "auto" ]; then + CFG_SCRIPT="$canBuildWebKit" +fi + +if [ "$CFG_SCRIPT" = "yes" ]; then + QT_CONFIG="$QT_CONFIG script" +else + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPT" +fi + +if [ "$CFG_SCRIPTTOOLS" = "yes" -a "$CFG_SCRIPT" = "no" ]; then + echo "QtScriptTools was requested, but it can't be built due to QtScript being disabled." + exit 1 +fi +if [ "$CFG_SCRIPTTOOLS" = "auto" -a "$CFG_SCRIPT" != "no" ]; then CFG_SCRIPTTOOLS="yes" +elif [ "$CFG_SCRIPT" = "no" ]; then + CFG_SCRIPTTOOLS="no" fi if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then QT_CONFIG="$QT_CONFIG scripttools" - CFG_SCRIPTTOOLS="yes" else QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS" fi @@ -6978,6 +7036,13 @@ QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib EOF +# Ensure we can link to uninistalled libraries +if linkerSupportsFlag -rpath-link "$outpath/lib"; then + echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp" +elif linkerSupportsFlag -rpath "$outpath/lib"; then + echo "QMAKE_LFLAGS += -Wl,-rpath,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp" +fi + if [ -n "$QT_CFLAGS_PSQL" ]; then echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp" fi @@ -7172,6 +7237,7 @@ echo "Qt 3 compatibility .. $CFG_QT3SUPPORT" [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)" [ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)" echo "QtConcurrent code.... $CFG_CONCURRENT" +echo "QtScript module ..... $CFG_SCRIPT" echo "QtScriptTools module $CFG_SCRIPTTOOLS" echo "QtXmlPatterns module $CFG_XMLPATTERNS" echo "Phonon module ....... $CFG_PHONON" |