configure
changeset 18 2f34d5167611
parent 3 41300fa6a67c
child 22 79de32ba3296
equal deleted inserted replaced
3:41300fa6a67c 18:2f34d5167611
     1 #!/bin/sh
     1 #!/bin/sh
     2 #############################################################################
     2 #############################################################################
     3 ##
     3 ##
     4 ## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     4 ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     5 ## All rights reserved.
     5 ## All rights reserved.
     6 ## Contact: Nokia Corporation (qt-info@nokia.com)
     6 ## Contact: Nokia Corporation (qt-info@nokia.com)
     7 ##
     7 ##
     8 ## This file is the build configuration utility of the Qt Toolkit.
     8 ## This file is the build configuration utility of the Qt Toolkit.
     9 ##
     9 ##
   113     while read line; do case "$line" in
   113     while read line; do case "$line" in
   114         include*)
   114         include*)
   115 	    inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
   115 	    inc_file=`echo "$line" | sed -n -e "/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p"`
   116 	    current_dir=`dirname "$1"`
   116 	    current_dir=`dirname "$1"`
   117 	    conf_file="$current_dir/$inc_file"
   117 	    conf_file="$current_dir/$inc_file"
   118 	    if [ ! -e  "$conf_file" ]; then
   118 	    if [ ! -f  "$conf_file" ]; then
   119                 echo "WARNING: Unable to find file $conf_file" >&2
   119                 echo "WARNING: Unable to find file $conf_file" >&2
   120                 continue
   120                 continue
   121             fi
   121             fi
   122             getQMakeConf1 "$conf_file"
   122             getQMakeConf1 "$conf_file"
   123         ;;
   123         ;;
  2282     rm -f "$outpath/bin/syncqt"
  2282     rm -f "$outpath/bin/syncqt"
  2283     if [ -x "$relpath/bin/syncqt" ]; then
  2283     if [ -x "$relpath/bin/syncqt" ]; then
  2284         mkdir -p "$outpath/bin"
  2284         mkdir -p "$outpath/bin"
  2285         echo "#!/bin/sh" >"$outpath/bin/syncqt"
  2285         echo "#!/bin/sh" >"$outpath/bin/syncqt"
  2286         echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
  2286         echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
  2287         echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" $*" >>"$outpath/bin/syncqt"
  2287         echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
  2288         chmod 755 "$outpath/bin/syncqt"
  2288         chmod 755 "$outpath/bin/syncqt"
  2289     fi
  2289     fi
  2290 
  2290 
  2291     # symlink the mkspecs directory
  2291     # symlink the mkspecs directory
  2292     mkdir -p "$outpath/mkspecs"
  2292     mkdir -p "$outpath/mkspecs"
  2303     rm -f "$outpath/tools/porting/src/q3porting.xml"
  2303     rm -f "$outpath/tools/porting/src/q3porting.xml"
  2304     ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
  2304     ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
  2305 fi
  2305 fi
  2306 
  2306 
  2307 # symlink fonts to be able to run application from build directory
  2307 # symlink fonts to be able to run application from build directory
  2308 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
  2308 if [ "$PLATFORM_QWS" = "yes" ] && [ ! -d "${outpath}/lib/fonts" ]; then
  2309     if [ "$PLATFORM" = "$XPLATFORM" ]; then
  2309     if [ "$PLATFORM" = "$XPLATFORM" ]; then
  2310         mkdir -p "${outpath}/lib"
  2310         mkdir -p "${outpath}/lib"
  2311         ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
  2311         ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
  2312     fi
  2312     fi
  2313 fi
  2313 fi
  3394  *  -release ........... Compile and link Qt with debugging turned off.
  3394  *  -release ........... Compile and link Qt with debugging turned off.
  3395     -debug ............. Compile and link Qt with debugging turned on.
  3395     -debug ............. Compile and link Qt with debugging turned on.
  3396     -debug-and-release . Compile and link two versions of Qt, with and without
  3396     -debug-and-release . Compile and link two versions of Qt, with and without
  3397                          debugging turned on (Mac only).
  3397                          debugging turned on (Mac only).
  3398 
  3398 
  3399     -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
  3399     -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
  3400 
  3400 
  3401     -opensource......... Compile and link the Open-Source Edition of Qt.
  3401     -opensource ........ Compile and link the Open-Source Edition of Qt.
  3402     -commercial......... Compile and link the Commercial Edition of Qt.
  3402     -commercial ........ Compile and link the Commercial Edition of Qt.
  3403 
  3403 
  3404 
  3404 
  3405  *  -shared ............ Create and use shared Qt libraries.
  3405  *  -shared ............ Create and use shared Qt libraries.
  3406     -static ............ Create and use static Qt libraries.
  3406     -static ............ Create and use static Qt libraries.
  3407 
  3407 
  3790  $FCGN  -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
  3790  $FCGN  -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
  3791  $FCGY  -fontconfig ........ Compile FontConfig support.
  3791  $FCGY  -fontconfig ........ Compile FontConfig support.
  3792                          Requires fontconfig/fontconfig.h, libfontconfig,
  3792                          Requires fontconfig/fontconfig.h, libfontconfig,
  3793                          freetype.h and libfreetype.
  3793                          freetype.h and libfreetype.
  3794 
  3794 
  3795  $XIN  -no-xinput.......... Do not compile Xinput support.
  3795  $XIN  -no-xinput ......... Do not compile Xinput support.
  3796  $XIY  -xinput ............ Compile Xinput support. This also enabled tablet support
  3796  $XIY  -xinput ............ Compile Xinput support. This also enabled tablet support
  3797                          which requires IRIX with wacom.h and libXi or
  3797                          which requires IRIX with wacom.h and libXi or
  3798                          XFree86 with X11/extensions/XInput.h and libXi.
  3798                          XFree86 with X11/extensions/XInput.h and libXi.
  3799 
  3799 
  3800  $XKN  -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
  3800  $XKN  -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
  5145         # OpenGL ES 1.x common lite
  5145         # OpenGL ES 1.x common lite
  5146 	"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1cl "OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS
  5146 	"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1cl "OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS
  5147         if [ $? != "0" ]; then
  5147         if [ $? != "0" ]; then
  5148 	    echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
  5148 	    echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
  5149             echo " You might need to modify the include and library search paths by editing"
  5149             echo " You might need to modify the include and library search paths by editing"
  5150             echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
  5150             echo " QMAKE_INCDIR_OPENGL_ES1CL, QMAKE_LIBDIR_OPENGL_ES1CL and QMAKE_LIBS_OPENGL_ES1CL in"
  5151             echo " ${XQMAKESPEC}."
  5151             echo " ${XQMAKESPEC}."
  5152             exit 1
  5152             exit 1
  5153         fi
  5153         fi
  5154     elif [ "$CFG_OPENGL" = "es1" ]; then
  5154     elif [ "$CFG_OPENGL" = "es1" ]; then
  5155         # OpenGL ES 1.x
  5155         # OpenGL ES 1.x
  5156 	"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
  5156 	"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS
  5157         if [ $? != "0" ]; then
  5157         if [ $? != "0" ]; then
  5158 	    echo "The OpenGL ES 1.x functionality test failed!"
  5158 	    echo "The OpenGL ES 1.x functionality test failed!"
  5159             echo " You might need to modify the include and library search paths by editing"
  5159             echo " You might need to modify the include and library search paths by editing"
  5160             echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
  5160             echo " QMAKE_INCDIR_OPENGL_ES1, QMAKE_LIBDIR_OPENGL_ES1 and QMAKE_LIBS_OPENGL_ES1 in"
  5161             echo " ${XQMAKESPEC}."
  5161             echo " ${XQMAKESPEC}."
  5162             exit 1
  5162             exit 1
  5163         fi
  5163         fi
  5164     elif [ "$CFG_OPENGL" = "es2" ]; then
  5164     elif [ "$CFG_OPENGL" = "es2" ]; then
  5165         #OpenGL ES 2.x
  5165         #OpenGL ES 2.x
  5166 	"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
  5166 	"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS
  5167         if [ $? != "0" ]; then
  5167         if [ $? != "0" ]; then
  5168 	    echo "The OpenGL ES 2.0 functionality test failed!"
  5168 	    echo "The OpenGL ES 2.0 functionality test failed!"
  5169             echo " You might need to modify the include and library search paths by editing"
  5169             echo " You might need to modify the include and library search paths by editing"
  5170             echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
  5170             echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
  5171             echo " ${XQMAKESPEC}."
  5171             echo " ${XQMAKESPEC}."
  5172             exit 1
  5172             exit 1
  5173         fi
  5173         fi
  5174     elif [ "$CFG_OPENGL" = "desktop" ]; then
  5174     elif [ "$CFG_OPENGL" = "desktop" ]; then
  5175         # Desktop OpenGL support
  5175         # Desktop OpenGL support
  7604     OPENSSL_LINKAGE="(run-time)"
  7604     OPENSSL_LINKAGE="(run-time)"
  7605 elif [ "$CFG_OPENSSL" = "linked" ]; then
  7605 elif [ "$CFG_OPENSSL" = "linked" ]; then
  7606     OPENSSL_LINKAGE="(linked)"
  7606     OPENSSL_LINKAGE="(linked)"
  7607 fi
  7607 fi
  7608 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
  7608 echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
       
  7609 echo "Alsa support ........ $CFG_ALSA"
       
  7610 echo
  7609 
  7611 
  7610 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
  7612 [ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
  7611 
  7613 
  7612 # complain about not being able to use dynamic plugins if we are using a static build
  7614 # complain about not being able to use dynamic plugins if we are using a static build
  7613 if [ "$CFG_SHARED" = "no" ]; then
  7615 if [ "$CFG_SHARED" = "no" ]; then
  7628 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
  7630 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
  7629     echo
  7631     echo
  7630     echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
  7632     echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
  7631     echo
  7633     echo
  7632 fi
  7634 fi
  7633 echo "alsa support ........ $CFG_ALSA"
       
  7634 echo
       
  7635 
  7635 
  7636 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
  7636 sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
  7637 PROCS=1
  7637 PROCS=1
  7638 EXEC=""
  7638 EXEC=""
  7639 
  7639