VirtualBox

Changeset 10291 in vbox for trunk/configure


Ignore:
Timestamp:
Jul 5, 2008 7:56:10 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
32903
Message:

configure: detect Sun Qt4 libs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r10217 r10291  
    143143strip_l()
    144144{
    145   echo "$1"|$KBUILD_SED 's|-l\([^ ]\+\)|\1|g; s|-[^l]\([^ ]\+\)||g; s|^ ||; s| *$||g'
     145  echo "$1"|$KBUILD_SED 's|-l\([^ ]\+\)|\1|g; s|^-[^l][^ ]*||g; s| -[^l][^ ]*||g; s|^ ||; s| *$||g'
    146146}
    147147
    148148strip_L()
    149149{
    150   echo "$1"|$KBUILD_SED 's|-L\([^ ]\+\)|\1|g; s|-[^L]\([^ ]\+\)||g; s|^ ||; s| *$||g'
     150  echo "$1"|$KBUILD_SED 's|-L\([^ ]\+\)|\1|g; s|^-[^L][^ ]*||g; s| -[^L][^ ]*||g; s|^ ||; s| *$||g'
    151151}
    152152
    153153strip_I()
    154154{
    155   echo "$1"|$KBUILD_SED 's|-I\([^ ]\+\)|\1|g; s|-[^I]\([^ ]\+\)||g; s|^ ||; s| *$||g'
     155  echo "$1"|$KBUILD_SED 's|-I\([^ ]\+\)|\1|g; s|^-[^I][^ ]*||g; s| -[^I][^ ]*||g; s|^ ||; s| *$||g'
    156156}
    157157
     
    236236  if [ $rc -ne 0 ]; then
    237237    fail $1
     238    return 1
     239  fi
     240  echo >> $LOG
     241  echo >> $LOG
     242  return 0
     243}
     244
     245# Execute a compiled test binary
     246test_execute_path()
     247{
     248  echo "executing the binary (LD_LIBRARY_PATH=$1)" >> $LOG
     249  LD_LIBRARY_PATH=$1 ./.tmp_out > .test_execute.log
     250  rc=$?
     251  cat .test_execute.log | tee -a $LOG
     252  if [ $rc -ne 0 ]; then
     253    fail
    238254    return 1
    239255  fi
     
    12761292      for q in $QT4DIR; do
    12771293        INCQT4="$q/include $q/include/QtCore"
    1278         LIBQT4="-L$q/lib -lQtCore"
    12791294        FLGQT4="-DQT_SHARED"
    12801295        I_INCQT4=`prefix_I "$INCQT4"`
     1296        LIBQT4="-L$q/lib -lVBoxQtCore"
     1297        if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
     1298          foundqt4=2
     1299          break;
     1300        fi
     1301        LIBQT4="-L$q/lib -lQtCore"
    12811302        if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
    12821303          foundqt4=1
     
    13031324    [ -n "$INCQT4" ] && I_INCQT4=`prefix_I "$INCQT4"`
    13041325    if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
    1305       if test_execute; then
     1326      if test_execute_path "`strip_L "$LIBQT4"`"; then
    13061327        if [ "$OS" != "darwin" ]; then
    13071328          # strip .../QtCore as we add components ourself
     
    13091330          cnf_append "VBOX_PATH_QT4_INCLUDE" "$INCQT4"
    13101331          cnf_append "VBOX_PATH_QT4_LIB" "`strip_L "$LIBQT4"`"
     1332          if [ "$foundqt4" = "2" ]; then
     1333            cnf_append "VBOX_WITH_QT4_SUN" "1"
     1334          fi
    13111335          test_header "Qt4 devtools"
    13121336          for q in $QT4DIR; do
Note: See TracChangeset for help on using the changeset viewer.

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