diff options
Diffstat (limited to '')
-rwxr-xr-x | configure | 139 | ||||
-rw-r--r-- | configure.ac | 9 |
2 files changed, 135 insertions, 13 deletions
@@ -4525,7 +4525,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libpng_VERSION_INT -le 60000000; then - if test $libpng_VERSION_INT -ge 52013100; then + if test $libpng_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $libpng_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $libpng_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $libpng_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -4733,7 +4737,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libpng_VERSION_INT -le 60000000; then - if test $libpng_VERSION_INT -ge 52013100; then + if test $libpng_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $libpng_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $libpng_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $libpng_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -5135,7 +5143,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $lua_VERSION_INT -le 60000000; then - if test $lua_VERSION_INT -ge 52013100; then + if test $lua_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $lua_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $lua_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $lua_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -5344,7 +5356,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $lua_VERSION_INT -le 60000000; then - if test $lua_VERSION_INT -ge 52013100; then + if test $lua_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $lua_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $lua_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $lua_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -5552,7 +5568,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $lua_VERSION_INT -le 60000000; then - if test $lua_VERSION_INT -ge 52013100; then + if test $lua_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $lua_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $lua_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $lua_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -5670,6 +5690,72 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } # check if package is required + if test xcheck = xyes -o x"$with_libavcodec" = xyes ; then + # print error message and quit + err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "libavcodec"` + as_fn_error $? " + +$err_msg + +Alternatively, you may set --with-libavcodec=nocheck and the environment +variables libavcodec_[...] (see configure --help) +to appropriate values to avoid the need to call pkg-config. + +See the pkg-config man page for more details. +" "$LINENO" 5 + fi + fi + +# The following finds libavcodec.pc in its new location on Mac OS X. +# It only takes the last from the list, assuming that this is the latest +# version. +if [ x$libavcodec_HAVE = xno -a x$FPC_PLATFORM = xdarwin ]; then + PKG_CONFIG_PATH=`find $FPCDIR/lib/ffmpeg* -name libavcodec.pc | tail -n 1 | xargs dirname`:$PKG_CONFIG_PATH + + have_lib="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libavcodec" >&5 +$as_echo_n "checking for libavcodec... " >&6; } + if test x"$with_libavcodec" = xnocheck; then + # do not call pkg-config, use user settings + have_lib="yes" + elif test x"$with_libavcodec" != xno; then + # check if package exists + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + + have_lib="yes" + libavcodec_LIBS=`$PKG_CONFIG --libs --silence-errors "libavcodec"` + libavcodec_LIBDIRS=`$PKG_CONFIG --libs-only-L --silence-errors "libavcodec"` + libavcodec_LIBDIRS=` + echo "$libavcodec_LIBDIRS" | $SED 's/^[ \t]*//' | $SED 's/[ \t]*$//' +` + # add library directories to LIBS (ignore *_LIBS for now) + if test -n "$libavcodec_LIBDIRS"; then + LIBS="$LIBS $libavcodec_LIBDIRS" + fi + +fi + fi + if test x$have_lib = xyes; then + libavcodec_HAVE="yes" + if test -n "$libavcodec_LIBDIRS"; then + # show additional lib-dirs + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($libavcodec_LIBDIRS)" >&5 +$as_echo "yes ($libavcodec_LIBDIRS)" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + else + libavcodec_HAVE="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + # check if package is required if test xyes = xyes -o x"$with_libavcodec" = xyes ; then # print error message and quit err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "libavcodec"` @@ -5686,6 +5772,7 @@ See the pkg-config man page for more details. fi fi +fi if test x$libavcodec_HAVE = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of libavcodec" >&5 @@ -5770,7 +5857,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libavcodec_VERSION_INT -le 60000000; then - if test $libavcodec_VERSION_INT -ge 52013100; then + if test $libavcodec_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $libavcodec_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $libavcodec_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $libavcodec_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -6097,7 +6188,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libavformat_VERSION_INT -le 60000000; then - if test $libavformat_VERSION_INT -ge 52013100; then + if test $libavformat_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $libavformat_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $libavformat_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $libavformat_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -6303,7 +6398,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libavutil_VERSION_INT -le 60000000; then - if test $libavutil_VERSION_INT -ge 52013100; then + if test $libavutil_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $libavutil_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $libavutil_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $libavutil_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -6524,7 +6623,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libswscale_VERSION_INT -le 60000000; then - if test $libswscale_VERSION_INT -ge 52013100; then + if test $libswscale_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $libswscale_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $libswscale_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $libswscale_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -6741,7 +6844,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libprojectM_VERSION_INT -le 60000000; then - if test $libprojectM_VERSION_INT -ge 52013100; then + if test $libprojectM_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $libprojectM_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $libprojectM_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $libprojectM_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -7033,7 +7140,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $portaudio_VERSION_INT -le 60000000; then - if test $portaudio_VERSION_INT -ge 52013100; then + if test $portaudio_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $portaudio_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $portaudio_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $portaudio_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" @@ -7250,7 +7361,11 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libpcre_VERSION_INT -le 60000000; then - if test $libpcre_VERSION_INT -ge 52013100; then + if test $libpcre_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $libpcre_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $libpcre_VERSION_INT -ge 52013100; then FFMPEG_VERSION="1.1" elif test $libpcre_VERSION_INT -ge 51073101; then FFMPEG_VERSION="1.0" diff --git a/configure.ac b/configure.ac index 9f6b39f8..d36ed657 100644 --- a/configure.ac +++ b/configure.ac @@ -202,7 +202,14 @@ AC_SUBST(lua_lib_name) # A check for version >=52.0.0 will return version 0d.51.1.2 # although it is lower because pkg-config is confused by the 0d. # Use [mylib]_VERSION_INT for version-checking instead -PKG_HAVE([libavcodec], [libavcodec], yes) +PKG_HAVE([libavcodec], [libavcodec], check) +# The following finds libavcodec.pc in its new location on Mac OS X. +# It only takes the last from the list, assuming that this is the latest +# version. +if [[ x$libavcodec_HAVE = xno -a x$FPC_PLATFORM = xdarwin ]]; then + PKG_CONFIG_PATH=`find $FPCDIR/lib/ffmpeg* -name libavcodec.pc | tail -n 1 | xargs dirname`:$PKG_CONFIG_PATH + PKG_HAVE([libavcodec], [libavcodec], yes) +fi PKG_VERSION([libavcodec], [libavcodec]) AC_CHECK_LIB([avcodec], [avcodec_decode_audio], [HAVE_AVCODEC_DECODE_AUDIO="yes"]) AC_CHECK_LIB([avcodec], [avcodec_decode_audio2], [HAVE_AVCODEC_DECODE_AUDIO2="yes"]) |