Index: sox-14.0.1/configure.ac =================================================================== --- sox-14.0.1.orig/configure.ac +++ sox-14.0.1/configure.ac @@ -271,11 +271,16 @@ AC_ARG_WITH(ffmpeg, using_ffmpeg=no if test "$with_ffmpeg" != "no"; then using_ffmpeg=yes + AC_CHECK_HEADERS([ffmpeg/avformat.h libavformat/avformat.h]) AC_CHECK_HEADER(ffmpeg/avformat.h, [AC_CHECK_LIB(avformat, av_open_input_file, FFMPEG_LIBS="$FFMPEG_LIBS -lavformat", using_ffmpeg=no) AC_CHECK_LIB(avutil, av_rescale_q, FFMPEG_LIBS="$FFMPEG_LIBS -lavutil", using_ffmpeg=no) AC_CHECK_LIB(avcodec, avcodec_decode_audio2, FFMPEG_LIBS="$FFMPEG_LIBS -lavcodec", using_ffmpeg=no)], - using_ffmpeg=no) + [AC_CHECK_HEADER(libavformat/avformat.h, + [AC_CHECK_LIB(avformat, av_open_input_file, FFMPEG_LIBS="$FFMPEG_LIBS -lavformat", using_ffmpeg=no) + AC_CHECK_LIB(avutil, av_rescale_q, FFMPEG_LIBS="$FFMPEG_LIBS -lavutil", using_ffmpeg=no) + AC_CHECK_LIB(avcodec, avcodec_decode_audio2, FFMPEG_LIBS="$FFMPEG_LIBS -lavcodec", using_ffmpeg=no)], + using_ffmpeg=no)]) if test "$with_ffmpeg" = "yes" -a "$using_ffmpeg" = "no"; then AC_MSG_FAILURE([cannot find ffmpeg]) fi Index: sox-14.0.1/src/ffmpeg.c =================================================================== --- sox-14.0.1.orig/src/ffmpeg.c +++ sox-14.0.1/src/ffmpeg.c @@ -47,7 +47,11 @@ #include #include #include +#if HAVE_LIBAVFORMAT_AVFORMAT_H +#include +#else #include +#endif /* Private data for ffmpeg files */ typedef struct ffmpeg