summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /configure
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-fb123f93f9f5ce42c8e5785d2f8e0edaf951740e.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure184
1 files changed, 169 insertions, 15 deletions
diff --git a/configure b/configure
index 4dfdfe8e..126e7829 100755
--- a/configure
+++ b/configure
@@ -3,7 +3,7 @@
# libraries VBox OSE depends on.
#
-# Copyright (C) 2006-2012 Oracle Corporation
+# Copyright (C) 2006-2013 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
@@ -43,7 +43,7 @@ which_wrapper()
fi
}
-OS=`uname -s | sed -e 's/GNU\/Linux/Linux/g' | tr [:upper:] [:lower:]`
+OS=`uname -s | sed -e 's/GNU\/Linux/Linux/g' | tr '[:upper:]' '[:lower:]'`
case "$OS" in
linux)
;;
@@ -54,6 +54,8 @@ case "$OS" in
sunos)
OS='solaris'
;;
+ haiku)
+ ;;
*)
echo "Cannot determine OS!"
exit 1
@@ -84,6 +86,7 @@ WITH_X11=1
WITH_ALSA=1
WITH_PULSE=1
WITH_DBUS=1
+WITH_DEVMAPPER=1
WITH_KMODS=1
WITH_OPENGL=1
WITH_HARDENING=1
@@ -92,9 +95,11 @@ WITH_VDE=0
WITH_VNC=0
WITH_EXTPACK=1
WITH_DOCS=1
+WITH_LIBVPX=1
BUILD_LIBXML2=
BUILD_LIBCURL=
BUILD_LIBSSL=
+BUILD_LIBVPX=
PASSIVE_MESA=0
CC="gcc"
CC32=""
@@ -125,6 +130,8 @@ INCZ=""
LIBZ="-lz"
INCVNCSERVER=""
LIBVNCSERVER="-lvncserver"
+INCDEVMAPPER=""
+LIBDEVMAPPER="-ldevmapper"
CXX_FLAGS=""
if [ "$OS" = "freebsd" ]; then
INCCURL="-I/usr/local/include"
@@ -139,6 +146,8 @@ else
INCPNG=""
LIBPNG="-lpng"
fi
+INCVPX=""
+LIBVPX="-lvpx"
PKGCONFIG="`which_wrapper pkg-config`"
PYTHONDIR="/usr /usr/local"
QT4DIR="/usr/lib/qt4 /usr/share/qt4 /usr/lib64/qt4 /usr /usr/local"
@@ -330,7 +339,7 @@ check_environment()
BUILD_CPU=`uname -m`
[ "$OS" = "solaris" ] && BUILD_CPU=`isainfo | cut -f 1 -d ' '`
case "$BUILD_CPU" in
- i[3456789]86|x86|i86pc)
+ i[3456789]86|x86|i86pc|BePC)
BUILD_MACHINE='x86'
LIB='lib'
;;
@@ -411,7 +420,7 @@ check_gcc()
elif [ $cc_maj -lt 3 \
-o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \
-o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \
- -o \( $cc_maj -eq 4 -a $cc_min -gt 7 \) \
+ -o \( $cc_maj -eq 4 -a $cc_min -gt 8 \) \
-o $cc_maj -gt 4 ]; then
log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 0<x<8"
fail really
@@ -571,7 +580,7 @@ check_iasl()
{
test_header iasl
if check_avail "$IASL" IASL; then
- iasl_ver=`$IASL|grep version|sed 's+^ASL.*version \([0-9]*\).*+\1+'`
+ iasl_ver=`$IASL|grep "ASL.*version"|sed 's+^ASL.*version \([0-9]*\).*+\1+'`
if [ $? -ne 0 ]; then
log_failure "iasl not found"
fail
@@ -588,6 +597,9 @@ check_iasl()
#
check_xsltproc()
{
+ if [ -n "$BUILD_LIBXSLT" ]; then
+ return 0;
+ fi
test_header xslt
if check_avail "$XSLTPROC" XSLTPROC; then
xsltproc_ver=`$XSLTPROC --version`
@@ -742,6 +754,58 @@ check_libidl()
#
+# Check for libdevmapper, needed by the VBoxVolInfo
+#
+check_libdevmapper()
+{
+ test_header libdevmapper
+ cat > $ODIR.tmp_src.cc << EOF
+#include <cstdio>
+extern "C" {
+#define private
+#include <libdevmapper.h>
+int main()
+{
+ char version[80];
+
+ if (!dm_get_library_version(version, sizeof(version)))
+ {
+ printf("dm_get_library_version() failed.\n");
+ return 1;
+ }
+
+ const char* v=version;
+ unsigned int major = 0, minor = 0, micro = 0;
+
+ for (; *v !='.' && *v != '\0'; v++) major = major*10 + *v-'0';
+ if (*v == '.') v++;
+ for (; *v !='.' && *v != '\0'; v++) minor = minor*10 + *v-'0';
+ if (*v == '.') v++;
+ for (; *v !='.' && *v != '\0'; v++) micro = micro*10 + *v-'0';
+
+ printf("found version %s", version);
+ if (major*10000 + minor*100 + micro >= 10200)
+ {
+ printf(", OK.\n");
+ return 0;
+ }
+ else
+ {
+ printf(", expected version 1.02 or higher\n");
+ return 1;
+ }
+}
+}
+EOF
+ if test_compile "$LIBDEVMAPPER $INCDEVMAPPER" libdevmapper libdevmapper; then
+ if test_execute; then
+ cnf_append "VBOX_WITH_DEVMAPPER" "1"
+ fi
+ fi
+}
+
+
+#
# Check for openssl, needed for RDP and S3
#
check_ssl()
@@ -835,7 +899,7 @@ EOF
[ -n "$INCZ" ] && I_INCZ=`prefix_I "$INCZ"`
if test_compile "$LIBZ $I_INCZ" zlib zlib; then
if test_execute; then
- echo "if1of (\$(KBUILD_TARGET),darwin freebsd linux solaris)" >> $CNF
+ echo "if1of (\$(KBUILD_TARGET),darwin freebsd haiku linux)" >> $CNF
cnf_append " SDK_VBOX_ZLIB_LIBS" "`strip_l "$LIBZ"`"
cnf_append " SDK_VBOX_ZLIB_INCS" "$INCZ"
echo "endif" >> $CNF
@@ -928,11 +992,11 @@ check_curl()
extern "C" int main(void)
{
printf("found version %s", LIBCURL_VERSION);
-#if 10000*LIBCURL_VERSION_MAJOR + 100*LIBCURL_VERSION_MINOR + LIBCURL_VERSION_PATCH >= 71601
+#if 10000*LIBCURL_VERSION_MAJOR + 100*LIBCURL_VERSION_MINOR + LIBCURL_VERSION_PATCH >= 71901
printf(", OK.\n");
return 0;
#else
- printf(", expected version 7.16.1 or higher\n");
+ printf(", expected version 7.19.1 or higher\n");
return 1;
#endif
}
@@ -1200,7 +1264,7 @@ EOF
#
-# Check for the Xcursor library, needed by VBoxSDL and VBoxBFE
+# Check for the Xcursor library, needed by VBoxSDL.
#
check_xcursor()
{
@@ -1564,6 +1628,54 @@ EOF
fi
}
+#
+# Check for libvpx
+#
+check_vpx()
+{
+ if [ -z "$BUILD_LIBVPX" ]; then
+ test_header libvpx
+ if which_wrapper pkg-config > /dev/null; then
+ libvpx_ver=`pkg-config vpx --modversion 2>> $LOG`
+ if [ $? -eq 0 ]; then
+ FLGVPX=`pkg-config vpx --cflags`
+ INCVPX=`strip_I "$FLGVPX"`
+ LIBVPX=`pkg-config vpx --libs`
+ fi
+ cat > $ODIR.tmp_src.cc << EOF
+#include <cstdio>
+#include <vpx/vpx_codec.h>
+extern "C" int main(void)
+{
+ int version = vpx_codec_version();
+ int verMajor = VPX_VERSION_MAJOR(version);
+ int verMinor = VPX_VERSION_MINOR(version);
+ int verPatch = VPX_VERSION_PATCH(version);
+ printf("found version %d.%d.%d", verMajor, verMinor, verPatch);
+ if ( verMajor == 1 && verMinor >= 0
+ || verMajor == 0 && verMinor == 9 && verPatch >= 5)
+ {
+ printf(", OK.\n");
+ return 0;
+ }
+ else
+ {
+ printf(", expected version 0.9.5 or higher\n");
+ return 1;
+ }
+}
+EOF
+ [ -n "$INCVPX" ] && I_INCVPX=`prefix_I "$INCVPX"`
+ if test_compile "$LIBVPX $I_INCVPX" vpx vpx; then
+ if test_execute; then
+ cnf_append "SDK_VBOX_VPX_INCS" "$INCVPX"
+ cnf_append "SDK_VBOX_VPX_LIBS" "`strip_l "$LIBVPX"`"
+ fi
+ fi
+ fi
+ fi
+}
+
#
# Check whether static libstdc++ is installed. This library is required
@@ -1614,7 +1726,8 @@ EOF
echo "compiling the following source file:" >> $LOG
cat $ODIR.tmp_src.c >> $LOG
echo "using the following command line:" >> $LOG
- echo "$CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include" >> $LOG
+ echo "$CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include " \
+ "-I$LINUX/include/generated/uapi" >> $LOG
$CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include \
-I$LINUX/include/generated/uapi >> $LOG 2>&1
if [ $? -ne 0 ]; then
@@ -1830,7 +1943,7 @@ EOF
fi
for p in $PYTHONDIR; do
for d in $SUPPYTHONLIBS; do
- for b in lib64 lib/64 lib; do
+ for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do
echo "compiling the following source file:" >> $LOG
cat $ODIR.tmp_src.cc >> $LOG
echo "using the following command line:" >> $LOG
@@ -2121,15 +2234,18 @@ EOF
[ $OSE -eq 1 ] && echo " --enable-vnc enable the VNC server"
[ $OSE -eq 0 ] && echo " --disable-extpack don't build the extpack"
[ $WITH_DOCS -eq 1 ] && echo " --disable-docs don't build the documentation"
+[ $WITH_LIBVPX -eq 1 ] && echo " --disable-libvpx don't use libvpx for video capturing"
[ "$OS" = "linux" -o "$OS" = "freebsd" ] && echo " --enable-vde enable VDE networking"
cat << EOF
--disable-udptunnel disable UDP tunnel networking
+ --disable-devmapper disable device mapper library access
--disable-hardening don't be strict about /dev/vboxdrv access
--build-libxml2 build libxml2 from sources
EOF
[ $OSE -eq 0 ] && cat << EOF
--build-libssl build openssl from sources
--build-libcurl build libcurl from sources
+ --build-libvpx build libvpx from sources
EOF
[ "$OS" != "darwin" ] && echo " --setup-wine setup a Wine directory and register the hhc hack"
cat << EOF
@@ -2184,7 +2300,29 @@ if [ "$OS" = "darwin" ]; then
WITH_DBUS=0
WITH_KMODS=0
BUILD_LIBXML2=1
+ BUILD_LIBVPX=1
[ $OSE -eq 1 ] || BUILD_LIBCURL=1
+ [ $OSE -eq 1 ] && WITH_LIBVPX=0
+elif [ "$OS" = "haiku" ]; then
+ #WITH_SDL=0
+ WITH_SDL_TTF=0
+ WITH_X11=0
+ WITH_ALSA=0
+ WITH_PULSE=0
+ WITH_DBUS=0
+ WITH_KMODS=0
+ WITH_LIBIDL=0
+ WITH_XPCOM=0
+ BUILD_LIBXSLT=1
+ BUILD_LIBXML2=1
+ WITH_LIBVPX=0
+ # it is part of libroot, which is linked by default,
+ # but the script wants something
+ LIBPTHREAD="-lroot"
+ #[ $OSE -eq 1 ] || BUILD_LIBCURL=1
+ [ $OSE -eq 1 ] || BUILD_LIBSSL=1
+elif [ "$OS" = "solaris" ]; then
+ [ $OSE -eq 1 ] && WITH_LIBVPX=0
fi
# scan command line options
@@ -2311,6 +2449,12 @@ for option in $*; do
--enable-vde)
WITH_VDE=1
;;
+ --disable-devmapper)
+ WITH_DEVMAPPER=0
+ ;;
+ --disable-libvpx)
+ WITH_LIBVPX=0
+ ;;
--build-debug|-d)
BUILD_TYPE=debug
;;
@@ -2326,6 +2470,9 @@ for option in $*; do
--build-libcurl)
BUILD_LIBCURL=1
;;
+ --build-libvpx)
+ BUILD_LIBVPX=1
+ ;;
--build-headless)
HEADLESS=1
WITH_SDL=0
@@ -2482,6 +2629,7 @@ fi
[ $WITH_HARDENING -eq 0 ] && cnf_append "VBOX_WITHOUT_HARDENING" "1"
[ $WITH_HARDENING -eq 2 ] && cnf_append "VBOX_WITH_HARDENING" "2"
[ $WITH_VMMRAW -eq 0 ] && cnf_append "VBOX_WITH_RAW_MODE" ""
+[ $WITH_LIBVPX -eq 0 ] && cnf_append "VBOX_WITH_VPX" ""
# Darwin-specific
if [ "$OS" = "darwin" ]; then
@@ -2502,6 +2650,7 @@ check_libxml2
[ $WITH_LIBIDL -eq 1 ] && check_libidl
check_ssl
check_curl
+[ $WITH_LIBVPX -eq 1 ] && check_vpx
[ "$OS" != "darwin" ] && check_z
[ "$OS" != "darwin" ] && check_png
[ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam
@@ -2547,6 +2696,11 @@ if [ "$OS" = "linux" ]; then
if [ $WITH_DBUS -eq 0 ]; then
cnf_append "VBOX_WITH_DBUS" ""
fi
+ if [ $WITH_DEVMAPPER -eq 1 ]; then
+ check_libdevmapper
+ else
+ cnf_append "VBOX_WITH_DEVMAPPER" ""
+ fi
check_libcap
check_compiler_h
[ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
@@ -2556,10 +2710,10 @@ fi
[ -n "$SETUP_WINE" ] && setup_wine
-if [ $OSE -ge 1 ]; then
- if [ $WITH_GSOAP -eq 1 ]; then
- check_gsoap
- else
+if [ $WITH_GSOAP -eq 1 ]; then
+ check_gsoap
+else
+ if [ $OSE -ge 1 ]; then
cnf_append "VBOX_WITH_WEBSERVICES" ""
fi
fi