VirtualBox

Changeset 57889 in vbox


Ignore:
Timestamp:
Sep 25, 2015 11:53:24 AM (9 years ago)
Author:
vboxsync
Message:

configure: potentially try several candidate Qt4 libraries until we find the right version, and try the one in our build tools last.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r57866 r57889  
    327327test_execute_path()
    328328{
     329  ## LD_LIBRARY_PATH to set.
     330  local_path="${1}"
     331  ## Set this to non-empty to make this test non-fatal.
     332  local_nofail="${2}"
    329333  echo "executing the binary (LD_LIBRARY_PATH=$1)" >> $LOG
    330   LD_LIBRARY_PATH=$1 $ODIR.tmp_out > $ODIR.test_execute.log
     334  LD_LIBRARY_PATH="${local_path}" $ODIR.tmp_out > $ODIR.test_execute.log
    331335  rc=$?
    332336  cat $ODIR.test_execute.log | tee -a $LOG
    333337  if [ $rc -ne 0 ]; then
    334     fail
     338    test -z "${local_nofail}" && fail
     339    echo >> $LOG
     340    echo >> $LOG
    335341    return 1
    336342  fi
     
    14601466  foundqt4=
    14611467  test_header Qt4
     1468  cat > $ODIR.tmp_src.cc << EOF
     1469#include <QtGlobal>
     1470extern "C" int main(void)
     1471{
     1472#if QT_VERSION >= 0x040800
     1473  return 0;
     1474#else
     1475  return 1;
     1476#endif
     1477}
     1478EOF
    14621479  if [ "$OS" = "darwin" ]; then
    14631480    # First check if there is the internal version of Qt. If yes nothing else
     
    14901507    fi
    14911508  else
    1492     if ! test -d "$PWD/tools/linux.$TARGET_MACHINE/qt" &&
    1493       test $QT4DIR_PKGCONFIG -eq 1; then
     1509    if test $QT4DIR_PKGCONFIG -eq 1; then
    14941510      # default is to use pkg-config
    14951511      if which_wrapper pkg-config > /dev/null; then
     
    15101526              PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
    15111527              pkg-config QtCore --libs`
    1512           foundqt4=1
     1528          test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal &&
     1529            test_execute_path "`strip_L "$LIBQT4"`" nofatal && foundqt4=1
    15131530        fi
    15141531      else
     
    15161533        fail
    15171534      fi
    1518     else
     1535    fi
     1536    if ! test -n "${foundqt4}"; then
    15191537      # do it the old way (e.g. user has specified QT4DIR)
    1520       cat > $ODIR.tmp_src.cc << EOF
    1521 #include <cstdio>
    1522 #include <QtGlobal>
    1523 extern "C" int main(void)
    1524 {
    1525   printf("found version %s", QT_VERSION_STR);
    1526 #if QT_VERSION >= 0x040800
    1527   printf(", OK.\n");
    1528   return 0;
    1529 #else
    1530   printf(", expected version 4.8.0 or higher\n");
    1531   return 1;
    1532 #endif
    1533 }
    1534 EOF
    1535       for q in "$PWD/tools/linux.$TARGET_MACHINE"/qt/v4.8.* $QT4DIR; do
     1538      for q in $QT4DIR "$PWD/tools/linux.$TARGET_MACHINE"/qt/v4.8.*; do
    15361539        INCQT4="$q/include $q/include/QtCore"
    15371540        FLGQT4="-DQT_SHARED"
    15381541        I_INCQT4=`prefix_I "$INCQT4"`
    15391542        LIBQT4="-L$q/lib -lQtCoreVBox"
    1540         if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
     1543        if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal &&
     1544            test_execute_path "`strip_L "$LIBQT4"`" nofatal; then
    15411545          foundqt4=2
    15421546          break;
    15431547        fi
    15441548        LIBQT4="-L$q/lib -lQtCore"
    1545         if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
     1549        if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal &&
     1550            test_execute_path "`strip_L "$LIBQT4"`" nofatal; then
    15461551          foundqt4=1
    15471552          break;
     
    15981603          fi
    15991604          test_header "Qt4 devtools"
    1600           for q in "$PWD/tools/linux.$TARGET_MACHINE"/qt/v4.8.* $QT4DIR; do
     1605          for q in $QT4DIR "$PWD/tools/linux.$TARGET_MACHINE"/qt/v4.8.*; do
    16011606            # first try it with a suffix, some platforms use that
    16021607            if which_wrapper "$q/bin/moc-qt4" > /dev/null; then
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