Enable DAHDI support by default; require --disable-dahdi otherwise
libosmo-abis was built with DAHDI support, if the related header files
were present at built time, and without if not. This kind of automagic
enabling/disabling of features is wrong. Let's require DAHDI support by
default, and force the user to take a conscious decision by using an
explicit --disable-dahdi if he doesn't want it.
At the same time, update debian/control to list dahdi-source as build
dependency.
Change-Id: Id9f7f063e7ca9e3ab4aa96fc93f243caf50fb66a
Closes: OS#4248
diff --git a/configure.ac b/configure.ac
index ba33ed9..5a83eb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,16 @@
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.0.0)
PKG_CHECK_MODULES(ORTP, ortp >= 0.22.0)
-AC_CHECK_HEADERS(dahdi/user.h,,AC_MSG_WARN(DAHDI input driver will not be built))
+AC_ARG_ENABLE([dahdi],
+ AC_HELP_STRING([--disable-dahdi],
+ [disable support for DAHID ISDN (E1/T1) cards [default=yes]]),
+ [enable_dahdi="$enableval"], [enable_dahdi="yes"])
+AM_CONDITIONAL(ENABLE_DAHDI, test "x$enable_dahdi" = "xyes")
+if test "x$enable_dahdi" = "xyes"; then
+ AC_CHECK_HEADERS([dahdi/user.h],[],[AC_MSG_ERROR([DAHDI input driver enabled but DAHDI not found])])
+else
+ AC_MSG_WARN([DAHDI input driver will not be built])
+fi
AC_ARG_ENABLE(sanitize,
[AS_HELP_STRING(