VirtualBox

source: vbox/trunk/configure@ 4902

Last change on this file since 4902 was 4902, checked in by vboxsync, 17 years ago

add /usr/local to the default search path of xalan and xerces

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 33.8 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-2007 innotek GmbH
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 as published by the Free Software Foundation,
12# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13# distribution. VirtualBox OSE is distributed in the hope that it will
14# 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"
24
25#
26# Defaults
27#
28OSE=1
29TARGET_MACHINE=""
30TARGET_CPU=""
31WITH_XPCOM=1
32WITH_LIBIDL=1
33WITH_QT=1
34WITH_SDL_TTF=1
35CC="gcc"
36CC32=""
37CC64=""
38CXX="g++"
39CXX32=""
40CXX64=""
41BCC="bcc"
42YASM="yasm"
43IASL="iasl"
44AS86="as86"
45XSLTPROC="xsltproc"
46GENISOIMAGE="genisoimage"
47MKISOFS="mkisofs"
48INCXALAN="/usr/local/include"
49LIBXALAN="-lxalan-c"
50LIBXALAN_DIR="/usr/local/lib"
51INCXERCES="/usr/local/include"
52LIBXERCES="-lxerces-c"
53LIBXERCES_DIR="/usr/local/lib"
54LIBCRYPTO="-lcrypto"
55LIBPTHREAD="-lpthread"
56LIBX11="-L/usr/X11R6/lib -L/usr/X11R6/lib64 -lXext -lX11"
57LIBXCURSOR="-lXcursor"
58INCZ=""
59LIBZ="-lz"
60INCPNG=""
61LIBPNG="-lpng"
62QTDIR="/usr/qt/3 /usr/lib/qt3 /usr/lib/qt-3.3 /usr/share/qt3 /usr/lib64/qt-3.3 /usr/X11R6"
63KBUILDDIR="`cd \`dirname $0\`; pwd`/kBuild"
64DEVDIR="`cd \`dirname $0\`; pwd`/tools"
65if [ -d "/lib/modules/`uname -r`/build" ]; then
66 LINUX="/lib/modules/`uname -r`/build"
67else
68 LINUX="/usr/src/linux"
69fi
70KCHMVIEWER="kchmviewer"
71LOG="configure.log"
72CNF="AutoConfig.kmk"
73ENV="env.sh"
74BUILD_TYPE="release"
75# the restricting tool is ar (mri mode).
76INVALID_CHARS="[^A-Za-z0-9/\\$:._-]"
77
78if (cd `dirname $0`; pwd)|grep -q "$INVALID_CHARS"; then
79 echo "Error: VBox base path contains invalid characters!"
80 exit 1
81fi
82
83cleanup()
84{
85 rm -f .tmp_src.cc .tmp_src.c .tmp_out .test_execute.log
86}
87
88fail()
89{
90 if [ -z "$nofatal" -o "x$1" != "x" ]; then
91 cleanup
92 rm -f $ENV
93 exit 1
94 fi
95}
96
97log_success()
98{
99 if [ -n "$1" ]; then echo -n "$1, "; fi
100 echo "OK."
101 echo "$1" >> $LOG
102 echo >> $LOG
103 echo >> $LOG
104}
105
106log_failure()
107{
108 echo
109 echo " ** $1!"
110 echo "** $1!" >> $LOG
111 echo >> $LOG
112}
113
114cnf_append()
115{
116 printf "%-30s := %s\n" "$1" "$2" >> $CNF
117}
118
119strip_l()
120{
121 echo "$1"|$KBUILD_SED 's|-l\([^ ]\+\)|\1|g; s|-[^l]\([^ ]\+\)||g; s|^ ||; s| *$||g'
122}
123
124strip_L()
125{
126 echo "$1"|$KBUILD_SED 's|-L\([^ ]\+\)|\1|g; s|-[^L]\([^ ]\+\)||g; s|^ ||; s| *$||g'
127}
128
129strip_I()
130{
131 echo "$1"|$KBUILD_SED 's|-I\([^ ]\+\)|\1|g; s|-[^I]\([^ ]\+\)||g; s|^ ||; s| *$||g'
132}
133
134prefix_I()
135{
136 echo "$1"|$KBUILD_SED 's|^\/|-I/|g; s| \/| -I/|g'
137}
138
139# Wrapper for ancient /usr/bin/which on darwin that always returns 0
140which_wrapper()
141{
142 if [ -z "$have_ancient_which" ]; then
143 if which /bin/___cErTaINly_a_nOn_eXisTing_fIle___ 2> /dev/null > /dev/null; then
144 have_ancient_which="yes"
145 else
146 have_ancient_which="no"
147 fi
148 fi
149 if [ "$have_ancient_which" = "yes" ]; then
150 retval=`which $* 2>/dev/null`
151 echo "$retval"
152 test -n "$retval" -a -e "$retval"
153 unset retval
154 else
155 which $* 2> /dev/null
156 fi
157}
158
159check_avail()
160{
161 if [ -z "$1" ]; then
162 log_failure "$2 is empty"
163 fail $3
164 return 1
165 elif which_wrapper $1 > /dev/null; then
166 return 0
167 else
168 log_failure "$1 (variable $2) not found"
169 fail $3
170 return 1
171 fi
172}
173
174# Prepare a test
175test_header()
176{
177 echo "***** Checking $1 *****" >> $LOG
178 echo -n "Checking for $1: "
179}
180
181# Compile a test
182test_compile()
183{
184 echo "compiling the following source file:" >> $LOG
185 cat .tmp_src.cc >> $LOG
186 echo "using the following command line:" >> $LOG
187 echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc \"$1\"" >> $LOG
188 $CXX -O -Wall -o .tmp_out .tmp_src.cc $1 >> $LOG 2>&1
189 if [ $? -ne 0 ]; then
190 if [ -z "$4" ]; then
191 echo
192 echo " $2 not found at $1 or $3 headers not found"
193 echo " Check the file $LOG for detailed error information."
194 fail
195 else
196 echo "not found."
197 echo >> $LOG
198 echo >> $LOG
199 fi
200 return 1
201 fi
202 return 0
203}
204
205# Execute a compiled test binary
206test_execute()
207{
208 echo "executing the binary" >> $LOG
209 ./.tmp_out > .test_execute.log
210 rc=$?
211 cat .test_execute.log | tee -a $LOG
212 if [ $rc -ne 0 ]; then
213 fail $1
214 return 1
215 fi
216 echo >> $LOG
217 echo >> $LOG
218 return 0
219}
220
221#
222# Check for OS, MACHINE, CPU
223#
224check_environment()
225{
226 test_header environment
227 BUILD_CPU=`uname -m`
228 case "$BUILD_CPU" in
229 i[3456789]86|x86|i86pc)
230 BUILD_MACHINE='x86'
231 LIB='lib'
232 ;;
233 x86_64|amd64)
234 BUILD_MACHINE='amd64'
235 BUILD_CPU='k8'
236 # on AMD64 systems, 64bit libs are usually located in /usr/lib64
237 # see http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64
238 LIB='lib64'
239 ;;
240 *)
241 log_failure "Cannot determine system"
242 exit 1
243 ;;
244 esac
245 [ -z "$TARGET_MACHINE" ] && TARGET_MACHINE=$BUILD_MACHINE
246 [ -z "$TARGET_CPU" ] && TARGET_CPU=$BUILD_CPU
247 OS=`uname -s | sed -e 's/GNU\/Linux/Linux/g' | tr [:upper:] [:lower:]`
248 case "$OS" in
249 linux)
250 ;;
251 darwin)
252 ;;
253 freebsd)
254 ;;
255 sunos)
256 OS='solaris'
257 ;;
258 *)
259 log_failure "Cannot determine OS"
260 exit 1
261 ;;
262 esac
263 DEVDIR_BIN="$DEVDIR/$OS.$BUILD_MACHINE/bin"
264 KBUILDDIR_BIN="$KBUILDDIR/bin/$OS.$BUILD_MACHINE"
265 KBUILD_SED="$KBUILDDIR_BIN/kmk_sed"
266 log_success "Determined build machine: $OS.$BUILD_MACHINE, target machine: $OS.$TARGET_MACHINE"
267
268 # Automatically disable XPCOM on darwin.
269 if [ "$OS" = "darwin" -a $WITH_XPCOM -eq 1 ]; then
270 WITH_XPCOM=0
271 WITH_LIBIDL=0
272 WITH_QT=0
273 echo "Disabling checks for XPCOM related components."
274 fi
275}
276
277#
278# Check for gcc with version >= 3.2.
279# We depend on a working gcc, if we fail terminate in every case.
280#
281check_gcc()
282{
283 test_header gcc
284 if check_avail "$CC" CC really; then
285 cc_ver=`$CC -dumpversion`
286 if check_avail "$CXX" CXX really; then
287 cxx_ver=`$CXX -dumpversion`
288 cc_maj=`echo $cc_ver|cut -d. -f1`
289 cc_min=`echo $cc_ver|cut -d. -f2`
290 if [ "x$cc_ver" != "x$cxx_ver" ]; then
291 log_failure "gcc version $cc_ver does not match g++ version $cxx_ver"
292 fail really
293 elif [ $cc_maj -eq 4 -a $cc_min -eq 0 ]; then
294 if [ "$OS" = "darwin" ]; then
295 log_success "found version $cc_ver"
296 else
297 log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with x>0"
298 fail really
299 fi
300 elif [ $cc_maj -gt 3 ]; then
301 log_success "found version $cc_ver"
302 elif [ $cc_maj -lt 3 -o $cc_min -lt 2 ]; then
303 log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with x>0"
304 fail really
305 else
306 log_success "found version $cc_ver"
307 fi
308 if [ "$BUILD_MACHINE" = "amd64" ]; then
309 [ -z "$CC32" ] && CC32="$CC -m32"
310 [ -z "$CXX32" ] && CXX32="$CXX -m32"
311 else
312 [ -z "$CC32" ] && CC32="$CC"
313 [ -z "$CXX32" ] && CXX32="$CXX"
314 fi
315 if [ "$BUILD_MACHINE" = "x86" -a "$TARGET_MACHINE" = "amd64" ]; then
316 [ -z "$CC64" ] && CC64="$CC -m64"
317 [ -z "$CXX64" ] && CXX64="$CXX -m64"
318 fi
319 if [ "$CC" != "gcc" ]; then
320 cnf_append "TOOL_GCC3_CC" "$CC"
321 cnf_append "TOOL_GCC3_AS" "$CC"
322 cnf_append "TOOL_GCC3_LD" "$CC"
323 cnf_append "TOOL_GXX3_CC" "$CC"
324 cnf_append "TOOL_GXX3_AS" "$CC"
325 fi
326 if [ "$CXX" != "g++" ]; then
327 cnf_append "TOOL_GCC3_CXX" "$CXX"
328 cnf_append "TOOL_GXX3_CXX" "$CXX"
329 cnf_append "TOOL_GXX3_LD" "$CXX"
330 fi
331 if [ "$CC32" != "gcc -m32" ]; then
332 cnf_append "TOOL_GCC32_CC" "$CC32"
333 cnf_append "TOOL_GCC32_AS" "$CC32"
334 cnf_append "TOOL_GCC32_LD" "$CC32"
335 cnf_append "TOOL_GXX32_CC" "$CC32"
336 cnf_append "TOOL_GXX32_AS" "$CC32"
337 fi
338 if [ "$CXX32" != "g++ -m32" ]; then
339 cnf_append "TOOL_GCC32_CXX" "$CXX32"
340 cnf_append "TOOL_GXX32_CXX" "$CXX32"
341 cnf_append "TOOL_GXX32_LD" "$CXX32"
342 fi
343 if [ -n "$CC64" ]; then
344 cnf_append "TOOL_GCC64_CC" "$CC64"
345 cnf_append "TOOL_GCC64_AS" "$CC64"
346 cnf_append "TOOL_GCC64_LD" "$CC64"
347 cnf_append "TOOL_GXX64_CC" "$CC64"
348 cnf_append "TOOL_GXX64_AS" "$CC64"
349 fi
350 if [ -n "$CXX64" ]; then
351 cnf_append "TOOL_GCC64_CXX" "$CXX64"
352 cnf_append "TOOL_GXX64_CXX" "$CXX64"
353 cnf_append "TOOL_GXX64_LD" "$CXX64"
354 fi
355 fi
356 fi
357}
358
359#
360# Check for the bcc compiler, needed for compiling the BIOS
361#
362check_bcc()
363{
364 test_header bcc
365 if check_avail "$BCC" BCC; then
366 bcc_ver=`$BCC -v 2>&1|grep version|sed 's+^bcc: version \(.*\)+\1+'`
367 if [ $? -ne 0 ]; then
368 log_failure "not found"
369 fail
370 else
371 echo "compiling the following source file:" >> $LOG
372 cat > .tmp_src.c << EOF
373int foo(a)
374 int a;
375{
376 return 0;
377}
378EOF
379 cat .tmp_src.c >> $LOG
380 bcc_path=`which_wrapper $BCC`
381 bcc_dir="`dirname $bcc_path`/"
382 echo "using the following command line:" >> $LOG
383 echo "$BCC -B $bcc_dir -C-c -3 -S -o .tmp_out .tmp_src.c" >> $LOG
384 $BCC -B $bcc_dir -C-c -3 -S -o .tmp_out .tmp_src.c >> $LOG 2>&1
385 if [ $? -ne 0 ]; then
386 log_failure "not found"
387 fail
388 else
389 log_success "found version $bcc_ver"
390 cnf_append "VBOX_BCC" "$bcc_path -B $bcc_dir"
391 fi
392 unset bcc_path
393 unset bcc_dir
394 fi
395 fi
396}
397
398#
399# Check for the as86 assembler, needed for compiling the BIOS
400#
401check_as86()
402{
403 test_header as86
404 if check_avail "$AS86" AS86; then
405 as86_ver=`$AS86 -v 2>&1|grep version|sed 's+^as86 version: \(.*\)+\1+'`
406 if [ $? -ne 0 ]; then
407 log_failure "not found"
408 fail
409 else
410 log_success "found version $as86_ver"
411 cnf_append "VBOX_AS86" "`which_wrapper $AS86`"
412 fi
413 fi
414}
415
416#
417# Check for yasm, needed to compile assembler files
418#
419check_yasm()
420{
421 test_header yasm
422 if check_avail "$YASM" YASM; then
423 yasm_ver=`$YASM --version|grep "^yasm"|sed 's+^yasm \(.*\)+\1+'`
424 if [ $? -ne 0 ]; then
425 log_failure "not found"
426 fail
427 else
428 yasm_maj=`echo $yasm_ver|cut -d. -f1`
429 yasm_min=`echo $yasm_ver|cut -d. -f2`
430 yasm_rev=`echo $yasm_ver|cut -d. -f3`
431 yasm_ver_mul=`expr $yasm_maj \* 10000 + $yasm_min \* 100 + $yasm_rev`
432 if [ $yasm_ver_mul -lt 501 ]; then
433 log_failure "found version $yasm_ver, expected at least 0.5.1"
434 fail
435 else
436 log_success "found version $yasm_ver"
437 fi
438 fi
439 fi
440}
441
442#
443# Check for the iasl ACPI compiler, needed to compile vbox.dsl
444#
445check_iasl()
446{
447 test_header iasl
448 if check_avail "$IASL" IASL; then
449 iasl_ver=`$IASL|grep version|sed 's+^ASL.*version \([0-9]*\).*+\1+'`
450 if [ $? -ne 0 ]; then
451 log_failure "not found"
452 fail
453 else
454 log_success "found version $iasl_ver"
455 cnf_append "VBOX_IASLCMD" "`which_wrapper $IASL`"
456 fi
457 fi
458}
459
460#
461# Check for xsltproc, needed by Main
462#
463check_xsltproc()
464{
465 test_header xslt
466 if check_avail "$XSLTPROC" XSLTPROC; then
467 xsltproc_ver=`$XSLTPROC --version`
468 if [ $? -ne 0 ]; then
469 log_failure "not found"
470 fail
471 else
472 log_success "found"
473 cnf_append "VBOX_XSLTPROC" "`which_wrapper $XSLTPROC`"
474 fi
475 fi
476}
477
478#
479# Check for mkisofs, needed to build the CDROM image containing the additions
480#
481check_mkisofs()
482{
483 test_header mkisofs
484 if which_wrapper $GENISOIMAGE > /dev/null; then
485 mkisofs_ver=`$GENISOIMAGE --version`
486 if [ $? -ne 0 ]; then
487 log_failure "not found"
488 fail
489 else
490 log_success "found $mkisofs_ver"
491 cnf_append "VBOX_MKISOFS" "`which_wrapper $GENISOIMAGE`"
492 fi
493 elif check_avail "$MKISOFS" MKISOFS; then
494 mkisofs_ver=`$MKISOFS --version`
495 if [ $? -ne 0 ]; then
496 log_failure "not found"
497 fail
498 else
499 log_success "found $mkisofs_ver"
500 cnf_append "VBOX_MKISOFS" "`which_wrapper $MKISOFS`"
501 fi
502 fi
503}
504
505#
506# Check for xalan, needed by VBoxXML
507#
508check_xalan()
509{
510 if [ -n "$LIBXALAN" ]; then
511 test_header xalan
512 cat > .tmp_src.cc << EOF
513#include <cstdio>
514#include <xalanc/Include/XalanVersion.hpp>
515extern "C" int main(void)
516{
517 printf("found version %d.%d.%d",
518 XALAN_VERSION_MAJOR, XALAN_VERSION_MINOR, XALAN_VERSION_REVISION);
519#if _XALAN_VERSION >= 10800
520 printf(", OK.\n");
521 return 0;
522#else
523 printf(", expected version 1.8.0 or higher\n");
524 return 1;
525#endif
526}
527EOF
528 [ -n "$INCXALAN" ] && I_INCXALAN=`prefix_I "$INCXALAN"`
529 if test_compile "$LIBXALAN $LIBPTHREAD $I_INCXALAN" xalan xalanc; then
530 if test_execute; then
531 cnf_append "SDK_VBOX_XALAN_LIBS" "`strip_l "$LIBXALAN"`"
532 cnf_append "SDK_VBOX_XALAN_LIBPATH" "`strip_L "$LIBXALAN"`"
533 cnf_append "SDK_VBOX_XALAN_INCS" "$INCXALAN"
534 fi
535 fi
536 else
537 echo "Building xalan from shipped sources."
538 echo "Building xalan from shipped sources." >> $LOG
539 echo >> $LOG
540 echo >> $LOG
541 fi
542}
543
544#
545# Check for xerces, needed by VBoxXML
546#
547check_xerces()
548{
549 if [ -n "$LIBXERCES" ]; then
550 test_header xerces
551 cat > .tmp_src.cc << EOF
552#include <cstdio>
553#include <xercesc/util/XercesVersion.hpp>
554extern "C" int main(void)
555{
556 printf("found version %d.%d.%d",
557 XERCES_VERSION_MAJOR, XERCES_VERSION_MINOR, XERCES_VERSION_REVISION);
558#if _XERCES_VERSION >= 20500
559 printf(", OK.\n");
560 return 0;
561#else
562 printf(", expected version 2.5.0 or higher");
563 return 1;
564#endif
565}
566EOF
567 [ -n "$INCXERCES" ] && I_INCXERCES=`prefix_I "$INCXERCES"`
568 if test_compile "$LIBXERCES $LIBPTHREAD $I_INCXERCES" xerces xercesc; then
569 if test_execute; then
570 cnf_append "SDK_VBOX_XERCES_LIBS" "`strip_l "$LIBXERCES"`"
571 cnf_append "SDK_VBOX_XERCES_LIBPATH" "`strip_L "$LIBXERCES"`"
572 cnf_append "SDK_VBOX_XERCES_INCS" "$INCXERCES"
573 fi
574 fi
575 else
576 echo "Building xerces from shipped sources."
577 echo "Building xerces from shipped sources." >> $LOG
578 echo >> $LOG
579 echo >> $LOG
580 fi
581}
582
583#
584# Check for libIDL, needed by xpcom
585#
586check_libidl()
587{
588 test_header libIDL
589
590 if which_wrapper libIDL-config-2 > /dev/null; then
591 libidl_ver=`libIDL-config-2 --version`
592 if [ $? -ne 0 ]; then
593 log_failure "not found"
594 fail
595 else
596 log_success "found version $libidl_ver"
597 cnf_append "VBOX_LIBIDL_CONFIG" \
598 "PKG_CONFIG_PATH=`libIDL-config-2 --prefix`/$LIB/pkgconfig `which_wrapper libIDL-config-2`"
599 fi
600 elif check_avail "libIDL-config" libIDL-config; then
601 libidl_ver=`libIDL-config --version`
602 if [ $? -ne 0 ]; then
603 log_failure "not found"
604 fail
605 else
606 log_success "found version $libidl_ver"
607 cnf_append "VBOX_LIBIDL_CONFIG" "`which_wrapper libIDL-config`"
608 fi
609 fi
610}
611
612#
613# Check for openssl, needed for RDP
614#
615check_ssl()
616{
617 test_header ssl
618 cat > .tmp_src.cc << EOF
619#include <cstdio>
620#include <openssl/opensslv.h>
621extern "C" int main(void)
622{
623 printf("found version %s", OPENSSL_VERSION_TEXT);
624#if OPENSSL_VERSION_NUMBER >= 0x0090700
625 printf(", OK.\n");
626 return 0;
627#else
628 printf(", expected version 0.9.7 or higher\n");
629 return 1;
630#endif
631}
632EOF
633 if test_compile $LIBCRYPTO libcrypto openssl; then
634 if test_execute nofatal; then
635 cnf_append "SDK_VBOX_OPENSSL_INCS" ""
636 cnf_append "SDK_VBOX_OPENSSL_LIBS" "`strip_l "$LIBCRYPTO"`"
637 fi
638 fi
639}
640
641#
642# Check for pthread, needed by VBoxSVC, frontends, ...
643#
644check_pthread()
645{
646 test_header pthread
647 cat > .tmp_src.cc << EOF
648#include <cstdio>
649#include <pthread.h>
650extern "C" int main(void)
651{
652 pthread_mutex_t mutex;
653 if (pthread_mutex_init(&mutex, NULL)) {
654 printf("pthread_mutex_init() failed\n");
655 return 1;
656 }
657 if (pthread_mutex_lock(&mutex)) {
658 printf("pthread_mutex_lock() failed\n");
659 return 1;
660 }
661 if (pthread_mutex_unlock(&mutex)) {
662 printf("pthread_mutex_unlock() failed\n");
663 return 1;
664 }
665 printf("found, OK.\n");
666}
667EOF
668 if test_compile $LIBPTHREAD pthread pthread; then
669 if test_execute; then
670 cnf_append "LIB_PTHREAD" "`strip_l "$LIBPTHREAD"`"
671 fi
672 fi
673}
674
675#
676# Check for zlib, needed by VBoxSVC, Runtime, ...
677#
678check_z()
679{
680 test_header zlib
681 cat > .tmp_src.cc << EOF
682#include <cstdio>
683#include <zlib.h>
684extern "C" int main(void)
685{
686 printf("found version %s", ZLIB_VERSION);
687#if ZLIB_VERNUM >= 0x1210
688 printf(", OK.\n");
689 return 0;
690#else
691 printf(", expected version 1.2.1 or higher\n");
692 return 1;
693#endif
694}
695EOF
696 [ -n "$INCZ" ] && I_INCZ=`prefix_I "$INCZ"`
697 if test_compile "$LIBZ $I_INCZ" zlib zlib; then
698 if test_execute; then
699 cnf_append "SDK_VBOX_ZLIB_LIBS" "`strip_l "$LIBZ"`"
700 cnf_append "SDK_VBOX_ZLIB_INCS" "$INCZ"
701 fi
702 fi
703}
704
705#
706# Check for libpng, needed by kchmviewer
707#
708check_png()
709{
710 test_header libpng
711 cat > .tmp_src.cc << EOF
712#include <cstdio>
713#include <png.h>
714extern "C" int main(void)
715{
716 printf("found version %s", PNG_LIBPNG_VER_STRING);
717#if PNG_LIBPNG_VER >= 10205
718 printf(", OK.\n");
719 return 0;
720#else
721 printf(", expected version 1.2.5 or higher\n");
722 return 1;
723#endif
724}
725EOF
726 [ -n "$INCPNG" ] && I_INCPNG=`prefix_I "$INCPNG"`
727# if test_compile "$LIBPNG $I_INCPNG" libpng libpng nofatal; then
728 if test_compile "$LIBPNG $I_INCPNG" libpng libpng; then
729# if test_execute nofatal; then
730 if test_execute; then
731 cnf_append "SDK_VBOX_LIBPNG_LIBS" "`strip_l "$LIBPNG"`"
732 cnf_append "SDK_VBOX_LIBPNG_INCS" "$INCPNG"
733 fi
734 fi
735}
736
737#
738# Check for pam, needed by VRDPAuth
739# Version 79 was introduced in 9/2005, do we support older versions?
740# Debian/sarge uses 76
741# OpenSUSE comes with 0.99.xxx where they changed the versioning scheme.
742#
743check_pam()
744{
745 test_header pam
746 cat > .tmp_src.cc << EOF
747#include <cstdio>
748#include <security/pam_appl.h>
749extern "C" int main(void)
750{
751 printf("found version %d", __LIBPAM_VERSION);
752 if (__LIBPAM_VERSION >= 76)
753 {
754 printf(", OK.\n");
755 return 0;
756 }
757 else
758 {
759 printf(", expected version 76 or higher\n");
760 return 1;
761 }
762}
763EOF
764 if test_compile "-lpam" pam pam nofatal; then
765 if test_execute nofatal; then
766 return 0;
767 fi
768 fi
769 test_header linux_pam
770 cat > .tmp_src.cc << EOF
771#include <cstdio>
772#include <security/pam_appl.h>
773extern "C" int main(void)
774{
775 printf("found version %d.%d", __LINUX_PAM__, __LINUX_PAM_MINOR__);
776 if (__LINUX_PAM__ >= 1)
777 {
778 printf(", OK.\n");
779 return 0;
780 }
781 else
782 {
783 printf(", expected version 1.0 or higher\n");
784 return 1;
785 }
786}
787EOF
788 if test_compile "-lpam" pam pam; then
789 test_execute
790 fi
791}
792
793
794#
795# Check for the SDL library, needed by VBoxSDL and VirtualBox
796# We depend at least on version 1.2.7
797#
798check_sdl()
799{
800 test_header SDL
801 if which_wrapper sdl-config > /dev/null; then
802 FLGSDL=`sdl-config --cflags`
803 INCSDL=`strip_I "$FLGSDL"`
804 LIBSDL=`sdl-config --libs`
805 LIBSDLMAIN="-lSDLmain"
806 cat > .tmp_src.cc << EOF
807#include <cstdio>
808#include <SDL/SDL.h>
809#include <SDL/SDL_main.h>
810extern "C" int main(void)
811{
812 printf("found version %d.%d.%d",
813 SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
814#if SDL_VERSION_ATLEAST(1,2,7)
815 printf(", OK.\n");
816 return 0;
817#else
818 printf(", expected version 1.2.7 or higher\n");
819 return 1;
820#endif
821}
822EOF
823 [ -n "$INCSDL" ] && I_INCSDL=`prefix_I "$INCSDL"`
824 if test_compile "$LIBSDL $LIBSDLMAIN $I_INCSDL" SDL SDL; then
825 if test_execute; then
826 cnf_append "LIB_SDK_LIBSDL_SDL" "`strip_l "$LIBSDL"`"
827 cnf_append "SDK_LIBSDL_LIBPATH" "`strip_L "$LIBSDL"`"
828 cnf_append "LIB_SDK_LIBSDL_SDLMAIN" "`strip_l "$LIBSDLMAIN"`"
829 [ -n "$INCSDL" ] && cnf_append "SDK_LIBSDL_INCS" "$INCSDL"
830 fi
831 fi
832 else
833 log_failure "not found"
834 fi
835}
836
837#
838# Check for the SDL_ttf library, needed by VBoxSDL (secure label)
839#
840check_sdl_ttf()
841{
842 test_header SDL_ttf
843 cat > .tmp_src.cc << EOF
844#include <cstdio>
845#include <SDL/SDL_ttf.h>
846#ifndef SDL_TTF_MAJOR_VERSION
847#define SDL_TTF_MAJOR_VERSION TTF_MAJOR_VERSION
848#define SDL_TTF_MINOR_VERSION TTF_MINOR_VERSION
849#define SDL_TTF_PATCHLEVEL TTF_PATCHLEVEL
850#endif
851extern "C" int main(void)
852{
853 printf("found version %d.%d.%d",
854 SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, SDL_TTF_PATCHLEVEL);
855#if 10000*SDL_TTF_MAJOR_VERSION + 100*SDL_TTF_MINOR_VERSION + SDL_TTF_PATCHLEVEL >= 20006
856 printf(", OK.\n");
857 return 0;
858#else
859 printf(", expected version 2.0.6 or higher\n");
860 return 1;
861#endif
862}
863EOF
864 if test_compile "-lSDL_ttf" SDL_ttf SDL_ttf; then
865 test_execute
866 fi
867}
868
869#
870# Check for libasound, needed by the ALSA audio backend
871#
872check_alsa()
873{
874 test_header ALSA
875 cat > .tmp_src.cc << EOF
876#include <alsa/asoundlib.h>
877extern "C" int main(void)
878{
879 printf("found version %d.%d.%d",
880 SND_LIB_MAJOR, SND_LIB_MINOR, SND_LIB_SUBMINOR);
881#if 10000*SND_LIB_MAJOR + 100*SND_LIB_MINOR + SND_LIB_SUBMINOR >= 10006
882 printf(", OK.\n");
883 return 0;
884#else
885 printf(", expected version 1.0.6 or higher\n");
886 return 1;
887#endif
888}
889EOF
890 if test_compile "-lasound" asound asound; then
891 test_execute
892 fi
893}
894
895#
896# Check for the Xcursor library, needed by VBoxSDL and VBoxBFE
897#
898check_xcursor()
899{
900 test_header Xcursor
901 cat > .tmp_src.cc << EOF
902#include <cstdio>
903#include <X11/Xlib.h>
904#include <X11/Xcursor/Xcursor.h>
905extern "C" int main(void)
906{
907 XcursorImage *cursor = XcursorImageCreate (10, 10);
908 XcursorImageDestroy(cursor);
909 return 0;
910}
911EOF
912 if test_compile "$LIBX11 $LIBXCURSOR" Xcursor Xcursor; then
913 log_success "found"
914 cnf_append "LIB_XCURSOR" "`strip_l "$LIBXCURSOR"`"
915 fi
916}
917
918#
919# Check for the X libraries (Xext, X11)
920#
921check_x()
922{
923 test_header "X libraries"
924 cat > .tmp_src.cc << EOF
925#include <cstdio>
926#include <X11/Xlib.h>
927extern "C" int main(void)
928{
929 Display *dpy;
930 int scrn_num;
931 Screen *scrn;
932 Window win;
933
934 dpy = XOpenDisplay(NULL);
935 scrn_num = DefaultScreen(dpy);
936 scrn = ScreenOfDisplay(dpy, scrn_num);
937 win = XCreateWindow(dpy, RootWindowOfScreen(scrn), 0, 0, 100, 100,
938 0, 16, InputOutput, CopyFromParent, 0, NULL);
939 XDestroyWindow(dpy, win);
940}
941EOF
942 if test_compile "$LIBX11" Xlibs Xlibs; then
943 log_success "found"
944 fi
945}
946
947#
948# Check for the QT library, needed by VirtualBox
949#
950check_qt()
951{
952 test_header Qt
953 cat > .tmp_src.cc << EOF
954#include <cstdio>
955#include <qglobal.h>
956extern "C" int main(void)
957{
958 printf("found version %s", QT_VERSION_STR);
959#if QT_VERSION >= 0x030305
960 printf(", OK.\n");
961 return 0;
962#elif QT_VERSION >= 0x030300
963 printf("\n ** WARNING: QT < 3.3.5 has known problems!\n");
964#else
965 printf(", expected version 3.3.0 or higher\n");
966 return 1;
967#endif
968}
969EOF
970 found_qt=0
971 libs="lib"
972 [ "$LIB" = "lib64" ] && libs="$libs lib64"
973 for q in $QTDIR; do
974 for l in $libs; do
975 echo "compiling the following source file:" >> $LOG
976 cat .tmp_src.cc >> $LOG
977 echo "using the following command line:" >> $LOG
978 echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc -I$q/include -L$q/$l -lqt-mt $LIBPTHREAD" >> $LOG
979 $CXX -O -Wall -o .tmp_out .tmp_src.cc -I$q/include -L$q/$l -lqt-mt $LIBPTHREAD >> $LOG 2>&1
980 if [ $? -eq 0 ]; then
981 if test_execute; then
982 cnf_append "QTDIR" "`cd $q ; pwd`"
983 found_qt=1
984 break
985 fi
986 fi
987 done
988 if [ $found_qt -eq 1 ]; then
989 break
990 fi
991 done
992 if [ $found_qt -ne 1 ]; then
993 echo
994 echo " Qt not found at \"$QTDIR\" or Qt headers not found"
995 echo " Check the file $LOG for detailed error information."
996 fail
997 return 1
998 fi
999 test_header "Qt devtools"
1000 if check_avail "$q/bin/moc" QTDIR/bin; then
1001 moc_ver=`$q/bin/moc 2>&1 -v|sed 's+^.*(Qt \(.*\))+\1+'`
1002 if [ $? -ne 0 ]; then
1003 log_failure "not found"
1004 fail
1005 else
1006 log_success "found version $moc_ver"
1007 fi
1008 fi
1009}
1010
1011#
1012# Check for Linux sources
1013#
1014check_linux()
1015{
1016 test_header "Linux kernel sources"
1017 cat > .tmp_src.c << EOF
1018#include <linux/version.h>
1019int printf(const char *format, ...);
1020int main(void)
1021{
1022 printf("found version %d.%d.%d", LINUX_VERSION_CODE / 65536,
1023 (LINUX_VERSION_CODE % 65536) / 256,
1024 LINUX_VERSION_CODE % 256);
1025#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
1026 printf(", OK.\n");
1027 return 0;
1028#else
1029 printf(", expected version 2.4.0 or higher\n");
1030 return 1;
1031#endif
1032}
1033EOF
1034 echo "compiling the following source file:" >> $LOG
1035 cat .tmp_src.c >> $LOG
1036 echo "using the following command line:" >> $LOG
1037 echo "$CC -O -Wall -o .tmp_out .tmp_src.c -nostdinc -I$LINUX/include" >> $LOG
1038 $CC -O -Wall -o .tmp_out .tmp_src.c -nostdinc -I$LINUX/include >> $LOG 2>&1
1039 if [ $? -ne 0 ]; then
1040 echo
1041 echo " Linux kernel headers not found at $LINUX"
1042 echo " Check the file $LOG for detailed error information."
1043 fail
1044 else
1045 if test_execute; then
1046 cnf_append "VBOX_LINUX_SRC" "`cd $LINUX ; pwd`"
1047 fi
1048 fi
1049}
1050
1051#
1052# Check for kchmviewer, needed to display the online help
1053#
1054check_kchmviewer()
1055{
1056 test_header kchmviewer
1057 if check_avail "$KCHMVIEWER" KCHMVIEWER; then
1058 kchmviewer_ver=`$KCHMVIEWER --version|grep "^KchmViewer:"|sed 's+^KchmViewer: \(.*\)+\1+'`
1059 if [ $? -ne 0 ]; then
1060 log_failure "not found"
1061 fail
1062 else
1063 log_success "found version $kchmviewer_ver"
1064 fi
1065 fi
1066}
1067
1068#
1069# Check for the kBuild tools, we don't support GNU make
1070#
1071check_kbuild()
1072{
1073 test_header kBuild
1074 if check_avail "$KBUILDDIR_BIN/kmk" KBUILDDIR really; then
1075 log_success "found"
1076 echo "export BUILD_PLATFORM=\"$OS\"" >> $ENV
1077 echo "export BUILD_PLATFORM_ARCH=\"$BUILD_MACHINE\"" >> $ENV
1078 echo "export BUILD_TARGET=\"$OS\"" >> $ENV
1079 echo "export BUILD_TARGET_ARCH=\"$TARGET_MACHINE\"" >> $ENV
1080 echo "export BUILD_TARGET_CPU=\"$TARGET_CPU\"" >> $ENV
1081 echo "export BUILD_TYPE=\"$BUILD_TYPE\"" >> $ENV
1082 echo "export PATH_KBUILD=\"`cd $KBUILDDIR ; pwd`\"" >> $ENV
1083 echo "export PATH_DEVTOOLS=\"$DEVDIR\"" >> $ENV
1084 echo "path_kbuild_bin=\"\$PATH_KBUILD/bin/\$BUILD_TARGET.\$BUILD_PLATFORM_ARCH\"" >> $ENV
1085 echo "export PATH_KBUILD_BIN=\"\$path_kbuild_bin\"" >> $ENV
1086 echo "path_dev_bin=\"\$PATH_DEVTOOLS/\$BUILD_TARGET.\$BUILD_PLATFORM_ARCH\"/bin" >> $ENV
1087 if [ "$OS" = "solaris" ]; then
1088 # Because of sh being non-default shell in Solaris we need to export PATH again when
1089 # sourcing env.sh. Simply exporting from ./configure does not export PATH correctly.
1090 echo "PATH=\"$PATH\"" >> $ENV
1091 echo "echo \"\$PATH\" | /usr/sfw/bin/ggrep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV
1092 echo "echo \"\$PATH\" | /usr/sfw/bin/ggrep -q \"\$path_dev_bin\" || PATH=\"\$path_dev_bin:\$PATH\"" >> $ENV
1093 else
1094 echo "echo \"\$PATH\" | grep -q \"\$path_kbuild_bin\" || PATH=\"\$path_kbuild_bin:\$PATH\"" >> $ENV
1095 echo "echo \"\$PATH\" | grep -q \"\$path_dev_bin\" || PATH=\"\$path_dev_bin:\$PATH\"" >> $ENV
1096 fi
1097 echo "export PATH" >> $ENV
1098 echo "unset path_kbuild_bin path_dev_bin" >> $ENV
1099 fi
1100}
1101
1102
1103#
1104# Check for compiler.h
1105# Some Linux distributions include "compiler.h" in their libc linux
1106# headers package, some don't. Most don't need it, building might (!)
1107# not succeed on openSUSE without it.
1108#
1109# See http://www.mail-archive.com/qemu-devel%40nongnu.org/msg07980.html
1110#
1111check_compiler_h()
1112{
1113 test_header compiler.h
1114 if ! test -f "/usr/include/linux/compiler.h"; then
1115 cnf_append "VBOX_WITHOUT_LINUX_COMPILER_H" "1"
1116 log_success "compiler.h not found"
1117 else
1118 log_success "compiler.h found"
1119 fi
1120}
1121
1122
1123#
1124# Check if we are able to build 32-bit applications (needed for the guest additions)
1125#
1126check_32bit()
1127{
1128 test_header "32-bit support"
1129 cat > .tmp_src.c << EOF
1130#include <stdint.h>
1131int main(void)
1132{
1133 return 0;
1134}
1135EOF
1136 echo "compiling the following source file:" >> $LOG
1137 cat .tmp_src.c >> $LOG
1138 echo "using the following command line:" >> $LOG
1139 echo "$CC -m32 -O -Wall -o .tmp_out .tmp_src.c" >> $LOG
1140 $CC -m32 -O -Wall -o .tmp_out .tmp_src.c >> $LOG 2>&1
1141 if [ $? -ne 0 ]; then
1142 echo
1143 echo " Cannot compile 32-bit applications (missing headers and/or libraries)!"
1144 echo " Check the file $LOG for detailed error information."
1145 fail
1146 fi
1147 log_success ""
1148}
1149
1150
1151#
1152# Show help
1153#
1154show_help()
1155{
1156 cat << EOF
1157Usage: ./configure [OPTIONS]...
1158
1159Configuration:
1160 -h, --help display this help and exit
1161 --nofatal don't abort on errors
1162 --disable-xpcom disable XPCOM and related stuff
1163 --disable-sdl-ttf disable SDL_ttf detection
1164 --build-xalan build xalan & xerces from shipped sources
1165
1166Paths:
1167 --with-gcc=PATH location of the gcc compiler [$CC]
1168 --with-g++=PATH location of the g++ compiler [$CXX]
1169 --with-kbuild=DIR kbuild directory [$KBUILDDIR]
1170 --with-iasl=PATH location of the iasl compiler [$IASL]
1171 --with-linux=DIR Linux kernel source directory [$LINUX]
1172 --with-mkisofs=PATH location of mkisofs [$MKISOFS]
1173 --with-qt-dir=DIR directory for QT headers/libraries [$QTDIR]
1174 --with-xalan=LIB location of the xalan library [$LIBXALAN]
1175 --with-xalan-incdir=DIR location of the xalan headers [/usr/include]
1176 --with-xalan-libdir=DIR location of the xalan library [/usr/lib /usr/local/lib]
1177 --with-xerces=LIB location of the xerces library [$LIBXERCES]
1178 --with-xerces-incdir=DIR location of the xerces headers [/usr/include /usr/local/include]
1179 --with-xerces-libdir=DIR location of the xerces library [/usr/lib]
1180
1181Build type:
1182 -d, --build-debug build with debugging symbols and assertions
1183 --build-headless build headless (without any X11 frontend)
1184EOF
1185 exit 0
1186}
1187
1188
1189#
1190# The body.
1191#
1192
1193# scan command line options
1194for option in $*; do
1195 case "$option" in
1196 --help|-help|-h)
1197 show_help
1198 ;;
1199 --nofatal)
1200 nofatal=1
1201 ;;
1202 --with-gcc=*)
1203 CC=`echo $option | cut -d'=' -f2`
1204 ;;
1205 --with-g++=*)
1206 CXX=`echo $option | cut -d'=' -f2`
1207 ;;
1208 --with-kbuild=*)
1209 KBUILDDIR=`echo $option | cut -d'=' -f2`
1210 if echo $KBUILDDIR|grep -q "$INVALID_CHARS"; then
1211 echo "Error: KBUILDDIR contains invalid characters!"
1212 exit 1
1213 fi
1214 ;;
1215 --with-qt-dir=*)
1216 QTDIR=`echo $option | cut -d'=' -f2`
1217 ;;
1218 --with-iasl=*)
1219 IASL=`echo $option | cut -d'=' -f2`
1220 ;;
1221 --with-linux=*)
1222 LINUX=`echo $option | cut -d'=' -f2`
1223 ;;
1224 --with-mkisofs=*)
1225 MKISOFS=`echo $option | cut -d'=' -f2`
1226 ;;
1227 --with-xalan=*)
1228 LIBXALAN=`echo $option | cut -d'=' -f2`
1229 ;;
1230 --with-xalan-libdir=*)
1231 LIBXALAN_DIR=`echo $option | cut -d'=' -f2`
1232 ;;
1233 --with-xalan-incdir=*)
1234 INCXALAN=`echo $option | cut -d'=' -f2`
1235 ;;
1236 --with-xerces=*)
1237 LIBXERCES=`echo $option | cut -d'=' -f2`
1238 ;;
1239 --with-xerces-libdir=*)
1240 LIBXERCES_DIR=`echo $option | cut -d'=' -f2`
1241 ;;
1242 --with-xerces-incdir=*)
1243 INCXERCES=`echo $option | cut -d'=' -f2`
1244 ;;
1245 --disable-xpcom)
1246 WITH_XPCOM=0
1247 ;;
1248 --disable-sdl-ttf)
1249 WITH_SDL_TTF=0
1250 ;;
1251 --disable-qt)
1252 WITH_QT=0
1253 ;;
1254 --build-debug|-d)
1255 BUILD_TYPE=debug
1256 ;;
1257 --build-xalan)
1258 LIBXERCES=``
1259 LIBXALAN=``
1260 ;;
1261 --build-headless)
1262 HEADLESS=1
1263 ;;
1264 --ose)
1265 OSE=2
1266 ;;
1267 --odir=*)
1268 ODIR="`echo $option | cut -d'=' -f2`/"
1269 ;;
1270 *)
1271 echo
1272 echo "Unrecognized option \"$option\""
1273 echo
1274 show_help
1275 ;;
1276 esac
1277done
1278
1279[ -n "$LIBXALAN_DIR" ] && LIBXALAN="-L$LIBXALAN_DIR $LIBXALAN"
1280[ -n "$LIBXERCES_DIR" ] && LIBXERCES="-L$LIBXERCES_DIR $LIBXERCES"
1281
1282LOG="$ODIR$LOG"
1283ENV="$ODIR$ENV"
1284CNF="$ODIR$CNF"
1285
1286# initialize output files
1287cat > $LOG << EOF
1288# Log file generated by
1289#
1290# '$0 $*'
1291#
1292
1293EOF
1294cat > $CNF << EOF
1295# -*- Makefile -*-
1296#
1297# automatically generated by
1298#
1299# '$0 $*'
1300#
1301# It will be completely overwritten if configure is executed again.
1302#
1303
1304EOF
1305cat > $ENV << EOF
1306#!/bin/bash
1307#
1308# automatically generated by
1309#
1310# '$0 $*'
1311#
1312# It will be completely overwritten if configure is executed again.
1313# Make sure you source this file once before you start to build VBox.
1314#
1315
1316EOF
1317
1318# test if we are OSE
1319if [ $OSE -eq 1 -a -d "`cd \`dirname $0\`; pwd`/src/VBox/Devices/USB" ]; then
1320 echo "Found USB devices, assuming VBOX_OSE = FALSE" >> $LOG
1321 echo >> $LOG
1322 OSE=0
1323fi
1324
1325if [ "$BUILD_TYPE" = "debug" ]; then
1326 echo "Creating DEBUG build!" >> $LOG
1327fi
1328
1329# first determine our environment
1330check_environment
1331check_kbuild
1332
1333# append the tools directory to the default search path
1334echo "$PATH" | grep -q "$DEVDIR_BIN" || PATH="$PATH:$DEVDIR_BIN"
1335export PATH
1336
1337# some things are not available in for OSE
1338if [ $OSE -ge 1 ]; then
1339 cnf_append "VBOX_OSE" "1"
1340 cnf_append "VBOX_WITH_TESTSUITE" ""
1341 cnf_append "VBOX_WITH_WIN32_ADDITIONS" ""
1342
1343 if [ "$OS" = "linux" ]; then
1344 cnf_append "VBOX_WITH_LINUX_ADDITIONS" "1"
1345 else
1346 cnf_append "VBOX_WITH_LINUX_ADDITIONS" ""
1347 fi
1348 echo >> $CNF
1349fi
1350
1351# headless
1352if [ -n "$HEADLESS" ]; then
1353 cnf_append "VBOX_HEADLESS" "1"
1354fi
1355
1356# emit disable directives corresponding to any --disable-xxx options.
1357[ $WITH_XPCOM -eq 0 ] && cnf_append "VBOX_WITH_MAIN" ""
1358[ $WITH_QT -eq 0 ] && cnf_append "VBOX_WITH_QTGUI" ""
1359[ $WITH_SDL_TTF -eq 0 ] && cnf_append "VBOX_WITH_SECURELABEL" ""
1360
1361# the tools
1362check_gcc
1363[ "$OS" != "darwin" ] && check_as86
1364[ "$OS" != "darwin" ] && check_bcc
1365[ "$OS" != "darwin" ] && check_iasl
1366# don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs
1367# [ "$OS" != "darwin" ] && check_yasm
1368[ "$OS" != "darwin" ] && check_xsltproc
1369[ $OSE -eq 0 ] && check_mkisofs
1370
1371# the libraries
1372[ "$OS" != "darwin" ] && check_pthread
1373[ $WITH_XPCOM -eq 1 ] && check_xalan
1374[ $WITH_XPCOM -eq 1 ] && check_xerces
1375[ $WITH_LIBIDL -eq 1 ] && check_libidl
1376[ $OSE -eq 0 ] && check_ssl
1377[ "$OS" != "darwin" ] && check_z
1378[ $OSE -eq 0 ] && check_png
1379[ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam
1380[ "$OS" != "darwin" ] && check_sdl
1381[ $WITH_SDL_TTF -eq 1 -a $OSE -eq 0 ] && check_sdl_ttf
1382[ "$OS" != "darwin" ] && check_x
1383[ "$OS" != "darwin" ] && check_xcursor
1384[ $WITH_QT -eq 1 ] && check_qt
1385
1386# Linux-specific
1387if [ "$OS" = "linux" ]; then
1388 check_linux
1389 check_alsa
1390 check_compiler_h
1391 [ "$BUILD_MACHINE" = "amd64" ] && check_32bit
1392fi
1393
1394# success!
1395echo
1396echo "Successfully generated '$CNF' and '$ENV'."
1397echo "Source '$ENV' once before you start to build VBox:"
1398echo ""
1399echo " source $ENV"
1400echo " kmk"
1401echo ""
1402if [ "$OS" = "linux" ]; then
1403 echo "To compile the kernel module, do:"
1404 echo ""
1405 echo " cd ./out/$OS.$TARGET_MACHINE/$BUILD_TYPE/bin/src"
1406 echo " make"
1407 echo ""
1408fi
1409echo "Enjoy!"
1410cleanup
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