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=2
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)
41 AC_CHECK_PROG(XML_CONFIG, xml-config, xml-config, no)
44 if test $XML_CONFIG = "no"; then
45 AC_MSG_ERROR(could not find configuration script for libxml)
48 if test $XML_CONFIG = xml2-config -a libxml2 = "auto"; then
52 CFLAGS="$CFLAGS `$XML_CONFIG --cflags`"
53 CXXFLAGS="$CXXFLAGS `$XML_CONFIG --cflags`"
54 LIBS="$LIBS `$XML_CONFIG --libs`"
56 dnl if the user gave no explicit libxml2 option, try to guess its value
57 if test $libxml2 = "auto"; then
58 AC_MSG_CHECKING(for libxml version 2)
60 [#include <parser.h>],
66 AC_DEFINE(HAVE_LIBXML2)
71 elif test $libxml2 = "yes"; then
72 AC_DEFINE(HAVE_LIBXML2)
75 dnl Checks for header files.