VirtualBox

source: vbox/trunk/configure@ 28063

Last change on this file since 28063 was 27604, checked in by vboxsync, 15 years ago

configure: added Xrandr check

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