VirtualBox

Changeset 14711 in vbox for trunk/configure


Ignore:
Timestamp:
Nov 27, 2008 3:16:52 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
40024
Message:

Devices/USB and Main: use hal and sysfs for Linux USB (currently disabled)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r14255 r14711  
    2323PATH="/usr/xpg4/bin:/usr/ucb:$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin"
    2424ORGPATH=$PATH
     25
     26# Wrapper for ancient /usr/bin/which on darwin that always returns 0
     27which_wrapper()
     28{
     29  if [ -z "$have_ancient_which" ]; then
     30    if which /bin/___cErTaINly_a_nOn_eXisTing_fIle___ 2> /dev/null > /dev/null; then
     31      have_ancient_which="yes"
     32    else
     33      have_ancient_which="no"
     34    fi
     35  fi
     36  if [ "$have_ancient_which" = "yes" ]; then
     37    retval=`which $* 2>/dev/null`
     38    echo "$retval"
     39    test -n "$retval" -a -x "$retval"
     40    unset retval
     41  else
     42    which $* 2> /dev/null
     43  fi
     44}
     45
    2546
    2647#
     
    4263WITH_ALSA=1
    4364WITH_PULSE=1
     65WITH_LIBHAL=1
    4466WITH_KMODS=1
    4567WITH_HARDENING=1
     
    6991INCPNG=""
    7092LIBPNG="-lpng"
     93PKGCONFIG="`which_wrapper pkg-config`"
     94if [ -n $PKGCONFIG ]; then
     95  FLAGSHAL="`$PKGCONFIG hal --cflags 2>/dev/null`"
     96  LIBDIRHAL="`$PKGCONFIG hal --libs-only-L 2>/dev/null`"
     97  LIBHAL="`$PKGCONFIG hal --libs-only-l 2>/dev/null`"
     98fi
    7199PYTHONDIR="/usr /usr/local"
    72100QT3DIR="/usr/qt/3 /usr/lib/qt3 /usr/lib/qt-3.3 /usr/share/qt3"
     
    164192  echo "$1"|$KBUILD_SED 's|^\/|-I/|g; s| \/| -I/|g'
    165193}
    166 
    167 # Wrapper for ancient /usr/bin/which on darwin that always returns 0
    168 which_wrapper()
    169 {
    170   if [ -z "$have_ancient_which" ]; then
    171     if which /bin/___cErTaINly_a_nOn_eXisTing_fIle___ 2> /dev/null > /dev/null; then
    172       have_ancient_which="yes"
    173     else
    174       have_ancient_which="no"
    175     fi
    176   fi
    177   if [ "$have_ancient_which" = "yes" ]; then
    178     retval=`which $* 2>/dev/null`
    179     echo "$retval"
    180     test -n "$retval" -a -x "$retval"
    181     unset retval
    182   else
    183     which $* 2> /dev/null
    184   fi
    185 }
    186 
    187194
    188195check_avail()
     
    11531160  if test_compile "-lpulse" pulse pulse; then
    11541161    test_execute
     1162  fi
     1163}
     1164
     1165
     1166#
     1167# Check for libhal
     1168#
     1169check_libhal()
     1170{
     1171  test_header "libhal"
     1172  cat > .tmp_src.cc << EOF
     1173#include <libhal.h>
     1174extern "C" int main(void)
     1175{
     1176  return 0;
     1177}
     1178EOF
     1179  if [ -n $PKGCONFIG ] && test_compile "$FLAGSHAL $LIBDIRHAL $LIBHAL" libhal libhal; then
     1180    log_success "found"
    11551181  fi
    11561182}
     
    17601786  --disable-alsa           disable the ALSA sound backend
    17611787  --disable-pulse          disable the PulseAudio backend
     1788  --disable-libhal         don't use hal for hardware detection
    17621789  --disable-kmods          don't build Linux kernel modules (host and guest)
    17631790  --disable-hardening      don't be strict about /dev/vboxdrv access
     
    18581885    --disable-pulse)
    18591886      WITH_PULSE=0
     1887      ;;
     1888    --disable-libhal)
     1889      WITH_LIBHAL=0
    18601890      ;;
    18611891    --disable-kmods)
     
    20512081  else
    20522082    cnf_append "VBOX_WITH_PULSE" ""
     2083  fi
     2084  if [ $WITH_LIBHAL -eq 1 ]; then
     2085    check_libhal
     2086  else
     2087    cnf_append "VBOX_WITH_LIBHAL" ""
    20532088  fi
    20542089  check_compiler_h
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