configure revision 2e1ba50a9de3810b57f5c8e177482a6af0315e4e
1N/A# The purpose of this script is to check for all external tools, headers, and 1N/A# libraries VBox OSE depends on. 1N/A# Copyright (C) 2006 InnoTek Systemberatung GmbH 1N/A# This file is part of VirtualBox Open Source Edition (OSE), as 1N/A# you can redistribute it and/or modify it under the terms of the GNU 1N/A# General Public License as published by the Free Software Foundation, 1N/A# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE 1N/A# distribution. VirtualBox OSE is distributed in the hope that it will 1N/A# be useful, but WITHOUT ANY WARRANTY of any kind. 1N/A# If you received this file as part of a commercial VirtualBox 1N/A# distribution, then only the terms of your commercial VirtualBox 1N/A# license agreement apply instead of the previous paragraph. 1N/A# the restricting tool is ar (mri mode). 1N/A echo "Error: VBox base path contains invalid characters!" 1N/A if [ -n "$1" ]; then echo -n "$1, "; fi echo "***** Checking $1 *****" >> $LOG echo -n "Checking for $1: " echo "compiling the following source file:" >> $LOG echo "using the following command line:" >> $LOG echo -e "\n $2 not found at $1 or $3 headers not found" echo " Check the file $LOG for detailed error information." # Execute a compiled test binary echo "executing the binary" >> $LOG # Check for OS, MACHINE, CPU echo "Warning! Support for AMD64 host systems is work in progress." echo " Don't expect it to work or even to build at the moment." # Automatically disable XPCOM on darwin. echo "Disabling checks for XPCOM related components." # Check for gcc with version >= 3.2. # We depend on a working gcc, if we fail terminate in every case. if [ "$CC" != "gcc" ]; then if [ "$CXX" != "g++" ]; then # Check for the bcc compiler, needed for compiling the BIOS echo "compiling the following source file:" >> $LOG echo "using the following command line:" >> $LOG # Check for the as86 assembler, needed for compiling the BIOS # Check for yasm, needed to compile assembler files # Check for the iasl ACPI compiler, needed to compile vbox.dsl # Check for xsltproc, needed by Main # Check for mkisofs, needed to build the CDROM image containing the additions # Check for xalan, needed by VBoxXML extern "C" int main(void) printf("found version %d.%d.%d", XALAN_VERSION_MAJOR, XALAN_VERSION_MINOR, XALAN_VERSION_REVISION); #if _XALAN_VERSION >= 10800 printf(", expected version 1.8.0 or higher\n"); # Check for xerces, needed by VBoxXML extern "C" int main(void) printf("found version %d.%d.%d", XERCES_VERSION_MAJOR, XERCES_VERSION_MINOR, XERCES_VERSION_REVISION); #if _XERCES_VERSION >= 20500 printf(", expected version 2.5.0 or higher"); # Check for libIDL, needed by xpcom # Check for uuid, needed by Runtime, VBoxSVC, VBoxSDL, and VBoxBFE extern "C" int main(void) printf("uuid found but does not work\n"); # Check for openssl, needed for RDP extern "C" int main(void) printf("found version %s", OPENSSL_VERSION_TEXT); #if OPENSSL_VERSION_NUMBER >= 0x0090700 printf(", expected version 0.9.7 or higher\n"); # Check for pthread, needed by VBoxSVC, frontends, ... extern "C" int main(void) if (pthread_mutex_init(&mutex, NULL)) { printf("pthread_mutex_init() failed\n"); if (pthread_mutex_lock(&mutex)) { printf("pthread_mutex_lock() failed\n"); if (pthread_mutex_unlock(&mutex)) { printf("pthread_mutex_unlock() failed\n"); # Check for zlib, needed by VBoxSVC, Runtime, ... extern "C" int main(void) printf("found version %s", ZLIB_VERSION); #if ZLIB_VERNUM >= 0x1210 printf(", expected version 1.2.1 or higher\n"); # Check for libpng, needed by kchmviewer extern "C" int main(void) printf("found version %s", PNG_LIBPNG_VER_STRING); #if PNG_LIBPNG_VER >= 10205 printf(", expected version 1.2.5 or higher\n"); # Check for pam, needed by VRDPAuth # Version 79 was introduced in 9/2005, do we support older versions? # OpenSUSE comes with 0.99.xxx where they changed the versioning scheme. extern "C" int main(void) printf("found version %d", __LIBPAM_VERSION); if (__LIBPAM_VERSION >= 76) printf(", expected version 76 or higher\n"); extern "C" int main(void) printf("found version %d.%d", __LINUX_PAM__, __LINUX_PAM_MINOR__); printf(", expected version 1.0 or higher\n"); # Check for the SDL library, needed by VBoxSDL and VirtualBox # We depend at least on version 1.2.7 extern "C" int main(void) printf("found version %d.%d.%d", SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL); #if SDL_VERSION_ATLEAST(1,2,7) printf(", expected version 1.2.7 or higher\n"); # Check for the SDL_ttf library, needed by VBoxSDL (secure label) #ifndef SDL_TTF_MAJOR_VERSION #define SDL_TTF_MAJOR_VERSION TTF_MAJOR_VERSION #define SDL_TTF_MINOR_VERSION TTF_MINOR_VERSION #define SDL_TTF_PATCHLEVEL TTF_PATCHLEVEL extern "C" int main(void) printf("found version %d.%d.%d", SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, SDL_TTF_PATCHLEVEL); #if 10000*SDL_TTF_MAJOR_VERSION + 100*SDL_TTF_MINOR_VERSION + SDL_TTF_PATCHLEVEL >= 20006 printf(", expected version 2.0.6 or higher\n"); # Check for libasound, needed by the ALSA audio backend extern "C" int main(void) printf("found version %d.%d.%d", SND_LIB_MAJOR, SND_LIB_MINOR, SND_LIB_SUBMINOR); #if 10000*SND_LIB_MAJOR + 100*SND_LIB_MINOR + SND_LIB_SUBMINOR >= 10006 printf(", expected version 1.0.6 or higher\n"); # Check for the Xcursor library, needed by VBoxSDL and VBoxBFE extern "C" int main(void) XcursorImage *cursor = XcursorImageCreate (10, 10); XcursorImageDestroy(cursor); # Check for the X libraries (Xext, X11) extern "C" int main(void) dpy = XOpenDisplay(NULL); scrn_num = DefaultScreen(dpy); scrn = ScreenOfDisplay(dpy, scrn_num); win = XCreateWindow(dpy, RootWindowOfScreen(scrn), 0, 0, 100, 100, 0, 16, InputOutput, CopyFromParent, 0, NULL); XDestroyWindow(dpy, win); # Check for the QT library, needed by VirtualBox extern "C" int main(void) printf("found version %s", QT_VERSION_STR); #if QT_VERSION >= 0x030305 #elif QT_VERSION >= 0x030300 printf("\n ** WARNING: QT < 3.3.5 has known problems!\n"); printf(", expected version 3.3.0 or higher\n"); echo "compiling the following source file:" >> $LOG echo "using the following command line:" >> $LOG echo -e "\n Qt not found at \"$QTDIR\" or Qt headers not found" echo " Check the file $LOG for detailed error information." # Check for Linux sources int printf(const char *format, ...); printf("found version %d.%d.%d", LINUX_VERSION_CODE / 65536, (LINUX_VERSION_CODE % 65536) / 256, LINUX_VERSION_CODE % 256); #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0) printf(", expected version 2.4.0 or higher\n"); echo "compiling the following source file:" >> $LOG echo "using the following command line:" >> $LOG echo -e "\n Linux kernel headers not found at $LINUX" echo " Check the file $LOG for detailed error information." # Check for kchmviewer, needed to display the online help # Check for the kBuild tools, we don't support GNU make echo "export BUILD_PLATFORM=\"$OS\"" >> $ENV echo "export BUILD_TARGET=\"$OS\"" >> $ENV echo "export BUILD_TARGET_CPU=\"$CPU\"" >> $ENV echo "path_dev_bin=\"\$PATH_DEVTOOLS/\$BUILD_TARGET.\$BUILD_PLATFORM_ARCH\"/bin" >> $ENV echo "echo \"\$PATH\" | grep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV echo "echo \"\$PATH\" | grep -q \"\$path_dev_bin\" || PATH=\"\$path_dev_bin:\$PATH\"" >> $ENV echo "export PATH" >> $ENV echo "unset path_kbuild_bin path_dev_bin" >> $ENV # Some Linux distributions include "compiler.h" in their libc linux # headers package, some don't. Most don't need it, building might (!) # not succeed on openSUSE without it. Usage: ./configure [OPTIONS]... -h, --help display this help and exit --nofatal don't abort on errors --disable-xpcom disable XPCOM and related stuff --disable-sdl-ttf disable SDL_ttf detection --with-gcc=PATH position of the gcc compiler [$CC] --with-g++=PATH position of the g++ compiler [$CXX] --with-kbuild=DIR kbuild directory [$KBUILDDIR] --with-iasl=PATH the position of the iasl compiler [$IASL] --with-linux=DIR Linux kernel source directory [$LINUX] --with-mkisofs=PATH position of mkisofs [$MKISOFS] --with-qt-dir=DIR directory for QT headers/libraries [$QTDIR] --with-xalan=LIB position of the xalan library [$LIBXALAN] --with-xerces=LIB position of the xerces library [$LIBXERCES] -d, --build-debug build with debugging symbols and assertions # scan command line options echo "Error: KBUILDDIR contains invalid characters!" echo "Unrecognized option \"$option\"" # initialize output files # automatically generated by # It will be completely overwritten if configure is executed again. # automatically generated by # It will be completely overwritten if configure is executed again. # Make sure you source this file once before you start to build VBox. echo "Found USB devices, assuming VBOX_OSE = FALSE" >>
$LOG # first determine our environment # some things are not available in for OSE if [
"$OS" =
"linux" ];
then # emit disable directives corresponding to any --disable-xxx options. # append the tools directory to the default search path # append some extra paths # don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs # [ "$OS" != "darwin" ] && check_yasm echo "Successfully generated '$CNF' and '$ENV'." echo "Source '$ENV' once before you start to build VBox:" if [
"$OS" =
"linux" ];
then echo "To compile the kernel module, do:"