Files
xen/tools/check/check_xml2
T
kfraser@localhost.localdomain 787dcb588b Check for libxml2 if security tools are to be built, and adapt the
python setup.py command line parameters to also work under SuSE.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-07 09:48:35 +01:00

39 lines
761 B
Bash
Executable File

#!/bin/sh
# CHECK-BUILD CHECK-INSTALL
if [ ! "$LIBXENAPI_BINDINGS" = "y" -a ! "$ACM_SECURITY" = "y" ]
then
echo -n "unused, "
exit 0
fi
RC=0
XML2_CONFIG="$(which xml2-config)"
tmpfile=$(mktemp)
if test -z ${XML2_CONFIG}; then
RC=1
else
${XML2_CONFIG} --libs 2>&1 > /dev/null
RC=$?
fi
if test $RC -ne 0; then
echo "FAILED"
echo " *** xml2-config is missing. "
echo " *** Please install libxml2-devel."
elif ! ld $($XML2_CONFIG --libs) -o $tmpfile >/dev/null 2>&1; then
echo "FAILED"
echo " *** dependency libraries for xml2 are missing: "
RC=1
for i in $(ld $($XML2_CONFIG --libs) -o $tmpfile 2>&1 >/dev/null); do
case $i in
-l*) echo lib${i#-l}
esac
done
fi
rm -f $tmpfile
exit $RC