VirtualBox

source: vbox/trunk/configure@ 5031

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

configure: for X11 search in /usr/local as well

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