VirtualBox

Changeset 22739 in vbox


Ignore:
Timestamp:
Sep 3, 2009 12:39:19 PM (15 years ago)
Author:
vboxsync
Message:

configure: allow/show option only which are relevant for the current architecture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r22682 r22739  
    152152if [ "$OS" = "darwin" ]; then
    153153  ECHO_N="/bin/echo -n"
     154  ECHO_E="echo"
    154155else
    155156  ECHO_N="echo -n"
     157  ECHO_E="echo -e"
    156158fi
    157159
     
    19211923show_help()
    19221924{
    1923   cat << EOF
     1925cat << EOF
    19241926Usage: ./configure [OPTIONS]...
    19251927
     
    19271929  -h, --help               display this help and exit
    19281930  --nofatal                don't abort on errors
    1929   --disable-xpcom          disable XPCOM and related stuff
    1930   --disable-python         disable python bindings
    1931   --disable-sdl-ttf        disable SDL_ttf detection
    1932   --disable-alsa           disable the ALSA sound backend
    1933   --disable-pulse          disable the PulseAudio backend
    1934   --disable-dbus           don't use DBus and hal for hardware detection
    1935   --disable-kmods          don't build Linux kernel modules (host and guest)
     1931EOF
     1932[ $WITH_XPCOM   -eq 1 ] && $ECHO_E "  --disable-xpcom          disable XPCOM and related stuff"
     1933[ $WITH_PYTHON  -eq 1 ] && $ECHO_E "  --disable-python         disable python bindings"
     1934[ $WITH_SDL_TTF -eq 1 ] && $ECHO_E "  --disable-sdl-ttf        disable SDL_ttf detection"
     1935[ $WITH_ALSA    -eq 1 ] && $ECHO_E "  --disable-alsa           disable the ALSA sound backend"
     1936[ $WITH_PULSE   -eq 1 ] && $ECHO_E "  --disable-pulse          disable the PulseAudio backend"
     1937[ $WITH_DBUS    -eq 1 ] && $ECHO_E "  --disable-dbus           don't use DBus and hal for hardware detection"
     1938[ $WITH_KMODS   -eq 1 ] && $ECHO_E "  --disable-kmods          don't build Linux kernel modules (host and guest)"
     1939[ $WITH_OPENGL  -eq 1 ] && $ECHO_E "  --disable-opengl         disable OpenGL support"
     1940[ $WITH_GSOAP   -eq 1 ] && $ECHO_E "  --enable-webservice      enable the webservice stuff"
     1941cat << EOF
    19361942  --disable-hardening      don't be strict about /dev/vboxdrv access
    1937   --disable-opengl         disable OpenGL support
    1938   --enable-webservice      enable the webservice stuff
    19391943  --build-libxml2          build libxml2 from sources
    19401944  --build-libxslt          build libxslt from sources
     
    19471951  --with-kbuild=DIR        kbuild directory [$KBUILDDIR]
    19481952  --with-iasl=PATH         location of the iasl compiler [$IASL]
    1949   --with-linux=DIR         Linux kernel source directory [$LINUX]
    19501953  --with-mkisofs=PATH      location of mkisofs [$MKISOFS]
    1951   --with-qt-dir=DIR        directory for Qt4 headers/libraries [pkgconfig]
    1952   --with-gsoap-dir=PATH    directory for gSOAP compiler/headers/libraries
    1953                            (soapcpp2 and wsdl2h, soapstd2.h, libgsoap++.a/so)
    1954   --with-gsoap-import=PATH directory for gSOAP import files (stlvector.h)
     1954EOF
     1955[ "$OS"    = "linux" ] && $ECHO_E "  --with-linux=DIR         Linux kernel source directory [$LINUX]"
     1956[ $WITH_QT4    -eq 1 ] && $ECHO_E "  --with-qt-dir=DIR        directory for Qt4 headers/libraries [pkgconfig]"
     1957[ $WITH_GSOAP  -eq 1 ] && $ECHO_E "  --with-gsoap-dir=PATH    directory for gSOAP compiler/headers/libraries" \
     1958                                  "\n                           (soapcpp2 and wsdl2h, soapstd2.h, libgsoap++.a/so)" \
     1959                                  "\n  --with-gsoap-import=PATH directory for gSOAP import files (stlvector.h)"
     1960cat << EOF
    19551961  --out-path=PATH          the folder to which configuration and build output
    19561962                           should go
     
    19591965  -d, --build-debug        build with debugging symbols and assertions
    19601966  --build-profile          build with profiling support
    1961   --build-headless         build headless (without any X11 frontend)
     1967  --build-headless         build headless (without any GUI frontend)
    19621968EOF
    19631969  exit 0
     
    19681974# The body.
    19691975#
     1976
     1977# test if we are OSE
     1978if [ $OSE -eq 1 -a -d "`cd \`dirname $0\`; pwd`/src/VBox/Devices/USB" ]; then
     1979  echo "Found USB devices, assuming VBOX_OSE = FALSE" >> $LOG
     1980  echo >> $LOG
     1981  OSE=0
     1982fi
     1983
     1984# Change OS specific defaults; must be before all other stuff
     1985if [ "$OS" = "darwin" ]; then
     1986  WITH_SDL=0
     1987  WITH_SDL_TTF=0
     1988  WITH_X11=0
     1989  WITH_ALSA=0
     1990  WITH_PULSE=0
     1991  WITH_DBUS=0
     1992  WITH_KMODS=0
     1993  WITH_OPENGL=0
     1994  BUILD_LIBXSLT=1
     1995  BUILD_LIBXML2=1
     1996  [ $OSE -eq 1 ] || BUILD_LIBCURL=1
     1997  [ $OSE -eq 1 ] || BUILD_LIBSSL=1
     1998fi
     1999
    19702000
    19712001# scan command line options
     
    20132043      MKISOFS=`echo $option | cut -d'=' -f2`
    20142044      ;;
     2045    --target-arch=*)
     2046      TARGET_MACHINE=`echo $option | cut -d'=' -f2`
     2047      ;;
    20152048    --disable-xpcom)
    2016       WITH_XPCOM=0
     2049      [ $WITH_XPCOM -eq 1 ] && WITH_XPCOM=0
    20172050      ;;
    20182051    --disable-python)
    2019       WITH_PYTHON=0
     2052      [ $WITH_PYTHON -eq 1 ] && WITH_PYTHON=0
    20202053      ;;
    20212054    --disable-sdl-ttf)
    2022       WITH_SDL_TTF=0
     2055      [ $WITH_SDL_TTF -eq 1 ] && WITH_SDL_TTF=0
    20232056      ;;
    20242057    --disable-qt)
    2025       WITH_QT4=0
     2058      [ $WITH_QT4 -eq 1 ] && WITH_QT4=0
    20262059      ;;
    20272060    --disable-qt4)
    2028       WITH_QT4=0
     2061      [ $WITH_QT4 -eq 1 ] && WITH_QT4=0
    20292062      ;;
    20302063    --disable-alsa)
    2031       WITH_ALSA=0
     2064      [ $WITH_ALSA -eq 1 ] && WITH_ALSA=0
    20322065      ;;
    20332066    --disable-pulse)
    2034       WITH_PULSE=0
     2067      [ $WITH_PULSE -eq 1 ] && WITH_PULSE=0
    20352068      ;;
    20362069    --disable-dbus)
    2037       WITH_DBUS=0
     2070      [ $WITH_DBUS -eq 1 ] && WITH_DBUS=0
    20382071      ;;
    20392072    --disable-kmods)
    2040       WITH_KMODS=0
     2073      [ $WITH_KMODS -eq 1 ] && WITH_KMODS=0
    20412074      ;;
    20422075    --disable-opengl)
    2043       WITH_OPENGL=0
     2076      [ $WITH_OPENGL -eq 1 ] && WITH_OPENGL=0
     2077      ;;
     2078    --enable-webservice)
     2079      [ $WITH_GSOAP -eq 1 ] && WITH_GSOAP=0
    20442080      ;;
    20452081    --disable-hardening)
     
    20482084    --enable-hardening)
    20492085      WITH_HARDENING=2
    2050       ;;
    2051     --enable-webservice)
    2052       WITH_GSOAP=1
    20532086      ;;
    20542087    --build-debug|-d)
     
    21472180EOF
    21482181
    2149 # test if we are OSE
    2150 if [ $OSE -eq 1 -a -d "`cd \`dirname $0\`; pwd`/src/VBox/Devices/USB" ]; then
    2151   echo "Found USB devices, assuming VBOX_OSE = FALSE" >> $LOG
    2152   echo >> $LOG
    2153   OSE=0
    2154 fi
    2155 
    21562182if [ "$BUILD_TYPE" = "debug" ]; then
    21572183  echo "Creating DEBUG build!" >> $LOG
     
    21982224if [ $WITH_OPENGL -eq 0 ]; then
    21992225  cnf_append "VBOX_WITH_CROGL" ""
    2200 fi
    2201 
    2202 if [ "$OS" = "darwin" ]; then
    2203   BUILD_LIBXSLT=1
    2204   BUILD_LIBXML2=1
    2205   [ $OSE -eq 1 ] || BUILD_LIBCURL=1
    2206   [ $OSE -eq 1 ] || BUILD_LIBSSL=1
    22072226fi
    22082227
     
    22352254[ "$OS" != "darwin" -a "$OS" != "freebsd" ] && check_png
    22362255[ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam
    2237 [ $WITH_SDL -eq 1 -a "$OS" != "darwin" ]    && check_sdl
     2256[ $WITH_SDL -eq 1 ]    && check_sdl
    22382257[ $WITH_SDL_TTF -eq 1 -a $OSE -eq 0 ] && check_sdl_ttf
    2239 [ $WITH_X11    -eq 1 -a "$OS" != "darwin" ] && check_x
     2258[ $WITH_X11    -eq 1 ] && check_x
    22402259# TODO check for xcomposite-dev (X11/extensions/Xcomposite.h, additions only)
    22412260# TODO check for libxdamange-dev (X11/extensions/Xdamage.h, additions only)
    2242 [ $WITH_X11    -eq 1 -a "$OS" != "darwin" ] && check_xcursor
    2243 [ $WITH_OPENGL -eq 1 -a "$OS" != "darwin" ] && check_xmu
    2244 [ "$OS" != "darwin" -a $WITH_OPENGL -eq 1 ] && check_mesa
     2261[ $WITH_X11    -eq 1 ] && check_xcursor
     2262[ $WITH_OPENGL -eq 1 ] && check_xmu
     2263[ $WITH_OPENGL -eq 1 ] && check_mesa
    22452264[ $WITH_QT4    -eq 1 ] && check_qt4
    2246 [ $WITH_PYTHON -eq 1 -a "$OS" != "darwin" ] && check_python
     2265[ $WITH_PYTHON -eq 1 ] && check_python
    22472266
    22482267# Linux-specific
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