This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/16023 ) Change subject: Enable DAHDI support by default; require --disable-dahdi otherwise ...................................................................... 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 --- M configure.ac M debian/control M src/Makefile.am M src/input/dahdi.c 4 files changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/23/16023/1 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( diff --git a/debian/control b/debian/control index 24a082e..b9e2078 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ autotools-dev, autoconf, automake, + dahdi-source, libtool, dh-autoreconf, libdpkg-perl, 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 */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/16023 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id9f7f063e7ca9e3ab4aa96fc93f243caf50fb66a Gerrit-Change-Number: 16023 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191111/f01e94a8/attachment.htm>