configure
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   104     esac
   104     esac
   105 
   105 
   106     echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
   106     echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
   107 }
   107 }
   108 
   108 
       
   109 # Helper function for getQMakeConf. It parses include statements in
       
   110 # qmake.conf and prints out the expanded file
       
   111 getQMakeConf1()
       
   112 {
       
   113     while read line; do case "$line" in
       
   114         include*)
       
   115 	    inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
       
   116 	    current_dir=`dirname "$1"`
       
   117 	    conf_file="$current_dir/$inc_file"
       
   118 	    if [ ! -e  "$conf_file" ]; then
       
   119                 echo "WARNING: Unable to find file $conf_file" >&2
       
   120                 continue
       
   121             fi
       
   122             getQMakeConf1 "$conf_file"
       
   123         ;;
       
   124         *)
       
   125             echo "$line"
       
   126         ;;
       
   127     esac; done < "$1"
       
   128 }
       
   129 
       
   130 
   109 # relies on $QMAKESPEC being set correctly. parses include statements in
   131 # relies on $QMAKESPEC being set correctly. parses include statements in
   110 # qmake.conf and prints out the expanded file
   132 # qmake.conf and prints out the expanded file
   111 getQMakeConf()
   133 getQMakeConf()
   112 {
   134 {
   113     tmpSPEC="$QMAKESPEC"
   135     tmpSPEC="$QMAKESPEC"
   114     if [ -n "$1" ]; then
   136     if [ -n "$1" ]; then
   115         tmpSPEC="$1"
   137         tmpSPEC="$1"
   116     fi
   138     fi
   117     $AWK -v "QMAKESPEC=$tmpSPEC" '
   139     getQMakeConf1 "$tmpSPEC/qmake.conf"
   118 /^include\(.+\)$/{
       
   119     fname = QMAKESPEC "/" substr($0, 9, length($0) - 9)
       
   120     while ((getline line < fname) > 0)
       
   121         print line
       
   122     close(fname)
       
   123     next
       
   124 }
       
   125 { print }' "$tmpSPEC/qmake.conf"
       
   126 }
   140 }
   127 
   141 
   128 # relies on $TEST_COMPILER being set correctly
   142 # relies on $TEST_COMPILER being set correctly
   129 compilerSupportsFlag()
   143 compilerSupportsFlag()
   130 {
   144 {
   131     cat >conftest.cpp <<EOF
   145     cat >conftest.cpp <<EOF
   132 int main() { return 0; }
   146 int main() { return 0; }
   133 EOF
   147 EOF
   134     "$TEST_COMPILER" "$@" -o /dev/null conftest.cpp
   148     "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
   135     ret=$?
   149     ret=$?
   136     rm -f conftest.cpp conftest.o
   150     rm -f conftest.cpp conftest.o
   137     return $ret
   151     return $ret
   138 }
   152 }
   139 
   153 
   224 #-------------------------------------------------------------------------------
   238 #-------------------------------------------------------------------------------
   225 COMMERCIAL_USER=ask
   239 COMMERCIAL_USER=ask
   226 CFG_DEV=no
   240 CFG_DEV=no
   227 CFG_NOKIA=no
   241 CFG_NOKIA=no
   228 CFG_EMBEDDED=no
   242 CFG_EMBEDDED=no
       
   243 CFG_RTOS_ENABLED=yes
   229 EditionString=Commercial
   244 EditionString=Commercial
   230 
   245 
   231 earlyArgParse()
   246 earlyArgParse()
   232 {
   247 {
   233     # parse the arguments, setting things to "yes" or "no"
   248     # parse the arguments, setting things to "yes" or "no"
   360     QT_EDITION="QT_EDITION_DESKTOP"
   375     QT_EDITION="QT_EDITION_DESKTOP"
   361     LicenseType="Technology Preview"
   376     LicenseType="Technology Preview"
   362 elif [ $COMMERCIAL_USER = "yes" ]; then
   377 elif [ $COMMERCIAL_USER = "yes" ]; then
   363     # one of commercial editions
   378     # one of commercial editions
   364     [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
   379     [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
   365     [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes
   380     [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=no
   366 
   381 
   367     # read in the license file
   382     # read in the license file
   368     if [ -f "$LICENSE_FILE" ]; then
   383     if [ -f "$LICENSE_FILE" ]; then
   369         . "$LICENSE_FILE" >/dev/null 2>&1
   384         . "$LICENSE_FILE" >/dev/null 2>&1
   370         if [ -z "$LicenseKeyExt" ]; then
   385         if [ -z "$LicenseKeyExt" ]; then
   402         echo
   417         echo
   403         echo "Invalid license key. Please check the license key."
   418         echo "Invalid license key. Please check the license key."
   404         exit 1
   419         exit 1
   405     fi
   420     fi
   406     ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
   421     ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
   407     PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1`
   422     PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d -`
   408     LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
   423     LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
   409     LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
   424     LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
   410 
   425 
   411     # determine which edition we are licensed to use
   426     # determine which edition we are licensed to use
   412     case "$LicenseTypeCode" in
   427     case "$LicenseTypeCode" in
   429             ;;
   444             ;;
   430         esac
   445         esac
   431         ;;
   446         ;;
   432     Z4M|R4M|Q4M)
   447     Z4M|R4M|Q4M)
   433         LicenseType="Evaluation"
   448         LicenseType="Evaluation"
       
   449         QMakeVar add DEFINES QT_EVAL
   434         case $ProductCode in
   450         case $ProductCode in
   435          B)
   451          B)
   436             Edition="Evaluation"
   452             Edition="Evaluation"
   437             QT_EDITION="QT_EDITION_EVALUATION"
   453             QT_EDITION="QT_EDITION_EVALUATION"
   438             ;;
   454             ;;
   445         exit 1
   461         exit 1
   446     fi
   462     fi
   447 
   463 
   448     # verify that we are licensed to use Qt on this platform
   464     # verify that we are licensed to use Qt on this platform
   449     LICENSE_EXTENSION=
   465     LICENSE_EXTENSION=
   450     if [ "$PlatformCode" = "X" ]; then
   466     case "$PlatformCode" in
   451 	# Qt All-OS
   467 	*L)
   452 	LICENSE_EXTENSION="-ALLOS"
   468 	    CFG_RTOS_ENABLED=yes
   453     elif [ "$PLATFORM_QWS" = "yes" ]; then
   469 	    PlatformCode=`echo "$PlatformCode" | sed 'h;y/8NPQRTZ/UCWX9M7/;x;G;s/\(.\)....\(.\)./\1\2/'`
   454         case $PlatformCode in
   470 	    ;;
   455         2|4|8|A|B|E|G|J|K|P|Q|S|U|V|W)
   471 	*)
       
   472 	    CFG_RTOS_ENABLED=no
       
   473 	    PlatformCode=`echo "$PlatformCode" | sed 's/.$//'`
       
   474 	    ;;
       
   475     esac
       
   476     case "$PlatformCode,$PLATFORM_MAC,$PLATFORM_QWS" in
       
   477         X9,* | XC,* | XU,* | XW,* | XM,*)
       
   478             # Qt All-OS
       
   479             LICENSE_EXTENSION="-ALLOS"
       
   480             ;;
       
   481         8M,* | KM,* | S9,* | SC,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*)
   456             # Qt for Embedded Linux
   482             # Qt for Embedded Linux
   457             LICENSE_EXTENSION="-EMBEDDED"
   483             LICENSE_EXTENSION="-EMBEDDED"
   458             ;;
   484             ;;
       
   485         6M,*,no | N7,*,no | N9,*,no | NX,*,no)
       
   486             # Embedded no-deploy
       
   487             LICENSE_EXTENSION="-EMBEDDED"
       
   488             ;;
       
   489         FM,*,no | LM,yes,* | ZM,no,no)
       
   490             # Desktop
       
   491             LICENSE_EXTENSION="-DESKTOP"
       
   492             ;;
   459         *)
   493         *)
       
   494             Platform=Linux/X11
       
   495             [ "$PLATFORM_MAC" = "yes" ] && Platform='Mac OS X'
       
   496             [ "$PLATFORM_QWS" = "yes" ] && Platform='Embedded Linux'
   460             echo
   497             echo
   461             echo "You are not licensed for Qt for Embedded Linux."
   498             echo "You are not licensed for the $Platform platform."
   462             echo
   499             echo
   463             echo "Please contact qt-info@nokia.com to upgrade your license"
   500             echo "Please contact qt-info@nokia.com to upgrade your license to"
   464             echo "to include Qt for Embedded Linux, or install the"
   501             echo "include the $Platform platform, or install the Qt Open Source Edition"
   465             echo "Qt Open Source Edition if you intend to develop free software."
   502             echo "if you intend to develop free software."
   466             exit 1
   503             exit 1
   467             ;;
   504             ;;
   468         esac
   505     esac
   469     elif [ "$PLATFORM_MAC" = "yes" ]; then
       
   470         case $PlatformCode in
       
   471         2|4|5|7|9|B|C|E|F|G|L|M|U|W|Y)
       
   472             # Qt/Mac
       
   473             LICENSE_EXTENSION="-DESKTOP"
       
   474             ;;
       
   475         3|6|8|A|D|H|J|K|P|Q|S|V)
       
   476             # Embedded no-deploy
       
   477             LICENSE_EXTENSION="-EMBEDDED"
       
   478 	    ;;
       
   479         *)
       
   480             echo
       
   481             echo "You are not licensed for the Qt/Mac platform."
       
   482             echo
       
   483             echo "Please contact qt-info@nokia.com to upgrade your license"
       
   484             echo "to include the Qt/Mac platform."
       
   485             exit 1
       
   486             ;;
       
   487         esac
       
   488      else
       
   489          case $PlatformCode in
       
   490          2|3|4|5|7|D|E|F|J|M|Q|S|T|V|Z)
       
   491              # Qt/X11
       
   492              LICENSE_EXTENSION="-DESKTOP"
       
   493              ;;
       
   494          6|8|9|A|B|C|G|H|K|P|U|W)
       
   495              # Embedded no-deploy
       
   496              LICENSE_EXTENSION="-EMBEDDED"
       
   497              ;;
       
   498          *)
       
   499              echo
       
   500              echo "You are not licensed for the Qt/X11 platform."
       
   501              echo
       
   502              echo "Please contact qt-info@nokia.com to upgrade your license to"
       
   503              echo "include the Qt/X11 platform, or install the Qt Open Source Edition"
       
   504              echo "if you intend to develop free software."
       
   505              exit 1
       
   506              ;;
       
   507         esac
       
   508     fi
       
   509 
   506 
   510     if test -r "$relpath/.LICENSE"; then
   507     if test -r "$relpath/.LICENSE"; then
   511 	# Generic, non-final license
   508 	# Generic, non-final license
   512 	LICENSE_EXTENSION=""
   509 	LICENSE_EXTENSION=""
   513 	line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
   510 	line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
   530 	EditionString="$Edition"
   527 	EditionString="$Edition"
   531 	QT_EDITION="QT_EDITION_DESKTOP"
   528 	QT_EDITION="QT_EDITION_DESKTOP"
   532     fi
   529     fi
   533 
   530 
   534     case "$LicenseFeatureCode" in
   531     case "$LicenseFeatureCode" in
   535     G|L)
   532     B|G|L|Y)
   536         # US
   533         # US
   537         case "$LicenseType" in
   534         case "$LicenseType" in
   538         Commercial)
   535         Commercial)
   539             cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
   536             cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
   540             ;;
   537             ;;
   541         Evaluation)
   538         Evaluation)
   542             cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
   539             cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
   543             ;;
   540             ;;
   544         esac
   541         esac
   545         ;;
   542         ;;
   546     2|5)
   543     2|4|5|F)
   547         # non-US
   544         # non-US
   548         case "$LicenseType" in
   545         case "$LicenseType" in
   549         Commercial)
   546         Commercial)
   550             cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
   547             cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
   551             ;;
   548             ;;
   557     *)
   554     *)
   558         echo
   555         echo
   559         echo "Invalid license key. Please check the license key."
   556         echo "Invalid license key. Please check the license key."
   560         exit 1
   557         exit 1
   561         ;;
   558         ;;
       
   559     esac
       
   560     case "$LicenseFeatureCode" in
       
   561 	4|B|F|Y)
       
   562 	    CFG_RTOS_ENABLED=yes
       
   563 	    ;;
       
   564 	2|5|G|L)
       
   565 	    CFG_RTOS_ENABLED=no
       
   566 	    ;;
   562     esac
   567     esac
   563     if [ '!' -f "$outpath/LICENSE" ]; then
   568     if [ '!' -f "$outpath/LICENSE" ]; then
   564         echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
   569         echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
   565         echo "this software has disappeared."
   570         echo "this software has disappeared."
   566         echo
   571         echo
   669 CFG_NOBUILD_PARTS=""
   674 CFG_NOBUILD_PARTS=""
   670 CFG_RELEASE_QMAKE=no
   675 CFG_RELEASE_QMAKE=no
   671 CFG_PHONON=auto
   676 CFG_PHONON=auto
   672 CFG_PHONON_BACKEND=yes
   677 CFG_PHONON_BACKEND=yes
   673 CFG_MULTIMEDIA=yes
   678 CFG_MULTIMEDIA=yes
       
   679 CFG_AUDIO_BACKEND=yes
   674 CFG_SVG=yes
   680 CFG_SVG=yes
       
   681 CFG_DECLARATIVE=auto
   675 CFG_WEBKIT=auto # (yes|no|auto)
   682 CFG_WEBKIT=auto # (yes|no|auto)
   676 CFG_JAVASCRIPTCORE_JIT=auto
   683 CFG_JAVASCRIPTCORE_JIT=auto
   677 
   684 
   678 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
   685 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb"
   679 CFG_GFX_ON="linuxfb multiscreen"
   686 CFG_GFX_ON="linuxfb multiscreen"
   718 CFG_OPENSSL=auto
   725 CFG_OPENSSL=auto
   719 CFG_PTMALLOC=no
   726 CFG_PTMALLOC=no
   720 CFG_STL=auto
   727 CFG_STL=auto
   721 CFG_PRECOMPILE=auto
   728 CFG_PRECOMPILE=auto
   722 CFG_SEPARATE_DEBUG_INFO=auto
   729 CFG_SEPARATE_DEBUG_INFO=auto
       
   730 CFG_SEPARATE_DEBUG_INFO_NOCOPY=no
   723 CFG_REDUCE_EXPORTS=auto
   731 CFG_REDUCE_EXPORTS=auto
   724 CFG_MMX=auto
   732 CFG_MMX=auto
   725 CFG_3DNOW=auto
   733 CFG_3DNOW=auto
   726 CFG_SSE=auto
   734 CFG_SSE=auto
   727 CFG_SSE2=auto
   735 CFG_SSE2=auto
   735 CFG_ENDIAN=auto
   743 CFG_ENDIAN=auto
   736 CFG_HOST_ENDIAN=auto
   744 CFG_HOST_ENDIAN=auto
   737 CFG_DOUBLEFORMAT=auto
   745 CFG_DOUBLEFORMAT=auto
   738 CFG_ARMFPA=auto
   746 CFG_ARMFPA=auto
   739 CFG_IWMMXT=no
   747 CFG_IWMMXT=no
       
   748 CFG_NEON=auto
   740 CFG_CLOCK_GETTIME=auto
   749 CFG_CLOCK_GETTIME=auto
   741 CFG_CLOCK_MONOTONIC=auto
   750 CFG_CLOCK_MONOTONIC=auto
   742 CFG_MREMAP=auto
   751 CFG_MREMAP=auto
   743 CFG_GETADDRINFO=auto
   752 CFG_GETADDRINFO=auto
   744 CFG_IPV6IFNAME=auto
   753 CFG_IPV6IFNAME=auto
   800 
   809 
   801 # flags for libdbus-1
   810 # flags for libdbus-1
   802 QT_CFLAGS_DBUS=
   811 QT_CFLAGS_DBUS=
   803 QT_LIBS_DBUS=
   812 QT_LIBS_DBUS=
   804 
   813 
       
   814 # QTP:QTPROD-7 Cross compiling on Linux broken
       
   815 # flags for Symbian style
       
   816 QT_SYMBIAN_STYLE_FLAGS=
       
   817 
   805 # flags for Glib (X11 only)
   818 # flags for Glib (X11 only)
   806 QT_CFLAGS_GLIB=
   819 QT_CFLAGS_GLIB=
   807 QT_LIBS_GLIB=
   820 QT_LIBS_GLIB=
   808 
   821 
   809 # flags for GStreamer (X11 only)
   822 # flags for GStreamer (X11 only)
   899         ;;
   912         ;;
   900     --*)
   913     --*)
   901         VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
   914         VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
   902         VAL=yes
   915         VAL=yes
   903         ;;
   916         ;;
       
   917 #QTP:QTPPROD-7
       
   918     #Qt Symbian style options
       
   919     -*-style-s60)
       
   920         VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
       
   921         if [ "$1" = "-no-style-s60" ]; then
       
   922           VAL=no
       
   923         else
       
   924           VAL=yes
       
   925         fi
       
   926         ;;
   904     #Qt plugin options
   927     #Qt plugin options
   905     -no-*-*|-plugin-*-*|-qt-*-*)
   928     -no-*-*|-plugin-*-*|-qt-*-*)
   906         VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
   929         VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
   907         VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
   930         VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
   908         ;;
   931         ;;
   910     -no-*)
   933     -no-*)
   911         VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
   934         VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
   912         VAL=no
   935         VAL=no
   913         ;;
   936         ;;
   914     #Qt style yes options
   937     #Qt style yes options
   915         -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|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
   938         -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-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|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
   916         VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
   939         VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
   917         VAL=yes
   940         VAL=yes
   918         ;;
   941         ;;
   919     #Qt style options that pass an argument
   942     #Qt style options that pass an argument
   920     -qconfig)
   943     -qconfig)
  1197     host_endian)
  1220     host_endian)
  1198         if [ "$VAL" = "little" ]; then
  1221         if [ "$VAL" = "little" ]; then
  1199             CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
  1222             CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
  1200         elif [ "$VAL" = "big" ]; then
  1223         elif [ "$VAL" = "big" ]; then
  1201             CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
  1224             CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
       
  1225         else
       
  1226             UNKNOWN_OPT=yes
       
  1227         fi
       
  1228         ;;
       
  1229 #QTP: QTPPROD-7
       
  1230     style-s60)
       
  1231         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
       
  1232             QT_SYMBIAN_STYLE_FLAGS="$VAL"
  1202         else
  1233         else
  1203             UNKNOWN_OPT=yes
  1234             UNKNOWN_OPT=yes
  1204         fi
  1235         fi
  1205         ;;
  1236         ;;
  1206     armfpa)
  1237     armfpa)
  1407             ;;
  1438             ;;
  1408         esac
  1439         esac
  1409         ;;
  1440         ;;
  1410     xplatform)
  1441     xplatform)
  1411         XPLATFORM="$VAL"
  1442         XPLATFORM="$VAL"
       
  1443 # QTP:QTPROD-7 Cross compiling on Linux broken
       
  1444         if [ "$CFG_ENDIAN" = "auto" ] && [ "$XPLATFORM"="symbian-sbsv2" ]; then
       
  1445           echo "set endian byte order"
       
  1446           CFG_ENDIAN="Q_LITTLE_ENDIAN"
       
  1447         fi
  1412         ;;
  1448         ;;
  1413     debug-and-release)
  1449     debug-and-release)
  1414         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
  1450         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
  1415             CFG_DEBUG_RELEASE="$VAL"
  1451             CFG_DEBUG_RELEASE="$VAL"
  1416         else
  1452         else
  1549         fi
  1585         fi
  1550         ;;
  1586         ;;
  1551     separate-debug-info)
  1587     separate-debug-info)
  1552         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
  1588         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
  1553             CFG_SEPARATE_DEBUG_INFO="$VAL"
  1589             CFG_SEPARATE_DEBUG_INFO="$VAL"
       
  1590         elif [ "$VAL" = "nocopy" ] ; then
       
  1591             CFG_SEPARATE_DEBUG_INFO="yes"
       
  1592             CFG_SEPARATE_DEBUG_INFO_NOCOPY="yes"
  1554         else
  1593         else
  1555             UNKNOWN_OPT=yes
  1594             UNKNOWN_OPT=yes
  1556         fi
  1595         fi
  1557         ;;
  1596         ;;
  1558     reduce-exports)
  1597     reduce-exports)
  1591         fi
  1630         fi
  1592         ;;
  1631         ;;
  1593     iwmmxt)
  1632     iwmmxt)
  1594 	CFG_IWMMXT="yes"
  1633 	CFG_IWMMXT="yes"
  1595 	;;
  1634 	;;
       
  1635     neon)
       
  1636         if [ "$VAL" = "no" ]; then
       
  1637             CFG_NEON="$VAL"
       
  1638         else
       
  1639             UNKNOWN_OPT=yes
       
  1640         fi
       
  1641         ;;
  1596     reduce-relocations)
  1642     reduce-relocations)
  1597         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
  1643         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
  1598             CFG_REDUCE_RELOCATIONS="$VAL"
  1644             CFG_REDUCE_RELOCATIONS="$VAL"
  1599         else
  1645         else
  1600             UNKNOWN_OPT=yes
  1646             UNKNOWN_OPT=yes
  1837         if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
  1883         if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
  1838             CFG_SVG="yes"
  1884             CFG_SVG="yes"
  1839         else
  1885         else
  1840             if [ "$VAL" = "no" ]; then
  1886             if [ "$VAL" = "no" ]; then
  1841                 CFG_SVG="no"
  1887                 CFG_SVG="no"
       
  1888             else
       
  1889                 UNKNOWN_OPT=yes
       
  1890             fi
       
  1891         fi
       
  1892         ;;
       
  1893     declarative)
       
  1894         if [ "$VAL" = "yes" ]; then
       
  1895             CFG_DECLARATIVE="yes"
       
  1896         else
       
  1897             if [ "$VAL" = "no" ]; then
       
  1898                 CFG_DECLARATIVE="no"
  1842             else
  1899             else
  1843                 UNKNOWN_OPT=yes
  1900                 UNKNOWN_OPT=yes
  1844             fi
  1901             fi
  1845         fi
  1902         fi
  1846 	;;
  1903 	;;
  2063             CFG_MULTIMEDIA="$VAL"
  2120             CFG_MULTIMEDIA="$VAL"
  2064         else
  2121         else
  2065             UNKNOWN_OPT=yes
  2122             UNKNOWN_OPT=yes
  2066         fi
  2123         fi
  2067         ;;
  2124         ;;
       
  2125     audio-backend)
       
  2126         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
       
  2127             CFG_AUDIO_BACKEND="$VAL"
       
  2128         else
       
  2129             UNKNOWN_OPT=yes
       
  2130         fi
       
  2131         ;;
  2068     *)
  2132     *)
  2069         UNKNOWN_OPT=yes
  2133         UNKNOWN_OPT=yes
  2070         ;;
  2134         ;;
  2071     esac
  2135     esac
  2072     if [ "$UNKNOWN_OPT" = "yes" ]; then
  2136     if [ "$UNKNOWN_OPT" = "yes" ]; then
  2138             OPT_SHADOW=yes
  2202             OPT_SHADOW=yes
  2139         fi
  2203         fi
  2140     fi
  2204     fi
  2141 fi
  2205 fi
  2142 if [ "$OPT_SHADOW" = "yes" ]; then
  2206 if [ "$OPT_SHADOW" = "yes" ]; then
  2143     if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" ]; then
  2207     if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
  2144         echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
  2208         echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
  2145         echo >&2 "Cannot proceed."
  2209         echo >&2 "Cannot proceed."
  2146         exit 1
  2210         exit 1
  2147     fi
  2211     fi
  2148     [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
  2212     [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
  2612         echo "The two architectures you have specified are different, so we can"
  2676         echo "The two architectures you have specified are different, so we can"
  2613         echo "not proceed. Either set both to be the same, or only use -embedded."
  2677         echo "not proceed. Either set both to be the same, or only use -embedded."
  2614         echo ""
  2678         echo ""
  2615         exit 1
  2679         exit 1
  2616     fi
  2680     fi
       
  2681 fi
       
  2682 
       
  2683 if [ "$CFG_RTOS_ENABLED" = "no" ]; then
       
  2684     case `basename "$XPLATFORM"` in
       
  2685 	qnx-* | vxworks-*)
       
  2686             echo ""
       
  2687             echo "You are not licensed for Qt for `basename $XPLATFORM`."
       
  2688             echo ""
       
  2689             echo "Please contact qt-info@nokia.com to upgrade your license to"
       
  2690             echo "include this platform, or install the Qt Open Source Edition"
       
  2691             echo "if you intend to develop free software."
       
  2692             exit 1
       
  2693 	    ;;
       
  2694     esac
  2617 fi
  2695 fi
  2618 
  2696 
  2619 if [ -z "${CFG_HOST_ARCH}" ]; then
  2697 if [ -z "${CFG_HOST_ARCH}" ]; then
  2620     case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
  2698     case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
  2621     IRIX*:*:*)
  2699     IRIX*:*:*)
  2839             echo >&2 "the paths to the toolchain's libraries & headers. If configure"
  2917             echo >&2 "the paths to the toolchain's libraries & headers. If configure"
  2840             echo >&2 "tests are failing, please check these files."
  2918             echo >&2 "tests are failing, please check these files."
  2841             echo >&2 ""
  2919             echo >&2 ""
  2842         fi
  2920         fi
  2843     else
  2921     else
       
  2922         echo >&2 ""
       
  2923         echo >&2 "You have not explicitly asked to use pkg-config and are cross-compiling."
       
  2924         echo >&2 "pkg-config will not be used to automatically query cflag/lib parameters for"
       
  2925         echo >&2 "dependencies"
       
  2926         echo >&2 ""
  2844         PKG_CONFIG=""
  2927         PKG_CONFIG=""
  2845     fi
  2928     fi
  2846 fi
  2929 fi
  2847 
  2930 
  2848 # process CFG_MAC_ARCHS
  2931 # process CFG_MAC_ARCHS
  2870     done
  2953     done
  2871 fi
  2954 fi
  2872 
  2955 
  2873 # pass on $CFG_SDK to the configure tests.
  2956 # pass on $CFG_SDK to the configure tests.
  2874 if [ '!' -z "$CFG_SDK" ]; then
  2957 if [ '!' -z "$CFG_SDK" ]; then
  2875     MAC_CONFIG_TEST_COMMANDLINE="-sdk $CFG_SDK"
  2958     MAC_CONFIG_TEST_COMMANDLINE="$MAC_CONFIG_TEST_COMMANDLINE -sdk $CFG_SDK"
  2876 fi
  2959 fi
  2877 
  2960 
  2878 # find the default framework value
  2961 # find the default framework value
  2879 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
  2962 if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
  2880     if [ "$CFG_FRAMEWORK" = "auto" ]; then
  2963     if [ "$CFG_FRAMEWORK" = "auto" ]; then
  2890 fi
  2973 fi
  2891 
  2974 
  2892 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
  2975 QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
  2893 TEST_COMPILER="$CC"
  2976 TEST_COMPILER="$CC"
  2894 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
  2977 [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
       
  2978 if [ -z "$TEST_COMPILER" ]; then
       
  2979     echo "ERROR: Cannot set the compiler for the configuration tests"
       
  2980     exit 1
       
  2981 fi
  2895 
  2982 
  2896 # auto-detect precompiled header support
  2983 # auto-detect precompiled header support
  2897 if [ "$CFG_PRECOMPILE" = "auto" ]; then
  2984 if [ "$CFG_PRECOMPILE" = "auto" ]; then
  2898     if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
  2985     if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
  2899        CFG_PRECOMPILE=no
  2986        CFG_PRECOMPILE=no
  3000 	echo
  3087 	echo
  3001         CFG_FRAMEWORK="no"
  3088         CFG_FRAMEWORK="no"
  3002     fi
  3089     fi
  3003 else
  3090 else
  3004     CFG_FRAMEWORK=no
  3091     CFG_FRAMEWORK=no
       
  3092 fi
       
  3093 
       
  3094 # Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
       
  3095 # with the default mkspec. The 10.4u SDK does not support gcc 4.2.
       
  3096 if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
       
  3097     # get the darwin version. 10.0.0 and up means snow leopard.
       
  3098     VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
       
  3099     if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
       
  3100         echo
       
  3101         echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
       
  3102         echo
       
  3103     fi
  3005 fi
  3104 fi
  3006 
  3105 
  3007 # x11 tests are done after qmake is built
  3106 # x11 tests are done after qmake is built
  3008 
  3107 
  3009 
  3108 
  3216         [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
  3315         [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
  3217         [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
  3316         [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
  3218         [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
  3317         [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
  3219         [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
  3318         [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
  3220         [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
  3319         [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
  3221         [-no-make <part>] [-R <string>]  [-l <string>] [-no-rpath]  [-rpath] [-continue]
  3320         [-nomake <part>] [-R <string>]  [-l <string>] [-no-rpath]  [-rpath] [-continue]
  3222         [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
  3321         [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
  3223         [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
  3322         [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
  3224         [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
  3323         [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
  3225         [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
  3324         [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
  3226         [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
  3325         [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
  3227         [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
  3326         [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
  3228         [-no-openssl] [-openssl] [-openssl-linked]
  3327         [-no-audio-backend] [-audio-backend] [-no-openssl] [-openssl] [-openssl-linked]
  3229         [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
  3328         [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
  3230         [-no-script] [-script] [-no-scripttools] [-scripttools]
  3329         [-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative]
  3231 
  3330 
  3232         [additional platform specific options (see below)]
  3331         [additional platform specific options (see below)]
  3233 
  3332 
  3234 
  3333 
  3235 Installation options:
  3334 Installation options:
  3361                          is used and exceptions are enabled.
  3460                          is used and exceptions are enabled.
  3362 
  3461 
  3363     -no-multimedia ..... Do not build the QtMultimedia module.
  3462     -no-multimedia ..... Do not build the QtMultimedia module.
  3364  +  -multimedia ........ Build the QtMultimedia module.
  3463  +  -multimedia ........ Build the QtMultimedia module.
  3365 
  3464 
       
  3465     -no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
       
  3466  +  -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
       
  3467 
  3366     -no-phonon ......... Do not build the Phonon module.
  3468     -no-phonon ......... Do not build the Phonon module.
  3367  +  -phonon ............ Build the Phonon module.
  3469  +  -phonon ............ Build the Phonon module.
  3368                          Phonon is built if a decent C++ compiler is used.
  3470                          Phonon is built if a decent C++ compiler is used.
  3369     -no-phonon-backend.. Do not build the platform phonon plugin.
  3471     -no-phonon-backend.. Do not build the platform phonon plugin.
  3370  +  -phonon-backend..... Build the platform phonon plugin.
  3472  +  -phonon-backend..... Build the platform phonon plugin.
  3382     -no-script ......... Do not build the QtScript module.
  3484     -no-script ......... Do not build the QtScript module.
  3383  +  -script ............ Build the QtScript module.
  3485  +  -script ............ Build the QtScript module.
  3384 
  3486 
  3385     -no-scripttools .... Do not build the QtScriptTools module.
  3487     -no-scripttools .... Do not build the QtScriptTools module.
  3386  +  -scripttools ....... Build the QtScriptTools module.
  3488  +  -scripttools ....... Build the QtScriptTools module.
       
  3489 
       
  3490  +  -no-declarative .....Do not build the declarative module.
       
  3491     -declarative ....... Build the declarative module.
  3387 
  3492 
  3388     -platform target ... The operating system and compiler you are building
  3493     -platform target ... The operating system and compiler you are building
  3389                          on ($PLATFORM).
  3494                          on ($PLATFORM).
  3390 
  3495 
  3391                          See the README file for a list of supported
  3496                          See the README file for a list of supported
  3624                          See http://radscan.com/nas.html
  3729                          See http://radscan.com/nas.html
  3625 
  3730 
  3626     -no-opengl ......... Do not support OpenGL.
  3731     -no-opengl ......... Do not support OpenGL.
  3627  +  -opengl <api> ...... Enable OpenGL support.
  3732  +  -opengl <api> ...... Enable OpenGL support.
  3628                          With no parameter, this will auto-detect the "best"
  3733                          With no parameter, this will auto-detect the "best"
  3629                          OpenGL API to use. If desktop OpenGL is avaliable, it
  3734                          OpenGL API to use. If desktop OpenGL is available, it
  3630                          will be used. Use desktop, es1, es1cl or es2 for <api>
  3735                          will be used. Use desktop, es1, es1cl or es2 for <api>
  3631                          to force the use of the Desktop (OpenGL 1.x or 2.x),
  3736                          to force the use of the Desktop (OpenGL 1.x or 2.x),
  3632                          OpenGL ES 1.x Common profile, 1.x Common Lite profile
  3737                          OpenGL ES 1.x Common profile, 1.x Common Lite profile
  3633                          or 2.x APIs instead. On X11, the EGL API will be used
  3738                          or 2.x APIs instead. On X11, the EGL API will be used
  3634                          to manage GL contexts in the case of OpenGL ES
  3739                          to manage GL contexts in the case of OpenGL ES
  3817                            Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
  3922                            Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
  3818 
  3923 
  3819     -iwmmxt ............ Compile using the iWMMXt instruction set
  3924     -iwmmxt ............ Compile using the iWMMXt instruction set
  3820                          (available on some XScale CPUs).
  3925                          (available on some XScale CPUs).
  3821 
  3926 
       
  3927     -no-neon ........... Do not compile with use of NEON instructions.
  3822 EOF
  3928 EOF
  3823 fi
  3929 fi
  3824 
  3930 
  3825 
  3931 
  3826 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
  3932 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
  3836  $GBY  -glib .............. Compile Glib support.
  3942  $GBY  -glib .............. Compile Glib support.
  3837 
  3943 
  3838 EOF
  3944 EOF
  3839 fi
  3945 fi
  3840 
  3946 
       
  3947 # QTP:QTPROD-7 Cross compiling on Linux broken
       
  3948 if [ "$XPLATFORM" = "symbian-sbsv2" ]; then
       
  3949     cat << EOF
       
  3950 
       
  3951 Qt for Symbian only:
       
  3952     -no-style-s60....... Disable s60 entirely
       
  3953     -qt-style-s60....... Enable s60 in the Qt Library
       
  3954 EOF
       
  3955 fi
       
  3956 
  3841    [ "x$ERROR" = "xyes" ] && exit 1
  3957    [ "x$ERROR" = "xyes" ] && exit 1
  3842    exit 0
  3958    exit 0
  3843 fi # Help
  3959 fi # Help
  3844 
  3960 
  3845 
  3961 
  3846 # -----------------------------------------------------------------------------
  3962 # -----------------------------------------------------------------------------
  3847 # LICENSING, INTERACTIVE PART
  3963 # LICENSING, INTERACTIVE PART
  3848 # -----------------------------------------------------------------------------
  3964 # -----------------------------------------------------------------------------
       
  3965 
  3849 
  3966 
  3850 if [ "$PLATFORM_QWS" = "yes" ]; then
  3967 if [ "$PLATFORM_QWS" = "yes" ]; then
  3851     Platform="Qt for Embedded Linux"
  3968     Platform="Qt for Embedded Linux"
  3852 elif [ "$PLATFORM_MAC" = "yes" ]; then
  3969 elif [ "$PLATFORM_MAC" = "yes" ]; then
  3853     Platform="Qt/Mac"
  3970     Platform="Qt/Mac"
       
  3971 elif [ "$XPLATFORM" = "symbian-sbsv2" ]; then
       
  3972     Platform="Qt/Symbian"
  3854 else
  3973 else
  3855     PLATFORM_X11=yes
  3974     PLATFORM_X11=yes
  3856     Platform="Qt/X11"
  3975     Platform="Qt for Linux/X11"
  3857 fi
  3976 fi
  3858 
  3977 
  3859 echo
  3978 echo
  3860 echo "This is the $Platform ${EditionString} Edition."
  3979 echo "This is the $Platform ${EditionString} Edition."
  3861 echo
  3980 echo
  4061 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
  4180 TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
  4062 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
  4181 SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
  4063 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
  4182 EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
  4064 DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
  4183 DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
  4065 
  4184 
       
  4185 TODAY=`date +%Y-%m-%d`
  4066 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
  4186 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
  4067 /* License Info */
  4187 /* License Info */
  4068 static const char qt_configure_licensee_str          [256 + 12] = "$LICENSE_USER_STR";
  4188 static const char qt_configure_licensee_str          [256 + 12] = "$LICENSE_USER_STR";
  4069 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
  4189 static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
       
  4190 
       
  4191 /* Installation date */
       
  4192 static const char qt_configure_installation          [12+11]    = "qt_instdate=$TODAY";
  4070 EOF
  4193 EOF
       
  4194 
  4071 
  4195 
  4072 if [ ! -z "$QT_HOST_PREFIX" ]; then
  4196 if [ ! -z "$QT_HOST_PREFIX" ]; then
  4073     HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
  4197     HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
  4074     HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
  4198     HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
  4075     HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
  4199     HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
  4146 else
  4270 else
  4147     [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
  4271     [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
  4148     mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
  4272     mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
  4149     chmod -w "$outpath/src/corelib/global/qconfig.cpp"
  4273     chmod -w "$outpath/src/corelib/global/qconfig.cpp"
  4150 fi
  4274 fi
       
  4275 
       
  4276 # -----------------------------------------------------------------------------
       
  4277 if [ "$LicenseType" = "Evaluation" ]; then
       
  4278     EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey=$LicenseKeyExt"`
       
  4279 elif echo "$D_FLAGS" | grep QT_EVAL >/dev/null 2>&1; then
       
  4280     EVALKEY=`"$relpath/config.tests/unix/padstring" 524 "qt_qevalkey="`
       
  4281 fi
       
  4282 
       
  4283 if [ -n "$EVALKEY" ]; then
       
  4284     rm -f "$outpath/src/corelib/global/qconfig_eval.cpp"
       
  4285     cat > "$outpath/src/corelib/global/qconfig_eval.cpp" <<EOF
       
  4286 /* Evaluation license key */
       
  4287 static const char qt_eval_key_data                   [512 + 12] = "$EVALKEY";
       
  4288 EOF
       
  4289     chmod -w "$outpath/src/corelib/global/qconfig_eval.cpp"
       
  4290 fi
       
  4291 
  4151 
  4292 
  4152 # -----------------------------------------------------------------------------
  4293 # -----------------------------------------------------------------------------
  4153 # build qmake
  4294 # build qmake
  4154 # -----------------------------------------------------------------------------
  4295 # -----------------------------------------------------------------------------
  4155 
  4296 
  4412     "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
  4553     "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"
  4413     if [ $? != "0" ]; then
  4554     if [ $? != "0" ]; then
  4414         echo "The iWMMXt functionality test failed!"
  4555         echo "The iWMMXt functionality test failed!"
  4415 	echo " Please make sure your compiler supports iWMMXt intrinsics!"
  4556 	echo " Please make sure your compiler supports iWMMXt intrinsics!"
  4416 	exit 1
  4557 	exit 1
       
  4558     fi
       
  4559 fi
       
  4560 
       
  4561 # detect neon support
       
  4562 if ([ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]) && [ "${CFG_NEON}" = "auto" ]; then
       
  4563     if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $l_FLAGS "-mfpu=neon"; then
       
  4564 	CFG_NEON=yes
       
  4565     else
       
  4566 	CFG_NEON=no
  4417     fi
  4567     fi
  4418 fi
  4568 fi
  4419 
  4569 
  4420 # detect zlib
  4570 # detect zlib
  4421 if [ "$CFG_ZLIB" = "no" ]; then
  4571 if [ "$CFG_ZLIB" = "no" ]; then
  5699         fi
  5849         fi
  5700     fi
  5850     fi
  5701 fi
  5851 fi
  5702 
  5852 
  5703 # detect OpenVG support
  5853 # detect OpenVG support
  5704 if [ "$CFG_OPENVG" != "no" ]; then
  5854 #QTP:QTPPROD-7 It is necessary to prohibit OpenVg checking for Symbian build
       
  5855 echo $XQMAKESPEC
       
  5856 if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then
  5705     if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
  5857     if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
  5706         if [ "$CFG_OPENVG" = "auto" ]; then
  5858         if [ "$CFG_OPENVG" = "auto" ]; then
  5707             CFG_OPENVG=yes
  5859             CFG_OPENVG=yes
  5708         fi
  5860         fi
  5709     elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
  5861     elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
  5756 if [ "$CFG_ALSA" = "auto" ]; then
  5908 if [ "$CFG_ALSA" = "auto" ]; then
  5757     if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
  5909     if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then
  5758         CFG_ALSA=yes
  5910         CFG_ALSA=yes
  5759     else
  5911     else
  5760         CFG_ALSA=no
  5912         CFG_ALSA=no
       
  5913     fi
       
  5914 fi
       
  5915 
       
  5916 if [ -f "$relpath/src/declarative/declarative.pro" ]; then
       
  5917     if [ "$CFG_DECLARATIVE" = "auto" ]; then
       
  5918         CFG_DECLARATIVE=yes
       
  5919     fi
       
  5920 else
       
  5921     if [ "$CFG_DECLARATIVE" = "auto" ] || [ "$CFG_DECLARATIVE" = "no" ]; then
       
  5922         CFG_DECLARATIVE=no
       
  5923     else
       
  5924         echo "Error: Unable to locate the qt-declarative package. Refer to the documentation on how to build the package."
       
  5925         exit 1
  5761     fi
  5926     fi
  5762 fi
  5927 fi
  5763 
  5928 
  5764 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then 
  5929 if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then 
  5765     if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
  5930     if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
  5929         QT_CONFIG="$QT_CONFIG shivavg"
  6094         QT_CONFIG="$QT_CONFIG shivavg"
  5930         QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
  6095         QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
  5931     fi
  6096     fi
  5932 fi
  6097 fi
  5933 
  6098 
       
  6099 # QTP:QTPROD-7 Cross compiling on Linux broken
       
  6100 if [ "$QT_SYMBIAN_STYLE_FLAGS" = "no" ]; then
       
  6101     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_S60"
       
  6102 else
       
  6103     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_STYLE_S60"
       
  6104 fi
       
  6105 
  5934 # enable opengl
  6106 # enable opengl
  5935 if [ "$CFG_OPENGL" = "no" ]; then
  6107 if [ "$CFG_OPENGL" = "no" ]; then
  5936     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
  6108     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
  5937 else
  6109 else
  5938     QT_CONFIG="$QT_CONFIG opengl"
  6110     QT_CONFIG="$QT_CONFIG opengl"
  6009 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
  6181 if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
  6010     QMakeVar add QMAKE_CFLAGS -g
  6182     QMakeVar add QMAKE_CFLAGS -g
  6011     QMakeVar add QMAKE_CXXFLAGS -g
  6183     QMakeVar add QMAKE_CXXFLAGS -g
  6012     QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info"
  6184     QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info"
  6013 fi
  6185 fi
       
  6186 if [ "$CFG_SEPARATE_DEBUG_INFO_NOCOPY" = "yes" ] ; then
       
  6187     QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info_nocopy"
       
  6188 fi
  6014 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
  6189 [ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
  6015 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
  6190 [ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
  6016 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
  6191 [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
  6017 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
  6192 [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
  6018 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
  6193 [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
       
  6194 [ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
  6019 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
  6195 [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
  6020 if [ "$CFG_IPV6" = "yes" ]; then
  6196 if [ "$CFG_IPV6" = "yes" ]; then
  6021     QT_CONFIG="$QT_CONFIG ipv6"
  6197     QT_CONFIG="$QT_CONFIG ipv6"
  6022 fi
  6198 fi
  6023 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
  6199 if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
  6370     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
  6546     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MULTIMEDIA"
  6371 else
  6547 else
  6372     QT_CONFIG="$QT_CONFIG multimedia"
  6548     QT_CONFIG="$QT_CONFIG multimedia"
  6373 fi
  6549 fi
  6374 
  6550 
       
  6551 if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
       
  6552     QT_CONFIG="$QT_CONFIG audio-backend"
       
  6553 fi
       
  6554 
  6375 if [ "$CFG_SVG" = "yes" ]; then
  6555 if [ "$CFG_SVG" = "yes" ]; then
  6376     QT_CONFIG="$QT_CONFIG svg"
  6556     QT_CONFIG="$QT_CONFIG svg"
  6377 else
  6557 else
  6378     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
  6558     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
       
  6559 fi
       
  6560 
       
  6561 if [ "$CFG_DECLARATIVE" = "yes" ]; then
       
  6562     QT_CONFIG="$QT_CONFIG declarative"
       
  6563 else
       
  6564     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE"
  6379 fi
  6565 fi
  6380 
  6566 
  6381 if [ "$CFG_WEBKIT" = "auto" ]; then
  6567 if [ "$CFG_WEBKIT" = "auto" ]; then
  6382     CFG_WEBKIT="$canBuildWebKit"
  6568     CFG_WEBKIT="$canBuildWebKit"
  6383 fi
  6569 fi
  7292         echo "JavaScriptCore JIT .. To be decided by JavaScriptCore"
  7478         echo "JavaScriptCore JIT .. To be decided by JavaScriptCore"
  7293     else
  7479     else
  7294         echo "JavaScriptCore JIT .. $CFG_JAVASCRIPTCORE_JIT"
  7480         echo "JavaScriptCore JIT .. $CFG_JAVASCRIPTCORE_JIT"
  7295     fi
  7481     fi
  7296 fi
  7482 fi
       
  7483 echo "Declarative module .. $CFG_DECLARATIVE"
  7297 echo "STL support ......... $CFG_STL"
  7484 echo "STL support ......... $CFG_STL"
  7298 echo "PCH support ......... $CFG_PRECOMPILE"
  7485 echo "PCH support ......... $CFG_PRECOMPILE"
  7299 echo "MMX/3DNOW/SSE/SSE2..  ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
  7486 echo "MMX/3DNOW/SSE/SSE2..  ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
  7300 if [ "${CFG_ARCH}" = "arm" ]; then
  7487 if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then
  7301     echo "iWMMXt support ...... ${CFG_IWMMXT}"
  7488     echo "iWMMXt support ...... ${CFG_IWMMXT}"
       
  7489     echo "NEON support ........ ${CFG_NEON}"
  7302 fi
  7490 fi
  7303 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
  7491 [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
  7304 echo "IPv6 support ........ $CFG_IPV6"
  7492 echo "IPv6 support ........ $CFG_IPV6"
  7305 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
  7493 echo "IPv6 ifname support . $CFG_IPV6IFNAME"
  7306 echo "getaddrinfo support . $CFG_GETADDRINFO"
  7494 echo "getaddrinfo support . $CFG_GETADDRINFO"
  7500 
  7688 
  7501 /^(TARGET.*=)/ {
  7689 /^(TARGET.*=)/ {
  7502     if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
  7690     if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
  7503         target_file = first
  7691         target_file = first
  7504         matched_target = 1
  7692         matched_target = 1
       
  7693     } else if ( \$3 == "lrelease" || \$3 == "qm_phony_target" ) {
       
  7694         target_file = second
       
  7695         matched_target = 1
  7505     }
  7696     }
  7506 }
  7697 }
  7507 
  7698 
  7508 matched_target == 0 && /^(TEMPLATE.*=)/ {
  7699 matched_target == 0 && /^(TEMPLATE.*=)/ {
  7509     if ( \$3 == "subdirs" )
  7700     if ( \$3 == "subdirs" )
  7584 PART_ROOTS=
  7775 PART_ROOTS=
  7585 for part in $CFG_BUILD_PARTS; do
  7776 for part in $CFG_BUILD_PARTS; do
  7586     case "$part" in
  7777     case "$part" in
  7587     tools) PART_ROOTS="$PART_ROOTS tools" ;;
  7778     tools) PART_ROOTS="$PART_ROOTS tools" ;;
  7588     libs) PART_ROOTS="$PART_ROOTS src" ;;
  7779     libs) PART_ROOTS="$PART_ROOTS src" ;;
       
  7780     translations) PART_ROOTS="$PART_ROOTS tools/linguist/lrelease translations" ;;
  7589     examples) PART_ROOTS="$PART_ROOTS examples demos" ;;
  7781     examples) PART_ROOTS="$PART_ROOTS examples demos" ;;
  7590     *) ;;
  7782     *) ;;
  7591     esac
  7783     esac
  7592 done
  7784 done
  7593 
  7785 
  7611         case $a in
  7803         case $a in
  7612         *winmain/winmain.pro) continue ;;
  7804         *winmain/winmain.pro) continue ;;
  7613         *s60main/s60main.pro) continue ;;
  7805         *s60main/s60main.pro) continue ;;
  7614         *examples/activeqt/*) continue ;;
  7806         *examples/activeqt/*) continue ;;
  7615         */qmake/qmake.pro) continue ;;
  7807         */qmake/qmake.pro) continue ;;
  7616         *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
  7808         *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
  7617         *) SPEC=$XQMAKESPEC ;;
  7809         *) SPEC=$XQMAKESPEC ;;
  7618         esac
  7810         esac
  7619         dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
  7811         dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
  7620         test -d "$dir" || mkdir -p "$dir"
  7812         test -d "$dir" || mkdir -p "$dir"
  7621         OUTDIR="$outpath/$dir"
  7813         OUTDIR="$outpath/$dir"