aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure53
1 files changed, 52 insertions, 1 deletions
diff --git a/configure b/configure
index f590fe6c68..0fbc5a1b19 100755
--- a/configure
+++ b/configure
@@ -149,6 +149,7 @@ _sndio=auto
_timidity=auto
_zlib=auto
_mpeg2=auto
+_a52=auto
_sparkle=auto
_osxdockplugin=auto
_jpeg=auto
@@ -1046,7 +1047,10 @@ Optional Libraries:
--with-mpeg2-prefix=DIR prefix where libmpeg2 is installed (optional)
--enable-mpeg2 enable mpeg2 codec for cutscenes [autodetect]
- --with-jpeg-prefix=DIR prefix where libjpeg is installed (optional)
+ --with-a52-prefix=DIR Prefix where liba52 is installed (optional)
+ --enable-a52 enable a52 codec for MPEG decoder [autodetect]
+
+ --with-jpeg-prefix=DIR Prefix where libjpeg is installed (optional)
--disable-jpeg disable JPEG decoder [autodetect]
--with-png-prefix=DIR prefix where libpng is installed (optional)
@@ -1176,6 +1180,8 @@ for ac_option in $@; do
--disable-nasm) _nasm=no ;;
--enable-mpeg2) _mpeg2=yes ;;
--disable-mpeg2) _mpeg2=no ;;
+ --enable-a52) _a52=yes ;;
+ --disable-a52) _a52=no ;;
--disable-jpeg) _jpeg=no ;;
--enable-jpeg) _jpeg=yes ;;
--disable-png) _png=no ;;
@@ -1233,6 +1239,11 @@ for ac_option in $@; do
MPEG2_CFLAGS="-I$arg/include"
MPEG2_LIBS="-L$arg/lib"
;;
+ --with-a52-prefix=*)
+ arg=`echo $ac_option | cut -d '=' -f 2`
+ A52_CFLAGS="-I$arg/include"
+ A52_LIBS="-L$arg/lib"
+ ;;
--with-alsa-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
ALSA_CFLAGS="-I$arg/include"
@@ -4428,6 +4439,46 @@ define_in_config_if_yes "$_mpeg2" 'USE_MPEG2'
echo "$_mpeg2"
#
+# Check for liba52
+#
+echocheck "liba52"
+if test "$_a52" = auto ; then
+ _a52=no
+ cat > $TMPC << EOF
+typedef signed $type_1_byte int8_t;
+typedef signed $type_2_byte int16_t;
+typedef signed $type_4_byte int32_t;
+
+typedef unsigned $type_1_byte uint8_t;
+typedef unsigned $type_2_byte uint16_t;
+typedef unsigned $type_4_byte uint32_t;
+
+extern "C" {
+#include <a52dec/a52.h>
+}
+
+int main(void) {
+ a52_init(0);
+ return 0;
+}
+EOF
+
+ if test -n "$_host"; then
+ # don't execute while cross compiling
+ cc_check $A52_CFLAGS $A52_LIBS -la52 && _a52=yes
+ else
+ cc_check_no_clean $A52_CFLAGS $A52_LIBS -la52 && $TMPO$HOSTEXEEXT && _a52=yes
+ cc_check_clean
+ fi
+fi
+if test "$_a52" = yes ; then
+ INCLUDES="$INCLUDES $A52_FLAGS"
+ LIBS="$LIBS $A52_LIBS -la52"
+fi
+define_in_config_if_yes "$_a52" 'USE_A52'
+echo "$_a52"
+
+#
# Check for Sparkle if updates support is enabled
#
case $_host_os in