1 dnl Process this file with autoconf to produce a configure script.
4 MINIDOM_MAJOR_VERSION=0
5 MINIDOM_MINOR_VERSION=1
6 MINIDOM_MICRO_VERSION=4
7 MINIDOM_VERSION=$MINIDOM_MAJOR_VERSION.$MINIDOM_MINOR_VERSION.$MINIDOM_MICRO_VERSION
8 MINIDOM_VERSION_INFO=`expr $MINIDOM_MAJOR_VERSION + $MINIDOM_MINOR_VERSION`:$MINIDOM_MICRO_VERSION:$MINIDOM_MINOR_VERSION
10 AC_SUBST(MINIDOM_VERSION)
11 AC_SUBST(MINIDOM_VERSION_INFO)
15 [ --with-libxml2[=ARG] compile with libxml 2.x library [default=auto]],
20 AM_INIT_AUTOMAKE(minidom, $MINIDOM_VERSION)
21 AM_CONFIG_HEADER(config.h)
24 dnl Checks for programs.
29 dnl Checks for libraries.
30 AC_CHECK_LIB(glib, g_malloc,
32 CFLAGS="$CFLAGS `glib-config --cflags`"
33 CXXFLAGS="$CXXFLAGS `glib-config --cflags`"
34 LIBS="$LIBS `glib-config --libs`"
36 AC_MSG_ERROR(cound not find glib),
40 AC_CHECK_PROG(XML_CONFIG, xml2-config, xml2-config, no)
41 if test $XML_CONFIG = "no"; then
42 AC_CHECK_PROG(XML_CONFIG, xml-config, xml-config, no)
46 if test $XML_CONFIG = "no"; then
47 AC_MSG_ERROR(could not find configuration script for libxml)
50 if test $XML_CONFIG = "xml2-config" -a $libxml2 = "auto"; then
54 CFLAGS="$CFLAGS `$XML_CONFIG --cflags`"
55 CXXFLAGS="$CXXFLAGS `$XML_CONFIG --cflags`"
56 LIBS="$LIBS `$XML_CONFIG --libs`"
58 dnl if the user gave no explicit libxml2 option, try to guess its value
59 if test $libxml2 = "auto"; then
60 AC_MSG_CHECKING(for libxml version 2)
62 [#include <parser.h>],
68 AC_DEFINE(HAVE_LIBXML2)
73 elif test $libxml2 = "yes"; then
74 AC_DEFINE(HAVE_LIBXML2)
77 dnl Checks for header files.