VirtualBox

Changeset 3934 in vbox for trunk/configure


Ignore:
Timestamp:
Jul 31, 2007 8:36:16 AM (17 years ago)
Author:
vboxsync
Message:

Switched to runtime detection and loading of dbus and libhal on Linux hosts (in Main)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r3905 r3934  
    3232WITH_QT=1
    3333WITH_SDL_TTF=1
    34 WITH_HAL=1
    3534CC="gcc"
    3635CC32=""
     
    5857INCPNG=""
    5958LIBPNG="-lpng"
    60 CFLAGSHAL="-I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include"
    61 LIBPATHHAL=""
    62 LIBHAL="-lhal -ldbus-1"
    6359QTDIR="/usr/qt/3 /usr/lib/qt3 /usr/lib/qt-3.3 /usr/share/qt3 /usr/lib64/qt-3.3 /usr/X11R6"
    6460KBUILDDIR="`cd $(dirname $0); pwd`/kBuild"
     
    10931089
    10941090#
    1095 # Check for the libhal library for obtaining hardware information on Linux
    1096 #
    1097 check_libhal()
    1098 {
    1099   test_header libhal
    1100   pc_cflagshal=`pkg-config hal --cflags 2>/dev/null`
    1101   pc_libhal=`pkg-config hal --libs-only-l 2>/dev/null`
    1102   pc_libpathhal=`pkg-config hal --libs-only-L 2>/dev/null`
    1103   pc_verhal=`pkg-config hal --modversion 2>/dev/null`
    1104   if [ ! -z "$pc_cflagshal" ]; then # is this acceptable?
    1105     CFLAGSHAL=$pc_cflagshal
    1106     LIBPATHHAL=$pc_libpathhal
    1107     LIBHAL=$pc_libhal
    1108   fi
    1109   cat > .tmp_src.cc << EOF
    1110 #include <cstdio>
    1111 #include <libhal.h>
    1112 extern "C" int main(void)
    1113 {
    1114   DBusError dbusError;
    1115   dbus_error_init (&dbusError);
    1116   LibHalContext *halContext = libhal_ctx_new();
    1117   if (halContext != 0)
    1118   {
    1119       libhal_ctx_free(halContext);
    1120   }
    1121   return 0;
    1122 }
    1123 EOF
    1124   if test_compile "$CFLAGSHAL $LIBPATHHAL $LIBHAL" libhal libhal; then
    1125     log_success "found version $pc_verhal"
    1126     cnf_append "LIB_HAL_CFLAGS"   "$CFLAGSHAL"
    1127     cnf_append "LIB_HAL_LIBS"     "`strip_l "$LIBHAL"`"
    1128     cnf_append "LIB_HAL_LIBPATH"  "`strip_L "$LIBPATHHAL"`"
    1129     cnf_append "VBOX_WITH_LIBHAL" "1"
    1130   fi
    1131 }
    1132 
    1133 
    1134 #
    11351091# Show help
    11361092#
     
    11461102  --disable-sdl-ttf       disable SDL_ttf detection
    11471103  --build-xalan           build xalan & xerces from shipped sources
    1148   --without-hal           do not use libhal, even if it is available
    11491104
    11501105Paths:
     
    11531108  --with-kbuild=DIR       kbuild directory [$KBUILDDIR]
    11541109  --with-iasl=PATH        location of the iasl compiler [$IASL]
    1155   --with-hal-cflags=FLAGS cflags for libhal [$CFLAGSHAL]
    1156   --with-hal=LIB          location of the libhal libraries [$LIBHAL]
    11571110  --with-linux=DIR        Linux kernel source directory [$LINUX]
    11581111  --with-mkisofs=PATH     location of mkisofs [$MKISOFS]
     
    11981151      QTDIR=`echo $option | cut -d'=' -f2`
    11991152      ;;
    1200     --with-hal-dir=*)
    1201       INCHAL=`echo $option | cut -d'=' -f2`
    1202       ;;
    1203     --with-hal=*)
    1204       LIBHAL=`echo $option | cut -d'=' -f2`
    1205       ;;
    12061153    --with-iasl=*)
    12071154      IASL=`echo $option | cut -d'=' -f2`
     
    12271174    --disable-qt)
    12281175      WITH_QT=0
    1229       ;;
    1230     --without-hal)
    1231       WITH_HAL=0
    12321176      ;;
    12331177    --build-debug|-d)
     
    13671311  check_alsa
    13681312  check_compiler_h
    1369   [ "$WITH_HAL" = "1" ] && check_libhal
    13701313fi
    13711314
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