Re: [xml] autoconf/automake and libxml2
- From: Jesper Mørk <geo fusserne dk>
- To: Malcolm Tredinnick <malcolm commsecure com au>
- Cc: xml gnome org
- Subject: Re: [xml] autoconf/automake and libxml2
- Date: Mon, 16 Feb 2004 12:03:48 +0100
Thanks, but I still get alot of parse errors. On closer inspection it
seems that it can't find the xmlversion.h file. From gcc:
/usr/include/libxml2/libxml/xmlmemory.h:16:31: libxml/xmlversion.h: No
such file or directory
Which is of course true since xmlversion.h resides in
/usr/include/libxml2/libxml/ and not
/usr/include/libxml2/libxml/libxml/
Any ideas...?
cheers
Jesper
On Sun, 2004-02-15 at 23:39, Malcolm Tredinnick wrote:
On Mon, 2004-02-16 at 03:00, Jesper Mørk wrote:
Hi List
Hi Jesper. :-)
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
Your use of pkg-config is different from normal. Plus you can use
pkg-config for libxml as well (it has had a .pc files for a couple of
years or so). Typical usage is this...
In configure.ac:
PKG_CHECK_MODULES(GVIDEO, gtk+-2.0 libxml-2.0)
AC_SUBST(GVIDEO_CFLAGS)
AC_SUBST(GVIDEO_LIBS)
then in Makefile.am
INCLUDE = @GVIDEO_CFLAGS@ ...
LDADD = @GVIDEO_LIBS@ ...
This should then work as you expect.
Cheers,
Malcolm
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]