]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm: Fix for ftmod_wanpipe failing to compile because some structures are not
authorDavid Yat Sin <dyatsin@sangoma.com>
Mon, 8 Nov 2010 21:11:06 +0000 (16:11 -0500)
committerDavid Yat Sin <dyatsin@sangoma.com>
Mon, 8 Nov 2010 21:11:06 +0000 (16:11 -0500)
compatible with std=c99

libs/freetdm/Makefile.am
libs/freetdm/configure.ac

index 2177a96ed1e8f6bfbb2ae5ada34a7049669f532a..bc92e1db58340c541f425587853aa45bb9c6ec6e 100644 (file)
@@ -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
index 2b5ded8e7deac4bcb588d1114cdafe41ab6e6892..8b878edc09c57cc4413f481360df8850c795416c 100644 (file)
@@ -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])],