MINIDOM_MAJOR_VERSION=0
MINIDOM_MINOR_VERSION=1
-MINIDOM_MICRO_VERSION=0
+MINIDOM_MICRO_VERSION=1
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
libxml2,
[ --with-libxml2[=ARG] compile with libxml 2.x library [default=auto]],
libxml2=$withval,
- libxml2=auto
+ libxml2="auto"
)
AM_INIT_AUTOMAKE(minidom, $MINIDOM_VERSION)
dnl Checks for programs.
AC_PROG_CC
+AC_LANG_C
AC_PROG_RANLIB
dnl Checks for libraries.
`glib-config --libs`
)
-AC_CHECK_LIB(xml, xmlParseDocument,
- [
- CFLAGS="$CFLAGS `xml-config --cflags`"
- CXXFLAGS="$CXXFLAGS `xml-config --cflags`"
- LIBS="$LIBS `xml-config --libs`"
- ],
- ,
- `xml-config --libs`
-)
+AC_CHECK_PROG(XML_CONFIG, xml2-config, xml2-config)
+AC_CHECK_PROG(XML_CONFIG, xml-config, xml-config, no)
+
+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
dnl Checks for header files.
-AC_OUTPUT(Makefile)
+AC_OUTPUT([
+ Makefile
+ minidom.spec
+])
+++ /dev/null
-Summary: A minimal implementation of the DOM based on libxml2
-Name: minidom
-Version: 0.1.0
-Release: 1
-Copyright: GPL
-Group: Development/Libraries
-Source: www.cs.unibo.it:/~lpadovan/mml-widget/minidom-0.1.0.tar.gz
-%description
-miniDOM is a minimal implementation of the Document Object
-Model.
-
-%prep
-%setup
-
-%build
-./configure
-make
-
-%install
-make install
-
-%files
-%doc AUTHORS BUGS COPYING ChangeLog HISTORY INSTALL LICENSE NEWS README TODO
-
-/usr/local/bin/minidom-config
-/usr/local/lib/libminidom.so
-/usr/local/lib/libminidom.so.0
-/usr/local/lib/libminidom.so.0.1.0
-/usr/local/lib/libminidom.a
-/usr/local/lib/libminidom.la
-/usr/local/include/minidom/
+++ /dev/null
-Summary: A minimal implementation of the DOM based on libxml2
-Name: minidom
-Version: 0.1.0
-Release: 1
-Copyright: GPL
-Group: Development/Libraries
-Source: www.cs.unibo.it:/~lpadovan/mml-widget/minidom-0.1.0.tar.gz
-%description
-miniDOM is a minimal implementation of the Document Object
-Model.
-
-%prep
-%setup
-
-%build
-./configure --without-libxml2
-make
-
-%install
-make install
-
-%files
-%doc AUTHORS BUGS COPYING ChangeLog HISTORY INSTALL LICENSE NEWS README TODO
-
-/usr/local/bin/minidom-config
-/usr/local/lib/minidom.so
-/usr/local/lib/minidom.so.0
-/usr/local/lib/minidom.so.0.1.0
-/usr/local/lib/libminidom.a
-/usr/local/lib/libminidom.la
-/usr/local/include/minidom/
--- /dev/null
+Summary: A minimal implementation of the DOM based on libxml2
+Name: minidom
+Version: @VERSION@
+Release: 1
+Copyright: GPL
+Group: Development/Libraries
+Source: www.cs.unibo.it:/~lpadovan/mml-widget/minidom-0.1.0.tar.gz
+%description
+miniDOM is a minimal implementation of the Document Object
+Model.
+
+%prep
+%setup
+
+%build
+./configure
+make
+
+%install
+make install
+
+%files
+%doc AUTHORS BUGS COPYING ChangeLog HISTORY INSTALL LICENSE NEWS README TODO
+
+/usr/local/bin/minidom-config
+/usr/local/lib/libminidom.so
+/usr/local/lib/libminidom.so.0
+/usr/local/lib/libminidom.so.0.1.0
+/usr/local/lib/libminidom.a
+/usr/local/lib/libminidom.la
+/usr/local/include/minidom/