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/src/Makefile.am b/src/Makefile.am
index f4277ae..9c438c9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,7 +19,6 @@
ipa_proxy.c \
subchan_demux.c \
trau_frame.c \
- input/dahdi.c \
input/ipa.c \
input/ipa_keepalive.c \
input/ipaccess.c \
@@ -28,6 +27,9 @@
input/misdn.c \
input/rs232.c \
input/unixsocket.c
+if ENABLE_DAHDI
+libosmoabis_la_SOURCES += input/dahdi.c
+endif
libosmotrau_la_CFLAGS = $(AM_CFLAGS) $(ORTP_CFLAGS)
libosmotrau_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(TRAU_LIBVERSION)
diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index 6594eea..5da0a2d 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -26,8 +26,6 @@
#include "config.h"
-#ifdef HAVE_DAHDI_USER_H
-
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -756,5 +754,3 @@
/* register the driver with the core */
return e1inp_driver_register(&dahdi_driver);
}
-
-#endif /* HAVE_DAHDI_USER_H */