VirtualBox

Changeset 7222

Show
Ignore:
Timestamp:
02/29/08 17:00:21 (9 months ago)
Author:
vboxsync
Message:

check for Qt4 (currently optional)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/configure

    r6928 r7222  
    10151015# Check for the QT library, needed by VirtualBox 
    10161016# 
    1017 check_qt() 
    1018 { 
    1019   test_header Qt 
     1017check_qt3() 
     1018{ 
     1019  test_header Qt3 
    10201020  cat > .tmp_src.cc << EOF 
    10211021#include <cstdio> 
     
    10751075  fi 
    10761076} 
     1077 
     1078# 
     1079# Check for the QT library, needed by VirtualBox4 
     1080# 
     1081# Currently not fatal. 
     1082# 
     1083check_qt4() 
     1084{ 
     1085  test_header Qt4 
     1086  if which_wrapper pkg-config > /dev/null; then 
     1087    qt4_ver=`pkg-config QtGui --modversion 2>> $LOG` 
     1088    if [ $? -ne 0 ]; then 
     1089      log_failure "not found" 
     1090#      fail 
     1091    else 
     1092      FLGQT4=`pkg-config QtGui --cflags` 
     1093      INCQT4=`strip_I "$FLGQT4"` 
     1094      LIBQT4=`pkg-config QtGui --libs` 
     1095      cat > .tmp_src.cc << EOF 
     1096#include <cstdio> 
     1097#include <Qt/qglobal.h> 
     1098extern "C" int main(void) 
     1099{ 
     1100  printf("found version %s", QT_VERSION_STR); 
     1101#if QT_VERSION >= 0x030305 
     1102  printf(", OK.\n"); 
     1103  return 0; 
     1104#elif QT_VERSION >= 0x030300 
     1105  printf("\n  ** WARNING: QT < 3.3.5 has known problems!\n"); 
     1106#else 
     1107  printf(", expected version 3.3.0 or higher\n"); 
     1108  return 1; 
     1109#endif 
     1110} 
     1111EOF 
     1112      [ -n "$INCQT4" ] && I_INCQT4=`prefix_I "$INCQT4"` 
     1113      if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4" qt4 qt4 nofatal; then 
     1114        if test_execute; then 
     1115          cnf_append "SDK_VBOX_LIBQT4_INCS" "$INCQT4" 
     1116          cnf_append "SDK_VBOX_LIBQT4_LIBS" "`strip_l "$LIBQT4"`" 
     1117        fi 
     1118      fi 
     1119    fi 
     1120  else 
     1121    log_failure "pkg-config not found" 
     1122#    fail 
     1123  fi 
     1124} 
     1125 
    10771126 
    10781127# 
     
    15091558[ $WITH_X11 -eq 1    ] && check_x 
    15101559[ $WITH_X11 -eq 1    ] && check_xcursor 
    1511 [ $WITH_QT -eq 1     ] && check_qt 
     1560[ $WITH_QT -eq 1     ] && check_qt3 
     1561[ $WITH_QT -eq 1     ] && check_qt4 
    15121562 
    15131563# Linux-specific 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy