VirtualBox

Changeset 7298

Show
Ignore:
Timestamp:
03/05/08 12:00:05 (9 months ago)
Author:
vboxsync
Message:

configure: check for libxslt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/configure

    r7290 r7298  
    5454MKISOFS="mkisofs" 
    5555BUILD_LIBXML2= 
     56BUILD_LIBXSLT= 
    5657LIBCRYPTO="-lcrypto" 
    5758LIBPTHREAD="-lpthread" 
     
    607608 
    608609# 
     610# Check for libxslt, needed by VBoxSettings 
     611# 
     612check_libxslt() 
     613{ 
     614  if [ -z "$BUILD_LIBXSLT" ]; then 
     615    test_header libxslt 
     616    if which_wrapper pkg-config > /dev/null; then 
     617      libxslt_ver=`pkg-config libxslt --modversion 2>> $LOG` 
     618      if [ $? -ne 0 ]; then 
     619        log_failure "not found" 
     620        fail 
     621      else 
     622        FLGXSLT=`pkg-config libxslt --cflags` 
     623        INCXSLT=`strip_I "$FLGXSLT"` 
     624        LIBXSLT=`pkg-config libxslt --libs` 
     625        cat > .tmp_src.cc << EOF 
     626#include <cstdio> 
     627#include <libxslt/xsltconfig.h> 
     628extern "C" int main(void) 
     629{ 
     630  printf("found version %s", LIBXSLT_DOTTED_VERSION); 
     631#if LIBXSLT_VERSION >= 10122 
     632  printf(", OK.\n"); 
     633  return 0; 
     634#else 
     635  printf(", expected version 1.1.22 or higher\n"); 
     636  return 1; 
     637#endif 
     638} 
     639EOF 
     640        [ -n "$INCXSLT" ] && I_INCXSLT=`prefix_I "$INCXSLT"` 
     641        if test_compile "$LIBXSLT $LIBPTHREAD $I_INCXSLT" xslt xslt; then 
     642          if test_execute; then 
     643            cnf_append "SDK_VBOX_LIBXSLT_INCS" "$INCXSLT" 
     644            cnf_append "SDK_VBOX_LIBXSLT_LIBS" "`strip_l "$LIBXSLT"`" 
     645          fi 
     646        fi 
     647      fi 
     648    elif which_wrapper xslt-config; then 
     649      libxslt_ver=`xslt-config --version` 
     650      if [ $? -ne 0 ]; then 
     651        log_failure "not found" 
     652        fail 
     653      else 
     654        log_success "found version $libxslt_ver" 
     655        FLGXSLT=`xslt-config --cflags` 
     656        INCXSLT=`strip_I "$FLGXSLT"` 
     657        LIBXSLT=`xslt-config --libs` 
     658        cat > .tmp_src.cc << EOF 
     659#include <cstdio> 
     660#include <libxslt/xsltconfig.h> 
     661extern "C" int main(void) 
     662{ 
     663  printf("found version %s", LIBXSLT_DOTTED_VERSION); 
     664#if LIBXSLT_VERSION >= 10122 
     665  printf(", OK.\n"); 
     666  return 0; 
     667#else 
     668  printf(", expected version 1.1.22 or higher\n"); 
     669  return 1; 
     670#endif 
     671} 
     672EOF 
     673        [ -n "$INCXSLT" ] && I_INCXSLT=`prefix_I "$INCXSLT"` 
     674        if test_compile "$LIBXSLT $LIBPTHREAD $I_INCXSLT" xslt xslt; then 
     675          if test_execute; then 
     676            cnf_append "SDK_VBOX_LIBXSLT_INCS" "$INCXSLT" 
     677            cnf_append "SDK_VBOX_LIBXSLT_LIBS" "`strip_l "$LIBXSLT"`" 
     678          fi 
     679        fi 
     680      fi 
     681    else 
     682      log_failure "neither pkg-config nor xslt-config found" 
     683      fail 
     684    fi 
     685  fi 
     686} 
     687 
     688# 
    609689# Check for libIDL, needed by xpcom 
    610690# 
     
    13371417  --disable-kmods          don't build Linux kernel modules (host and guest) 
    13381418  --build-libxml2          build libxml2 from sources (not OSE!) 
     1419  --build-libxslt          build libxslt from sources (not OSE!) 
    13391420  --setup-wine             setup a Wine directory and register the hhc hack 
    13401421 
     
    14181499    --build-libxml2) 
    14191500      BUILD_LIBXML2=1 
     1501      ;; 
     1502    --build-libxslt) 
     1503      BUILD_LIBXSLT=1 
    14201504      ;; 
    14211505    --build-headless) 
     
    15401624[ "$OS" != "darwin"  ] || BUILD_LIBXML2=1 
    15411625[ $WITH_XPCOM  -eq 1 ] && check_libxml2 
     1626# build libxslt on Darwin in every case 
     1627[ "$OS" != "darwin"  ] || BUILD_LIBXSLT=1 
     1628[ $WITH_XPCOM  -eq 1 ] && check_libxslt 
    15421629[ $WITH_LIBIDL -eq 1 ] && check_libidl 
    15431630# build openssl on Darwin in every case 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy