-AS_IF([test "x${with_dts_tree}" != "x"], [
- AC_MSG_ERROR([--with-dts-tree is obsolete. Please use libdca and --with-dca-tree.])
-])
-
-AC_ARG_ENABLE(dca,
- AS_HELP_STRING([--enable-dca],[DTS Coherent Acoustics support with libdca
- (default enabled)]))
-AS_IF([test "${enable_dca}" != "no"], [
- AC_ARG_WITH(dca-tree,
- [ --with-dca-tree=PATH libdca tree for static linking],,
- [with_dca_tree="no"])
- AS_IF([test "${with_dca_tree}" != "no"], [
- real_dca_tree="`cd ${with_dca_tree} 2>/dev/null && pwd`"
- AS_IF([test -z "${real_dca_tree}"], [
- dnl The given directory can't be found
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([${with_dca_tree} directory doesn't exist])
- ])
- dnl Use a custom libdca
- AC_MSG_CHECKING(for libdca in ${real_dca_tree})
- AS_IF([test -f "${real_dca_tree}/libdca/.libs/libdca.a"], [
- AC_MSG_RESULT(yes)
- VLC_ADD_LIBS([dtstofloat32],[${real_dca_tree}/libdca/.libs/libdca.a])
- AS_IF([test -f "${real_dca_tree}/include/dca.h"], [
- VLC_ADD_CPPFLAGS([dtstofloat32],[-I${real_dca_tree}/include])
- ], [
- VLC_ADD_CPPFLAGS([dtstofloat32],[-I${real_dca_tree}/../include])
- ])
- ], [
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([the specified tree doesn't have libdca/.libs/libdca.a])
- ])
- ], [
- PKG_CHECK_MODULES([DCA], [libdca >= 0.0.5], [
- VLC_ADD_PLUGIN([dtstofloat32])
- VLC_ADD_CPPFLAGS([dtstofloat32], [${DCA_CFLAGS}])
- VLC_ADD_LIBS([dtstofloat32], [${DCA_LIBS}])
- ], [
- AS_IF([test "x${enable_dca}" != "x"], [
- AC_MSG_ERROR([${DCA_PKG_ERRORS}])
- ])
- ])
- ])
-])