|
@@ -19,558 +19,6 @@ You have another version of autoconf. It may work, but is not guaranteed to.
|
|
|
If you have problems, you may need to regenerate the build system entirely.
|
|
|
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
|
|
|
|
|
-dnl
|
|
|
-dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
|
|
-dnl
|
|
|
-AC_DEFUN([AM_PATH_CPPUNIT],
|
|
|
-[
|
|
|
-
|
|
|
-AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)],
|
|
|
- cppunit_config_prefix="$withval", cppunit_config_prefix="")
|
|
|
-AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)],
|
|
|
- cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="")
|
|
|
-
|
|
|
- if test x$cppunit_config_exec_prefix != x ; then
|
|
|
- cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix"
|
|
|
- if test x${CPPUNIT_CONFIG+set} != xset ; then
|
|
|
- CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
|
|
|
- fi
|
|
|
- fi
|
|
|
- if test x$cppunit_config_prefix != x ; then
|
|
|
- cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
|
|
|
- if test x${CPPUNIT_CONFIG+set} != xset ; then
|
|
|
- CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
|
|
|
- fi
|
|
|
- fi
|
|
|
-
|
|
|
- AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
|
|
|
- cppunit_version_min=$1
|
|
|
-
|
|
|
- AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min)
|
|
|
- no_cppunit=""
|
|
|
- if test "$CPPUNIT_CONFIG" = "no" ; then
|
|
|
- AC_MSG_RESULT(no)
|
|
|
- no_cppunit=yes
|
|
|
- else
|
|
|
- CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
|
|
|
- CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
|
|
|
- cppunit_version=`$CPPUNIT_CONFIG --version`
|
|
|
-
|
|
|
- cppunit_major_version=`echo $cppunit_version | \
|
|
|
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
|
|
- cppunit_minor_version=`echo $cppunit_version | \
|
|
|
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
|
|
- cppunit_micro_version=`echo $cppunit_version | \
|
|
|
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
|
|
-
|
|
|
- cppunit_major_min=`echo $cppunit_version_min | \
|
|
|
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
|
|
- if test "x${cppunit_major_min}" = "x" ; then
|
|
|
- cppunit_major_min=0
|
|
|
- fi
|
|
|
-
|
|
|
- cppunit_minor_min=`echo $cppunit_version_min | \
|
|
|
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
|
|
- if test "x${cppunit_minor_min}" = "x" ; then
|
|
|
- cppunit_minor_min=0
|
|
|
- fi
|
|
|
-
|
|
|
- cppunit_micro_min=`echo $cppunit_version_min | \
|
|
|
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
|
|
- if test "x${cppunit_micro_min}" = "x" ; then
|
|
|
- cppunit_micro_min=0
|
|
|
- fi
|
|
|
-
|
|
|
- cppunit_version_proper=`expr \
|
|
|
- $cppunit_major_version \> $cppunit_major_min \| \
|
|
|
- $cppunit_major_version \= $cppunit_major_min \& \
|
|
|
- $cppunit_minor_version \> $cppunit_minor_min \| \
|
|
|
- $cppunit_major_version \= $cppunit_major_min \& \
|
|
|
- $cppunit_minor_version \= $cppunit_minor_min \& \
|
|
|
- $cppunit_micro_version \>= $cppunit_micro_min `
|
|
|
-
|
|
|
- if test "$cppunit_version_proper" = "1" ; then
|
|
|
- AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
|
|
|
- else
|
|
|
- AC_MSG_RESULT(no)
|
|
|
- no_cppunit=yes
|
|
|
- fi
|
|
|
- fi
|
|
|
-
|
|
|
- if test "x$no_cppunit" = x ; then
|
|
|
- ifelse([$2], , :, [$2])
|
|
|
- else
|
|
|
- CPPUNIT_CFLAGS=""
|
|
|
- CPPUNIT_LIBS=""
|
|
|
- ifelse([$3], , :, [$3])
|
|
|
- fi
|
|
|
-
|
|
|
- AC_SUBST(CPPUNIT_CFLAGS)
|
|
|
- AC_SUBST(CPPUNIT_LIBS)
|
|
|
-])
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-dnl Autoconf macros for libgcrypt
|
|
|
-dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
|
-dnl
|
|
|
-dnl This file is free software; as a special exception the author gives
|
|
|
-dnl unlimited permission to copy and/or distribute it, with or without
|
|
|
-dnl modifications, as long as this notice is preserved.
|
|
|
-dnl
|
|
|
-dnl This file is distributed in the hope that it will be useful, but
|
|
|
-dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
|
|
-dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
-
|
|
|
-
|
|
|
-dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
|
|
|
-dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
|
|
-dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
|
|
|
-dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
|
|
|
-dnl with the API version to also check the API compatibility. Example:
|
|
|
-dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
|
|
|
-dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
|
|
|
-dnl this features allows to prevent build against newer versions of libgcrypt
|
|
|
-dnl with a changed API.
|
|
|
-dnl
|
|
|
-AC_DEFUN([AM_PATH_LIBGCRYPT],
|
|
|
-[ AC_ARG_WITH(libgcrypt-prefix,
|
|
|
- AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
|
|
|
- [prefix where LIBGCRYPT is installed (optional)]),
|
|
|
- libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
|
|
|
- if test x$libgcrypt_config_prefix != x ; then
|
|
|
- if test x${LIBGCRYPT_CONFIG+set} != xset ; then
|
|
|
- LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
|
|
|
- fi
|
|
|
- fi
|
|
|
-
|
|
|
- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
|
|
|
- tmp=ifelse([$1], ,1:1.2.0,$1)
|
|
|
- if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
|
|
- req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
|
|
- min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
|
|
- else
|
|
|
- req_libgcrypt_api=0
|
|
|
- min_libgcrypt_version="$tmp"
|
|
|
- fi
|
|
|
-
|
|
|
- AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
|
|
|
- ok=no
|
|
|
- if test "$LIBGCRYPT_CONFIG" != "no" ; then
|
|
|
- req_major=`echo $min_libgcrypt_version | \
|
|
|
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
|
|
- req_minor=`echo $min_libgcrypt_version | \
|
|
|
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
|
|
- req_micro=`echo $min_libgcrypt_version | \
|
|
|
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
|
|
- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
|
|
|
- major=`echo $libgcrypt_config_version | \
|
|
|
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
|
|
|
- minor=`echo $libgcrypt_config_version | \
|
|
|
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
|
|
|
- micro=`echo $libgcrypt_config_version | \
|
|
|
- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
|
|
|
- if test "$major" -gt "$req_major"; then
|
|
|
- ok=yes
|
|
|
- else
|
|
|
- if test "$major" -eq "$req_major"; then
|
|
|
- if test "$minor" -gt "$req_minor"; then
|
|
|
- ok=yes
|
|
|
- else
|
|
|
- if test "$minor" -eq "$req_minor"; then
|
|
|
- if test "$micro" -ge "$req_micro"; then
|
|
|
- ok=yes
|
|
|
- fi
|
|
|
- fi
|
|
|
- fi
|
|
|
- fi
|
|
|
- fi
|
|
|
- fi
|
|
|
- if test $ok = yes; then
|
|
|
- AC_MSG_RESULT([yes ($libgcrypt_config_version)])
|
|
|
- else
|
|
|
- AC_MSG_RESULT(no)
|
|
|
- fi
|
|
|
- if test $ok = yes; then
|
|
|
- # If we have a recent libgcrypt, we should also check that the
|
|
|
- # API is compatible
|
|
|
- if test "$req_libgcrypt_api" -gt 0 ; then
|
|
|
- tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
|
|
|
- if test "$tmp" -gt 0 ; then
|
|
|
- AC_MSG_CHECKING([LIBGCRYPT API version])
|
|
|
- if test "$req_libgcrypt_api" -eq "$tmp" ; then
|
|
|
- AC_MSG_RESULT([okay])
|
|
|
- else
|
|
|
- ok=no
|
|
|
- AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
|
|
|
- fi
|
|
|
- fi
|
|
|
- fi
|
|
|
- fi
|
|
|
- if test $ok = yes; then
|
|
|
- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
|
|
|
- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
|
|
|
- ifelse([$2], , :, [$2])
|
|
|
- else
|
|
|
- LIBGCRYPT_CFLAGS=""
|
|
|
- LIBGCRYPT_LIBS=""
|
|
|
- ifelse([$3], , :, [$3])
|
|
|
- fi
|
|
|
- AC_SUBST(LIBGCRYPT_CFLAGS)
|
|
|
- AC_SUBST(LIBGCRYPT_LIBS)
|
|
|
-])
|
|
|
-
|
|
|
-dnl Autoconf macros for libgnutls
|
|
|
-dnl $id$
|
|
|
-
|
|
|
-# Modified for LIBGNUTLS -- nmav
|
|
|
-# Configure paths for LIBGCRYPT
|
|
|
-# Shamelessly stolen from the one of XDELTA by Owen Taylor
|
|
|
-# Werner Koch 99-12-09
|
|
|
-
|
|
|
-dnl AM_PATH_LIBGNUTLS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
|
|
-dnl Test for libgnutls, and define LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS
|
|
|
-dnl
|
|
|
-AC_DEFUN([AM_PATH_LIBGNUTLS],
|
|
|
-[dnl
|
|
|
-dnl Get the cflags and libraries from the libgnutls-config script
|
|
|
-dnl
|
|
|
-AC_ARG_WITH(libgnutls-prefix,
|
|
|
- [ --with-libgnutls-prefix=PFX Prefix where libgnutls is installed (optional)],
|
|
|
- libgnutls_config_prefix="$withval", libgnutls_config_prefix="")
|
|
|
-
|
|
|
- if test x$libgnutls_config_prefix != x ; then
|
|
|
- if test x${LIBGNUTLS_CONFIG+set} != xset ; then
|
|
|
- LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config
|
|
|
- fi
|
|
|
- fi
|
|
|
-
|
|
|
- AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no)
|
|
|
- min_libgnutls_version=ifelse([$1], ,0.1.0,$1)
|
|
|
- AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version)
|
|
|
- no_libgnutls=""
|
|
|
- if test "$LIBGNUTLS_CONFIG" = "no" ; then
|
|
|
- no_libgnutls=yes
|
|
|
- else
|
|
|
- LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags`
|
|
|
- LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs`
|
|
|
- libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version`
|
|
|
-
|
|
|
-
|
|
|
- ac_save_CFLAGS="$CFLAGS"
|
|
|
- ac_save_LIBS="$LIBS"
|
|
|
- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
|
|
|
- LIBS="$LIBS $LIBGNUTLS_LIBS"
|
|
|
-dnl
|
|
|
-dnl Now check if the installed libgnutls is sufficiently new. Also sanity
|
|
|
-dnl checks the results of libgnutls-config to some extent
|
|
|
-dnl
|
|
|
- rm -f conf.libgnutlstest
|
|
|
- AC_TRY_RUN([
|
|
|
-#include <stdio.h>
|
|
|
-#include <stdlib.h>
|
|
|
-#include <string.h>
|
|
|
-#include <gnutls/gnutls.h>
|
|
|
-
|
|
|
-int
|
|
|
-main ()
|
|
|
-{
|
|
|
- system ("touch conf.libgnutlstest");
|
|
|
-
|
|
|
- if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) )
|
|
|
- {
|
|
|
- printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n",
|
|
|
- "$libgnutls_config_version", gnutls_check_version(NULL) );
|
|
|
- printf("*** was found! If libgnutls-config was correct, then it is best\n");
|
|
|
- printf("*** to remove the old version of LIBGNUTLS. 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 libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n");
|
|
|
- printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n");
|
|
|
- printf("*** before re-running configure\n");
|
|
|
- }
|
|
|
- else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) )
|
|
|
- {
|
|
|
- printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION);
|
|
|
- printf("*** library (version %s)\n", gnutls_check_version(NULL) );
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if ( gnutls_check_version( "$min_libgnutls_version" ) )
|
|
|
- {
|
|
|
- return 0;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n",
|
|
|
- gnutls_check_version(NULL) );
|
|
|
- printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n",
|
|
|
- "$min_libgnutls_version" );
|
|
|
- printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\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 libgnutls-config shell script is\n");
|
|
|
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
|
|
- printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n");
|
|
|
- printf("*** correct copy of libgnutls-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_libgnutls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
|
|
- CFLAGS="$ac_save_CFLAGS"
|
|
|
- LIBS="$ac_save_LIBS"
|
|
|
- fi
|
|
|
-
|
|
|
- if test "x$no_libgnutls" = x ; then
|
|
|
- AC_MSG_RESULT(yes)
|
|
|
- ifelse([$2], , :, [$2])
|
|
|
- else
|
|
|
- if test -f conf.libgnutlstest ; then
|
|
|
- :
|
|
|
- else
|
|
|
- AC_MSG_RESULT(no)
|
|
|
- fi
|
|
|
- if test "$LIBGNUTLS_CONFIG" = "no" ; then
|
|
|
- echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found"
|
|
|
- echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in"
|
|
|
- echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the"
|
|
|
- echo "*** full path to libgnutls-config."
|
|
|
- else
|
|
|
- if test -f conf.libgnutlstest ; then
|
|
|
- :
|
|
|
- else
|
|
|
- echo "*** Could not run libgnutls test program, checking why..."
|
|
|
- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
|
|
|
- LIBS="$LIBS $LIBGNUTLS_LIBS"
|
|
|
- AC_TRY_LINK([
|
|
|
-#include <stdio.h>
|
|
|
-#include <stdlib.h>
|
|
|
-#include <string.h>
|
|
|
-#include <gnutls/gnutls.h>
|
|
|
-], [ return !!gnutls_check_version(NULL); ],
|
|
|
- [ echo "*** The test program compiled, but did not run. This usually means"
|
|
|
- echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong"
|
|
|
- echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your"
|
|
|
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
|
|
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
|
|
- echo "*** is required on your system"
|
|
|
- echo "***"
|
|
|
- echo "*** If you have an old version installed, it is best to remove it, although"
|
|
|
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
|
|
- echo "***" ],
|
|
|
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
|
|
|
- echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed"
|
|
|
- echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you"
|
|
|
- echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" ])
|
|
|
- CFLAGS="$ac_save_CFLAGS"
|
|
|
- LIBS="$ac_save_LIBS"
|
|
|
- fi
|
|
|
- fi
|
|
|
- LIBGNUTLS_CFLAGS=""
|
|
|
- LIBGNUTLS_LIBS=""
|
|
|
- ifelse([$3], , :, [$3])
|
|
|
- fi
|
|
|
- rm -f conf.libgnutlstest
|
|
|
- AC_SUBST(LIBGNUTLS_CFLAGS)
|
|
|
- AC_SUBST(LIBGNUTLS_LIBS)
|
|
|
-])
|
|
|
-
|
|
|
-dnl *-*wedit:notab*-* Please keep this as the last line.
|
|
|
-
|
|
|
-# Configure paths for LIBXML2
|
|
|
-# Mike Hommey 2004-06-19
|
|
|
-# use CPPFLAGS instead of CFLAGS
|
|
|
-# Toshio Kuratomi 2001-04-21
|
|
|
-# Adapted from:
|
|
|
-# Configure paths for GLIB
|
|
|
-# Owen Taylor 97-11-3
|
|
|
-
|
|
|
-dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
|
|
-dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
|
|
|
-dnl
|
|
|
-AC_DEFUN([AM_PATH_XML2],[
|
|
|
-AC_ARG_WITH(xml-prefix,
|
|
|
- [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
|
|
|
- xml_config_prefix="$withval", xml_config_prefix="")
|
|
|
-AC_ARG_WITH(xml-exec-prefix,
|
|
|
- [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
|
|
|
- xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
|
|
|
-AC_ARG_ENABLE(xmltest,
|
|
|
- [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
|
|
|
- enable_xmltest=yes)
|
|
|
-
|
|
|
- if test x$xml_config_exec_prefix != x ; then
|
|
|
- xml_config_args="$xml_config_args"
|
|
|
- if test x${XML2_CONFIG+set} != xset ; then
|
|
|
- XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
|
|
|
- fi
|
|
|
- fi
|
|
|
- if test x$xml_config_prefix != x ; then
|
|
|
- xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
|
|
|
- if test x${XML2_CONFIG+set} != xset ; then
|
|
|
- XML2_CONFIG=$xml_config_prefix/bin/xml2-config
|
|
|
- fi
|
|
|
- fi
|
|
|
-
|
|
|
- AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
|
|
|
- min_xml_version=ifelse([$1], ,2.0.0,[$1])
|
|
|
- AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
|
|
|
- no_xml=""
|
|
|
- if test "$XML2_CONFIG" = "no" ; then
|
|
|
- no_xml=yes
|
|
|
- else
|
|
|
- XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
|
|
|
- XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
|
|
|
- xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
|
|
|
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
|
|
- xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
|
|
|
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
|
|
- xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
|
|
|
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
|
|
- if test "x$enable_xmltest" = "xyes" ; then
|
|
|
- ac_save_CPPFLAGS="$CPPFLAGS"
|
|
|
- ac_save_LIBS="$LIBS"
|
|
|
- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
|
|
|
- LIBS="$XML_LIBS $LIBS"
|
|
|
-dnl
|
|
|
-dnl Now check if the installed libxml is sufficiently new.
|
|
|
-dnl (Also sanity checks the results of xml2-config to some extent)
|
|
|
-dnl
|
|
|
- rm -f conf.xmltest
|
|
|
- AC_TRY_RUN([
|
|
|
-#include <stdlib.h>
|
|
|
-#include <stdio.h>
|
|
|
-#include <string.h>
|
|
|
-#include <libxml/xmlversion.h>
|
|
|
-
|
|
|
-int
|
|
|
-main()
|
|
|
-{
|
|
|
- int xml_major_version, xml_minor_version, xml_micro_version;
|
|
|
- int major, minor, micro;
|
|
|
- char *tmp_version;
|
|
|
-
|
|
|
- system("touch conf.xmltest");
|
|
|
-
|
|
|
- /* Capture xml2-config output via autoconf/configure variables */
|
|
|
- /* HP/UX 9 (%@#!) writes to sscanf strings */
|
|
|
- tmp_version = (char *)strdup("$min_xml_version");
|
|
|
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
|
|
- printf("%s, bad version string from xml2-config\n", "$min_xml_version");
|
|
|
- exit(1);
|
|
|
- }
|
|
|
- free(tmp_version);
|
|
|
-
|
|
|
- /* Capture the version information from the header files */
|
|
|
- tmp_version = (char *)strdup(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 from libxml includes\n", "LIBXML_DOTTED_VERSION");
|
|
|
- exit(1);
|
|
|
- }
|
|
|
- free(tmp_version);
|
|
|
-
|
|
|
- /* Compare xml2-config output to the libxml headers */
|
|
|
- if ((xml_major_version != $xml_config_major_version) ||
|
|
|
- (xml_minor_version != $xml_config_minor_version) ||
|
|
|
- (xml_micro_version != $xml_config_micro_version))
|
|
|
- {
|
|
|
- printf("*** libxml header files (version %d.%d.%d) do not match\n",
|
|
|
- xml_major_version, xml_minor_version, xml_micro_version);
|
|
|
- printf("*** xml2-config (version %d.%d.%d)\n",
|
|
|
- $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
|
|
|
- return 1;
|
|
|
- }
|
|
|
-/* Compare the headers to the library to make sure we match */
|
|
|
- /* Less than ideal -- doesn't provide us with return value feedback,
|
|
|
- * only exits if there's a serious mismatch between header and library.
|
|
|
- */
|
|
|
- LIBXML_TEST_VERSION;
|
|
|
-
|
|
|
- /* Test that the library is greater than our minimum version */
|
|
|
- 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.xmlsoft.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 xml2-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 XML2_CONFIG environment to point to the\n");
|
|
|
- printf("*** correct copy of xml2-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"])
|
|
|
- CPPFLAGS="$ac_save_CPPFLAGS"
|
|
|
- LIBS="$ac_save_LIBS"
|
|
|
- fi
|
|
|
- fi
|
|
|
-
|
|
|
- if test "x$no_xml" = x ; then
|
|
|
- AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
|
|
|
- ifelse([$2], , :, [$2])
|
|
|
- else
|
|
|
- AC_MSG_RESULT(no)
|
|
|
- if test "$XML2_CONFIG" = "no" ; then
|
|
|
- echo "*** The xml2-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 XML2_CONFIG environment variable to the"
|
|
|
- echo "*** full path to xml2-config."
|
|
|
- else
|
|
|
- if test -f conf.xmltest ; then
|
|
|
- :
|
|
|
- else
|
|
|
- echo "*** Could not run libxml test program, checking why..."
|
|
|
- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
|
|
|
- LIBS="$LIBS $XML_LIBS"
|
|
|
- AC_TRY_LINK([
|
|
|
-#include <libxml/xmlversion.h>
|
|
|
-#include <stdio.h>
|
|
|
-], [ LIBXML_TEST_VERSION; return 0;],
|
|
|
- [ echo "*** The test program compiled, but did not run. This usually means"
|
|
|
- echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
|
|
|
- echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
|
|
|
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
|
|
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
|
|
- echo "*** is required on your system"
|
|
|
- echo "***"
|
|
|
- echo "*** If you have an old version installed, it is best to remove it, although"
|
|
|
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
|
|
|
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
|
|
|
- echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
|
|
|
- echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
|
|
|
- echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
|
|
|
- CPPFLAGS="$ac_save_CPPFLAGS"
|
|
|
- LIBS="$ac_save_LIBS"
|
|
|
- fi
|
|
|
- fi
|
|
|
-
|
|
|
- XML_CPPFLAGS=""
|
|
|
- XML_LIBS=""
|
|
|
- ifelse([$3], , :, [$3])
|
|
|
- fi
|
|
|
- AC_SUBST(XML_CPPFLAGS)
|
|
|
- AC_SUBST(XML_LIBS)
|
|
|
- rm -f conf.xmltest
|
|
|
-])
|
|
|
-
|
|
|
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
|
|
#
|
|
|
# This file is free software; the Free Software Foundation
|
|
@@ -1420,6 +868,7 @@ AC_SUBST([am__untar])
|
|
|
|
|
|
m4_include([m4/aria2_arg.m4])
|
|
|
m4_include([m4/codeset.m4])
|
|
|
+m4_include([m4/cppunit.m4])
|
|
|
m4_include([m4/gettext.m4])
|
|
|
m4_include([m4/glibc2.m4])
|
|
|
m4_include([m4/glibc21.m4])
|
|
@@ -1437,6 +886,9 @@ m4_include([m4/lib-prefix.m4])
|
|
|
m4_include([m4/libares.m4])
|
|
|
m4_include([m4/libcares.m4])
|
|
|
m4_include([m4/libexpat.m4])
|
|
|
+m4_include([m4/libgcrypt.m4])
|
|
|
+m4_include([m4/libgnutls.m4])
|
|
|
+m4_include([m4/libxml2.m4])
|
|
|
m4_include([m4/libz.m4])
|
|
|
m4_include([m4/lock.m4])
|
|
|
m4_include([m4/longlong.m4])
|