VirtualBox

Changeset 7470 in vbox


Ignore:
Timestamp:
Mar 17, 2008 9:19:55 AM (17 years ago)
Author:
vboxsync
Message:

configure: improved detection of Qt4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r7395 r7470  
    6464INCPNG=""
    6565LIBPNG="-lpng"
    66 QTDIR="/usr/qt/3 /usr/lib/qt3 /usr/lib/qt-3.3 /usr/share/qt3 /usr/lib64/qt-3.3 /usr/X11R6 /usr/lib/qt"
     66QT3DIR="/usr/qt/3 /usr/lib/qt3 /usr/lib/qt-3.3 /usr/share/qt3 /usr/lib64/qt-3.3 /usr/X11R6 /usr/lib/qt"
     67QT4DIR="/usr/lib/qt4 /usr/share/qt4 /usr"
     68QT4UIC3DIR="/usr/bin"
    6769KBUILDDIR="`cd \`dirname $0\`; pwd`/kBuild"
    6870DEVDIR="`cd \`dirname $0\`; pwd`/tools"
     
    10841086
    10851087#
    1086 # Check for the QT library, needed by VirtualBox
     1088# Check for the Qt3 library, needed by VirtualBox
    10871089#
    10881090check_qt3()
     
    11091111  libs="lib"
    11101112  [ "$LIB" = "lib64" ] && libs="$libs lib64"
    1111   for q in $QTDIR; do
     1113  for q in $QT3DIR; do
    11121114    for l in $libs; do
    11131115      echo "compiling the following source file:" >> $LOG
     
    11181120      if [ $? -eq 0 ]; then
    11191121        if test_execute; then
    1120           cnf_append "QTDIR" "`cd $q ; pwd`"
     1122          cnf_append "QT3DIR" "`cd $q ; pwd`"
    11211123          found_qt=1
    11221124          break
     
    11301132  if [ $found_qt -ne 1 ]; then
    11311133    echo
    1132     echo "  Qt not found at \"$QTDIR\" or Qt headers not found"
     1134    echo "  Qt3 not found at \"$QT3DIR\" or Qt3 headers not found"
    11331135    echo "  Check the file $LOG for detailed error information."
    11341136    fail
    11351137    return 1
    11361138  fi
    1137   test_header "Qt devtools"
    1138   if check_avail "$q/bin/moc" QTDIR/bin; then
     1139  test_header "Qt3 devtools"
     1140  if check_avail "$q/bin/moc" QT3DIR/bin; then
    11391141    moc_ver=`$q/bin/moc 2>&1 -v|sed 's+^.*(Qt \(.*\))+\1+'`
    11401142    if [ $? -ne 0 ]; then
     
    11481150
    11491151#
    1150 # Check for the QT library, needed by VirtualBox4
     1152# Check for the Qt4 library, needed by VirtualBox4
    11511153#
    11521154# Currently not fatal.
     
    11701172{
    11711173  printf("found version %s", QT_VERSION_STR);
    1172 #if QT_VERSION >= 0x030305
     1174#if QT_VERSION >= 0x040200
    11731175  printf(", OK.\n");
    11741176  return 0;
    1175 #elif QT_VERSION >= 0x030300
    1176   printf("\n  ** WARNING: QT < 3.3.5 has known problems!\n");
    1177 #else
    1178   printf(", expected version 3.3.0 or higher\n");
     1177  printf(", expected version 4.2.0 or higher\n");
    11791178  return 1;
    11801179#endif
     
    11841183      if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4" qt4 qt4 nofatal; then
    11851184        if test_execute; then
    1186           cnf_append "SDK_VBOX_LIBQT4_INCS" "$INCQT4"
    1187           cnf_append "SDK_VBOX_LIBQT4_LIBS" "`strip_l "$LIBQT4"`"
     1185#          cnf_append "SDK_VBOX_LIBQT4_INCS" "$INCQT4"
     1186#          cnf_append "SDK_VBOX_LIBQT4_LIBS" "`strip_l "$LIBQT4"`"
     1187          test_header "Qt4 devtools"
     1188          for q in $QT4DIR; do
     1189            if which_wrapper "$q/bin/moc" > /dev/null; then
     1190              moc_ver=`$q/bin/moc -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'`
     1191              if [ $? -ne 0 ]; then
     1192                log_failure "not found"
     1193                fail
     1194              else
     1195                log_success "found version $moc_ver"
     1196                cnf_append "VBOX_PATH_QT4" "$q"
     1197                test_header "Qt4 uic3"
     1198                for q in $QT4UIC3DIR; do
     1199                  if check_avail "$q/uic3" QT4UIC3DIR; then
     1200                    uic3_ver=`$q/uic3 -version 2>&1|sed 's+^.*version \(.*\)+\1+'`
     1201                    if [ $? -ne 0 ]; then
     1202                      log_failure "not found"
     1203                      fail
     1204                    else
     1205                      log_success "found version $uic3_ver"
     1206                      cnf_append "VBOX_UIC3" "$q/uic3"
     1207                    fi
     1208                  fi
     1209                done
     1210              fi
     1211              break
     1212            fi
     1213          done
    11881214        fi
    11891215      fi
     
    11911217  else
    11921218    log_failure "pkg-config not found"
     1219#    not yet
    11931220#    fail
    11941221  fi
     
    14291456  --with-linux=DIR         Linux kernel source directory [$LINUX]
    14301457  --with-mkisofs=PATH      location of mkisofs [$MKISOFS]
    1431   --with-qt-dir=DIR        directory for QT headers/libraries [$QTDIR]
     1458  --with-qt-dir=DIR        directory for Qt3 headers/libraries [$QT3DIR]
     1459  --with-qt4-dir=DIR       directory for Qt4 headers/libraries [$QT4DIR]
    14321460
    14331461Build type:
     
    14671495      ;;
    14681496    --with-qt-dir=*)
    1469       QTDIR=`echo $option | cut -d'=' -f2`
     1497      QT3DIR=`echo $option | cut -d'=' -f2`
     1498      ;;
     1499    --with-qt4-dir=*)
     1500      QT4DIR=`echo $option | cut -d'=' -f2`
    14701501      ;;
    14711502    --with-iasl=*)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette