VirtualBox

source: vbox/trunk/configure@ 28449

Last change on this file since 28449 was 28419, checked in by vboxsync, 15 years ago

configure: add --enable-vde

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 65.3 KB
Line 
1#!/bin/sh
2# The purpose of this script is to check for all external tools, headers, and
3# libraries VBox OSE depends on.
4
5#
6# Copyright (C) 2006-2009 Sun Microsystems, Inc.
7#
8# This file is part of VirtualBox Open Source Edition (OSE), as
9# available from http://www.virtualbox.org. This file is free software;
10# you can redistribute it and/or modify it under the terms of the GNU
11# General Public License (GPL) as published by the Free Software
12# Foundation, in version 2 as it comes in the "COPYING" file of the
13# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15#
16# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
17# Clara, CA 95054 USA or visit http://www.sun.com if you need
18# additional information or have any questions.
19#
20
21LC_ALL=C
22export LC_ALL
23
24# append some extra paths
25PATH="$PATH:/opt/gnome/bin"
26# Solaris (order of paths important for tr, echo, grep, sed to work)
27PATH="/usr/xpg4/bin:/usr/ucb:$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin"
28ORGPATH=$PATH
29
30# Wrapper for ancient /usr/bin/which on darwin that always returns 0
31which_wrapper()
32{
33 if [ -z "$have_ancient_which" ]; then
34 if which /bin/___cErTaINly_a_nOn_eXisTing_fIle___ 2> /dev/null > /dev/null; then
35 have_ancient_which="yes"
36 else
37 have_ancient_which="no"
38 fi
39 fi
40 if [ "$have_ancient_which" = "yes" ]; then
41 retval=`which $* 2>/dev/null`
42 echo "$retval"
43 test -n "$retval" -a -x "$retval"
44 unset retval
45 else
46 which $* 2> /dev/null
47 fi
48}
49
50OS=`uname -s | sed -e 's/GNU\/Linux/Linux/g' | tr [:upper:] [:lower:]`
51case "$OS" in
52 linux)
53 ;;
54 darwin)
55 ;;
56 freebsd)
57 ;;
58 sunos)
59 OS='solaris'
60 ;;
61 *)
62 echo "Cannot determine OS!"
63 exit 1
64 ;;
65esac
66
67#
68# Defaults
69#
70OSE=1
71ODIR="`pwd`/"
72ODIR_OVERRIDE=0
73OUT_PATH=""
74OUT_PATH_OVERRIDE=0
75SETUP_WINE=
76TARGET_MACHINE=""
77TARGET_CPU=""
78WITH_XPCOM=1
79WITH_PYTHON=1
80WITH_VMMRAW=1
81WITH_LIBIDL=1
82WITH_GSOAP=0
83WITH_QT4=1
84WITH_SDL=1
85WITH_SDL_TTF=1
86WITH_X11=1
87WITH_ALSA=1
88WITH_PULSE=1
89WITH_DBUS=1
90WITH_KMODS=1
91WITH_OPENGL=1
92WITH_HARDENING=1
93WITH_VDE=
94BUILD_LIBXML2=
95BUILD_LIBXSLT=
96BUILD_LIBCURL=
97BUILD_LIBSSL=
98PASSIVE_MESA=0
99CC="gcc"
100CC32=""
101CC64=""
102CXX="g++"
103CXX32=""
104CXX64=""
105BCC="bcc"
106YASM="yasm"
107IASL="iasl"
108AS86="as86"
109XSLTPROC="xsltproc"
110GENISOIMAGE="genisoimage"
111MKISOFS="mkisofs"
112INCCRYPTO=""
113LIBCRYPTO="-lcrypto"
114LIBPTHREAD="-lpthread"
115LIBCAP="-lcap"
116GSOAP=""
117GSOAP_IMPORT=""
118INCX11="/usr/local/include"
119LIBX11="-L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib -lXext -lX11"
120LIBXCURSOR="-lXcursor"
121LIBXMU="-lXmu"
122LIBXINERAMA="-lXinerama"
123LIBXRANDR="-lXrandr"
124MESA="-lGL"
125INCZ=""
126LIBZ="-lz"
127INCPNG=""
128LIBPNG="-lpng"
129CXX_FLAGS=""
130if [ "$OS" = "freebsd" ]; then
131 INCCURL="-I/usr/local/include"
132 LIBCURL="-L/usr/local/lib -lcurl"
133 INCPULSE="-I/usr/local/include"
134 LIBPULSE="-L/usr/local/lib"
135else
136 INCCURL=""
137 LIBCURL="-lcurl"
138fi
139PKGCONFIG="`which_wrapper pkg-config`"
140PYTHONDIR="/usr /usr/local"
141QT4DIR="/usr/lib/qt4 /usr/share/qt4 /usr/lib64/qt4 /usr /usr/local"
142QT4DIR_PKGCONFIG=1
143QT4UIC3DIR="/usr/bin"
144KBUILDDIR="`cd \`dirname $0\`; pwd`/kBuild"
145DEVDIR="`cd \`dirname $0\`; pwd`/tools"
146if [ -d "/lib/modules/`uname -r`/build" ]; then
147 LINUX="/lib/modules/`uname -r`/build"
148else
149 LINUX="/usr/src/linux"
150fi
151KCHMVIEWER="kchmviewer"
152LOG="configure.log"
153CNF="AutoConfig.kmk"
154ENV="env.sh"
155BUILD_TYPE="release"
156# the restricting tool is ar (mri mode).
157INVALID_CHARS="[^A-Za-z0-9/\\$:._-]"
158
159if (cd `dirname $0`; pwd)|grep -q "$INVALID_CHARS"; then
160 echo "Error: VBox base path contains invalid characters!"
161 exit 1
162fi
163
164# darwin /bin/sh has a builtin echo that doesn't grok -n. gotta love it.
165if [ "$OS" = "darwin" ]; then
166 ECHO_N="/bin/echo -n"
167else
168 ECHO_N="echo -n"
169fi
170
171
172cleanup()
173{
174 rm -f $ODIR.tmp_src.cc $ODIR.tmp_src.c $ODIR.tmp_out $ODIR.test_execute.log
175}
176
177fail()
178{
179 if [ -z "$nofatal" -o "x$1" != "x" ]; then
180 cleanup
181 rm -f $ENV
182 exit 1
183 fi
184}
185
186log()
187{
188 echo "$1"
189 echo "$1" >> $LOG
190}
191
192log_success()
193{
194 if [ -n "$1" ]; then $ECHO_N "$1, "; fi
195 echo "OK."
196 echo "$1" >> $LOG
197 echo >> $LOG
198 echo >> $LOG
199}
200
201log_failure()
202{
203 echo
204 echo " ** $1!"
205 echo "** $1!" >> $LOG
206 echo >> $LOG
207}
208
209cnf_append()
210{
211 printf "%-30s := %s\n" "$1" "$2" >> $CNF
212}
213
214strip_l()
215{
216 echo "$1"|$KBUILD_SED 's|-l\([^ ]\+\)|\1|g; s|^-[^l][^ ]*||g; s| -[^l][^ ]*||g; s|^ ||; s| *$||g'
217}
218
219strip_L()
220{
221 echo "$1"|$KBUILD_SED 's|-L\([^ ]\+\)|\1|g; s|^-[^L][^ ]*||g; s| -[^L][^ ]*||g; s|^ ||; s| *$||g'
222}
223
224strip_I()
225{
226 echo "$1"|$KBUILD_SED 's|-I\([^ ]\+\)|\1|g; s|^-[^I][^ ]*||g; s| -[^I][^ ]*||g; s|^ ||; s| *$||g'
227}
228
229prefix_I()
230{
231 echo "$1"|$KBUILD_SED 's|^\/|-I/|g; s| \/| -I/|g'
232}
233
234check_avail()
235{
236 if [ -z "$1" ]; then
237 log_failure "$2 is empty"
238 fail $3
239 return 1
240 elif which_wrapper $1 > /dev/null; then
241 return 0
242 else
243 log_failure "$1 (variable $2) not found"
244 fail $3
245 return 1
246 fi
247}
248
249
250# Prepare a test
251test_header()
252{
253 echo "***** Checking $1 *****" >> $LOG
254 $ECHO_N "Checking for $1: "
255}
256
257
258# Compile a test
259# $1 compile flags/libs
260# $2 library name
261# $3 package name
262# $4 if this argument is 'nofatal', don't abort
263test_compile()
264{
265 echo "compiling the following source file:" >> $LOG
266 cat $ODIR.tmp_src.cc >> $LOG
267 echo "using the following command line:" >> $LOG
268 echo "$CXX $CXX_FLAGS -g -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc \"$1\"" >> $LOG
269 $CXX $CXX_FLAGS -g -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc $1 >> $LOG 2>&1
270 if [ $? -ne 0 ]; then
271 if [ -z "$4" ]; then
272 echo
273 echo " $2 not found at $1 or $3 headers not found"
274 echo " Check the file $LOG for detailed error information."
275 fail
276 else
277 echo >> $LOG
278 echo >> $LOG
279 fi
280 return 1
281 fi
282 return 0
283}
284
285
286# Execute a compiled test binary
287test_execute()
288{
289 echo "executing the binary" >> $LOG
290 $ODIR.tmp_out > $ODIR.test_execute.log
291 rc=$?
292 cat $ODIR.test_execute.log | tee -a $LOG
293 if [ $rc -ne 0 ]; then
294 fail $1
295 return 1
296 fi
297 echo >> $LOG
298 echo >> $LOG
299 return 0
300}
301
302
303# Execute a compiled test binary
304test_execute_path()
305{
306 echo "executing the binary (LD_LIBRARY_PATH=$1)" >> $LOG
307 LD_LIBRARY_PATH=$1 $ODIR.tmp_out > $ODIR.test_execute.log
308 rc=$?
309 cat $ODIR.test_execute.log | tee -a $LOG
310 if [ $rc -ne 0 ]; then
311 fail
312 return 1
313 fi
314 echo >> $LOG
315 echo >> $LOG
316 return 0
317}
318
319
320#
321# Check for OS, MACHINE, CPU
322#
323check_environment()
324{
325 test_header environment
326 BUILD_CPU=`uname -m`
327 [ "$OS" = "solaris" ] && BUILD_CPU=`isainfo | cut -f 1 -d ' '`
328 case "$BUILD_CPU" in
329 i[3456789]86|x86|i86pc)
330 BUILD_MACHINE='x86'
331 LIB='lib'
332 ;;
333 x86_64|amd64)
334 BUILD_MACHINE='amd64'
335 BUILD_CPU='k8'
336 if [ "$OS" != "solaris" ]; then
337 # on AMD64 systems, 64bit libs are usually located in /usr/lib64
338 # see http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64
339 LIB='lib64'
340 else
341 # Solaris doesn't seem to subscribe to fhs, libs are usually in
342 # a '64' subdirectory of the standard 'lib' dirs while some 64-bit
343 # alternative binaries can be found in 'amd64' subdirs of the 'bin'
344 # ones. So, in order to find the right stuff (esp. sdl-config) we'll
345 # have to make sure the */bin/amd64 dirs are searched before the */bin
346 # ones. (The sed has some sideeffects, but they shouldn't harm us...)
347 echo "64-bit Solaris detected, hacking the PATH" >> $LOG
348 echo "old PATH: $PATH" >> $LOG
349 PATH=`echo ":$PATH:" | sed -e 's,\(:[^:]*/bin\):,\1/amd64:\1:,g' \
350 -e 's/^:*//' -e 's/:*$//g' -e 's/::*/:/g' `
351 export PATH
352 echo "new PATH: $PATH" >> $LOG
353 LIB='lib/64'
354 fi
355 ;;
356 *)
357 log_failure "Cannot determine system"
358 exit 1
359 ;;
360 esac
361 [ -z "$TARGET_MACHINE" ] && TARGET_MACHINE=$BUILD_MACHINE
362 [ -z "$TARGET_CPU" ] && TARGET_CPU=$BUILD_CPU
363 DEVDIR_BIN="$DEVDIR/$OS.$BUILD_MACHINE/bin"
364 log_success "Determined build machine: $OS.$BUILD_MACHINE, target machine: $OS.$TARGET_MACHINE"
365
366 echo "BUILD_PLATFORM=\"$OS\"" >> $ENV
367 echo "export BUILD_PLATFORM" >> $ENV
368 echo "BUILD_PLATFORM_ARCH=\"$BUILD_MACHINE\"" >> $ENV
369 echo "export BUILD_PLATFORM_ARCH" >> $ENV
370 echo "BUILD_TARGET=\"$OS\"" >> $ENV
371 echo "export BUILD_TARGET" >> $ENV
372 echo "BUILD_TARGET_ARCH=\"$TARGET_MACHINE\"" >> $ENV
373 echo "export BUILD_TARGET_ARCH" >> $ENV
374 echo "BUILD_TARGET_CPU=\"$TARGET_CPU\"" >> $ENV
375 echo "export BUILD_TARGET_CPU" >> $ENV
376 echo "BUILD_TYPE=\"$BUILD_TYPE\"" >> $ENV
377 echo "export BUILD_TYPE" >> $ENV
378}
379
380#
381# Check for gcc with version >= 3.2.
382# We depend on a working gcc, if we fail terminate in every case.
383#
384check_gcc()
385{
386 test_header gcc
387 if check_avail "$CC" CC really; then
388 cc_ver=`$CC -dumpversion` 2>/dev/null
389 if [ $? -ne 0 ]; then
390 log_failure "cannot execute '$CC -dumpversion'"
391 fail really
392 fi
393 if check_avail "$CXX" CXX really; then
394 cxx_ver=`$CXX -dumpversion` 2>/dev/null
395 if [ $? -ne 0 ]; then
396 log_failure "cannot execute '$CXX -dumpversion'"
397 fail really
398 fi
399 cc_maj=`echo $cc_ver|cut -d. -f1`
400 cc_min=`echo $cc_ver|cut -d. -f2`
401 if [ "x$cc_ver" != "x$cxx_ver" ]; then
402 log_failure "gcc version $cc_ver does not match g++ version $cxx_ver"
403 fail really
404 elif [ $cc_maj -eq 4 -a $cc_min -eq 0 -a "$OS" = "darwin" ]; then
405 log_success "found version $cc_ver"
406 # gcc-4.0 is allowed for Darwin only
407 elif [ $cc_maj -lt 3 \
408 -o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \
409 -o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \
410 -o \( $cc_maj -eq 4 -a $cc_min -gt 5 \) \
411 -o $cc_maj -gt 4 ]; then
412 log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 0<x<5"
413 fail really
414 else
415 log_success "found version $cc_ver"
416 fi
417 if [ "$BUILD_MACHINE" = "amd64" ]; then
418 [ -z "$CC32" ] && CC32="$CC -m32"
419 [ -z "$CXX32" ] && CXX32="$CXX -m32"
420 else
421 [ -z "$CC32" ] && CC32="$CC"
422 [ -z "$CXX32" ] && CXX32="$CXX"
423 fi
424 if [ "$BUILD_MACHINE" = "x86" -a "$TARGET_MACHINE" = "amd64" ]; then
425 [ -z "$CC64" ] && CC64="$CC -m64"
426 [ -z "$CXX64" ] && CXX64="$CXX -m64"
427 fi
428 if [ "$TARGET_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 0 ]; then
429 CC32="undefined"
430 CXX32="undefined"
431 fi
432 if [ "$CC" != "gcc" ]; then
433 cnf_append "TOOL_GCC3_CC" "$CC"
434 cnf_append "TOOL_GCC3_AS" "$CC"
435 cnf_append "TOOL_GCC3_LD" "$CC"
436 cnf_append "TOOL_GXX3_CC" "$CC"
437 cnf_append "TOOL_GXX3_AS" "$CC"
438 fi
439 if [ "$CXX" != "g++" ]; then
440 cnf_append "TOOL_GCC3_CXX" "$CXX"
441 cnf_append "TOOL_GXX3_CXX" "$CXX"
442 cnf_append "TOOL_GXX3_LD" "$CXX"
443 fi
444 if [ "$CC32" != "gcc -m32" -a "$CC32" != "undefined" ]; then
445 cnf_append "TOOL_GCC32_CC" "$CC32"
446 cnf_append "TOOL_GCC32_AS" "$CC32"
447 cnf_append "TOOL_GCC32_LD" "$CC32"
448 cnf_append "TOOL_GXX32_CC" "$CC32"
449 cnf_append "TOOL_GXX32_AS" "$CC32"
450 fi
451 if [ "$CXX32" != "g++ -m32" -a "$CXX32" != "undefined" ]; then
452 cnf_append "TOOL_GCC32_CXX" "$CXX32"
453 cnf_append "TOOL_GXX32_CXX" "$CXX32"
454 cnf_append "TOOL_GXX32_LD" "$CXX32"
455 fi
456 # this isn't not necessary, there is not such tool.
457 if [ -n "$CC64" ]; then
458 cnf_append "TOOL_GCC64_CC" "$CC64"
459 cnf_append "TOOL_GCC64_AS" "$CC64"
460 cnf_append "TOOL_GCC64_LD" "$CC64"
461 cnf_append "TOOL_GXX64_CC" "$CC64"
462 cnf_append "TOOL_GXX64_AS" "$CC64"
463 fi
464 if [ -n "$CXX64" ]; then
465 cnf_append "TOOL_GCC64_CXX" "$CXX64"
466 cnf_append "TOOL_GXX64_CXX" "$CXX64"
467 cnf_append "TOOL_GXX64_LD" "$CXX64"
468 fi
469 # Solaris sports a 32-bit gcc/g++.
470 if [ "$OS" = "solaris" -a "$BUILD_MACHINE" = "amd64" ]; then
471 [ "$CC" = "gcc" ] && CC="gcc -m64"
472 [ "$CXX" = "g++" ] && CXX="g++ -m64"
473 fi
474 fi
475 fi
476}
477
478
479#
480# Check for the bcc compiler, needed for compiling the BIOS
481#
482check_bcc()
483{
484 test_header bcc
485 if check_avail "$BCC" BCC; then
486 bcc_ver=`$BCC -v 2>&1|grep version|sed 's+^bcc: version \(.*\)+\1+'`
487 if [ $? -ne 0 ]; then
488 log_failure "not found"
489 fail
490 else
491 echo "compiling the following source file:" >> $LOG
492 cat > $ODIR.tmp_src.c << EOF
493int foo(a)
494 int a;
495{
496 return 0;
497}
498EOF
499 cat $ODIR.tmp_src.c >> $LOG
500 bcc_path=`which_wrapper $BCC`
501 bcc_dir="`dirname $bcc_path`/"
502 echo "using the following command line:" >> $LOG
503 echo "$BCC -B $bcc_dir -C-c -3 -S -o $ODIR.tmp_out $ODIR.tmp_src.c" >> $LOG
504 $BCC -B $bcc_dir -C-c -3 -S -o $ODIR.tmp_out $ODIR.tmp_src.c >> $LOG 2>&1
505 if [ $? -ne 0 ]; then
506 log_failure "not found"
507 fail
508 else
509 log_success "found version $bcc_ver"
510 cnf_append "VBOX_BCC" "$bcc_path -B $bcc_dir"
511 fi
512 unset bcc_path
513 unset bcc_dir
514 fi
515 fi
516}
517
518
519#
520# Check for the as86 assembler, needed for compiling the BIOS
521#
522check_as86()
523{
524 test_header as86
525 if check_avail "$AS86" AS86; then
526 as86_ver=`$AS86 -v 2>&1|grep version|sed 's+^as86 version: \(.*\)+\1+'`
527 if [ $? -ne 0 ]; then
528 log_failure "not found"
529 fail
530 else
531 log_success "found version $as86_ver"
532 cnf_append "VBOX_AS86" "`which_wrapper $AS86`"
533 fi
534 fi
535}
536
537
538#
539# Check for yasm, needed to compile assembler files
540#
541check_yasm()
542{
543 test_header yasm
544 if check_avail "$YASM" YASM; then
545 yasm_ver=`$YASM --version|grep "^yasm"|sed 's+^yasm \(.*\)+\1+'`
546 if [ $? -ne 0 ]; then
547 log_failure "not found"
548 fail
549 else
550 yasm_maj=`echo $yasm_ver|cut -d. -f1`
551 yasm_min=`echo $yasm_ver|cut -d. -f2`
552 yasm_rev=`echo $yasm_ver|cut -d. -f3`
553 yasm_ver_mul=`expr $yasm_maj \* 10000 + $yasm_min \* 100 + $yasm_rev`
554 if [ $yasm_ver_mul -lt 501 ]; then
555 log_failure "found version $yasm_ver, expected at least 0.5.1"
556 fail
557 else
558 log_success "found version $yasm_ver"
559 fi
560 fi
561 fi
562}
563
564
565#
566# Check for the iasl ACPI compiler, needed to compile vbox.dsl
567#
568check_iasl()
569{
570 test_header iasl
571 if check_avail "$IASL" IASL; then
572 iasl_ver=`$IASL|grep version|sed 's+^ASL.*version \([0-9]*\).*+\1+'`
573 if [ $? -ne 0 ]; then
574 log_failure "not found"
575 fail
576 else
577 log_success "found version $iasl_ver"
578 cnf_append "VBOX_IASLCMD" "`which_wrapper $IASL`"
579 fi
580 fi
581}
582
583
584#
585# Check for xsltproc, needed by Main
586#
587check_xsltproc()
588{
589 test_header xslt
590 if check_avail "$XSLTPROC" XSLTPROC; then
591 xsltproc_ver=`$XSLTPROC --version`
592 if [ $? -ne 0 ]; then
593 log_failure "not found"
594 fail
595 else
596 log_success "found"
597 cnf_append "VBOX_XSLTPROC" "`which_wrapper $XSLTPROC`"
598 fi
599 fi
600}
601
602
603#
604# Check for mkisofs, needed to build the CDROM image containing the additions
605#
606check_mkisofs()
607{
608 test_header mkisofs
609 if which_wrapper $GENISOIMAGE > /dev/null; then
610 mkisofs_ver=`$GENISOIMAGE --version`
611 if [ $? -ne 0 ]; then
612 log_failure "not found"
613 fail
614 else
615 log_success "found $mkisofs_ver"
616 cnf_append "VBOX_MKISOFS" "`which_wrapper $GENISOIMAGE`"
617 fi
618 elif check_avail "$MKISOFS" MKISOFS; then
619 mkisofs_ver=`$MKISOFS --version`
620 if [ $? -ne 0 ]; then
621 log_failure "not found"
622 fail
623 else
624 log_success "found $mkisofs_ver"
625 cnf_append "VBOX_MKISOFS" "`which_wrapper $MKISOFS`"
626 fi
627 fi
628}
629
630
631#
632# Check for libxml2, needed by VBoxSettings and Runtime.
633# 2.6.24 is known to NOT work, 2.6.26 is known to work (there is no 2.6.25 release)
634#
635check_libxml2()
636{
637 if [ -z "$BUILD_LIBXML2" ]; then
638 test_header libxml2
639 if which_wrapper pkg-config > /dev/null; then
640 libxml2_ver=`pkg-config libxml-2.0 --modversion 2>> $LOG`
641 if [ $? -ne 0 ]; then
642 log_failure "not found"
643 fail
644 else
645 FLGXML2=`pkg-config libxml-2.0 --cflags`
646 INCXML2=`strip_I "$FLGXML2"`
647 LIBXML2=`pkg-config libxml-2.0 --libs`
648 cat > $ODIR.tmp_src.cc << EOF
649#include <cstdio>
650#include <libxml/xmlversion.h>
651extern "C" int main(void)
652{
653 printf("found version %s", LIBXML_DOTTED_VERSION);
654#if LIBXML_VERSION >= 20626
655 printf(", OK.\n");
656 return 0;
657#else
658 printf(", expected version 2.6.26 or higher\n");
659 return 1;
660#endif
661}
662EOF
663 [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"`
664 if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then
665 if test_execute; then
666 cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2"
667 cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`"
668 fi
669 fi
670 fi
671 elif which_wrapper xml2-config; then
672 libxml2_ver=`xml2-config --version`
673 if [ $? -ne 0 ]; then
674 log_failure "not found"
675 fail
676 else
677 log_success "found version $libxml2_ver"
678 FLGXML2=`xml2-config --cflags`
679 INCXML2=`strip_I "$FLGXML2"`
680 LIBXML2=`xml2-config --libs`
681 cat > $ODIR.tmp_src.cc << EOF
682#include <cstdio>
683#include <libxml/xmlversion.h>
684extern "C" int main(void)
685{
686 printf("found version %s", LIBXML_DOTTED_VERSION);
687#if LIBXML_VERSION >= 20626
688 printf(", OK.\n");
689 return 0;
690#else
691 printf(", expected version 2.6.26 or higher\n");
692 return 1;
693#endif
694}
695EOF
696 [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"`
697 if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then
698 if test_execute; then
699 cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2"
700 cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`"
701 fi
702 fi
703 fi
704 else
705 log_failure "neither pkg-config nor xml2-config found"
706 fail
707 fi
708 fi
709}
710
711
712#
713# Check for libxslt, needed by VBoxSettings. For now we depend on 1.1.15,
714# as Solaris right now has no newer version and it definitely works.
715# 1.1.17 is available on Ubuntu Edgy which fulfils the minimal libxml2
716# requirement (2.6.26).
717#
718check_libxslt()
719{
720 if [ -z "$BUILD_LIBXSLT" ]; then
721 test_header libxslt
722 if which_wrapper pkg-config > /dev/null; then
723 libxslt_ver=`pkg-config libxslt --modversion 2>> $LOG`
724 if [ $? -ne 0 ]; then
725 log_failure "not found"
726 fail
727 else
728 FLGXSLT=`pkg-config libxslt --cflags`
729 INCXSLT=`strip_I "$FLGXSLT"`
730 LIBXSLT=`pkg-config libxslt --libs`
731 cat > $ODIR.tmp_src.cc << EOF
732#include <cstdio>
733#include <libxslt/xsltconfig.h>
734extern "C" int main(void)
735{
736 printf("found version %s", LIBXSLT_DOTTED_VERSION);
737#if LIBXSLT_VERSION >= 10117
738 printf(", OK.\n");
739 return 0;
740#else
741 printf(", expected version 1.1.17 or higher\n");
742 return 1;
743#endif
744}
745EOF
746 [ -n "$INCXSLT" ] && I_INCXSLT=`prefix_I "$INCXSLT"`
747 if test_compile "$LIBXSLT $LIBPTHREAD $I_INCXSLT" xslt xslt; then
748 if test_execute; then
749 cnf_append "SDK_VBOX_LIBXSLT_INCS" "$INCXSLT"
750 cnf_append "SDK_VBOX_LIBXSLT_LIBS" "`strip_l "$LIBXSLT"`"
751 fi
752 fi
753 fi
754 elif which_wrapper xslt-config; then
755 libxslt_ver=`xslt-config --version`
756 if [ $? -ne 0 ]; then
757 log_failure "not found"
758 fail
759 else
760 log_success "found version $libxslt_ver"
761 FLGXSLT=`xslt-config --cflags`
762 INCXSLT=`strip_I "$FLGXSLT"`
763 LIBXSLT=`xslt-config --libs`
764 cat > $ODIR.tmp_src.cc << EOF
765#include <cstdio>
766#include <libxslt/xsltconfig.h>
767extern "C" int main(void)
768{
769 printf("found version %s", LIBXSLT_DOTTED_VERSION);
770#if LIBXSLT_VERSION >= 10117
771 printf(", OK.\n");
772 return 0;
773#else
774 printf(", expected version 1.1.17 or higher\n");
775 return 1;
776#endif
777}
778EOF
779 [ -n "$INCXSLT" ] && I_INCXSLT=`prefix_I "$INCXSLT"`
780 if test_compile "$LIBXSLT $LIBPTHREAD $I_INCXSLT" xslt xslt; then
781 if test_execute; then
782 cnf_append "SDK_VBOX_LIBXSLT_INCS" "$INCXSLT"
783 cnf_append "SDK_VBOX_LIBXSLT_LIBS" "`strip_l "$LIBXSLT"`"
784 fi
785 fi
786 fi
787 else
788 log_failure "neither pkg-config nor xslt-config found"
789 fail
790 fi
791 fi
792}
793
794
795#
796# Check for libIDL, needed by xpcom
797#
798check_libidl()
799{
800 test_header libIDL
801
802 if which_wrapper libIDL-config-2 > /dev/null; then
803 libidl_ver=`libIDL-config-2 --version`
804 if [ $? -ne 0 ]; then
805 log_failure "not found"
806 fail
807 else
808 log_success "found version $libidl_ver"
809 cnf_append "VBOX_LIBIDL_CONFIG" \
810 "PKG_CONFIG_PATH=`libIDL-config-2 --prefix`/$LIB/pkgconfig `which_wrapper libIDL-config-2`"
811 fi
812 elif check_avail "libIDL-config" libIDL-config; then
813 libidl_ver=`libIDL-config --version`
814 if [ $? -ne 0 ]; then
815 log_failure "not found"
816 fail
817 else
818 log_success "found version $libidl_ver"
819 cnf_append "VBOX_LIBIDL_CONFIG" "`which_wrapper libIDL-config`"
820 fi
821 fi
822}
823
824
825#
826# Check for openssl, needed for RDP and S3
827#
828check_ssl()
829{
830 if [ -z "$BUILD_LIBSSL" ]; then
831 test_header ssl
832 cat > $ODIR.tmp_src.cc << EOF
833#include <cstdio>
834#include <openssl/opensslv.h>
835extern "C" int main(void)
836{
837 printf("found version %s", OPENSSL_VERSION_TEXT);
838#if OPENSSL_VERSION_NUMBER >= 0x00908000
839 printf(", OK.\n");
840 return 0;
841#else
842 printf(", expected version 0.9.8 or higher\n");
843 return 1;
844#endif
845}
846EOF
847 if test_compile "$INCCRYPTO $LIBCRYPTO" libcrypto openssl; then
848 if test_execute nofatal; then
849 cnf_append "SDK_VBOX_OPENSSL_INCS" "`strip_I "$INCCRYPTO"`"
850 cnf_append "SDK_VBOX_OPENSSL_LIBS" "`strip_l "$LIBCRYPTO"`"
851 fi
852 fi
853 fi
854}
855
856
857#
858# Check for pthread, needed by VBoxSVC, frontends, ...
859#
860check_pthread()
861{
862 test_header pthread
863 cat > $ODIR.tmp_src.cc << EOF
864#include <cstdio>
865#include <pthread.h>
866extern "C" int main(void)
867{
868 pthread_mutex_t mutex;
869 if (pthread_mutex_init(&mutex, NULL)) {
870 printf("pthread_mutex_init() failed\n");
871 return 1;
872 }
873 if (pthread_mutex_lock(&mutex)) {
874 printf("pthread_mutex_lock() failed\n");
875 return 1;
876 }
877 if (pthread_mutex_unlock(&mutex)) {
878 printf("pthread_mutex_unlock() failed\n");
879 return 1;
880 }
881 printf("found, OK.\n");
882}
883EOF
884 if test_compile $LIBPTHREAD pthread pthread; then
885 if test_execute; then
886 cnf_append "LIB_PTHREAD" "`strip_l "$LIBPTHREAD"`"
887 fi
888 fi
889}
890
891
892#
893# Check for zlib, needed by VBoxSVC, Runtime, ...
894#
895check_z()
896{
897 test_header zlib
898 cat > $ODIR.tmp_src.cc << EOF
899#include <cstdio>
900#include <zlib.h>
901extern "C" int main(void)
902{
903 printf("found version %s", ZLIB_VERSION);
904#if ZLIB_VERNUM >= 0x1210
905 printf(", OK.\n");
906 return 0;
907#else
908 printf(", expected version 1.2.1 or higher\n");
909 return 1;
910#endif
911}
912EOF
913 [ -n "$INCZ" ] && I_INCZ=`prefix_I "$INCZ"`
914 if test_compile "$LIBZ $I_INCZ" zlib zlib; then
915 if test_execute; then
916 echo "if1of (\$(KBUILD_TARGET),darwin freebsd linux solaris)" >> $CNF
917 cnf_append " SDK_VBOX_ZLIB_LIBS" "`strip_l "$LIBZ"`"
918 cnf_append " SDK_VBOX_ZLIB_INCS" "$INCZ"
919 echo "endif" >> $CNF
920 fi
921 fi
922}
923
924
925#
926# Check for libpng, needed by kchmviewer
927#
928check_png()
929{
930 test_header libpng
931 cat > $ODIR.tmp_src.cc << EOF
932#include <cstdio>
933#include <png.h>
934extern "C" int main(void)
935{
936 printf("found version %s", PNG_LIBPNG_VER_STRING);
937#if PNG_LIBPNG_VER >= 10205
938 printf(", OK.\n");
939 return 0;
940#else
941 printf(", expected version 1.2.5 or higher\n");
942 return 1;
943#endif
944}
945EOF
946 [ -n "$INCPNG" ] && I_INCPNG=`prefix_I "$INCPNG"`
947 if test_compile "$LIBPNG $I_INCPNG" libpng libpng; then
948 if test_execute; then
949 cnf_append "SDK_VBOX_LIBPNG_LIBS" "`strip_l "$LIBPNG"`"
950 cnf_append "SDK_VBOX_LIBPNG_INCS" "$INCPNG"
951 fi
952 fi
953}
954
955#
956# Check for libcurl, needed by S3
957#
958check_curl()
959{
960 if [ -z "$BUILD_LIBCURL" ]; then
961 test_header libcurl
962 cat > $ODIR.tmp_src.cc << EOF
963#include <cstdio>
964#include <curl/curl.h>
965extern "C" int main(void)
966{
967 printf("found version %s", LIBCURL_VERSION);
968#if 10000*LIBCURL_VERSION_MAJOR + 100*LIBCURL_VERSION_MINOR + LIBCURL_VERSION_PATCH >= 71601
969 printf(", OK.\n");
970 return 0;
971#else
972 printf(", expected version 7.16.1 or higher\n");
973 return 1;
974#endif
975}
976EOF
977 [ -n "$INCCURL" ] && I_INCCURL=`prefix_I "$INCCURL"`
978 if test_compile "$LIBCURL $I_INCCURL" libcurl libcurl; then
979 if test_execute; then
980 cnf_append "SDK_VBOX_LIBCURL_LIBS" "`strip_l "$LIBCURL"`"
981 cnf_append "SDK_VBOX_LIBCURL_INCS" "$INCCURL"
982 fi
983 fi
984 fi
985}
986
987
988#
989# Check for pam, needed by VRDPAuth
990# Version 79 was introduced in 9/2005, do we support older versions?
991# Debian/sarge uses 76
992# OpenSUSE comes with 0.99.xxx where they changed the versioning scheme.
993#
994check_pam()
995{
996 test_header pam
997 cat > $ODIR.tmp_src.cc << EOF
998#include <cstdio>
999#include <security/pam_appl.h>
1000extern "C" int main(void)
1001{
1002 printf("found version %d", __LIBPAM_VERSION);
1003 if (__LIBPAM_VERSION >= 76)
1004 {
1005 printf(", OK.\n");
1006 return 0;
1007 }
1008 else
1009 {
1010 printf(", expected version 76 or higher\n");
1011 return 1;
1012 }
1013}
1014EOF
1015 if test_compile "-lpam" pam pam nofatal; then
1016 if test_execute nofatal; then
1017 return 0;
1018 fi
1019 fi
1020 echo "not found."
1021 test_header linux_pam
1022 cat > $ODIR.tmp_src.cc << EOF
1023#include <cstdio>
1024#include <security/pam_appl.h>
1025extern "C" int main(void)
1026{
1027 printf("found version %d.%d", __LINUX_PAM__, __LINUX_PAM_MINOR__);
1028 if (__LINUX_PAM__ >= 1)
1029 {
1030 printf(", OK.\n");
1031 return 0;
1032 }
1033 else
1034 {
1035 printf(", expected version 1.0 or higher\n");
1036 return 1;
1037 }
1038}
1039EOF
1040 if test_compile "-lpam" pam pam; then
1041 test_execute
1042 fi
1043}
1044
1045
1046#
1047# Check for the SDL library, needed by VBoxSDL and VirtualBox
1048# We depend at least on version 1.2.7
1049#
1050check_sdl()
1051{
1052 test_header SDL
1053 if [ "$OS" = "darwin" ]; then
1054 if [ -f "/System/Library/Frameworks/SDL.framework/SDL" ]; then
1055 PATH_SDK_LIBSDL="/System/Library/Frameworks/SDL.framework"
1056 elif [ -f "/Library/Frameworks/SDL.framework/SDL" ]; then
1057 PATH_SDK_LIBSDL="/Library/Frameworks/SDL.framework"
1058 fi
1059 if [ -n "$PATH_SDK_LIBSDL" ]; then
1060 foundsdl=1
1061 INCSDL="$PATH_SDK_LIBSDL/Headers"
1062 FLDSDL="-framework SDL"
1063 else
1064 log_failure "SDL framework not found"
1065 fail
1066 fi
1067 else
1068 if which_wrapper sdl-config > /dev/null; then
1069 FLGSDL=`sdl-config --cflags`
1070 INCSDL=`strip_I "$FLGSDL"`
1071 LIBSDL=`sdl-config --libs`
1072 LIBSDLMAIN="-lSDLmain"
1073 FLDSDL=
1074 foundsdl=1
1075 fi
1076 fi
1077 [ "$OS" = "linux" -o "$OS" = "darwin" -o "$OS" = "solaris" ] && LIBSDLMAIN=""
1078 if [ -n "$foundsdl" ]; then
1079 cat > $ODIR.tmp_src.cc << EOF
1080#include <cstdio>
1081#include <SDL.h>
1082#include <SDL_main.h>
1083#undef main
1084extern "C" int main(int argc, char** argv)
1085{
1086 printf("found version %d.%d.%d",
1087 SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
1088#if SDL_VERSION_ATLEAST(1,2,7)
1089 printf(", OK.\n");
1090 return 0;
1091#else
1092 printf(", expected version 1.2.7 or higher\n");
1093 return 1;
1094#endif
1095}
1096EOF
1097 [ -n "$INCSDL" ] && I_INCSDL=`prefix_I "$INCSDL"`
1098 if test_compile "$LIBSDL $LIBSDLMAIN $I_INCSDL $FLDSDL" SDL SDL; then
1099 if test_execute; then
1100 cnf_append "LIB_SDK_LIBSDL_SDL" "`strip_l "$LIBSDL"`"
1101 cnf_append "SDK_LIBSDL_LIBPATH" "`strip_L "$LIBSDL"`"
1102 cnf_append "LIB_SDK_LIBSDL_SDLMAIN" "`strip_l "$LIBSDLMAIN"`"
1103 [ -n "$INCSDL" ] && cnf_append "SDK_LIBSDL_INCS" "$INCSDL"
1104 [ -n "$FLDSDL" ] && cnf_append "SDK_LIBSDL_LDFLAGS" "$FLDSDL"
1105 fi
1106 fi
1107 else
1108 log_failure "not found"
1109 fail
1110 fi
1111}
1112
1113
1114#
1115# Check for the SDL_ttf library, needed by VBoxSDL (secure label)
1116#
1117check_sdl_ttf()
1118{
1119 test_header SDL_ttf
1120 cat > $ODIR.tmp_src.cc << EOF
1121#include <cstdio>
1122#include <SDL_ttf.h>
1123#ifndef SDL_TTF_MAJOR_VERSION
1124#define SDL_TTF_MAJOR_VERSION TTF_MAJOR_VERSION
1125#define SDL_TTF_MINOR_VERSION TTF_MINOR_VERSION
1126#define SDL_TTF_PATCHLEVEL TTF_PATCHLEVEL
1127#endif
1128extern "C" int main(void)
1129{
1130 printf("found version %d.%d.%d",
1131 SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, SDL_TTF_PATCHLEVEL);
1132#if 10000*SDL_TTF_MAJOR_VERSION + 100*SDL_TTF_MINOR_VERSION + SDL_TTF_PATCHLEVEL >= 20006
1133 printf(", OK.\n");
1134 return 0;
1135#else
1136 printf(", expected version 2.0.6 or higher\n");
1137 return 1;
1138#endif
1139}
1140EOF
1141 if test_compile "-lSDL_ttf $I_INCSDL" SDL_ttf SDL_ttf nofatal; then
1142 if ! test_execute nofatal; then
1143 cnf_append "VBOX_WITH_SECURELABEL" ""
1144 fi
1145 else
1146 echo "not found -- disabling VBoxSDL secure label."
1147 cnf_append "VBOX_WITH_SECURELABEL" ""
1148 fi
1149}
1150
1151
1152#
1153# Check for libasound, needed by the ALSA audio backend
1154#
1155check_alsa()
1156{
1157 test_header ALSA
1158 cat > $ODIR.tmp_src.cc << EOF
1159#include <cstdio>
1160#include <alsa/asoundlib.h>
1161extern "C" int main(void)
1162{
1163 printf("found version %d.%d.%d",
1164 SND_LIB_MAJOR, SND_LIB_MINOR, SND_LIB_SUBMINOR);
1165#if 10000*SND_LIB_MAJOR + 100*SND_LIB_MINOR + SND_LIB_SUBMINOR >= 10006
1166 printf(", OK.\n");
1167 return 0;
1168#else
1169 printf(", expected version 1.0.6 or higher\n");
1170 return 1;
1171#endif
1172}
1173EOF
1174 if test_compile "-lasound" asound asound; then
1175 test_execute
1176 fi
1177}
1178
1179
1180#
1181# Check for PulseAudio
1182#
1183check_pulse()
1184{
1185 test_header "PulseAudio"
1186 cat > $ODIR.tmp_src.cc << EOF
1187#include <cstdio>
1188#include <pulse/version.h>
1189extern "C" int main(void)
1190{
1191 printf("found version %s API version %d", pa_get_headers_version(), PA_API_VERSION);
1192#if PA_API_VERSION >= 9
1193 printf(", OK.\n");
1194 return 0;
1195#else
1196 printf(", expected version 0.9.0 (API version 9) or higher\n");
1197 return 1;
1198#endif
1199}
1200EOF
1201 if test_compile "$INCPULSE $LIBPULSE -lpulse" pulse pulse; then
1202 test_execute
1203 fi
1204}
1205
1206
1207#
1208# Check for the X libraries (Xext, X11)
1209#
1210check_x()
1211{
1212 test_header "X libraries"
1213 cat > $ODIR.tmp_src.cc << EOF
1214#include <cstdio>
1215#include <X11/Xlib.h>
1216extern "C" int main(void)
1217{
1218 Display *dpy;
1219 int scrn_num;
1220 Screen *scrn;
1221 Window win;
1222
1223 dpy = XOpenDisplay(NULL);
1224 scrn_num = DefaultScreen(dpy);
1225 scrn = ScreenOfDisplay(dpy, scrn_num);
1226 win = XCreateWindow(dpy, RootWindowOfScreen(scrn), 0, 0, 100, 100,
1227 0, 16, InputOutput, CopyFromParent, 0, NULL);
1228 XDestroyWindow(dpy, win);
1229 XCloseDisplay(dpy);
1230}
1231EOF
1232 [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
1233 if test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs; then
1234 log_success "found"
1235 fi
1236}
1237
1238
1239#
1240# Check for the Xcursor library, needed by VBoxSDL and VBoxBFE
1241#
1242check_xcursor()
1243{
1244 test_header Xcursor
1245 cat > $ODIR.tmp_src.cc << EOF
1246#include <cstdio>
1247#include <X11/Xlib.h>
1248#include <X11/Xcursor/Xcursor.h>
1249extern "C" int main(void)
1250{
1251 XcursorImage *cursor = XcursorImageCreate (10, 10);
1252 XcursorImageDestroy(cursor);
1253 return 0;
1254}
1255EOF
1256 [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
1257 if test_compile "$LIBX11 $LIBXCURSOR $I_INCX11" Xcursor Xcursor; then
1258 log_success "found"
1259 cnf_append "VBOX_XCURSOR_LIBS" "`strip_l "$LIBXCURSOR"`"
1260 fi
1261}
1262
1263
1264#
1265# Check for the Xinerama library, needed by the Qt GUI
1266#
1267check_xinerama()
1268{
1269 test_header Xinerama
1270 cat > $ODIR.tmp_src.cc << EOF
1271#include <X11/Xlib.h>
1272#include <X11/extensions/Xinerama.h>
1273extern "C" int main(void)
1274{
1275 Display *dpy;
1276 Bool flag;
1277 dpy = XOpenDisplay(NULL);
1278 if (dpy)
1279 {
1280 flag = XineramaIsActive(dpy);
1281 XCloseDisplay(dpy);
1282 }
1283}
1284EOF
1285 [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
1286 if test_compile "$LIBX11 $LIBXINERAMA $I_INCX11" Xinerama Xinerama; then
1287 log_success "found"
1288 fi
1289}
1290
1291
1292#
1293# Check for the Xinerama library, needed by the Qt GUI
1294#
1295check_xrandr()
1296{
1297 test_header Xrandr
1298 cat > $ODIR.tmp_src.cc << EOF
1299#include <X11/Xlib.h>
1300#include <X11/extensions/Xrandr.h>
1301extern "C" int main(void)
1302{
1303 Display *dpy;
1304 Bool flag;
1305 int major, minor;
1306 dpy = XOpenDisplay(NULL);
1307 if (dpy)
1308 {
1309 flag = XRRQueryVersion(dpy, &major, &minor);
1310 XCloseDisplay(dpy);
1311 }
1312}
1313EOF
1314 [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
1315 if test_compile "$LIBX11 $LIBXRANDR $I_INCX11" Xrandr Xrandr; then
1316 log_success "found"
1317 fi
1318}
1319
1320
1321#
1322# Check for OpenGL
1323#
1324check_opengl()
1325{
1326 # On darwin this is a on/off decision only
1327 if [ "$OS" = "darwin" ]; then
1328 test_header "OpenGL support"
1329 echo "enabled"
1330 cnf_append "VBOX_WITH_CROGL" "1"
1331 else
1332 check_xmu
1333 check_mesa
1334 fi
1335}
1336
1337
1338#
1339# Check for the Xmu library, needed by OpenGL
1340#
1341check_xmu()
1342{
1343 test_header Xmu
1344 cat > $ODIR.tmp_src.cc << EOF
1345#include <cstdio>
1346#include <X11/Xatom.h>
1347#include <X11/Xlib.h>
1348#include <X11/Xutil.h>
1349#include <X11/Xmu/StdCmap.h>
1350extern "C" int main(void)
1351{
1352 Display *dpy;
1353 int scrn_num;
1354 Screen *scrn;
1355
1356 dpy = XOpenDisplay(NULL);
1357 if (dpy)
1358 {
1359 scrn_num = DefaultScreen(dpy);
1360 scrn = ScreenOfDisplay(dpy, scrn_num);
1361 Status status = XmuLookupStandardColormap(dpy, RootWindowOfScreen(scrn), 0,
1362 24, XA_RGB_DEFAULT_MAP, False, True);
1363 printf("Status = %x\n", status);
1364 XCloseDisplay(dpy);
1365 }
1366 return 0;
1367}
1368EOF
1369 [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
1370 if test_compile "$LIBX11 $LIBXMU $I_INCX11" Xmu Xmu; then
1371 log_success "found"
1372 cnf_append "VBOX_XMU_LIBS" "`strip_l "$LIBXMU"`"
1373 fi
1374}
1375
1376#
1377# Check for Mesa, needed by OpenGL
1378#
1379check_mesa()
1380{
1381 test_header "Mesa / GLU"
1382 cat > $ODIR.tmp_src.cc << EOF
1383#include <cstdio>
1384#include <X11/Xlib.h>
1385#include <GL/glx.h>
1386#include <GL/glu.h>
1387extern "C" int main(void)
1388{
1389 Display *dpy;
1390 int major, minor;
1391
1392 dpy = XOpenDisplay(NULL);
1393 if (dpy)
1394 {
1395 if (glXQueryVersion(dpy, &major, &minor))
1396 {
1397 printf("found version %u.%u, OK.\n", major, minor);
1398 return 0;
1399 }
1400 XCloseDisplay(dpy);
1401 }
1402 printf("found (inactive), OK.\n");
1403 return 0;
1404}
1405EOF
1406 [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
1407 if test_compile "$LIBX11 $MESA $I_INCX11" Mesa Mesa; then
1408 [ $PASSIVE_MESA -eq 1 ] && unset DISPLAY
1409 test_execute
1410 fi
1411}
1412
1413
1414#
1415# Check for the Qt4 library, needed by the VirtualBox frontend
1416#
1417# Currently not fatal.
1418#
1419check_qt4()
1420{
1421 foundqt4=
1422 test_header Qt4
1423 if [ "$OS" = "darwin" ]; then
1424 # First check if there is the internal version of Qt. If yes nothing else
1425 # has to be done.
1426 QT_INTERNAL=`/bin/ls -rd1 $PWD/tools/$BUILD_TARGET.$BUILD_PLATFORM_ARCH/qt/* 2> /dev/null`
1427 for t in $QT_INTERNAL; do
1428 if [ -f "$t/Frameworks/QtCoreVBox.framework/QtCoreVBox" ]; then
1429 cnf_append "VBOX_WITH_QT4_SUN" "1"
1430 log_success "use internal version"
1431 return
1432 fi
1433 done
1434 # Now try the user provided directory and some of the standard directories.
1435 QT_TRIES="$QT4DIR /System/Library /Library"
1436 for t in $QT_TRIES; do
1437 if [ -f "$t/Frameworks/QtCore.framework/QtCore" ]; then
1438 PATH_SDK_QT4="$t"
1439 break
1440 fi
1441 done
1442 # Add the necessary params for building the test application
1443 if [ -n "$PATH_SDK_QT4" ]; then
1444 foundqt4=1
1445 INCQT4=-I$PATH_SDK_QT4/Frameworks/QtCore.framework/Headers
1446 LIBQT4=-F$PATH_SDK_QT4/Frameworks
1447 FLGQT4="-framework QtCore"
1448 else
1449 log_failure "Qt4 framework not found (can be disabled using --disable-qt4)"
1450 fail
1451 fi
1452 else
1453 if [ $QT4DIR_PKGCONFIG -eq 1 ]; then
1454 # default is to use pkg-config
1455 if which_wrapper pkg-config > /dev/null; then
1456 # this braindead path is necessary for mdv2008.1
1457 qt4_ver=`\
1458 PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
1459 pkg-config QtCore --modversion 2>> $LOG`
1460 if [ $? -ne 0 ]; then
1461 log_failure "not found"
1462 fail
1463 else
1464 FLGQT4=`\
1465 PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
1466 pkg-config QtCore --cflags`
1467 INCQT4=`strip_I "$FLGQT4"`
1468 LIBQT4=`\
1469 PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
1470 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
1471 pkg-config QtCore --libs`
1472 foundqt4=1
1473 fi
1474 else
1475 log_failure "pkg-config not found"
1476 fail
1477 fi
1478 else
1479 # do it the old way (e.g. user has specified QT4DIR)
1480 cat > $ODIR.tmp_src.cc << EOF
1481#include <cstdio>
1482#include <QtGlobal>
1483extern "C" int main(void)
1484{
1485 printf("found version %s", QT_VERSION_STR);
1486#if QT_VERSION >= 0x040400
1487 printf(", OK.\n");
1488 return 0;
1489#else
1490 printf(", expected version 4.4.0 or higher\n");
1491 return 1;
1492#endif
1493}
1494EOF
1495 for q in $QT4DIR; do
1496 INCQT4="$q/include $q/include/QtCore"
1497 FLGQT4="-DQT_SHARED"
1498 I_INCQT4=`prefix_I "$INCQT4"`
1499 LIBQT4="-L$q/lib -lQtCoreVBox"
1500 if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
1501 foundqt4=2
1502 break;
1503 fi
1504 LIBQT4="-L$q/lib -lQtCore"
1505 if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
1506 foundqt4=1
1507 break;
1508 fi
1509 done
1510 fi
1511 fi
1512 if [ -n "$foundqt4" ]; then
1513 cat > $ODIR.tmp_src.cc << EOF
1514#include <cstdio>
1515#include <QtGlobal>
1516extern "C" int main(void)
1517{
1518 printf("found version %s", QT_VERSION_STR);
1519#if QT_VERSION >= 0x040400
1520 printf(", OK.\n");
1521 return 0;
1522#else
1523 printf(", expected version 4.4.0 or higher\n");
1524 return 1;
1525#endif
1526}
1527EOF
1528 [ -n "$INCQT4" ] && I_INCQT4=`prefix_I "$INCQT4"`
1529 if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
1530 if test_execute_path "`strip_L "$LIBQT4"`"; then
1531 if [ "$OS" = "darwin" ]; then
1532 # Successful build & run the test application so add the necessary
1533 # params to AutoConfig.kmk
1534 cnf_append "PATH_SDK_QT4_INC" "$PATH_SDK_QT4/Frameworks"
1535 cnf_append "PATH_SDK_QT4_LIB" "$PATH_SDK_QT4/Frameworks"
1536 cnf_append "PATH_SDK_QT4" "$PATH_SDK_QT4/Frameworks"
1537 # Check for the moc tool in the Qt directory found & some standard
1538 # directories.
1539 for q in $PATH_SDK_QT4 /usr /Developer/Tools/Qt; do
1540 if which_wrapper "$q/bin/moc" > /dev/null; then
1541 cnf_append "PATH_TOOL_QT4" "$q"
1542 cnf_append "PATH_TOOL_QT4_BIN" "$q/bin"
1543 fi
1544 done
1545 else
1546 # strip .../QtCore as we add components ourself
1547 INCQT4=`echo "$INCQT4"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| $||g'`
1548 # store only the first path, remove all other pathes
1549 # most likely pkg-config gave us -I/usr/include/qt4 -I/usr/include/qt4/QtCore
1550 INCQT4=`echo "$INCQT4"|$KBUILD_SED 's|\([^ ]*\) .*|\1|'`
1551 cnf_append "VBOX_PATH_QT4_LIB" "`strip_L "$LIBQT4"`"
1552 cnf_append "SDK_QT4_LIBPATH" "`strip_L "$LIBQT4"`"
1553 cnf_append "PATH_SDK_QT4_INC" "$INCQT4"
1554 # this is not quite right since the qt libpath does not have to be first...
1555 cnf_append "PATH_SDK_QT4_LIB" '$'"(firstword `strip_L "$LIBQT4"`)"
1556 if [ "$foundqt4" = "2" ]; then
1557 cnf_append "VBOX_WITH_QT4_SUN" "1"
1558 fi
1559 test_header "Qt4 devtools"
1560 for q in $QT4DIR; do
1561 # first try it with a suffix, some platforms use that
1562 if which_wrapper "$q/bin/moc-qt4" > /dev/null; then
1563 moc_ver=`$q/bin/moc-qt4 -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'`
1564 if [ $? -ne 0 ]; then
1565 log_failure "not found"
1566 fail
1567 else
1568 log_success "found version $moc_ver"
1569 cnf_append "VBOX_PATH_QT4" "$q"
1570 cnf_append "PATH_SDK_QT4" "$q"
1571 cnf_append "PATH_TOOL_QT4" "$q"
1572 cnf_append "PATH_TOOL_QT4_BIN" "$q/bin"
1573 cnf_append "TOOL_QT4_BIN_SUFF" "-qt4"
1574 return
1575 fi
1576 elif which_wrapper "$q/bin/moc" > /dev/null; then
1577 moc_ver=`$q/bin/moc -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'`
1578 if [ $? -ne 0 ]; then
1579 log_failure "not found"
1580 fail
1581 else
1582 log_success "found version $moc_ver"
1583 cnf_append "VBOX_PATH_QT4" "$q"
1584 cnf_append "PATH_SDK_QT4" "$q"
1585 cnf_append "PATH_TOOL_QT4" "$q"
1586 cnf_append "PATH_TOOL_QT4_BIN" "$q/bin"
1587 return
1588 fi
1589 fi
1590 done
1591 fi
1592 fi
1593 else
1594 log_failure "not found"
1595 fail
1596 fi
1597 else
1598 log_failure "not found"
1599 fail
1600 fi
1601}
1602
1603
1604#
1605# Check whether static libstdc++ is installed. This library is required
1606# for the Linux guest additions.
1607#
1608check_staticlibstdcxx()
1609{
1610 test_header "static stc++ library"
1611 libstdcxx=`$CXX -print-file-name=libstdc++.a`
1612 cat > $ODIR.tmp_src.cc << EOF
1613#include <string>
1614
1615extern "C" int main(void)
1616{
1617 std::string s = "test";
1618 return 0;
1619}
1620EOF
1621 if test_compile "$libstdcxx" libstdc++ libstdc++; then
1622 log_success "found"
1623 fi
1624}
1625
1626
1627#
1628# Check for Linux sources
1629#
1630check_linux()
1631{
1632 test_header "Linux kernel sources"
1633 cat > $ODIR.tmp_src.c << EOF
1634#include <linux/version.h>
1635int printf(const char *format, ...);
1636int main(void)
1637{
1638 printf("found version %d.%d.%d", LINUX_VERSION_CODE / 65536,
1639 (LINUX_VERSION_CODE % 65536) / 256,
1640 LINUX_VERSION_CODE % 256);
1641#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
1642 printf(", OK.\n");
1643 return 0;
1644#else
1645 printf(", expected version 2.4.0 or higher\n");
1646 return 1;
1647#endif
1648}
1649EOF
1650 echo "compiling the following source file:" >> $LOG
1651 cat $ODIR.tmp_src.c >> $LOG
1652 echo "using the following command line:" >> $LOG
1653 echo "$CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include" >> $LOG
1654 $CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include >> $LOG 2>&1
1655 if [ $? -ne 0 ]; then
1656 echo
1657 echo " Linux kernel headers not found at $LINUX"
1658 echo " Check the file $LOG for detailed error information."
1659 fail
1660 else
1661 if test_execute; then
1662 cnf_append "VBOX_LINUX_SRC" "`cd $LINUX ; pwd`"
1663 fi
1664 fi
1665}
1666
1667
1668#
1669# Check for kchmviewer, needed to display the online help
1670# (unused as we ship kchmviewer)
1671#
1672check_kchmviewer()
1673{
1674 test_header kchmviewer
1675 if check_avail "$KCHMVIEWER" KCHMVIEWER; then
1676 kchmviewer_ver=`$KCHMVIEWER --version|grep "^KchmViewer:"|sed 's+^KchmViewer: \(.*\)+\1+'`
1677 if [ $? -ne 0 ]; then
1678 log_failure "not found"
1679 fail
1680 else
1681 log_success "found version $kchmviewer_ver"
1682 fi
1683 fi
1684}
1685
1686
1687#
1688# Check for the kBuild tools, we don't support GNU make
1689#
1690check_kbuild()
1691{
1692 test_header kBuild
1693 if which_wrapper "$KBUILDDIR/bin/$OS.$BUILD_MACHINE/kmk" > /dev/null; then
1694 KBUILDDIR_BIN="$KBUILDDIR/bin/$OS.$BUILD_MACHINE"
1695 echo "PATH_KBUILD=\"`cd $KBUILDDIR ; pwd`\"" >> $ENV
1696 echo "export PATH_KBUILD" >> $ENV
1697 echo "PATH_DEVTOOLS=\"$DEVDIR\"" >> $ENV
1698 echo "export PATH_DEVTOOLS" >> $ENV
1699 echo "path_kbuild_bin=\"\$PATH_KBUILD/bin/\$BUILD_TARGET.\$BUILD_PLATFORM_ARCH\"" >> $ENV
1700 echo "export PATH_KBUILD_BIN" >> $ENV
1701 echo "path_dev_bin=\"\$PATH_DEVTOOLS/\$BUILD_TARGET.\$BUILD_PLATFORM_ARCH\"/bin" >> $ENV
1702 if [ "$OS" = "solaris" ]; then
1703 # Because of sh being non-default shell in Solaris we need to export PATH again when
1704 # sourcing env.sh. Simply exporting from ./configure does not export PATH correctly.
1705 echo "PATH=\"$ORGPATH\"" >> $ENV
1706 echo "echo \"\$PATH\" | /usr/sfw/bin/ggrep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV
1707 echo "echo \"\$PATH\" | /usr/sfw/bin/ggrep -q \"\$path_dev_bin\" || PATH=\"\$path_dev_bin:\$PATH\"" >> $ENV
1708 else
1709 echo "echo \"\$PATH\" | grep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV
1710 echo "echo \"\$PATH\" | grep -q \"\$path_dev_bin\" || PATH=\"\$path_dev_bin:\$PATH\"" >> $ENV
1711 fi
1712 echo "export PATH" >> $ENV
1713 echo "unset path_kbuild_bin path_dev_bin" >> $ENV
1714 KBUILD_SED="$KBUILDDIR_BIN/kmk_sed"
1715 elif [ "$OS.$BUILD_MACHINE" = "darwin.amd64" ]; then
1716 # Currently there are no amd64 kBuild bins. So use the x86 variant in any case.
1717 KBUILDDIR_BIN="$KBUILDDIR/bin/$OS.x86"
1718 echo "PATH_KBUILD=\"`cd $KBUILDDIR ; pwd`\"" >> $ENV
1719 echo "export PATH_KBUILD" >> $ENV
1720 echo "PATH_DEVTOOLS=\"$DEVDIR\"" >> $ENV
1721 echo "export PATH_DEVTOOLS" >> $ENV
1722 echo "path_kbuild_bin=\"\$PATH_KBUILD/bin/\$BUILD_TARGET.x86\"" >> $ENV
1723 echo "PATH_KBUILD_BIN=\"\$path_kbuild_bin\"" >> $ENV
1724 echo "export PATH_KBUILD_BIN" >> $ENV
1725 echo "path_dev_bin=\"\$PATH_DEVTOOLS/\$BUILD_TARGET.\$BUILD_PLATFORM_ARCH\"/bin" >> $ENV
1726 echo "echo \"\$PATH\" | grep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV
1727 echo "echo \"\$PATH\" | grep -q \"\$path_dev_bin\" || PATH=\"\$path_dev_bin:\$PATH\"" >> $ENV
1728 echo "export PATH" >> $ENV
1729 echo "unset path_kbuild_bin path_dev_bin" >> $ENV
1730 KBUILD_SED="$KBUILDDIR_BIN/kmk_sed"
1731 elif check_avail "kmk" KBUILDDIR really; then
1732 # check for installed kBuild
1733 KBUILD_SED="`which_wrapper kmk_sed`"
1734 else
1735 fail
1736 fi
1737 log_success "found"
1738}
1739
1740
1741#
1742# Check for compiler.h
1743# Some Linux distributions include "compiler.h" in their libc linux
1744# headers package, some don't. Most don't need it, building might (!)
1745# not succeed on openSUSE without it.
1746#
1747# See http://www.mail-archive.com/qemu-devel%40nongnu.org/msg07980.html
1748#
1749check_compiler_h()
1750{
1751 test_header compiler.h
1752 if ! test -f "/usr/include/linux/compiler.h"; then
1753 log_success "compiler.h not found"
1754 else
1755 cnf_append "VBOX_WITH_LINUX_COMPILER_H" "1"
1756 log_success "compiler.h found"
1757 fi
1758}
1759
1760#
1761# Check for libcap.
1762# Required to pass CAP_NET_RAW to our binaries to allow to open SOCK_RAW
1763# sockets for doing ICMP requests.
1764#
1765check_libcap()
1766{
1767 test_header "libcap library"
1768 cat > $ODIR.tmp_src.cc << EOF
1769#include <cstdio>
1770#include <sys/types.h>
1771#include <sys/capability.h>
1772
1773extern "C" int main(void)
1774{
1775 char buf[1024];
1776 cap_t caps = cap_get_proc();
1777 snprintf(buf, sizeof(buf), "Current caps are '%s'\n", cap_to_text(caps, NULL));
1778 return 0;
1779}
1780EOF
1781 if test_compile $LIBCAP libcap libcap; then
1782 if test_execute; then
1783 log_success "found"
1784 fi
1785 fi
1786}
1787
1788#
1789# Check if we are able to build 32-bit applications (needed for the guest additions)
1790#
1791check_32bit()
1792{
1793 test_header "32-bit support"
1794 cat > $ODIR.tmp_src.c << EOF
1795#include <stdint.h>
1796int main(void)
1797{
1798 return 0;
1799}
1800EOF
1801 echo "compiling the following source file:" >> $LOG
1802 cat $ODIR.tmp_src.c >> $LOG
1803 echo "using the following command line:" >> $LOG
1804 echo "$CC -m32 -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c" >> $LOG
1805 $CC -m32 -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c >> $LOG 2>&1
1806 if [ $? -ne 0 ]; then
1807 echo
1808 echo " Cannot compile 32-bit applications (missing headers and/or libraries)!"
1809 echo " Check the file $LOG for detailed error information."
1810 fail
1811 fi
1812 log_success ""
1813}
1814
1815
1816#
1817# Check for Python
1818#
1819check_python()
1820{
1821 test_header "python support"
1822
1823 # On darwin this is a on/off decision only
1824 if [ "$OS" = "darwin" ]; then
1825 echo "enabled"
1826 cnf_append "VBOX_WITH_PYTHON" "1"
1827 return
1828 fi
1829
1830 cat > $ODIR.tmp_src.cc << EOF
1831#include <cstdio>
1832#include <Python.h>
1833extern "C" int main(void)
1834{
1835 Py_Initialize();
1836 printf("found version %s", PY_VERSION);
1837#if PY_VERSION_HEX >= 0x02030000
1838 printf(", OK.\n");
1839 return 0;
1840#else
1841 printf(", expected version 2.3 or higher\n");
1842 return 1;
1843#endif
1844}
1845EOF
1846 found=
1847# For Solaris we use libpython2.4 for compatibility with Solaris 10 and passing IPS pkg audit
1848 if [ "$OS" != "solaris" ]; then
1849 SUPPYTHONLIBS="python2.6 python2.5 python2.4 python2.3"
1850 else
1851 SUPPYTHONLIBS="python2.4"
1852 fi
1853 for p in $PYTHONDIR; do
1854 for d in $SUPPYTHONLIBS; do
1855 for b in lib64 lib/64 lib; do
1856 echo "compiling the following source file:" >> $LOG
1857 cat $ODIR.tmp_src.cc >> $LOG
1858 echo "using the following command line:" >> $LOG
1859 echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so" >> $LOG
1860 $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so >> $LOG 2>&1
1861 if [ $? -eq 0 ]; then
1862 found=1
1863 break
1864 fi
1865 done
1866 if [ -n "$found" ]; then break; fi
1867 done
1868 if [ -n "$found" ]; then break; fi
1869 done
1870 if [ -n "$found" ]; then
1871 if test_execute; then
1872 cnf_append "VBOX_WITH_PYTHON" "1"
1873 cnf_append "VBOX_PATH_PYTHON_INC" "$p/include/$d"
1874 cnf_append "VBOX_LIB_PYTHON" "$p/$b/lib$d.so"
1875 else
1876 log_failure "not found"
1877 fail
1878 fi
1879 else
1880 log_failure "not found"
1881 fail
1882 fi
1883}
1884
1885
1886#
1887# Setup wine
1888#
1889setup_wine()
1890{
1891 test_header "Wine support"
1892 if ! which_wrapper wine > /dev/null; then
1893 echo " wine binary not found"
1894 fail
1895 fi
1896 if ! which_wrapper wineprefixcreate > /dev/null; then
1897 echo " wineprefixcreate not found"
1898 fail
1899 fi
1900 export WINEPREFIX="${ODIR}wine.$BUILD_MACHINE"
1901 echo "WINEPREFIX=\"${ODIR}wine.$BUILD_MACHINE\"" >> $ENV
1902 echo "export WINEPREFIX" >> $ENV
1903 rm -rf $WINEPREFIX
1904 mkdir -p $WINEPREFIX
1905 touch $WINEPREFIX/.no_prelaunch_window_flag
1906 if ! wineprefixcreate -q > /dev/null 2>&1; then
1907 echo " wineprefixcreate failed"
1908 fail
1909 fi
1910 tmp=.tmp.wine.reg
1911 rm -f $tmp
1912 echo 'REGEDIT4' > $tmp
1913 echo '' >> $tmp
1914 echo '[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment]' >> $tmp
1915 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
1916 echo '' >> $tmp
1917 echo '[HKEY_CURRENT_USER\Software\Wine\AppDefaults\hhc.exe\DllOverrides]' >> $tmp
1918 echo '"itss"="native"' >> $tmp
1919 echo '' >> $tmp
1920 echo '[HKEY_CURRENT_USER\Software\Wine\AppDefaults\hhw.exe\DllOverrides]' >> $tmp
1921 echo '"itss"="native"' >> $tmp
1922 echo '' >> $tmp
1923 if ! wine regedit $tmp > /dev/null 2>&1; then
1924 rm -f $tmp
1925 echo " failed to load registry changes (path)."
1926 fail
1927 fi
1928 rm -f $tmp
1929 log_success "found"
1930}
1931
1932#
1933# Check for gSOAP.
1934#
1935check_gsoap()
1936{
1937 test_header "GSOAP compiler"
1938 if [ -z "$GSOAP" ]; then
1939 GSOAP="/usr"
1940 fi
1941 if which_wrapper "$GSOAP/bin/soapcpp2" > /dev/null; then
1942 if which_wrapper "$GSOAP/bin/wsdl2h" > /dev/null; then
1943 if [ -f "$GSOAP/include/stdsoap2.h" ]; then
1944 # TODO: Check for libgsoap++.a/so
1945
1946 if [ -z "$GSOAP_IMPORT" ]; then
1947 GSOAP_IMPORT="$GSOAP/share/gsoap/import"
1948 if [ ! -d "$GSOAP_IMPORT" -a -d "$GSOAP/include/gsoap" ]; then
1949 GSOAP_IMPORT="$GSOAP/include/gsoap"
1950 fi
1951 fi
1952 if [ -f "$GSOAP_IMPORT/stlvector.h" ]; then
1953 cnf_append "VBOX_GSOAP_INSTALLED" "1"
1954 cnf_append "VBOX_PATH_GSOAP" "$GSOAP"
1955 cnf_append "VBOX_PATH_GSOAP_IMPORT" "$GSOAP_IMPORT"
1956 if [ -f "$GSOAP/share/gsoap/stdsoap2.cpp" ]; then
1957 cnf_append "VBOX_GSOAP_CXX_SOURCES" "$GSOAP/share/gsoap/stdsoap2.cpp"
1958 else
1959 cnf_append "VBOX_GSOAP_CXX_SOURCES" ""
1960 fi
1961 cnf_append "VBOX_GSOAP_CXX_LIBS" "libgsoap++"
1962 log_success "found"
1963 else
1964 log_failure "stlvector.h not found -- disabling webservice"
1965 cnf_append "VBOX_WITH_WEBSERVICES" ""
1966 fi
1967 else
1968 log_failure "stdsoap2.h not found -- disabling webservice"
1969 cnf_append "VBOX_WITH_WEBSERVICES" ""
1970 fi
1971 else
1972 log_failure "wsdl2h not found -- disabling webservice"
1973 cnf_append "VBOX_WITH_WEBSERVICES" ""
1974 fi
1975 else
1976 log_failure "soapcpp2 not found -- disabling webservice"
1977 cnf_append "VBOX_WITH_WEBSERVICES" ""
1978 fi
1979}
1980
1981
1982#
1983# Determines the Darwin version.
1984# @todo This should really check the Xcode/SDK version.
1985#
1986check_darwinversion()
1987{
1988 test_header "Darwin version"
1989 darwin_ver=`uname -r`
1990 case "$darwin_ver" in
1991 10\.*)
1992 darwin_ver="10.6"
1993 sdk=/Developer/SDKs/MacOSX10.5.sdk
1994 CXX_FLAGS="-mmacosx-version-min=10.5 -isysroot $sdk -Wl,-syslibroot,$sdk"
1995# test "$CC" = "gcc" && CC="gcc-4.0"
1996# test "$CXX" = "g++" && CXX="g++-4.0"
1997 cnf_append "VBOX_MACOS_10_5_WORKAROUND" "1"
1998 ;;
1999 9\.*)
2000 darwin_ver="10.5"
2001 sdk=/Developer/SDKs/MacOSX10.5.sdk
2002 CXX_FLAGS="-mmacosx-version-min=10.5 -isysroot $sdk -Wl,-syslibroot,$sdk"
2003# test "$CC" = "gcc" && CC="gcc-4.0"
2004# test "$CXX" = "g++" && CXX="g++-4.0"
2005 cnf_append "VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6" "1"
2006 cnf_append "VBOX_MACOS_10_5_WORKAROUND" "1"
2007 ;;
2008 8\.*)
2009 darwin_ver="10.4"
2010 sdk=/Developer/SDKs/MacOSX10.4u.sdk
2011 CXX_FLAGS="-mmacosx-version-min=10.4 -isysroot $sdk -Wl,-syslibroot,$sdk"
2012# test "$CC" = "gcc" && CC="gcc-4.0"
2013# test "$CXX" = "g++" && CXX="g++-4.0"
2014 cnf_append "VBOX_WITH_COCOA_QT" ""
2015 cnf_append "VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6" "1"
2016 ;;
2017 *)
2018 echo " failed to determine Darwin version. (uname -r: $darwin_ver)"
2019 fail
2020 darwin_ver="unknown"
2021 ;;
2022 esac
2023 log_success "found version $darwin_ver (SDK: $sdk)"
2024}
2025
2026
2027#
2028# Checks that i386-elf-gcc-3.4.6, i386-elf-gcc-3.4.3, i386-elf-gcc-3.4 or i386-elf-gcc
2029# is around to prevent confusion when the build fails in src/recompiler.
2030# Note. Keep the which order in sync with the $(which ) in src/recompiler/Makefile.kmk.
2031#
2032check_i386elfgcc()
2033{
2034 test_header "i386-elf-gcc"
2035 i386_elf_gcc=`which_wrapper i386-elf-gcc-3.4.6`
2036 test -z "$i386_elf_gcc" && i386_elf_gcc=`which_wrapper i386-elf-gcc-3.4.3`
2037 test -z "$i386_elf_gcc" && i386_elf_gcc=`which_wrapper i386-elf-gcc-3.4`
2038 test -z "$i386_elf_gcc" && i386_elf_gcc=`which_wrapper i386-elf-gcc`
2039 if test -z "$i386_elf_gcc"; then
2040 echo " failed to find i386-elf-gcc"
2041 fail
2042 fi
2043 log_success "found $i386_elf_gcc"
2044}
2045
2046
2047#
2048# Show help
2049#
2050show_help()
2051{
2052cat << EOF
2053Usage: ./configure [OPTIONS]...
2054
2055Configuration:
2056 -h, --help display this help and exit
2057 --nofatal don't abort on errors
2058EOF
2059[ $WITH_XPCOM -eq 1 ] && echo " --disable-xpcom disable XPCOM and related stuff"
2060[ $WITH_PYTHON -eq 1 ] && echo " --disable-python disable python bindings"
2061[ $WITH_VMMRAW -eq 1 ] && echo " --disable-vmmraw disable VMM raw mode (VT-x/AMD-V mandatory!)"
2062[ $WITH_SDL_TTF -eq 1 ] && echo " --disable-sdl-ttf disable SDL_ttf detection"
2063[ $WITH_ALSA -eq 1 ] && echo " --disable-alsa disable the ALSA sound backend"
2064[ $WITH_PULSE -eq 1 ] && echo " --disable-pulse disable the PulseAudio backend"
2065[ $WITH_DBUS -eq 1 ] && echo " --disable-dbus don't use DBus and hal for hardware detection"
2066[ $WITH_KMODS -eq 1 ] && echo " --disable-kmods don't build Linux kernel modules (host and guest)"
2067[ $WITH_OPENGL -eq 1 ] && echo " --disable-opengl disable OpenGL support"
2068[ $WITH_GSOAP -eq 0 ] && echo " --enable-webservice enable the webservice stuff"
2069[ "$OS" = "linux" -o "$OS" = "freebsd" ] && echo " --enable-vde enable VDE networking"
2070cat << EOF
2071 --disable-hardening don't be strict about /dev/vboxdrv access
2072 --build-libxml2 build libxml2 from sources
2073 --build-libxslt build libxslt from sources
2074 --build-libssl build openssl from sources (PUEL only)
2075 --build-libcurl build libcurl from sources (PUEL only)
2076EOF
2077[ "$OS" != "darwin" ] && echo " --setup-wine setup a Wine directory and register the hhc hack"
2078cat << EOF
2079
2080Paths:
2081 --with-gcc=PATH location of the gcc compiler [$CC]
2082 --with-g++=PATH location of the g++ compiler [$CXX]
2083 --with-kbuild=DIR kbuild directory [$KBUILDDIR]
2084 --with-iasl=PATH location of the iasl compiler [$IASL]
2085 --with-mkisofs=PATH location of mkisofs [$MKISOFS]
2086EOF
2087[ "$OS" = "linux" ] && echo " --with-linux=DIR Linux kernel source directory [$LINUX]"
2088[ $WITH_QT4 -eq 1 ] && echo " --with-qt-dir=DIR directory for Qt4 headers/libraries [pkgconfig]"
2089[ $WITH_GSOAP -eq 1 ] && echo " --with-gsoap-dir=PATH directory for gSOAP compiler/headers/libraries"
2090[ $WITH_GSOAP -eq 1 ] && echo " (soapcpp2 and wsdl2h, soapstd2.h, libgsoap++.a/so)"
2091[ $WITH_GSOAP -eq 1 ] && echo " --with-gsoap-import=PATH directory for gSOAP import files (stlvector.h)"
2092cat << EOF
2093 --with-openssl-dir=DIR directory for OpenSSL headers/libraries
2094 --out-path=PATH the folder to which configuration and build output
2095 should go
2096
2097Build type:
2098 -d, --build-debug build with debugging symbols and assertions
2099 --build-profile build with profiling support
2100 --build-headless build headless (without any GUI frontend)
2101EOF
2102 exit 0
2103}
2104
2105
2106#
2107# The body.
2108#
2109
2110# test if we are OSE
2111if [ $OSE -eq 1 -a -r "`cd \`dirname $0\`; pwd`/src/VBox/Devices/USB/USBProxyDevice.cpp" ]; then
2112 OSE=0
2113 # Set this as a reminder to print a log message once we know the path of the
2114 # log file
2115 NOT_OSE=1
2116fi
2117
2118# Change OS specific defaults; must be before all other stuff
2119if [ "$OS" = "darwin" ]; then
2120 WITH_SDL=0
2121 WITH_SDL_TTF=0
2122 WITH_X11=0
2123 WITH_ALSA=0
2124 WITH_PULSE=0
2125 WITH_DBUS=0
2126 WITH_KMODS=0
2127 BUILD_LIBXSLT=1
2128 BUILD_LIBXML2=1
2129 [ $OSE -eq 1 ] || BUILD_LIBCURL=1
2130 [ $OSE -eq 1 ] || BUILD_LIBSSL=1
2131fi
2132
2133
2134# scan command line options
2135for option in $*; do
2136 case "$option" in
2137 --help|-help|-h)
2138 show_help
2139 ;;
2140 --nofatal)
2141 nofatal=1
2142 ;;
2143 --env-only)
2144 ENV_ONLY=1
2145 ;;
2146 --with-gcc=*)
2147 CC=`echo $option | cut -d'=' -f2`
2148 ;;
2149 --with-g++=*)
2150 CXX=`echo $option | cut -d'=' -f2`
2151 ;;
2152 --with-kbuild=*)
2153 KBUILDDIR=`echo $option | cut -d'=' -f2`
2154 if echo $KBUILDDIR|grep -q "$INVALID_CHARS"; then
2155 echo "Error: KBUILDDIR contains invalid characters!"
2156 exit 1
2157 fi
2158 ;;
2159 --with-qt-dir=*|--with-qt4-dir=*)
2160 QT4DIR=`echo $option | cut -d'=' -f2`
2161 QT4DIR_PKGCONFIG=0
2162 ;;
2163 --with-openssl-dir=*)
2164 OPENSSLDIR=`echo $option | cut -d'=' -f2`
2165 INCCRYPTO="-I${OPENSSLDIR}/include"
2166 LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a"
2167 ;;
2168 --with-gsoap-dir=*)
2169 GSOAP=`echo $option | cut -d'=' -f2`
2170 ;;
2171 --with-gsoap-import=*)
2172 GSOAP_IMPORT=`echo $option | cut -d'=' -f2`
2173 ;;
2174 --with-iasl=*)
2175 IASL=`echo $option | cut -d'=' -f2`
2176 ;;
2177 --with-linux=*)
2178 LINUX=`echo $option | cut -d'=' -f2`
2179 ;;
2180 --with-mkisofs=*)
2181 MKISOFS=`echo $option | cut -d'=' -f2`
2182 ;;
2183 --target-arch=*)
2184 TARGET_MACHINE=`echo $option | cut -d'=' -f2`
2185 ;;
2186 --disable-xpcom)
2187 [ $WITH_XPCOM -eq 1 ] && WITH_XPCOM=0
2188 ;;
2189 --disable-python)
2190 [ $WITH_PYTHON -eq 1 ] && WITH_PYTHON=0
2191 ;;
2192 --disable-vmmraw)
2193 [ $WITH_VMMRAW -eq 1 ] && WITH_VMMRAW=0
2194 ;;
2195 --disable-sdl-ttf)
2196 [ $WITH_SDL_TTF -eq 1 ] && WITH_SDL_TTF=0
2197 ;;
2198 --disable-qt)
2199 [ $WITH_QT4 -eq 1 ] && WITH_QT4=0
2200 ;;
2201 --disable-qt4)
2202 [ $WITH_QT4 -eq 1 ] && WITH_QT4=0
2203 ;;
2204 --passive-mesa)
2205 PASSIVE_MESA=1
2206 ;;
2207 --disable-alsa)
2208 [ $WITH_ALSA -eq 1 ] && WITH_ALSA=0
2209 ;;
2210 --disable-pulse)
2211 [ $WITH_PULSE -eq 1 ] && WITH_PULSE=0
2212 ;;
2213 --enable-pulse)
2214 WITH_PULSE=2
2215 ;;
2216 --disable-dbus)
2217 [ $WITH_DBUS -eq 1 ] && WITH_DBUS=0
2218 ;;
2219 --disable-kmods)
2220 [ $WITH_KMODS -eq 1 ] && WITH_KMODS=0
2221 ;;
2222 --disable-opengl)
2223 [ $WITH_OPENGL -eq 1 ] && WITH_OPENGL=0
2224 ;;
2225 --enable-webservice)
2226 [ $WITH_GSOAP -eq 0 ] && WITH_GSOAP=1
2227 ;;
2228 --disable-hardening)
2229 WITH_HARDENING=0
2230 ;;
2231 --enable-hardening)
2232 WITH_HARDENING=2
2233 ;;
2234 --enable-vde)
2235 WITH_VDE=1
2236 ;;
2237 --build-debug|-d)
2238 BUILD_TYPE=debug
2239 ;;
2240 --build-profile)
2241 BUILD_TYPE=profile
2242 ;;
2243 --build-libxml2)
2244 BUILD_LIBXML2=1
2245 ;;
2246 --build-libxslt)
2247 BUILD_LIBXSLT=1
2248 ;;
2249 --build-libssl)
2250 BUILD_LIBSSL=1
2251 ;;
2252 --build-libcurl)
2253 BUILD_LIBCURL=1
2254 ;;
2255 --build-headless)
2256 HEADLESS=1
2257 WITH_SDL=0
2258 WITH_SDL_TTF=0
2259 WITH_X11=0
2260 WITH_OPENGL=0
2261 WITH_QT4=0
2262 ;;
2263 --ose)
2264 OSE=2
2265 ;;
2266 --odir=*)
2267 ODIR="`echo $option | cut -d'=' -f2`/"
2268 ODIR_OVERRIDE=1
2269 ;;
2270 --out-path=*)
2271 out_path="`echo $option | cut -d'=' -f2`/"
2272 if [ -d $out_path ]; then
2273 saved_path="`pwd`"
2274 cd $out_path
2275 OUT_PATH="`pwd`"
2276 cd $saved_path
2277 OUT_PATH_OVERRIDE=1
2278 if [ $ODIR_OVERRIDE -eq 0 ]; then
2279 # This variable has not *yet* been overridden. That can still happen.
2280 ODIR=$OUT_PATH/
2281 fi
2282 else
2283 echo "Error: invalid folder \"$out_path\" in option \"$option\""
2284 exit 1
2285 fi
2286 ;;
2287 --setup-wine)
2288 [ "$OS" != "darwin" ] && SETUP_WINE=1
2289 ;;
2290 *)
2291 echo
2292 echo "Unrecognized option \"$option\""
2293 echo
2294 show_help
2295 ;;
2296 esac
2297done
2298
2299LOG="$ODIR$LOG"
2300ENV="$ODIR$ENV"
2301CNF="$ODIR$CNF"
2302
2303# Print log warning about OSE if necessary
2304if [ -n "$NOT_OSE" ]; then
2305 echo "Found USB devices, assuming VBOX_OSE = FALSE" >> $LOG
2306 echo >> $LOG
2307fi
2308
2309# initialize output files
2310cat > $LOG << EOF
2311# Log file generated by
2312#
2313# '$0 $*'
2314#
2315
2316EOF
2317cat > $CNF << EOF
2318# -*- Makefile -*-
2319#
2320# automatically generated by
2321#
2322# '$0 $*'
2323#
2324# It will be completely overwritten if configure is executed again.
2325#
2326
2327EOF
2328cat > $ENV << EOF
2329#!/bin/bash
2330#
2331# automatically generated by
2332#
2333# '$0 $*'
2334#
2335# It will be completely overwritten if configure is executed again.
2336# Make sure you source this file once before you start to build VBox.
2337#
2338
2339EOF
2340
2341if [ "$BUILD_TYPE" = "debug" ]; then
2342 echo "Creating DEBUG build!" >> $LOG
2343elif [ "$BUILD_TYPE" = "profile" ]; then
2344 echo "Creating PROFILE build!" >> $LOG
2345fi
2346
2347# first determine our environment
2348check_environment
2349check_kbuild
2350
2351[ -n "$ENV_ONLY" ] && exit 0
2352
2353# append the tools directory to the default search path
2354echo "$PATH" | grep -q "$DEVDIR_BIN" || PATH="$PATH:$DEVDIR_BIN"
2355export PATH
2356
2357# if we will be writing to a different out directory then set this up now
2358if [ $OUT_PATH_OVERRIDE -eq 1 ]; then
2359 echo "AUTOCFG=$OUT_PATH/AutoConfig.kmk" >> $ENV
2360 echo "export AUTOCFG" >> $ENV
2361 echo "LOCALCFG=$OUT_PATH/LocalConfig.kmk" >> $ENV
2362 echo "export LOCALCFG" >> $ENV
2363 echo "PATH_OUT_BASE=$OUT_PATH" >> $ENV
2364 echo "export PATH_OUT_BASE" >> $ENV
2365fi
2366
2367# some things are not available in for OSE
2368if [ $OSE -ge 1 ]; then
2369 cnf_append "VBOX_OSE" "1"
2370 cnf_append "VBOX_WITH_TESTSUITE" ""
2371 cnf_append "VBOX_WITH_WIN32_ADDITIONS" ""
2372
2373 if [ "$OS" = "linux" ]; then
2374 cnf_append "VBOX_WITH_LINUX_ADDITIONS" "1"
2375 else
2376 cnf_append "VBOX_WITH_LINUX_ADDITIONS" ""
2377 fi
2378 echo >> $CNF
2379fi
2380
2381# headless
2382if [ -n "$HEADLESS" ]; then
2383 cnf_append "VBOX_HEADLESS" "1"
2384fi
2385
2386# emit disable directives corresponding to any --disable-xxx options.
2387[ $WITH_OPENGL -eq 0 ] && cnf_append "VBOX_WITH_CROGL" ""
2388[ $WITH_XPCOM -eq 0 ] && cnf_append "VBOX_WITH_MAIN" ""
2389[ $WITH_QT4 -eq 0 ] && cnf_append "VBOX_WITH_QTGUI" ""
2390[ $WITH_SDL_TTF -eq 0 ] && cnf_append "VBOX_WITH_SECURELABEL" ""
2391[ $WITH_PYTHON -eq 0 ] && cnf_append "VBOX_WITH_PYTHON" ""
2392[ $WITH_HARDENING -eq 0 ] && cnf_append "VBOX_WITHOUT_HARDENING" "1"
2393[ $WITH_HARDENING -eq 2 ] && cnf_append "VBOX_WITH_HARDENING" "2"
2394[ $WITH_VMMRAW -eq 0 ] && cnf_append "VBOX_WITH_RAW_MODE" ""
2395
2396# Darwin-specific
2397if [ "$OS" = "darwin" ]; then
2398 check_darwinversion
2399fi
2400# the tools
2401check_gcc
2402[ "$OS" != "darwin" ] && check_as86
2403[ "$OS" != "darwin" ] && check_bcc
2404[ "$OS" != "darwin" ] && check_iasl
2405# don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs
2406# [ "$OS" != "darwin" ] && check_yasm
2407[ "$OS" != "darwin" ] && check_xsltproc
2408[ $OSE -eq 0 -a "$OS" != "darwin" ] && check_mkisofs
2409
2410# the libraries
2411[ "$OS" != "darwin" ] && check_pthread
2412check_libxml2
2413[ $WITH_XPCOM -eq 1 ] && check_libxslt
2414[ $WITH_LIBIDL -eq 1 ] && check_libidl
2415check_ssl
2416check_curl
2417[ "$OS" != "darwin" ] && check_z
2418[ "$OS" != "darwin" -a "$OS" != "freebsd" ] && check_png
2419[ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam
2420[ $WITH_SDL -eq 1 ] && check_sdl
2421[ $WITH_SDL_TTF -eq 1 -a $OSE -eq 0 ] && check_sdl_ttf
2422[ $WITH_X11 -eq 1 ] && check_x
2423# TODO check for xcomposite-dev (X11/extensions/Xcomposite.h, additions only)
2424# TODO check for libxdamange-dev (X11/extensions/Xdamage.h, additions only)
2425[ $WITH_X11 -eq 1 ] && check_xcursor
2426[ $WITH_X11 -eq 1 ] && check_xinerama
2427[ $WITH_X11 -eq 1 ] && check_xrandr
2428[ $WITH_OPENGL -eq 1 ] && check_opengl
2429[ $WITH_QT4 -eq 1 ] && check_qt4
2430[ $WITH_PYTHON -eq 1 ] && check_python
2431
2432# PulseAudio
2433if [ "$OS" = "linux" -o "$OS" = "freebsd" ]; then
2434 if [ $WITH_PULSE -eq 1 ]; then
2435 check_pulse
2436 elif [ $WITH_PULSE -eq 0 ]; then
2437 cnf_append "VBOX_WITH_PULSE" ""
2438 fi
2439fi
2440
2441# Linux-specific
2442if [ "$OS" = "linux" ]; then
2443 # don't check for the static libstdc++ in the PUEL version as we build the
2444 # additions at a dedicated box
2445 [ $OSE -ge 1 ] && check_staticlibstdcxx
2446 if [ $WITH_KMODS -eq 1 ]; then
2447 check_linux
2448 else
2449 cnf_append "VBOX_LINUX_SRC" ""
2450 cnf_append "VBOX_WITH_VBOXDRV" ""
2451 cnf_append "VBOX_WITH_ADDITION_DRIVERS" ""
2452 fi
2453 if [ $WITH_ALSA -eq 1 ]; then
2454 check_alsa
2455 else
2456 cnf_append "VBOX_WITH_ALSA" ""
2457 fi
2458 if [ $WITH_DBUS -eq 0 ]; then
2459 cnf_append "VBOX_WITH_DBUS" ""
2460 fi
2461 check_libcap
2462 check_compiler_h
2463 [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
2464fi
2465
2466[ -n "$SETUP_WINE" ] && setup_wine
2467
2468if [ $OSE -ge 1 ]; then
2469 if [ $WITH_GSOAP -eq 1 ]; then
2470 check_gsoap
2471 else
2472 cnf_append "VBOX_WITH_WEBSERVICES" ""
2473 fi
2474fi
2475
2476# VDE
2477if [ "$OS" = "linux" -o "$OS" = "freebsd" ]; then
2478 if [ $WITH_VDE -eq 1 ]; then
2479 cnf_append "VBOX_WITH_VDE" "1"
2480 fi
2481fi
2482
2483# success!
2484echo
2485echo "Successfully generated '$CNF' and '$ENV'."
2486echo "Source '$ENV' once before you start to build VBox:"
2487echo ""
2488echo " source $ENV"
2489echo " kmk"
2490echo ""
2491if [ "$OS" = "linux" ]; then
2492 if [ $OUT_PATH_OVERRIDE -eq 1 ]; then
2493 vbox_out_path=$OUT_PATH
2494 else
2495 vbox_out_path=./out
2496 fi
2497 echo "To compile the kernel modules, do:"
2498 echo ""
2499 echo " cd $vbox_out_path/$OS.$TARGET_MACHINE/$BUILD_TYPE/bin/src"
2500 echo " make"
2501 echo ""
2502fi
2503if [ $WITH_HARDENING -gt 0 ]; then
2504 echo ""
2505 echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
2506 echo " Hardening is enabled which means that the VBox binaries will not run from"
2507 echo " the binary directory. The binaries have to be installed suid root and some"
2508 echo " more prerequisites have to be fulfilled which is normally done by installing"
2509 echo " the final package. For development, the hardening feature can be disabled"
2510 echo " by specifying the --disable-hardening parameter. Please never disable that"
2511 echo " feature for the final distribution!"
2512 echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
2513 echo ""
2514else
2515 echo ""
2516 echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
2517 echo " Hardening is disabled. Please do NOT build packages for distribution with"
2518 echo " disabled hardening!"
2519 echo " +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++"
2520 echo ""
2521fi
2522echo "Enjoy!"
2523cleanup
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette