diff --git a/configure.in b/configure.in index 7e0172c97..40e554282 100644 --- a/configure.in +++ b/configure.in @@ -182,6 +182,10 @@ AC_CHECK_MEMBERS([struct sigcontext.eip],,,[#include ]) AC_CHECK_TYPES(ucontext_t,,,[#include ]) AC_CHECK_HEADERS(mysql/mysql.h,,AC_MSG_ERROR(zm requires mysql/mysql.h),) +AC_CHECK_HEADERS(ffmpeg/avformat.h,,,) +AC_CHECK_HEADERS(libavformat/avformat.h,,,) +AC_CHECK_HEADERS(ffmpeg/swscale.h,,,) +AC_CHECK_HEADERS(libswscale/swscale.h,,,) AC_CHECK_HEADERS(pcre/pcre.h,,,) AC_CHECK_HEADERS(pcre.h,,,) AC_CHECK_DECLS(round,,,[#include ]) diff --git a/src/zm_mpeg.h b/src/zm_mpeg.h index 4b37d1a35..3d50fa38c 100644 --- a/src/zm_mpeg.h +++ b/src/zm_mpeg.h @@ -26,9 +26,21 @@ extern "C" { #define __STDC_CONSTANT_MACROS +#if HAVE_LIBAVFORMAT_AVFORMAT_H +#include +#elif HAVE_FFMPEG_AVFORMAT_H #include +#else +#error "Unable to locate avformat.h" +#endif #if HAVE_LIBSWSCALE +#if HAVE_LIBSWSCALE_SWSCALE_H +#include +#elif HAVE_FFMPEG_SWSCALE_H #include +#else +#error "Unable to locate swscale.h" +#endif #endif // HAVE_LIBSWSCALE }