+#### speex (optional) ####
+
+AC_ARG_WITH([speex],
+ AS_HELP_STRING([--without-speex],[Omit speex (resampling, AEC)]))
+
+AS_IF([test "x$with_speex" != "xno"],
+ [PKG_CHECK_MODULES(LIBSPEEX, [ speexdsp >= 1.2 ], HAVE_SPEEX=1, HAVE_SPEEX=0)],
+ HAVE_SPEEX=0)
+
+AS_IF([test "x$with_speex" = "xyes" && test "x$HAVE_SPEEX" = "x0"],
+ [AC_MSG_ERROR([*** speex support not found])])
+
+AM_CONDITIONAL([HAVE_SPEEX], [test "x$HAVE_SPEEX" = "x1"])
+AS_IF([test "x$HAVE_SPEEX" = "x1"], AC_DEFINE([HAVE_SPEEX], 1, [Have speex]))
+
+AC_SUBST(LIBSPEEX_CFLAGS)
+AC_SUBST(LIBSPEEX_LIBS)
+
+#### dlog support ####
+AC_ARG_ENABLE(dlog, AC_HELP_STRING([--enable-dlog], [using dlog]),
+[
+ case "${enableval}" in
+ yes) USE_DLOG=yes ;;
+ no) USE_DLOG=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-dlog) ;;
+ esac
+ ],[USE_DLOG=no])
+
+if test "x$USE_DLOG" = "xyes"; then
+ PKG_CHECK_MODULES(DLOG, dlog)
+ AC_SUBST(DLOG_CFLAGS)
+ AC_SUBST(DLOG_LIBS)
+fi
+AM_CONDITIONAL(USE_DLOG, test "x$USE_DLOG" = "xyes")
+
+#### Xen support (optional) ####
+
+AC_ARG_ENABLE([xen],
+ AS_HELP_STRING([--disable-xen],[Disable optional Xen paravirtualized driver]))
+
+XEN_CFLAGS=
+XEN_LIBS=
+
+AS_IF([test "x$enable_xen" != "xno"],
+ [
+ HAVE_XEN=1
+ AC_CHECK_HEADER(xenctrl.h, [], [HAVE_XEN=0])
+ AC_CHECK_HEADER(xs.h, [], [HAVE_XEN=0])
+ AC_CHECK_LIB(xenctrl, xc_interface_open, [XEN_LIBS="$XEN_LIBS -lxenctrl"], [HAVE_XEN=0])
+ AC_CHECK_LIB(xenstore, xs_domain_open, [XEN_LIBS="$XEN_LIBS -lxenstore"], [HAVE_XEN=0])
+ ],
+ HAVE_XEN=0)
+
+AS_IF([test "x$enable_xen" = "xyes" && test "x$HAVE_XEN" = "x0"],
+ [AC_MSG_ERROR([*** Xen development headers or libraries not found])])
+
+AC_SUBST(XEN_CFLAGS)
+AC_SUBST(XEN_LIBS)
+AM_CONDITIONAL([HAVE_XEN], [test "x$HAVE_XEN" = x1])
+
+#### ORC (optional) ####
+