Revision: 2075
http://synfig.svn.sourceforge.net/synfig/?rev=2075&view=rev
Author: pabs3
Date: 2008-09-29 17:10:47 +0000 (Mon, 29 Sep 2008)
Log Message:
-----------
Cope with some changes in the locations of the libavformat and libswscale
headers.
Modified Paths:
--------------
synfig-core/trunk/configure.ac
synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.cpp
Modified: synfig-core/trunk/configure.ac
===================================================================
--- synfig-core/trunk/configure.ac 2008-09-25 22:31:48 UTC (rev 2074)
+++ synfig-core/trunk/configure.ac 2008-09-29 17:10:47 UTC (rev 2075)
@@ -247,6 +247,17 @@
if test $with_libavcodec = "yes" ; then {
+
+ # Need to check both the new and old locations for the avformat header
+ # Need to save flags, add avformat flags, check headers and restore
flags
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_save_CFLAGS="$CFLAGS"
+ CPPFLAGS="${CPPFLAGS} ${LIBAVCODEC_CFLAGS}"
+ CFLAGS="${CFLAGS} ${LIBAVCODEC_CFLAGS}"
+ AC_CHECK_HEADERS(libavformat/avformat.h avformat.h ffmpeg/avformat.h)
+ CPPFLAGS="${ac_save_CPPFLAGS}"
+ CFLAGS="${ac_save_CFLAGS}"
+
AC_ARG_WITH(libswscale,
[AS_HELP_STRING([--without-libswscale],
[disable support for libswscale (Default=auto)])],
@@ -260,6 +271,16 @@
if test $with_libswscale = "yes" ; then {
AC_DEFINE(WITH_LIBSWSCALE, [], [enable libswscale support])
+
+ # Need to check both the new and old locations for the swscale
header
+ # Need to save flags, add swscale flags, check headers and
restore flags
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_save_CFLAGS="$CFLAGS"
+ CPPFLAGS="${CPPFLAGS} ${LIBSWSCALE_CFLAGS}"
+ CFLAGS="${CFLAGS} ${LIBSWSCALE_CFLAGS}"
+ AC_CHECK_HEADERS(libswscale/swscale.h swscale.h
ffmpeg/swscale.h)
+ CPPFLAGS="${ac_save_CPPFLAGS}"
+ CFLAGS="${ac_save_CFLAGS}"
} else {
AC_CHECK_LIB(avcodec, img_convert,
[AC_MSG_RESULT([ *** Using deprecated function
img_convert.])],
Modified: synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.cpp
===================================================================
--- synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.cpp 2008-09-25
22:31:48 UTC (rev 2074)
+++ synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.cpp 2008-09-29
17:10:47 UTC (rev 2075)
@@ -35,10 +35,30 @@
extern "C"
{
-#include <avformat.h>
+
+/*
+ ffmpeg library headers have historically had multiple locations.
+ We should check all of the locations to be more portable.
+*/
+
+#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
+# include <libavformat/avformat.h>
+#elif defined(HAVE_AVFORMAT_H)
+# include <avformat.h>
+#elif defined(HAVE_FFMPEG_AVFORMAT_H)
+# include <ffmpeg/avformat.h>
+#endif
+
#ifdef WITH_LIBSWSCALE
+#ifdef HAVE_LIBSWSCALE_SWSCALE_H
+# include <libswscale/swscale.h>
+#elif defined(HAVE_SWSCALE_H)
# include <swscale.h>
+#elif defined(HAVE_FFMPEG_SWSCALE_H)
+# include <ffmpeg/swscale.h>
#endif
+#endif
+
}
#include <synfig/general.h>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl