Update to use autoconf macro from libxml 2.2.10 distribution.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@8475 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Jonathan Gapen 2001-01-05 10:12:17 +00:00
parent f2ca8a6bab
commit 0672daf693
3 changed files with 391 additions and 236 deletions

166
aclocal.m4 vendored Normal file
View file

@ -0,0 +1,166 @@
# aclocal.m4 - configure macro for libxml
#
# Copyright (C) 2001 Free Software Foundation, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
dnl Code shamelessly stolen from glib-config by Sebastian Rittau
dnl AM_PATH_XML([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
AC_DEFUN(AM_PATH_XML,[
AC_ARG_WITH(xml-prefix,
[ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
xml_config_prefix="$withval", xml_config_prefix="")
AC_ARG_ENABLE(xmltest,
[ --disable-xmltest Do not try to compile and run a test XML program],,
enable_xmltest=yes)
if test x$xml_config_prefix != x ; then
xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
if test x${XML_CONFIG+set} != xset ; then
XML_CONFIG=$xml_config_prefix/bin/xml-config
fi
fi
AC_PATH_PROG(XML_CONFIG, xml-config, no)
min_xml_version=ifelse([$1], ,2.0.0, [$1])
AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
no_xml=""
if test "$XML_CONFIG" = "no" ; then
no_xml=yes
else
XML_CFLAGS=`$XML_CONFIG $xml_config_args --cflags`
XML_LIBS=`$XML_CONFIG $xml_config_args --libs`
xml_config_major_version=`$XML_CONFIG $xml_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
xml_config_minor_version=`$XML_CONFIG $xml_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
xml_config_micro_version=`$XML_CONFIG $xml_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_xmltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $XML_CFLAGS"
LIBS="$XML_LIBS $LIBS"
dnl
dnl Now check if the installed libxml is sufficiently new.
dnl
rm -f conf.xmltest
AC_TRY_RUN([
#include <stdlib.h>
#include <stdio.h>
#include <xmlversion.h>
#include <parser.h>
int
main()
{
int xml_major_version, xml_minor_version, xml_micro_version;
int major, minor, micro;
char *tmp_version;
system("touch conf.xmltest");
tmp_version = xmlStrdup("$min_xml_version");
if(sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_xml_version");
exit(1);
}
tmp_version = xmlStrdup(LIBXML_DOTTED_VERSION);
if(sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
printf("%s, bad version string\n", "$min_xml_version");
exit(1);
}
if((xml_major_version != $xml_config_major_version) ||
(xml_minor_version != $xml_config_minor_version) ||
(xml_micro_version != $xml_config_micro_version))
{
printf("\n*** 'xml-config --version' returned %d.%d.%d, but libxml (%d.%d.%d)\n",
$xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version,
xml_major_version, xml_minor_version, xml_micro_version);
printf("*** was found! If xml-config was correct, then it is best\n");
printf("*** to remove the old version of libxml. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If xml-config was wrong, set the environment variable XML_CONFIG\n");
printf("*** to point to the correct copy of xml-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else
{
if ((xml_major_version > major) ||
((xml_major_version == major) && (xml_minor_version > minor)) ||
((xml_major_version == major) && (xml_minor_version == minor) &&
(xml_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
xml_major_version, xml_minor_version, xml_micro_version);
printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** libxml is always available from ftp://ftp.gnome.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the xml-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of libxml, but you can also set the XML_CONFIG environment to point to the\n");
printf("*** correct copy of xml-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_xml" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$XML_CONFIG" = "no" ; then
echo "*** The xml-config script installed by libxml could not be found"
echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the XML_CONFIG environment variable to the"
echo "*** full path to xml-config."
else
if test -f conf.xmltest ; then
:
else
echo "*** Could not run libxml test program, checking why..."
CFLAGS="$CFLAGS $XML_CFLAGS"
LIBS="$LIBS $XML_LIBS"
dnl FIXME: AC_TRY_LINK
fi
fi
XML_CFLAGS=""
XML_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)
rm -f conf.xmltest
])

405
configure vendored
View file

@ -51,9 +51,9 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-ffcall Enable use of ffcall library"
ac_help="$ac_help
--with-libxml-include=PATH include path for libxml headers"
--with-xml-prefix=PFX Prefix where libxml is installed (optional)"
ac_help="$ac_help
--with-libxml-library=PATH library path for libxml libraries"
--disable-xmltest Do not try to compile and run a test XML program"
ac_help="$ac_help
--with-openssl-include=PATH include path for openssl headers"
ac_help="$ac_help
@ -3395,8 +3395,8 @@ enable_libffi=no
fi
echo $ac_n "checking "forwarding callback in runtime"""... $ac_c" 1>&6
echo "configure:3400: checking "forwarding callback in runtime"" >&5
echo $ac_n "checking "for forwarding callback in runtime"""... $ac_c" 1>&6
echo "configure:3400: checking "for forwarding callback in runtime"" >&5
cat > conftest.$ac_ext <<EOF
#line 3402 "configure"
#include "confdefs.h"
@ -3470,182 +3470,216 @@ fi
#--------------------------------------------------------------------
# Check recent libxml for Properytlists, GSXML, GSDoc etc.
#--------------------------------------------------------------------
echo "Checking for libxml"
# Check whether --with-libxml-include or --without-libxml-include was given.
if test "${with_libxml_include+set}" = set; then
withval="$with_libxml_include"
libxml_incdir="$withval"
# Check whether --with-xml-prefix or --without-xml-prefix was given.
if test "${with_xml_prefix+set}" = set; then
withval="$with_xml_prefix"
xml_config_prefix="$withval"
else
libxml_incdir="no"
xml_config_prefix=""
fi
# Check whether --enable-xmltest or --disable-xmltest was given.
if test "${enable_xmltest+set}" = set; then
enableval="$enable_xmltest"
:
else
enable_xmltest=yes
fi
# Check whether --with-libxml-library or --without-libxml-library was given.
if test "${with_libxml_library+set}" = set; then
withval="$with_libxml_library"
libxml_libdir="$withval"
else
libxml_libdir="no"
fi
if test x$xml_config_prefix != x ; then
xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
if test x${XML_CONFIG+set} != xset ; then
XML_CONFIG=$xml_config_prefix/bin/xml-config
fi
fi
cppflags_temp=$CFLAGS
libs_temp=$LIBS
if test "$libxml_incdir" != "no"; then
CPPFLAGS="$CPPFLAGS -I$libxml_incdir"
fi
if test "$libxml_libdir" != "no"; then
LIBS="$LIBS -L$libxml_libdir"
fi
xmlhdrdir=no
# The order of these tests is important.
cat > conftest.$ac_ext <<EOF
#line 3506 "configure"
#include "confdefs.h"
#include <libxml/xmlversion.h>
#if LIBXML_VERSION < 20203
#error libxml needs to be version 2.2.3 or later
#endif
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3514: \"$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*
xmlhdrdir=libxml
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test $xmlhdrdir = no; then
cat > conftest.$ac_ext <<EOF
#line 3527 "configure"
#include "confdefs.h"
#include <libxml2/xmlversion.h>
#if LIBXML_VERSION < 20203
#error libxml needs to be version 2.2.3 or later
#endif
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3535: \"$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*
cat >> confdefs.h <<\EOF
#define LIBXML2 1
EOF
xmlhdrdir=libxml2
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
fi
echo "$ac_t""$xmlhdrdir" 1>&6
if test $xmlhdrdir = no; then
echo "Could not find libxml headers"
echo "Check to make sure you have libxml version 2.2.3 or later installed"
echo "configure: warning: Could not find libxml headers" 1>&2
else
cat > conftest.$ac_ext <<EOF
#line 3557 "configure"
#include "confdefs.h"
#include "$xmlhdrdir/xmlversion.h"
#if LIBXML_VERSION < 20203
#error
#endif
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3565: \"$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.2.3"
echo "configure: warning: libxml version older than 2.2.3" 1>&2
else
echo $ac_n "checking for library containing xmlNewDoc""... $ac_c" 1>&6
echo "configure:3584: checking for library containing xmlNewDoc" >&5
if eval "test \"`echo '$''{'ac_cv_search_xmlNewDoc'+set}'`\" = set"; then
# Extract the first word of "xml-config", so it can be a program name with args.
set dummy xml-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3502: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XML_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_xmlNewDoc="no"
cat > conftest.$ac_ext <<EOF
#line 3591 "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();
case "$XML_CONFIG" in
/*)
ac_cv_path_XML_CONFIG="$XML_CONFIG" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_XML_CONFIG="$XML_CONFIG" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_XML_CONFIG="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_XML_CONFIG" && ac_cv_path_XML_CONFIG="no"
;;
esac
fi
XML_CONFIG="$ac_cv_path_XML_CONFIG"
if test -n "$XML_CONFIG"; then
echo "$ac_t""$XML_CONFIG" 1>&6
else
echo "$ac_t""no" 1>&6
fi
min_xml_version=2.2.3
echo $ac_n "checking for libxml - version >= $min_xml_version""... $ac_c" 1>&6
echo "configure:3537: checking for libxml - version >= $min_xml_version" >&5
no_xml=""
if test "$XML_CONFIG" = "no" ; then
no_xml=yes
else
XML_CFLAGS=`$XML_CONFIG $xml_config_args --cflags`
XML_LIBS=`$XML_CONFIG $xml_config_args --libs`
xml_config_major_version=`$XML_CONFIG $xml_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
xml_config_minor_version=`$XML_CONFIG $xml_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
xml_config_micro_version=`$XML_CONFIG $xml_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
if test "x$enable_xmltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $XML_CFLAGS"
LIBS="$XML_LIBS $LIBS"
rm -f conf.xmltest
if test "$cross_compiling" = yes; then
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat > conftest.$ac_ext <<EOF
#line 3560 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdio.h>
#include <xmlversion.h>
#include <parser.h>
int
main()
{
int xml_major_version, xml_minor_version, xml_micro_version;
int major, minor, micro;
char *tmp_version;
system("touch conf.xmltest");
tmp_version = xmlStrdup("$min_xml_version");
if(sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_xml_version");
exit(1);
}
tmp_version = xmlStrdup(LIBXML_DOTTED_VERSION);
if(sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
printf("%s, bad version string\n", "$min_xml_version");
exit(1);
}
if((xml_major_version != $xml_config_major_version) ||
(xml_minor_version != $xml_config_minor_version) ||
(xml_micro_version != $xml_config_micro_version))
{
printf("\n*** 'xml-config --version' returned %d.%d.%d, but libxml (%d.%d.%d)\n",
$xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version,
xml_major_version, xml_minor_version, xml_micro_version);
printf("*** was found! If xml-config was correct, then it is best\n");
printf("*** to remove the old version of libxml. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If xml-config was wrong, set the environment variable XML_CONFIG\n");
printf("*** to point to the correct copy of xml-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else
{
if ((xml_major_version > major) ||
((xml_major_version == major) && (xml_minor_version > minor)) ||
((xml_major_version == major) && (xml_minor_version == minor) &&
(xml_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
xml_major_version, xml_minor_version, xml_micro_version);
printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** libxml is always available from ftp://ftp.gnome.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the xml-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of libxml, but you can also set the XML_CONFIG environment to point to the\n");
printf("*** correct copy of xml-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
int main() {
xmlNewDoc()
; return 0; }
EOF
if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_xmlNewDoc="none required"
if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
no_xml=yes
fi
rm -f conftest*
test "$ac_cv_search_xmlNewDoc" = "no" && for i in xml xml2; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 3613 "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:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_xmlNewDoc="-l$i"
break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
rm -fr conftest*
fi
echo "$ac_t""$ac_cv_search_xmlNewDoc" 1>&6
if test "$ac_cv_search_xmlNewDoc" != "no"; then
test "$ac_cv_search_xmlNewDoc" = "none required" || LIBS="$ac_cv_search_xmlNewDoc $LIBS"
xml_ok=yes
else :
xml_ok=no
fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
fi
if test "$HAVE_LIBXML" = "0"; then
CPPFLAGS="$cppflags_temp";
LIBS="$libs_temp";
if test "x$no_xml" = x ; then
echo "$ac_t""yes" 1>&6
enable_libxml=yes
else
echo "$ac_t""no" 1>&6
if test "$XML_CONFIG" = "no" ; then
echo "*** The xml-config script installed by libxml could not be found"
echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the XML_CONFIG environment variable to the"
echo "*** full path to xml-config."
else
if test -f conf.xmltest ; then
:
else
echo "*** Could not run libxml test program, checking why..."
CFLAGS="$CFLAGS $XML_CFLAGS"
LIBS="$LIBS $XML_LIBS"
fi
fi
XML_CFLAGS=""
XML_LIBS=""
enable_libxml=no
fi
rm -f conf.xmltest
if test $enable_libxml = yes; then
CPPFLAGS="$CPPFLAGS $XML_CFLAGS"
LIBS="$LIBS $XML_LIBS"
fi
#--------------------------------------------------------------------
@ -3684,17 +3718,17 @@ for ac_hdr in openssl/ssl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3688: checking for $ac_hdr" >&5
echo "configure:3722: 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 3693 "configure"
#line 3727 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3732: \"$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*
@ -3726,7 +3760,7 @@ if test $ac_cv_header_openssl_ssl_h = no; then
echo "configure: warning: Could not find openssl headers" 1>&2
else
echo $ac_n "checking for CRYPTO_malloc in -lcrypto""... $ac_c" 1>&6
echo "configure:3730: checking for CRYPTO_malloc in -lcrypto" >&5
echo "configure:3764: checking for CRYPTO_malloc in -lcrypto" >&5
ac_lib_var=`echo crypto'_'CRYPTO_malloc | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3734,7 +3768,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypto $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3738 "configure"
#line 3772 "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
@ -3745,7 +3779,7 @@ int main() {
CRYPTO_malloc()
; return 0; }
EOF
if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3783: \"$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
@ -3770,7 +3804,7 @@ fi
base_libs="$LIBS"
LIBS="$LIBS -lcrypto"
echo $ac_n "checking for ssl2_clear in -lssl""... $ac_c" 1>&6
echo "configure:3774: checking for ssl2_clear in -lssl" >&5
echo "configure:3808: checking for ssl2_clear in -lssl" >&5
ac_lib_var=`echo ssl'_'ssl2_clear | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3778,7 +3812,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lssl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3782 "configure"
#line 3816 "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
@ -3789,7 +3823,7 @@ int main() {
ssl2_clear()
; return 0; }
EOF
if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3827: \"$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
@ -3864,17 +3898,17 @@ for ac_hdr in gmp.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3868: checking for $ac_hdr" >&5
echo "configure:3902: 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 3873 "configure"
#line 3907 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3912: \"$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*
@ -3906,7 +3940,7 @@ if test $ac_cv_header_gmp_h = no; then
echo "configure: warning: Could not find gmp headers" 1>&2
else
echo $ac_n "checking for mpf_abs in -lgmp""... $ac_c" 1>&6
echo "configure:3910: checking for mpf_abs in -lgmp" >&5
echo "configure:3944: checking for mpf_abs in -lgmp" >&5
ac_lib_var=`echo gmp'_'mpf_abs | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3914,7 +3948,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgmp $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3918 "configure"
#line 3952 "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
@ -3925,7 +3959,7 @@ int main() {
mpf_abs()
; return 0; }
EOF
if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3963: \"$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
@ -3972,12 +4006,12 @@ fi
for ac_func in iconv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3976: checking for $ac_func" >&5
echo "configure:4010: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3981 "configure"
#line 4015 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -4000,7 +4034,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -4041,7 +4075,7 @@ fi
fi
echo $ac_n "checking for main in -liconv""... $ac_c" 1>&6
echo "configure:4045: checking for main in -liconv" >&5
echo "configure:4079: checking for main in -liconv" >&5
ac_lib_var=`echo iconv'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -4049,14 +4083,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-liconv $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4053 "configure"
#line 4087 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4094: \"$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
@ -4285,6 +4319,9 @@ s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
s%@DPS_DEFINE@%$DPS_DEFINE%g
s%@objc_threaded@%$objc_threaded%g
s%@ac_cv_objc_threaded@%$ac_cv_objc_threaded%g
s%@XML_CONFIG@%$XML_CONFIG%g
s%@XML_CFLAGS@%$XML_CFLAGS%g
s%@XML_LIBS@%$XML_LIBS%g
s%@HAVE_GMP@%$HAVE_GMP%g
s%@GNUSTEP_VERSION@%$GNUSTEP_VERSION%g
s%@GNUSTEP_MAJOR_VERSION@%$GNUSTEP_MAJOR_VERSION%g

View file

@ -537,58 +537,10 @@ fi
#--------------------------------------------------------------------
# Check recent libxml for Properytlists, GSXML, GSDoc etc.
#--------------------------------------------------------------------
echo "Checking for libxml"
AC_ARG_WITH(libxml-include,
[ --with-libxml-include=PATH include path for libxml headers],
libxml_incdir="$withval", libxml_incdir="no")
AC_ARG_WITH(libxml-library,
[ --with-libxml-library=PATH library path for libxml libraries],
libxml_libdir="$withval", libxml_libdir="no")
cppflags_temp=$CFLAGS
libs_temp=$LIBS
if test "$libxml_incdir" != "no"; then
CPPFLAGS="$CPPFLAGS -I$libxml_incdir"
fi
if test "$libxml_libdir" != "no"; then
LIBS="$LIBS -L$libxml_libdir"
fi
xmlhdrdir=no
# The order of these tests is important.
AC_TRY_CPP([#include <libxml/xmlversion.h>
#if LIBXML_VERSION < 20203
#error libxml needs to be version 2.2.3 or later
#endif], xmlhdrdir=libxml)
if test $xmlhdrdir = no; then
AC_TRY_CPP([#include <libxml2/xmlversion.h>
#if LIBXML_VERSION < 20203
#error libxml needs to be version 2.2.3 or later
#endif], AC_DEFINE(LIBXML2) xmlhdrdir=libxml2)
fi
AC_MSG_RESULT($xmlhdrdir)
if test $xmlhdrdir = no; then
echo "Could not find libxml headers"
echo "Check to make sure you have libxml version 2.2.3 or later installed"
AC_MSG_WARN(Could not find libxml headers)
else
AC_TRY_CPP([#include "$xmlhdrdir/xmlversion.h"
#if LIBXML_VERSION < 20203
#error
#endif], libxml2plus=1, libxml2plus=0)
if test $libxml2plus = 0; then
echo "libxml version older than 2.2.3"
AC_MSG_WARN(libxml version older than 2.2.3)
else
AC_SEARCH_LIBS(xmlNewDoc, xml xml2, xml_ok=yes, xml_ok=no)
fi
fi
if test "$HAVE_LIBXML" = "0"; then
CPPFLAGS="$cppflags_temp";
LIBS="$libs_temp";
AM_PATH_XML(2.2.3, enable_libxml=yes, enable_libxml=no)
if test $enable_libxml = yes; then
CPPFLAGS="$CPPFLAGS $XML_CFLAGS"
LIBS="$LIBS $XML_LIBS"
fi
#--------------------------------------------------------------------