- ## newer ffmpegs want a bioctx** in url_fopen, check that
- AC_MSG_CHECKING([what url_fopen() needs])
- sxe_cv_tmp_ffmpeg_url_fopen="uncertain"
-
- SXE_DUMP_LIBS
- CPPFLAGS="$CPPFLAGS ${FFMPEG_CPPFLAGS}"
- SXE_LANG_WERROR([off])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#if defined HAVE_ERRNO_H
-# include <errno.h>
-#endif
-#if defined HAVE_LIBAVFORMAT_AVFORMAT_H
-# include <libavformat/avformat.h>
-#elif defined HAVE_FFMPEG_AVFORMAT_H
-# include <ffmpeg/avformat.h>
-#elif defined HAVE_AVFORMAT_H
-# include <avformat.h>
-#endif
-
-extern int foobar(void);
-int foobar(void)
-{
- ByteIOContext *bioctx = 0;
-
- url_fopen(&bioctx, "/foobar", URL_RDONLY);
- return 0;
-}
- ]])], [sxe_cv_tmp_ffmpeg_url_fopen="ByteIOContext**"], [:])
- SXE_RESTORE_LIBS
-
- SXE_DUMP_LIBS
- CPPFLAGS="$CPPFLAGS ${FFMPEG_CPPFLAGS}"
- SXE_LANG_WERROR([on])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#if defined HAVE_ERRNO_H
-# include <errno.h>
-#endif
-#if defined HAVE_LIBAVFORMAT_AVFORMAT_H
-# include <libavformat/avformat.h>
-#elif defined HAVE_FFMPEG_AVFORMAT_H
-# include <ffmpeg/avformat.h>
-#elif defined HAVE_AVFORMAT_H
-# include <avformat.h>
-#endif
-
-extern int foobar(void);
-int foobar(void)
-{
- ByteIOContext *bioctx = 0;
-
- url_fopen(bioctx, "/foobar", URL_RDONLY);
- return 0;
-}
- ]])], [sxe_cv_tmp_ffmpeg_url_fopen="ByteIOContext*"], [:])
- SXE_RESTORE_LIBS
-
- ## post the result
- AC_MSG_RESULT([$sxe_cv_tmp_ffmpeg_url_fopen])
-
- if test "$sxe_cv_tmp_ffmpeg_url_fopen" = "ByteIOContext**"; then
- AC_DEFINE([FFMPEG_URL_FOPEN_BIOCTX_STAR_STAR], [1],
- [Whether url_fopen want a ByteIOContext**])
- elif test "$sxe_cv_tmp_ffmpeg_url_fopen" = "ByteIOContext*"; then
- AC_DEFINE([FFMPEG_URL_FOPEN_BIOCTX_STAR], [1],
- [Whether url_fopen want a ByteIOContext*])
- else
- sxe_cv_feat_ffmpeg="no"
- fi
-