automake: migrate dahdi_pcap from Makefile.legacy

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
Oron Peled 2015-05-18 18:59:33 +00:00 committed by Tzafrir Cohen
parent d63812bd73
commit f21b592f68
3 changed files with 13 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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])