Changeset 3163 in vbox
- Timestamp:
- Jun 19, 2007 8:33:57 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 22092
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure
r3032 r3163 1 #!/bin/ bash1 #!/bin/sh 2 2 # The purpose of this script is to check for all external tools, headers, and 3 3 # libraries VBox OSE depends on. … … 44 44 INCXERCES="" 45 45 LIBXERCES="-lxerces-c" 46 INCSDL="/usr/include/SDL"47 LIBSDL="-lSDL"48 LIBSDLMAIN="-lSDLmain"49 46 LIBCRYPTO="-lcrypto" 50 47 LIBPTHREAD="-lpthread" … … 58 55 LIBPATHHAL="" 59 56 LIBHAL="-lhal -ldbus-1" 60 QTDIR="/usr/qt/3 /usr/lib/qt3 /usr/lib/qt-3.3 /usr/share/qt3 /usr/lib64/qt-3.3 "57 QTDIR="/usr/qt/3 /usr/lib/qt3 /usr/lib/qt-3.3 /usr/share/qt3 /usr/lib64/qt-3.3 /usr/X11R6" 61 58 KBUILDDIR="`cd $(dirname $0); pwd`/kBuild" 62 59 DEVDIR="`cd $(dirname $0); pwd`/tools" 63 if [ -d /lib/modules/`uname -r`/build]; then60 if [ -d "/lib/modules/`uname -r`/build" ]; then 64 61 LINUX="/lib/modules/`uname -r`/build" 65 62 else … … 74 71 INVALID_CHARS="[^A-Za-z0-9/\\$:._-]" 75 72 76 if (cd $(dirname $0); pwd)|grep -q "$INVALID_CHARS"; then73 if (cd `dirname $0`; pwd)|grep -q "$INVALID_CHARS"; then 77 74 echo "Error: VBox base path contains invalid characters!" 78 75 exit 1 79 76 fi 80 77 81 functioncleanup()78 cleanup() 82 79 { 83 80 rm -f .tmp_src.cc .tmp_src.c .tmp_out .test_execute.log 84 81 } 85 82 86 f unction fail()83 fail() 87 84 { 88 85 if [ -z "$nofatal" -o "x$1" != "x" ]; then … … 93 90 } 94 91 95 functionlog_success()92 log_success() 96 93 { 97 94 if [ -n "$1" ]; then echo -n "$1, "; fi … … 100 97 } 101 98 102 functionlog_failure()99 log_failure() 103 100 { 104 101 echo -e "\n ** $1!" … … 106 103 } 107 104 108 functioncnf_append()105 cnf_append() 109 106 { 110 107 printf "%-30s := %s\n" "$1" "$2" >> $CNF 111 108 } 112 109 113 function strip_l() 114 { 115 echo "$1"|sed 's|-l\([^ ]\+\)|\1|g' 116 } 117 118 function strip_L() 119 { 120 echo "$1"|sed 's|-L\([^ ]\+\)|\1|g' 110 strip_l() 111 { 112 echo "$1"|sed 's|-l\([^ ]\+\)|\1|g; s|-[^l]\([^ ]\+\)||g; s|^ ||; s| *$||g' 113 } 114 115 strip_L() 116 { 117 echo "$1"|sed 's|-L\([^ ]\+\)|\1|g; s|-[^L]\([^ ]\+\)||g; s|^ ||; s| *$||g' 118 } 119 120 strip_I() 121 { 122 echo "$1"|sed 's|-I\([^ ]\+\)|\1|g; s|-[^I]\([^ ]\+\)||g; s|^ ||; s| *$||g' 121 123 } 122 124 123 125 # Wrapper for ancient /usr/bin/which on darwin that always returns 0 124 functionwhich_wrapper()126 which_wrapper() 125 127 { 126 128 if [ -z "$have_ancient_which" ]; then … … 140 142 } 141 143 142 functioncheck_avail()144 check_avail() 143 145 { 144 146 if [ -z "$1" ]; then … … 156 158 157 159 # Prepare a test 158 functiontest_header()160 test_header() 159 161 { 160 162 echo "***** Checking $1 *****" >> $LOG … … 163 165 164 166 # Compile a test 165 functiontest_compile()167 test_compile() 166 168 { 167 169 echo "compiling the following source file:" >> $LOG … … 170 172 echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc \"$1\"" >> $LOG 171 173 $CXX -O -Wall -o .tmp_out .tmp_src.cc $1 >> $LOG 2>&1 172 if (($?!=0)); then174 if [ $? -ne 0 ]; then 173 175 if [ -z "$4" ]; then 174 176 echo -e "\n $2 not found at $1 or $3 headers not found" … … 185 187 186 188 # Execute a compiled test binary 187 functiontest_execute()189 test_execute() 188 190 { 189 191 echo "executing the binary" >> $LOG … … 191 193 rc=$? 192 194 cat .test_execute.log | tee -a $LOG 193 if (($rc!=0)); then195 if [ $rc -ne 0 ]; then 194 196 fail $1 195 197 return 1 … … 202 204 # Check for OS, MACHINE, CPU 203 205 # 204 functioncheck_environment()206 check_environment() 205 207 { 206 208 test_header environment … … 251 253 # We depend on a working gcc, if we fail terminate in every case. 252 254 # 253 functioncheck_gcc()255 check_gcc() 254 256 { 255 257 test_header gcc … … 263 265 log_failure "gcc version $cc_ver does not match g++ version $cxx_ver" 264 266 fail really 265 elif (($cc_maj>3)); then267 elif [ $cc_maj -gt 3 ]; then 266 268 log_success "found version $cc_ver" 267 elif (($cc_maj<3 || $cc_min<2)); then269 elif [ $cc_maj -lt 3 -o $cc_min -lt 2 ]; then 268 270 log_failure "gcc version $cc_ver found, expected at least gcc version 3.2" 269 271 fail really … … 290 292 # Check for the bcc compiler, needed for compiling the BIOS 291 293 # 292 functioncheck_bcc()294 check_bcc() 293 295 { 294 296 test_header bcc 295 297 if check_avail "$BCC" BCC; then 296 298 bcc_ver=`$BCC -v 2>&1|grep version|sed 's+^bcc: version \(.*\)+\1+'` 297 if (($?!=0)); then299 if [ $? -ne 0 ]; then 298 300 log_failure "not found" 299 301 fail 300 302 else 301 303 echo "compiling the following source file:" >> $LOG 302 echo '304 cat > .tmp_src.c << EOF 303 305 int foo(a) 304 306 int a; … … 306 308 return 0; 307 309 } 308 ' > .tmp_src.c 310 EOF 309 311 cat .tmp_src.c >> $LOG 310 312 local bcc_path=`which_wrapper $BCC` … … 313 315 echo "$BCC -B $bcc_dir -C-c -3 -S -o .tmp_out .tmp_src.c" >> $LOG 314 316 $BCC -B $bcc_dir -C-c -3 -S -o .tmp_out .tmp_src.c >> $LOG 2>&1 315 if (($?!=0)); then317 if [ $? -ne 0 ]; then 316 318 log_failure "not found" 317 319 fail … … 327 329 # Check for the as86 assembler, needed for compiling the BIOS 328 330 # 329 functioncheck_as86()331 check_as86() 330 332 { 331 333 test_header as86 332 334 if check_avail "$AS86" AS86; then 333 335 as86_ver=`$AS86 -v 2>&1|grep version|sed 's+^as86 version: \(.*\)+\1+'` 334 if (($?!=0)); then336 if [ $? -ne 0 ]; then 335 337 log_failure "not found" 336 338 fail … … 345 347 # Check for yasm, needed to compile assembler files 346 348 # 347 functioncheck_yasm()349 check_yasm() 348 350 { 349 351 test_header yasm 350 352 if check_avail "$YASM" YASM; then 351 353 yasm_ver=`$YASM --version|grep "^yasm"|sed 's+^yasm \(.*\)+\1+'` 352 if (($?!=0)); then354 if [ $? -ne 0 ]; then 353 355 log_failure "not found" 354 356 fail … … 358 360 yasm_rev=`echo $yasm_ver|cut -d. -f3` 359 361 yasm_ver_mul=$(($yasm_maj*10000+$yasm_min*100+$yasm_rev)) 360 if (($yasm_ver_mul<501)); then362 if [ $yasm_ver_mul -lt 501 ]; then 361 363 log_failure "found version $yasm_ver, expected at least 0.5.1" 362 364 fail … … 371 373 # Check for the iasl ACPI compiler, needed to compile vbox.dsl 372 374 # 373 functioncheck_iasl()375 check_iasl() 374 376 { 375 377 test_header iasl 376 378 if check_avail "$IASL" IASL; then 377 379 iasl_ver=`$IASL|grep version|sed 's+^ASL.*version \([0-9]*\).*+\1+'` 378 if (($?!=0)); then380 if [ $? -ne 0 ]; then 379 381 log_failure "not found" 380 382 fail … … 389 391 # Check for xsltproc, needed by Main 390 392 # 391 functioncheck_xsltproc()393 check_xsltproc() 392 394 { 393 395 test_header xslt 394 396 if check_avail "$XSLTPROC" XSLTPROC; then 395 397 xsltproc_ver=`$XSLTPROC --version` 396 if (($?!=0)); then398 if [ $? -ne 0 ]; then 397 399 log_failure "not found" 398 400 fail … … 407 409 # Check for mkisofs, needed to build the CDROM image containing the additions 408 410 # 409 functioncheck_mkisofs()411 check_mkisofs() 410 412 { 411 413 test_header mkisofs 412 414 if which_wrapper $GENISOIMAGE > /dev/null; then 413 415 mkisofs_ver=`$GENISOIMAGE --version` 414 if (($?!=0)); then416 if [ $? -ne 0 ]; then 415 417 log_failure "not found" 416 418 fail … … 421 423 elif check_avail "$MKISOFS" MKISOFS; then 422 424 mkisofs_ver=`$MKISOFS --version` 423 if (($?!=0)); then425 if [ $? -ne 0 ]; then 424 426 log_failure "not found" 425 427 fail … … 434 436 # Check for xalan, needed by VBoxXML 435 437 # 436 functioncheck_xalan()438 check_xalan() 437 439 { 438 440 if [ -n "$LIBXALAN" ]; then 439 441 test_header xalan 440 echo '442 cat > .tmp_src.cc << EOF 441 443 #include <cstdio> 442 444 #include <xalanc/Include/XalanVersion.hpp> … … 453 455 #endif 454 456 } 455 ' > .tmp_src.cc 457 EOF 456 458 if test_compile "$LIBXALAN $LIBPTHREAD ${INCXALAN:+-I$INCXALAN}" xalan xalanc; then 457 459 if test_execute; then 458 cnf_append "SDK_VBOX_XALAN_LIBS" "`strip_l $LIBXALAN`"460 cnf_append "SDK_VBOX_XALAN_LIBS" "`strip_l "$LIBXALAN"`" 459 461 cnf_append "SDK_VBOX_XALAN_INCS" "$INCXALAN" 460 462 fi … … 469 471 # Check for xerces, needed by VBoxXML 470 472 # 471 functioncheck_xerces()473 check_xerces() 472 474 { 473 475 if [ -n "$LIBXERCES" ]; then 474 476 test_header xerces 475 echo '477 cat > .tmp_src.cc << EOF 476 478 #include <cstdio> 477 479 #include <xercesc/util/XercesVersion.hpp> … … 488 490 #endif 489 491 } 490 ' > .tmp_src.cc 492 EOF 491 493 if test_compile "$LIBXERCES $LIBPTHREAD ${INCXERCES:+-I$INCXERCES}" xerces xercesc; then 492 494 if test_execute; then 493 cnf_append "SDK_VBOX_XERCES_LIBS" "`strip_l $LIBXERCES`"495 cnf_append "SDK_VBOX_XERCES_LIBS" "`strip_l "$LIBXERCES"`" 494 496 cnf_append "SDK_VBOX_XERCES_INCS" "$INCXERCES" 495 497 fi … … 510 512 if which_wrapper libIDL-config-2 > /dev/null; then 511 513 libidl_ver=`libIDL-config-2 --version` 512 if (($?!=0)); then514 if [ $? -ne 0 ]; then 513 515 log_failure "not found" 514 516 fail … … 520 522 elif check_avail "libIDL-config" libIDL-config; then 521 523 libidl_ver=`libIDL-config --version` 522 if (($?!=0)); then524 if [ $? -ne 0 ]; then 523 525 log_failure "not found" 524 526 fail … … 533 535 # Check for openssl, needed for RDP 534 536 # 535 functioncheck_ssl()537 check_ssl() 536 538 { 537 539 test_header ssl 538 echo '540 cat > .tmp_src.cc << EOF 539 541 #include <cstdio> 540 542 #include <openssl/opensslv.h> … … 550 552 #endif 551 553 } 552 ' > .tmp_src.cc 554 EOF 553 555 if test_compile $LIBCRYPTO libcrypto openssl; then 554 556 if test_execute nofatal; then 555 557 cnf_append "SDK_VBOX_OPENSSL_INCS" "" 556 cnf_append "SDK_VBOX_OPENSSL_LIBS" "`strip_l $LIBCRYPTO`"558 cnf_append "SDK_VBOX_OPENSSL_LIBS" "`strip_l "$LIBCRYPTO"`" 557 559 fi 558 560 fi … … 562 564 # Check for pthread, needed by VBoxSVC, frontends, ... 563 565 # 564 functioncheck_pthread()566 check_pthread() 565 567 { 566 568 test_header pthread 567 echo '569 cat > .tmp_src.cc << EOF 568 570 #include <cstdio> 569 571 #include <pthread.h> … … 585 587 printf("found, OK.\n"); 586 588 } 587 ' > .tmp_src.cc 589 EOF 588 590 if test_compile $LIBPTHREAD pthread pthread; then 589 591 if test_execute; then 590 cnf_append "LIB_PTHREAD" "`strip_l $LIBPTHREAD`"592 cnf_append "LIB_PTHREAD" "`strip_l "$LIBPTHREAD"`" 591 593 fi 592 594 fi … … 596 598 # Check for zlib, needed by VBoxSVC, Runtime, ... 597 599 # 598 functioncheck_z()600 check_z() 599 601 { 600 602 test_header zlib 601 echo '603 cat > .tmp_src.cc << EOF 602 604 #include <cstdio> 603 605 #include <zlib.h> … … 613 615 #endif 614 616 } 615 ' > .tmp_src.cc 617 EOF 616 618 if test_compile "$LIBZ ${INCZ:+-I$INCZ}" zlib zlib; then 617 619 if test_execute; then 618 cnf_append "SDK_VBOX_ZLIB_LIBS" "`strip_l $LIBZ`"620 cnf_append "SDK_VBOX_ZLIB_LIBS" "`strip_l "$LIBZ"`" 619 621 cnf_append "SDK_VBOX_ZLIB_INCS" "$INCZ" 620 622 fi … … 625 627 # Check for libpng, needed by kchmviewer 626 628 # 627 functioncheck_png()629 check_png() 628 630 { 629 631 test_header libpng 630 echo '632 cat > .tmp_src.cc << EOF 631 633 #include <cstdio> 632 634 #include <png.h> … … 642 644 #endif 643 645 } 644 ' > .tmp_src.cc 645 if test_compile "$LIBPNG ${INCPNG:+-I$INCPNG}" libpng libpng nofatal; then 646 if test_execute nofatal; then 647 cnf_append "SDK_VBOX_LIBPNG_LIBS" "`strip_l $LIBPNG`" 646 EOF 647 # if test_compile "$LIBPNG ${INCPNG:+-I$INCPNG}" libpng libpng nofatal; then 648 if test_compile "$LIBPNG ${INCPNG:+-I$INCPNG}" libpng libpng; then 649 # if test_execute nofatal; then 650 if test_execute; then 651 cnf_append "SDK_VBOX_LIBPNG_LIBS" "`strip_l "$LIBPNG"`" 648 652 cnf_append "SDK_VBOX_LIBPNG_INCS" "$INCPNG" 649 653 fi … … 657 661 # OpenSUSE comes with 0.99.xxx where they changed the versioning scheme. 658 662 # 659 functioncheck_pam()663 check_pam() 660 664 { 661 665 test_header pam 662 echo '666 cat > .tmp_src.cc << EOF 663 667 #include <cstdio> 664 668 #include <security/pam_appl.h> … … 677 681 } 678 682 } 679 ' > .tmp_src.cc 683 EOF 680 684 if test_compile "-lpam" pam pam nofatal; then 681 685 if test_execute nofatal; then … … 684 688 fi 685 689 test_header linux_pam 686 echo '690 cat > .tmp_src.cc << EOF 687 691 #include <cstdio> 688 692 #include <security/pam_appl.h> … … 701 705 } 702 706 } 703 ' > .tmp_src.cc 707 EOF 704 708 if test_compile "-lpam" pam pam; then 705 709 test_execute … … 707 711 } 708 712 713 709 714 # 710 715 # Check for the SDL library, needed by VBoxSDL and VirtualBox 711 716 # We depend at least on version 1.2.7 712 717 # 713 functioncheck_sdl()718 check_sdl() 714 719 { 715 720 test_header SDL 716 echo ' 721 if which_wrapper sdl-config > /dev/null; then 722 FLGSDL=`sdl-config --cflags` 723 INCSDL=`strip_I "$FLGSDL"` 724 LIBSDL=`sdl-config --libs` 725 LIBSDLMAIN="-lSDLmain" 726 cat > .tmp_src.cc << EOF 717 727 #include <cstdio> 718 728 #include <SDL/SDL.h> … … 730 740 #endif 731 741 } 732 ' > .tmp_src.cc 733 if test_compile "$LIBSDL $LIBSDLMAIN ${INCSDL:+-I$INCSDL}" SDL SDL; then 734 if test_execute; then 735 cnf_append "LIB_SDK_LIBSDL_SDL" "`strip_l $LIBSDL`" 736 cnf_append "LIB_SDK_LIBSDL_SDLMAIN" "`strip_l $LIBSDLMAIN`" 737 [ -n "$INCSDL" ] && cnf_append "SDK_LIBSDL_INCS" "$INCSDL" 738 fi 742 EOF 743 if test_compile "$LIBSDL $LIBSDLMAIN ${INCSDL:+-I$INCSDL}" SDL SDL; then 744 if test_execute; then 745 cnf_append "LIB_SDK_LIBSDL_SDL" "`strip_l "$LIBSDL"`" 746 cnf_append "SDK_LIBSDL_LIBPATH" "`strip_L "$LIBSDL"`" 747 cnf_append "LIB_SDK_LIBSDL_SDLMAIN" "`strip_l "$LIBSDLMAIN"`" 748 [ -n "$INCSDL" ] && cnf_append "SDK_LIBSDL_INCS" "$INCSDL" 749 fi 750 fi 751 else 752 log_failure "not found" 739 753 fi 740 754 } … … 743 757 # Check for the SDL_ttf library, needed by VBoxSDL (secure label) 744 758 # 745 functioncheck_sdl_ttf()759 check_sdl_ttf() 746 760 { 747 761 test_header SDL_ttf 748 echo '762 cat > .tmp_src.cc << EOF 749 763 #include <cstdio> 750 764 #include <SDL/SDL_ttf.h> … … 766 780 #endif 767 781 } 768 ' > .tmp_src.cc 782 EOF 769 783 if test_compile "-lSDL_ttf" SDL_ttf SDL_ttf; then 770 784 test_execute … … 775 789 # Check for libasound, needed by the ALSA audio backend 776 790 # 777 functioncheck_alsa()791 check_alsa() 778 792 { 779 793 test_header ALSA 780 echo '794 cat > .tmp_src.cc << EOF 781 795 #include <alsa/asoundlib.h> 782 796 extern "C" int main(void) … … 792 806 #endif 793 807 } 794 ' > .tmp_src.cc 808 EOF 795 809 if test_compile "-lasound" asound asound; then 796 810 test_execute … … 801 815 # Check for the Xcursor library, needed by VBoxSDL and VBoxBFE 802 816 # 803 functioncheck_xcursor()817 check_xcursor() 804 818 { 805 819 test_header Xcursor 806 echo '820 cat > .tmp_src.cc << EOF 807 821 #include <cstdio> 808 822 #include <X11/Xlib.h> … … 814 828 return 0; 815 829 } 816 ' > .tmp_src.cc 830 EOF 817 831 if test_compile "$LIBX11 $LIBXCURSOR" Xcursor Xcursor; then 818 832 log_success "found" 819 cnf_append "LIB_XCURSOR" "`strip_l $LIBXCURSOR`"833 cnf_append "LIB_XCURSOR" "`strip_l "$LIBXCURSOR"`" 820 834 fi 821 835 } … … 824 838 # Check for the X libraries (Xext, X11) 825 839 # 826 functioncheck_x()840 check_x() 827 841 { 828 842 test_header "X libraries" 829 echo '843 cat > .tmp_src.cc << EOF 830 844 #include <cstdio> 831 845 #include <X11/Xlib.h> … … 844 858 XDestroyWindow(dpy, win); 845 859 } 846 ' > .tmp_src.cc 860 EOF 847 861 if test_compile "$LIBX11" Xlibs Xlibs; then 848 862 log_success "found" … … 853 867 # Check for the QT library, needed by VirtualBox 854 868 # 855 functioncheck_qt()869 check_qt() 856 870 { 857 871 test_header Qt 858 echo '872 cat > .tmp_src.cc << EOF 859 873 #include <cstdio> 860 874 #include <qglobal.h> … … 872 886 #endif 873 887 } 874 ' > .tmp_src.cc 888 EOF 875 889 found_qt=0 876 890 libs="lib" … … 884 898 885 899 $CXX -O -Wall -o .tmp_out .tmp_src.cc -I$q/include -L$q/$l -lqt-mt >> $LOG 2>&1 886 if (($?==0)); then900 if [ $? -eq 0 ]; then 887 901 if test_execute; then 888 902 cnf_append "QTDIR" "`cd $q ; pwd`" … … 892 906 fi 893 907 done 894 if (($found_qt==1)); then908 if [ $found_qt -eq 1 ]; then 895 909 break 896 910 fi 897 911 done 898 if (($found_qt!=1)); then912 if [ $found_qt -ne 1 ]; then 899 913 echo -e "\n Qt not found at \"$QTDIR\" or Qt headers not found" 900 914 echo " Check the file $LOG for detailed error information." … … 905 919 if check_avail "$q/bin/moc" QTDIR/bin; then 906 920 moc_ver=`$q/bin/moc 2>&1 -v|sed 's+^.*(Qt \(.*\))+\1+'` 907 if (($?!=0)); then921 if [ $? -ne 0 ]; then 908 922 log_failure "not found" 909 923 fail … … 917 931 # Check for Linux sources 918 932 # 919 functioncheck_linux()933 check_linux() 920 934 { 921 935 test_header "Linux kernel sources" 922 echo '936 cat > .tmp_src.c << EOF 923 937 #include <linux/version.h> 924 938 int printf(const char *format, ...); … … 936 950 #endif 937 951 } 938 ' > .tmp_src.c 952 EOF 939 953 echo "compiling the following source file:" >> $LOG 940 954 cat .tmp_src.c >> $LOG … … 942 956 echo "$CC -O -Wall -o .tmp_out .tmp_src.c -nostdinc -I$LINUX/include" >> $LOG 943 957 $CC -O -Wall -o .tmp_out .tmp_src.c -nostdinc -I$LINUX/include >> $LOG 2>&1 944 if (($?!=0)); then958 if [ $? -ne 0 ]; then 945 959 echo -e "\n Linux kernel headers not found at $LINUX" 946 960 echo " Check the file $LOG for detailed error information." … … 956 970 # Check for kchmviewer, needed to display the online help 957 971 # 958 functioncheck_kchmviewer()972 check_kchmviewer() 959 973 { 960 974 test_header kchmviewer 961 975 if check_avail "$KCHMVIEWER" KCHMVIEWER; then 962 976 kchmviewer_ver=`$KCHMVIEWER --version|grep "^KchmViewer:"|sed 's+^KchmViewer: \(.*\)+\1+'` 963 if (($?!=0)); then977 if [ $? -ne 0 ]; then 964 978 log_failure "not found" 965 979 fail … … 973 987 # Check for the kBuild tools, we don't support GNU make 974 988 # 975 functioncheck_kbuild()989 check_kbuild() 976 990 { 977 991 test_header kBuild … … 1005 1019 # See http://www.mail-archive.com/qemu-devel%40nongnu.org/msg07980.html 1006 1020 # 1007 function check_compiler_h 1021 check_compiler_h() 1008 1022 { 1009 1023 test_header compiler.h … … 1020 1034 # Check for the libhal library for obtaining hardware information on Linux 1021 1035 # 1022 functioncheck_libhal()1036 check_libhal() 1023 1037 { 1024 1038 test_header libhal … … 1032 1046 LIBHAL=$pc_libhal 1033 1047 fi 1034 echo '1048 cat > .tmp_src.cc << EOF 1035 1049 #include <cstdio> 1036 1050 #include <libhal.h> … … 1046 1060 return 0; 1047 1061 } 1048 ' > .tmp_src.cc 1062 EOF 1049 1063 if test_compile "$CFLAGSHAL $LIBPATHHAL $LIBHAL" libhal libhal; then 1050 1064 log_success "found version $pc_verhal" 1051 1065 cnf_append "LIB_HAL_CFLAGS" "$CFLAGSHAL" 1052 cnf_append "LIB_HAL_LIBS" "`strip_l $LIBHAL`"1053 cnf_append "LIB_HAL_LIBPATH" "`strip_L $LIBPATHHAL`"1066 cnf_append "LIB_HAL_LIBS" "`strip_l "$LIBHAL"`" 1067 cnf_append "LIB_HAL_LIBPATH" "`strip_L "$LIBPATHHAL"`" 1054 1068 cnf_append "VBOX_WITH_LIBHAL" "1" 1055 1069 fi … … 1060 1074 # Show help 1061 1075 # 1062 functionshow_help()1076 show_help() 1063 1077 { 1064 1078 cat << EOF … … 1214 1228 1215 1229 # test if we are OSE 1216 if (($OSE==1)) && [-d "`cd $(dirname $0); pwd`/src/VBox/Devices/USB" ]; then1230 if [ $OSE -eq 1 -a -d "`cd $(dirname $0); pwd`/src/VBox/Devices/USB" ]; then 1217 1231 echo "Found USB devices, assuming VBOX_OSE = FALSE" >> $LOG 1218 1232 echo >> $LOG … … 1225 1239 1226 1240 # some things are not available in for OSE 1227 if (($OSE)); then1241 if [ $OSE -ge 1 ]; then 1228 1242 cnf_append "VBOX_OSE" "1" 1229 1243 cnf_append "VBOX_WITH_TESTSUITE" "" … … 1239 1253 1240 1254 # emit disable directives corresponding to any --disable-xxx options. 1241 (($WITH_XPCOM==0))&& cnf_append "VBOX_WITH_MAIN" ""1242 (($WITH_QT==0))&& cnf_append "VBOX_WITH_QTGUI" ""1243 (($WITH_SDL_TTF==0))&& cnf_append "VBOX_WITH_SECURELABEL" ""1255 [ $WITH_XPCOM -eq 0 ] && cnf_append "VBOX_WITH_MAIN" "" 1256 [ $WITH_QT -eq 0 ] && cnf_append "VBOX_WITH_QTGUI" "" 1257 [ $WITH_SDL_TTF -eq 0 ] && cnf_append "VBOX_WITH_SECURELABEL" "" 1244 1258 1245 1259 # append the tools directory to the default search path … … 1251 1265 # the tools 1252 1266 check_gcc 1253 [ "$OS" != "darwin" ] && check_as861254 [ "$OS" != "darwin" ] && check_bcc1255 [ "$OS" != "darwin" ] && check_iasl1267 [ "$OS" != "darwin" ] && check_as86 1268 [ "$OS" != "darwin" ] && check_bcc 1269 [ "$OS" != "darwin" ] && check_iasl 1256 1270 # don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs 1257 1271 # [ "$OS" != "darwin" ] && check_yasm 1258 [ "$OS" != "darwin" ] && check_xsltproc1259 (($OSE==0))&& check_mkisofs1272 [ "$OS" != "darwin" ] && check_xsltproc 1273 [ $OSE -eq 0 ] && check_mkisofs 1260 1274 1261 1275 # the libraries 1262 [ "$OS" != "darwin" ] && check_pthread 1263 (($WITH_XPCOM==1)) && check_xalan 1264 (($WITH_XPCOM==1)) && check_xerces 1265 (($WITH_LIBIDL==1)) && check_libidl 1266 (($OSE==0)) && check_ssl 1267 [ "$OS" != "darwin" ] && check_z 1268 (($OSE==0)) && check_png 1269 (($OSE==0)) && [ "$OS" = "linux" ] && check_pam 1270 [ "$OS" != "darwin" ] && check_sdl 1271 (($WITH_SDL_TTF==1)) && (($OSE==0)) && check_sdl_ttf 1272 [ "$OS" != "darwin" ] && check_alsa 1273 [ "$OS" != "darwin" ] && check_x 1274 [ "$OS" != "darwin" ] && check_xcursor 1275 (($WITH_QT==1)) && check_qt 1276 [ "$OS" != "darwin" ] && check_pthread 1277 [ $WITH_XPCOM -eq 1 ] && check_xalan 1278 [ $WITH_XPCOM -eq 1 ] && check_xerces 1279 [ $WITH_LIBIDL -eq 1 ] && check_libidl 1280 [ $OSE -eq 0 ] && check_ssl 1281 [ "$OS" != "darwin" ] && check_z 1282 [ $OSE -eq 0 ] && check_png 1283 [ $OSE -eq 0 -a "$OS" = "linux" ] && check_pam 1284 [ "$OS" != "darwin" ] && check_sdl 1285 [ $WITH_SDL_TTF -eq 1 -a $OSE -eq 0 ] && check_sdl_ttf 1286 [ "$OS" != "darwin" ] && check_x 1287 [ "$OS" != "darwin" ] && check_xcursor 1288 [ $WITH_QT -eq 1 ] && check_qt 1276 1289 1277 1290 # Linux-specific 1278 [ "$OS" = "linux" ] && check_linux 1279 [ "$OS" = "linux" ] && check_compiler_h 1280 [ "$OS" = "linux" -a "$WITH_HAL" = "1" ] && check_libhal 1291 if [ "$OS" = "linux" ]; then 1292 check_linux 1293 check_alsa 1294 check_compiler_h 1295 [ "$WITH_HAL" = "1" ] && check_libhal 1296 fi 1281 1297 1282 1298 # success!
Note:
See TracChangeset
for help on using the changeset viewer.