Commit ab907e10 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Configure: Autodetect faad plugin

parent e0728183
...@@ -2541,24 +2541,19 @@ dnl ...@@ -2541,24 +2541,19 @@ dnl
dnl faad decoder plugin dnl faad decoder plugin
dnl dnl
AC_ARG_ENABLE(faad, AC_ARG_ENABLE(faad,
[ --enable-faad faad codec (default disabled)]) [ --enable-faad faad codec (default auto)])
if test "${enable_faad}" = "yes" if test "${enable_faad}" != "no"; then
then AC_ARG_WITH(faad-tree, [ --with-faad-tree=PATH faad tree for static linking])
AC_ARG_WITH(faad-tree, if test -n "${with_faad_tree}"; then
[ --with-faad-tree=PATH faad tree for static linking])
if test -n "${with_faad_tree}"
then
AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree}) AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`" real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
if test -z "${real_faad_tree}" if test -z "${real_faad_tree}"; then
then
dnl The given directory can't be found dnl The given directory can't be found
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_faad_tree}]) AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
fi fi
if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a" if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"; then
then dnl Use the custom faad
dnl Use a custom faad
AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a) AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
VLC_ADD_PLUGIN([faad]) VLC_ADD_PLUGIN([faad])
VLC_ADD_LIBS([faad],[${real_faad_tree}/libfaad/.libs/libfaad.a]) VLC_ADD_LIBS([faad],[${real_faad_tree}/libfaad/.libs/libfaad.a])
...@@ -2572,15 +2567,19 @@ then ...@@ -2572,15 +2567,19 @@ then
VLC_SAVE_FLAGS VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_faad}" CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_faad}"
LDFLAGS="${LDFLAGS} ${LIBS_faad}" LDFLAGS="${LDFLAGS} ${LIBS_faad}"
AC_CHECK_HEADERS(faad.h, , AC_CHECK_HEADERS(faad.h,
[ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ]) [ AC_CHECK_LIB(faad, faacDecOpen, [
AC_CHECK_LIB(faad, faacDecOpen, [ VLC_ADD_PLUGIN([faad])
VLC_ADD_PLUGIN([faad]) VLC_ADD_LIBS([faad],[-lfaad]) ], [
VLC_ADD_LIBS([faad],[-lfaad]) ], AC_CHECK_LIB(faad, NeAACDecOpen, [
AC_CHECK_LIB(faad, NeAACDecOpen, [ VLC_ADD_PLUGIN([faad])
VLC_ADD_PLUGIN([faad]) VLC_ADD_LIBS([faad],[-lfaad]) ], [
VLC_ADD_LIBS([faad],[-lfaad]) ], AS_IF([test "${enable_faad}" = "yes"],
[ AC_MSG_ERROR([Cannot find libfaad library...]) ])) [ AC_MSG_ERROR([Cannot find libfaad library...]) ],
[ AC_MSG_WARN([Cannot find libfaad library...]) ]) ]) ])
] , [ AS_IF([test "${enable_faad}" = "yes"],
[ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ],
[ AC_MSG_WARN([Cannot find development headers for libfaad...]) ]) ])
VLC_RESTORE_FLAGS VLC_RESTORE_FLAGS
fi fi
fi fi
......
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