evolution r35206 - in trunk: . plugins/tnef-attachments



Author: msuman
Date: Mon Mar 17 04:24:32 2008
New Revision: 35206
URL: http://svn.gnome.org/viewvc/evolution?rev=35206&view=rev

Log:
Patch from Paul Bolle  <pebolle tiscali nl>: Fix for bug #519421 (Also allow <libytnef/ytnef.h> header while compiling the TNEF attachment decoder plugin)

Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/plugins/tnef-attachments/ChangeLog
   trunk/plugins/tnef-attachments/Makefile.am
   trunk/plugins/tnef-attachments/tnef-plugin.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Mon Mar 17 04:24:32 2008
@@ -1388,10 +1388,22 @@
 if test "$tnef_ok" = "yes"; then
 	AC_MSG_RESULT([yes])
 	TNEF_ATTACHMENTS="tnef-attachments"
+	TNEF_CFLAGS="-DHAVE_YTNEF_H"
 else
-	AC_MSG_RESULT(no)
-	TNEF_ATTACHMENTS=""
+	AC_TRY_COMPILE([#include <stdio.h> 
+			#include <libytnef/ytnef.h>],
+		[TNEFStruct *tnef;], tnef_ok=yes, tnef_ok=no)
+	if test "$tnef_ok" = "yes"; then
+		AC_MSG_RESULT([yes])
+		TNEF_ATTACHMENTS="tnef-attachments"
+		TNEF_CFLAGS="-DHAVE_LIBYTNEF_YTNEF_H"
+	else
+		AC_MSG_RESULT(no)
+		TNEF_ATTACHMENTS=""
+		TNEF_CFLAGS=""
+	fi
 fi
+AC_SUBST(TNEF_CFLAGS)
 
 echo "TNEF is "$TNEF_ATTACHMENTS
 

Modified: trunk/plugins/tnef-attachments/Makefile.am
==============================================================================
--- trunk/plugins/tnef-attachments/Makefile.am	(original)
+++ trunk/plugins/tnef-attachments/Makefile.am	Mon Mar 17 04:24:32 2008
@@ -2,7 +2,8 @@
 	-I$(top_srcdir)					\
 	-DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\""	\
 	-DLOCALEDIR="\"$(LOCALEDIR)\""			\
-	$(EVOLUTION_MAIL_CFLAGS)
+	$(EVOLUTION_MAIL_CFLAGS)			\
+	$(TNEF_CFLAGS)
 
 @EVO_PLUGIN_RULE@
 

Modified: trunk/plugins/tnef-attachments/tnef-plugin.c
==============================================================================
--- trunk/plugins/tnef-attachments/tnef-plugin.c	(original)
+++ trunk/plugins/tnef-attachments/tnef-plugin.c	Mon Mar 17 04:24:32 2008
@@ -17,7 +17,11 @@
 #include <fcntl.h>
 #include <ctype.h>
 #include <stdlib.h>
+#ifdef HAVE_YTNEF_H
 #include <ytnef.h>
+#elif defined HAVE_LIBYTNEF_YTNEF_H
+#include <libytnef/ytnef.h>
+#endif 
 
 #include <camel/camel-mime-part.h>
 #include <camel/camel-folder.h>



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