diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-01-22 09:44:17 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-01-22 09:44:17 +0000 |
commit | b7d7bde93532745ac21f2a09b7f926533f104861 (patch) | |
tree | ce340c915fbe6b23694eed63d675db647064290d /tools/check/check_curl | |
parent | 036e6bd11be95e3e78d2316b0cf0847740b539bc (diff) | |
download | xen-b7d7bde93532745ac21f2a09b7f926533f104861.tar.gz xen-b7d7bde93532745ac21f2a09b7f926533f104861.tar.bz2 xen-b7d7bde93532745ac21f2a09b7f926533f104861.zip |
Make tools/check scripts cross-friendly
This patch introduces tools/check/funcs.sh with some
cross-friendly abstractions, then modifies the check_*
scripts to use them.
Signed-off-by: Aron Griffis <aron@hp.com>
Diffstat (limited to 'tools/check/check_curl')
-rwxr-xr-x | tools/check/check_curl | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/tools/check/check_curl b/tools/check/check_curl index 7176c896c7..eb6add3ef4 100755 --- a/tools/check/check_curl +++ b/tools/check/check_curl @@ -1,38 +1,13 @@ #!/bin/sh # CHECK-BUILD CHECK-INSTALL -if [ ! "$LIBXENAPI_BINDINGS" = "y" ] -then - echo -n "unused, " - exit 0 -fi - -RC=0 - -CURL_CONFIG="$(which curl-config)" -tmpfile=$(mktemp) - -if test -z ${CURL_CONFIG}; then - RC=1 -else - ${CURL_CONFIG} --libs 2>&1 > /dev/null - RC=$? -fi +. funcs.sh -if test $RC -ne 0; then - echo "FAILED" - echo " *** curl-config is missing. " - echo " *** Please install curl-devel." -elif ! ld $($CURL_CONFIG --libs) -o $tmpfile >/dev/null 2>&1; then - echo "FAILED" - echo " *** dependency libraries for curl are missing: " - RC=1 - for i in $(ld $($CURL_CONFIG --libs) -o $tmpfile 2>&1 >/dev/null); do - case $i in - -l*) echo lib${i#-l} - esac - done +if [ "$LIBXENAPI_BINDINGS" != "y" ]; then + echo -n "unused, " + exit 0 fi -rm -f $tmpfile -exit $RC +has_or_fail curl-config +curl_libs=`curl-config --libs` || fail "curl-config --libs failed" +test_link $curl_libs || fail "dependency libraries for curl are missing" |