aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-07-30 01:34:40 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-07-30 01:34:40 +0000
commite171c972ba120a0eaccf513170b5a19edb33dd5d (patch)
treec61f2d2f5fbdc26dc1f38af5766ef869f5cacd44 /configure.ac
parent5824d3decadaf7977bdf28b8d12eb4d604113243 (diff)
downloadusdx-e171c972ba120a0eaccf513170b5a19edb33dd5d.tar.gz
usdx-e171c972ba120a0eaccf513170b5a19edb33dd5d.tar.xz
usdx-e171c972ba120a0eaccf513170b5a19edb33dd5d.zip
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
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
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"])