set default CFLAGS globally, including -Wno-format
authorMartin Willi <martin@strongswan.org>
Mon, 27 Apr 2009 11:34:07 +0000 (11:34 -0000)
committerMartin Willi <martin@strongswan.org>
Mon, 27 Apr 2009 11:34:07 +0000 (11:34 -0000)
13 files changed:
configure.in
scripts/Makefile.am
src/charon/Makefile.am
src/charon/plugins/nm/Makefile.am
src/charon/plugins/sql/Makefile.am
src/charon/plugins/stroke/Makefile.am
src/charon/plugins/updown/Makefile.am
src/dumm/Makefile.am
src/libstrongswan/Makefile.am
src/libstrongswan/plugins/x509/Makefile.am
src/openac/Makefile.am
src/pluto/Makefile.am
src/scepclient/Makefile.am

index 8763e0f..7bd96bf 100644 (file)
@@ -18,7 +18,6 @@ dnl ===========================
 
 AC_INIT(strongSwan,4.3.1)
 AM_INIT_AUTOMAKE(tar-ustar)
-AC_C_BIGENDIAN
 AC_SUBST(confdir, '${sysconfdir}')
 PKG_PROG_PKG_CONFIG
 
@@ -706,6 +705,16 @@ AC_ARG_ENABLE(
 )
 
 dnl =========================
+dnl  set up compiler and flags
+dnl =========================
+
+if test -z "$CFLAGS"; then
+       AC_SUBST(CFLAGS, "-g -O2 -Wall -Wno-format -Wno-pointer-sign -Wno-strict-aliasing")
+fi
+AC_PROG_CC
+AC_C_BIGENDIAN
+
+dnl =========================
 dnl  check required programs
 dnl =========================
 
@@ -713,7 +722,6 @@ AC_PROG_INSTALL
 AC_PROG_LIBTOOL
 AC_PROG_LEX
 AC_PROG_YACC
-AC_PROG_CC()
 AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
 AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
 
index 77e76d7..ca6c47e 100644 (file)
@@ -1,7 +1,6 @@
 INCLUDES = -I$(top_srcdir)/src/libstrongswan
 AM_CFLAGS = \
--DIPSEC_PLUGINDIR=\"${plugindir}\" \
--Wformat=0
+-DIPSEC_PLUGINDIR=\"${plugindir}\"
 
 noinst_PROGRAMS = bin2array bin2sql id2sql key2keyid keyid2sql thread_analysis
 bin2array_SOURCES = bin2array.c
index 9644028..7c5e139 100644 (file)
@@ -105,8 +105,7 @@ AM_CFLAGS = -rdynamic \
   -DIPSEC_DIR=\"${ipsecdir}\" \
   -DIPSEC_PIDDIR=\"${piddir}\" \
   -DIPSEC_PLUGINDIR=\"${plugindir}\" \
-  -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \
-  -Wformat=0
+  -DSTRONGSWAN_CONF=\"${strongswan_conf}\"
 charon_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la -lpthread -lm -ldl
 
 EXTRA_DIST = config/proposal_keywords.txt
index 30c1c00..9a0b48c 100644 (file)
@@ -1,7 +1,7 @@
 
 INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/charon ${nm_CFLAGS}
 
-AM_CFLAGS = -rdynamic -Wformat=0
+AM_CFLAGS = -rdynamic
 
 plugin_LTLIBRARIES = libstrongswan-nm.la
 libstrongswan_nm_la_SOURCES = \
index 1e96944..ea39ce0 100644 (file)
@@ -4,8 +4,7 @@ INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/charon
 AM_CFLAGS = -rdynamic \
   -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \
   -DIPSEC_PLUGINDIR=\"${plugindir}\" \
-  -DPLUGINS=\""${libstrongswan_plugins}\"" \
-  -Wformat=0
+  -DPLUGINS=\""${libstrongswan_plugins}\""
 
 plugin_LTLIBRARIES = libstrongswan-sql.la
 libstrongswan_sql_la_SOURCES = sql_plugin.h sql_plugin.c \
