configure revision d496c4d1ed30f10970ca2c170cd9b5921d8d89b1
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# The purpose of this script is to check for all external tools, headers, and
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# libraries VBox OSE depends on.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Copyright (C) 2006 InnoTek Systemberatung GmbH
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# This file is part of VirtualBox Open Source Edition (OSE), as
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# available from http://www.virtualbox.org. This file is free software;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# you can redistribute it and/or modify it under the terms of the GNU
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# General Public License as published by the Free Software Foundation,
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# distribution. VirtualBox OSE is distributed in the hope that it will
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# be useful, but WITHOUT ANY WARRANTY of any kind.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# If you received this file as part of a commercial VirtualBox
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# distribution, then only the terms of your commercial VirtualBox
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# license agreement apply instead of the previous paragraph.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Default positions
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# the restricting tool is ar (mri mode).
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterif (cd $(dirname $0); pwd)|grep -q "$INVALID_CHARS"; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo "Error: VBox base path contains invalid characters!"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster rm -f .tmp_src.cc .tmp_src.c .tmp_out .test_execute.log
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Wrapper for ancient /usr/bin/which on darwin that always returns 0
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if which /bin/___cErTaINly_a_nOn_eXisTing_fIle___ 2> /dev/null > /dev/null; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster elif which_wrapper $1 > /dev/null; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Prepare a test
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Compile a test
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo "compiling the following source file:" >> $LOG
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo "using the following command line:" >> $LOG
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc \"$1\"" >> $LOG
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster $CXX -O -Wall -o .tmp_out .tmp_src.cc $1 >> $LOG 2>&1
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo -e "\n $2 not found at $1 or $3 headers not found"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo " Check the file $LOG for detailed error information."
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Execute a compiled test binary
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for OS, MACHINE, CPU
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster i[3456789]86|x86)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo "Warning! Support for AMD64 host systems is work in progress."
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo " Don't expect it to work or even to build at the moment."
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster OS=`uname -s | sed -e 's/GNU\/Linux/Linux/g' | tr 'A-Z' 'a-z'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo "Disabling checks for XPCOM related components."
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for gcc with version >= 3.2.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# We depend on a working gcc, if we fail terminate in every case.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster log_failure "gcc version $cc_ver does not match g++ version $cxx_ver"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster log_success "found version $cc_ver, using precompiled objects for recompiler"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster log_failure "gcc version $cc_ver found, expected at least gcc version 3.2"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for the bcc compiler, needed for compiling the BIOS
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster bcc_ver=`$BCC -v 2>&1|grep version|sed 's+^bcc: version \(.*\)+\1+'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo "compiling the following source file:" >> $LOG
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo "using the following command line:" >> $LOG
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster echo "$BCC -B $bcc_dir -C-c -3 -S -o .tmp_out .tmp_src.c" >> $LOG
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster $BCC -B $bcc_dir -C-c -3 -S -o .tmp_out .tmp_src.c >> $LOG 2>&1
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for the as86 assembler, needed for compiling the BIOS
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster as86_ver=`$AS86 -v 2>&1|grep version|sed 's+^as86 version: \(.*\)+\1+'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for yasm, needed to compile assembler files
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster yasm_ver=`$YASM --version|grep "^yasm"|sed 's+^yasm \(.*\)+\1+'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster yasm_ver_mul=$(($yasm_maj*10000+$yasm_min*100+$yasm_rev))
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster log_failure "found version $yasm_ver, expected at least 0.5.1"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for the iasl ACPI compiler, needed to compile vbox.dsl
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster iasl_ver=`$IASL|grep version|sed 's+^ASL.*version \([0-9]*\).*+\1+'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "VBOX_IASLCMD" "`which_wrapper $IASL`"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for xsltproc, needed by Main
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "VBOX_XSLTPROC" "`which_wrapper $XSLTPROC`"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for mkisofs, needed to build the CDROM image containing the additions
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if which_wrapper $GENISOIMAGE > /dev/null; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "VBOX_MKISOFS" "`which_wrapper $GENISOIMAGE`"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "VBOX_MKISOFS" "`which_wrapper $MKISOFS`"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for xalan, needed by VBoxXML
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found version %d.%d.%d",
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster XALAN_VERSION_MAJOR, XALAN_VERSION_MINOR, XALAN_VERSION_REVISION);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#if _XALAN_VERSION >= 10800
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", expected version 1.8.0 or higher\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if test_compile "$LIBXALAN ${INCXALAN:+-I$INCXALAN}" xalan xalanc; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "SDK_VBOX_XALAN_LIBS" `echo $LIBXALAN|sed 's+-l++'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for xerces, needed by VBoxXML
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found version %d.%d.%d",
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster XERCES_VERSION_MAJOR, XERCES_VERSION_MINOR, XERCES_VERSION_REVISION);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#if _XERCES_VERSION >= 20500
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", expected version 2.5.0 or higher");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if test_compile "$LIBXERCES ${INCXERCES:+-I$INCXERCES}" xerces xercesc; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "SDK_VBOX_XERCES_LIBS" `echo $LIBXERCES|sed 's+-l++'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for libIDL, needed by xpcom
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if which_wrapper libIDL-config-2 > /dev/null; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster "PKG_CONFIG_PATH=`libIDL-config-2 --prefix`/lib/pkgconfig `which_wrapper libIDL-config-2`"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster elif check_avail "libIDL-config" libIDL-config; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "VBOX_LIBIDL_CONFIG" `which_wrapper libIDL-config`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for uuid, needed by Runtime, VBoxSVC, VBoxSDL, and VBoxBFE
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster uuid_clear(uu);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if (uuid_is_null(uu)) {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found, OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("uuid found but does not work\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "LIB_UUID" `echo $LIBUUID|sed 's+-l++'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for openssl, needed for RDP
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found version %s", OPENSSL_VERSION_TEXT);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#if OPENSSL_VERSION_NUMBER >= 0x0090700
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", expected version 0.9.7 or higher\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if test_compile $LIBCRYPTO libcrypto openssl; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "SDK_VBOX_OPENSSL_LIBS" `echo $LIBCRYPTO|sed 's+-l++'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for pthread, needed by VBoxSVC, frontends, ...
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster pthread_mutex_t mutex;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if (pthread_mutex_init(&mutex, NULL)) {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("pthread_mutex_init() failed\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if (pthread_mutex_lock(&mutex)) {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("pthread_mutex_lock() failed\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if (pthread_mutex_unlock(&mutex)) {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("pthread_mutex_unlock() failed\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found, OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if test_compile $LIBPTHREAD pthread pthread; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "LIB_PTHREAD" `echo $LIBPTHREAD|sed 's+-l++'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for zlib, needed by VBoxSVC, Runtime, ...
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found version %s", ZLIB_VERSION);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#if ZLIB_VERNUM >= 0x1210
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", expected version 1.2.1 or higher\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if test_compile "$LIBZ ${INCZ:+-I$INCZ}" zlib zlib; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "SDK_VBOX_ZLIB_LIBS" `echo $LIBZ|sed 's+-l++'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for libpng, needed by kchmviewer
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found version %s", PNG_LIBPNG_VER_STRING);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#if PNG_LIBPNG_VER >= 10205
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", expected version 1.2.5 or higher\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if test_compile "$LIBPNG ${INCPNG:+-I$INCPNG}" libpng libpng nofatal; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "SDK_VBOX_LIBPNG_LIBS" `echo $LIBPNG|sed 's+-l++'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for pam, needed by VRDPAuth
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Version 79 was introduced in 9/2005, do we support older versions?
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# OpenSUSE comes with 0.99.xxx where they changed the versioning scheme.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found version %d", __LIBPAM_VERSION);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if (__LIBPAM_VERSION >= 76)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", expected version 76 or higher\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found version %d.%d", __LINUX_PAM__, __LINUX_PAM_MINOR__);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if (__LINUX_PAM__ >= 1)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", expected version 1.0 or higher\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for the SDL library, needed by VBoxSDL and VirtualBox
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# We depend at least on version 1.2.7
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found version %d.%d.%d",
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#if SDL_VERSION_ATLEAST(1,2,7)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", expected version 1.2.7 or higher\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if test_compile "$LIBSDL $LIBSDLMAIN ${INCSDL:+-I$INCSDL}" SDL SDL; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "LIB_SDK_LIBSDL_SDL" `echo $LIBSDL|sed 's+-l++'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "LIB_SDK_LIBSDL_SDLMAIN" `echo $LIBSDLMAIN|sed 's+-l++'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster [ -n "$INCSDL" ] && cnf_append "SDK_LIBSDL_INCS" "$INCSDL"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for the SDL_ttf library, needed by VBoxSDL (secure label)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#ifndef SDL_TTF_MAJOR_VERSION
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#define SDL_TTF_MAJOR_VERSION TTF_MAJOR_VERSION
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#define SDL_TTF_MINOR_VERSION TTF_MINOR_VERSION
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#define SDL_TTF_PATCHLEVEL TTF_PATCHLEVEL
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found version %d.%d.%d",
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, SDL_TTF_PATCHLEVEL);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#if 10000*SDL_TTF_MAJOR_VERSION + 100*SDL_TTF_MINOR_VERSION + SDL_TTF_PATCHLEVEL >= 20006
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", expected version 2.0.6 or higher\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if test_compile "-lSDL_ttf" SDL_ttf SDL_ttf; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for libasound, needed by the ALSA audio backend
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf("found version %d.%d.%d",
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster SND_LIB_MAJOR, SND_LIB_MINOR, SND_LIB_SUBMINOR);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#if 10000*SND_LIB_MAJOR + 100*SND_LIB_MINOR + SND_LIB_SUBMINOR >= 10008
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", OK.\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster printf(", expected version 1.0.8 or higher\n");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for the Xcursor library, needed by VBoxSDL and VBoxBFE
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster XcursorImage *cursor = XcursorImageCreate (10, 10);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster XcursorImageDestroy(cursor);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster if test_compile "$LIBX11 $LIBXCURSOR" Xcursor Xcursor; then
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster cnf_append "LIB_XCURSOR" `echo $LIBXCURSOR|sed 's+-l++'`
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster# Check for the X libraries (Xext, X11)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster#include <cstdio>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterextern "C" int main(void)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Display *dpy;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster int scrn_num;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Screen *scrn;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster dpy = XOpenDisplay(NULL);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster scrn_num = DefaultScreen(dpy);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster scrn = ScreenOfDisplay(dpy, scrn_num);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster win = XCreateWindow(dpy, RootWindowOfScreen(scrn), 0, 0, 100, 100,
#include <qglobal.h>
found_qt=0
cat .tmp_src.cc >> $LOG
if test_execute; then
found_qt=1
cat .tmp_src.c >> $LOG
if test_execute; then
cat << EOF
for option; do
--nofatal)
--with-g++=*)
--ose)
--odir=*)
echo "Unrecognized option \"$option\""
echo >> $LOG
echo >> $CNF
echo "Source '$ENV' once before you start to build VBox:"
echo " source $ENV"