VirtualBox

source: vbox/trunk/configure@ 29901

Last change on this file since 29901 was 28938, checked in by vboxsync, 15 years ago

configure: really disable OpenGL with --disable-opengl

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