Commit a833d9d8 authored by Gildas Bazin's avatar Gildas Bazin

* added a --with-a52-tree option to the configure script.
parent d630f58f
...@@ -70,6 +70,7 @@ vlc_CFLAGS = @vlc_CFLAGS@ ...@@ -70,6 +70,7 @@ vlc_CFLAGS = @vlc_CFLAGS@
plugins_CFLAGS := @plugins_CFLAGS@ plugins_CFLAGS := @plugins_CFLAGS@
builtins_CFLAGS := @builtins_CFLAGS@ builtins_CFLAGS := @builtins_CFLAGS@
a52_CFLAGS = @a52_CFLAGS@
arts_CFLAGS = @arts_CFLAGS@ arts_CFLAGS = @arts_CFLAGS@
dvd_CFLAGS = @dvd_CFLAGS@ dvd_CFLAGS = @dvd_CFLAGS@
dvdread_CFLAGS = @dvdread_CFLAGS@ dvdread_CFLAGS = @dvdread_CFLAGS@
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -851,12 +851,54 @@ dnl a52 AC3 decoder plugin ...@@ -851,12 +851,54 @@ dnl a52 AC3 decoder plugin
dnl dnl
AC_ARG_ENABLE(a52, AC_ARG_ENABLE(a52,
[ --enable-a52 AC3 support with liba52 (default enabled)]) [ --enable-a52 AC3 support with liba52 (default enabled)])
if test "x$enable_a52" != "xno" -a x$SYS != xmingw32 if test "x$enable_a52" != "xno"
then
AC_ARG_WITH(a52-tree,
[ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
if test "x$with_a52_tree" != "xno" -a "x$with_a52_tree" != "x"
then then
AC_CHECK_HEADERS(a52dec/a52.h, [ real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
BUILTINS="${BUILTINS} a52" if test "x$real_a52_tree" = x
a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm" then
],[]) dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
fi
dnl Use a custom a52dec
AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
if test -f ${real_a52_tree}/include/a52.h
then
AC_MSG_RESULT(yes)
a52_CFLAGS="${a52_CFLAGS} -I${real_a52_tree}"
a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
save_LDFLAGS=$LDFLAGS
LDFLAGS="$a52_LDFLAGS $LDFLAGS"
AC_CHECK_LIB(a52, a52_free, [
BUILTINS="${BUILTINS} a52"
a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE"
],[
if test -f ${real_a52_tree}/liba52/.libs/liba52.a
then
AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
else
AC_MSG_ERROR([the specified tree hasn't been compiled])
fi
],[-lm])
LDFLAGS=$save_LDFLAGS
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([the specified tree doesn't have a52.h])
fi
else dnl no with args
AC_CHECK_HEADER(a52dec/a52.h, [
AC_CHECK_LIB(a52, a52_free, [
BUILTINS="${BUILTINS} a52"
a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
a52_CFLAGS="${a52_CFLAGS}"
],[],[-lm])
])
fi
fi fi
dnl dnl
...@@ -1536,6 +1578,7 @@ AC_SUBST(vlc_CFLAGS) ...@@ -1536,6 +1578,7 @@ AC_SUBST(vlc_CFLAGS)
AC_SUBST(plugins_CFLAGS) AC_SUBST(plugins_CFLAGS)
AC_SUBST(builtins_CFLAGS) AC_SUBST(builtins_CFLAGS)
AC_SUBST(a52_CFLAGS)
AC_SUBST(arts_CFLAGS) AC_SUBST(arts_CFLAGS)
AC_SUBST(dvd_CFLAGS) AC_SUBST(dvd_CFLAGS)
AC_SUBST(dvdread_CFLAGS) AC_SUBST(dvdread_CFLAGS)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* (http://liba52.sf.net/). * (http://liba52.sf.net/).
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: a52.c,v 1.8 2002/04/25 21:52:42 sam Exp $ * $Id: a52.c,v 1.9 2002/05/01 19:59:42 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -37,7 +37,12 @@ ...@@ -37,7 +37,12 @@
#include "stream_control.h" #include "stream_control.h"
#include "input_ext-dec.h" #include "input_ext-dec.h"
#include <a52dec/a52.h> /* liba52 header file */ #ifdef USE_A52DEC_TREE /* liba52 header file */
#include "include/a52.h"
#else
#include "a52dec/a52.h"
#endif
#include "a52.h" #include "a52.h"
#define AC3DEC_FRAME_SIZE 1536 #define AC3DEC_FRAME_SIZE 1536
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment