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