ia64/xen-unstable

changeset 15099:e72e94d2987c

tools: check for curl-devel and libxml2-devel
when they are required for LIBXENAPI_BINDINGS.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Tue May 15 10:03:14 2007 +0100 (2007-05-15)
parents e1d9d2884245
children 05ea0d79a92f
files tools/check/Makefile tools/check/check_curl tools/check/check_xml2
line diff
     1.1 --- a/tools/check/Makefile	Tue May 15 10:01:14 2007 +0100
     1.2 +++ b/tools/check/Makefile	Tue May 15 10:03:14 2007 +0100
     1.3 @@ -7,7 +7,7 @@ all: build
     1.4  # Check this machine is OK for building on.
     1.5  .PHONY: build
     1.6  build:
     1.7 -	XENFB_TOOLS=$(XENFB_TOOLS) ./chk build
     1.8 +	XENFB_TOOLS=$(XENFB_TOOLS) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ./chk build
     1.9  
    1.10  # Check this machine is OK for installing on.
    1.11  # DO NOT use this check from 'make install' in the parent
    1.12 @@ -15,7 +15,7 @@ build:
    1.13  # copy rather than actually installing.
    1.14  .PHONY: install
    1.15  install:
    1.16 -	XENFB_TOOLS=$(XENFB_TOOLS) ./chk install
    1.17 +	XENFB_TOOLS=$(XENFB_TOOLS) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ./chk install
    1.18  
    1.19  .PHONY: clean
    1.20  clean:
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/check/check_curl	Tue May 15 10:03:14 2007 +0100
     2.3 @@ -0,0 +1,38 @@
     2.4 +#!/bin/sh
     2.5 +# CHECK-BUILD CHECK-INSTALL
     2.6 +
     2.7 +if [ ! "$LIBXENAPI_BINDINGS" = "y" ]
     2.8 +then
     2.9 +    echo -n "unused, "
    2.10 +    exit 0
    2.11 +fi
    2.12 +
    2.13 +RC=0
    2.14 +
    2.15 +CURL_CONFIG="$(which curl-config)"
    2.16 +tmpfile=$(mktemp)
    2.17 +
    2.18 +if test -z ${CURL_CONFIG}; then
    2.19 +    RC=1
    2.20 +else
    2.21 +    ${CURL_CONFIG} --libs 2>&1 > /dev/null
    2.22 +    RC=$?
    2.23 +fi
    2.24 +
    2.25 +if test $RC -ne 0; then
    2.26 +    echo "FAILED"
    2.27 +	echo " *** curl-config is missing. "
    2.28 +    echo " *** Please install curl-devel."
    2.29 +elif ! ld $($CURL_CONFIG --libs) -o $tmpfile >/dev/null 2>&1; then
    2.30 +    echo "FAILED"
    2.31 +    echo " *** dependency libraries for curl are missing: "
    2.32 +    RC=1
    2.33 +    for i in $(ld $($CURL_CONFIG --libs) -o $tmpfile 2>&1 >/dev/null); do
    2.34 +        case $i in
    2.35 +        -l*) echo lib${i#-l}
    2.36 +        esac
    2.37 +    done
    2.38 +fi
    2.39 +rm -f $tmpfile
    2.40 +
    2.41 +exit $RC
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tools/check/check_xml2	Tue May 15 10:03:14 2007 +0100
     3.3 @@ -0,0 +1,38 @@
     3.4 +#!/bin/sh
     3.5 +# CHECK-BUILD CHECK-INSTALL
     3.6 +
     3.7 +if [ ! "$LIBXENAPI_BINDINGS" = "y" ]
     3.8 +then
     3.9 +    echo -n "unused, "
    3.10 +    exit 0
    3.11 +fi
    3.12 +
    3.13 +RC=0
    3.14 +
    3.15 +XML2_CONFIG="$(which xml2-config)"
    3.16 +tmpfile=$(mktemp)
    3.17 +
    3.18 +if test -z ${XML2_CONFIG}; then
    3.19 +    RC=1
    3.20 +else
    3.21 +    ${XML2_CONFIG} --libs 2>&1 > /dev/null
    3.22 +    RC=$?
    3.23 +fi
    3.24 +
    3.25 +if test $RC -ne 0; then
    3.26 +    echo "FAILED"
    3.27 +	echo " *** xml2-config is missing. "
    3.28 +    echo " *** Please install libxml2-devel."
    3.29 +elif ! ld $($XML2_CONFIG --libs) -o $tmpfile >/dev/null 2>&1; then
    3.30 +    echo "FAILED"
    3.31 +    echo " *** dependency libraries for xml2 are missing: "
    3.32 +    RC=1
    3.33 +    for i in $(ld $($XML2_CONFIG --libs) -o $tmpfile 2>&1 >/dev/null); do
    3.34 +        case $i in
    3.35 +        -l*) echo lib${i#-l}
    3.36 +        esac
    3.37 +    done
    3.38 +fi
    3.39 +rm -f $tmpfile
    3.40 +
    3.41 +exit $RC