[Pkg-voip-commits] [dahdi-tools] 239/285: automake: migrate dahdi_pcap from Makefile.legacy
tzafrir at debian.org
tzafrir at debian.org
Thu Jul 7 19:19:04 UTC 2016
This is an automated email from the git hooks/post-receive script.
tzafrir pushed a commit to branch master
in repository dahdi-tools.
commit f21b592f68bd919c87e737ba8a44afb71b0a44c3
Author: Oron Peled <oron.peled at xorcom.com>
Date: Mon May 18 18:59:33 2015 +0000
automake: migrate dahdi_pcap from Makefile.legacy
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
---
Makefile.am | 5 +++++
Makefile.legacy | 5 -----
configure.ac | 8 ++++++++
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 07b7614..f3acd16 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,6 +68,11 @@ pkginclude_HEADERS = tonezone.h
libtonezone_la_CFLAGS = $(CFLAGS) -I$(srcdir) -DBUILDING_TONEZONE
libtonezone_la_LDFLAGS = -version-info "$(LTZ_CURRENT):$(LTZ_REVISION):$(LTZ_AGE)"
+if PBX_PCAP
+noinst_PROGRAMS += dahdi_pcap
+dahdi_pcap_LDADD = -lpcap
+endif
+
patlooptest_LDADD = libtonezone.la -lm
fxstest_LDADD = libtonezone.la -lm
fxotune_LDADD = -lm
diff --git a/Makefile.legacy b/Makefile.legacy
index 997f269..a097648 100644
--- a/Makefile.legacy
+++ b/Makefile.legacy
@@ -91,10 +91,6 @@ GENERATED_DOCS := $(GROFF_HTML) README.html README.Astribank.html
all:
-dahdi_pcap:
- $(CC) $(CFLAGS) dahdi_pcap.c -lpcap -o $@ $<
-
-
tonezones.txt: zonedata.c
perl -ne 'next unless (/\.(country|description) = *"([^"]*)/); \
print (($$1 eq "country")? "* $$2\t":"$$2\n");' $< \
@@ -203,7 +199,6 @@ clean:
rm -f *.o tzdriver
rm -f core
rm -rf $(GENERATED_DOCS) *.asciidoc tonezones.txt
- rm -f dahdi_pcap
.PHONY: clean all install devel data config install-programs install-libs dist
diff --git a/configure.ac b/configure.ac
index 359f493..ed62107 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,14 +121,22 @@ AC_SUBST(DAHDI_DECLARATION_AFTER_STATEMENT)
AST_EXT_LIB_SETUP([DAHDI], [DAHDI], [dahdi])
AST_EXT_LIB_SETUP([NEWT], [newt], [newt])
AST_EXT_LIB_SETUP([USB], [usb], [usb])
+AST_EXT_LIB_SETUP([PCAP], [pcap], [pcap])
AST_C_DEFINE_CHECK([DAHDI], [DAHDI_CODE], [dahdi/user.h])
DAHDI23_DIR="${DAHDI_DIR}"
AST_C_DEFINE_CHECK([DAHDI23], [DAHDI_CONFIG_NTTE], [dahdi/user.h])
AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
AST_EXT_LIB_CHECK([USB], [usb], [usb_init], [usb.h])
+AST_EXT_LIB_CHECK([PCAP], [pcap], [pcap_compile], [pcap.h])
+
+saved_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $DAHDI_INCLUDE"
+AC_CHECK_DECL([DAHDI_TXMIRROR], [DAHDI_TXMIRROR=1], [DAHDI_TXMIRROR=0], [#include <dahdi/user.h>])
+CPPFLAGS="$saved_CPPFLAGS"
AM_CONDITIONAL([PBX_NEWT], [test "$PBX_NEWT" = "1"])
+AM_CONDITIONAL([PBX_PCAP], [test "$PBX_PCAP" = "1" -a "$DAHDI_TXMIRROR" = "1"])
AC_CHECK_FUNCS([semtimedop])
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git
More information about the Pkg-voip-commits
mailing list