diff --git a/libs/freetdm/Makefile.am b/libs/freetdm/Makefile.am index 2177a96ed1..bc92e1db58 100644 --- a/libs/freetdm/Makefile.am +++ b/libs/freetdm/Makefile.am @@ -49,6 +49,7 @@ if HAVE_SNG_ISDN INCS += -I/usr/include/sng_isdn endif +FTDM_COMPAT_CFLAGS = $(INCS) -DFTDM_CONFIG_DIR=\"@confdir@\" -DFTDM_MOD_DIR=\"$(moddir)\" @COMP_VENDOR_COMPAT_CFLAGS@ @DEFS@ FTDM_CFLAGS = $(INCS) -DFTDM_CONFIG_DIR=\"@confdir@\" -DFTDM_MOD_DIR=\"$(moddir)\" @COMP_VENDOR_CFLAGS@ @DEFS@ COMPILE = $(CC) $(FTDM_CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(COMPILE) @@ -186,7 +187,9 @@ ftmod_analog_em_la_LIBADD = libfreetdm.la if HAVE_LIBSANGOMA mod_LTLIBRARIES += ftmod_wanpipe.la ftmod_wanpipe_la_SOURCES = $(SRC)/ftmod/ftmod_wanpipe/ftmod_wanpipe.c -ftmod_wanpipe_la_CFLAGS = $(AM_CFLAGS) $(FTDM_CFLAGS) -D__LINUX__ -I/usr/include/wanpipe +#some structures within Wanpipe drivers are not c99 compatible, so we need to compile ftmod_wanpipe +#without c99 flags +ftmod_wanpipe_la_CFLAGS = $(AM_CFLAGS) $(FTDM_COMPAT_CFLAGS) -D__LINUX__ -I/usr/include/wanpipe ftmod_wanpipe_la_LDFLAGS = -shared -module -avoid-version -lsangoma ftmod_wanpipe_la_LIBADD = libfreetdm.la endif diff --git a/libs/freetdm/configure.ac b/libs/freetdm/configure.ac index 2b5ded8e7d..8b878edc09 100644 --- a/libs/freetdm/configure.ac +++ b/libs/freetdm/configure.ac @@ -77,11 +77,14 @@ sun) fi ;; *) - COMP_VENDOR_CFLAGS="-std=c99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes" + COMP_VENDOR_COMPAT_CFLAGS="-Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes" + COMP_VENDOR_CFLAGS="-std=c99 $COMP_VENDOR_COMPAT_CFLAGS" ;; esac +AC_SUBST([COMP_VENDOR_COMPAT_CFLAGS]) AC_SUBST([COMP_VENDOR_CFLAGS]) + # Enable debugging AC_ARG_ENABLE([debug], [AC_HELP_STRING([--enable-debug], [build with debug information])],