configure revision 274dc2f6707795148326a2a1caf50dc6bea30dfb
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# The purpose of this script is to check for all external tools, headers, and
7a2a1b8b14fc804ac80612d7b98064095e445be5Automatic Updater# libraries VBox OSE depends on.
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater# Copyright (C) 2006-2009 Sun Microsystems, Inc.
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# This file is part of VirtualBox Open Source Edition (OSE), as
fe84edc17e0d582cf7b4270f8df9d4742a107b1cAutomatic Updater# available from http://www.virtualbox.org. This file is free software;
79b273c187a4aa1016a62181983dfdd0521681aeMark Andrews# you can redistribute it and/or modify it under the terms of the GNU
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User# General Public License as published by the Free Software Foundation,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
b253dcf9668f95e141bce9556dc88e30d3305a1dTinderbox User# distribution. VirtualBox OSE is distributed in the hope that it will
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# be useful, but WITHOUT ANY WARRANTY of any kind.
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater# append some extra paths
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Solaris (order of paths important for tr, echo, grep, sed to work)
a01aa536188bb3535dfc1107a623e6355a8e6b7cMark AndrewsPATH="/usr/xpg4/bin:/usr/ucb:$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# Wrapper for ancient /usr/bin/which on darwin that always returns 0
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater if which /bin/___cErTaINly_a_nOn_eXisTing_fIle___ 2> /dev/null > /dev/null; then
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark AndrewsLIBX11="-L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib -lXext -lX11"
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic UpdaterQT4DIR="/usr/lib/qt4 /usr/share/qt4 /usr/lib64/qt4 /usr"
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews# the restricting tool is ar (mri mode).
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterif (cd `dirname $0`; pwd)|grep -q "$INVALID_CHARS"; then
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater echo "Error: VBox base path contains invalid characters!"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# darwin /bin/sh has a builtin echo that doesn't grok -n. gotta love it.
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater rm -f $ODIR.tmp_src.cc $ODIR.tmp_src.c $ODIR.tmp_out $ODIR.test_execute.log
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo "$1"|$KBUILD_SED 's|-l\([^ ]\+\)|\1|g; s|^-[^l][^ ]*||g; s| -[^l][^ ]*||g; s|^ ||; s| *$||g'
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater echo "$1"|$KBUILD_SED 's|-L\([^ ]\+\)|\1|g; s|^-[^L][^ ]*||g; s| -[^L][^ ]*||g; s|^ ||; s| *$||g'
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater echo "$1"|$KBUILD_SED 's|-I\([^ ]\+\)|\1|g; s|^-[^I][^ ]*||g; s| -[^I][^ ]*||g; s|^ ||; s| *$||g'
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater echo "$1"|$KBUILD_SED 's|^\/|-I/|g; s| \/| -I/|g'
cafd3a2b9974fe0a4ab95e0289746062bd958d68Automatic Updater elif which_wrapper $1 > /dev/null; then
fe84edc17e0d582cf7b4270f8df9d4742a107b1cAutomatic Updater# Prepare a test
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Compile a test
c3fd32ed29e9e419bb56583f4272a506773b1ea0Automatic Updater# $2 library name
a382ca49c874d38ad3ac8995b49f9f27128e4ca9Automatic Updater# $3 package name
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# $4 if this argument is 'nofatal', don't abort
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "compiling the following source file:" >> $LOG
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User echo "using the following command line:" >> $LOG
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc \"$1\"" >> $LOG
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc $1 >> $LOG 2>&1
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic Updater if [ $? -ne 0 ]; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo " $2 not found at $1 or $3 headers not found"
8292deab031e7599cd7622aa7675fbe139ca6095Mark Andrews echo " Check the file $LOG for detailed error information."
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews# Execute a compiled test binary
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews if [ $rc -ne 0 ]; then
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater# Execute a compiled test binary
b253dcf9668f95e141bce9556dc88e30d3305a1dTinderbox User echo "executing the binary (LD_LIBRARY_PATH=$1)" >> $LOG
b253dcf9668f95e141bce9556dc88e30d3305a1dTinderbox User LD_LIBRARY_PATH=$1 $ODIR.tmp_out > $ODIR.test_execute.log
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User if [ $rc -ne 0 ]; then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# Check for OS, MACHINE, CPU
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews OS=`uname -s | sed -e 's/GNU\/Linux/Linux/g' | tr [:upper:] [:lower:]`
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington [ "$OS" = "solaris" ] && BUILD_CPU=`isainfo | cut -f 1 -d ' '`
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington i[3456789]86|x86|i86pc)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # on AMD64 systems, 64bit libs are usually located in /usr/lib64
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # see http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # Solaris doesn't seem to subscribe to fhs, libs are usually in
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # a '64' subdirectory of the standard 'lib' dirs while some 64-bit
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # alternative binaries can be found in 'amd64' subdirs of the 'bin'
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # ones. So, in order to find the right stuff (esp. sdl-config) we'll
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # have to make sure the */bin/amd64 dirs are searched before the */bin
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # ones. (The sed has some sideeffects, but they shouldn't harm us...)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "64-bit Solaris detected, hacking the PATH" >> $LOG
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington PATH=`echo ":$PATH:" | sed -e 's,\(:[^:]*/bin\):,\1/amd64:\1:,g' \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington -e 's/^:*//' -e 's/:*$//g' -e 's/::*/:/g' `
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington [ -z "$TARGET_MACHINE" ] && TARGET_MACHINE=$BUILD_MACHINE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington [ -z "$TARGET_CPU" ] && TARGET_CPU=$BUILD_CPU
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington DEVDIR_BIN="$DEVDIR/$OS.$BUILD_MACHINE/bin"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington log_success "Determined build machine: $OS.$BUILD_MACHINE, target machine: $OS.$TARGET_MACHINE"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "export BUILD_PLATFORM=\"$OS\"" >> $ENV
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "export BUILD_PLATFORM_ARCH=\"$BUILD_MACHINE\"" >> $ENV
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "export BUILD_TARGET_ARCH=\"$TARGET_MACHINE\"" >> $ENV
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "export BUILD_TARGET_CPU=\"$TARGET_CPU\"" >> $ENV
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "export BUILD_TYPE=\"$BUILD_TYPE\"" >> $ENV
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Check for gcc with version >= 3.2.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# We depend on a working gcc, if we fail terminate in every case.
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater if [ $? -ne 0 ]; then
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater log_failure "cannot execute '$CC -dumpversion'"
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater if [ $? -ne 0 ]; then
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater log_failure "cannot execute '$CXX -dumpversion'"
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington log_failure "gcc version $cc_ver does not match g++ version $cxx_ver"
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington elif [ $cc_maj -eq 4 -a $cc_min -eq 0 -a "OS" = "darwin" ]; then
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews -o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington -o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews -o \( $cc_maj -eq 4 -a $cc_min -gt 3 \) \
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User -o $cc_maj -gt 4 ]; then
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 0<x<4"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if [ "$BUILD_MACHINE" = "x86" -a "$TARGET_MACHINE" = "amd64" ]; then
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # this isn't not necessary, there is not such tool.
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User if [ "$OS" = "solaris" -a "$BUILD_MACHINE" = "amd64" ]; then
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Check for the bcc compiler, needed for compiling the BIOS
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews bcc_ver=`$BCC -v 2>&1|grep version|sed 's+^bcc: version \(.*\)+\1+'`
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews if [ $? -ne 0 ]; then
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "compiling the following source file:" >> $LOG
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "using the following command line:" >> $LOG
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "$BCC -B $bcc_dir -C-c -3 -S -o $ODIR.tmp_out $ODIR.tmp_src.c" >> $LOG
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $BCC -B $bcc_dir -C-c -3 -S -o $ODIR.tmp_out $ODIR.tmp_src.c >> $LOG 2>&1
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if [ $? -ne 0 ]; then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cnf_append "VBOX_BCC" "$bcc_path -B $bcc_dir"
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews# Check for the as86 assembler, needed for compiling the BIOS
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews as86_ver=`$AS86 -v 2>&1|grep version|sed 's+^as86 version: \(.*\)+\1+'`
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington if [ $? -ne 0 ]; then
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington cnf_append "VBOX_AS86" "`which_wrapper $AS86`"
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater# Check for yasm, needed to compile assembler files
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User yasm_ver=`$YASM --version|grep "^yasm"|sed 's+^yasm \(.*\)+\1+'`
f7369b2881b5e63d69600adcedc8ba938303d30cTinderbox User if [ $? -ne 0 ]; then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater yasm_ver_mul=`expr $yasm_maj \* 10000 + $yasm_min \* 100 + $yasm_rev`
1fdd58445074579ee3b65c871137a7a1740eb542Mark Andrews if [ $yasm_ver_mul -lt 501 ]; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User log_failure "found version $yasm_ver, expected at least 0.5.1"
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater# Check for the iasl ACPI compiler, needed to compile vbox.dsl
665ba746c0585088d0c314dcfc4671aa2c7b2dc1Automatic Updater iasl_ver=`$IASL|grep version|sed 's+^ASL.*version \([0-9]*\).*+\1+'`
e8c17c74535be290abaaa160a434ed80bf0ad2feMark Andrews if [ $? -ne 0 ]; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User cnf_append "VBOX_IASLCMD" "`which_wrapper $IASL`"
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater# Check for xsltproc, needed by Main
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater if [ $? -ne 0 ]; then
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater cnf_append "VBOX_XSLTPROC" "`which_wrapper $XSLTPROC`"
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater# Check for mkisofs, needed to build the CDROM image containing the additions
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater if which_wrapper $GENISOIMAGE > /dev/null; then
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater if [ $? -ne 0 ]; then
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater cnf_append "VBOX_MKISOFS" "`which_wrapper $GENISOIMAGE`"
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater if [ $? -ne 0 ]; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User cnf_append "VBOX_MKISOFS" "`which_wrapper $MKISOFS`"
bf8c3776f1bf1a1270e5e0443ae5a8df022632a8Mark Andrews# Check for libxml2, needed by VBoxSettings
bf8c3776f1bf1a1270e5e0443ae5a8df022632a8Mark Andrews# 2.6.24 is known to NOT work, 2.6.26 is known to work (there is no 2.6.25 release)
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater if which_wrapper pkg-config > /dev/null; then
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic Updater libxml2_ver=`pkg-config libxml-2.0 --modversion 2>> $LOG`
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater if [ $? -ne 0 ]; then
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater#include <cstdio>
a382ca49c874d38ad3ac8995b49f9f27128e4ca9Automatic Updater#include <libxml/xmlversion.h>
a382ca49c874d38ad3ac8995b49f9f27128e4ca9Automatic Updaterextern "C" int main(void)
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic Updater printf("found version %s", LIBXML_DOTTED_VERSION);
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic Updater#if LIBXML_VERSION >= 20626
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater printf(", OK.\n");
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic Updater printf(", expected version 2.6.26 or higher\n");
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"`
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic Updater if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2"
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`"
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater if [ $? -ne 0 ]; then
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington#include <cstdio>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#include <libxml/xmlversion.h>
01f91b9cd440833f66e7476e43659655cb52ad10Automatic Updaterextern "C" int main(void)
3e5b24a74c03d5b52f32d138e64e427bd2cbc8f3Automatic Updater printf("found version %s", LIBXML_DOTTED_VERSION);
ec8755f605d7dcb2de1076040e77bc2d7ec33b4aTinderbox User#if LIBXML_VERSION >= 20626
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater printf(", OK.\n");
789875a1bd6d50c00d3bd883cad17ead1d3c21cdMark Andrews printf(", expected version 2.6.26 or higher\n");
b253dcf9668f95e141bce9556dc88e30d3305a1dTinderbox User [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"`
b253dcf9668f95e141bce9556dc88e30d3305a1dTinderbox User if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then
b123be91958e0bc58a10c165be64d47661199e3bEvan Hunt cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`"
b123be91958e0bc58a10c165be64d47661199e3bEvan Hunt log_failure "neither pkg-config nor xml2-config found"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# Check for libxslt, needed by VBoxSettings. For now we depend on 1.1.17.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# This library is available on Ubuntu Edgy which fulfils the minimal libxml2
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# requirement (2.6.26).
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater if which_wrapper pkg-config > /dev/null; then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater libxslt_ver=`pkg-config libxslt --modversion 2>> $LOG`
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater if [ $? -ne 0 ]; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#include <cstdio>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#include <libxslt/xsltconfig.h>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterextern "C" int main(void)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater printf("found version %s", LIBXSLT_DOTTED_VERSION);
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User#if LIBXSLT_VERSION >= 10117
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", OK.\n");
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", expected version 1.1.17 or higher\n");
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater [ -n "$INCXSLT" ] && I_INCXSLT=`prefix_I "$INCXSLT"`
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test_compile "$LIBXSLT $LIBPTHREAD $I_INCXSLT" xslt xslt; then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cnf_append "SDK_VBOX_LIBXSLT_INCS" "$INCXSLT"
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User cnf_append "SDK_VBOX_LIBXSLT_LIBS" "`strip_l "$LIBXSLT"`"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if [ $? -ne 0 ]; then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#include <cstdio>
7f814b8b164ae04916a8487cdc5e88ee3ff51a58Automatic Updater#include <libxslt/xsltconfig.h>
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox Userextern "C" int main(void)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater printf("found version %s", LIBXSLT_DOTTED_VERSION);
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#if LIBXSLT_VERSION >= 10117
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater printf(", OK.\n");
48b36fa08b2b5bc0d552dc2a4425b3f7007b3d59Automatic Updater printf(", expected version 1.1.17 or higher\n");
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User [ -n "$INCXSLT" ] && I_INCXSLT=`prefix_I "$INCXSLT"`
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User if test_compile "$LIBXSLT $LIBPTHREAD $I_INCXSLT" xslt xslt; then
1959fd489a8832e4e3d311670f64ae18e5d08156Automatic Updater cnf_append "SDK_VBOX_LIBXSLT_INCS" "$INCXSLT"
1959fd489a8832e4e3d311670f64ae18e5d08156Automatic Updater cnf_append "SDK_VBOX_LIBXSLT_LIBS" "`strip_l "$LIBXSLT"`"
b6561016dc8a813bfd91cef5b876b3dfc3f08ffaTinderbox User log_failure "neither pkg-config nor xslt-config found"
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# Check for libIDL, needed by xpcom
b6561016dc8a813bfd91cef5b876b3dfc3f08ffaTinderbox User if which_wrapper libIDL-config-2 > /dev/null; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User if [ $? -ne 0 ]; then
e5bf83fe0bbca838a0749e9071bd76d9ee0fb59bFrancis Dupont "PKG_CONFIG_PATH=`libIDL-config-2 --prefix`/$LIB/pkgconfig `which_wrapper libIDL-config-2`"
e5bf83fe0bbca838a0749e9071bd76d9ee0fb59bFrancis Dupont elif check_avail "libIDL-config" libIDL-config; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User if [ $? -ne 0 ]; then
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater cnf_append "VBOX_LIBIDL_CONFIG" "`which_wrapper libIDL-config`"
ead8aa3182c5805fccb6c7c1636cede6a24a5fc1Automatic Updater# Check for openssl, needed for RDP
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#include <cstdio>
765c97d56ccddc9d7904c7d9ff2e2d825d9687e4Automatic Updater#include <openssl/opensslv.h>
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox Userextern "C" int main(void)
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater printf("found version %s", OPENSSL_VERSION_TEXT);
fe84edc17e0d582cf7b4270f8df9d4742a107b1cAutomatic Updater#if OPENSSL_VERSION_NUMBER >= 0x0090700
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", OK.\n");
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", expected version 0.9.7 or higher\n");
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test_compile $LIBCRYPTO libcrypto openssl; then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cnf_append "SDK_VBOX_OPENSSL_LIBS" "`strip_l "$LIBCRYPTO"`"
c53a6f37deaa396660adb6a4ca600c4a58adfd3fAutomatic Updater# Check for pthread, needed by VBoxSVC, frontends, ...
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater#include <cstdio>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#include <pthread.h>
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updaterextern "C" int main(void)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater pthread_mutex_t mutex;
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic Updater if (pthread_mutex_init(&mutex, NULL)) {
af9cf290cea6ada6ce27b51c724ab77ad5d73fa0Tinderbox User printf("pthread_mutex_init() failed\n");
6671e343b8c7e44ac10a7900fde59555fbc71571Automatic Updater if (pthread_mutex_lock(&mutex)) {
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater printf("pthread_mutex_lock() failed\n");
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater if (pthread_mutex_unlock(&mutex)) {
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater printf("pthread_mutex_unlock() failed\n");
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater printf("found, OK.\n");
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater if test_compile $LIBPTHREAD pthread pthread; then
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater cnf_append "LIB_PTHREAD" "`strip_l "$LIBPTHREAD"`"
af9cf290cea6ada6ce27b51c724ab77ad5d73fa0Tinderbox User# Check for zlib, needed by VBoxSVC, Runtime, ...
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater#include <cstdio>
e628576d3b3d91c8954679077f4c208f1e43b433Automatic Updater#include <zlib.h>
f8a9a38ee40c139a8d145ac76ecbff3a0f986453Mark Andrewsextern "C" int main(void)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf("found version %s", ZLIB_VERSION);
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#if ZLIB_VERNUM >= 0x1210
9d80d23172c30fd63e5046a7e69b8445e564ff31Automatic Updater printf(", OK.\n");
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User printf(", expected version 1.2.1 or higher\n");
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User if test_compile "$LIBZ $I_INCZ" zlib zlib; then
bea3208b417a0700bd524807082875b7d09585e4Automatic Updater cnf_append "SDK_VBOX_ZLIB_LIBS" "`strip_l "$LIBZ"`"
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews# Check for libpng, needed by kchmviewer
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews#include <cstdio>
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews#include <png.h>
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrewsextern "C" int main(void)
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews printf("found version %s", PNG_LIBPNG_VER_STRING);
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews#if PNG_LIBPNG_VER >= 10205
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews printf(", OK.\n");
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User printf(", expected version 1.2.5 or higher\n");
8f2c45a35dd8c40bcc9caba8f7d40ce64fc27bcdAutomatic Updater [ -n "$INCPNG" ] && I_INCPNG=`prefix_I "$INCPNG"`
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews# if test_compile "$LIBPNG $I_INCPNG" libpng libpng nofatal; then
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User if test_compile "$LIBPNG $I_INCPNG" libpng libpng; then
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User# if test_execute nofatal; then
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User cnf_append "SDK_VBOX_LIBPNG_LIBS" "`strip_l "$LIBPNG"`"
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# Check for pam, needed by VRDPAuth
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User# Version 79 was introduced in 9/2005, do we support older versions?
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# OpenSUSE comes with 0.99.xxx where they changed the versioning scheme.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#include <cstdio>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#include <security/pam_appl.h>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterextern "C" int main(void)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater printf("found version %d", __LIBPAM_VERSION);
e007e3e5b0316c6c05698a71101885743aca22bdAutomatic Updater if (__LIBPAM_VERSION >= 76)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", OK.\n");
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater printf(", expected version 76 or higher\n");
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test_compile "-lpam" pam pam nofatal; then
95cfad51a3f71246d263af79a7861a6821f7a0beAutomatic Updater#include <cstdio>
95cfad51a3f71246d263af79a7861a6821f7a0beAutomatic Updater#include <security/pam_appl.h>
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox Userextern "C" int main(void)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf("found version %d.%d", __LINUX_PAM__, __LINUX_PAM_MINOR__);
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User if (__LINUX_PAM__ >= 1)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", OK.\n");
5ecad47f69b3fd945472ab2900a9ff826a7ce2f6Automatic Updater printf(", expected version 1.0 or higher\n");
f132a836c4e386b1af045dd8fe7106ae61b90bffAutomatic Updater# Check for the SDL library, needed by VBoxSDL and VirtualBox
f132a836c4e386b1af045dd8fe7106ae61b90bffAutomatic Updater# We depend at least on version 1.2.7
2fd1e3918971180155c10d09454a277f015daecaAutomatic Updater if [ -f "/System/Library/Frameworks/SDL.framework/SDL" ]; then
2fd1e3918971180155c10d09454a277f015daecaAutomatic Updater PATH_SDK_LIBSDL="/System/Library/Frameworks/SDL.framework"
2fd1e3918971180155c10d09454a277f015daecaAutomatic Updater elif [ -f "/Library/Frameworks/SDL.framework/SDL" ]; then
2fd1e3918971180155c10d09454a277f015daecaAutomatic Updater PATH_SDK_LIBSDL="/Library/Frameworks/SDL.framework"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington if which_wrapper sdl-config > /dev/null; then
82447d835d3ff5c658749b4e9b4f66166407b3eaAutomatic Updater [ "$OS" = "linux" -o "$OS" = "darwin" -o "$OS" = "solaris" ] && LIBSDLMAIN=""
82447d835d3ff5c658749b4e9b4f66166407b3eaAutomatic Updater#include <cstdio>
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#include <SDL.h>
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#include <SDL_main.h>
d04fe0d954df649d763640642cb5a456ae1c63a3Automatic Updaterextern "C" int main(int argc, char** argv)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf("found version %d.%d.%d",
bbb069be941f649228760edcc241122933c066d2Automatic Updater SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#if SDL_VERSION_ATLEAST(1,2,7)
e062b72f783cdb436a1a57a630bdff471dbb3038Mark Andrews printf(", OK.\n");
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater printf(", expected version 1.2.7 or higher\n");
d04fe0d954df649d763640642cb5a456ae1c63a3Automatic Updater [ -n "$INCSDL" ] && I_INCSDL=`prefix_I "$INCSDL"`
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User if test_compile "$LIBSDL $LIBSDLMAIN $I_INCSDL $FLDSDL" SDL SDL; then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cnf_append "LIB_SDK_LIBSDL_SDL" "`strip_l "$LIBSDL"`"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cnf_append "SDK_LIBSDL_LIBPATH" "`strip_L "$LIBSDL"`"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cnf_append "LIB_SDK_LIBSDL_SDLMAIN" "`strip_l "$LIBSDLMAIN"`"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater [ -n "$INCSDL" ] && cnf_append "SDK_LIBSDL_INCS" "$INCSDL"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater [ -n "$FLDSDL" ] && cnf_append "SDK_LIBSDL_LDFLAGS" "$FLDSDL"
a01aa536188bb3535dfc1107a623e6355a8e6b7cMark Andrews# Check for the SDL_ttf library, needed by VBoxSDL (secure label)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#include <cstdio>
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#include <SDL_ttf.h>
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#ifndef SDL_TTF_MAJOR_VERSION
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#define SDL_TTF_MAJOR_VERSION TTF_MAJOR_VERSION
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#define SDL_TTF_MINOR_VERSION TTF_MINOR_VERSION
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#define SDL_TTF_PATCHLEVEL TTF_PATCHLEVEL
601c1908d06375f5dea00ab98671a6c934d8a840Automatic Updaterextern "C" int main(void)
601c1908d06375f5dea00ab98671a6c934d8a840Automatic Updater printf("found version %d.%d.%d",
0c7657e9302e7f9a8fe4f32fe561dc7e7e7ee6b5Automatic Updater SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, SDL_TTF_PATCHLEVEL);
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater#if 10000*SDL_TTF_MAJOR_VERSION + 100*SDL_TTF_MINOR_VERSION + SDL_TTF_PATCHLEVEL >= 20006
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", OK.\n");
601c1908d06375f5dea00ab98671a6c934d8a840Automatic Updater printf(", expected version 2.0.6 or higher\n");
55f7099aade5630f3b10b5f007536c60e80cced2Automatic Updater if test_compile "-lSDL_ttf $I_INCSDL" SDL_ttf SDL_ttf nofatal; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# Check for libasound, needed by the ALSA audio backend
f9119ad8f6114b2255e7545bf5cd187f4db0a89bAutomatic Updater#include <cstdio>
f9119ad8f6114b2255e7545bf5cd187f4db0a89bAutomatic Updater#include <alsa/asoundlib.h>
f9119ad8f6114b2255e7545bf5cd187f4db0a89bAutomatic Updaterextern "C" int main(void)
c95f536d78842fbc8ebcef653d88e1f2270054f8Automatic Updater printf("found version %d.%d.%d",
c95f536d78842fbc8ebcef653d88e1f2270054f8Automatic Updater SND_LIB_MAJOR, SND_LIB_MINOR, SND_LIB_SUBMINOR);
c95f536d78842fbc8ebcef653d88e1f2270054f8Automatic Updater#if 10000*SND_LIB_MAJOR + 100*SND_LIB_MINOR + SND_LIB_SUBMINOR >= 10006
c95f536d78842fbc8ebcef653d88e1f2270054f8Automatic Updater printf(", OK.\n");
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", expected version 1.0.6 or higher\n");
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User if test_compile "-lasound" asound asound; then
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# Check for PulseAudio
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater#include <cstdio>
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater#include <pulse/version.h>
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updaterextern "C" int main(void)
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater printf("found version %s API version %d", pa_get_headers_version(), PA_API_VERSION);
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater#if PA_API_VERSION >= 9
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", OK.\n");
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", expected version 0.9.0 (API version 9) or higher\n");
601c1908d06375f5dea00ab98671a6c934d8a840Automatic Updater if test_compile "-lpulse" pulse pulse; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# Check for the X libraries (Xext, X11)
f42fc714eda962112e45b904d1f846c61a080114Automatic Updater#include <cstdio>
4d813066e967a36c407ee641155ada0c614d4dc6Automatic Updater#include <X11/Xlib.h>
a6e1f63f50af688610ebd2521ba7f028767b51f3Mark Andrewsextern "C" int main(void)
2cdbfcdad94eba75f3f8e77343a0eefabf553b8eAutomatic Updater dpy = XOpenDisplay(NULL);
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater scrn_num = DefaultScreen(dpy);
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User scrn = ScreenOfDisplay(dpy, scrn_num);
f42fc714eda962112e45b904d1f846c61a080114Automatic Updater win = XCreateWindow(dpy, RootWindowOfScreen(scrn), 0, 0, 100, 100,
4d813066e967a36c407ee641155ada0c614d4dc6Automatic Updater 0, 16, InputOutput, CopyFromParent, 0, NULL);
f42fc714eda962112e45b904d1f846c61a080114Automatic Updater XDestroyWindow(dpy, win);
f42fc714eda962112e45b904d1f846c61a080114Automatic Updater [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater if test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs; then
6686505e3ae3289eea38002a3269828893532489Evan Hunt# Check for the Xcursor library, needed by VBoxSDL and VBoxBFE
3f616e6f846be57b1717c6beaba0f74de9d5a7c6Automatic Updater#include <cstdio>
7349698120e3f6f51162a2fdb5613f9aecbc78c3Automatic Updater#include <X11/Xlib.h>
afaa290bb6acc504e93a0adbf20b6dd6c64e6d63Vernon Schryver#include <X11/Xcursor/Xcursor.h>
bde1625cbc0256920625797a2cd4f05312f02ffaMark Andrewsextern "C" int main(void)
ed52536a1722606f22332ba4f92cbb74c3b256d9Tinderbox User XcursorImage *cursor = XcursorImageCreate (10, 10);
ed52536a1722606f22332ba4f92cbb74c3b256d9Tinderbox User XcursorImageDestroy(cursor);
ed52536a1722606f22332ba4f92cbb74c3b256d9Tinderbox User [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
afaa290bb6acc504e93a0adbf20b6dd6c64e6d63Vernon Schryver if test_compile "$LIBX11 $LIBXCURSOR $I_INCX11" Xcursor Xcursor; then
ed52536a1722606f22332ba4f92cbb74c3b256d9Tinderbox User cnf_append "VBOX_XCURSOR_LIBS" "`strip_l "$LIBXCURSOR"`"
7349698120e3f6f51162a2fdb5613f9aecbc78c3Automatic Updater# Check for the Xmu library, needed by OpenGL
ec8755f605d7dcb2de1076040e77bc2d7ec33b4aTinderbox User#include <cstdio>
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews#include <X11/Xatom.h>
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews#include <X11/Xlib.h>
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews#include <X11/Xutil.h>
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews#include <X11/Xmu/StdCmap.h>
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrewsextern "C" int main(void)
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews Display *dpy;
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews int scrn_num;
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews Screen *scrn;
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews dpy = XOpenDisplay(NULL);
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews scrn_num = DefaultScreen(dpy);
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews scrn = ScreenOfDisplay(dpy, scrn_num);
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews Status status = XmuLookupStandardColormap(dpy, RootWindowOfScreen(scrn), 0,
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews 24, XA_RGB_DEFAULT_MAP, False, True);
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews printf("Status = %x\n", status);
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews if test_compile "$LIBX11 $LIBXMU $I_INCX11" Xmu Xmu; then
7e1a8f402e3881388db37152f71c698cb1f1c426Mark Andrews cnf_append "VBOX_XMU_LIBS" "`strip_l "$LIBXMU"`"
fd7c65dce9c2b1a3d12ca4df9074cd38019fdb5fAutomatic Updater# Check for Mesa, needed by OpenGL
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews#include <cstdio>
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews#include <X11/Xlib.h>
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews#include <GL/glx.h>
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews#include <GL/glu.h>
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrewsextern "C" int main(void)
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews Display *dpy;
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews int major, minor;
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews dpy = XOpenDisplay(NULL);
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews if (glXQueryVersion(dpy, &major, &minor))
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews printf("found version %u.%u, OK.\n", major, minor);
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews if test_compile "$LIBX11 $MESA $I_INCX11" Mesa Mesa; then
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic Updater# Check for the Qt4 library, needed by the VirtualBox frontend
ff8ec39ce4afc2d774ce99f2386474d2c8539cd4Automatic Updater# Currently not fatal.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if [ -f "/System/Library/Frameworks/QtCore.framework/QtCore" ]; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User PATH_SDK_QT4="/System/Library/Framework/QtCore.framework"
a382ca49c874d38ad3ac8995b49f9f27128e4ca9Automatic Updater elif [ -f "/Library/Frameworks/QtCore.framework/QtCore" ]; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User PATH_SDK_QT4="/Library/Frameworks/QtCore.framework"
8aa53dcb1d26277e8e805464bfff7bb7136f60cbAutomatic Updater log_failure "Qt4 framework not found (can be disabled using --disable-qt4)"
8aa53dcb1d26277e8e805464bfff7bb7136f60cbAutomatic Updater if which_wrapper pkg-config > /dev/null; then
8aa53dcb1d26277e8e805464bfff7bb7136f60cbAutomatic Updater # this braindead path is necessary for mdv2008.1
8aa53dcb1d26277e8e805464bfff7bb7136f60cbAutomatic Updater PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
8aa53dcb1d26277e8e805464bfff7bb7136f60cbAutomatic Updater if [ $? -ne 0 ]; then
8aa53dcb1d26277e8e805464bfff7bb7136f60cbAutomatic Updater PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
8aa53dcb1d26277e8e805464bfff7bb7136f60cbAutomatic Updater PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User # do it the old way (e.g. user has specified QT4DIR)
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User#include <cstdio>
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User#include <QtGlobal>
1368e4b34cef64604c874fcc40201c78e548714cTinderbox Userextern "C" int main(void)
059cd1994d4ac5c1b967ce777d2c7409dc829a42Tinderbox User printf("found version %s", QT_VERSION_STR);
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User#if QT_VERSION >= 0x040300
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", OK.\n");
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater printf(", expected version 4.3.0 or higher\n");
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
94d0b4bd411a66a2c5a7ebc8722579a59cf9640bAutomatic Updater#include <cstdio>
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#include <QtGlobal>
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox Userextern "C" int main(void)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf("found version %s", QT_VERSION_STR);
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User#if QT_VERSION >= 0x040300
601c1908d06375f5dea00ab98671a6c934d8a840Automatic Updater printf(", OK.\n");
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User printf(", expected version 4.3.0 or higher\n");
f7a71eef29bcbf892270460269c79664f600cffdAutomatic Updater [ -n "$INCQT4" ] && I_INCQT4=`prefix_I "$INCQT4"`
8f536463f9fdfa7da6a8310e4f4895373beb2961Mark Andrews if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
099b86fb8136a7dff81df85cf395978c16eb254cAutomatic Updater if test_execute_path "`strip_L "$LIBQT4"`"; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User # strip .../QtCore as we add components ourself
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User INCQT4=`echo "$INCQT4"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| $||g'`
ace530234c82bbfcd03bbfd4ba6c6a04293d497fMark Andrews # store only the first path, remove all other pathes
3f68e9c0e5a6ce475d15eef04bfed9b08a22afa9Tinderbox User # most likely pkg-config gave us -I/usr/include/qt4 -I/usr/include/qt4/QtCore
dcd42a39d311b44877161ffd1e27fa62700c0171Mark Andrews INCQT4=`echo "$INCQT4"|$KBUILD_SED 's|\([^ ]*\) .*|\1|'`
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cnf_append "VBOX_PATH_QT4_LIB" "`strip_L "$LIBQT4"`"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cnf_append "SDK_QT4_LIBPATH" "`strip_L "$LIBQT4"`"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # this is not quite right since the qt libpath does not have to be first...
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cnf_append "PATH_SDK_QT4_LIB" '$'"(firstword `strip_L "$LIBQT4"`)"
3f68e9c0e5a6ce475d15eef04bfed9b08a22afa9Tinderbox User if which_wrapper "$q/bin/moc" > /dev/null; then
3f68e9c0e5a6ce475d15eef04bfed9b08a22afa9Tinderbox User moc_ver=`$q/bin/moc -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'`
3f68e9c0e5a6ce475d15eef04bfed9b08a22afa9Tinderbox User if [ $? -ne 0 ]; then
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews# Check whether static libstdc++ is installed
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User libstdcxx=`$CXX -print-file-name=libstdc++.a`
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#include <string>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterextern "C" int main(void)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater std::string s = "test";
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if test_compile "$libstdcxx" libstdc++ libstdc++; then
82447d835d3ff5c658749b4e9b4f66166407b3eaAutomatic Updater# Check for Linux sources
7169f76a893666eb20fc7750782e7f411db742d6Tinderbox User#include <linux/version.h>
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updaterint printf(const char *format, ...);
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater printf("found version %d.%d.%d", LINUX_VERSION_CODE / 65536,
82447d835d3ff5c658749b4e9b4f66166407b3eaAutomatic Updater (LINUX_VERSION_CODE % 65536) / 256,
183b6c7fca54001820078f324d102fc33e64bbc6Automatic Updater LINUX_VERSION_CODE % 256);
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater printf(", OK.\n");
fe84edc17e0d582cf7b4270f8df9d4742a107b1cAutomatic Updater printf(", expected version 2.4.0 or higher\n");
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo "compiling the following source file:" >> $LOG
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo "using the following command line:" >> $LOG
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "$CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include" >> $LOG
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User $CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include >> $LOG 2>&1
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User if [ $? -ne 0 ]; then
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo " Linux kernel headers not found at $LINUX"
8f2c45a35dd8c40bcc9caba8f7d40ce64fc27bcdAutomatic Updater echo " Check the file $LOG for detailed error information."
8f2c45a35dd8c40bcc9caba8f7d40ce64fc27bcdAutomatic Updater cnf_append "VBOX_LINUX_SRC" "`cd $LINUX ; pwd`"
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# Check for kchmviewer, needed to display the online help
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater# (unused as we ship kchmviewer)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User kchmviewer_ver=`$KCHMVIEWER --version|grep "^KchmViewer:"|sed 's+^KchmViewer: \(.*\)+\1+'`
c07cdac6cf5bf3e9affc1aed25f8350087691f1eAutomatic Updater if [ $? -ne 0 ]; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# Check for the kBuild tools, we don't support GNU make
de73ef7ecdb9e009155993a6fa8dee5cd1bde319Mark Andrews if which_wrapper "$KBUILDDIR/bin/$OS.$BUILD_MACHINE/kmk" > /dev/null; then
7c899ff8af55a6855100e7fb4f5dd9a0a04b48a0Automatic Updater KBUILDDIR_BIN="$KBUILDDIR/bin/$OS.$BUILD_MACHINE"
7c899ff8af55a6855100e7fb4f5dd9a0a04b48a0Automatic Updater echo "export PATH_KBUILD=\"`cd $KBUILDDIR ; pwd`\"" >> $ENV
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "export PATH_DEVTOOLS=\"$DEVDIR\"" >> $ENV
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "path_kbuild_bin=\"\$PATH_KBUILD/bin/\$BUILD_TARGET.\$BUILD_PLATFORM_ARCH\"" >> $ENV
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "export PATH_KBUILD_BIN=\"\$path_kbuild_bin\"" >> $ENV
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "path_dev_bin=\"\$PATH_DEVTOOLS/\$BUILD_TARGET.\$BUILD_PLATFORM_ARCH\"/bin" >> $ENV
7c899ff8af55a6855100e7fb4f5dd9a0a04b48a0Automatic Updater # Because of sh being non-default shell in Solaris we need to export PATH again when
7c899ff8af55a6855100e7fb4f5dd9a0a04b48a0Automatic Updater # sourcing env.sh. Simply exporting from ./configure does not export PATH correctly.
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "echo \"\$PATH\" | /usr/sfw/bin/ggrep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "echo \"\$PATH\" | /usr/sfw/bin/ggrep -q \"\$path_dev_bin\" || PATH=\"\$path_dev_bin:\$PATH\"" >> $ENV
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "echo \"\$PATH\" | grep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "echo \"\$PATH\" | grep -q \"\$path_dev_bin\" || PATH=\"\$path_dev_bin:\$PATH\"" >> $ENV
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "unset path_kbuild_bin path_dev_bin" >> $ENV
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater elif check_avail "kmk" KBUILDDIR really; then
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews# Some Linux distributions include "compiler.h" in their libc linux
4d95e549ed8f84373e5eb7346a0c7ab7f3b0e9a8Automatic Updater# headers package, some don't. Most don't need it, building might (!)
6fab60452ed15c1039aee974a32d692d07eda4d2Automatic Updater# not succeed on openSUSE without it.
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews# See http://www.mail-archive.com/qemu-devel%40nongnu.org/msg07980.html
71ba75c604df3604673232828a68bb28c420e698Mark Andrews if ! test -f "/usr/include/linux/compiler.h"; then
979e02d122cddf1624cca8a4dab8d084c900fa48Automatic Updater# Check for libcap.
979e02d122cddf1624cca8a4dab8d084c900fa48Automatic Updater# Required to pass CAP_NET_RAW to our binaries to allow to open SOCK_RAW
979e02d122cddf1624cca8a4dab8d084c900fa48Automatic Updater# sockets for doing ICMP requests.
979e02d122cddf1624cca8a4dab8d084c900fa48Automatic Updater#include <cstdio>
f9119ad8f6114b2255e7545bf5cd187f4db0a89bAutomatic Updater#include <sys/capability.h>
979e02d122cddf1624cca8a4dab8d084c900fa48Automatic Updaterextern "C" int main(void)
7f79131f9a8e804b93c57f3c679065cce878b726Automatic Updater char buf[1024];
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cap_t caps = cap_get_proc();
7f79131f9a8e804b93c57f3c679065cce878b726Automatic Updater snprintf(buf, sizeof(buf), "Current caps are '%s'\n", cap_to_text(caps, NULL));
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater if test_compile $LIBCAP libcap libcap; then
7932a7637170550bc53b38c35db9a0187dcb3d3bAutomatic Updater# Check if we are able to build 32-bit applications (needed for the guest additions)
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater#include <stdint.h>
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User echo "compiling the following source file:" >> $LOG
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo "using the following command line:" >> $LOG
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo "$CC -m32 -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c" >> $LOG
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $CC -m32 -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c >> $LOG 2>&1
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User if [ $? -ne 0 ]; then
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User echo " Cannot compile 32-bit applications (missing headers and/or libraries)!"
8fca573ba41a1669fff64f234275e956551eb6e5Mark Andrews echo " Check the file $LOG for detailed error information."
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater# Check for Python
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater#include <cstdio>
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews#include <Python.h>
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updaterextern "C" int main(void)
1d4f4d2db2d69e48fec2dde5c1535853677d22a7Automatic Updater Py_Initialize();
1d4f4d2db2d69e48fec2dde5c1535853677d22a7Automatic Updater printf("found version %s", PY_VERSION);
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater#if PY_VERSION_HEX >= 0x02030000
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater printf(", OK.\n");
1d4f4d2db2d69e48fec2dde5c1535853677d22a7Automatic Updater printf(", expected version 2.3 or higher\n");
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews for d in python2.6 python2.5 python2.4 python2.3; do
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews for b in lib64 lib/64 lib; do
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews echo "compiling the following source file:" >> $LOG
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews echo "using the following command line:" >> $LOG
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so" >> $LOG
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so >> $LOG 2>&1
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews if [ $? -eq 0 ]; then
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater cnf_append "VBOX_PATH_PYTHON_INC" "$p/include/$d"
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews if ! which_wrapper wineprefixcreate > /dev/null; then
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews echo "export WINEPREFIX=\"${ODIR}wine.$BUILD_MACHINE\"" >> $ENV
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews if ! wineprefixcreate -q > /dev/null 2>&1; then
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews echo '[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment]' >> $tmp
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews echo "\"PATH\"=\"c:\\\\\\\\windows\\\\\\\\system32;c:\\\\\\\\windows;z:$DEVDIR/win.x86/vcc/v8/bin/Microsoft.VC80.CRT;z:$DEVDIR/win.x86/HTML_Help_Workshop/v1.3\"" >> $tmp
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews echo '[HKEY_CURRENT_USER\Software\Wine\AppDefaults\hhc.exe\DllOverrides]' >> $tmp
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews echo '[HKEY_CURRENT_USER\Software\Wine\AppDefaults\hhw.exe\DllOverrides]' >> $tmp
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews if ! wine regedit $tmp > /dev/null 2>&1; then
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews echo " failed to load registry changes (path)."
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews# Check for gSOAP.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews if which_wrapper "$GSOAP/bin/soapcpp2" > /dev/null; then
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews if which_wrapper "$GSOAP/bin/wsdl2h" > /dev/null; then
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews if [ ! -d "$GSOAP_IMPORT" -a -d "$GSOAP/include/gsoap" ]; then
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews cnf_append "VBOX_PATH_GSOAP_IMPORT" "$GSOAP_IMPORT"
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews log_failure "stlvector.h not found -- disabling webservice"
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews log_failure "stdsoap2.h not found -- disabling webservice"
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews log_failure "wsdl2h not found -- disabling webservice"
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews log_failure "soapcpp2 not found -- disabling webservice"
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews# Determines the Darwin version.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews# @todo This should really check the Xcode/SDK version.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews #cnf_append "VBOX_TARGET_MAC_OS_X_VERSION_10_5" "1"
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews echo " failed to determin darwin version. (uname -r: $darwin_ver)"
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews# Checks that i386-elf-gcc-3.4.6, i386-elf-gcc-3.4.3, i386-elf-gcc-3.4 or i386-elf-gcc
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews# is around to prevent confusion when the build fails in src/recompiler.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews# Note. Keep the which order in sync with the $(which ) in src/recompiler/Makefile.kmk.
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews i386_elf_gcc=`which_wrapper i386-elf-gcc-3.4.6`
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews test -z "$i386_elf_gcc" && i386_elf_gcc=`which_wrapper i386-elf-gcc-3.4.3`
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews test -z "$i386_elf_gcc" && i386_elf_gcc=`which_wrapper i386-elf-gcc-3.4`
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews test -z "$i386_elf_gcc" && i386_elf_gcc=`which_wrapper i386-elf-gcc`
4f087942583014b241adca1bc78c6db89ed96e94Mark AndrewsUsage: ./configure [OPTIONS]...
4f087942583014b241adca1bc78c6db89ed96e94Mark AndrewsConfiguration:
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews -h, --help display this help and exit
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --nofatal don't abort on errors
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --disable-xpcom disable XPCOM and related stuff
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --disable-python disable python bindings
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --disable-sdl-ttf disable SDL_ttf detection
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --disable-alsa disable the ALSA sound backend
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --disable-pulse disable the PulseAudio backend
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --disable-dbus don't use DBus and hal for hardware detection
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --disable-kmods don't build Linux kernel modules (host and guest)
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --disable-hardening don't be strict about /dev/vboxdrv access
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --disable-opengl disable OpenGL support
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --enable-webservice enable the webservice stuff
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --build-libxml2 build libxml2 from sources
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --build-libxslt build libxslt from sources
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --setup-wine setup a Wine directory and register the hhc hack
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --with-gcc=PATH location of the gcc compiler [$CC]
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --with-g++=PATH location of the g++ compiler [$CXX]
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --with-kbuild=DIR kbuild directory [$KBUILDDIR]
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --with-iasl=PATH location of the iasl compiler [$IASL]
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --with-linux=DIR Linux kernel source directory [$LINUX]
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --with-mkisofs=PATH location of mkisofs [$MKISOFS]
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --with-qt-dir=DIR directory for Qt4 headers/libraries [pkgconfig]
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --with-gsoap-dir=PATH directory for gSOAP compiler/headers/libraries
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews (soapcpp2 and wsdl2h, soapstd2.h, libgsoap++.a/so)
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --with-gsoap-import=PATH directory for gSOAP import files (stlvector.h)
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --out-path=PATH the folder to which configuration and build output
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews -d, --build-debug build with debugging symbols and assertions
4f087942583014b241adca1bc78c6db89ed96e94Mark Andrews --build-profile build with profiling support
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington --build-headless build headless (without any X11 frontend)
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews# scan command line options
97669cab1f7e6f953dbf39ef1b2c4206ecb50d9eAutomatic Updater if echo $KBUILDDIR|grep -q "$INVALID_CHARS"; then
97669cab1f7e6f953dbf39ef1b2c4206ecb50d9eAutomatic Updater echo "Error: KBUILDDIR contains invalid characters!"
97669cab1f7e6f953dbf39ef1b2c4206ecb50d9eAutomatic Updater GSOAP_IMPORT=`echo $option | cut -d'=' -f2`
782b50b4ebbd48d570831f66d8ffc550e0db340cAutomatic Updater out_path="`echo $option | cut -d'=' -f2`/"
782b50b4ebbd48d570831f66d8ffc550e0db340cAutomatic Updater if [ -d $out_path ]; then
782b50b4ebbd48d570831f66d8ffc550e0db340cAutomatic Updater # This variable has not *yet* been overridden. That can still happen.
782b50b4ebbd48d570831f66d8ffc550e0db340cAutomatic Updater echo "Error: invalid folder \"$out_path\" in option \"$option\""
78d7186253dfed549ec0ce2d7c2b08a7978ede9cAutomatic Updater echo "Unrecognized option \"$option\""
782b50b4ebbd48d570831f66d8ffc550e0db340cAutomatic Updater# initialize output files
782b50b4ebbd48d570831f66d8ffc550e0db340cAutomatic Updater# Log file generated by
782b50b4ebbd48d570831f66d8ffc550e0db340cAutomatic Updater# -*- Makefile -*-
78d7186253dfed549ec0ce2d7c2b08a7978ede9cAutomatic Updater# automatically generated by
782b50b4ebbd48d570831f66d8ffc550e0db340cAutomatic Updater# It will be completely overwritten if configure is executed again.
782b50b4ebbd48d570831f66d8ffc550e0db340cAutomatic Updater# automatically generated by
f8e61212a1b83e60f521577cc522e8bc1509c8cfAutomatic Updater# It will be completely overwritten if configure is executed again.
782b50b4ebbd48d570831f66d8ffc550e0db340cAutomatic Updater# Make sure you source this file once before you start to build VBox.
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# test if we are OSE
c6a0f4ae1d7183a16ffb196b86b647f870694796Automatic Updaterif [ $OSE -eq 1 -a -d "`cd \`dirname $0\`; pwd`/src/VBox/Devices/USB" ]; then
7349698120e3f6f51162a2fdb5613f9aecbc78c3Automatic Updater echo "Found USB devices, assuming VBOX_OSE = FALSE" >> $LOG
09091b4f0f69cca36f74a291fa3eb496686aeb1eAutomatic Updater# first determine our environment
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# append the tools directory to the default search path
418cc932318b1d67f88a36904d88d8a5a0a2ba09Automatic Updaterecho "$PATH" | grep -q "$DEVDIR_BIN" || PATH="$PATH:$DEVDIR_BIN"
7349698120e3f6f51162a2fdb5613f9aecbc78c3Automatic Updater# if we will be writing to a different out directory then set this up now
7349698120e3f6f51162a2fdb5613f9aecbc78c3Automatic Updater echo "export AUTOCFG=$OUT_PATH/AutoConfig.kmk" >> $ENV
7349698120e3f6f51162a2fdb5613f9aecbc78c3Automatic Updater echo "export LOCALCFG=$OUT_PATH/LocalConfig.kmk" >> $ENV
7349698120e3f6f51162a2fdb5613f9aecbc78c3Automatic Updater echo "export PATH_OUT_BASE=$OUT_PATH" >> $ENV
7349698120e3f6f51162a2fdb5613f9aecbc78c3Automatic Updater# some things are not available in for OSE
7349698120e3f6f51162a2fdb5613f9aecbc78c3Automatic Updater cnf_append "VBOX_WITH_LINUX_ADDITIONS" "1"
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsif [ -n "$HEADLESS" ]; then
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews # On Darwin we want to build against Qt4 only. WITH_QT4 is enabled by
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews # default so disable Qt3. --disable-qt disables both Qt3 and Qt4 GUI now,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews # --disable-qt4 disables only the Qt4 GUI (which is not appropriate for
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews # Darwin as we disable the Qt3 here anyway.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews # (Qt3 builds for Intel Macs are usually not threaded or for X11. And they
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews # don't contain our patches, which means the result isn't really usable.)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# emit disable directives corresponding to any --disable-xxx options.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater[ $WITH_XPCOM -eq 0 ] && cnf_append "VBOX_WITH_MAIN" ""
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews[ $WITH_QT4 -eq 0 ] && cnf_append "VBOX_WITH_QTGUI" ""
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews[ $WITH_SDL_TTF -eq 0 ] && cnf_append "VBOX_WITH_SECURELABEL" ""
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater[ $WITH_HARDENING -eq 0 ] && cnf_append "VBOX_WITHOUT_HARDENING" "1"
68e1b398b5b1b417723e90b5e52b9148f8f93294Automatic Updater[ $WITH_HARDENING -eq 2 ] && cnf_append "VBOX_WITH_HARDENING" "2"
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# [ "$OS" != "darwin" ] && check_yasm
45eca3a5d46ed15aee14d81f6cb6c9fb6f365344Mark Andrews[ $OSE -eq 0 -a "$OS" != "darwin" ] && check_mkisofs
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# the libraries
bdcada7d31335e05ebca757eb789e57166fb2a02Tinderbox User# build openssl on Darwin in every case
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews[ "$OS" != "darwin" -a $OSE -eq 0 ] && check_ssl
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews[ "$OS" != "darwin" -a "$OS" != "freebsd" ] && check_png
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User[ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam
7a2a1b8b14fc804ac80612d7b98064095e445be5Automatic Updater[ $WITH_SDL_TTF -eq 1 -a $OSE -eq 0 ] && check_sdl_ttf
a7038d1a0513c8e804937ebc95fc9cb3a46c04f5Mark Andrews# TODO check for xcomposite-dev (X11/extensions/Xcomposite.h, additions only)
e007e3e5b0316c6c05698a71101885743aca22bdAutomatic Updater# TODO check for libxdamange-dev (X11/extensions/Xdamage.h, additions only)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington[ $WITH_PYTHON -eq 1 -a "$OS" != "darwin" ] && check_python
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Linux-specific
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cnf_append "VBOX_WITH_ADDITION_DRIVERS" ""
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater [ "$BUILD_MACHINE" = "amd64" ] && check_32bit
10640b2e3efc7bc8034108136d7487f7407fbf37Andreas Gustafsson# Darwin-specific
bf46736ab182c4663beb5a08cb2ebf7c364e0aa9Automatic Updaterecho "Successfully generated '$CNF' and '$ENV'."
9c446b72069d0ab9f710502f4d7048e50875fccbAutomatic Updaterecho "Source '$ENV' once before you start to build VBox:"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo "To compile the kernel module, do:"
f7369b2881b5e63d69600adcedc8ba938303d30cTinderbox User echo " cd $vbox_out_path/$OS.$TARGET_MACHINE/$BUILD_TYPE/bin/src/vboxdrv"
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater echo " Hardening is enabled which means that the VBox binaries will not run from"
e10d61d84e0b735f1e8eca18644cfdb1b06cad33Tinderbox User echo " the binary directory. The binaries have to be installed suid root and some"
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User echo " more prerequisites have to be fulfilled which is normally done by installing"
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User echo " the final package. For development, the hardening feature can be disabled"
e10d61d84e0b735f1e8eca18644cfdb1b06cad33Tinderbox User echo " by specifying the --disable-hardening parameter. Please never disable that"
1368e4b34cef64604c874fcc40201c78e548714cTinderbox User echo " feature for the final distribution!"
a01aa536188bb3535dfc1107a623e6355a8e6b7cMark Andrews echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
979e02d122cddf1624cca8a4dab8d084c900fa48Automatic Updater echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews echo " Hardening is disabled. Please do NOT build packages for distribution with"
572cb2c1c931f6bc6a4a019c103ae88239b0eb96Automatic Updater echo " disabled hardening!"
351eca011cf38fd3272b325029afce144a9a1ebaMark Andrews echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"