Commit c2275db2 authored by Gildas Bazin's avatar Gildas Bazin

* configure.ac.in: old faad2 detection.
parent 42b38342
...@@ -1620,15 +1620,6 @@ AC_ARG_ENABLE(faad, ...@@ -1620,15 +1620,6 @@ AC_ARG_ENABLE(faad,
[ --enable-faad faad codec (default disabled)]) [ --enable-faad faad codec (default disabled)])
if test "x${enable_faad}" = "xyes" if test "x${enable_faad}" = "xyes"
then then
AC_ARG_WITH(faad,
[ --with-faad=PATH path to faad installation],[],[])
if test "x${with_faad}" != "xno" -a "x${with_faad}" != "x"
then
CPPFLAGS_faad="${CPPFLAGS_faad} -I${with_faad}/include"
LDFLAGS_faad="${LDFLAGS_faad} -L${with_faad}/lib"
fi
LDFLAGS_faad="${LDFLAGS_faad}"
AC_ARG_WITH(faad-tree, AC_ARG_WITH(faad-tree,
[ --with-faad-tree=PATH faad tree for static linking]) [ --with-faad-tree=PATH faad tree for static linking])
if test "x${with_faad_tree}" != "x" if test "x${with_faad_tree}" != "x"
...@@ -1648,6 +1639,14 @@ then ...@@ -1648,6 +1639,14 @@ then
BUILTINS="${BUILTINS} faad" BUILTINS="${BUILTINS} faad"
LDFLAGS_faad="${LDFLAGS_faad} -L${real_faad_tree}/libfaad/.libs -lfaad" LDFLAGS_faad="${LDFLAGS_faad} -L${real_faad_tree}/libfaad/.libs -lfaad"
CPPFLAGS_faad="${CPPFLAGS_faad} -I${real_faad_tree}/include" CPPFLAGS_faad="${CPPFLAGS_faad} -I${real_faad_tree}/include"
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
AC_TRY_COMPILE([#include <faad.h>],
[faacDecHandle a; faacDecFrameInfo *b; unsigned char *c;
unsigned long d; faacDecDecode(a,b,c,d);],
[], [AC_DEFINE(HAVE_OLD_FAAD2, 1, Define if FAAD2 < 1.2)])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
else else
dnl The given libfaad wasn't built dnl The given libfaad wasn't built
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
...@@ -1660,7 +1659,11 @@ then ...@@ -1660,7 +1659,11 @@ then
[ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ]) [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
AC_CHECK_LIB(faad, faacDecOpen, [ AC_CHECK_LIB(faad, faacDecOpen, [
PLUGINS="${PLUGINS} faad" PLUGINS="${PLUGINS} faad"
LDFLAGS_faad="${LDFLAGS_faad} -lfaad" ], LDFLAGS_faad="${LDFLAGS_faad} -lfaad"
AC_TRY_COMPILE([#include <faad.h>],
[faacDecHandle a; faacDecFrameInfo *b; unsigned char *c;
unsigned long d; faacDecDecode(a,b,c,d);],
[], [AC_DEFINE(HAVE_OLD_FAAD2, 1, Define if FAAD2 < 1.2)]) ],
[ AC_MSG_ERROR([Cannot find libfaad library...]) ]) [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
LDFLAGS="${LDFLAGS_save}" LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}"
......
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