diff options
author | teuf <teuf@f01d2545-417e-4e96-918e-98f8d0dbbcb6> | 2008-05-25 11:27:27 +0000 |
---|---|---|
committer | teuf <teuf@f01d2545-417e-4e96-918e-98f8d0dbbcb6> | 2008-05-25 11:27:27 +0000 |
commit | f87f1088d0eae00af511b0eb0e847138a971562c (patch) | |
tree | 6c752611a92bdaedea944deefe8ab7479b4feb2f /src | |
parent | 0a1e067fb5f0a751a5620ced510c91411670ee75 (diff) | |
download | libgpod-tmz-f87f1088d0eae00af511b0eb0e847138a971562c.tar.gz libgpod-tmz-f87f1088d0eae00af511b0eb0e847138a971562c.tar.xz libgpod-tmz-f87f1088d0eae00af511b0eb0e847138a971562c.zip |
* 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
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/itdb_plist.c | 21 | ||||
-rw-r--r-- | src/itdb_sysinfo_extended_parser.c | 3 |
3 files changed, 26 insertions, 2 deletions
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 @@ * - <array> => G_TYPE_HASH_TABLE (GHashTable *) * - <dict> => G_TYPE_HASH_TABLE (GHashTable *) */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_LIBXML + #include <stdio.h> #include <string.h> #include <libxml/parser.h> @@ -324,3 +330,18 @@ itdb_plist_parse_from_memory (const char *data, gsize len) return parsed_doc; } +#else +#include <glib-object.h> +#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 <dict> * because I was too lazy to parse them ;) */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <glib-object.h> #include "itdb_sysinfo_extended_parser.h" #include "itdb_plist.h" |