diff options
author | Felix Geyer <debfx-pkg@fobos.de> | 2011-01-02 10:58:34 +0100 |
---|---|---|
committer | Felix Geyer <debfx-pkg@fobos.de> | 2011-01-02 10:58:34 +0100 |
commit | 361589e3ae692db27161410309b92c6b89e1ec6c (patch) | |
tree | f58702fae95e097c1a03bd37c1df44963a5b316f /configure | |
parent | d4835ef8bf2b0196ae1887c04e3d57cce840904c (diff) | |
download | virtualbox-361589e3ae692db27161410309b92c6b89e1ec6c.tar.gz |
Imported Upstream version 4.0.0-dfsgupstream/4.0.0-dfsg
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 147 |
1 files changed, 108 insertions, 39 deletions
@@ -73,6 +73,7 @@ TARGET_MACHINE="" TARGET_CPU="" WITH_XPCOM=1 WITH_PYTHON=1 +WITH_JAVA=1 WITH_VMMRAW=1 WITH_LIBIDL=1 WITH_GSOAP=0 @@ -87,6 +88,7 @@ WITH_KMODS=1 WITH_OPENGL=1 WITH_HARDENING=1 WITH_VDE=0 +WITH_DOCS=1 BUILD_LIBXML2= BUILD_LIBXSLT= BUILD_LIBCURL= @@ -117,20 +119,23 @@ LIBXCURSOR="-lXcursor" LIBXMU="-lXmu" LIBXINERAMA="-lXinerama" LIBXRANDR="-lXrandr" +MAKESELF="makeself" MESA="-lGL" INCZ="" LIBZ="-lz" -INCPNG="" -LIBPNG="-lpng" CXX_FLAGS="" if [ "$OS" = "freebsd" ]; then INCCURL="-I/usr/local/include" LIBCURL="-L/usr/local/lib -lcurl" INCPULSE="-I/usr/local/include" LIBPULSE="-L/usr/local/lib" + INCPNG="-I/usr/local/include" + LIBPNG="-L/usr/local/lib -lpng" else INCCURL="" LIBCURL="-lcurl" + INCPNG="" + LIBPNG="-lpng" fi PKGCONFIG="`which_wrapper pkg-config`" PYTHONDIR="/usr /usr/local" @@ -175,6 +180,7 @@ fail() if [ -z "$nofatal" -o "x$1" != "x" ]; then cleanup rm -f $ENV + echo "Check $LOG for details" exit 1 fi } @@ -481,7 +487,7 @@ check_bcc() if check_avail "$BCC" BCC; then bcc_ver=`$BCC -v 2>&1|grep version|sed 's+^bcc: version \(.*\)+\1+'` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "BCC not found" fail else echo "compiling the following source file:" >> $LOG @@ -499,7 +505,7 @@ EOF echo "$BCC -B $bcc_dir -C-c -3 -S -o $ODIR.tmp_out $ODIR.tmp_src.c" >> $LOG $BCC -B $bcc_dir -C-c -3 -S -o $ODIR.tmp_out $ODIR.tmp_src.c >> $LOG 2>&1 if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "BCC not working" fail else log_success "found version $bcc_ver" @@ -521,7 +527,7 @@ check_as86() if check_avail "$AS86" AS86; then as86_ver=`$AS86 -v 2>&1|grep version|sed 's+^as86 version: \(.*\)+\1+'` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "as86 not found" fail else log_success "found version $as86_ver" @@ -540,7 +546,7 @@ check_yasm() if check_avail "$YASM" YASM; then yasm_ver=`$YASM --version|grep "^yasm"|sed 's+^yasm \(.*\)+\1+'` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "yasm not found" fail else yasm_maj=`echo $yasm_ver|cut -d. -f1` @@ -567,7 +573,7 @@ check_iasl() if check_avail "$IASL" IASL; then iasl_ver=`$IASL|grep version|sed 's+^ASL.*version \([0-9]*\).*+\1+'` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "iasl not found" fail else log_success "found version $iasl_ver" @@ -586,7 +592,7 @@ check_xsltproc() if check_avail "$XSLTPROC" XSLTPROC; then xsltproc_ver=`$XSLTPROC --version` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "xsltproc not found" fail else log_success "found" @@ -605,7 +611,7 @@ check_mkisofs() if which_wrapper $GENISOIMAGE > /dev/null; then mkisofs_ver=`$GENISOIMAGE --version` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "mkisofs not found" fail else log_success "found $mkisofs_ver" @@ -614,7 +620,7 @@ check_mkisofs() elif check_avail "$MKISOFS" MKISOFS; then mkisofs_ver=`$MKISOFS --version` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "mkisofs not working" fail else log_success "found $mkisofs_ver" @@ -635,7 +641,7 @@ check_libxml2() if which_wrapper pkg-config > /dev/null; then libxml2_ver=`pkg-config libxml-2.0 --modversion 2>> $LOG` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "libxml2 not found" fail else FLGXML2=`pkg-config libxml-2.0 --cflags` @@ -667,7 +673,7 @@ EOF elif which_wrapper xml2-config; then libxml2_ver=`xml2-config --version` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "xml2-config not found" fail else log_success "found version $libxml2_ver" @@ -718,7 +724,7 @@ check_libxslt() if which_wrapper pkg-config > /dev/null; then libxslt_ver=`pkg-config libxslt --modversion 2>> $LOG` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "libxslt not found" fail else FLGXSLT=`pkg-config libxslt --cflags` @@ -750,7 +756,7 @@ EOF elif which_wrapper xslt-config; then libxslt_ver=`xslt-config --version` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "xslt-config not working" fail else log_success "found version $libxslt_ver" @@ -798,7 +804,7 @@ check_libidl() if which_wrapper libIDL-config-2 > /dev/null; then libidl_ver=`libIDL-config-2 --version` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "libIDL-config-2 not working" fail else log_success "found version $libidl_ver" @@ -808,7 +814,7 @@ check_libidl() elif check_avail "libIDL-config" libIDL-config; then libidl_ver=`libIDL-config --version` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "libIDL-config not working" fail else log_success "found version $libidl_ver" @@ -844,6 +850,7 @@ EOF if test_execute nofatal; then cnf_append "SDK_VBOX_OPENSSL_INCS" "`strip_I "$INCCRYPTO"`" cnf_append "SDK_VBOX_OPENSSL_LIBS" "`strip_l "$LIBCRYPTO"`" + cnf_append "SDK_VBOX_BLD_OPENSSL_LIBS" "`strip_l "$LIBCRYPTO"`" fi fi fi @@ -1013,7 +1020,7 @@ EOF return 0; fi fi - echo "not found." + echo "pam0.x not found" test_header linux_pam cat > $ODIR.tmp_src.cc << EOF #include <cstdio> @@ -1101,7 +1108,7 @@ EOF fi fi else - log_failure "not found" + log_failure "SDL not found" fail fi } @@ -1455,7 +1462,7 @@ check_qt4() PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \ pkg-config QtCore --modversion 2>> $LOG` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "QtCore not found" fail else FLGQT4=`\ @@ -1559,7 +1566,7 @@ EOF if which_wrapper "$q/bin/moc-qt4" > /dev/null; then moc_ver=`$q/bin/moc-qt4 -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "moc-qt4 not working" fail else log_success "found version $moc_ver" @@ -1573,7 +1580,7 @@ EOF elif which_wrapper "$q/bin/moc" > /dev/null; then moc_ver=`$q/bin/moc -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "moc not working" fail else log_success "found version $moc_ver" @@ -1588,11 +1595,11 @@ EOF fi fi else - log_failure "not found" + log_failure "qt4 not working" fail fi else - log_failure "not found" + log_failure "qt4 not found" fail fi } @@ -1672,7 +1679,7 @@ check_kchmviewer() if check_avail "$KCHMVIEWER" KCHMVIEWER; then kchmviewer_ver=`$KCHMVIEWER --version|grep "^KchmViewer:"|sed 's+^KchmViewer: \(.*\)+\1+'` if [ $? -ne 0 ]; then - log_failure "not found" + log_failure "kchmviewer not working" fail else log_success "found version $kchmviewer_ver" @@ -1805,6 +1812,18 @@ EOF echo " Cannot compile 32-bit applications (missing headers and/or libraries)!" echo " Check the file $LOG for detailed error information." fail + else + echo "executing the binary" >> $LOG + $ODIR.tmp_out 2> $ODIR.test_execute.log + rc=$? + cat $ODIR.test_execute.log >> $LOG + if [ $rc -ne 0 ]; then + echo + echo " Cannot execute 32-bit applications! Either enable 32-bit support in the" + echo " kernel configuration or use --disable-vmmraw to disable 32-bit guests." + fail + return 1 + fi fi log_success "" } @@ -1815,7 +1834,7 @@ EOF # check_python() { - test_header "python support" + test_header "Python support" # On darwin this is a on/off decision only if [ "$OS" = "darwin" ]; then @@ -1870,17 +1889,27 @@ EOF cnf_append "VBOX_PATH_PYTHON_INC" "$p/include/$d" cnf_append "VBOX_LIB_PYTHON" "$p/$b/lib$d.so" else - log_failure "not found" + log_failure "Python not working" fail fi else - log_failure "not found" + log_failure "Python not found" fail fi } # +# Check for Java +# +check_java() +{ + test_header "Java support" + log_success +} + + +# # Setup wine # setup_wine() @@ -1926,6 +1955,7 @@ setup_wine() log_success "found" } + # # Check for gSOAP. # @@ -1987,11 +2017,16 @@ check_darwinversion() case "$darwin_ver" in 10\.*) darwin_ver="10.6" - sdk=/Developer/SDKs/MacOSX10.5.sdk - CXX_FLAGS="-mmacosx-version-min=10.5 -isysroot $sdk -Wl,-syslibroot,$sdk" + if [ "$BUILD_MACHINE" = "x86" ]; then + sdk=/Developer/SDKs/MacOSX10.5.sdk + CXX_FLAGS="-mmacosx-version-min=10.5 -isysroot $sdk -Wl,-syslibroot,$sdk" + cnf_append "VBOX_MACOS_10_5_WORKAROUND" "1" + else + sdk=/Developer/SDKs/MacOSX10.6.sdk + CXX_FLAGS="-mmacosx-version-min=10.6 -isysroot $sdk -Wl,-syslibroot,$sdk" + fi # test "$CC" = "gcc" && CC="gcc-4.0" # test "$CXX" = "g++" && CXX="g++-4.0" - cnf_append "VBOX_MACOS_10_5_WORKAROUND" "1" ;; 9\.*) darwin_ver="10.5" @@ -2021,6 +2056,22 @@ check_darwinversion() } +check_makeself() +{ + test_header "makeself" + if check_avail "$MAKESELF" makeself; then + makeself_ver=`$MAKESELF --version|grep version|sed 's+^Makeself.*version \([0-9\.]*\).*+\1+'` + if [ $? -ne 0 ]; then + log_failure "makeself not working" + fail + else + log_success "found version $makeself_ver" + cnf_append "VBOX_MAKESELF" "`which_wrapper $MAKESELF`" + fi + fi +} + + # # Checks that i386-elf-gcc-3.4.6, i386-elf-gcc-3.4.3, i386-elf-gcc-3.4 or i386-elf-gcc # is around to prevent confusion when the build fails in src/recompiler. @@ -2055,6 +2106,7 @@ Configuration: EOF [ $WITH_XPCOM -eq 1 ] && echo " --disable-xpcom disable XPCOM and related stuff" [ $WITH_PYTHON -eq 1 ] && echo " --disable-python disable python bindings" +[ $WITH_JAVA -eq 1 ] && echo " --disable-java disable java bindings" [ $WITH_VMMRAW -eq 1 ] && echo " --disable-vmmraw disable VMM raw mode (VT-x/AMD-V mandatory!)" [ $WITH_SDL_TTF -eq 1 ] && echo " --disable-sdl-ttf disable SDL_ttf detection" [ $WITH_ALSA -eq 1 ] && echo " --disable-alsa disable the ALSA sound backend" @@ -2063,6 +2115,7 @@ EOF [ $WITH_KMODS -eq 1 ] && echo " --disable-kmods don't build Linux kernel modules (host and guest)" [ $WITH_OPENGL -eq 1 ] && echo " --disable-opengl disable OpenGL support (2D & 3D)" [ $WITH_GSOAP -eq 0 ] && echo " --enable-webservice enable the webservice stuff" +[ $WITH_DOCS -eq 1 ] && echo " --disable-docs don't build the documentation" [ "$OS" = "linux" -o "$OS" = "freebsd" ] && echo " --enable-vde enable VDE networking" cat << EOF --disable-hardening don't be strict about /dev/vboxdrv access @@ -2107,7 +2160,7 @@ EOF # # test if we are OSE -if [ $OSE -eq 1 -a -r "`cd \`dirname $0\`; pwd`/src/VBox/Devices/USB/USBProxyDevice.cpp" ]; then +if [ $OSE -eq 1 -a -r "`cd \`dirname $0\`; pwd`/src/VBox/RDP/server/server.cpp" ]; then OSE=0 # Set this as a reminder to print a log message once we know the path of the # log file @@ -2188,6 +2241,9 @@ for option in $*; do --disable-python) [ $WITH_PYTHON -eq 1 ] && WITH_PYTHON=0 ;; + --disable-java) + [ $WITH_JAVA -eq 1 ] && WITH_JAVA=0 + ;; --disable-vmmraw) [ $WITH_VMMRAW -eq 1 ] && WITH_VMMRAW=0 ;; @@ -2227,6 +2283,9 @@ for option in $*; do --disable-hardening) WITH_HARDENING=0 ;; + --disable-docs) + WITH_DOCS=0 + ;; --enable-hardening) WITH_HARDENING=2 ;; @@ -2333,7 +2392,7 @@ EOF # Print log warning about OSE if necessary if [ -n "$NOT_OSE" ]; then - echo "Found USB devices, assuming VBOX_OSE = FALSE" >> $LOG + echo "Found RDP server, assuming VBOX_OSE = FALSE" >> $LOG echo >> $LOG fi @@ -2389,13 +2448,14 @@ if [ $WITH_OPENGL -eq 0 ]; then cnf_append "VBOX_WITH_VIDEOHWACCEL" "" cnf_append "VBOX_GUI_USE_QGL" "" fi -[ $WITH_XPCOM -eq 0 ] && cnf_append "VBOX_WITH_MAIN" "" -[ $WITH_QT4 -eq 0 ] && cnf_append "VBOX_WITH_QTGUI" "" -[ $WITH_SDL_TTF -eq 0 ] && cnf_append "VBOX_WITH_SECURELABEL" "" -[ $WITH_PYTHON -eq 0 ] && cnf_append "VBOX_WITH_PYTHON" "" +[ $WITH_XPCOM -eq 0 ] && cnf_append "VBOX_WITH_MAIN" "" +[ $WITH_QT4 -eq 0 ] && cnf_append "VBOX_WITH_QTGUI" "" +[ $WITH_SDL_TTF -eq 0 ] && cnf_append "VBOX_WITH_SECURELABEL" "" +[ $WITH_PYTHON -eq 0 ] && cnf_append "VBOX_WITH_PYTHON" "" +[ $WITH_JAVA -eq 0 ] && cnf_append "VBOX_WITH_JXPCOM" "" [ $WITH_HARDENING -eq 0 ] && cnf_append "VBOX_WITHOUT_HARDENING" "1" [ $WITH_HARDENING -eq 2 ] && cnf_append "VBOX_WITH_HARDENING" "2" -[ $WITH_VMMRAW -eq 0 ] && cnf_append "VBOX_WITH_RAW_MODE" "" +[ $WITH_VMMRAW -eq 0 ] && cnf_append "VBOX_WITH_RAW_MODE" "" # Darwin-specific if [ "$OS" = "darwin" ]; then @@ -2409,7 +2469,7 @@ check_gcc # don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs # [ "$OS" != "darwin" ] && check_yasm [ "$OS" != "darwin" ] && check_xsltproc -[ $OSE -eq 0 -a "$OS" != "darwin" ] && check_mkisofs +[ "$OS" != "darwin" ] && check_mkisofs # the libraries [ "$OS" != "darwin" ] && check_pthread @@ -2419,7 +2479,7 @@ check_libxml2 check_ssl check_curl [ "$OS" != "darwin" ] && check_z -[ "$OS" != "darwin" -a "$OS" != "freebsd" ] && check_png +[ "$OS" != "darwin" ] && check_png [ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam [ $WITH_SDL -eq 1 ] && check_sdl [ $WITH_SDL_TTF -eq 1 -a $OSE -eq 0 ] && check_sdl_ttf @@ -2432,6 +2492,7 @@ check_curl [ $WITH_OPENGL -eq 1 ] && check_opengl [ $WITH_QT4 -eq 1 ] && check_qt4 [ $WITH_PYTHON -eq 1 ] && check_python +[ $WITH_JAVA -eq 1 ] && check_java # PulseAudio if [ "$OS" = "linux" -o "$OS" = "freebsd" ]; then @@ -2465,6 +2526,8 @@ if [ "$OS" = "linux" ]; then check_libcap check_compiler_h [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit + # tools/common/makeself* + [ $OSE -ge 1 ] && check_makeself fi [ -n "$SETUP_WINE" ] && setup_wine @@ -2484,6 +2547,12 @@ if [ "$OS" = "linux" -o "$OS" = "freebsd" ]; then fi fi +# DOCS +if [ $WITH_DOCS -eq 0 ]; then + cnf_append "VBOX_WITH_DOCS" "" + cnf_append "VBOX_WITH_DOCS_PACKING" "" +fi + # success! echo echo "Successfully generated '$CNF' and '$ENV'." |