VirtualBox

source: vbox/trunk/configure@ 4889

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

typo

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