configure revision 8150219e9886a13f874183a8d243e1d35c5381e0
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# The purpose of this script is to check for all external tools, headers, and
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# libraries VBox OSE depends on.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Copyright (C) 2006-2009 Sun Microsystems, Inc.
e62b9c9ce6413fb183c8116381e75dcd07ca5517Tinderbox User# This file is part of VirtualBox Open Source Edition (OSE), as
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# available from http://www.virtualbox.org. This file is free software;
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# you can redistribute it and/or modify it under the terms of the GNU
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# General Public License (GPL) as published by the Free Software
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Foundation, in version 2 as it comes in the "COPYING" file of the
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Clara, CA 95054 USA or visit http://www.sun.com if you need
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# additional information or have any questions.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# append some extra paths
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Solaris (order of paths important for tr, echo, grep, sed to work)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserPATH="/usr/xpg4/bin:/usr/ucb:$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Wrapper for ancient /usr/bin/which on darwin that always returns 0
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if which /bin/___cErTaINly_a_nOn_eXisTing_fIle___ 2> /dev/null > /dev/null; then
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserOS=`uname -s | sed -e 's/GNU\/Linux/Linux/g' | tr [:upper:] [:lower:]`
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "Cannot determine OS!"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserLIBX11="-L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib -lXext -lX11"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserQT4DIR="/usr/lib/qt4 /usr/share/qt4 /usr/lib64/qt4 /usr /usr/local"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userif [ -d "/lib/modules/`uname -r`/build" ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# the restricting tool is ar (mri mode).
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userif (cd `dirname $0`; pwd)|grep -q "$INVALID_CHARS"; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "Error: VBox base path contains invalid characters!"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# darwin /bin/sh has a builtin echo that doesn't grok -n. gotta love it.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User rm -f $ODIR.tmp_src.cc $ODIR.tmp_src.c $ODIR.tmp_out $ODIR.test_execute.log
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "$1"|$KBUILD_SED 's|-l\([^ ]\+\)|\1|g; s|^-[^l][^ ]*||g; s| -[^l][^ ]*||g; s|^ ||; s| *$||g'
a179cbdf652095d00e7774320592f25eab0210d8Tinderbox User echo "$1"|$KBUILD_SED 's|-L\([^ ]\+\)|\1|g; s|^-[^L][^ ]*||g; s| -[^L][^ ]*||g; s|^ ||; s| *$||g'
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "$1"|$KBUILD_SED 's|-I\([^ ]\+\)|\1|g; s|^-[^I][^ ]*||g; s| -[^I][^ ]*||g; s|^ ||; s| *$||g'
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User echo "$1"|$KBUILD_SED 's|^\/|-I/|g; s| \/| -I/|g'
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User elif which_wrapper $1 > /dev/null; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Prepare a test
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Compile a test
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# $2 library name
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# $3 package name
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# $4 if this argument is 'nofatal', don't abort
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "compiling the following source file:" >> $LOG
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User echo "using the following command line:" >> $LOG
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User echo "$CXX $CXX_FLAGS -g -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc \"$1\"" >> $LOG
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User $CXX $CXX_FLAGS -g -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc $1 >> $LOG 2>&1
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User if [ $? -ne 0 ]; then
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User echo " $2 not found at $1 or $3 headers not found"
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User echo " Check the file $LOG for detailed error information."
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Execute a compiled test binary
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $rc -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Execute a compiled test binary
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "executing the binary (LD_LIBRARY_PATH=$1)" >> $LOG
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User LD_LIBRARY_PATH=$1 $ODIR.tmp_out > $ODIR.test_execute.log
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $rc -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Check for OS, MACHINE, CPU
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User [ "$OS" = "solaris" ] && BUILD_CPU=`isainfo | cut -f 1 -d ' '`
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User i[3456789]86|x86|i86pc)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # on AMD64 systems, 64bit libs are usually located in /usr/lib64
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # see http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # Solaris doesn't seem to subscribe to fhs, libs are usually in
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # a '64' subdirectory of the standard 'lib' dirs while some 64-bit
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # alternative binaries can be found in 'amd64' subdirs of the 'bin'
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # ones. So, in order to find the right stuff (esp. sdl-config) we'll
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # have to make sure the */bin/amd64 dirs are searched before the */bin
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # ones. (The sed has some sideeffects, but they shouldn't harm us...)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "64-bit Solaris detected, hacking the PATH" >> $LOG
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User PATH=`echo ":$PATH:" | sed -e 's,\(:[^:]*/bin\):,\1/amd64:\1:,g' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User [ -z "$TARGET_MACHINE" ] && TARGET_MACHINE=$BUILD_MACHINE
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User [ -z "$TARGET_CPU" ] && TARGET_CPU=$BUILD_CPU
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User log_success "Determined build machine: $OS.$BUILD_MACHINE, target machine: $OS.$TARGET_MACHINE"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "BUILD_PLATFORM_ARCH=\"$BUILD_MACHINE\"" >> $ENV
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "BUILD_TARGET_ARCH=\"$TARGET_MACHINE\"" >> $ENV
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "BUILD_TARGET_CPU=\"$TARGET_CPU\"" >> $ENV
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Check for gcc with version >= 3.2.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# We depend on a working gcc, if we fail terminate in every case.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User log_failure "cannot execute '$CC -dumpversion'"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User log_failure "cannot execute '$CXX -dumpversion'"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User log_failure "gcc version $cc_ver does not match g++ version $cxx_ver"
eadee66609d24bee478aa750cea3c8b3cc1e7579Tinderbox User elif [ $cc_maj -eq 4 -a $cc_min -eq 0 -a "$OS" = "darwin" ]; then
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -o \( $cc_maj -eq 4 -a $cc_min -gt 4 \) \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User -o $cc_maj -gt 4 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 0<x<4"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ "$BUILD_MACHINE" = "x86" -a "$TARGET_MACHINE" = "amd64" ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ "$TARGET_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ "$CC32" != "gcc -m32" -a "$CC32" != "undefined" ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ "$CXX32" != "g++ -m32" -a "$CXX32" != "undefined" ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User # this isn't not necessary, there is not such tool.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ "$OS" = "solaris" -a "$BUILD_MACHINE" = "amd64" ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Check for the bcc compiler, needed for compiling the BIOS
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User bcc_ver=`$BCC -v 2>&1|grep version|sed 's+^bcc: version \(.*\)+\1+'`
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "compiling the following source file:" >> $LOG
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "using the following command line:" >> $LOG
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo "$BCC -B $bcc_dir -C-c -3 -S -o $ODIR.tmp_out $ODIR.tmp_src.c" >> $LOG
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $BCC -B $bcc_dir -C-c -3 -S -o $ODIR.tmp_out $ODIR.tmp_src.c >> $LOG 2>&1
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User cnf_append "VBOX_BCC" "$bcc_path -B $bcc_dir"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Check for the as86 assembler, needed for compiling the BIOS
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User as86_ver=`$AS86 -v 2>&1|grep version|sed 's+^as86 version: \(.*\)+\1+'`
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User cnf_append "VBOX_AS86" "`which_wrapper $AS86`"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Check for yasm, needed to compile assembler files
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User yasm_ver=`$YASM --version|grep "^yasm"|sed 's+^yasm \(.*\)+\1+'`
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User yasm_ver_mul=`expr $yasm_maj \* 10000 + $yasm_min \* 100 + $yasm_rev`
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $yasm_ver_mul -lt 501 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User log_failure "found version $yasm_ver, expected at least 0.5.1"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Check for the iasl ACPI compiler, needed to compile vbox.dsl
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User iasl_ver=`$IASL|grep version|sed 's+^ASL.*version \([0-9]*\).*+\1+'`
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User cnf_append "VBOX_IASLCMD" "`which_wrapper $IASL`"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Check for xsltproc, needed by Main
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User cnf_append "VBOX_XSLTPROC" "`which_wrapper $XSLTPROC`"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Check for mkisofs, needed to build the CDROM image containing the additions
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if which_wrapper $GENISOIMAGE > /dev/null; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User cnf_append "VBOX_MKISOFS" "`which_wrapper $GENISOIMAGE`"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User cnf_append "VBOX_MKISOFS" "`which_wrapper $MKISOFS`"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Check for libxml2, needed by VBoxSettings and Runtime.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# 2.6.24 is known to NOT work, 2.6.26 is known to work (there is no 2.6.25 release)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if which_wrapper pkg-config > /dev/null; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User libxml2_ver=`pkg-config libxml-2.0 --modversion 2>> $LOG`
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#include <cstdio>
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#include <libxml/xmlversion.h>
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userextern "C" int main(void)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User printf("found version %s", LIBXML_DOTTED_VERSION);
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#if LIBXML_VERSION >= 20626
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User printf(", OK.\n");
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User printf(", expected version 2.6.26 or higher\n");
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"`
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if [ $? -ne 0 ]; then
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#include <cstdio>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#include <libxml/xmlversion.h>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userextern "C" int main(void)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User printf("found version %s", LIBXML_DOTTED_VERSION);
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#if LIBXML_VERSION >= 20626
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User printf(", OK.\n");
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User printf(", expected version 2.6.26 or higher\n");
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"`
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User log_failure "neither pkg-config nor xml2-config found"
if which_wrapper pkg-config > /dev/null; then
if [ $? -ne 0 ]; then
cat > $ODIR.tmp_src.cc << EOF
if test_execute; then
elif which_wrapper xslt-config; then
if [ $? -ne 0 ]; then
cat > $ODIR.tmp_src.cc << EOF
if test_execute; then
if which_wrapper libIDL-config-2 > /dev/null; then
if [ $? -ne 0 ]; then
if [ $? -ne 0 ]; then
cat > $ODIR.tmp_src.cc << EOF
if test_execute nofatal; then
cat > $ODIR.tmp_src.cc << EOF
if test_compile $LIBPTHREAD pthread pthread; then
if test_execute; then
cat > $ODIR.tmp_src.cc << EOF
if test_execute; then
cat > $ODIR.tmp_src.cc << EOF
if test_execute; then
cat > $ODIR.tmp_src.cc << EOF
if test_execute; then
# OpenSUSE comes with 0.99.xxx where they changed the versioning scheme.
cat > $ODIR.tmp_src.cc << EOF
if test_execute nofatal; then
cat > $ODIR.tmp_src.cc << EOF
foundsdl=1
if which_wrapper sdl-config > /dev/null; then
foundsdl=1
cat > $ODIR.tmp_src.cc << EOF
if test_execute; then
cat > $ODIR.tmp_src.cc << EOF
if ! test_execute nofatal; then
cat > $ODIR.tmp_src.cc << EOF
cat > $ODIR.tmp_src.cc << EOF
cat > $ODIR.tmp_src.cc << EOF
cat > $ODIR.tmp_src.cc << EOF
cat > $ODIR.tmp_src.cc << EOF
cat > $ODIR.tmp_src.cc << EOF
cat > $ODIR.tmp_src.cc << EOF
[ $PASSIVE_MESA -eq 1 ] && unset DISPLAY
for t in $QT_INTERNAL; do
foundqt4=1
if [ $QT4DIR_PKGCONFIG -eq 1 ]; then
if which_wrapper pkg-config > /dev/null; then
pkg-config QtCore --modversion 2>> $LOG`
if [ $? -ne 0 ]; then
foundqt4=1
cat > $ODIR.tmp_src.cc << EOF
foundqt4=2
foundqt4=1
cat > $ODIR.tmp_src.cc << EOF
if [ $? -ne 0 ]; then
if [ $? -ne 0 ]; then
cat > $ODIR.tmp_src.cc << EOF
cat > $ODIR.tmp_src.c << EOF
if [ $? -ne 0 ]; then
if test_execute; then
if [ $? -ne 0 ]; then
echo "echo \"\$PATH\" | /usr/sfw/bin/ggrep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV
echo "echo \"\$PATH\" | /usr/sfw/bin/ggrep -q \"\$path_dev_bin\" || PATH=\"\$path_dev_bin:\$PATH\"" >> $ENV
# Check for compiler.h
# Some Linux distributions include "compiler.h" in their libc linux
cat > $ODIR.tmp_src.cc << EOF
if test_compile $LIBCAP libcap libcap; then
if test_execute; then
cat > $ODIR.tmp_src.c << EOF
if [ $? -ne 0 ]; then
cat > $ODIR.tmp_src.cc << EOF
for p in $PYTHONDIR; do
for d in $SUPPYTHONLIBS; do
if [ $? -eq 0 ]; then
found=1
if test_execute; then
if ! which_wrapper wine > /dev/null; then
if ! which_wrapper wineprefixcreate > /dev/null; then
mkdir -p $WINEPREFIX
if ! wineprefixcreate -q > /dev/null 2>&1; then
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
# is around to prevent confusion when the build fails in src/recompiler.
# Note. Keep the which order in sync with the $(which ) in src/recompiler/Makefile.kmk.
cat << EOF
cat << EOF
cat << EOF
[ $WITH_GSOAP -eq 1 ] && echo " --with-gsoap-dir=PATH directory for gSOAP compiler/headers/libraries"
[ $WITH_GSOAP -eq 1 ] && echo " --with-gsoap-import=PATH directory for gSOAP import files (stlvector.h)"
cat << EOF
--nofatal)
--with-g++=*)
--ose)
--odir=*)
if [ -d $out_path ]; then
cd $out_path
cd $saved_path
echo "Unrecognized option \"$option\""
if [ -n "$NOT_OSE" ]; then
echo >> $LOG
export PATH
echo >> $CNF
if [ -n "$HEADLESS" ]; then
# TODO check for xcomposite-dev (X11/extensions/Xcomposite.h, additions only)
# TODO check for libxdamange-dev (X11/extensions/Xdamage.h, additions only)
echo "Source '$ENV' once before you start to build VBox:"
echo " source $ENV"
echo " cd $vbox_out_path/$OS.$TARGET_MACHINE/$BUILD_TYPE/bin/src"