dnl Process this file with autoconf to produce a configure script. AC_INIT(minidom.c) MINIDOM_MAJOR_VERSION=0 MINIDOM_MINOR_VERSION=1 MINIDOM_MICRO_VERSION=4 MINIDOM_VERSION=$MINIDOM_MAJOR_VERSION.$MINIDOM_MINOR_VERSION.$MINIDOM_MICRO_VERSION MINIDOM_VERSION_INFO=`expr $MINIDOM_MAJOR_VERSION + $MINIDOM_MINOR_VERSION`:$MINIDOM_MICRO_VERSION:$MINIDOM_MINOR_VERSION AC_SUBST(MINIDOM_VERSION) AC_SUBST(MINIDOM_VERSION_INFO) AC_ARG_WITH( libxml2, [ --with-libxml2[=ARG] compile with libxml 2.x library [default=auto]], libxml2=$withval, libxml2="auto" ) AM_INIT_AUTOMAKE(minidom, $MINIDOM_VERSION) AM_CONFIG_HEADER(config.h) AM_PROG_LIBTOOL dnl Checks for programs. AC_PROG_CC AC_LANG_C AC_PROG_RANLIB dnl Checks for libraries. AC_CHECK_LIB(glib, g_malloc, [ CFLAGS="$CFLAGS `glib-config --cflags`" CXXFLAGS="$CXXFLAGS `glib-config --cflags`" LIBS="$LIBS `glib-config --libs`" ], AC_MSG_ERROR(cound not find glib), `glib-config --libs` ) AC_CHECK_PROG(XML_CONFIG, xml2-config, xml2-config, no) if test $XML_CONFIG = "no"; then AC_CHECK_PROG(XML_CONFIG, xml-config, xml-config, no) fi AC_SUBST(XML_CONFIG) if test $XML_CONFIG = "no"; then AC_MSG_ERROR(could not find configuration script for libxml) fi if test $XML_CONFIG = "xml2-config" -a $libxml2 = "auto"; then libxml2="yes" fi CFLAGS="$CFLAGS `$XML_CONFIG --cflags`" CXXFLAGS="$CXXFLAGS `$XML_CONFIG --cflags`" LIBS="$LIBS `$XML_CONFIG --libs`" dnl if the user gave no explicit libxml2 option, try to guess its value if test $libxml2 = "auto"; then AC_MSG_CHECKING(for libxml version 2) AC_TRY_COMPILE( [#include ], [ xmlEntity e; e.etype = e.etype; ], [ AC_DEFINE(HAVE_LIBXML2) AC_MSG_RESULT(maybe) ], AC_MSG_RESULT(no) ) elif test $libxml2 = "yes"; then AC_DEFINE(HAVE_LIBXML2) fi dnl Checks for header files. AC_OUTPUT([ Makefile minidom.spec ])