[xml] autoconf/automake and libxml2



Hi List

I'm trying to compile a small library using libxml2. I'm trying to use
autoconf and automake to create my makefiles The thing is that when ever
i run make I get a lot of parse errors in the libxml2 library (parser.h
especially). The problem is probably that I don't link to the library
correctly. Here's my configure.ac:


AC_INIT(src/gvideodb/gvideodb.c)
AM_INIT_AUTOMAKE(gvideodb, 'cat ./VERSION')
AM_CONFIG_HEADER(config.h)

PACKAGE=gvideodb

# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL

# Checks for libraries.
AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR([
*** GLib 2.0 is required to build GVideoDB; Available at
http://www.gtk.org/.]))
AM_PATH_XML2(2.5.0,,AC_MSG_ERROR([
*** Libxml is required to build GVideoDB; Available at
http://www.libxml.org/.]))
AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR([
*** GTK+ 2.0 is required to build GVideoDB; Available at
http://www.gtk.org/.]))

#Langauge Settings
ALL_LINGUAS=""
AM_GLIB_GNU_GETTEXT

GETTEXT_PACKAGE=$PACKAGE
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [gettext
domain])

AM_CFLAGS=(`pkg-config gtk+-2.0 --cflags` `xml2-config --cflags`)

AC_OUTPUT(
Makefile
src/Makefile
src/gvideodb/Makefile
src/libgvdb/Makefile
po/Makefile.in
)dnl

And my Makefile.am:

AC_INIT(src/gvideodb/gvideodb.c)
AM_INIT_AUTOMAKE(gvideodb, 'cat ./VERSION')
AM_CONFIG_HEADER(config.h)

PACKAGE=gvideodb

# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL

# Checks for libraries.
AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR([
*** GLib 2.0 is required to build GVideoDB; Available at
http://www.gtk.org/.]))
AM_PATH_XML2(2.5.0,,AC_MSG_ERROR([
*** Libxml is required to build GVideoDB; Available at
http://www.libxml.org/.]))
AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR([
*** GTK+ 2.0 is required to build GVideoDB; Available at
http://www.gtk.org/.]))

#Langauge Settings
ALL_LINGUAS=""
AM_GLIB_GNU_GETTEXT

GETTEXT_PACKAGE=$PACKAGE
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [gettext
domain])

AM_CFLAGS=(`pkg-config gtk+-2.0 --cflags` `xml2-config --cflags`)

AC_OUTPUT(
Makefile
src/Makefile
src/gvideodb/Makefile
src/libgvdb/Makefile
po/Makefile.in
)dnl

Does anyone have an ideas? I have not been able to find any useable/ease
to read documentation on autoconf/automake. Any links?

greets
Jesper




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]