From f87f1088d0eae00af511b0eb0e847138a971562c Mon Sep 17 00:00:00 2001 From: teuf Date: Sun, 25 May 2008 11:27:27 +0000 Subject: * configure.ac: rework libxml detection * src/Makefile.am: remove LIBXML_CFLAGS/LIBXML_LIBS since they are no longer used * src/itdb_plist.c: add stub functions when libxml isn't available * src/itdb_sysinfo_extended_parser.c: include config.h git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1982 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- src/Makefile.am | 4 ++-- src/itdb_plist.c | 21 +++++++++++++++++++++ src/itdb_sysinfo_extended_parser.c | 3 +++ 3 files changed, 26 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index f5b65a0..89851f9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,8 +40,8 @@ noinst_HEADERS = \ pixmaps.h \ sha1.h -INCLUDES=$(LIBGPOD_CFLAGS) $(LIBXML_CFLAGS) -LIBS=$(LIBGPOD_LIBS) $(LIBXML_LIBS) +INCLUDES=$(LIBGPOD_CFLAGS) +LIBS=$(LIBGPOD_LIBS) uninstall-hook: -rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libgpodincludedir) diff --git a/src/itdb_plist.c b/src/itdb_plist.c index bb6d89d..b5ee5b8 100644 --- a/src/itdb_plist.c +++ b/src/itdb_plist.c @@ -45,6 +45,12 @@ * - => G_TYPE_HASH_TABLE (GHashTable *) * - => G_TYPE_HASH_TABLE (GHashTable *) */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_LIBXML + #include #include #include @@ -324,3 +330,18 @@ itdb_plist_parse_from_memory (const char *data, gsize len) return parsed_doc; } +#else +#include +#include "itdb_plist.h" + +GValue *itdb_plist_parse_from_file (G_GNUC_UNUSED const char *filename) +{ + return NULL; +} + +GValue *itdb_plist_parse_from_memory (G_GNUC_UNUSED const char *data, + G_GNUC_UNUSED gsize len) +{ + return NULL; +} +#endif diff --git a/src/itdb_sysinfo_extended_parser.c b/src/itdb_sysinfo_extended_parser.c index 84af19d..ce4c0c9 100644 --- a/src/itdb_sysinfo_extended_parser.c +++ b/src/itdb_sysinfo_extended_parser.c @@ -49,6 +49,9 @@ * normal to get a few unhandled fields, I left out on purpose a few * because I was too lazy to parse them ;) */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include "itdb_sysinfo_extended_parser.h" #include "itdb_plist.h" -- cgit