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.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'configure.ac') 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"]) -- cgit v1.2.3