Index: totem-plparser.pc.in
===================================================================
--- totem-plparser.pc.in	(revisión: 245)
+++ totem-plparser.pc.in	(copia de trabajo)
@@ -9,6 +9,7 @@
 Description: Totem Playlist Parser library
 Version: @VERSION@
 Requires: gtk+-2.0
-Requires.private: libxml-2.0 camel-1.2
+Requires.private: libxml-2.0 @LIBCAMEL@
 Libs: -L${libdir} -ltotem-plparser
 Cflags: -I${includedir}/totem-pl-parser/1/plparser
+uselibcamel=@USELIBCAMEL@
Index: configure.in
===================================================================
--- configure.in	(revisión: 245)
+++ configure.in	(copia de trabajo)
@@ -36,6 +36,7 @@
 
 # Requirements
 GLIB_REQS=2.16.3
+GIO_REQS=2.17.3
 DBUS_REQS=0.61
 
 # Before making a release, the PLPARSER_LT_VERSION string should be modified.
@@ -56,8 +57,51 @@
 AC_SUBST(TOTEM_PL_PARSER_VERSION_MICRO)
 
 dnl Check for packages for building libtotem-plparser.la
-PKG_CHECK_MODULES(TOTEM_PLPARSER, [glib-2.0 >= $GLIB_REQS gtk+-2.0 libxml-2.0 camel-1.2 gio-2.0 >= 2.17.5])
+PKG_CHECK_MODULES(TOTEM_PLPARSER, [glib-2.0 >= $GLIB_REQS gtk+-2.0 libxml-2.0 gthread-2.0 gio-2.0 >= $GIO_REQS])
+AC_SUBST(TOTEM_PLPARSER_CFLAGS)
+AC_SUBST(TOTEM_PLPARSER_LIBS)
 
+##################################
+# Checking libcamel dependency
+##################################
+camel_message=""
+
+AC_ARG_ENABLE(camel,
+	      AS_HELP_STRING([--enable-camel=@<:@no/yes/auto@:>@],
+			     [Use libcamel to parse dates (if available).]), ,
+	      [enable_camel=auto])
+
+if test "x$enable_camel" != "xno" ; then
+   PKG_CHECK_MODULES(LIBCAMEL,  
+		     camel-1.2,
+                     [have_camel=yes], 
+                     [have_camel=no])
+
+   if test "x$have_camel" = "xyes" ; then
+      AC_SUBST(LIBCAMEL_CFLAGS)
+      AC_SUBST(LIBCAMEL_LIBS)
+      AC_SUBST(LIBCAMEL, camel-1.2)
+      AC_SUBST(USELIBCAMEL, yes)
+      AC_DEFINE(HAVE_CAMEL, 1, [Camel available in the system])
+   else
+      AC_SUBST(USELIBCAMEL, no)
+      camel_message="
+ *********************************************
+ Compiling totem-pl-parser without libcamel.
+ This can affect seriously the podcast handling.
+ *********************************************"
+   fi
+else
+   have_camel=no
+fi
+
+if test "x$enable_camel" = "xyes"; then
+   if test "x$have_camel" != "xyes"; then
+      AC_MSG_ERROR([Camel is not available in the system.])
+   fi
+fi
+
+
 PKG_CHECK_MODULES([TOTEM_PLPARSER_MINI], [gio-2.0])
 
 GNOME_COMMON_INIT
@@ -83,7 +127,7 @@
 
 GTK_DOC_CHECK(1.0)
 
-AC_OUTPUT([
+AC_CONFIG_FILES([
 Makefile
 totem-plparser.pc
 totem-plparser-uninstalled.pc
@@ -99,3 +143,9 @@
 docs/reference/version.xml
 ])
 
+
+AC_OUTPUT
+
+echo "
+$camel_message
+"
Index: plparse/totem-pl-parser.h
===================================================================
--- plparse/totem-pl-parser.h	(revisión: 245)
+++ plparse/totem-pl-parser.h	(copia de trabajo)
@@ -325,7 +325,9 @@
 GType    totem_pl_parser_get_type (void);
 
 gint64  totem_pl_parser_parse_duration (const char *duration, gboolean debug);
+#ifdef HAVE_CAMEL
 guint64 totem_pl_parser_parse_date     (const char *date_str, gboolean debug);
+#endif
 
 gboolean totem_pl_parser_write (TotemPlParser *parser, GtkTreeModel *model,
 				TotemPlParserIterFunc func,
Index: plparse/test-parser.c
===================================================================
--- plparse/test-parser.c	(revisión: 245)
+++ plparse/test-parser.c	(copia de trabajo)
@@ -130,6 +130,7 @@
 #define DATE_BUFSIZE 512
 #define PRINT_DATE_FORMAT "%Y-%m-%dT%H:%M:%SZ"
 
+#ifdef HAVE_CAMEL
 static void
 test_date_real (const char *date_str, guint64 expected)
 {
@@ -167,6 +168,7 @@
 	test_date_real ("2003-12-13T18:30:02Z", 1071340202);
 	test_date_real ("1990-12-31T15:59:60-08:00", 662688000);
 }
+#endif
 
 #define MAX_DESCRIPTION_LEN 128
 
@@ -188,6 +190,7 @@
 	    	g_print ("\t%s = '%s' (truncated)\n", key, tmp);
 	    	return;
 	}
+#ifdef HAVE_CAMEL
 	if (g_ascii_strcasecmp (key, TOTEM_PL_PARSER_FIELD_PUB_DATE) == 0) {
 		struct tm *tm;
 		guint64 res;
@@ -204,6 +207,10 @@
 		}
 		return;
 	}
+#else
+        g_print ("Unable to test date parsing. Libcamel is not available");
+#endif
+
 	g_print ("\t%s = '%s'\n", key, value);
 }
 
