Changeset 57936 in vbox
- Timestamp:
- Sep 29, 2015 11:00:14 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure
r57932 r57936 153 153 PYTHONDIR="/usr /usr/local" 154 154 QT4DIR="/usr/lib/qt4 /usr/share/qt4 /usr/lib64/qt4 /usr /usr/local" 155 QT4DIR_PKGCONFIG=1 155 156 KBUILDDIR="`cd \`dirname $0\`; pwd`/kBuild" 156 157 DEVDIR="`cd \`dirname $0\`; pwd`/tools" … … 1479 1480 QT_INTERNAL=`/bin/ls -rd1 $PWD/tools/$BUILD_TARGET.$BUILD_PLATFORM_ARCH/qt/* 2> /dev/null` 1480 1481 for t in $QT_INTERNAL; do 1481 1482 1483 1484 1485 1482 if [ -f "$t/Frameworks/QtCoreVBox.framework/QtCoreVBox" ]; then 1483 cnf_append "VBOX_WITH_QT4_SUN" "1" 1484 log_success "use internal version" 1485 return 1486 fi 1486 1487 done 1487 1488 # Now try the user provided directory and some of the standard directories. 1488 1489 QT_TRIES="$QT4DIR /System/Library /Library" 1489 1490 for t in $QT_TRIES; do 1490 1491 1492 1493 1491 if [ -f "$t/Frameworks/QtCore.framework/QtCore" ]; then 1492 PATH_SDK_QT4="$t" 1493 break 1494 fi 1494 1495 done 1495 1496 # Add the necessary params for building the test application … … 1503 1504 fail 1504 1505 fi 1505 else 1506 if test -z "${foundqt4}"; then 1506 else # !darwin 1507 if [ $QT4DIR_PKGCONFIG -eq 1 ]; then 1508 # default is to use pkg-config 1509 if which_wrapper pkg-config > /dev/null; then 1510 qt4_ver=`pkg-config QtCore --modversion 2>> $LOG` 1511 if [ $? -ne 0 ]; then 1512 log_failure "QtCore not found" 1513 fail 1514 else 1515 FLGQT4=`pkg-config QtCore --cflags` 1516 INCQT4=`strip_I "$FLGQT4"` 1517 LIBQT4=`PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 pkg-config QtCore --libs` 1518 foundqt4=3 # pkg-config 1519 TOOLQT4=`pkg-config QtCore --variable=prefix` 1520 TOOLQT4MOC="`pkg-config QtCore --variable=moc_location`" 1521 TOOLQT4BIN="`dirname $TOOLQT4MOC`" 1522 fi 1523 else 1524 log_failure "pkg-config not found" 1525 fail 1526 fi 1527 fi 1528 if [ -z "$foundqt4" ]; then 1507 1529 # do it the old way (e.g. user has specified QT4DIR) 1508 1530 for q in $QT4DIR "$PWD/tools/linux.$TARGET_MACHINE"/qt/v4.8.*; do … … 1514 1536 if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal && 1515 1537 test_execute_path "`strip_L "$LIBQT4"`" nofatal; then 1516 foundqt4=2 1538 foundqt4=2 # internal 1517 1539 break; 1518 1540 fi … … 1520 1542 if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal && 1521 1543 test_execute_path "`strip_L "$LIBQT4"`" nofatal; then 1522 foundqt4=1 1544 foundqt4=1 # no pkg-config, Qt directory 1523 1545 break; 1524 1546 fi … … 1527 1549 fi 1528 1550 if [ -n "$foundqt4" ]; then 1551 # we decided which version of Qt to use. Now enforce the version requirement 1529 1552 cat > $ODIR.tmp_src.cc << EOF 1530 1553 #include <cstdio> … … 1555 1578 for q in $PATH_SDK_QT4 /usr /Developer/Tools/Qt; do 1556 1579 if which_wrapper "$q/bin/moc" > /dev/null; then 1557 cnf_append "PATH_TOOL_QT4" "$q"1558 1580 cnf_append "PATH_TOOL_QT4_BIN" "$q/bin" 1559 1581 fi … … 1566 1588 INCQT4=`echo "$INCQT4"|$KBUILD_SED 's|\([^ ]*\) .*|\1|'` 1567 1589 cnf_append "VBOX_PATH_QT4_LIB" "`strip_L "$LIBQT4"`" 1568 cnf_append "SDK_QT4_LIBPATH" "`strip_L "$LIBQT4"`"1569 1590 cnf_append "PATH_SDK_QT4_INC" "$INCQT4" 1570 1591 # this is not quite right since the qt libpath does not have to be first... … … 1572 1593 if [ "$foundqt4" = "2" ]; then 1573 1594 cnf_append "VBOX_WITH_QT4_SUN" "1" 1595 elif [ "$foundqt4" = "3" ]; then 1596 cnf_append "VBOX_PATH_QT4" "$TOOLQT4" 1597 cnf_append "PATH_SDK_QT4" "$TOOLQT4" 1598 cnf_append "PATH_TOOL_QT4_BIN" "$TOOLQT4BIN" 1599 return 1574 1600 fi 1575 1601 test_header "Qt4 devtools" 1576 for q in $TOOLQT4; do 1577 # first try it with a suffix, some platforms use that 1578 if which_wrapper "$q/bin/moc-qt4" > /dev/null; then 1579 moc_ver=`$q/bin/moc-qt4 -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'` 1580 if [ $? -ne 0 ]; then 1581 log_failure "moc-qt4 not working" 1582 fail 1583 else 1584 log_success "found version $moc_ver" 1585 cnf_append "VBOX_PATH_QT4" "$q" 1586 cnf_append "PATH_SDK_QT4" "$q" 1587 cnf_append "PATH_TOOL_QT4" "$q" 1588 cnf_append "PATH_TOOL_QT4_BIN" "$q/bin" 1589 cnf_append "TOOL_QT4_BIN_SUFF" "-qt4" 1590 return 1591 fi 1592 elif which_wrapper "$q/bin/moc" > /dev/null; then 1593 moc_ver=`$q/bin/moc -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'` 1594 if [ $? -ne 0 ]; then 1595 log_failure "moc not working" 1596 fail 1597 else 1598 log_success "found version $moc_ver" 1599 cnf_append "VBOX_PATH_QT4" "$q" 1600 cnf_append "PATH_SDK_QT4" "$q" 1601 cnf_append "PATH_TOOL_QT4" "$q" 1602 cnf_append "PATH_TOOL_QT4_BIN" "$q/bin" 1603 return 1604 fi 1605 fi 1606 done 1602 # try it with a suffix, some platforms use that 1603 if which_wrapper "$TOOLQT4/bin/moc-qt4" > /dev/null; then 1604 QT4BINSUFF="-qt4" 1605 else 1606 QT4BINSUFF="" 1607 fi 1608 moc_ver=`$TOOLQT4/bin/moc-$QT4BINSUFF -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'` 1609 if [ $? -ne 0 ]; then 1610 log_failure "moc-$QT4BINSUFF not working" 1611 fail 1612 else 1613 log_success "found version $moc_ver" 1614 cnf_append "VBOX_PATH_QT4" "$TOOLQT4" 1615 cnf_append "PATH_SDK_QT4" "$TOOLQT4" 1616 cnf_append "PATH_TOOL_QT4_BIN" "$TOOLQT4/bin" 1617 [ -n "$QT4BINSUFF" ] && cnf_append "TOOL_QT4_BIN_SUFF" "$QT4BINSUFF" 1618 fi 1607 1619 fi 1608 1620 fi … … 1616 1628 fi 1617 1629 } 1630 1618 1631 1619 1632 # … … 2393 2406 --with-qt-dir=*|--with-qt4-dir=*) 2394 2407 QT4DIR=`echo $option | cut -d'=' -f2` 2408 QT4DIR_PKGCONFIG=0 2395 2409 ;; 2396 2410 --with-openssl-dir=*)
Note:
See TracChangeset
for help on using the changeset viewer.