Commit 8db06c8c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

test different ways to include avformat.h and define

2008-11-11  Sven Neumann  <sven@gimp.org>

	* configure.ac: test different ways to include avformat.h and
	define HAVE_LIBAVFORMAT_AVFORMAT_H accordingly.

	* operations/external/ff-load.c
	* operations/workshop/external/ff-save.c: include the avformat.h
	header according to the results of the configure tests.


svn path=/trunk/; revision=2728
parent bdcb9836
2008-11-11 Sven Neumann <sven@gimp.org>
* configure.ac: test different ways to include avformat.h and
define HAVE_LIBAVFORMAT_AVFORMAT_H accordingly.
* operations/external/ff-load.c
* operations/workshop/external/ff-save.c: include the avformat.h
header according to the results of the configure tests.
2008-11-11 Øyvind Kolås <pippin@gimp.org>
* gegl/buffer/gegl-cache.c: (gegl_rectangle_expand): fix expansion for
......
......@@ -775,11 +775,18 @@ if test "x$with_libavformat" != xno; then
PKG_CHECK_MODULES(AVFORMAT, libavformat libavcodec,
have_libavformat="yes",
have_libavformat="no (libavformat not found)")
# verify the presence of the avformat.h header
if test "x$have_libavformat" = "xyes"; then
gegl_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$AVFORMAT_CFLAGS $CPPFLAGS"
AC_CHECK_HEADER([libavformat/avformat.h], ,
AC_CHECK_HEADER([libavformat/avformat.h],
AC_DEFINE(HAVE_LIBAVFORMAT_AVFORMAT_H, 1,
[define to 1 if avformat.h is found in libavformat]),
[have_libavformat="no (avformat.h not found where expected)"])
# on some systems the header needs to be included differently
if test "x$have_libavformat" != "xyes"; then
AC_CHECK_HEADER([avformat.h], [have_libavformat="yes"])
fi
CPPFLAGS=$gegl_save_CPPFLAGS
fi
else
......
......@@ -32,7 +32,12 @@ gegl_chant_int (frame, _("Frame"), 0, 1000000, 0, _("frame number"))
#include "gegl-chant.h"
#include <errno.h>
#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
#include <libavformat/avformat.h>
#else
#include <avformat.h>
#endif
typedef struct
{
......
......@@ -32,7 +32,12 @@ gegl_chant_double (fps, _("FPS"), 0.0, 100.0, 25, _("frames per second"))
#define GEGL_CHANT_C_FILE "ff-save.c"
#include "gegl-chant.h"
#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
#include <libavformat/avformat.h>
#else
#include <avformat.h>
#endif
typedef struct
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment