#!/bin/sh # # Configures to build the Qt library # # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). # Contact: Nokia Corporation (qt-info@nokia.com) # # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # #------------------------------------------------------------------------------- # script initialization #------------------------------------------------------------------------------- # the name of this script relconf=`basename $0` # the directory of this script is the "source tree" relpath=`dirname $0` relpath=`(cd "$relpath"; /bin/pwd)` # the current directory is the "build tree" or "object tree" outpath=`/bin/pwd` #license file location LICENSE_FILE="$QT_LICENSE_FILE" [ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license" if [ -f "$LICENSE_FILE" ]; then tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp" diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp" fi # later cache the command line in config.status OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"` # initialize global variables QMAKE_SWITCHES= QMAKE_VARS= QMAKE_CONFIG= QTCONFIG_CONFIG= QT_CONFIG= SUPPORTED= QMAKE_VARS_FILE=.qmake.vars :> "$QMAKE_VARS_FILE" #------------------------------------------------------------------------------- # utility functions #------------------------------------------------------------------------------- # Adds a new qmake variable to the cache # Usage: QMakeVar mode varname contents # where mode is one of: set, add, del QMakeVar() { case "$1" in set) eq="=" ;; add) eq="+=" ;; del) eq="-=" ;; *) echo >&2 "BUG: wrong command to QMakeVar: $1" ;; esac echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE" } # relies on $QMAKESPEC being set correctly. parses include statements in # qmake.conf and prints out the expanded file getQMakeConf() { tmpSPEC="$QMAKESPEC" if [ -n "$1" ]; then tmpSPEC="$1" fi $AWK -v "QMAKESPEC=$tmpSPEC" ' /^include\(.+\)$/{ fname = QMAKESPEC "/" substr($0, 9, length($0) - 9) while ((getline line < fname) > 0) print line close(fname) next } { print }' "$tmpSPEC/qmake.conf" } #------------------------------------------------------------------------------- # operating system detection #------------------------------------------------------------------------------- # need that throughout the script UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown #------------------------------------------------------------------------------- # window system detection #------------------------------------------------------------------------------- PLATFORM_X11=no PLATFORM_MAC=no PLATFORM_QWS=no if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ] && [ -d /System/Library/Frameworks/Carbon.framework ]; then # Qt/Mac # ~ the Carbon SDK exists # ~ src/gui/base/qapplication_mac.cpp is present # ~ this is the internal edition and Qt/Mac sources exist PLATFORM_MAC=maybe elif [ -f "$relpath"/src/gui/kernel/qapplication_qws.cpp ]; then # Qt Embedded # ~ src/gui/base/qapplication_qws.cpp is present # ~ this is the free or commercial edition # ~ this is the internal edition and Qt Embedded is explicitly enabled if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ]; then # This is a depot build, or an all-platforms package PLATFORM_QWS=maybe else # This must be the embedded package, since the Qt/Mac source files are not present PLATFORM_QWS=yes fi fi #----------------------------------------------------------------------------- # Qt version detection #----------------------------------------------------------------------------- QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h` QT_MAJOR_VERSION= QT_MINOR_VERSION=0 QT_PATCH_VERSION=0 if [ -n "$QT_VERSION" ]; then QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'` MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'` if [ -n "$MAJOR" ]; then MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'` PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'` QT_MAJOR_VERSION="$MAJOR" [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR" [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH" fi fi if [ -z "$QT_MAJOR_VERSION" ]; then echo "Cannot process version from qglobal.h: $QT_VERSION" echo "Cannot proceed." exit 1 fi QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g` if [ -z "$QT_PACKAGEDATE" ]; then echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'" echo "Cannot proceed" exit 1 fi #------------------------------------------------------------------------------- # check the license #------------------------------------------------------------------------------- COMMERCIAL_USER=ask CFG_DEV=no CFG_NOKIA=no CFG_EMBEDDED=no EditionString=Commercial earlyArgParse() { # parse the arguments, setting things to "yes" or "no" while [ "$#" -gt 0 ]; do CURRENT_OPT="$1" UNKNOWN_ARG=no case "$1" in #Autoconf style options --enable-*) VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"` VAL=yes ;; --disable-*) VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"` VAL=no ;; --*=*) VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"` VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"` ;; --no-*) VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"` VAL=no ;; -embedded) VAR=embedded # this option may or may not be followed by an argument if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then VAL=auto else shift; VAL=$1 fi ;; -h|help|--help|-help) if [ "$VAL" = "yes" ]; then OPT_HELP="$VAL" COMMERCIAL_USER="no" #doesn't matter we will display the help else UNKNOWN_OPT=yes COMMERCIAL_USER="no" #doesn't matter we will display the help fi ;; --*) VAR=`echo $1 | sed "s,^--\(.*\),\1,"` VAL=yes ;; -*) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL="unknown" ;; *) UNKNOWN_ARG=yes ;; esac if [ "$UNKNOWN_ARG" = "yes" ]; then shift continue fi shift UNKNOWN_OPT=no case "$VAR" in embedded) CFG_EMBEDDED="$VAL" if [ "$PLATFORM_QWS" != "no" ]; then if [ "$PLATFORM_QWS" = "maybe" ]; then PLATFORM_X11=no PLATFORM_MAC=no PLATFORM_QWS=yes fi else echo "No license exists to enable Qt for Embedded Linux. Disabling." CFG_EMBEDDED=no fi ;; developer-build) CFG_DEV="yes" ;; nokia-developer) CFG_DEV="yes" CFG_NOKIA="yes" COMMERCIAL_USER="no" ;; commercial) COMMERCIAL_USER="yes" ;; opensource) COMMERCIAL_USER="no" ;; *) UNKNOWN_OPT=yes ;; esac done } earlyArgParse "$@" if [ "$COMMERCIAL_USER" = "ask" ]; then while true; do echo "Which edition of Qt do you want to use ?" echo echo "Type 'c' if you want to use the Commercial Edition." echo "Type 'o' if you want to use the Open Source Edition." echo read commercial echo if [ "$commercial" = "c" ]; then COMMERCIAL_USER="yes" break elif [ "$commercial" = "o" ]; then COMMERCIAL_USER="no" break fi done fi if [ "$CFG_NOKIA" = "yes" ]; then Licensee="Nokia" Edition="NokiaInternalBuild" EditionString="Nokia Internal Build" QT_EDITION="QT_EDITION_OPENSOURCE" [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then # Commercial preview release [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes Licensee="Preview" Edition="Preview" QT_EDITION="QT_EDITION_DESKTOP" LicenseType="Technology Preview" elif [ $COMMERCIAL_USER = "yes" ]; then # one of commercial editions [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes # read in the license file if [ -f "$LICENSE_FILE" ]; then . "$LICENSE_FILE" >/dev/null 2>&1 if [ -z "$LicenseKeyExt" ]; then echo echo "You are using an old license file." echo echo "Please install the license file supplied by Nokia," echo "or install the Qt Open Source Edition if you intend to" echo "develop free software." exit 1 fi if [ -z "$Licensee" ]; then echo echo "Invalid license key. Please check the license key." exit 1 fi else if [ -z "$LicenseKeyExt" ]; then echo if echo '\c' | grep '\c' >/dev/null; then echo -n "Please enter your license key: " else echo "Please enter your license key: \c" fi read LicenseKeyExt Licensee="Unknown user" fi fi # Key verification echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \ && LicenseValid="yes" \ || LicenseValid="no" if [ "$LicenseValid" != "yes" ]; then echo echo "Invalid license key. Please check the license key." exit 1 fi ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1` PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1` LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -` LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1` # determine which edition we are licensed to use case "$LicenseTypeCode" in F4M) LicenseType="Commercial" case $ProductCode in F) Edition="Universal" QT_EDITION="QT_EDITION_UNIVERSAL" ;; B) Edition="FullFramework" EditionString="Full Framework" QT_EDITION="QT_EDITION_DESKTOP" ;; L) Edition="GUIFramework" EditionString="GUI Framework" QT_EDITION="QT_EDITION_DESKTOPLIGHT" ;; esac ;; Z4M|R4M|Q4M) LicenseType="Evaluation" case $ProductCode in B) Edition="Evaluation" QT_EDITION="QT_EDITION_EVALUATION" ;; esac ;; esac if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then echo echo "Invalid license key. Please check the license key." exit 1 fi # verify that we are licensed to use Qt on this platform LICENSE_EXTENSION= if [ "$PlatformCode" = "X" ]; then # Qt All-OS LICENSE_EXTENSION="-ALLOS" elif [ "$PLATFORM_QWS" = "yes" ]; then case $PlatformCode in 2|4|8|A|B|E|G|J|K|P|Q|S|U|V|W) # Qt for Embedded Linux LICENSE_EXTENSION="-EMBEDDED" ;; *) echo echo "You are not licensed for Qt for Embedded Linux." echo echo "Please contact qt-info@nokia.com to upgrade your license" echo "to include Qt for Embedded Linux, or install the" echo "Qt Open Source Edition if you intend to develop free software." exit 1 ;; esac elif [ "$PLATFORM_MAC" = "yes" ]; then case $PlatformCode in 2|4|5|7|9|B|C|E|F|G|L|M|U|W|Y) # Qt/Mac LICENSE_EXTENSION="-DESKTOP" ;; 3|6|8|A|D|H|J|K|P|Q|S|V) # Embedded no-deploy LICENSE_EXTENSION="-EMBEDDED" ;; *) echo echo "You are not licensed for the Qt/Mac platform." echo echo "Please contact qt-info@nokia.com to upgrade your license" echo "to include the Qt/Mac platform." exit 1 ;; esac else case $PlatformCode in 2|3|4|5|7|D|E|F|J|M|Q|S|T|V|Z) # Qt/X11 LICENSE_EXTENSION="-DESKTOP" ;; 6|8|9|A|B|C|G|H|K|P|U|W) # Embedded no-deploy LICENSE_EXTENSION="-EMBEDDED" ;; *) echo echo "You are not licensed for the Qt/X11 platform." echo echo "Please contact qt-info@nokia.com to upgrade your license to" echo "include the Qt/X11 platform, or install the Qt Open Source Edition" echo "if you intend to develop free software." exit 1 ;; esac fi if test -r "$relpath/.LICENSE"; then # Generic, non-final license LICENSE_EXTENSION="" line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE` case "$line" in *BETA*) Edition=Beta ;; *TECHNOLOGY?PREVIEW*) Edition=Preview ;; *EVALUATION*) Edition=Evaluation ;; *) echo >&2 "Invalid license files; cannot continue" exit 1 ;; esac Licensee="$Edition" EditionString="$Edition" QT_EDITION="QT_EDITION_DESKTOP" fi case "$LicenseFeatureCode" in G|L) # US case "$LicenseType" in Commercial) cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE" ;; Evaluation) cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE" ;; esac ;; 2|5) # non-US case "$LicenseType" in Commercial) cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE" ;; Evaluation) cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE" ;; esac ;; *) echo echo "Invalid license key. Please check the license key." exit 1 ;; esac if [ '!' -f "$outpath/LICENSE" ]; then echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with" echo "this software has disappeared." echo echo "Sorry, you are not licensed to use this software." echo "Try re-installing." echo exit 1 fi elif [ $COMMERCIAL_USER = "no" ]; then # Open Source edition - may only be used under the terms of the GPL or LGPL. [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes Licensee="Open Source" Edition="OpenSource" EditionString="Open Source" QT_EDITION="QT_EDITION_OPENSOURCE" fi #------------------------------------------------------------------------------- # initalize variables #------------------------------------------------------------------------------- SYSTEM_VARIABLES="CC CXX CFLAGS CXXFLAGS LDFLAGS" for varname in $SYSTEM_VARIABLES; do qmakevarname="${varname}" # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS if [ "${varname}" = "LDFLAGS" ]; then qmakevarname="LFLAGS" fi cmd=`echo \ 'if [ -n "\$'${varname}'" ]; then QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}'" fi'` eval "$cmd" done # Use CC/CXX to run config.tests mkdir -p "$outpath/config.tests" rm -f "$outpath/config.tests/.qmake.cache" cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache" QMakeVar add styles "cde mac motif plastique cleanlooks windows" QMakeVar add decorations "default windows styled" QMakeVar add mouse-drivers "pc" if [ "$UNAME_SYSTEM" = "Linux" ] ; then QMakeVar add gfx-drivers "linuxfb" QMakeVar add mouse-drivers "linuxtp" fi QMakeVar add kbd-drivers "tty" if [ "$CFG_DEV" = "yes" ]; then QMakeVar add kbd-drivers "um" fi # QTDIR may be set and point to an old or system-wide Qt installation unset QTDIR # the minimum version of libdbus-1 that we require: MIN_DBUS_1_VERSION=0.62 # initalize internal variables 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 CFG_QCONFIG=full CFG_DEBUG=auto CFG_MYSQL_CONFIG= CFG_DEBUG_RELEASE=no CFG_SHARED=yes CFG_SM=auto CFG_XSHAPE=auto CFG_XSYNC=auto CFG_XINERAMA=runtime CFG_XFIXES=runtime CFG_ZLIB=auto CFG_SQLITE=qt CFG_GIF=auto CFG_TIFF=auto CFG_LIBTIFF=auto CFG_PNG=yes CFG_LIBPNG=auto CFG_JPEG=auto CFG_LIBJPEG=auto CFG_MNG=auto CFG_LIBMNG=auto CFG_XCURSOR=runtime CFG_XRANDR=runtime CFG_XRENDER=auto CFG_MITSHM=auto CFG_OPENGL=auto CFG_OPENVG=no CFG_OPENVG_LC_INCLUDES=no CFG_OPENVG_SHIVA=no CFG_OPENVG_ON_OPENGL=no CFG_EGL=no CFG_EGL_GLES_INCLUDES=no CFG_SSE=auto CFG_FONTCONFIG=auto CFG_QWS_FREETYPE=auto CFG_LIBFREETYPE=auto CFG_SQL_AVAILABLE= QT_DEFAULT_BUILD_PARTS="libs tools examples demos docs translations" CFG_BUILD_PARTS="" CFG_NOBUILD_PARTS="" CFG_RELEASE_QMAKE=no CFG_PHONON=auto CFG_PHONON_BACKEND=yes CFG_MULTIMEDIA=yes CFG_SVG=yes CFG_WEBKIT=auto # (yes|no|auto) CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen" CFG_GFX_ON="linuxfb multiscreen" CFG_GFX_PLUGIN_AVAILABLE= CFG_GFX_PLUGIN= CFG_GFX_OFF= CFG_KBD_AVAILABLE="tty linuxinput qvfb" CFG_KBD_ON="tty" #default, see QMakeVar above CFG_MOUSE_AVAILABLE="pc linuxtp linuxinput tslib qvfb" CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above if [ -f "$relpath/src/gui/embedded/qscreenqnx_qws.cpp" ]; then CFG_KBD_AVAILABLE="${CFG_KBD_AVAILABLE} qnx" CFG_MOUSE_AVAILABLE="${CFG_MOUSE_AVAILABLE} qnx" CFG_GFX_AVAILABLE="${CFG_GFX_AVAILABLE} qnx" fi CFG_ARCH= CFG_HOST_ARCH= CFG_KBD_PLUGIN_AVAILABLE= CFG_KBD_PLUGIN= CFG_KBD_OFF= CFG_MOUSE_PLUGIN_AVAILABLE= CFG_MOUSE_PLUGIN= CFG_MOUSE_OFF= CFG_USE_GNUMAKE=no CFG_IM=yes CFG_DECORATION_AVAILABLE="styled windows default" CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default CFG_DECORATION_PLUGIN_AVAILABLE= CFG_DECORATION_PLUGIN= CFG_XINPUT=runtime CFG_XKB=auto CFG_NIS=auto CFG_CUPS=auto CFG_ICONV=auto CFG_DBUS=auto CFG_GLIB=auto CFG_GSTREAMER=auto CFG_QGTKSTYLE=auto CFG_LARGEFILE=auto CFG_OPENSSL=auto CFG_PTMALLOC=no CFG_STL=auto CFG_PRECOMPILE=auto CFG_SEPARATE_DEBUG_INFO=auto CFG_REDUCE_EXPORTS=auto CFG_MMX=auto CFG_3DNOW=auto CFG_SSE=auto CFG_SSE2=auto CFG_REDUCE_RELOCATIONS=no CFG_IPV6=auto CFG_NAS=no CFG_QWS_DEPTHS=all CFG_USER_BUILD_KEY= CFG_ACCESSIBILITY=auto CFG_QT3SUPPORT=yes CFG_ENDIAN=auto CFG_HOST_ENDIAN=auto CFG_DOUBLEFORMAT=auto CFG_ARMFPA=auto CFG_IWMMXT=no CFG_CLOCK_GETTIME=auto CFG_CLOCK_MONOTONIC=auto CFG_MREMAP=auto CFG_GETADDRINFO=auto CFG_IPV6IFNAME=auto CFG_GETIFADDRS=auto CFG_INOTIFY=auto CFG_RPATH=yes CFG_FRAMEWORK=auto CFG_MAC_ARCHS= MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings CFG_MAC_DWARF2=auto CFG_MAC_XARCH=auto CFG_MAC_CARBON=yes CFG_MAC_COCOA=auto COMMANDLINE_MAC_COCOA=no CFG_SXE=no CFG_PREFIX_INSTALL=yes CFG_SDK= D_FLAGS= I_FLAGS= L_FLAGS= RPATH_FLAGS= l_FLAGS= QCONFIG_FLAGS= XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" PLATFORM=$QMAKESPEC QT_CROSS_COMPILE=no OPT_CONFIRM_LICENSE=no OPT_SHADOW=maybe OPT_FAST=auto OPT_VERBOSE=no OPT_HELP= CFG_SILENT=no CFG_GRAPHICS_SYSTEM=default CFG_ALSA=auto # initalize variables used for installation QT_INSTALL_PREFIX= QT_INSTALL_DOCS= QT_INSTALL_HEADERS= QT_INSTALL_LIBS= QT_INSTALL_BINS= QT_INSTALL_PLUGINS= QT_INSTALL_DATA= QT_INSTALL_TRANSLATIONS= QT_INSTALL_SETTINGS= QT_INSTALL_EXAMPLES= QT_INSTALL_DEMOS= QT_HOST_PREFIX= #flags for SQL drivers QT_CFLAGS_PSQL= QT_LFLAGS_PSQL= QT_CFLAGS_MYSQL= QT_LFLAGS_MYSQL= QT_LFLAGS_MYSQL_R= QT_CFLAGS_SQLITE= QT_LFLAGS_SQLITE= QT_LFLAGS_ODBC="-lodbc" # flags for libdbus-1 QT_CFLAGS_DBUS= QT_LIBS_DBUS= # flags for Glib (X11 only) QT_CFLAGS_GLIB= QT_LIBS_GLIB= # flags for GStreamer (X11 only) QT_CFLAGS_GSTREAMER= QT_LIBS_GSTREAMER= #------------------------------------------------------------------------------- # check SQL drivers, mouse drivers and decorations available in this package #------------------------------------------------------------------------------- # opensource version removes some drivers, so force them to be off CFG_SQL_tds=no CFG_SQL_oci=no CFG_SQL_db2=no CFG_SQL_AVAILABLE= if [ -d "$relpath/src/plugins/sqldrivers" ]; then for a in "$relpath/src/plugins/sqldrivers/"*; do if [ -d "$a" ]; then base_a=`basename "$a"` CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}" eval "CFG_SQL_${base_a}=auto" fi done fi CFG_DECORATION_PLUGIN_AVAILABLE= if [ -d "$relpath/src/plugins/decorations" ]; then for a in "$relpath/src/plugins/decorations/"*; do if [ -d "$a" ]; then base_a=`basename "$a"` CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}" fi done fi CFG_KBD_PLUGIN_AVAILABLE= if [ -d "$relpath/src/plugins/kbddrivers" ]; then for a in "$relpath/src/plugins/kbddrivers/"*; do if [ -d "$a" ]; then base_a=`basename "$a"` CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}" fi done fi CFG_MOUSE_PLUGIN_AVAILABLE= if [ -d "$relpath/src/plugins/mousedrivers" ]; then for a in "$relpath/src/plugins/mousedrivers/"*; do if [ -d "$a" ]; then base_a=`basename "$a"` CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}" fi done fi CFG_GFX_PLUGIN_AVAILABLE= if [ -d "$relpath/src/plugins/gfxdrivers" ]; then for a in "$relpath/src/plugins/gfxdrivers/"*; do if [ -d "$a" ]; then base_a=`basename "$a"` CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}" fi done CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off fi #------------------------------------------------------------------------------- # parse command line arguments #------------------------------------------------------------------------------- # parse the arguments, setting things to "yes" or "no" while [ "$#" -gt 0 ]; do CURRENT_OPT="$1" UNKNOWN_ARG=no case "$1" in #Autoconf style options --enable-*) VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"` VAL=yes ;; --disable-*) VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"` VAL=no ;; --*=*) VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"` VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"` ;; --no-*) VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"` VAL=no ;; --*) VAR=`echo $1 | sed "s,^--\(.*\),\1,"` VAL=yes ;; #Qt plugin options -no-*-*|-plugin-*-*|-qt-*-*) VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"` VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"` ;; #Qt style no options -no-*) VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"` 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|-script|-scripttools|-rpath|-force-pkg-config) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL=yes ;; #Qt style options that pass an argument -qconfig) if [ "$PLATFORM_QWS" != "yes" ]; then echo echo "WARNING: -qconfig is only tested and supported on Qt for Embedded Linux." echo fi CFG_QCONFIG="$VAL" VAR=`echo $1 | sed "s,^-\(.*\),\1,"` shift VAL=$1 ;; -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` shift VAL="$1" ;; #Qt style complex options in one command -enable-*|-disable-*) VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"` VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"` ;; #Qt Builtin/System style options -no-*|-system-*|-qt-*) VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"` VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"` ;; #Options that cannot be generalized -k|-continue) VAR=fatal_error VAL=no ;; -embedded) VAR=embedded # this option may or may not be followed by an argument if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then VAL=auto else shift; VAL=$1 fi ;; -opengl) VAR=opengl # this option may or may not be followed by an argument if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then VAL=yes else shift; VAL=$1 fi ;; -openvg) VAR=openvg # this option may or may not be followed by an argument if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then VAL=yes else shift; VAL=$1 fi ;; -hostprefix) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` # this option may or may not be followed by an argument if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then VAL=$outpath else shift; VAL=$1 fi ;; -host-*-endian) VAR=host_endian VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"` ;; -*-endian) VAR=endian VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"` ;; -qtnamespace) VAR="qtnamespace" shift VAL="$1" ;; -graphicssystem) VAR="graphicssystem" shift VAL=$1 ;; -qtlibinfix) VAR="qtlibinfix" shift VAL="$1" ;; -D?*|-D) VAR="add_define" if [ "$1" = "-D" ]; then shift VAL="$1" else VAL=`echo $1 | sed 's,-D,,'` fi ;; -I?*|-I) VAR="add_ipath" if [ "$1" = "-I" ]; then shift VAL="$1" else VAL=`echo $1 | sed 's,-I,,'` fi ;; -L?*|-L) VAR="add_lpath" if [ "$1" = "-L" ]; then shift VAL="$1" else VAL=`echo $1 | sed 's,-L,,'` fi ;; -R?*|-R) VAR="add_rpath" if [ "$1" = "-R" ]; then shift VAL="$1" else VAL=`echo $1 | sed 's,-R,,'` fi ;; -l?*) VAR="add_link" VAL=`echo $1 | sed 's,-l,,'` ;; -F?*|-F) VAR="add_fpath" if [ "$1" = "-F" ]; then shift VAL="$1" else VAL=`echo $1 | sed 's,-F,,'` fi ;; -fw?*|-fw) VAR="add_framework" if [ "$1" = "-fw" ]; then shift VAL="$1" else VAL=`echo $1 | sed 's,-fw,,'` fi ;; -*) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL="unknown" ;; *) UNKNOWN_ARG=yes ;; esac if [ "$UNKNOWN_ARG" = "yes" ]; then echo "$1: unknown argument" OPT_HELP=yes ERROR=yes shift continue fi shift UNKNOWN_OPT=no case "$VAR" in qt3support) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_QT3SUPPORT="$VAL" else UNKNOWN_OPT=yes fi ;; accessibility) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_ACCESSIBILITY="$VAL" else UNKNOWN_OPT=yes fi ;; license) LICENSE_FILE="$VAL" ;; gnumake) CFG_USE_GNUMAKE="$VAL" ;; mysql_config) CFG_MYSQL_CONFIG="$VAL" ;; prefix) QT_INSTALL_PREFIX="$VAL" ;; hostprefix) QT_HOST_PREFIX="$VAL" ;; force-pkg-config) QT_FORCE_PKGCONFIG=yes ;; docdir) QT_INSTALL_DOCS="$VAL" ;; headerdir) QT_INSTALL_HEADERS="$VAL" ;; plugindir) QT_INSTALL_PLUGINS="$VAL" ;; datadir) QT_INSTALL_DATA="$VAL" ;; libdir) QT_INSTALL_LIBS="$VAL" ;; qtnamespace) QT_NAMESPACE="$VAL" ;; qtlibinfix) QT_LIBINFIX="$VAL" ;; translationdir) QT_INSTALL_TRANSLATIONS="$VAL" ;; sysconfdir|settingsdir) QT_INSTALL_SETTINGS="$VAL" ;; examplesdir) QT_INSTALL_EXAMPLES="$VAL" ;; demosdir) QT_INSTALL_DEMOS="$VAL" ;; qconfig) CFG_QCONFIG="$VAL" ;; bindir) QT_INSTALL_BINS="$VAL" ;; buildkey) CFG_USER_BUILD_KEY="$VAL" ;; sxe) CFG_SXE="$VAL" ;; embedded) CFG_EMBEDDED="$VAL" if [ "$PLATFORM_QWS" != "no" ]; then if [ "$PLATFORM_QWS" = "maybe" ]; then PLATFORM_X11=no PLATFORM_MAC=no PLATFORM_QWS=yes fi else echo "No license exists to enable Qt for Embedded Linux. Disabling." CFG_EMBEDDED=no fi ;; sse) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_SSE="$VAL" else UNKNOWN_OPT=yes fi ;; endian) if [ "$VAL" = "little" ]; then CFG_ENDIAN="Q_LITTLE_ENDIAN" elif [ "$VAL" = "big" ]; then CFG_ENDIAN="Q_BIG_ENDIAN" else UNKNOWN_OPT=yes fi ;; host_endian) if [ "$VAL" = "little" ]; then CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN" elif [ "$VAL" = "big" ]; then CFG_HOST_ENDIAN="Q_BIG_ENDIAN" else UNKNOWN_OPT=yes fi ;; armfpa) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_ARMFPA="$VAL" else UNKNOWN_OPT=yes fi ;; depths) CFG_QWS_DEPTHS="$VAL" ;; opengl) if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "es1cl" ] || [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then CFG_OPENGL="$VAL" else UNKNOWN_OPT=yes fi ;; openvg) if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_OPENVG="$VAL" else UNKNOWN_OPT=yes fi ;; graphicssystem) if [ "$PLATFORM_QWS" = "yes" ]; then echo "Error: Graphics System plugins are not supported on QWS." echo " On QWS, the graphics system API is part of the QScreen plugin architecture " echo " rather than existing as a separate plugin." echo "" UNKNOWN_OPT=yes else if [ "$VAL" = "opengl" ]; then CFG_GRAPHICS_SYSTEM="opengl" elif [ "$VAL" = "openvg" ]; then CFG_GRAPHICS_SYSTEM="openvg" elif [ "$VAL" = "raster" ]; then CFG_GRAPHICS_SYSTEM="raster" else UNKNOWN_OPT=yes fi fi ;; qvfb) # left for commandline compatibility, not documented if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then if [ "$VAL" = "yes" ]; then QMakeVar add gfx-drivers qvfb QMakeVar add kbd-drivers qvfb QMakeVar add mouse-drivers qvfb CFG_GFX_ON="$CFG_GFX_ON qvfb" CFG_KBD_ON="$CFG_KBD_ON qvfb" CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb" fi else UNKNOWN_OPT=yes fi ;; nomake) CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL" ;; make) CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL" ;; x11) if [ "$PLATFORM_MAC" = "yes" ]; then PLATFORM_MAC=no elif [ "$PLATFORM_QWS" = "yes" ]; then PLATFORM_QWS=no fi if [ "$CFG_FRAMEWORK" = "auto" ]; then CFG_FRAMEWORK=no fi PLATFORM_X11=yes ;; sdk) if [ "$PLATFORM_MAC" = "yes" ]; then CFG_SDK="$VAL" else UNKNOWN_OPT=yes fi ;; dwarf2) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_MAC_DWARF2="$VAL" else UNKNOWN_OPT=yes fi ;; arch) if [ "$PLATFORM_MAC" = "yes" ]; then CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL" else CFG_ARCH=$VAL fi ;; host-arch) CFG_HOST_ARCH=$VAL ;; universal) if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc" else UNKNOWN_OPT=yes fi ;; cocoa) if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then CFG_MAC_COCOA="$VAL" COMMANDLINE_MAC_COCOA="$VAL" else UNKNOWN_OPT=yes fi ;; framework) if [ "$PLATFORM_MAC" = "yes" ]; then CFG_FRAMEWORK="$VAL" else UNKNOWN_OPT=yes fi ;; profile) if [ "$VAL" = "yes" ]; then CFG_PROFILE=yes QMakeVar add QMAKE_CFLAGS -pg QMakeVar add QMAKE_CXXFLAGS -pg QMakeVar add QMAKE_LFLAGS -pg QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip" else UNKNOWN_OPT=yes fi ;; exceptions|g++-exceptions) if [ "$VAL" = "no" ]; then CFG_EXCEPTIONS=no elif [ "$VAL" = "yes" ]; then CFG_EXCEPTIONS=yes else UNKNOWN_OPT=yes fi ;; platform) PLATFORM="$VAL" # keep compatibility with old platform names case $PLATFORM in aix-64) PLATFORM=aix-xlc-64 ;; hpux-o64) PLATFORM=hpux-acc-o64 ;; hpux-n64) PLATFORM=hpux-acc-64 ;; hpux-acc-n64) PLATFORM=hpux-acc-64 ;; irix-n32) PLATFORM=irix-cc ;; irix-64) PLATFORM=irix-cc-64 ;; irix-cc-n64) PLATFORM=irix-cc-64 ;; reliant-64) PLATFORM=reliant-cds-64 ;; solaris-64) PLATFORM=solaris-cc-64 ;; solaris-64) PLATFORM=solaris-cc-64 ;; openunix-cc) PLATFORM=unixware-cc ;; openunix-g++) PLATFORM=unixware-g++ ;; unixware7-cc) PLATFORM=unixware-cc ;; unixware7-g++) PLATFORM=unixware-g++ ;; macx-g++-64) PLATFORM=macx-g++ NATIVE_64_ARCH= case `uname -p` in i386) NATIVE_64_ARCH="x86_64" ;; powerpc) NATIVE_64_ARCH="ppc64" ;; *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;; esac if [ ! -z "$NATIVE_64_ARCH" ]; then QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH" CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH" fi ;; esac ;; xplatform) XPLATFORM="$VAL" ;; debug-and-release) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_DEBUG_RELEASE="$VAL" else UNKNOWN_OPT=yes fi ;; optimized-qmake) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_RELEASE_QMAKE="$VAL" else UNKNOWN_OPT=yes fi ;; release) if [ "$VAL" = "yes" ]; then CFG_DEBUG=no elif [ "$VAL" = "no" ]; then CFG_DEBUG=yes else UNKNOWN_OPT=yes fi ;; prefix-install) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_PREFIX_INSTALL="$VAL" else UNKNOWN_OPT=yes fi ;; debug) CFG_DEBUG="$VAL" ;; developer-build|commercial|opensource|nokia-developer) # These switches have been dealt with already ;; static) if [ "$VAL" = "yes" ]; then CFG_SHARED=no elif [ "$VAL" = "no" ]; then CFG_SHARED=yes else UNKNOWN_OPT=yes fi ;; incremental) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_INCREMENTAL="$VAL" else UNKNOWN_OPT=yes fi ;; fatal_error) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_CONFIGURE_EXIT_ON_ERROR="$VAL" else UNKNOWN_OPT=yes fi ;; feature-*) if [ "$PLATFORM_QWS" = "yes" ]; then FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if [ "$VAL" = "no" ]; then QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE" elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE" else UNKNOWN_OPT=yes fi else UNKNOWN_OPT=yes fi ;; shared) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_SHARED="$VAL" else UNKNOWN_OPT=yes fi ;; gif) [ "$VAL" = "qt" ] && VAL=yes if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_GIF="$VAL" else UNKNOWN_OPT=yes fi ;; sm) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_SM="$VAL" else UNKNOWN_OPT=yes fi ;; xinerama) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then CFG_XINERAMA="$VAL" else UNKNOWN_OPT=yes fi ;; xshape) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_XSHAPE="$VAL" else UNKNOWN_OPT=yes fi ;; xsync) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_XSYNC="$VAL" else UNKNOWN_OPT=yes fi ;; xinput) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then CFG_XINPUT="$VAL" else UNKNOWN_OPT=yes fi ;; stl) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_STL="$VAL" else UNKNOWN_OPT=yes fi ;; pch) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_PRECOMPILE="$VAL" else UNKNOWN_OPT=yes fi ;; separate-debug-info) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_SEPARATE_DEBUG_INFO="$VAL" else UNKNOWN_OPT=yes fi ;; reduce-exports) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_REDUCE_EXPORTS="$VAL" else UNKNOWN_OPT=yes fi ;; mmx) if [ "$VAL" = "no" ]; then CFG_MMX="$VAL" else UNKNOWN_OPT=yes fi ;; 3dnow) if [ "$VAL" = "no" ]; then CFG_3DNOW="$VAL" else UNKNOWN_OPT=yes fi ;; sse) if [ "$VAL" = "no" ]; then CFG_SSE="$VAL" else UNKNOWN_OPT=yes fi ;; sse2) if [ "$VAL" = "no" ]; then CFG_SSE2="$VAL" else UNKNOWN_OPT=yes fi ;; iwmmxt) CFG_IWMMXT="yes" ;; reduce-relocations) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_REDUCE_RELOCATIONS="$VAL" else UNKNOWN_OPT=yes fi ;; freetype) [ "$VAL" = "qt" ] && VAL=yes if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then CFG_QWS_FREETYPE="$VAL" else UNKNOWN_OPT=yes fi ;; zlib) [ "$VAL" = "qt" ] && VAL=yes if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then CFG_ZLIB="$VAL" else UNKNOWN_OPT=yes fi # No longer supported: #[ "$VAL" = "no" ] && CFG_LIBPNG=no ;; sqlite) if [ "$VAL" = "system" ]; then CFG_SQLITE=system else UNKNOWN_OPT=yes fi ;; libpng) [ "$VAL" = "yes" ] && VAL=qt if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then CFG_LIBPNG="$VAL" else UNKNOWN_OPT=yes fi ;; libjpeg) [ "$VAL" = "yes" ] && VAL=qt if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then CFG_LIBJPEG="$VAL" else UNKNOWN_OPT=yes fi ;; libmng) [ "$VAL" = "yes" ] && VAL=qt if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then CFG_LIBMNG="$VAL" else UNKNOWN_OPT=yes fi ;; libtiff) [ "$VAL" = "yes" ] && VAL=qt if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then CFG_LIBTIFF="$VAL" else UNKNOWN_OPT=yes fi ;; nas-sound) if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then CFG_NAS="$VAL" else UNKNOWN_OPT=yes fi ;; xcursor) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then CFG_XCURSOR="$VAL" else UNKNOWN_OPT=yes fi ;; xfixes) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then CFG_XFIXES="$VAL" else UNKNOWN_OPT=yes fi ;; xrandr) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then CFG_XRANDR="$VAL" else UNKNOWN_OPT=yes fi ;; xrender) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_XRENDER="$VAL" else UNKNOWN_OPT=yes fi ;; mitshm) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_MITSHM="$VAL" else UNKNOWN_OPT=yes fi ;; fontconfig) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_FONTCONFIG="$VAL" else UNKNOWN_OPT=yes fi ;; xkb) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_XKB="$VAL" else UNKNOWN_OPT=yes fi ;; cups) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_CUPS="$VAL" else UNKNOWN_OPT=yes fi ;; iconv) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_ICONV="$VAL" else UNKNOWN_OPT=yes fi ;; glib) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_GLIB="$VAL" else UNKNOWN_OPT=yes fi ;; gstreamer) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_GSTREAMER="$VAL" else UNKNOWN_OPT=yes fi ;; gtkstyle) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_QGTKSTYLE="$VAL" else UNKNOWN_OPT=yes fi ;; qdbus|dbus) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then CFG_DBUS="$VAL" elif [ "$VAL" = "runtime" ]; then CFG_DBUS="yes" else UNKNOWN_OPT=yes fi ;; dbus-linked) if [ "$VAL" = "yes" ]; then CFG_DBUS="linked" else UNKNOWN_OPT=yes fi ;; nis) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_NIS="$VAL" else UNKNOWN_OPT=yes fi ;; largefile) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_LARGEFILE="$VAL" else UNKNOWN_OPT=yes fi ;; openssl) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_OPENSSL="$VAL" else UNKNOWN_OPT=yes fi ;; openssl-linked) if [ "$VAL" = "yes" ]; then CFG_OPENSSL="linked" else UNKNOWN_OPT=yes fi ;; ptmalloc) if [ "$VAL" = "yes" ]; then CFG_PTMALLOC="yes" else UNKNOWN_OPT=yes fi ;; xmlpatterns) if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then CFG_XMLPATTERNS="yes" else if [ "$VAL" = "no" ]; then CFG_XMLPATTERNS="no" else UNKNOWN_OPT=yes 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" else if [ "$VAL" = "no" ]; then CFG_SCRIPTTOOLS="no" else UNKNOWN_OPT=yes fi fi ;; svg) if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then CFG_SVG="yes" else if [ "$VAL" = "no" ]; then CFG_SVG="no" else UNKNOWN_OPT=yes fi fi ;; webkit) if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then CFG_WEBKIT="yes" else if [ "$VAL" = "no" ]; then CFG_WEBKIT="no" else UNKNOWN_OPT=yes fi fi ;; confirm-license) if [ "$VAL" = "yes" ]; then OPT_CONFIRM_LICENSE="$VAL" else UNKNOWN_OPT=yes fi ;; h|help) if [ "$VAL" = "yes" ]; then OPT_HELP="$VAL" else UNKNOWN_OPT=yes fi ;; sql-*|gfx-*|decoration-*|kbd-*|mouse-*) # if Qt style options were used, $VAL can be "no", "qt", or "plugin" # if autoconf style options were used, $VAL can be "yes" or "no" [ "$VAL" = "yes" ] && VAL=qt # now $VAL should be "no", "qt", or "plugin"... double-check if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then UNKNOWN_OPT=yes fi # now $VAL is "no", "qt", or "plugin" OPT="$VAL" VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"` VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"` # Grab the available values case "$VAR" in sql) avail="$CFG_SQL_AVAILABLE" ;; gfx) avail="$CFG_GFX_AVAILABLE" if [ "$OPT" = "plugin" ]; then avail="$CFG_GFX_PLUGIN_AVAILABLE" fi ;; decoration) avail="$CFG_DECORATION_AVAILABLE" if [ "$OPT" = "plugin" ]; then avail="$CFG_DECORATION_PLUGIN_AVAILABLE" fi ;; kbd) avail="$CFG_KBD_AVAILABLE" if [ "$OPT" = "plugin" ]; then avail="$CFG_KBD_PLUGIN_AVAILABLE" fi ;; mouse) avail="$CFG_MOUSE_AVAILABLE" if [ "$OPT" = "plugin" ]; then avail="$CFG_MOUSE_PLUGIN_AVAILABLE" fi ;; *) avail="" echo "BUG: Unhandled type $VAR used in $CURRENT_OPT" ;; esac # Check that that user's value is available. found=no for d in $avail; do if [ "$VAL" = "$d" ]; then found=yes break fi done [ "$found" = yes ] || ERROR=yes if [ "$VAR" = "sql" ]; then # set the CFG_SQL_driver eval "CFG_SQL_$VAL=\$OPT" continue fi if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then if [ "$OPT" = "plugin" ]; then [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL" [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}" [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL" [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}" [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL" [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}" [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL" [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}" VAR="${VAR}-${OPT}" else if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL" [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL" [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL" [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL" VAR="${VAR}-driver" fi fi QMakeVar add "${VAR}s" "${VAL}" elif [ "$OPT" = "no" ]; then PLUG_VAR="${VAR}-plugin" if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then IN_VAR="${VAR}-driver" else IN_VAR="${VAR}" fi [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"` [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` QMakeVar del "${IN_VAR}s" "$VAL" QMakeVar del "${PLUG_VAR}s" "$VAL" fi if [ "$ERROR" = "yes" ]; then echo "$CURRENT_OPT: unknown argument" OPT_HELP=yes fi ;; v|verbose) if [ "$VAL" = "yes" ]; then if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs QMAKE_SWITCHES="$QMAKE_SWITCHES -d" else OPT_VERBOSE=yes fi elif [ "$VAL" = "no" ]; then if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"` else OPT_VERBOSE=no fi else UNKNOWN_OPT=yes fi ;; fast) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then OPT_FAST="$VAL" else UNKNOWN_OPT=yes fi ;; rpath) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_RPATH="$VAL" else UNKNOWN_OPT=yes fi ;; add_define) D_FLAGS="$D_FLAGS \"$VAL\"" ;; add_ipath) I_FLAGS="$I_FLAGS -I\"${VAL}\"" ;; add_lpath) L_FLAGS="$L_FLAGS -L\"${VAL}\"" ;; add_rpath) RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\"" ;; add_link) l_FLAGS="$l_FLAGS -l\"${VAL}\"" ;; add_fpath) if [ "$PLATFORM_MAC" = "yes" ]; then L_FLAGS="$L_FLAGS -F\"${VAL}\"" I_FLAGS="$I_FLAGS -F\"${VAL}\"" else UNKNOWN_OPT=yes fi ;; add_framework) if [ "$PLATFORM_MAC" = "yes" ]; then l_FLAGS="$l_FLAGS -framework \"${VAL}\"" else UNKNOWN_OPT=yes fi ;; silent) CFG_SILENT="$VAL" ;; phonon) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_PHONON="$VAL" else UNKNOWN_OPT=yes fi ;; phonon-backend) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_PHONON_BACKEND="$VAL" else UNKNOWN_OPT=yes fi ;; multimedia) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_MULTIMEDIA="$VAL" else UNKNOWN_OPT=yes fi ;; *) UNKNOWN_OPT=yes ;; esac if [ "$UNKNOWN_OPT" = "yes" ]; then echo "${CURRENT_OPT}: invalid command-line switch" OPT_HELP=yes ERROR=yes fi done if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library." CFG_QT3SUPPORT="no" fi # update QT_CONFIG to show our current predefined configuration case "$CFG_QCONFIG" in minimal|small|medium|large|full) # these are a sequence of increasing functionality for c in minimal small medium large full; do QT_CONFIG="$QT_CONFIG $c-config" [ "$CFG_QCONFIG" = $c ] && break done ;; *) # not known to be sufficient for anything if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then echo >&2 "Error: configuration file not found:" echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" OPT_HELP=yes fi esac #------------------------------------------------------------------------------- # build tree initialization #------------------------------------------------------------------------------- # where to find which.. unixtests="$relpath/config.tests/unix" mactests="$relpath/config.tests/mac" WHICH="$unixtests/which.test" PERL=`$WHICH perl 2>/dev/null` # find out which awk we want to use, prefer gawk, then nawk, then regular awk AWK= for e in gawk nawk awk; do if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then AWK=$e break fi done # find perl PERL="/usr/bin/perl" if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then PERL=`$WHICH perl` fi ### skip this if the user just needs help... if [ "$OPT_HELP" != "yes" ]; then # is this a shadow build? if [ "$OPT_SHADOW" = "maybe" ]; then OPT_SHADOW=no if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then if [ -h "$outpath" ]; then [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes else OPT_SHADOW=yes fi fi fi if [ "$OPT_SHADOW" = "yes" ]; then if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" ]; then echo >&2 "You cannot make a shadow build from a source tree containing a previous build." echo >&2 "Cannot proceed." exit 1 fi [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..." fi if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then echo echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux" echo "By default, Qt is built in release mode with separate debug information, so" echo "-debug-and-release is not necessary anymore" echo fi # detect build style if [ "$CFG_DEBUG" = "auto" ]; then if [ "$PLATFORM_MAC" = "yes" ]; then CFG_DEBUG_RELEASE=yes CFG_DEBUG=yes elif [ "$CFG_DEV" = "yes" ]; then CFG_DEBUG_RELEASE=no CFG_DEBUG=yes else CFG_DEBUG_RELEASE=no CFG_DEBUG=no fi fi if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG build_all" fi if [ "$CFG_SILENT" = "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG silent" fi # if the source tree is different from the build tree, # symlink or copy part of the sources if [ "$OPT_SHADOW" = "yes" ]; then echo "Preparing build tree..." if [ -z "$PERL" ]; then echo echo "You need perl in your PATH to make a shadow build." echo "Cannot proceed." exit 1 fi [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin" # symlink the qmake directory find "$relpath/qmake" | while read a; do my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"` if [ '!' -f "$my_a" ]; then if [ -d "$a" ]; then # directories are created... mkdir -p "$my_a" else a_dir=`dirname "$my_a"` [ -d "$a_dir" ] || mkdir -p "$a_dir" # ... and files are symlinked case `basename "$a"` in *.o|*.d|GNUmakefile*|qmake) ;; *) rm -f "$my_a" ln -s "$a" "$my_a" ;; esac fi fi done # make a syncqt script that can be used in the shadow rm -f "$outpath/bin/syncqt" if [ -x "$relpath/bin/syncqt" ]; then mkdir -p "$outpath/bin" echo "#!/bin/sh" >"$outpath/bin/syncqt" echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt" echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" $*" >>"$outpath/bin/syncqt" chmod 755 "$outpath/bin/syncqt" fi # symlink the mkspecs directory mkdir -p "$outpath/mkspecs" rm -f "$outpath"/mkspecs/* ln -s "$relpath"/mkspecs/* "$outpath/mkspecs" rm -f "$outpath/mkspecs/default" # symlink the doc directory rm -rf "$outpath/doc" ln -s "$relpath/doc" "$outpath/doc" # make sure q3porting.xml can be found mkdir -p "$outpath/tools/porting/src" rm -f "$outpath/tools/porting/src/q3porting.xml" ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src" fi # symlink files from src/gui/embedded neccessary to build qvfb if [ "$CFG_DEV" = "yes" ]; then mkdir -p "$outpath/tools/qvfb" for f in qvfbhdr.h qlock_p.h qlock.cpp qwssignalhandler_p.h qwssignalhandler.cpp; do dest="${outpath}/tools/qvfb/${f}" rm -f "$dest" ln -s "${relpath}/src/gui/embedded/${f}" "${dest}" done fi # symlink fonts to be able to run application from build directory if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then if [ "$PLATFORM" = "$XPLATFORM" ]; then mkdir -p "${outpath}/lib" ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts" fi fi if [ "$OPT_FAST" = "auto" ]; then if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then OPT_FAST=yes else OPT_FAST=no fi fi # find a make command if [ -z "$MAKE" ]; then MAKE= for mk in gmake make; do if "$WHICH" $mk >/dev/null 2>&1; then MAKE=`"$WHICH" $mk` break fi done if [ -z "$MAKE" ]; then echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH." echo >&2 "Cannot proceed." exit 1 fi # export MAKE, we need it later in the config.tests export MAKE fi fi ### help #------------------------------------------------------------------------------- # auto-detect all that hasn't been specified in the arguments #------------------------------------------------------------------------------- [ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto if [ "$CFG_EMBEDDED" != "no" ]; then case "$UNAME_SYSTEM:$UNAME_RELEASE" in Darwin:*) [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++ if [ -z "$XPLATFORM" ]; then [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic XPLATFORM="qws/macx-$CFG_EMBEDDED-g++" fi ;; FreeBSD:*) [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++ if [ -z "$XPLATFORM" ]; then [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++" fi ;; SunOS:5*) [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++ if [ -z "$XPLATFORM" ]; then [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++" fi ;; Linux:*) if [ -z "$PLATFORM" ]; then case "$UNAME_MACHINE" in *86) PLATFORM=qws/linux-x86-g++ ;; *86_64) PLATFORM=qws/linux-x86_64-g++ ;; *ppc) PLATFORM=qws/linux-ppc-g++ ;; *) PLATFORM=qws/linux-generic-g++ ;; esac fi if [ -z "$XPLATFORM" ]; then if [ "$CFG_EMBEDDED" = "auto" ]; then if [ -n "$CFG_ARCH" ]; then CFG_EMBEDDED=$CFG_ARCH else case "$UNAME_MACHINE" in *86) CFG_EMBEDDED=x86 ;; *86_64) CFG_EMBEDDED=x86_64 ;; *ppc) CFG_EMBEDDED=ppc ;; *) CFG_EMBEDDED=generic ;; esac fi fi XPLATFORM="qws/linux-$CFG_EMBEDDED-g++" fi ;; QNX:*) [ -z "$PLATFORM" ] && PLATFORM=unsupported/qws/qnx-generic-g++ if [ -z "$XPLATFORM" ]; then [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic XPLATFORM="unsupported/qws/qnx-$CFG_EMBEDDED-g++" fi ;; CYGWIN*:*) CFG_EMBEDDED=x86 ;; *) echo "Qt for Embedded Linux is not supported on this platform. Disabling." CFG_EMBEDDED=no PLATFORM_QWS=no ;; esac fi if [ -z "$PLATFORM" ]; then PLATFORM_NOTES= case "$UNAME_SYSTEM:$UNAME_RELEASE" in Darwin:*) if [ "$PLATFORM_MAC" = "yes" ]; then PLATFORM=macx-g++ # PLATFORM=macx-xcode else PLATFORM=darwin-g++ fi ;; AIX:*) #PLATFORM=aix-g++ #PLATFORM=aix-g++-64 PLATFORM=aix-xlc #PLATFORM=aix-xlc-64 PLATFORM_NOTES=" - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64 " ;; GNU:*) PLATFORM=hurd-g++ ;; dgux:*) PLATFORM=dgux-g++ ;; # DYNIX/ptx:4*) # PLATFORM=dynix-g++ # ;; ULTRIX:*) PLATFORM=ultrix-g++ ;; FreeBSD:*) PLATFORM=freebsd-g++ PLATFORM_NOTES=" - Also available for FreeBSD: freebsd-icc " ;; OpenBSD:*) PLATFORM=openbsd-g++ ;; NetBSD:*) PLATFORM=netbsd-g++ ;; BSD/OS:*|BSD/386:*) PLATFORM=bsdi-g++ ;; IRIX*:*) #PLATFORM=irix-g++ PLATFORM=irix-cc #PLATFORM=irix-cc-64 PLATFORM_NOTES=" - Also available for IRIX: irix-g++ irix-cc-64 " ;; HP-UX:*) case "$UNAME_MACHINE" in ia64) #PLATFORM=hpuxi-acc-32 PLATFORM=hpuxi-acc-64 PLATFORM_NOTES=" - Also available for HP-UXi: hpuxi-acc-32 " ;; *) #PLATFORM=hpux-g++ PLATFORM=hpux-acc #PLATFORM=hpux-acc-64 #PLATFORM=hpux-cc #PLATFORM=hpux-acc-o64 PLATFORM_NOTES=" - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64 " ;; esac ;; OSF1:*) #PLATFORM=tru64-g++ PLATFORM=tru64-cxx PLATFORM_NOTES=" - Also available for Tru64: tru64-g++ " ;; Linux:*) case "$UNAME_MACHINE" in x86_64|s390x|ppc64) PLATFORM=linux-g++-64 ;; *) PLATFORM=linux-g++ ;; esac PLATFORM_NOTES=" - Also available for Linux: linux-kcc linux-icc linux-cxx " ;; SunOS:5*) #PLATFORM=solaris-g++ PLATFORM=solaris-cc #PLATFORM=solaris-cc64 PLATFORM_NOTES=" - Also available for Solaris: solaris-g++ solaris-cc-64 " ;; ReliantUNIX-*:*|SINIX-*:*) PLATFORM=reliant-cds #PLATFORM=reliant-cds-64 PLATFORM_NOTES=" - Also available for Reliant UNIX: reliant-cds-64 " ;; CYGWIN*:*) PLATFORM=cygwin-g++ ;; LynxOS*:*) PLATFORM=lynxos-g++ ;; OpenUNIX:*) #PLATFORM=unixware-g++ PLATFORM=unixware-cc PLATFORM_NOTES=" - Also available for OpenUNIX: unixware-g++ " ;; UnixWare:*) #PLATFORM=unixware-g++ PLATFORM=unixware-cc PLATFORM_NOTES=" - Also available for UnixWare: unixware-g++ " ;; SCO_SV:*) #PLATFORM=sco-g++ PLATFORM=sco-cc PLATFORM_NOTES=" - Also available for SCO OpenServer: sco-g++ " ;; UNIX_SV:*) PLATFORM=unixware-g++ ;; QNX:*) PLATFORM=unsupported/qnx-g++ ;; *) if [ "$OPT_HELP" != "yes" ]; then echo for p in $PLATFORMS; do echo " $relconf $* -platform $p" done echo >&2 echo " The build script does not currently recognize all" >&2 echo " platforms supported by Qt." >&2 echo " Rerun this script with a -platform option listed to" >&2 echo " set the system/compiler combination you use." >&2 echo >&2 exit 2 fi esac fi if [ "$PLATFORM_QWS" = "yes" ]; then CFG_SM=no PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"` else PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"` fi [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM" if [ -d "$PLATFORM" ]; then QMAKESPEC="$PLATFORM" else QMAKESPEC="$relpath/mkspecs/${PLATFORM}" fi if [ -d "$XPLATFORM" ]; then XQMAKESPEC="$XPLATFORM" else XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}" fi if [ "$PLATFORM" != "$XPLATFORM" ]; then QT_CROSS_COMPILE=yes QMAKE_CONFIG="$QMAKE_CONFIG cross_compile" fi if [ "$PLATFORM_MAC" = "yes" ]; then if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then echo >&2 echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2 echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2 echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2 echo " built with 'macx-g++'" >&2 echo >&2 exit 2 fi fi # check specified platforms are supported if [ '!' -d "$QMAKESPEC" ]; then echo echo " The specified system/compiler is not supported:" echo echo " $QMAKESPEC" echo echo " Please see the README file for a complete list." echo exit 2 fi if [ '!' -d "$XQMAKESPEC" ]; then echo echo " The specified system/compiler is not supported:" echo echo " $XQMAKESPEC" echo echo " Please see the README file for a complete list." echo exit 2 fi if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then echo echo " The specified system/compiler port is not complete:" echo echo " $XQMAKESPEC/qplatformdefs.h" echo echo " Please contact qt-bugs@trolltech.com." echo exit 2 fi # now look at the configs and figure out what platform we are config'd for [ "$CFG_EMBEDDED" = "no" ] \ && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \ && PLATFORM_X11=yes ### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes if [ "$UNAME_SYSTEM" = "SunOS" ]; then # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new" mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf" fi fi #------------------------------------------------------------------------------- # determine the system architecture #------------------------------------------------------------------------------- if [ "$OPT_VERBOSE" = "yes" ]; then echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)" fi if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then echo "" echo "You have specified a target architecture with -embedded and -arch." echo "The two architectures you have specified are different, so we can" echo "not proceed. Either set both to be the same, or only use -embedded." echo "" exit 1 fi fi if [ -z "${CFG_HOST_ARCH}" ]; then case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in IRIX*:*:*) CFG_HOST_ARCH=`uname -p` if [ "$OPT_VERBOSE" = "yes" ]; then echo " SGI ($CFG_HOST_ARCH)" fi ;; SunOS:5*:*) case "$UNAME_MACHINE" in sun4u*|sun4v*) if [ "$OPT_VERBOSE" = "yes" ]; then echo " Sun SPARC (sparc)" fi CFG_HOST_ARCH=sparc ;; i86pc) case "$PLATFORM" in *-64) if [ "$OPT_VERBOSE" = "yes" ]; then echo " 64-bit AMD 80x86 (x86_64)" fi CFG_HOST_ARCH=x86_64 ;; *) if [ "$OPT_VERBOSE" = "yes" ]; then echo " 32-bit Intel 80x86 (i386)" fi CFG_HOST_ARCH=i386 ;; esac esac ;; Darwin:*:*) case "$UNAME_MACHINE" in Power?Macintosh) if [ "$OPT_VERBOSE" = "yes" ]; then echo " 32-bit Apple PowerPC (powerpc)" fi ;; x86) if [ "$OPT_VERBOSE" = "yes" ]; then echo " 32-bit Intel 80x86 (i386)" fi ;; esac CFG_HOST_ARCH=macosx ;; AIX:*:00????????00) if [ "$OPT_VERBOSE" = "yes" ]; then echo " 64-bit IBM PowerPC (powerpc)" fi CFG_HOST_ARCH=powerpc ;; HP-UX:*:9000*) if [ "$OPT_VERBOSE" = "yes" ]; then echo " HP PA-RISC (parisc)" fi CFG_HOST_ARCH=parisc ;; *:*:i?86) if [ "$OPT_VERBOSE" = "yes" ]; then echo " 32-bit Intel 80x86 (i386)" fi CFG_HOST_ARCH=i386 ;; *:*:x86_64|*:*:amd64) if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then if [ "$OPT_VERBOSE" = "yes" ]; then echo " 32 bit on 64-bit AMD 80x86 (i386)" fi CFG_HOST_ARCH=i386 else if [ "$OPT_VERBOSE" = "yes" ]; then echo " 64-bit AMD 80x86 (x86_64)" fi CFG_HOST_ARCH=x86_64 fi ;; *:*:ppc) if [ "$OPT_VERBOSE" = "yes" ]; then echo " 32-bit PowerPC (powerpc)" fi CFG_HOST_ARCH=powerpc ;; *:*:ppc64) if [ "$OPT_VERBOSE" = "yes" ]; then echo " 64-bit PowerPC (powerpc)" fi CFG_HOST_ARCH=powerpc ;; *:*:s390*) if [ "$OPT_VERBOSE" = "yes" ]; then echo " IBM S/390 (s390)" fi CFG_HOST_ARCH=s390 ;; *:*:arm*) if [ "$OPT_VERBOSE" = "yes" ]; then echo " ARM (arm)" fi CFG_HOST_ARCH=arm ;; Linux:*:sparc*) if [ "$OPT_VERBOSE" = "yes" ]; then echo " Linux on SPARC" fi CFG_HOST_ARCH=sparc ;; QNX:*:*) case "$UNAME_MACHINE" in x86pc) if [ "$OPT_VERBOSE" = "yes" ]; then echo " QNX on Intel 80x86 (i386)" fi CFG_HOST_ARCH=i386 ;; esac ;; *:*:*) if [ "$OPT_VERBOSE" = "yes" ]; then echo " Trying '$UNAME_MACHINE'..." fi CFG_HOST_ARCH="$UNAME_MACHINE" ;; esac fi if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then if [ -n "$CFG_ARCH" ]; then CFG_EMBEDDED=$CFG_ARCH fi case "$CFG_EMBEDDED" in x86) CFG_ARCH=i386 ;; x86_64) CFG_ARCH=x86_64 ;; ipaq|sharp) CFG_ARCH=arm ;; dm7000) CFG_ARCH=powerpc ;; dm800) CFG_ARCH=mips ;; sh4al) CFG_ARCH=sh4a ;; *) CFG_ARCH="$CFG_EMBEDDED" ;; esac elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then CFG_ARCH=$CFG_HOST_ARCH fi if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then if [ "$OPT_VERBOSE" = "yes" ]; then echo " '$CFG_ARCH' is supported" fi else if [ "$OPT_VERBOSE" = "yes" ]; then echo " '$CFG_ARCH' is unsupported, using 'generic'" fi CFG_ARCH=generic fi if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then if [ "$OPT_VERBOSE" = "yes" ]; then echo " '$CFG_HOST_ARCH' is supported" fi else if [ "$OPT_VERBOSE" = "yes" ]; then echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'" fi CFG_HOST_ARCH=generic fi fi if [ "$OPT_VERBOSE" = "yes" ]; then echo "System architecture: '$CFG_ARCH'" if [ "$PLATFORM_QWS" = "yes" ]; then echo "Host architecture: '$CFG_HOST_ARCH'" fi 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=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '` 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 PKG_CONFIG="" fi fi # process CFG_MAC_ARCHS if [ "$PLATFORM_MAC" = "yes" ]; then # check -arch arguments for validity. ALLOWED="x86 ppc x86_64 ppc64 i386" # Save the list so we can re-write it using only valid values CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS" CFG_MAC_ARCHS= for i in $CFG_MAC_ARCHS_IN do if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64"; exit 2; fi if [ "$i" = "i386" -o "$i" = "x86" ]; then # These are synonymous values # CFG_MAC_ARCHS requires x86 while GCC requires i386 CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86" MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch i386" else CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i" MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -arch $i" fi done fi # pass on $CFG_SDK to the configure tests. if [ '!' -z "$CFG_SDK" ]; then MAC_CONFIG_TEST_COMMANDLINE="-sdk $CFG_SDK" echo "tests command line: $MAC_CONFIG_TEST_COMMANDLINE" fi # find the default framework value if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then if [ "$CFG_FRAMEWORK" = "auto" ]; then CFG_FRAMEWORK="$CFG_SHARED" elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then echo echo "WARNING: Using static linking will disable the use of Mac frameworks." echo CFG_FRAMEWORK="no" fi else CFG_FRAMEWORK=no fi QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1` TEST_COMPILER="$CC" [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER # auto-detect precompiled header support if [ "$CFG_PRECOMPILE" = "auto" ]; then if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then CFG_PRECOMPILE=no elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then CFG_PRECOMPILE=no else CFG_PRECOMPILE=yes fi elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then echo echo "WARNING: Using universal binaries disables precompiled headers." echo CFG_PRECOMPILE=no fi #auto-detect DWARF2 on the mac if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "auto" ]; then if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then CFG_MAC_DWARF2=no else CFG_MAC_DWARF2=yes fi fi # auto-detect support for -Xarch on the mac if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" == "auto" ]; then if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then CFG_MAC_XARCH=no else CFG_MAC_XARCH=yes fi fi # don't autodetect support for separate debug info on objcopy when # cross-compiling as lots of toolchains seems to have problems with this if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then CFG_SEPARATE_DEBUG_INFO="no" fi # auto-detect support for separate debug info in objcopy if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '` TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '` TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1` COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS" COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"` if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then CFG_SEPARATE_DEBUG_INFO=no else case "$PLATFORM" in hpux-*) # binutils on HP-UX is buggy; default to no. CFG_SEPARATE_DEBUG_INFO=no ;; *) CFG_SEPARATE_DEBUG_INFO=yes ;; esac fi fi # auto-detect -fvisibility support if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then CFG_REDUCE_EXPORTS=no else CFG_REDUCE_EXPORTS=yes fi fi # detect the availability of the -Bsymbolic-functions linker optimization if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then CFG_REDUCE_RELOCATIONS=no else CFG_REDUCE_RELOCATIONS=yes fi fi # auto-detect GNU make support if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then CFG_USE_GNUMAKE=yes fi # If -opengl wasn't specified, don't try to auto-detect if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then CFG_OPENGL=no fi # mac if [ "$PLATFORM_MAC" = "yes" ]; then if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then CFG_OPENGL=desktop fi fi # find the default framework value if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then if [ "$CFG_FRAMEWORK" = "auto" ]; then CFG_FRAMEWORK="$CFG_SHARED" elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then echo echo "WARNING: Using static linking will disable the use of Mac frameworks." echo CFG_FRAMEWORK="no" fi else CFG_FRAMEWORK=no fi # x11 tests are done after qmake is built #setup the build parts if [ -z "$CFG_BUILD_PARTS" ]; then CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS" # don't build tools by default when cross-compiling if [ "$PLATFORM" != "$XPLATFORM" ]; then CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"` fi fi for nobuild in $CFG_NOBUILD_PARTS; do CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"` done if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then # echo # echo "WARNING: libs is a required part of the build." # echo CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs" fi #------------------------------------------------------------------------------- # post process QT_INSTALL_* variables #------------------------------------------------------------------------------- #prefix if [ -z "$QT_INSTALL_PREFIX" ]; then if [ "$CFG_DEV" = "yes" ]; then QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default elif [ "$PLATFORM_QWS" = "yes" ]; then QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}" if [ "$PLATFORM" != "$XPLATFORM" ]; then QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}" fi else QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION fi fi QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"` #docs if [ -z "$QT_INSTALL_DOCS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then if [ "$PLATFORM_MAC" = "yes" ]; then QT_INSTALL_DOCS="/Developer/Documentation/Qt" fi fi [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback fi QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"` #headers if [ -z "$QT_INSTALL_HEADERS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then if [ "$PLATFORM_MAC" = "yes" ]; then if [ "$CFG_FRAMEWORK" = "yes" ]; then QT_INSTALL_HEADERS= fi fi fi [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include" fi QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"` #libs if [ -z "$QT_INSTALL_LIBS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then if [ "$PLATFORM_MAC" = "yes" ]; then if [ "$CFG_FRAMEWORK" = "yes" ]; then QT_INSTALL_LIBS="/Libraries/Frameworks" fi fi fi [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback fi QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"` #bins if [ -z "$QT_INSTALL_BINS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then if [ "$PLATFORM_MAC" = "yes" ]; then QT_INSTALL_BINS="/Developer/Applications/Qt" fi fi [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback fi QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"` #plugins if [ -z "$QT_INSTALL_PLUGINS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then if [ "$PLATFORM_MAC" = "yes" ]; then QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins" fi fi [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback fi QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"` #data if [ -z "$QT_INSTALL_DATA" ]; then #default QT_INSTALL_DATA="$QT_INSTALL_PREFIX" fi QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"` #translations if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations" fi QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"` #settings if [ -z "$QT_INSTALL_SETTINGS" ]; then #default if [ "$PLATFORM_MAC" = "yes" ]; then QT_INSTALL_SETTINGS=/Library/Preferences/Qt else QT_INSTALL_SETTINGS=/etc/xdg fi fi QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"` #examples if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then if [ "$PLATFORM_MAC" = "yes" ]; then QT_INSTALL_EXAMPLES="/Developer/Examples/Qt" fi fi [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback fi QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"` #demos if [ -z "$QT_INSTALL_DEMOS" ]; then #default if [ "$CFG_PREFIX_INSTALL" = "no" ]; then if [ "$PLATFORM_MAC" = "yes" ]; then QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos" fi fi [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos" fi QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"` #------------------------------------------------------------------------------- # help - interactive parts of the script _after_ this section please #------------------------------------------------------------------------------- # next, emit a usage message if something failed. if [ "$OPT_HELP" = "yes" ]; then [ "x$ERROR" = "xyes" ] && echo if [ "$CFG_NIS" = "no" ]; then NSY=" " NSN="*" else NSY="*" NSN=" " fi if [ "$CFG_CUPS" = "no" ]; then CUY=" " CUN="*" else CUY="*" CUN=" " fi if [ "$CFG_ICONV" = "no" ]; then CIY=" " CIN="*" else CIY="*" CIN=" " fi if [ "$CFG_LARGEFILE" = "no" ]; then LFSY=" " LFSN="*" else LFSY="*" LFSN=" " fi if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then SHY="*" SHN=" " else SHY=" " SHN="*" fi if [ "$CFG_IPV6" = "auto" ]; then I6Y="*" I6N=" " fi if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then PHY=" " PHN="*" else PHY="*" PHN=" " fi cat <] [-prefix-install] [-bindir ] [-libdir ] [-docdir ] [-headerdir ] [-plugindir ] [-datadir ] [-translationdir ] [-sysconfdir ] [-examplesdir ] [-demosdir ] [-buildkey ] [-release] [-debug] [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile] [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility] [-accessibility] [-no-stl] [-stl] [-no-sql-] [-sql-] [-plugin-sql-] [-system-sqlite] [-no-qt3support] [-qt3support] [-platform] [-D ] [-I ] [-L ] [-help] [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff] [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng] [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make ] [-no-make ] [-R ] [-l ] [-no-rpath] [-rpath] [-continue] [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv] [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2] [-qtnamespace ] [-qtlibinfix ] [-separate-debug-info] [-armfpa] [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend] [-no-openssl] [-openssl] [-openssl-linked] [-no-multimedia] [-multimedia] [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-script] [-script] [-no-scripttools] [-scripttools] [additional platform specific options (see below)] Installation options: These are optional, but you may specify install directories. -prefix ...... This will install everything relative to (default $QT_INSTALL_PREFIX) EOF if [ "$PLATFORM_QWS" = "yes" ]; then cat < ......... Executables will be installed to (default PREFIX/bin) -libdir ......... Libraries will be installed to (default PREFIX/lib) -docdir ......... Documentation will be installed to (default PREFIX/doc) -headerdir ...... Headers will be installed to (default PREFIX/include) -plugindir ...... Plugins will be installed to (default PREFIX/plugins) -datadir ........ Data used by Qt programs will be installed to (default PREFIX) -translationdir . Translations of Qt programs will be installed to (default PREFIX/translations) -sysconfdir ..... Settings used by Qt programs will be looked for in (default PREFIX/etc/settings) -examplesdir .... Examples will be installed to (default PREFIX/examples) -demosdir ....... Demos will be installed to (default PREFIX/demos) You may use these options to turn on strict plugin loading. -buildkey .... Build the Qt library and plugins using the specified . When the library loads plugins, it will only load those that have a matching key. Configure options: The defaults (*) are usually acceptable. A plus (+) denotes a default value that needs to be evaluated. If the evaluation succeeds, the feature is included. Here is a short explanation of each option: * -release ........... Compile and link Qt with debugging turned off. -debug ............. Compile and link Qt with debugging turned on. -debug-and-release . Compile and link two versions of Qt, with and without debugging turned on (Mac only). -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting) -opensource......... Compile and link the Open-Source Edition of Qt. -commercial......... Compile and link the Commercial Edition of Qt. * -shared ............ Create and use shared Qt libraries. -static ............ Create and use static Qt libraries. * -no-fast ........... Configure Qt normally by generating Makefiles for all project files. -fast .............. Configure Qt quickly by generating Makefiles only for library and subdirectory targets. All other Makefiles are created as wrappers, which will in turn run qmake. -no-largefile ...... Disables large file support. + -largefile ......... Enables Qt to access files larger than 4 GB. EOF if [ "$PLATFORM_QWS" = "yes" ]; then EXCN="*" EXCY=" " else EXCN=" " EXCY="*" fi if [ "$CFG_DBUS" = "no" ]; then DBY=" " DBN="+" else DBY="+" DBN=" " fi cat << EOF $EXCN -no-exceptions ..... Disable exceptions on compilers that support it. $EXCY -exceptions ........ Enable exceptions on compilers that support it. -no-accessibility .. Do not compile Accessibility support. * -accessibility ..... Compile Accessibility support. $SHN -no-stl ............ Do not compile STL support. $SHY -stl ............... Compile STL support. -no-sql- ... Disable SQL entirely. -qt-sql- ... Enable a SQL in the QtSql library, by default none are turned on. -plugin-sql- Enable SQL as a plugin to be linked to at run time. Possible values for : [ $CFG_SQL_AVAILABLE ] -system-sqlite ..... Use sqlite from the operating system. -no-qt3support ..... Disables the Qt 3 support functionality. * -qt3support ........ Enables the Qt 3 support functionality. -no-xmlpatterns .... Do not build the QtXmlPatterns module. + -xmlpatterns ....... Build the QtXmlPatterns module. QtXmlPatterns is built if a decent C++ compiler is used and exceptions are enabled. -no-phonon ......... Do not build the Phonon module. + -phonon ............ Build the Phonon module. Phonon is built if a decent C++ compiler is used. -no-phonon-backend.. Do not build the platform phonon plugin. + -phonon-backend..... Build the platform phonon plugin. -no-multimedia ..... Do not build the multimedia module. * -multimedia ........ Build the multimedia module. -no-svg ............ Do not build the SVG module. + -svg ............... Build the SVG module. -no-webkit ......... Do not build the WebKit module. + -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. -platform target ... The operating system and compiler you are building on ($PLATFORM). See the README file for a list of supported operating systems and compilers. EOF if [ "${PLATFORM_QWS}" != "yes" ]; then cat << EOF -graphicssystem Sets an alternate graphics system. Available options are: raster - Software rasterizer opengl - Rendering via OpenGL, Experimental! EOF fi cat << EOF -no-mmx ............ Do not compile with use of MMX instructions. -no-3dnow .......... Do not compile with use of 3DNOW instructions. -no-sse ............ Do not compile with use of SSE instructions. -no-sse2 ........... Do not compile with use of SSE2 instructions. -qtnamespace Wraps all Qt library code in 'namespace {...}'. -qtlibinfix Renames all libQt*.so to libQt*.so. -D ........ Add an explicit define to the preprocessor. -I ........ Add an explicit include path. -L ........ Add an explicit library path. -help, -h .......... Display this information. Third Party Libraries: -qt-zlib ........... Use the zlib bundled with Qt. + -system-zlib ....... Use zlib from the operating system. See http://www.gzip.org/zlib -no-gif ............ Do not compile the plugin for GIF reading support. * -qt-gif ............ Compile the plugin for GIF reading support. See also src/plugins/imageformats/gif/qgifhandler.h -no-libtiff ........ Do not compile the plugin for TIFF support. -qt-libtiff ........ Use the libtiff bundled with Qt. + -system-libtiff .... Use libtiff from the operating system. See http://www.libtiff.org -no-libpng ......... Do not compile in PNG support. -qt-libpng ......... Use the libpng bundled with Qt. + -system-libpng ..... Use libpng from the operating system. See http://www.libpng.org/pub/png -no-libmng ......... Do not compile the plugin for MNG support. -qt-libmng ......... Use the libmng bundled with Qt. + -system-libmng ..... Use libmng from the operating system. See http://www.libmng.com -no-libjpeg ........ Do not compile the plugin for JPEG support. -qt-libjpeg ........ Use the libjpeg bundled with Qt. + -system-libjpeg .... Use libjpeg from the operating system. See http://www.ijg.org -no-openssl ........ Do not compile support for OpenSSL. + -openssl ........... Enable run-time OpenSSL support. -openssl-linked .... Enabled linked OpenSSL support. -ptmalloc .......... Override the system memory allocator with ptmalloc. (Experimental.) Additional options: -make ....... Add part to the list of parts to be built at make time. ($QT_DEFAULT_BUILD_PARTS) -nomake ..... Exclude part from the list of parts to be built. -R ........ Add an explicit runtime library path to the Qt libraries. -l ........ Add an explicit library. -no-rpath .......... Do not use the library install path as a runtime library path. + -rpath ............. Link Qt libraries and executables using the library install path as a runtime library path. Equivalent to -R install_libpath -continue .......... Continue as far as possible if an error occurs. -verbose, -v ....... Print verbose information about each step of the configure process. -silent ............ Reduce the build output so that warnings and errors can be seen more easily. * -no-optimized-qmake ... Do not build qmake optimized. -optimized-qmake ...... Build qmake optimized. $NSN -no-nis ............ Do not compile NIS support. $NSY -nis ............... Compile NIS support. $CUN -no-cups ........... Do not compile CUPS support. $CUY -cups .............. Compile CUPS support. Requires cups/cups.h and libcups.so.2. $CIN -no-iconv .......... Do not compile support for iconv(3). $CIY -iconv ............. Compile support for iconv(3). $PHN -no-pch ............ Do not use precompiled header support. $PHY -pch ............... Use precompiled header support. $DBN -no-dbus ........... Do not compile the QtDBus module. $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1. -dbus-linked ....... Compile the QtDBus module and link to libdbus-1. -reduce-relocations ..... Reduce relocations in the libraries through extra linker optimizations (Qt/X11 and Qt for Embedded Linux only; experimental; needs GNU ld >= 2.18). EOF if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then if [ "$QT_CROSS_COMPILE" = "yes" ]; then SBY="" SBN="*" else SBY="*" SBN=" " fi elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then SBY="*" SBN=" " else SBY=" " SBN="*" fi if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then cat << EOF $SBN -no-separate-debug-info . Do not store debug information in a separate file. $SBY -separate-debug-info .... Strip debug information into a separate .debug file. EOF fi # X11/QWS if [ "$PLATFORM_X11" = "yes" ]; then if [ "$CFG_SM" = "no" ]; then SMY=" " SMN="*" else SMY="*" SMN=" " fi if [ "$CFG_XSHAPE" = "no" ]; then SHY=" " SHN="*" else SHY="*" SHN=" " fi if [ "$CFG_XINERAMA" = "no" ]; then XAY=" " XAN="*" else XAY="*" XAN=" " fi if [ "$CFG_FONTCONFIG" = "no" ]; then FCGY=" " FCGN="*" else FCGY="*" FCGN=" " fi if [ "$CFG_XCURSOR" = "no" ]; then XCY=" " XCN="*" else XCY="*" XCN=" " fi if [ "$CFG_XFIXES" = "no" ]; then XFY=" " XFN="*" else XFY="*" XFN=" " fi if [ "$CFG_XRANDR" = "no" ]; then XZY=" " XZN="*" else XZY="*" XZN=" " fi if [ "$CFG_XRENDER" = "no" ]; then XRY=" " XRN="*" else XRY="*" XRN=" " fi if [ "$CFG_MITSHM" = "no" ]; then XMY=" " XMN="*" else XMY="*" XMN=" " fi if [ "$CFG_XINPUT" = "no" ]; then XIY=" " XIN="*" else XIY="*" XIN=" " fi if [ "$CFG_XKB" = "no" ]; then XKY=" " XKN="*" else XKY="*" XKN=" " fi if [ "$CFG_IM" = "no" ]; then IMY=" " IMN="*" else IMY="*" IMN=" " fi cat << EOF Qt/X11 only: -no-gtkstyle ....... Do not build the GTK theme integration. + -gtkstyle .......... Build the GTK theme integration. * -no-nas-sound ...... Do not compile in NAS sound support. -system-nas-sound .. Use NAS libaudio from the operating system. See http://radscan.com/nas.html -no-opengl ......... Do not support OpenGL. + -opengl ...... Enable OpenGL support. With no parameter, this will auto-detect the "best" OpenGL API to use. If desktop OpenGL is avaliable, it will be used. Use desktop, es1, es1cl or es2 for to force the use of the Desktop (OpenGL 1.x or 2.x), OpenGL ES 1.x Common profile, 1.x Common Lite profile or 2.x APIs instead. On X11, the EGL API will be used to manage GL contexts in the case of OpenGL ES -no-openvg ........ Do not support OpenVG. + -openvg ........... Enable OpenVG support. Requires EGL support, typically supplied by an OpenGL or other graphics implementation. $SMN -no-sm ............. Do not support X Session Management. $SMY -sm ................ Support X Session Management, links in -lSM -lICE. $SHN -no-xshape ......... Do not compile XShape support. $SHY -xshape ............ Compile XShape support. Requires X11/extensions/shape.h. $SHN -no-xsync .......... Do not compile XSync support. $SHY -xsync ............. Compile XSync support. Requires X11/extensions/sync.h. $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support. $XAY -xinerama .......... Compile Xinerama support. Requires X11/extensions/Xinerama.h and libXinerama. By default, Xinerama support will be compiled if available and the shared libraries are dynamically loaded at runtime. $XCN -no-xcursor ........ Do not compile Xcursor support. $XCY -xcursor ........... Compile Xcursor support. Requires X11/Xcursor/Xcursor.h and libXcursor. By default, Xcursor support will be compiled if available and the shared libraries are dynamically loaded at runtime. $XFN -no-xfixes ......... Do not compile Xfixes support. $XFY -xfixes ............ Compile Xfixes support. Requires X11/extensions/Xfixes.h and libXfixes. By default, Xfixes support will be compiled if available and the shared libraries are dynamically loaded at runtime. $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support. $XZY -xrandr ............ Compile Xrandr support. Requires X11/extensions/Xrandr.h and libXrandr. $XRN -no-xrender ........ Do not compile Xrender support. $XRY -xrender ........... Compile Xrender support. Requires X11/extensions/Xrender.h and libXrender. $XMN -no-mitshm ......... Do not compile MIT-SHM support. $XMY -mitshm ............ Compile MIT-SHM support. Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support. $FCGY -fontconfig ........ Compile FontConfig support. Requires fontconfig/fontconfig.h, libfontconfig, freetype.h and libfreetype. $XIN -no-xinput.......... Do not compile Xinput support. $XIY -xinput ............ Compile Xinput support. This also enabled tablet support which requires IRIX with wacom.h and libXi or XFree86 with X11/extensions/XInput.h and libXi. $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support. $XKY -xkb ............... Compile XKB support. EOF fi if [ "$PLATFORM_MAC" = "yes" ]; then cat << EOF Qt/Mac only: -Fstring ........... Add an explicit framework path. -fw string ......... Add an explicit framework. -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework and -static is not supported with -cocoa. Specifying this option creates Qt binaries that requires Mac OS X 10.5 or higher. * -framework ......... Build Qt as a series of frameworks and link tools against those frameworks. -no-framework ...... Do not build Qt as a series of frameworks. * -dwarf2 ............ Enable dwarf2 debugging symbols. -no-dwarf2 ......... Disable dwarf2 debugging symbols. -universal ......... Equivalent to -arch "ppc x86" -arch ....... Build Qt for Example values for : x86 ppc x86_64 ppc64 Multiple -arch arguments can be specified, 64-bit archs will be built with the Cocoa framework. -sdk ......... Build Qt using Apple provided SDK . This option requires gcc 4. To use a different SDK with gcc 3.3, set the SDKROOT environment variable. EOF fi if [ "$PLATFORM_QWS" = "yes" ]; then cat << EOF Qt for Embedded Linux only: -xplatform target ... The target platform when cross-compiling. -no-feature- Do not compile in . -feature- .. Compile in . The available features are described in src/corelib/global/qfeatures.txt -embedded .... This will enable the embedded build, you must have a proper license for this switch to work. Example values for : arm mips x86 generic -armfpa ............. Target platform is uses the ARM-FPA floating point format. -no-armfpa .......... Target platform does not use the ARM-FPA floating point format. The floating point format is usually autodetected by configure. Use this to override the detected value. -little-endian ...... Target platform is little endian (LSB first). -big-endian ......... Target platform is big endian (MSB first). -host-little-endian . Host platform is little endian (LSB first). -host-big-endian .... Host platform is big endian (MSB first). You only need to specify the endianness when cross-compiling, otherwise the host endianness will be used. -no-freetype ........ Do not compile in Freetype2 support. -qt-freetype ........ Use the libfreetype bundled with Qt. * -system-freetype .... Use libfreetype from the operating system. See http://www.freetype.org/ -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the default ($CFG_QCONFIG). -depths ...... Comma-separated list of supported bit-per-pixel depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'. -qt-decoration-