From 8d503408f8e7f47296c7e814c4f97d5537938a47 Mon Sep 17 00:00:00 2001 From: stan Date: Thu, 24 Jul 2008 11:30:18 +0000 Subject: [PATCH] Fixe dproblem with detection of FFMPEG header locations git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2597 e3e1d417-86f3-4887-817a-d78f3d33393f --- configure.ac | 2 ++ src/zm_ffmpeg.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/configure.ac b/configure.ac index 23959ebdb..9fafe08f0 100644 --- a/configure.ac +++ b/configure.ac @@ -218,6 +218,8 @@ AC_CHECK_HEADERS([fcntl.h limits.h memory.h netdb.h netinet/in.h stddef.h stdlib AC_CHECK_HEADERS(linux/videodev.h,,AC_MSG_ERROR(zm requires Video4Linux to be installed),) AC_CHECK_HEADERS(linux/videodev2.h,,AC_MSG_WARN(zm requires Video4Linux2 to be installed for V4L2 support),) AC_CHECK_HEADERS(mysql/mysql.h,,AC_MSG_ERROR(zm requires MySQL headers - check that MySQL development packages are installed),) +AC_CHECK_HEADERS(ffmpeg/avcodec.h,,,) +AC_CHECK_HEADERS(libavcodec/avcodec.h,,,) AC_CHECK_HEADERS(ffmpeg/avformat.h,,,) AC_CHECK_HEADERS(libavformat/avformat.h,,,) AC_CHECK_HEADERS(ffmpeg/swscale.h,,,) diff --git a/src/zm_ffmpeg.h b/src/zm_ffmpeg.h index cad85066d..a9031b892 100644 --- a/src/zm_ffmpeg.h +++ b/src/zm_ffmpeg.h @@ -26,10 +26,28 @@ extern "C" { #define __STDC_CONSTANT_MACROS +#if HAVE_LIBAVCODEC_AVCODEC_H +#include +#elif HAVE_FFMPEG_AVCODEC_H #include +#else +#error "No location for avcodec.h found" +#endif +#if HAVE_LIBAVFORMAT_AVFORMAT_H +#include +#elif HAVE_FFMPEG_AVFORMAT_H #include +#else +#error "No location for avformat.h found" +#endif #if HAVE_LIBSWSCALE +#if HAVE_LIBSWSCALE_SWSCALE_H +#include +#elif HAVE_FFMPEG_SWSCALE_H #include +#else +#error "No location for swscale.h found" +#endif #endif // HAVE_LIBSWSCALE }