index a8ab074..fb58ba6 100644 (file)
@@ -2,7 +2,7 @@
 INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/charon -I$(top_srcdir)/src/stroke
 
 AM_CFLAGS = \
--rdynamic -Wformat=0 \
+-rdynamic \
 -DIPSEC_CONFDIR=\"${confdir}\" \
 -DIPSEC_PIDDIR=\"${piddir}\"
 
index 21bb733..de60d9f 100644 (file)
@@ -1,7 +1,7 @@
 
 INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/charon
 
-AM_CFLAGS = -rdynamic -Wformat=0
+AM_CFLAGS = -rdynamic
 
 plugin_LTLIBRARIES = libstrongswan-updown.la
 libstrongswan_updown_la_SOURCES = \
index 7307676..029290f 100644 (file)
@@ -16,6 +16,4 @@ irdumm_LDADD = libdumm.la -lruby1.8
 
 INCLUDES = -I$(top_srcdir)/src/libstrongswan ${gtk_CFLAGS} \
   -I/usr/lib/ruby/1.8/i486-linux/
-AM_CFLAGS = \
--D_FILE_OFFSET_BITS=64 \
--Wformat=0
+AM_CFLAGS = -D_FILE_OFFSET_BITS=64
index 9494f44..acce570 100644 (file)
@@ -59,8 +59,7 @@ libstrongswan_la_LIBADD = -lpthread -ldl
 INCLUDES = -I$(top_srcdir)/src/libstrongswan
 AM_CFLAGS = \
 -DIPSEC_DIR=\"${ipsecdir}\" \
--DIPSEC_PLUGINDIR=\"${plugindir}\" \
--Wformat=0
+-DIPSEC_PLUGINDIR=\"${plugindir}\"
 
 if USE_LEAK_DETECTIVE
   AM_CFLAGS += -DLEAK_DETECTIVE
index a4f3990..3f9f85c 100644 (file)
@@ -1,7 +1,7 @@
 
 INCLUDES = -I$(top_srcdir)/src/libstrongswan
 
-AM_CFLAGS = -rdynamic -Wformat=0
+AM_CFLAGS = -rdynamic
 
 plugin_LTLIBRARIES = libstrongswan-x509.la
 
index cc9b72e..0054867 100644 (file)
@@ -7,7 +7,6 @@ AM_CFLAGS = \
   -DIPSEC_CONFDIR=\"${confdir}\" \
   -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \
   -DIPSEC_PLUGINDIR=\"${plugindir}\" \
-  -DPLUGINS=\""${libstrongswan_plugins}\"" \
-  -Wformat=0
+  -DPLUGINS=\""${libstrongswan_plugins}\""
 openac_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la -lgmp
 
index 0e749f6..2e46de9 100644 (file)
@@ -86,8 +86,7 @@ AM_CFLAGS = \
 -DIPSEC_PLUGINDIR=\"${plugindir}\" \
 -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \
 -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES \
--DPLUTO -DKLIPS -DDEBUG \
--Wformat=0
+-DPLUTO -DKLIPS -DDEBUG
 
 pluto_LDADD = \
 $(LIBSTRONGSWANDIR)/libstrongswan.la \
index ed40d29..2661bc3 100644 (file)
@@ -19,8 +19,7 @@ AM_CFLAGS = \
 -DIPSEC_CONFDIR=\"${confdir}\" \
 -DIPSEC_PLUGINDIR=\"${plugindir}\" \
 -DSTRONGSWAN_CONF=\"${strongswan_conf}\" \
--DDEBUG -DNO_PLUTO \
--Wformat=0
+-DDEBUG -DNO_PLUTO
 
 LIBSTRONGSWANBUILDDIR=$(top_builddir)/src/libstrongswan
 LIBFREESWANBUILDDIR=$(top_builddir)/src/libfreeswan