diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2010-09-13 18:41:30 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2010-09-23 17:17:03 +0530 |
commit | 83d3c8f22bab997dde81074fd547aef6e56451d5 (patch) | |
tree | bf378a032142ff0cde7fc402fd0a4bdf1ff49bc8 /m4/orc.m4 | |
parent | 963250abb99ab43b209281c2aa5398205492e555 (diff) |
echo-cancel: orc-ify some bits for optimisation
This uses Orc to optimise an inner loop in the core NLMS function of the
Adrian echo canceller.
Diffstat (limited to 'm4/orc.m4')
-rw-r--r-- | m4/orc.m4 | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/m4/orc.m4 b/m4/orc.m4 new file mode 100644 index 000000000..92bf21e9b --- /dev/null +++ b/m4/orc.m4 @@ -0,0 +1,56 @@ +dnl pkg-config-based checks for Orc + +dnl specific: +dnl ORC_CHECK([REQUIRED_VERSION]) + +AC_DEFUN([ORC_CHECK], +[ + ORC_REQ=ifelse([$1], , "0.4.5", [$1]) + + AC_ARG_ENABLE(orc, + AC_HELP_STRING([--enable-orc],[use Orc if installed]), + [case "${enableval}" in + auto) enable_orc=auto ;; + yes) enable_orc=yes ;; + no) enable_orc=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-orc) ;; + esac + ], + [enable_orc=auto]) dnl Default value + + if test "x$enable_orc" != "xno" ; then + PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [ + AC_DEFINE(HAVE_ORC, 1, [Use Orc]) + ORCC=`$PKG_CONFIG --variable=orcc orc-0.4` + AC_SUBST(ORCC) + HAVE_ORC=yes + ], [ + if test "x$enable_orc" = "xyes" ; then + AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found]) + fi + AC_DEFINE(DISABLE_ORC, 1, [Disable Orc]) + HAVE_ORC=no + ]) + else + AC_DEFINE(DISABLE_ORC, 1, [Disable Orc]) + HAVE_ORC=no + fi + AM_CONDITIONAL(HAVE_ORC, test "x$HAVE_ORC" = "xyes") + +])) + +AC_DEFUN([ORC_OUTPUT], +[ + if test "$HAVE_ORC" = yes ; then + printf "configure: *** Orc acceleration enabled.\n" + else + if test "x$enable_orc" = "xno" ; then + printf "configure: *** Orc acceleration disabled by --disable-orc. Slower code paths\n" + printf " will be used.\n" + else + printf "configure: *** Orc acceleration disabled. Requires Orc >= $ORC_REQ, which was\n" + printf " not found. Slower code paths will be used.\n" + fi + fi + printf "\n" +]) |