Fixe dproblem with detection of FFMPEG header locations

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2597 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2008-07-24 11:30:18 +00:00
parent 0f0a8c004f
commit 8d503408f8
2 changed files with 20 additions and 0 deletions

View File

@ -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,,,)

View File

@ -26,10 +26,28 @@
extern "C" {
#define __STDC_CONSTANT_MACROS
#if HAVE_LIBAVCODEC_AVCODEC_H
#include <libavcodec/avcodec.h>
#elif HAVE_FFMPEG_AVCODEC_H
#include <ffmpeg/avcodec.h>
#else
#error "No location for avcodec.h found"
#endif
#if HAVE_LIBAVFORMAT_AVFORMAT_H
#include <libavformat/avformat.h>
#elif HAVE_FFMPEG_AVFORMAT_H
#include <ffmpeg/avformat.h>
#else
#error "No location for avformat.h found"
#endif
#if HAVE_LIBSWSCALE
#if HAVE_LIBSWSCALE_SWSCALE_H
#include <libswscale/swscale.h>
#elif HAVE_FFMPEG_SWSCALE_H
#include <ffmpeg/swscale.h>
#else
#error "No location for swscale.h found"
#endif
#endif // HAVE_LIBSWSCALE
}