From 4b64c098ece0191cbedc7155660308c49914cbea Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 10 Nov 2009 23:28:49 +0000 Subject: [PATCH] only build boost module if you have sctp git-svn-id: http://svn.openzap.org/svn/openzap/trunk@852 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/freetdm/Makefile.am | 14 ++++++++++++-- libs/freetdm/configure.ac | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/libs/freetdm/Makefile.am b/libs/freetdm/Makefile.am index 0a942a2bfe..b74afc3a6d 100644 --- a/libs/freetdm/Makefile.am +++ b/libs/freetdm/Makefile.am @@ -36,7 +36,10 @@ moddir = @modinstdir@ libdir = $(PREFIX)/lib/ library_includedir = $(PREFIX)/include -INCS = -I$(OZ_SRCDIR)/$(SRC)/include -I$(OZ_SRCDIR)/$(SRC)/isdn/include -I$(OZ_SRCDIR)/$(SRC)/ozmod/ozmod_sangoma_boost +INCS = -I$(OZ_SRCDIR)/$(SRC)/include -I$(OZ_SRCDIR)/$(SRC)/isdn/include +if HAVE_SCTP +INCS += -I$(OZ_SRCDIR)/$(SRC)/ozmod/ozmod_sangoma_boost +endif MY_CFLAGS = $(INCS) $(ZAP_CFLAGS) -DZAP_CONFIG_DIR=\"@confdir@\" -DZAP_MOD_DIR=\"$(moddir)\" @COMP_VENDOR_CFLAGS@ @DEFS@ COMPILE = $(CC) $(MY_CFLAGS) $(INCS) LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(COMPILE) @@ -101,7 +104,10 @@ core-install: install-libLTLIBRARIES # # tools & test programs # -noinst_PROGRAMS = testtones detect_tones detect_dtmf testisdn testpri testr2 testboost testanalog testapp testcid +noinst_PROGRAMS = testtones detect_tones detect_dtmf testisdn testpri testr2 testanalog testapp testcid +if HAVE_SCTP +noinst_PROGRAMS += testboost +endif testapp_SOURCES = $(SRC)/testapp.c testapp_LDADD = libopenzap.la @@ -135,9 +141,11 @@ testr2_SOURCES = $(SRC)/testr2.c testr2_LDADD = libopenzap.la testr2_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS) +if HAVE_SCTP testboost_SOURCES = $(SRC)/testboost.c testboost_LDADD = libopenzap.la testboost_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS) +endif testanalog_SOURCES = $(SRC)/testanalog.c testanalog_LDADD = libopenzap.la @@ -214,10 +222,12 @@ ozmod_analog_em_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS) ozmod_analog_em_la_LDFLAGS = -module -avoid-version ozmod_analog_em_la_LIBADD = $(MYLIB) +if HAVE_SCTP ozmod_sangoma_boost_la_SOURCES = $(SRC)/ozmod/ozmod_sangoma_boost/sangoma_boost_client.c $(SRC)/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c ozmod_sangoma_boost_la_CFLAGS = $(AM_CFLAGS) $(MY_CFLAGS) ozmod_sangoma_boost_la_LDFLAGS = -module -avoid-version ozmod_sangoma_boost_la_LIBADD = $(MYLIB) +endif if LIBPRI ozmod_libpri_la_SOURCES = $(SRC)/ozmod/ozmod_libpri/ozmod_libpri.c $(SRC)/ozmod/ozmod_libpri/lpwrap_pri.c diff --git a/libs/freetdm/configure.ac b/libs/freetdm/configure.ac index 64f7a46438..f1bba93f1e 100644 --- a/libs/freetdm/configure.ac +++ b/libs/freetdm/configure.ac @@ -116,6 +116,8 @@ AC_CHECK_LIB([m], [cos]) AX_LIB_PCAP AC_CHECK_HEADERS([netinet/sctp.h netdb.h sys/select.h]) +AM_CONDITIONAL([HAVE_SCTP],[test "${ac_cv_header_netinet_sctp_h}" = "yes"]) + AC_CHECK_FUNC([gethostbyname_r], [], [AC_CHECK_LIB([nsl], [gethostbyname_r])] )