Additional usage of the new api
[sxemacs] / m4 / sxe-mm.m4
index 67ebc89..0caa1aa 100644 (file)
@@ -332,8 +332,16 @@ AC_DEFUN([SXE_MM_CHECK_FFMPEG], [
        if test "$ac_cv_header_avformat_h" = "yes" -o \
                "$ac_cv_header_ffmpeg_avformat_h" = "yes" -o \
                "$ac_cv_header_libavformat_avformat_h" = "yes"; then
-               sxe_cv_feat_ffmpeg_headers="yes"
+               if test "$ac_cv_header_avcodec_h" = "yes" -o \
+                        "$ac_cv_header_ffmpeg_avcodec_h" = "yes" -o \
+                       "$ac_cv_header_libavcodec_avcodec_h" = "yes"; then
+                       if test "$ac_cv_header_ffmpeg_dict_h" = "yes" -o \
+                               "$ac_cv_header_libavutil_dict_h" = "yes"; then
+                               sxe_cv_feat_ffmpeg_headers="yes"
+                       fi
+               fi
        fi
+
        ## make sure either decode_audio is there
        if test "$ac_cv_lib_avcodec_avcodec_decode_audio4" = "yes"; then
                sxe_cv_feat_ffmpeg_decoders="yes"
@@ -345,13 +353,16 @@ AC_DEFUN([SXE_MM_CHECK_FFMPEG], [
        if test "$sxe_cv_feat_ffmpeg_headers" = "yes" -a \
                "$sxe_cv_feat_ffmpeg_decoders" = "yes" -a \
                "$sxe_cv_feat_ffmpeg_avformat_alloc" = "yes" -a \
+               "$ac_cv_lib_avformat_avio_alloc_context" = "yes" -a \
+               "$ac_cv_lib_avformat_avio_size" = "yes" -a \
+               "$ac_cv_lib_avformat_avformat_open_input" = "yes" -a \
                "$ac_cv_lib_avformat_avformat_close_input" = "yes" -a \
                "$ac_cv_lib_avformat_avformat_find_stream_info" = "yes" -a \
-               "$ac_cv_lib_avformat_avformat_open_input" = "yes" -a \
                "$ac_cv_lib_avformat_av_probe_input_format" = "yes" -a \
                "$ac_cv_lib_avformat_av_read_frame" = "yes" -a \
-               "$ac_cv_lib_avformat_av_register_all" = "yes" -a \
                "$ac_cv_lib_avformat_av_seek_frame" = "yes" -a \
+               "$ac_cv_lib_avformat_av_register_all" = "yes" -a \
+               "$ac_cv_lib_avformat_av_dump_format" = "yes" -a \
                "$ac_cv_lib_avcodec_avcodec_find_decoder" = "yes" -a \
                "$ac_cv_lib_avcodec_avcodec_open2" = "yes" -a \
                "$ac_cv_lib_avutil_av_dict_get" = "yes"; then
@@ -378,6 +389,8 @@ AC_DEFUN([SXE_CHECK_FFMPEG_HEADERS], [dnl
        ## backup current configuration
        SXE_DUMP_LIBS
        CPPFLAGS="${CPPFLAGS} ${FFMPEG_CPPFLAGS}"
+       AC_CHECK_HEADERS([avformat.h avcodec.h])
+       AC_CHECK_HEADERS([ffmpeg/avformat.h ffmpeg/avcodec.h ffmpeg/dict.h])
        AC_CHECK_HEADERS([libavformat/avformat.h libavcodec/avcodec.h libavutil/dict.h])
 
        ## restore configuration
@@ -404,7 +417,10 @@ AC_DEFUN([SXE_CHECK_FFMPEG_LIBS], [dnl
        AC_CHECK_LIB([avformat], [av_read_frame], [:], [:], [${FFMPEG_LIBS}])
        AC_CHECK_LIB([avformat], [av_seek_frame], [:], [:], [${FFMPEG_LIBS}])
        AC_CHECK_LIB([avformat], [av_register_all], [:], [:], [${FFMPEG_LIBS}])
+       AC_CHECK_LIB([avformat], [av_dump_format], [:], [:], [${FFMPEG_LIBS}])
        AC_CHECK_LIB([avformat], [avformat_alloc_context], [:], [:], [${FFMPEG_LIBS}])
+       AC_CHECK_LIB([avformat], [avio_alloc_context], [:], [:], [${FFMPEG_LIBS}])
+       AC_CHECK_LIB([avformat], [avio_size], [:], [:], [${FFMPEG_LIBS}])
 
        AC_CHECK_LIB([avutil], [av_dict_get], [:], [:], [${FFMPEG_LIBS}])