Minor changes for libxml support

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@7469 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 2000-09-11 11:58:00 +00:00
parent e97ebfa36f
commit 171409d121
3 changed files with 154 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2000-09-11 Richard Frith-Macdonald <rfm@gnu.org>
* configure.in: Added test for libxml so we link with it if it is
available.
2000-08-30 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* configure.in: Check for gtar.

123
configure vendored
View file

@ -3280,6 +3280,129 @@ ac_cv_objc_threaded=$objc_threaded
#--------------------------------------------------------------------
# Check recent libxml for Properytlists, GSXML, GSDoc etc.
#--------------------------------------------------------------------
echo "Checking for libxml"
for ac_hdr in libxml/xmlversion.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3292: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3297 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test $ac_cv_header_libxml_xmlversion_h = no; then
echo "Could not find libxml headers"
echo "Check to make sure you have libxml version 2 or later installed"
echo "configure: warning: Could not find libxml headers" 1>&2
else
cat > conftest.$ac_ext <<EOF
#line 3334 "configure"
#include "confdefs.h"
#include "libxml/xmlversion.h"
#if LIBXML_VERSION < 20000
#error
#endif
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
libxml2plus=1
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
libxml2plus=0
fi
rm -f conftest*
if test $libxml2plus = 0; then
echo "libxml version older than 2.0.0"
echo "configure: warning: libxml version older than 2.0.0" 1>&2
else
echo $ac_n "checking for xmlNewDoc in -lxml""... $ac_c" 1>&6
echo "configure:3360: checking for xmlNewDoc in -lxml" >&5
ac_lib_var=`echo xml'_'xmlNewDoc | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lxml $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3368 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char xmlNewDoc();
int main() {
xmlNewDoc()
; return 0; }
EOF
if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
xml_ok=yes
else
echo "$ac_t""no" 1>&6
xml_ok=no
fi
if test "$xml_ok" = yes; then
LIBS="$LIBS -lxml"
fi
fi
fi
#--------------------------------------------------------------------
# Record the version
#--------------------------------------------------------------------

View file

@ -469,6 +469,32 @@ ac_cv_objc_threaded=$objc_threaded
AC_SUBST(objc_threaded)
AC_SUBST(ac_cv_objc_threaded)
#--------------------------------------------------------------------
# Check recent libxml for Properytlists, GSXML, GSDoc etc.
#--------------------------------------------------------------------
echo "Checking for libxml"
AC_CHECK_HEADERS(libxml/xmlversion.h)
if test $ac_cv_header_libxml_xmlversion_h = no; then
echo "Could not find libxml headers"
echo "Check to make sure you have libxml version 2 or later installed"
AC_MSG_WARN(Could not find libxml headers)
else
AC_TRY_CPP([#include "libxml/xmlversion.h"
#if LIBXML_VERSION < 20000
#error
#endif], libxml2plus=1, libxml2plus=0)
if test $libxml2plus = 0; then
echo "libxml version older than 2.0.0"
AC_MSG_WARN(libxml version older than 2.0.0)
else
AC_CHECK_LIB(xml, xmlNewDoc, xml_ok=yes, xml_ok=no)
if test "$xml_ok" = yes; then
LIBS="$LIBS -lxml"
AC_SUBST(LIBS)
fi
fi
fi
#--------------------------------------------------------------------
# Record the version
#--------------------------------------------------------------------