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=0
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.
28 dnl Checks for libraries.
29 AC_CHECK_LIB(glib, g_malloc,
31 CFLAGS="$CFLAGS `glib-config --cflags`"
32 CXXFLAGS="$CXXFLAGS `glib-config --cflags`"
33 LIBS="$LIBS `glib-config --libs`"
35 AC_MSG_ERROR(cound not find glib),
39 AC_CHECK_LIB(xml, xmlParseDocument,
41 CFLAGS="$CFLAGS `xml-config --cflags`"
42 CXXFLAGS="$CXXFLAGS `xml-config --cflags`"
43 LIBS="$LIBS `xml-config --libs`"
49 dnl if the user gave no explicit libxml2 option, try to guess its value
50 if test $libxml2 = "auto"; then
51 AC_MSG_CHECKING(for libxml version 2)
53 [#include <parser.h>],
59 AC_DEFINE(HAVE_LIBXML2)
64 elif test $libxml2 = "yes"; then
65 AC_DEFINE(HAVE_LIBXML2)
68 dnl Checks for header files.