shithub: sox

Download patch

ref: f8667d2d023388c96d0f2d4ac93ef8d15dca1d17
parent: 2a87f8e5483385264b3d761e3c3b0971cf5064e1
author: evilynux <evilynux>
date: Sun Feb 13 23:33:19 EST 2011

Improved ffmpeg m4 check.

--- a/m4/ffmpeg.m4
+++ b/m4/ffmpeg.m4
@@ -47,14 +47,12 @@
   CFLAGS="$CFLAGS $FFMPEG_CFLAGS"
   CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
   LIBS="$LIBS $FFMPEG_LIBS"
-
+  have_ffmpeg="no"
   AC_CHECK_HEADERS([libavformat/avformat.h ffmpeg/avformat.h],
-    [AC_CHECK_LIB(avformat, av_open_input_file, have_ffmpeg=yes, have_ffmpeg=no
-                  break)])
-  AC_CHECK_HEADERS([libavcodec/avcodec.h ffmpeg/avcodec.h],
-    [AC_CHECK_LIB(avcodec, avcodec_decode_audio3, have_ffmpeg=yes, have_ffmpeg=no
-                  break)])
-
+    [AC_CHECK_LIB(avformat, av_open_input_file,
+      [AC_CHECK_HEADERS([libavcodec/avcodec.h ffmpeg/avcodec.h],
+        [AC_CHECK_LIB(avcodec, avcodec_decode_audio3, have_ffmpeg=yes)])])
+    break])
   CFLAGS="$ac_save_CFLAGS"
   CPPFAGS="$ac_save_CPPFLAGS"
   LIBS="$ac_save_LIBS"