@@ -401,7 +408,7 @@
 
 	setlocale (LC_ALL, "");
 
-	g_thread_init (NULL);
+        g_thread_init (NULL);
 	g_type_init ();
 
 	context = g_option_context_new (NULL);
@@ -450,7 +457,11 @@
 
 	if (files == NULL) {
 		test_duration ();
+#ifdef HAVE_CAMEL
 		test_date ();
+#else
+                g_print ("Disabled date parsing tests: Libcamel is not available");
+#endif /* HAVE_CAMEL */
 		test_relative ();
 		test_parsing ();
 	} else {
Index: plparse/Makefile.am
===================================================================
--- plparse/Makefile.am	(revisión: 245)
+++ plparse/Makefile.am	(copia de trabajo)
@@ -12,6 +12,7 @@
 
 test_parser_CFLAGS = \
 	$(TOTEM_PLPARSER_CFLAGS)\
+	$(LIBCAMEL_CFLAGS)	\
 	$(HAL_CFLAGS)		\
 	$(DBUS_CFLAGS)		\
 	$(WARN_CFLAGS)		\
@@ -19,6 +20,7 @@
 
 test_parser_LDADD = \
 	$(TOTEM_PLPARSER_LIBS) \
+	$(LIBCAMEL_CFLAGS)	\
 	libtotem-plparser.la
 
 disc_test_SOURCES = \
@@ -31,6 +33,7 @@
 disc_test_CFLAGS = \
 	$(WARN_CFLAGS)		\
 	$(TOTEM_PLPARSER_CFLAGS)\
+	$(LIBCAMEL_CFLAGS)	\
 	$(AM_CFLAGS)
 
 disc_test_LDFLAGS = \
@@ -38,6 +41,7 @@
 
 disc_test_LDADD = \
 	libtotem-plparser.la	\
+	$(LIBCAMEL_LIBS)	\
 	$(TOTEM_PLPARSER_LIBS)
 
 lib_LTLIBRARIES = libtotem-plparser.la libtotem-plparser-mini.la
@@ -103,6 +107,7 @@
 
 libtotem_plparser_la_CFLAGS = \
 	$(TOTEM_PLPARSER_CFLAGS)	\
+	$(LIBCAMEL_CFLAGS)		\
 	$(HAL_CFLAGS)			\
 	$(DBUS_CFLAGS)			\
 	$(WARN_CFLAGS)			\
@@ -114,6 +119,7 @@
 
 libtotem_plparser_la_LIBADD = \
 	$(TOTEM_PLPARSER_LIBS)			\
+	$(LIBCAMEL_LIBS)			\
 	$(top_builddir)/lib/libtotem_glibc.la	\
 	$(HAL_LIBS)
 
Index: plparse/totem-pl-parser.c
===================================================================
--- plparse/totem-pl-parser.c	(revisión: 245)
+++ plparse/totem-pl-parser.c	(copia de trabajo)
@@ -104,7 +104,10 @@
 #ifndef TOTEM_PL_PARSER_MINI
 #include <gobject/gvaluecollector.h>
 #include <gtk/gtk.h>
+
+#ifdef HAVE_CAMEL
 #include <camel/camel-mime-utils.h>
+#endif
 
 #include "totem-pl-parser.h"
 #include "totemplparser-marshal.h"
@@ -1756,6 +1759,8 @@
 	return -1;
 }
 
+#ifdef HAVE_CAMEL
+
 /**
  * totem_pl_parser_parse_date:
  * @date_str: the date string to parse
@@ -1780,11 +1785,10 @@
 		return val.tv_sec;
 	}
 	D(g_message ("Failed to parse duration '%s' using the ISO8601 parser", date_str));
-
 	/* Fall back to RFC 2822 date parsing */
 	return camel_header_decode_date (date_str, NULL);
 }
-
+#endif /* HAVE_CAMEL */
 #endif /* !TOTEM_PL_PARSER_MINI */
 
 static char *
