VirtualBox

Changeset 6098

Show
Ignore:
Timestamp:
12/16/07 21:11:31 (1 year ago)
Author:
vboxsync
Message:

configure: added --build-libxml2

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/configure

    r6097 r6098  
    5757LIBXERCES="-lxerces-c" 
    5858LIBXERCES_DIR="/usr/local/lib" 
     59BUILD_LIBXML2= 
    5960LIBCRYPTO="-lcrypto" 
    6061LIBPTHREAD="-lpthread" 
     
    619620check_libxml2() 
    620621{ 
    621   test_header libxml2 
    622  
    623   if which_wrapper pkg-config > /dev/null; then 
    624     libxml2_ver=`pkg-config libxml-2.0 --modversion 2>> $LOG` 
    625     if [ $? -ne 0 ]; then 
    626       log_failure "not found" 
    627       fail 
    628     else 
    629       FLGXML2=`pkg-config libxml-2.0 --cflags` 
    630       INCXML2=`strip_I "$FLGXML2"` 
    631       LIBXML2=`pkg-config libxml-2.0 --libs` 
    632       cat > .tmp_src.cc << EOF 
     622  if [ -z "$BUILD_LIBXML2" ]; then 
     623    test_header libxml2 
     624    if which_wrapper pkg-config > /dev/null; then 
     625      libxml2_ver=`pkg-config libxml-2.0 --modversion 2>> $LOG` 
     626      if [ $? -ne 0 ]; then 
     627        log_failure "not found" 
     628        fail 
     629      else 
     630        FLGXML2=`pkg-config libxml-2.0 --cflags` 
     631        INCXML2=`strip_I "$FLGXML2"` 
     632        LIBXML2=`pkg-config libxml-2.0 --libs` 
     633        cat > .tmp_src.cc << EOF 
    633634#include <cstdio> 
    634635#include <libxml/xmlversion.h> 
     
    645646} 
    646647EOF 
    647       [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"` 
    648       if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then 
    649         if test_execute; then 
    650           cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2" 
    651           cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`" 
     648        [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"` 
     649        if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then 
     650          if test_execute; then 
     651            cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2" 
     652            cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`" 
     653          fi 
    652654        fi 
    653655      fi 
    654     fi 
    655   elif which_wrapper xml2-config; then 
    656     libxml2_ver=`xml2-config --version` 
    657     if [ $? -ne 0 ]; then 
    658       log_failure "not found" 
    659       fail 
    660     else 
    661       log_success "found version $libxml2_ver" 
    662       FLGXML2=`xml2-config --cflags` 
    663       INCXML2=`strip_I "$FLGXML2"` 
    664       LIBXML2=`xml2-config --libs` 
    665       cat > .tmp_src.cc << EOF 
     656    elif which_wrapper xml2-config; then 
     657      libxml2_ver=`xml2-config --version` 
     658      if [ $? -ne 0 ]; then 
     659        log_failure "not found" 
     660        fail 
     661      else 
     662        log_success "found version $libxml2_ver" 
     663        FLGXML2=`xml2-config --cflags` 
     664        INCXML2=`strip_I "$FLGXML2"` 
     665        LIBXML2=`xml2-config --libs` 
     666        cat > .tmp_src.cc << EOF 
    666667#include <cstdio> 
    667668#include <libxml/xmlversion.h> 
     
    678679} 
    679680EOF 
    680       [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"` 
    681       if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then 
    682         if test_execute; then 
    683           cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2" 
    684           cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`" 
     681        [ -n "$INCXML2" ] && I_INCXML2=`prefix_I "$INCXML2"` 
     682        if test_compile "$LIBXML2 $LIBPTHREAD $I_INCXML2" xml2 xml2; then 
     683          if test_execute; then 
     684            cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2" 
     685            cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`" 
     686          fi 
    685687        fi 
    686688      fi 
    687     fi 
    688   else 
    689     log_failure "neither pkg-config nor xml2-config found" 
    690     fail 
     689    else 
     690      log_failure "neither pkg-config nor xml2-config found" 
     691      fail 
     692    fi 
    691693  fi 
    692694} 
     
    13431345  --disable-xpcom          disable XPCOM and related stuff 
    13441346  --disable-sdl-ttf        disable SDL_ttf detection 
    1345   --build-xalan            build xalan & xerces from shipped sources 
     1347  --build-xalan            build xalan & xerces from sources (not OSE!) 
     1348  --build-libxml2          build libxml2 from sources (not OSE!) 
    13461349  --setup-wine             setup a Wine directory and register the hhc hack 
    13471350 
     
    14421445      LIBXALAN= 
    14431446      LIBXALAN_DIR= 
     1447      ;; 
     1448    --build-libxml2) 
     1449      BUILD_LIBXML2=1 
    14441450      ;; 
    14451451    --build-headless) 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy