VirtualBox

Changeset 6097

Show
Ignore:
Timestamp:
12/16/07 20:53:09 (1 year ago)
Author:
vboxsync
Message:

configure: check for libxml2 >= version 2.6.23 as libxml2 2.6.22 is known to not work

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/configure

    r6078 r6097  
    592592  return 0; 
    593593#else 
    594   printf(", expected version 2.5.0 or higher"); 
     594  printf(", expected version 2.5.0 or higher\n"); 
    595595  return 1; 
    596596#endif 
     
    615615# 
    616616# Check for libxml2, needed by xpcom 
     617# For now we check for libxml2 2.6.23 as 2.6.22 is known to NOT work 
    617618# 
    618619check_libxml2() 
     
    626627      fail 
    627628    else 
    628       log_success "found version $libxml2_ver" 
    629629      FLGXML2=`pkg-config libxml-2.0 --cflags` 
    630630      INCXML2=`strip_I "$FLGXML2"` 
    631631      LIBXML2=`pkg-config libxml-2.0 --libs` 
    632       cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2" 
    633       cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`" 
     632      cat > .tmp_src.cc << EOF 
     633#include <cstdio> 
     634#include <libxml/xmlversion.h> 
     635extern "C" int main(void) 
     636
     637  printf("found version %s", LIBXML_DOTTED_VERSION); 
     638#if LIBXML_VERSION >= 20623 
     639  printf(", OK.\n"); 
     640  return 0; 
     641#else 
     642  printf(", expected version 2.6.23 or higher\n"); 
     643  return 1; 
     644#endif 
     645
     646EOF 
     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"`" 
     652        fi 
     653      fi 
    634654    fi 
    635655  elif which_wrapper xml2-config; then 
     
    643663      INCXML2=`strip_I "$FLGXML2"` 
    644664      LIBXML2=`xml2-config --libs` 
    645       cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2" 
    646       cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBCXML2"`" 
     665      cat > .tmp_src.cc << EOF 
     666#include <cstdio> 
     667#include <libxml/xmlversion.h> 
     668extern "C" int main(void) 
     669
     670  printf("found version %s", LIBXML_DOTTED_VERSION); 
     671#if LIBXML_VERSION >= 20623 
     672  printf(", OK.\n"); 
     673  return 0; 
     674#else 
     675  printf(", expected version 2.6.23 or higher\n"); 
     676  return 1; 
     677#endif 
     678
     679EOF 
     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"`" 
     685        fi 
     686      fi 
    647687    fi 
    648688  else 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy