From e171c972ba120a0eaccf513170b5a19edb33dd5d Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Tue, 30 Jul 2013 01:34:40 +0000 Subject: fix configure for libav* >= 1.0 on Mac OS X git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3008 b956fd51-792f-4845-bead-9b4dfca2ff2c --- configure | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 127 insertions(+), 12 deletions(-) (limited to 'configure') diff --git a/configure b/configure index b7cc1f9e..42f88e4d 100755 --- a/configure +++ b/configure @@ -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" @@ -5652,6 +5672,72 @@ $as_echo_n "checking for libavcodec... " >&6; } 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 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 @@ -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" -- cgit v1.2.3