aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2015-11-27 02:28:17 +0000
committerJoão Valverde <j@v6e.pt>2016-01-28 18:13:48 +0000
commit265a41e14da6b3ebf1e49e726eee62d1372110bf (patch)
treef1a524f8e66ebd43691de84649f231f32ee125f6
parent97a1a50e200a6c50e0014dde7e8ec932c30190a1 (diff)
autotools: Don't use "user variables" to set build flags
GNU coding standards recommend against it and automake is designed around it. This allows overriding the global build flags using AM_CFLAGS, etc., or per object flags, something that is difficult or impossible currently because of automake precedence rules. Change-Id: I3f1ea12e560af5a46b2f04b342b1882bbf123f12 Reviewed-on: https://code.wireshark.org/review/13455 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r--Makefile.am49
-rw-r--r--Makefile.am.inc30
-rw-r--r--acinclude.m4214
-rw-r--r--capchild/Makefile.am13
-rw-r--r--caputils/Makefile.am13
-rw-r--r--codecs/Makefile.am11
-rw-r--r--configure.ac140
-rw-r--r--echld/Makefile.am17
-rw-r--r--epan/Makefile.am34
-rw-r--r--epan/compress/Makefile.am8
-rw-r--r--epan/crypt/Makefile.am8
-rw-r--r--epan/dfilter/Makefile.am23
-rw-r--r--epan/dissectors/Makefile.am14
-rw-r--r--epan/dissectors/dcerpc/Makefile.am1
-rw-r--r--epan/ftypes/Makefile.am9
-rw-r--r--epan/nghttp2/Makefile.am9
-rw-r--r--epan/wmem/Makefile.am9
-rw-r--r--epan/wslua/Makefile.am6
-rw-r--r--plugins/docsis/Makefile.am9
-rw-r--r--plugins/ethercat/Makefile.am9
-rw-r--r--plugins/gryphon/Makefile.am9
-rw-r--r--plugins/irda/Makefile.am9
-rw-r--r--plugins/m2m/Makefile.am9
-rw-r--r--plugins/mate/Makefile.am15
-rw-r--r--plugins/opcua/Makefile.am9
-rw-r--r--plugins/profinet/Makefile.am9
-rw-r--r--plugins/stats_tree/Makefile.am9
-rw-r--r--plugins/tpg/Makefile.am7
-rw-r--r--plugins/unistim/Makefile.am9
-rw-r--r--plugins/wimax/Makefile.am9
-rw-r--r--plugins/wimaxasncp/Makefile.am9
-rw-r--r--plugins/wimaxmacphy/Makefile.am9
-rw-r--r--ui/Makefile.am17
-rw-r--r--ui/cli/Makefile.am13
-rw-r--r--ui/gtk/Makefile.am17
-rw-r--r--ui/qt/Makefile.am16
-rw-r--r--wiretap/Makefile.am17
-rw-r--r--wsutil/Makefile.am21
38 files changed, 302 insertions, 537 deletions
diff --git a/Makefile.am b/Makefile.am
index d2b6204677..eb057853ca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,14 +19,17 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+include ./Makefile.am.inc
+
AM_DISTCHECK_CONFIGURE_FLAGS=@GUI_CONFIGURE_FLAGS@
# Make sure to keep ACLOCAL_AMFLAGS in Makefile.am and AC_CONFIG_MACRO_DIRS
# in configure.ac in sync, otherwise there will be an error running autogen.sh.
ACLOCAL_AMFLAGS = `./aclocal-flags`
-if HAVE_WARNINGS_AS_ERRORS
-AM_CLEAN_CFLAGS = -Werror
-endif
+# Common headers
+AM_CPPFLAGS += -I$(top_srcdir)/wiretap $(LIBGNUTLS_CFLAGS) \
+ $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(LUA_CFLAGS) $(SBC_CFLAGS) \
+ $(KRB5_CFLAGS)
bin_PROGRAMS = \
@wireshark_bin@ \
@@ -427,7 +430,6 @@ wireshark_common_ldadd = \
if HAVE_Qt
wireshark_SOURCES = $(WIRESHARK_COMMON_SRC) wireshark-qt.cpp
wireshark_INCLUDES = $(WIRESHARK_COMMON_INCLUDES)
-wireshark_CFLAGS = $(AM_CLEAN_CFLAGS)
wireshark_LDADD = \
ui/qt/libqtui.a \
$(wireshark_common_ldadd) \
@@ -437,7 +439,6 @@ endif
if HAVE_GTK
wireshark_gtk_SOURCES = $(WIRESHARK_COMMON_SRC)
wireshark_gtk_INCLUDES = $(WIRESHARK_COMMON_INCLUDES)
-wireshark_gtk_CFLAGS = $(AM_CLEAN_CFLAGS)
wireshark_gtk_LDADD = \
ui/gtk/libgtkui.a \
$(wireshark_common_ldadd) \
@@ -475,8 +476,6 @@ tshark_LDADD = \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@
-tshark_CFLAGS = $(AM_CLEAN_CFLAGS)
-
if ENABLE_STATIC
tfshark_LDFLAGS = -Wl,-static -all-static
else
@@ -502,8 +501,6 @@ tfshark_LDADD = \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@
-tfshark_CFLAGS = $(AM_CLEAN_CFLAGS)
-
if ENABLE_STATIC
rawshark_LDFLAGS = -Wl,-static -all-static
else
@@ -532,8 +529,6 @@ rawshark_LDADD = \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@
-rawshark_CFLAGS = $(AM_CLEAN_CFLAGS)
-
if ENABLE_STATIC
androiddump_LDFLAGS = -Wl,-static -all-static
else
@@ -547,8 +542,6 @@ androiddump_LDADD = \
@GLIB_LIBS@ \
@SOCKET_LIBS@
-androiddump_CFLAGS = $(AM_CLEAN_CFLAGS)
-
if ENABLE_STATIC
sshdump_LDFLAGS = -Wl,-static -all-static
else
@@ -563,8 +556,6 @@ sshdump_LDADD = \
@LIBSSH_LIBS@ \
@SOCKET_LIBS@
-sshdump_CFLAGS = $(AM_CLEAN_CFLAGS)
-
if ENABLE_STATIC
randpktdump_LDFLAGS = -Wl,-static -all-static
else
@@ -578,8 +569,6 @@ randpktdump_LDADD = \
@GLIB_LIBS@ \
@SOCKET_LIBS@
-randpktdump_CFLAGS = $(AM_CLEAN_CFLAGS)
-
# Libraries with which to link text2pcap.
text2pcap_LDADD = \
wsutil/libwsutil.la \
@@ -589,14 +578,13 @@ text2pcap_LDADD = \
# which is generated (and therefore not always clean).
# We could generate text2pcap.o as a library with -Werror but for now it
# doesn't seem worth the effort.
-#text2pcap_CFLAGS = $(AM_CLEAN_CFLAGS)
+text2pcap_CFLAGS = $(GENERATED_CFLAGS)
# Libraries with which to link mergecap.
mergecap_LDADD = \
wiretap/libwiretap.la \
wsutil/libwsutil.la \
@GLIB_LIBS@
-mergecap_CFLAGS = $(AM_CLEAN_CFLAGS)
# Libraries with which to link capinfos.
capinfos_LDADD = \
@@ -604,28 +592,24 @@ capinfos_LDADD = \
wsutil/libwsutil.la \
@GLIB_LIBS@ \
@LIBGCRYPT_LIBS@
-capinfos_CFLAGS = $(AM_CLEAN_CFLAGS)
# Libraries with which to link captype.
captype_LDADD = \
wiretap/libwiretap.la \
wsutil/libwsutil.la \
@GLIB_LIBS@
-captype_CFLAGS = $(AM_CLEAN_CFLAGS)
# Libraries with which to link editcap.
editcap_LDADD = \
wiretap/libwiretap.la \
wsutil/libwsutil.la \
@GLIB_LIBS@
-editcap_CFLAGS = $(AM_CLEAN_CFLAGS)
# Libraries with which to link reordercap.
reordercap_LDADD = \
wiretap/libwiretap.la \
wsutil/libwsutil.la \
@GLIB_LIBS@
-reordercap_CFLAGS = $(AM_CLEAN_CFLAGS)
# Libraries with which to link randpkt.
randpkt_LDADD = \
@@ -638,8 +622,6 @@ randpkt_LDADD = \
@C_ARES_LIBS@ \
@ADNS_LIBS@
-randpkt_CFLAGS = $(AM_CLEAN_CFLAGS)
-
# Libraries and plugin flags with which to link dftest.
dftest_LDADD = \
ui/libui.a \
@@ -659,8 +641,6 @@ dftest_LDADD = \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@
-dftest_CFLAGS = $(AM_CLEAN_CFLAGS)
-
echld_test_LDADD = \
epan/libwireshark.la \
echld/libechld.la \
@@ -676,9 +656,6 @@ echld_test_DEPENDENCIES = \
echld/libechld.la \
epan/libwireshark.la
-echld_test_CFLAGS = $(AM_CLEAN_CFLAGS)
-
-
# Libraries with which to link dumpcap.
dumpcap_LDADD = \
caputils/libcaputils.a \
@@ -690,25 +667,15 @@ dumpcap_LDADD = \
@SYSTEMCONFIGURATION_FRAMEWORKS@ \
@COREFOUNDATION_FRAMEWORKS@ \
@LIBCAP_LIBS@
-dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(PIE_CFLAGS)
+dumpcap_CFLAGS = $(AM_CFLAGS) $(PIE_CFLAGS)
dumpcap_LDFLAGS = $(PIE_LDFLAGS)
-# Common headers
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
- $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) \
- @LUA_CFLAGS@ $(SBC_CFLAGS) -DTOP_SRCDIR=\"$(abs_top_srcdir)\"
-
#
# Build the version string
#
# FORCE is the portable version of .PHONY
FORCE:
-AM_V_PERL = $(am__v_PERL_@AM_V@)
-am__v_PERL_ = $(am__v_PERL_@AM_DEFAULT_V@)
-am__v_PERL_0 = @echo " PERL " $@;
-am__v_PERL_1 =
-
version.h: FORCE
$(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
diff --git a/Makefile.am.inc b/Makefile.am.inc
index 9bf5cf87d2..e8c4437f9b 100644
--- a/Makefile.am.inc
+++ b/Makefile.am.inc
@@ -21,6 +21,34 @@
AUTOMAKE_OPTIONS = -Wno-portability
+lemon_srcdir = $(top_srcdir)/tools/lemon
+
+LEMON ?= $(top_builddir)/tools/lemon/lemon$(EXEEXT)
+
+RUNLEX ?= $(top_srcdir)/tools/runlex.sh
+
+AM_CPPFLAGS = $(WS_CPPFLAGS) -I$(top_srcdir) -DTOP_SRCDIR=\"$(abs_top_srcdir)\"
+
+AM_CFLAGS = $(WS_CFLAGS)
+
+if HAVE_WARNINGS_AS_ERRORS
+AM_CFLAGS += -Werror
+endif
+
+GENERATED_CFLAGS = $(WS_CFLAGS)
+
+AM_CXXFLAGS = $(WS_CXXFLAGS)
+
+if HAVE_WARNINGS_AS_ERRORS
+AM_CXXFLAGS += -Werror
+endif
+
+AM_LDFLAGS = $(WS_LDFLAGS)
+
+AM_V_PERL = $(am__v_PERL_@AM_V@)
+am__v_PERL_ = $(am__v_PERL_@AM_DEFAULT_V@)
+am__v_PERL_0 = @echo " PERL " $@;
+
AM_V_AWK = $(am__v_AWK_@AM_V@)
am__v_AWK_ = $(am__v_AWK_@AM_DEFAULT_V@)
am__v_AWK_0 = @echo " AWK " $@;
@@ -48,7 +76,7 @@ abi_incdirs = $(subst -I,NEWLINE,$(filter -I%,$(CFLAGS) -I$(abs_top_srcdir) -I$(
abi_sysdirs = $(subst -isystem,NEWLINE,$(filter -isystem%,$(CFLAGS)))
INCLUDE_DIRS = $(abi_incdirs) $(abi_sysdirs)
abi-descriptor.xml: ../abi-descriptor.template
- $(AM_V_SED)sed \
+ $(AM_V_SED)$(SED) \
-e 's|@INCLUDE_DIRS@|$(INCLUDE_DIRS)|g' \
-e 's/ *NEWLINE/\n /g' \
-e 's|@LIBRARY_OUTPUT_PATH@|{RELPATH}/.libs|' $< > $@
diff --git a/acinclude.m4 b/acinclude.m4
index 1851503956..c4d2b40e6b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -68,6 +68,36 @@ esac
])
#
+# AC_WIRESHARK_PUSH_FLAGS
+#
+# Push our flags to CFLAGS/etc.
+#
+AC_DEFUN([AC_WIRESHARK_PUSH_FLAGS],
+[
+ ac_ws_CPPLAGS_saved="$CPPFLAGS"
+ ac_ws_CFLAGS_saved="$CFLAGS"
+ ac_ws_CXXFLAGS_saved="$CXXFLAGS"
+ ac_ws_LDFLAGS_saved="$LDFLAGS"
+ CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
+ CFLAGS="$WS_CFLAGS $CFLAGS"
+ CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
+ LDFLAGS="$WS_LDFLAGS $LDFLAGS"
+])
+
+#
+# AC_WIRESHARK_POP_FLAGS
+#
+# Restore user build flags.
+#
+AC_DEFUN([AC_WIRESHARK_POP_FLAGS],
+[
+ CPPFLAGS="$ac_ws_CPPLAGS_saved"
+ CFLAGS="$ac_ws_CFLAGS_saved"
+ CXXFLAGS="$ac_ws_CXXFLAGS_saved"
+ LDFLAGS="$ac_ws_LDFLAGS_saved"
+])
+
+#
# AC_WIRESHARK_TIMEZONE_ABBREV
#
@@ -251,6 +281,8 @@ AC_DEFUN([AC_WIRESHARK_PCAP_BREAKLOOP_TRY_LINK],
#
AC_DEFUN([AC_WIRESHARK_PCAP_CHECK],
[
+ AC_WIRESHARK_PUSH_FLAGS
+
if test -z "$pcap_dir"
then
# Pcap header checks
@@ -535,6 +567,8 @@ install a newer version of the header file.])
])
AC_CHECK_FUNCS(bpf_image pcap_set_tstamp_precision)
fi
+
+ AC_WIRESHARK_POP_FLAGS
LIBS="$ac_save_LIBS"
])
@@ -558,6 +592,8 @@ AC_DEFUN([AC_WIRESHARK_PCAP_REMOTE_CHECK],
#
AC_DEFUN([AC_WIRESHARK_ZLIB_CHECK],
[
+ AC_WIRESHARK_PUSH_FLAGS
+
if test "x$zlib_dir" != "x"
then
#
@@ -572,10 +608,8 @@ AC_DEFUN([AC_WIRESHARK_ZLIB_CHECK],
# and/or linker will search that other directory before it
# searches the specified directory.
#
- wireshark_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$zlib_dir/include"
- wireshark_save_LIBS="$LIBS"
- AC_WIRESHARK_ADD_DASH_L(LIBS, $zlib_dir/lib)
+ AC_WIRESHARK_ADD_DASH_L(LDFLAGS, $zlib_dir/lib)
fi
#
@@ -622,18 +656,11 @@ AC_DEFUN([AC_WIRESHARK_ZLIB_CHECK],
#
if test "x$zlib_dir" != "x"
then
- #
- # Put the "-L" flags for zlib at the beginning
- # of LIBS.
- #
- LIBS=""
- AC_WIRESHARK_ADD_DASH_L(LIBS, $zlib_dir/lib)
- LIBS="$LIBS -lz $wireshark_save_LIBS"
- else
- LIBS="-lz $LIBS"
+ WS_CPPFLAGS="$WS_CPPFLAGS -I$zlib_dir/include"
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, $zlib_dir/lib)
fi
+ LIBS="$LIBS -lz"
AC_DEFINE(HAVE_LIBZ, 1, [Define to use libz library])
-
#
# Check for "inflatePrime()" in zlib, which we need
# in order to read compressed capture files.
@@ -664,16 +691,9 @@ AC_DEFUN([AC_WIRESHARK_ZLIB_CHECK],
AC_MSG_ERROR(old zlib found when linking with X11 - get rid of old zlib.)
])
fi
- else
- #
- # Restore the versions of CPPFLAGS and LIBS before
- # we added the "-with-zlib=" directory, as we didn't
- # actually find zlib there.
- #
- CPPFLAGS="$wireshark_save_CPPFLAGS"
- LIBS="$wireshark_save_LIBS"
- want_zlib=no
fi
+
+ AC_WIRESHARK_POP_FLAGS
])
#
@@ -683,6 +703,8 @@ AC_DEFUN([AC_WIRESHARK_ZLIB_CHECK],
# If it's yes, it also sets $LUA_CFLAGS and $LUA_LIBS.
AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
+ AC_WIRESHARK_PUSH_FLAGS
+
if test "x$want_lua_dir" = "x"
then
# The user didn't tell us where to find Lua. Let's go look for it.
@@ -758,20 +780,16 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
else
AC_MSG_RESULT($lua_ver)
- wireshark_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$header_dir"
AC_CHECK_HEADERS(lua.h lualib.h lauxlib.h, ,
[
have_lua=no
- # Restore our CPPFLAGS
- CPPFLAGS="$wireshark_save_CPPFLAGS"
])
fi
if test "x$have_lua" = "x"
then
- # Restore our CPPFLAGS and set LUA_CFLAGS
- CPPFLAGS="$wireshark_save_CPPFLAGS"
+ # Set LUA_CFLAGS
LUA_CFLAGS="-I$header_dir"
# We have the header files and they work. Now let's check if we
@@ -799,6 +817,7 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
fi
fi
+ AC_WIRESHARK_POP_FLAGS
])
#
@@ -806,6 +825,9 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
#
AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
+ AC_WIRESHARK_PUSH_FLAGS
+ wireshark_save_LIBS="$LIBS"
+
if test "x$portaudio_dir" != "x"
then
#
@@ -820,22 +842,10 @@ AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
# and/or linker will search that other directory before it
# searches the specified directory.
#
- wireshark_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$portaudio_dir/include"
- wireshark_save_LIBS="$LIBS"
- LIBS="$LIBS -L$portaudio_dir/lib -lportaudio"
- wireshark_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$portaudio_dir/lib"
- else
- #
- # The user specified no directory in which libportaudio resides,
- # so just add "-lportaudio" to the used libs.
- #
- wireshark_save_CPPFLAGS="$CPPFLAGS"
- wireshark_save_LDFLAGS="$LDFLAGS"
- wireshark_save_LIBS="$LIBS"
- LIBS="$LIBS -lportaudio"
fi
+ LIBS="$LIBS -lportaudio"
#
# Make sure we have "portaudio.h". If we don't, it means we probably
@@ -854,10 +864,6 @@ AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
#
AC_MSG_ERROR([libportaudio header not found in directory specified in --with-portaudio])
else
- CPPFLAGS="$wireshark_save_CPPFLAGS"
- LDFLAGS="$wireshark_save_LDFLAGS"
- LIBS="$wireshark_save_LIBS"
- PORTAUDIO_LIBS=""
if test "x$want_portaudio" = "xyes"
then
#
@@ -893,6 +899,8 @@ AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
#
# let's check if the libs are there
#
+ PORTAUDIO_LIBS=""
+ PORTAUDIO_INCLUDES=""
AC_CHECK_LIB(portaudio, Pa_Initialize,
[
@@ -907,21 +915,10 @@ AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
PORTAUDIO_INCLUDES="-I$portaudio_dir/include"
else
PORTAUDIO_LIBS="-lportaudio"
- PORTAUDIO_INCLUDES=""
fi
AC_DEFINE(HAVE_LIBPORTAUDIO, 1, [Define to use libportaudio library])
want_portaudio=yes
],[
- #
- # Restore the versions of CPPFLAGS, LDFLAGS, and
- # LIBS before we added the "--with-portaudio="
- # directory, as we didn't actually find portaudio
- # there.
- #
- CPPFLAGS="$wireshark_save_CPPFLAGS"
- LDFLAGS="$wireshark_save_LDFLAGS"
- LIBS="$wireshark_save_LIBS"
- PORTAUDIO_LIBS=""
# User requested --with-portaudio but it isn't available
if test "x$want_portaudio" = "xyes"
then
@@ -929,14 +926,13 @@ AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
fi
want_portaudio=no
])
-
- CPPFLAGS="$wireshark_save_CPPFLAGS"
- LDFLAGS="$wireshark_save_LDFLAGS"
- LIBS="$wireshark_save_LIBS"
- AC_SUBST(PORTAUDIO_LIBS)
- AC_SUBST(PORTAUDIO_INCLUDES)
+ AC_SUBST(PORTAUDIO_LIBS)
+ AC_SUBST(PORTAUDIO_INCLUDES)
fi
+
+ LIBS="$wireshark_save_LIBS"
+ AC_WIRESHARK_POP_FLAGS
])
#
@@ -987,7 +983,7 @@ AC_DEFUN([AC_WIRESHARK_C_ARES_CHECK],
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
withval=/usr/local
if test -d "$withval"; then
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
fi
fi
@@ -1018,7 +1014,7 @@ AC_DEFUN([AC_WIRESHARK_ADNS_CHECK],
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
withval=/usr/local
if test -d "$withval"; then
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
fi
fi
@@ -1049,7 +1045,7 @@ AC_DEFUN([AC_WIRESHARK_LIBCAP_CHECK],
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
withval=/usr/local
if test -d "$withval"; then
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
fi
fi
@@ -1073,7 +1069,9 @@ AC_DEFUN([AC_WIRESHARK_LIBCAP_CHECK],
#
AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
[
- wireshark_save_CPPFLAGS="$CPPFLAGS"
+ AC_WIRESHARK_PUSH_FLAGS
+ wireshark_save_LIBS="$LIBS"
+
if test "x$krb5_dir" != "x"
then
#
@@ -1088,7 +1086,7 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
# and/or linker will search that other directory before it
# searches the specified directory.
#
- CPPFLAGS="$CPPFLAGS -I$krb5_dir/include"
+ KRB5_CFLAGS="-I$krb5_dir/include"
ac_heimdal_version=`grep heimdal $krb5_dir/include/krb5.h | head -n 1 | sed 's/^.*heimdal.*$/HEIMDAL/'`
# MIT Kerberos moved krb5.h to krb5/krb5.h starting with release 1.5
ac_mit_version_olddir=`grep 'Massachusetts' $krb5_dir/include/krb5.h | head -n 1 | sed 's/^.*Massachusetts.*$/MIT/'`
@@ -1108,9 +1106,8 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
AC_PATH_TOOL(KRB5_CONFIG, krb5-config)
if test -x "$KRB5_CONFIG"
then
- KRB5_FLAGS=`"$KRB5_CONFIG" --cflags`
+ KRB5_CFLAGS=`"$KRB5_CONFIG" --cflags`
KRB5_LIBS=`"$KRB5_CONFIG" --libs`
- CPPFLAGS="$CPPFLAGS $KRB5_FLAGS"
#
# If -lcrypto is in KRB5_FLAGS, we require it to build
# with Heimdal/MIT. We don't want to built with it by
@@ -1139,6 +1136,8 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
fi
fi
+ CPPFLAGS="$CPPFLAGS $KRB5_CFLAGS"
+
#
# Make sure we have "krb5.h". If we don't, it means we probably
# don't have kerberos, so don't use it.
@@ -1168,6 +1167,8 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
# We couldn't find the header file; don't use the
# library, as it's probably not present.
#
+ KRB5_CFLAGS=""
+ KRB5_LIBS=""
want_krb5=no
AC_MSG_RESULT(No Heimdal or MIT header found - disabling dissection for some kerberos data in packet decoding)
fi
@@ -1190,7 +1191,6 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
# the Kerberos library.
#
AC_MSG_RESULT($ac_krb5_version)
- wireshark_save_LIBS="$LIBS"
found_krb5_kt_resolve=no
for extras in "" "-lresolv"
do
@@ -1245,11 +1245,10 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
AC_MSG_ERROR(Usable $ac_krb5_version not found)
else
#
- # Restore the versions of CPPFLAGS from before we
- # added the flags for Kerberos.
+ # Don't use
#
AC_MSG_RESULT(Usable $ac_krb5_version not found - disabling dissection for some kerberos data in packet decoding)
- CPPFLAGS="$wireshark_save_CPPFLAGS"
+ KRB5_CFLAGS=""
KRB5_LIBS=""
want_krb5=no
fi
@@ -1281,7 +1280,6 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
AC_MSG_RESULT(no)
])
fi
- LIBS="$wireshark_save_LIBS"
else
#
# It's not Heimdal or MIT.
@@ -1296,11 +1294,10 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
AC_MSG_ERROR(Kerberos not found)
else
#
- # Restore the versions of CPPFLAGS from before we
- # added the flags for Kerberos.
+ # Don't use.
#
AC_MSG_RESULT(Kerberos not found - disabling dissection for some kerberos data in packet decoding)
- CPPFLAGS="$wireshark_save_CPPFLAGS"
+ KRB5_CFLAGS=""
KRB5_LIBS=""
want_krb5=no
fi
@@ -1311,14 +1308,15 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
# say whether they wanted us to use it but we found
# that we couldn't.
#
- # Restore the versions of CPPFLAGS from before we added
- # the flags for Kerberos.
- #
- CPPFLAGS="$wireshark_save_CPPFLAGS"
+ KRB5_CFLAGS=""
KRB5_LIBS=""
want_krb5=no
fi
+ AC_SUBST(KRB5_CFLAGS)
AC_SUBST(KRB5_LIBS)
+
+ LIBS="$wireshark_save_LIBS"
+ AC_WIRESHARK_POP_FLAGS
])
#
@@ -1333,7 +1331,7 @@ AC_DEFUN([AC_WIRESHARK_GEOIP_CHECK],
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
withval=/usr/local
if test -d "$withval"; then
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
fi
fi
@@ -1370,7 +1368,7 @@ AC_DEFUN([AC_WIRESHARK_LIBSSH_CHECK],
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
withval=/usr/local
if test -d "$withval"; then
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
fi
fi
@@ -1405,19 +1403,23 @@ AC_DEFUN([AC_WIRESHARK_LIBSSH_CHECK],
AC_DEFUN([AC_WIRESHARK_LDFLAGS_CHECK],
[LD_OPTION="$1"
AC_MSG_CHECKING(whether we can add $LD_OPTION to LDFLAGS)
-LDFLAGS_saved="$LDFLAGS"
+AC_WIRESHARK_PUSH_FLAGS
LDFLAGS="$LDFLAGS $LD_OPTION"
+can_add_to_ldflags=""
AC_LINK_IFELSE(
[
AC_LANG_SOURCE([[main() { return; }]])
],
[
AC_MSG_RESULT(yes)
+ WS_LDFLAGS="$WS_LDFLAGS $LD_OPTION"
+ can_add_to_ldflags=yes
],
[
AC_MSG_RESULT(no)
- LDFLAGS="$LDFLAGS_saved"
+ can_add_to_ldflags=no
])
+ AC_WIRESHARK_POP_FLAGS
])
dnl
@@ -1430,7 +1432,7 @@ dnl
AC_DEFUN([AC_WIRESHARK_CHECK_UNKNOWN_WARNING_OPTION_ERROR],
[
AC_MSG_CHECKING([whether the compiler fails when given an unknown warning option])
- save_CFLAGS="$CFLAGS"
+ AC_WIRESHARK_PUSH_FLAGS
CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
AC_TRY_COMPILE(
[],
@@ -1447,7 +1449,7 @@ AC_DEFUN([AC_WIRESHARK_CHECK_UNKNOWN_WARNING_OPTION_ERROR],
[
AC_MSG_RESULT([yes])
])
- CFLAGS="$save_CFLAGS"
+ AC_WIRESHARK_POP_FLAGS
])
dnl
@@ -1465,6 +1467,7 @@ AC_DEFUN([AC_WIRESHARK_CHECK_NON_CXX_WARNING_OPTION_ERROR],
# about -Wmissing-declarations. Check both.
#
AC_LANG_PUSH(C++)
+ AC_WIRESHARK_PUSH_FLAGS
save_CXXFLAGS="$CXXFLAGS"
for flag in -Wmissing-prototypes -Wmissing-declarations; do
CXXFLAGS="$save_CXXFLAGS $flag"
@@ -1508,7 +1511,7 @@ AC_DEFUN([AC_WIRESHARK_CHECK_NON_CXX_WARNING_OPTION_ERROR],
])
])
done
- CXXFLAGS="$save_CXXFLAGS"
+ AC_WIRESHARK_POP_FLAGS
AC_LANG_POP
if test x$ac_wireshark_non_cxx_warning_option_error = x; then
AC_MSG_RESULT([yes])
@@ -1561,8 +1564,7 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# (Yeah, you, clang.)
#
AC_MSG_CHECKING(whether we can add $GCC_OPTION to CFLAGS)
- CFLAGS_saved="$CFLAGS"
- CFLAGS="$WS_CHECKED_CFLAGS $CFLAGS"
+ AC_WIRESHARK_PUSH_FLAGS
if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
then
CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
@@ -1602,7 +1604,7 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# added them, by setting CFLAGS to the saved value plus
# just the new option.
#
- WS_CHECKED_CFLAGS="$WS_CHECKED_CFLAGS $GCC_OPTION"
+ WS_CFLAGS="$WS_CFLAGS $GCC_OPTION"
if test "$CC" = "$CC_FOR_BUILD"; then
#
# We're building the build tools with the same compiler
@@ -1621,7 +1623,7 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# added them, by setting CFLAGS to the saved value plus
# just the new option.
#
- WS_CHECKED_CFLAGS="$WS_CHECKED_CFLAGS $GCC_OPTION"
+ WS_CFLAGS="$WS_CFLAGS $GCC_OPTION"
if test "$CC" = "$CC_FOR_BUILD"; then
#
# We're building the build tools with the same compiler
@@ -1636,7 +1638,7 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
AC_MSG_RESULT(no)
can_add_to_cflags=no
])
- CFLAGS="$CFLAGS_saved"
+ AC_WIRESHARK_POP_FLAGS
fi
#
# Did we find a C++ compiler?
@@ -1667,8 +1669,7 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# (Yeah, you, clang++.)
#
AC_MSG_CHECKING(whether we can add $GCC_OPTION to CXXFLAGS)
- CXXFLAGS_saved="$CXXFLAGS"
- CXXFLAGS="$WS_CHECKED_CXXFLAGS $CXXFLAGS"
+ AC_WIRESHARK_PUSH_FLAGS
if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
then
CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
@@ -1709,7 +1710,7 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# added them, by setting CXXFLAGS to the saved value plus
# just the new option.
#
- WS_CHECKED_CXXFLAGS="$WS_CHECKED_CXXFLAGS $GCC_OPTION"
+ WS_CXXFLAGS="$WS_CXXFLAGS $GCC_OPTION"
],
[
AC_MSG_RESULT(yes)
@@ -1720,14 +1721,14 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then
# added them, by setting CXXFLAGS to the saved value plus
# just the new option.
#
- WS_CHECKED_CXXFLAGS="$WS_CHECKED_CXXFLAGS $GCC_OPTION"
+ WS_CXXFLAGS="$WS_CXXFLAGS $GCC_OPTION"
fi
],
[
AC_MSG_RESULT(no)
can_add_to_cxxflags=no
])
- CXXFLAGS="$CXXFLAGS_saved"
+ AC_WIRESHARK_POP_FLAGS
AC_LANG_POP([C++])
fi
if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
@@ -1772,8 +1773,7 @@ AC_DEFUN([AC_WIRESHARK_GCC_FORTIFY_SOURCE_CHECK],
[
if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
AC_MSG_CHECKING([whether -D_FORTIFY_SOURCE=... can be used (without generating a warning)])
- CFLAGS_saved="$CFLAGS"
- CPPFLAGS_saved="$CPPFLAGS"
+ AC_WIRESHARK_PUSH_FLAGS
CFLAGS="$CFLAGS -Werror"
CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
AC_COMPILE_IFELSE([
@@ -1783,16 +1783,12 @@ if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
]])],
[
AC_MSG_RESULT(yes)
- #
- # (CPPFLAGS contains _D_FORTIFY_SOURCE=2)
- #
+ WS_CPPFLAGS="$WS_CPPFLAGS -D_FORTIFY_SOURCE=2"
],
[
AC_MSG_RESULT(no)
- # Remove -D_FORTIFY_SOURCE=2
- CPPFLAGS="$CPPFLAGS_saved"
])
- CFLAGS="$CFLAGS_saved"
+ AC_WIRESHARK_POP_FLAGS
fi
])
@@ -1840,7 +1836,7 @@ AC_DEFUN([PKG_WIRESHARK_CHECK_SYSTEM_MODULES],
#
AC_DEFUN([AC_WIRESHARK_OSX_INTEGRATION_CHECK],
[
- ac_save_CFLAGS="$CFLAGS"
+ AC_WIRESHARK_PUSH_FLAGS
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$GTK_LIBS $LIBS"
@@ -1892,8 +1888,8 @@ AC_DEFUN([AC_WIRESHARK_OSX_INTEGRATION_CHECK],
GTK_LIBS="$GTK_LIBS -lgtkmacintegration"
])
fi
- CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
+ AC_WIRESHARK_POP_FLAGS
])
# Based on AM_PATH_GTK in gtk-2.0.m4.
@@ -2019,7 +2015,7 @@ AC_DEFUN([AC_WIRESHARK_QT_MODULE_CHECK],
AC_DEFUN([AC_WIRESHARK_QT_ADD_PIC_IF_NEEDED],
[
AC_LANG_PUSH([C++])
- save_CPPFLAGS="$CPPFLAGS"
+ AC_WIRESHARK_PUSH_FLAGS
CPPFLAGS="$CPPFLAGS $Qt_CFLAGS"
AC_MSG_CHECKING([whether Qt works without -fPIC])
AC_PREPROC_IFELSE(
@@ -2040,7 +2036,7 @@ AC_DEFUN([AC_WIRESHARK_QT_ADD_PIC_IF_NEEDED],
AC_MSG_ERROR(Couldn't compile Qt without -fPIC nor with -fPIC)
])
])
- CPPFLAGS="$save_CPPFLAGS"
+ AC_WIRESHARK_POP_FLAGS
AC_LANG_POP([C++])
])
diff --git a/capchild/Makefile.am b/capchild/Makefile.am
index ed14eeb5f2..5251b047ff 100644
--- a/capchild/Makefile.am
+++ b/capchild/Makefile.am
@@ -20,11 +20,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include Makefile.common
-include ../Makefile.am.inc
+include $(top_srcdir)/Makefile.am.inc
-if HAVE_WARNINGS_AS_ERRORS
-AM_CLEAN_CFLAGS = -Werror
-endif
+AM_CPPFLAGS += -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) \
+ $(LIBGNUTLS_CFLAGS) $(PORTAUDIO_INCLUDES)
noinst_LIBRARIES = libcapchild.a
@@ -42,14 +41,8 @@ libcapchild_a_SOURCES = \
$(CAPCHILD_SRC) \
$(noinst_HEADERS)
-libcapchild_a_CFLAGS = $(AM_CLEAN_CFLAGS)
-
libcapchild_a_DEPENDENCIES =
-# Common headers
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) $(LIBGNUTLS_CFLAGS) $(PORTAUDIO_INCLUDES)
-
-
doxygen:
if HAVE_DOXYGEN
$(DOXYGEN) doxygen.cfg
diff --git a/caputils/Makefile.am b/caputils/Makefile.am
index 1710d8b587..48b26cc9c2 100644
--- a/caputils/Makefile.am
+++ b/caputils/Makefile.am
@@ -20,11 +20,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include Makefile.common
-include ../Makefile.am.inc
+include $(top_srcdir)/Makefile.am.inc
-if HAVE_WARNINGS_AS_ERRORS
-AM_CLEAN_CFLAGS = -Werror
-endif
+AM_CPPFLAGS += -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) \
+ $(LIBGNUTLS_CFLAGS) $(PORTAUDIO_INCLUDES)
noinst_LIBRARIES = libcaputils.a
@@ -71,14 +70,10 @@ libcaputils_a_SOURCES = \
# as it might be running with extra privileges), so this library needs
# to be built that way as well.
#
-libcaputils_a_CFLAGS = $(AM_CLEAN_CFLAGS) $(PIE_CFLAGS)
+libcaputils_a_CFLAGS = $(AM_CFLAGS) $(PIE_CFLAGS)
libcaputils_a_DEPENDENCIES =
-# Common headers
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) $(LIBGNUTLS_CFLAGS) $(PORTAUDIO_INCLUDES)
-
-
doxygen:
if HAVE_DOXYGEN
$(DOXYGEN) doxygen.cfg
diff --git a/codecs/Makefile.am b/codecs/Makefile.am
index d55b259644..d75f246f2b 100644
--- a/codecs/Makefile.am
+++ b/codecs/Makefile.am
@@ -20,13 +20,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include Makefile.common
-include ../Makefile.am.inc
+include $(top_srcdir)/Makefile.am.inc
-AM_CFLAGS =-DWS_BUILD_DLL
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS += -Werror
-endif
+AM_CPPFLAGS += -I$(top_srcdir)/wiretap -DWS_BUILD_DLL
CLEANFILES = \
libwscodec.la \
@@ -48,9 +44,6 @@ libwscodecs_la_DEPENDENCIES = ${top_builddir}/wsutil/libwsutil.la
libwscodecs_la_LIBADD = ${top_builddir}/wsutil/libwsutil.la
-# Common headers
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap
-
checkapi:
$(PERL) $(top_srcdir)/tools/checkAPIs.pl -g abort -g termoutput -build \
-sourcedir=$(srcdir) \
diff --git a/configure.ac b/configure.ac
index de84e3d7ab..8b9b1f9bce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -461,9 +461,9 @@ then
#
# Add an -isysroot flag to use the SDK.
#
- CFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $CFLAGS"
- CXXFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $CXXFLAGS"
- LDFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $LDFLAGS"
+ WS_CFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $WS_CFLAGS"
+ WS_CXXFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $WS_CXXFLAGS"
+ WS_LDFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $WS_LDFLAGS"
#
# Add a -sdkroot flag to use with osx-app.sh.
@@ -492,9 +492,9 @@ then
# functions not to work with 64-bit userland
# code, so capturing won't work.
#
- CFLAGS="-m32 $CFLAGS"
- CXXFLAGS="-m32 $CXXFLAGS"
- LDFLAGS="-m32 $LDFLAGS"
+ WS_CFLAGS="-m32 $WS_CFLAGS"
+ WS_CXXFLAGS="-m32 $WS_CXXFLAGS"
+ WS_LDFLAGS="-m32 $WS_LDFLAGS"
;;
esac
else
@@ -689,19 +689,19 @@ linux*)
PKG_WIRESHARK_CHECK_SYSTEM_MODULES(LIBNL1, libnl-1 >= 1.0, [have_libnl1=yes], [have_libnl1=no])
fi
if (test "${have_libnl3}" = "yes"); then
- CFLAGS="$CFLAGS $LIBNL3_CFLAGS"
+ WS_CFLAGS="$WS_CFLAGS $LIBNL3_CFLAGS"
LIBS="$LIBS $LIBNL3_LIBS"
AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
AC_DEFINE(HAVE_LIBNL3, 1, [libnl version 3])
libnl_message="yes (v3)"
elif (test "${have_libnl2}" = "yes"); then
- CFLAGS="$CFLAGS $LIBNL2_CFLAGS"
+ WS_CFLAGS="$WS_CFLAGS $LIBNL2_CFLAGS"
LIBS="$LIBS $LIBNL2_LIBS"
AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
AC_DEFINE(HAVE_LIBNL2, 1, [libnl version 2])
libnl_message="yes (v2)"
elif (test "${have_libnl1}" = "yes"); then
- CFLAGS="$CFLAGS $LIBNL1_CFLAGS"
+ WS_CFLAGS="$WS_CFLAGS $LIBNL1_CFLAGS"
LIBS="$LIBS $LIBNL1_LIBS"
AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
AC_DEFINE(HAVE_LIBNL1, 1, [libnl version 1])
@@ -1078,42 +1078,37 @@ AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--as-needed])
# privileges, and using PIE means the OS can run it at random locations
# in the address space to make attacks more difficult.
#
-WS_CHECKED_CFLAGS_before_pie="$WS_CHECKED_CFLAGS"
+
+WS_CFLAGS_saved="$WS_CFLAGS"
+WS_LDFLAGS_saved="$WS_LDFLAGS"
AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fPIE, C)
if test "x$can_add_to_cflags" = "xyes"
then
- # Restore CFLAGS
- WS_CHECKED_CFLAGS="$WS_CHECKED_CFLAGS_before_pie"
-
- LDFLAGS_before_pie="$LDFLAGS"
AC_WIRESHARK_LDFLAGS_CHECK([-fPIE -pie])
- if test "x$LDFLAGS" != "x$LDFLAGS_before_pie"
+ if test "x$can_add_to_ldflags" = "xyes"
then
# We can use PIE
PIE_CFLAGS="-fPIE"
PIE_LDFLAGS="-pie"
-
- # Restore LDFLAGS
- LDFLAGS="$LDFLAGS_before_pie"
fi
-
fi
+WS_CFLAGS="$WS_CFLAGS_saved"
+WS_LDFLAGS="$WS_LDFLAGS_saved"
AC_SUBST(PIE_CFLAGS)
AC_SUBST(PIE_LDFLAGS)
-WS_CHECKED_CFLAGS_before_simd="$WS_CHECKED_CFLAGS"
+WS_CFLAGS_saved="$WS_CFLAGS"
AC_WIRESHARK_COMPILER_FLAGS_CHECK(-msse4.2, C)
if test "x$can_add_to_cflags" = "xyes"
then
#
# The compiler supports -msse4.2; use that to enable SSE 4.2.
#
- # Restore CFLAGS. We only want to apply -msse4.2 to
+ # We only want to apply -msse4.2 to
# wsutil/ws_mempbrk_sse42.c, as the SSE4.2 code there
# is run only if the hardware supports it, but other
# code would do no such checks.
#
- WS_CHECKED_CFLAGS="$WS_CHECKED_CFLAGS_before_simd"
ac_sse4_2_flag=-msse4.2
else
#
@@ -1125,20 +1120,10 @@ else
#
# The compiler supports -xarch=sse4_2; use that to
# enable SSE 4.2.
- #
- # Restore CFLAGS; see above.
- #
- WS_CHECKED_CFLAGS="$WS_CHECKED_CFLAGS_before_simd"
ac_sse4_2_flag=-xarch=sse4_2
fi
fi
-
-#
-# All AC_WIRESHARK_COMPILER_FLAGS_CHECK are done, do not call it again!
-# Prepend them to the user-specified CFLAGS/CXXFLAGS.
-#
-CFLAGS="$WS_CHECKED_CFLAGS $CFLAGS"
-CXXFLAGS="$WS_CHECKED_CXXFLAGS $CXXFLAGS"
+WS_CFLAGS="$WS_CFLAGS_saved"
if test "x$ac_sse4_2_flag" != x; then
#
@@ -1181,7 +1166,7 @@ if test "x$ac_sse4_2_flag" != x; then
#
AC_MSG_CHECKING([whether there is nmmintrin.h header and we can use it])
saved_CFLAGS="$CFLAGS"
- CFLAGS="$ac_sse4_2_flag $CFLAGS"
+ CFLAGS="$ac_sse4_2_flag $WS_CFLAGS $CFLAGS"
AC_TRY_COMPILE(
[#include <nmmintrin.h>],
[return 0;],
@@ -1274,9 +1259,9 @@ if test "x$GCC" = "xyes" ; then
solaris*)
# the X11 headers don't automatically include prototype info
# and a lot don't include the return type
- CPPFLAGS="$CPPFLAGS -DFUNCPROTO=15"
- CFLAGS="$CFLAGS -Wno-return-type"
- CXXFLAGS="$CXXFLAGS -Wno-return-type"
+ WS_CPPFLAGS="$WS_CPPFLAGS -DFUNCPROTO=15"
+ WS_CFLAGS="$WS_CFLAGS -Wno-return-type"
+ WS_CXXFLAGS="$WS_CXXFLAGS -Wno-return-type"
AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15)
;;
*)
@@ -1299,7 +1284,7 @@ else
#
# +O2 is supported both by the C and C++ compiler.
#
- CFLAGS="+O2 $CFLAGS"
+ WS_CFLAGS="+O2 $WS_CFLAGS"
if test "$CC" = "$CC_FOR_BUILD"; then
#
# We're building the build tools with the same
@@ -1309,15 +1294,15 @@ else
#
CFLAGS_FOR_BUILD="-Ae +O2 $CFLAGS"
fi
- CXXFLAGS="+O2 $CXXFLAGS"
+ WS_CXXFLAGS="+O2 $WS_CXXFLAGS"
AC_MSG_RESULT(HP C/C++ compiler - added +O2)
;;
solaris*)
#
# Crank up the warning level.
#
- CFLAGS="$CFLAGS -v"
- CXXFLAGS="$CXXFLAGS +w2"
+ WS_CFLAGS="$WS_CFLAGS -v"
+ WS_CXXFLAGS="$WS_CXXFLAGS +w2"
;;
*)
AC_MSG_RESULT(none needed)
@@ -1350,7 +1335,7 @@ darwin*)
# with a static version installed in /usr/local/lib rather than
# the system version in /usr/lib).
#
- LDFLAGS="-Wl,-headerpad_max_install_names -Wl,-search_paths_first $LDFLAGS"
+ WS_LDFLAGS="-Wl,-headerpad_max_install_names -Wl,-search_paths_first $WS_LDFLAGS"
AC_MSG_RESULT([Apple linker - added -Wl,-single_module to shared library linker flags and -Wl,-headerpad_max_install_names -Wl,-search_paths_first and -Wl,-headerpad_max_install_names to all linker flags])
;;
cygwin*)
@@ -1358,7 +1343,7 @@ cygwin*)
# Shared libraries in cygwin/Win32 must never contain
# undefined symbols.
#
- LDFLAGS="$LDFLAGS -no-undefined"
+ WS_LDFLAGS="$WS_LDFLAGS -no-undefined"
AC_MSG_RESULT(CygWin GNU ld - added -no-undefined)
;;
*)
@@ -1443,12 +1428,12 @@ if test "x$ac_cv_enable_usr_local" = "xyes" ; then
# as various packages we use ("libpcap", "zlib", "adns")
# may have been installed under "/usr/local/include".
#
- CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+ WS_CPPFLAGS="$WS_CPPFLAGS -I/usr/local/include"
#
# Arrange that we search for libraries in "/usr/local/lib".
#
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, /usr/local/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, /usr/local/lib)
else
AC_MSG_RESULT(no)
fi
@@ -1536,8 +1521,8 @@ AC_MSG_CHECKING(if profile builds must be generated)
if test "x$enable_profile_build" = "xyes" ; then
if test "x$GCC" = "xyes" -o "x$CLANG" = "xyes" ; then
AC_MSG_RESULT(yes)
- CFLAGS=" -pg $CFLAGS"
- CXXFLAGS=" -pg $CXXFLAGS"
+ WS_CFLAGS="-pg $WS_CFLAGS"
+ WS_CXXFLAGS="-pg $WS_CXXFLAGS"
else
AC_MSG_RESULT(no)
echo "Building profile binaries currently only supported for GCC and clang."
@@ -1652,8 +1637,8 @@ if test "x$enable_wireshark" = "xyes"; then
#
AC_WIRESHARK_QT_CHECK($QT_MIN_VERSION, "$with_qt",
[
- CFLAGS="$CFLAGS $Qt_CFLAGS"
- CXXFLAGS="$CXXFLAGS $Qt_CFLAGS"
+ WS_CFLAGS="$WS_CFLAGS $Qt_CFLAGS"
+ WS_CXXFLAGS="$WS_CXXFLAGS $Qt_CFLAGS"
have_qt=yes
GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-qt"
@@ -1733,8 +1718,8 @@ if test "x$enable_wireshark" = "xyes"; then
#
AM_PATH_GTK_3_0(3.0.0,
[
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
+ WS_CFLAGS="$WS_CFLAGS $GTK_CFLAGS"
+ WS_CXXFLAGS="$WS_CXXFLAGS $GTK_CFLAGS"
have_gtk=yes
GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk3"
],
@@ -1746,8 +1731,8 @@ if test "x$enable_wireshark" = "xyes"; then
#
AM_PATH_GTK_2_0($GTK2_MIN_VERSION,
[
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
+ WS_CFLAGS="$WS_CFLAGS $GTK_CFLAGS"
+ WS_CXXFLAGS="$WS_CXXFLAGS $GTK_CFLAGS"
have_gtk=yes
GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk2"
],
@@ -1839,19 +1824,19 @@ fi
if test "$have_gtk" = "yes" ; then
# If we have GTK then add flags for it.
- CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
+ WS_CPPFLAGS="-DGDK_DISABLE_DEPRECATED $WS_CPPFLAGS"
if test \( $gtk_config_major_version -eq 3 -a $gtk_config_minor_version -ge 10 \) ; then
## Allow use of deprecated & disable deprecated warnings if Gtk >= 3.10;
## The deprecations in Gtk 3.10 will not be fixed ...
- CPPFLAGS="-DGDK_DISABLE_DEPRECATION_WARNINGS $CPPFLAGS"
+ WS_CPPFLAGS="-DGDK_DISABLE_DEPRECATION_WARNINGS $WS_CPPFLAGS"
else
- CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
+ WS_CPPFLAGS="-DGTK_DISABLE_DEPRECATED $WS_CPPFLAGS"
fi
- CPPFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
+ WS_CPPFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $WS_CPPFLAGS"
if test ! \( $gtk_config_major_version -eq 2 -a $gtk_config_minor_version -lt 20 \) ; then
# Enable GSEAL when building with GTK > 2.20
# (Versions prior to 2.22 lacked some necessary accessors.)
- CPPFLAGS="-DGSEAL_ENABLE $CPPFLAGS"
+ WS_CPPFLAGS="-DGSEAL_ENABLE $WS_CPPFLAGS"
fi
fi
@@ -1860,8 +1845,8 @@ if test "$use_glib_cflags" = "true"; then
# Use GLIB_CFLAGS
AM_PATH_GLIB_2_0($GLIB_MIN_VERSION,
[
- CFLAGS="$CFLAGS $GLIB_CFLAGS"
- CXXFLAGS="$CXXFLAGS $GLIB_CFLAGS"
+ WS_CFLAGS="$WS_CFLAGS $GLIB_CFLAGS"
+ WS_CXXFLAGS="$WS_CXXFLAGS $GLIB_CFLAGS"
], AC_MSG_ERROR(GLib $GLIB_MIN_VERSION or later distribution not found.), gthread gmodule)
else
# Don't use GLIB_CFLAGS
@@ -1878,10 +1863,10 @@ fi
# Error out if a glib header other than a "top level" header
# (glib.h, glib-object.h, gio.h) or certain other headers( e.g.,gmodule.h)
# is used.
-CPPFLAGS="-DG_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
+WS_CPPFLAGS="-DG_DISABLE_SINGLE_INCLUDES $WS_CPPFLAGS"
# Error out on the usage of deprecated glib functions
-CPPFLAGS="-DG_DISABLE_DEPRECATED $CPPFLAGS"
+WS_CPPFLAGS="-DG_DISABLE_DEPRECATED $WS_CPPFLAGS"
#
# Check whether GLib modules are supported, to determine whether we
@@ -1890,8 +1875,8 @@ CPPFLAGS="-DG_DISABLE_DEPRECATED $CPPFLAGS"
AC_MSG_CHECKING(whether GLib supports loadable modules)
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
-CFLAGS="$CFLAGS $GLIB_CFLAGS"
-LIBS="$GLIB_LIBS $LIBS"
+CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS"
+LIBS="$LIBS $GLIB_LIBS"
AC_TRY_RUN([
#include <glib.h>
#include <gmodule.h>
@@ -1934,8 +1919,8 @@ then
#
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GLIB_CFLAGS"
- LIBS="$GLIB_LIBS $LIBS"
+ CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS"
+ LIBS="$LIBS $GLIB_LIBS"
AC_CHECK_FUNCS(dladdr)
if test x$ac_cv_func_dladdr = xno
then
@@ -1961,8 +1946,8 @@ fi
AC_MSG_CHECKING(whether GLib supports POSIX/XSI thousands grouping)
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
-CFLAGS="$CFLAGS $GLIB_CFLAGS"
-LIBS="$GLIB_LIBS $LIBS"
+CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS"
+LIBS="$LIBS $GLIB_LIBS"
AC_TRY_RUN([
#include <glib.h>
#include <locale.h>
@@ -2611,7 +2596,7 @@ elif test "x$withval" = "xyes"; then
want_libcap=yes
elif test -d "$withval"; then
want_libcap=yes
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
])
if test "x$with_libcap" = "xno" ; then
@@ -2667,7 +2652,7 @@ elif test "x$withval" = "xyes"; then
want_ssl=yes
elif test -d "$withval"; then
want_ssl=yes
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
],[
want_ssl=no
@@ -2732,7 +2717,7 @@ elif test "x$withval" = "xyes"; then
want_c_ares=yes
elif test -d "$withval"; then
want_c_ares=yes
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
])
if test "x$want_c_ares" = "xno" ; then
@@ -2757,7 +2742,7 @@ elif test "x$withval" = "xyes"; then
want_adns=yes
elif test -d "$withval"; then
want_adns=yes
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
])
if test "x$want_adns" = "xno" -o "x$have_good_c_ares" = "xyes" ; then
@@ -2807,7 +2792,7 @@ elif test "x$withval" = "xyes"; then
want_geoip=yes
elif test -d "$withval"; then
want_geoip=yes
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
])
if test "x$want_geoip" = "xno"; then
@@ -2832,7 +2817,7 @@ elif test "x$withval" = "xyes"; then
want_libssh=yes
elif test -d "$withval"; then
want_libssh=yes
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+ AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
])
if test "x$want_libssh" = "xno"; then
@@ -3039,7 +3024,7 @@ then
AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
fi
AC_SUBST(plugindir)
-CPPFLAGS="$CPPFLAGS '-DPLUGIN_INSTALL_DIR=\"\$(plugindir)\"'"
+WS_CPPFLAGS="$WS_CPPFLAGS '-DPLUGIN_INSTALL_DIR=\"\$(plugindir)\"'"
#
# The plugin dissectors reside in ./plugins/PROTO/
@@ -3135,6 +3120,11 @@ else
fi
AC_SUBST(RPMBUILD_WITH_ARGS)
+AC_SUBST(WS_CPPFLAGS)
+AC_SUBST(WS_CFLAGS)
+AC_SUBST(WS_CXXFLAGS)
+AC_SUBST(WS_LDFLAGS)
+
dnl Save the cacheable configure results to config.cache before recursing
AC_CACHE_SAVE
diff --git a/echld/Makefile.am b/echld/Makefile.am
index 1bf4a3a544..f92173e58d 100644
--- a/echld/Makefile.am
+++ b/echld/Makefile.am
@@ -18,36 +18,25 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-include ../Makefile.am.inc
+include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
ACLOCAL_AMFLAGS = `../aclocal-flags`
-include Makefile.common
+AM_CPPFLAGS += -I$(top_srcdir)/wiretap -DWS_BUILD_DLL
# Optional objects that I know how to build. These will be
# linked into libechld.
echld_optional_objects = $(LIBECHLD_SRC)
-
lib_LTLIBRARIES = libechld.la
libechld_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
-
-
-AM_CFLAGS =-DWS_BUILD_DLL
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS += -Werror
-endif
-
-AM_CPPFLAGS = -I$(srcdir)/.. -I$(srcdir)/../wiretap
-
libechld_la_SOURCES = \
$(LIBECHLD_SRC) \
$(LIBECHLD_INCLUDES)
-
libechld_la_DEPENDENCIES = \
../caputils/libcaputils.a \
../epan/libwireshark.la \
diff --git a/epan/Makefile.am b/epan/Makefile.am
index 0749d60a99..302d650f46 100644
--- a/epan/Makefile.am
+++ b/epan/Makefile.am
@@ -21,7 +21,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-include ../Makefile.am.inc
+include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
if HAVE_LIBLUA
wslua_lib = wslua/libwslua.la
@@ -39,23 +40,14 @@ DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir)
ACLOCAL_AMFLAGS = `../aclocal-flags`
+AM_CPPFLAGS += -I$(builddir)/wslua $(LUA_CFLAGS) $(LIBGNUTLS_CFLAGS) \
+ $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(LIBGEOIP_CFLAGS) $(KRB5_CFLAGS)
+
noinst_LTLIBRARIES = libwireshark_generated.la libwireshark_asmopt.la
lib_LTLIBRARIES = libwireshark.la
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
libwireshark_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
-include Makefile.common
-
-AM_CPPFLAGS = -I$(srcdir)/.. -I$(srcdir)/$(LEMON) -I$(builddir)/wslua \
- @LUA_CFLAGS@ $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) \
- $(LIBSMI_CFLAGS) $(LIBGEOIP_CFLAGS) $(PY_CFLAGS)
-
-AM_NON_GENERATED_CFLAGS =-DWS_BUILD_DLL
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_NON_GENERATED_CFLAGS += -Werror
-endif
-
#Since code generated by lex may trigger gcc warnings, we are now generating two
#libraries. A single library is generated with the lex code without the barrier
#"stop on warning". An other library is generated from the remaining source
@@ -63,11 +55,12 @@ endif
libwireshark_la_SOURCES = \
$(LIBWIRESHARK_SRC) \
$(LIBWIRESHARK_INCLUDES)
-libwireshark_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
+libwireshark_la_CPPFLAGS = $(AM_CPPFLAGS) -DWS_BUILD_DLL
libwireshark_generated_la_SOURCES = \
$(LIBWIRESHARK_GENERATED_C_FILES) \
$(LIBWIRESHARK_GENERATED_HEADER_FILES)
+libwireshark_generated_la_CFLAGS = $(GENERATED_CFLAGS)
nodist_libwireshark_generated_la_SOURCES = \
$(NODIST_LIBWIRESHARK_GENERATED_C_FILES) \
@@ -119,6 +112,9 @@ MAINTAINERCLEANFILES = \
$(LIBWIRESHARK_GENERATED_HEADER_FILES) \
Makefile.in
+BUILT_SOURCES = \
+ dtd_grammar.h
+
#
# Add the object files for missing routines, if any.
#
@@ -165,25 +161,19 @@ exntest: exntest.o except.o
test-programs: $(EXTRA_PROGRAMS) exntest
cd wmem && $(MAKE) $@
-RUNLEX=$(top_srcdir)/tools/runlex.sh
-
diam_dict_lex.h: diam_dict.c
dtd_parse_lex.h: dtd_parse.c
-dtd_parse.lo: dtd_grammar.h
-
dtd_preparse_lex.h: dtd_preparse.c
radius_dict_lex.h: radius_dict.c
uat_load_lex.h: uat_load.c
-LEMON=../tools/lemon
-
dtd_grammar.h: dtd_grammar.c
-dtd_grammar.c : $(LEMON)/lemon$(EXEEXT) $(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
- $(AM_V_LEMON)$(LEMON)/lemon$(EXEEXT) T=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/dtd_grammar.lemon
+dtd_grammar.c : $(LEMON) $(lemon_srcdir)/lempar.c $(srcdir)/dtd_grammar.lemon
+ $(AM_V_LEMON)$(LEMON) T=$(lemon_srcdir)/lempar.c $(srcdir)/dtd_grammar.lemon
tvbtest.o exntest.o oids_test.o: exceptions.h
diff --git a/epan/compress/Makefile.am b/epan/compress/Makefile.am
index 7ccf292a00..967334e826 100644
--- a/epan/compress/Makefile.am
+++ b/epan/compress/Makefile.am
@@ -20,13 +20,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
-
-AM_CPPFLAGS = \
- -I$(top_srcdir)
+include $(top_srcdir)/Makefile.am.inc
noinst_LTLIBRARIES = liblzxpress.la
diff --git a/epan/crypt/Makefile.am b/epan/crypt/Makefile.am
index 7c781114b3..ad0bad3803 100644
--- a/epan/crypt/Makefile.am
+++ b/epan/crypt/Makefile.am
@@ -20,13 +20,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
-
-AM_CPPFLAGS = \
- -I$(top_srcdir)
+include $(top_srcdir)/Makefile.am.inc
noinst_LTLIBRARIES = libairpdcap.la
diff --git a/epan/dfilter/Makefile.am b/epan/dfilter/Makefile.am
index 7db0fa2b46..9d54e2f973 100644
--- a/epan/dfilter/Makefile.am
+++ b/epan/dfilter/Makefile.am
@@ -19,13 +19,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-include ../../Makefile.am.inc
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_NON_GENERATED_CFLAGS = -Werror
-endif
-
include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
+
+AM_CPPFLAGS += -I$(top_srcdir)/epan -I$(lemon_srcdir)
noinst_LTLIBRARIES = libdfilter_generated.la libdfilter.la
@@ -45,18 +42,19 @@ MAINTAINERCLEANFILES = \
$(NODIST_GENERATED_FILES) \
Makefile.in
-AM_CPPFLAGS = -I$(srcdir)/../.. -I$(srcdir)/.. -I$(srcdir)/$(LEMON)
+BUILT_SOURCES = \
+ grammar.h
#Since code generated by lex may trigger gcc warnings, we are now generating two
#libraries. A single library is generated with the lex code without the barrier
#"stop on warning". An other library is generated from the remaining source
#files with the "stop on warning" barrier.
libdfilter_la_SOURCES = $(NONGENERATED_C_FILES) $(NONGENERATED_HEADER_FILES)
-libdfilter_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
libdfilter_generated_la_SOURCES = \
$(GENERATED_C_FILES) \
$(GENERATED_HEADER_FILES)
+libdfilter_generated_la_CFLAGS = $(GENERATED_CFLAGS)
nodist_libdfilter_generated_la_SOURCES = \
$(NODIST_GENERATED_C_FILES) \
@@ -70,16 +68,11 @@ EXTRA_DIST = \
Makefile.common \
Makefile.nmake
-RUNLEX=$(top_srcdir)/tools/runlex.sh
-
scanner_lex.h : scanner.c
-scanner.lo: grammar.h
-
-LEMON=../../tools/lemon
grammar.h : grammar.c
-grammar.c : $(LEMON)/lemon$(EXEEXT) $(srcdir)/$(LEMON)/lempar.c $(srcdir)/grammar.lemon
- $(AM_V_LEMON)$(LEMON)/lemon$(EXEEXT) T=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/grammar.lemon || \
+grammar.c : $(LEMON) $(lemon_srcdir)/lempar.c $(srcdir)/grammar.lemon
+ $(AM_V_LEMON)$(LEMON) T=$(lemon_srcdir)/lempar.c $(srcdir)/grammar.lemon || \
(rm -f grammar.c grammar.h ; false)
checkapi:
diff --git a/epan/dissectors/Makefile.am b/epan/dissectors/Makefile.am
index ceee8e7583..3191391608 100644
--- a/epan/dissectors/Makefile.am
+++ b/epan/dissectors/Makefile.am
@@ -18,20 +18,17 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-noinst_LTLIBRARIES = libdirtydissectors.la libfiledissectors.la libdissectors.la
+include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
-AM_CPPFLAGS = -I$(srcdir)/../.. -I$(srcdir)/.. \
- $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS)
+AM_CPPFLAGS += -I$(top_srcdir)/epan $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS)
-include Makefile.common
+noinst_LTLIBRARIES = libdirtydissectors.la libfiledissectors.la libdissectors.la
libdirtydissectors_la_SOURCES = \
$(DIRTY_ASN1_DISSECTOR_SRC) \
$(DIRTY_CORBA_IDL_DISSECTOR_SRC)
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CLEAN_CFLAGS = -Werror
-endif
+libdirtydissectors_la_CFLAGS = $(GENERATED_CFLAGS)
libfiledissectors_la_SOURCES = \
$(FILE_DISSECTOR_SRC)
@@ -42,7 +39,6 @@ libdissectors_la_SOURCES = \
$(CORBA_IDL_DISSECTOR_SRC) \
$(PIDL_DISSECTOR_SRC) \
$(DISSECTOR_SUPPORT_SRC)
-libdissectors_la_CFLAGS = $(AM_CLEAN_CFLAGS)
# include pidl in the source tarball. But nothing to build...
DIST_SUBDIRS = pidl dcerpc
diff --git a/epan/dissectors/dcerpc/Makefile.am b/epan/dissectors/dcerpc/Makefile.am
index 33ffe04dc1..2333c4bb09 100644
--- a/epan/dissectors/dcerpc/Makefile.am
+++ b/epan/dissectors/dcerpc/Makefile.am
@@ -18,6 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+include $(top_srcdir)/Makefile.am.inc
EXTRA_DIST = \
CMakeLists.txt \
diff --git a/epan/ftypes/Makefile.am b/epan/ftypes/Makefile.am
index e0d5df40ed..1246769e9f 100644
--- a/epan/ftypes/Makefile.am
+++ b/epan/ftypes/Makefile.am
@@ -18,11 +18,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
-
include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
+
+AM_CPPFLAGS += -I$(top_srcdir)/epan
noinst_LTLIBRARIES = libftypes.la
@@ -34,8 +33,6 @@ CLEANFILES = \
MAINTAINERCLEANFILES = \
Makefile.in
-AM_CPPFLAGS = -I$(srcdir)/../.. -I$(srcdir)/..
-
libftypes_la_SOURCES = $(NONGENERATED_C_FILES) $(NONGENERATED_HEADER_FILES)
libftypes_la_LIBADD = @GLIB_LIBS@
diff --git a/epan/nghttp2/Makefile.am b/epan/nghttp2/Makefile.am
index 8256a3dca4..54d964b7b0 100644
--- a/epan/nghttp2/Makefile.am
+++ b/epan/nghttp2/Makefile.am
@@ -19,15 +19,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
-
include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
-AM_CPPFLAGS = \
- -I$(top_srcdir) \
- $(LIBNGHTTP2_CFLAGS)
+AM_CPPFLAGS += $(LIBNGHTTP2_CFLAGS)
noinst_LTLIBRARIES = libnghttp2.la
diff --git a/epan/wmem/Makefile.am b/epan/wmem/Makefile.am
index 8fd4960e79..0b46b6a5e0 100644
--- a/epan/wmem/Makefile.am
+++ b/epan/wmem/Makefile.am
@@ -19,15 +19,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
-
include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
-AM_CPPFLAGS = \
- -I$(top_srcdir) \
- $(LIBWMEM_CFLAGS)
+AM_CPPFLAGS += $(LIBWMEM_CFLAGS)
noinst_LTLIBRARIES = libwmem.la
diff --git a/epan/wslua/Makefile.am b/epan/wslua/Makefile.am
index fcc15450d2..feb099890f 100644
--- a/epan/wslua/Makefile.am
+++ b/epan/wslua/Makefile.am
@@ -19,11 +19,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
-AM_CPPFLAGS = -I$(top_srcdir) @LUA_CFLAGS@
+AM_CPPFLAGS += $(LUA_CFLAGS)
noinst_LTLIBRARIES = libwslua.la
diff --git a/plugins/docsis/Makefile.am b/plugins/docsis/Makefile.am
index 65a08ffd88..b40f3c227f 100644
--- a/plugins/docsis/Makefile.am
+++ b/plugins/docsis/Makefile.am
@@ -20,15 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir)
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/ethercat/Makefile.am b/plugins/ethercat/Makefile.am
index efdfdec5d1..ed61c3b575 100644
--- a/plugins/ethercat/Makefile.am
+++ b/plugins/ethercat/Makefile.am
@@ -20,15 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir)
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/gryphon/Makefile.am b/plugins/gryphon/Makefile.am
index 68e4c2ee42..e77d4728b0 100644
--- a/plugins/gryphon/Makefile.am
+++ b/plugins/gryphon/Makefile.am
@@ -22,15 +22,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir)
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/irda/Makefile.am b/plugins/irda/Makefile.am
index d2fc0e4fb4..7fa3b57dcc 100644
--- a/plugins/irda/Makefile.am
+++ b/plugins/irda/Makefile.am
@@ -20,15 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir)
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/m2m/Makefile.am b/plugins/m2m/Makefile.am
index a47f92663a..4d04434431 100644
--- a/plugins/m2m/Makefile.am
+++ b/plugins/m2m/Makefile.am
@@ -20,15 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir) -I../wimax
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/mate/Makefile.am b/plugins/mate/Makefile.am
index dfbc07dbff..5062a823c8 100644
--- a/plugins/mate/Makefile.am
+++ b/plugins/mate/Makefile.am
@@ -20,17 +20,16 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
+include Makefile.common
include $(top_srcdir)/Makefile.am.inc
-AM_CPPFLAGS = -I$(top_srcdir)
-
-include Makefile.common
+#AM_CFLAGS = $(GENERATED_FILES)
#
# XXX - how to make this apply only to clean files?
#
#if HAVE_WARNINGS_AS_ERRORS
-#AM_CFLAGS = -Werror
+#AM_CFLAGS += -Werror
#endif
plugindir = @plugindir@
@@ -143,17 +142,13 @@ EXTRA_DIST = \
matelib/rtsp.mate \
matelib/sip.mate
-RUNLEX = $(top_srcdir)/tools/runlex.sh
-
-LEMON = $(top_builddir)/tools/lemon
-
mate_parser_lex.h : mate_parser.c
mate_parser.lo : mate_grammar.h
mate_grammar.h : mate_grammar.c
-mate_grammar.c : mate_grammar.lemon mate.h mate_util.h $(LEMON)/lemon$(EXEEXT)
- $(AM_V_LEMON)$(LEMON)/lemon$(EXEEXT) T=$(srcdir)/$(LEMON)/lempar.c $(srcdir)/mate_grammar.lemon || \
+mate_grammar.c : mate_grammar.lemon mate.h mate_util.h $(LEMON)
+ $(AM_V_LEMON)$(LEMON) T=$(lemon_srcdir)/lempar.c $(srcdir)/mate_grammar.lemon || \
(rm -f grammar.c grammar.h ; false)
checkapi:
diff --git a/plugins/opcua/Makefile.am b/plugins/opcua/Makefile.am
index d8c0f85c57..5b0770a6e2 100644
--- a/plugins/opcua/Makefile.am
+++ b/plugins/opcua/Makefile.am
@@ -21,15 +21,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir)
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/profinet/Makefile.am b/plugins/profinet/Makefile.am
index 96e7184fea..5df2178f14 100644
--- a/plugins/profinet/Makefile.am
+++ b/plugins/profinet/Makefile.am
@@ -20,15 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir)
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/stats_tree/Makefile.am b/plugins/stats_tree/Makefile.am
index b637e5b3bb..02b2b6815a 100644
--- a/plugins/stats_tree/Makefile.am
+++ b/plugins/stats_tree/Makefile.am
@@ -20,15 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir)
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/tpg/Makefile.am b/plugins/tpg/Makefile.am
index d29b31660b..ae7d302b2f 100644
--- a/plugins/tpg/Makefile.am
+++ b/plugins/tpg/Makefile.am
@@ -20,11 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
-
-AM_CPPFLAGS = -I$(top_srcdir)
+include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/unistim/Makefile.am b/plugins/unistim/Makefile.am
index 5eacf9d773..7ace5332d5 100644
--- a/plugins/unistim/Makefile.am
+++ b/plugins/unistim/Makefile.am
@@ -21,15 +21,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir)
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/wimax/Makefile.am b/plugins/wimax/Makefile.am
index 025a04c3e5..a5a799c2a9 100644
--- a/plugins/wimax/Makefile.am
+++ b/plugins/wimax/Makefile.am
@@ -20,15 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir)
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/plugins/wimaxasncp/Makefile.am b/plugins/wimaxasncp/Makefile.am
index 15c6bc3d99..83c89d5046 100644
--- a/plugins/wimaxasncp/Makefile.am
+++ b/plugins/wimaxasncp/Makefile.am
@@ -20,17 +20,16 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
+include Makefile.common
include $(top_srcdir)/Makefile.am.inc
-AM_CPPFLAGS = -I$(top_srcdir)
-
-include Makefile.common
+#AM_CFLAGS = $(GENERATED_CFLAGS)
#
# XXX - how to make this apply only to clean files?
#
#if HAVE_WARNINGS_AS_ERRORS
-#AM_CFLAGS = -Werror
+#AM_CFLAGS += -Werror
#endif
plugindir = @plugindir@
@@ -120,8 +119,6 @@ EXTRA_DIST = \
wimaxasncp_dict.l \
CMakeLists.txt
-RUNLEX = $(top_srcdir)/tools/runlex.sh
-
wimaxasncp_dict_lex.h: wimaxasncp_dict.c
wimaxasncp_dict.c: wimaxasncp_dict.h
diff --git a/plugins/wimaxmacphy/Makefile.am b/plugins/wimaxmacphy/Makefile.am
index aeb3443a2a..0bb38d7223 100644
--- a/plugins/wimaxmacphy/Makefile.am
+++ b/plugins/wimaxmacphy/Makefile.am
@@ -20,15 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-include $(top_srcdir)/Makefile.am.inc
-
-AM_CPPFLAGS = -I$(top_srcdir)
-
include Makefile.common
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS = -Werror
-endif
+include $(top_srcdir)/Makefile.am.inc
plugindir = @plugindir@
diff --git a/ui/Makefile.am b/ui/Makefile.am
index 3c33aee04c..80904eb5a2 100644
--- a/ui/Makefile.am
+++ b/ui/Makefile.am
@@ -21,11 +21,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include Makefile.common
-include ../Makefile.am.inc
+include $(top_srcdir)/Makefile.am.inc
-if HAVE_WARNINGS_AS_ERRORS
-AM_CLEAN_CFLAGS = -Werror
-endif
+AM_CPPFLAGS += -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) \
+ $(LIBGNUTLS_CFLAGS) $(PORTAUDIO_INCLUDES)
noinst_LIBRARIES = libui.a libui_dirty.a
@@ -39,8 +38,6 @@ MAINTAINERCLEANFILES = \
$(GENERATED_FILES) \
Makefile.in
-RUNLEX=$(top_srcdir)/tools/runlex.sh
-
text_import_scanner_lex.h: text_import_scanner.c
# All sources that should be put in the source distribution tarball
@@ -50,18 +47,14 @@ libui_a_SOURCES = \
$(GENERATED_HEADER_FILES) \
$(GENERATED_C_FILES)
-libui_a_CFLAGS = $(AM_CLEAN_CFLAGS)
-
libui_a_DEPENDENCIES =
libui_dirty_a_SOURCES = \
$(DIRTY_GENERATED_C_FILES)
-libui_dirty_a_DEPENDENCIES =
-
-# Common headers
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) $(LIBGNUTLS_CFLAGS) $(PORTAUDIO_INCLUDES)
+libui_dirty_a_CFLAGS = $(GENERATED_CFLAGS)
+libui_dirty_a_DEPENDENCIES =
doxygen:
if HAVE_DOXYGEN
diff --git a/ui/cli/Makefile.am b/ui/cli/Makefile.am
index 185304a09e..0ad3b8e757 100644
--- a/ui/cli/Makefile.am
+++ b/ui/cli/Makefile.am
@@ -20,11 +20,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include Makefile.common
-include ../../Makefile.am.inc
+include $(top_srcdir)/Makefile.am.inc
-if HAVE_WARNINGS_AS_ERRORS
-AM_CLEAN_CFLAGS = -Werror
-endif
+AM_CPPFLAGS += -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) \
+ $(LIBGNUTLS_CFLAGS) $(PORTAUDIO_INCLUDES)
noinst_LIBRARIES = libcliui.a
@@ -63,14 +62,8 @@ libcliui_a_SOURCES = \
$(GENERATED_HEADER_FILES) \
$(GENERATED_C_FILES)
-libcliui_a_CFLAGS = $(AM_CLEAN_CFLAGS)
-
libcliui_a_DEPENDENCIES =
-# Common headers
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) $(LIBGNUTLS_CFLAGS) $(PORTAUDIO_INCLUDES)
-
-
doxygen:
if HAVE_DOXYGEN
$(DOXYGEN) doxygen.cfg
diff --git a/ui/gtk/Makefile.am b/ui/gtk/Makefile.am
index ba8e5b0d33..4a2b8121b2 100644
--- a/ui/gtk/Makefile.am
+++ b/ui/gtk/Makefile.am
@@ -20,13 +20,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include Makefile.common
-include ../../Makefile.am.inc
+include $(top_srcdir)/Makefile.am.inc
-if HAVE_WARNINGS_AS_ERRORS
-AM_CLEAN_CFLAGS = -Werror -Wno-error=deprecated-declarations
-endif
-
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap $(PORTAUDIO_INCLUDES)
+AM_CPPFLAGS += -I$(top_srcdir)/wiretap $(PORTAUDIO_INCLUDES)
CLEANFILES = \
libgtkui.a \
@@ -61,7 +57,10 @@ EXTRA_DIST = \
pixbuf-csource.c \
pixbuf-csource.h
+BUILT_SOURCES =
+
if HAVE_GRESOURCE
+BUILT_SOURCES += wireshark-gresources.h
GENERATED_HEADER_FILES += wireshark-gresources.h
GENERATED_C_FILES += wireshark-gresources.c
else
@@ -75,14 +74,8 @@ libgtkui_a_SOURCES = \
$(noinst_HEADERS) \
$(GENERATED_HEADER_FILES)
-libgtkui_a_CFLAGS = $(AM_CLEAN_CFLAGS)
-
libgtkui_a_DEPENDENCIES =
-if HAVE_GRESOURCE
-main.c: wireshark-gresources.h
-endif
-
#
# Build "wireshark-tap-register.c", which contains a function
# "register_all_tap_listeners()"
diff --git a/ui/qt/Makefile.am b/ui/qt/Makefile.am
index 237f7f5bbd..6bc28b3fd9 100644
--- a/ui/qt/Makefile.am
+++ b/ui/qt/Makefile.am
@@ -20,11 +20,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
include Makefile.common
-include ../../Makefile.am.inc
+include $(top_srcdir)/Makefile.am.inc
-if HAVE_WARNINGS_AS_ERRORS
-AM_CLEAN_CFLAGS = -Werror
-endif
+AM_CPPFLAGS += -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) $(LIBGNUTLS_CFLAGS)
noinst_LIBRARIES = libqtui.a
@@ -63,8 +61,6 @@ wireshark-tap-register.c: $(WIRESHARK_QT_TAP_SRC) $(top_srcdir)/tools/make-tap-r
@echo Making wireshark-tap-register.c
@$(PYTHON) $(top_srcdir)/tools/make-tap-reg.py $(srcdir) taps $(WIRESHARK_QT_TAP_SRC)
-RUNLEX=$(top_srcdir)/tools/runlex.sh
-
libqtui_a_SOURCES = \
$(WIRESHARK_QT_SRC) \
$(WIRESHARK_QT_TAP_SRC) \
@@ -78,16 +74,8 @@ nodist_libqtui_a_SOURCES = \
$(NODIST_GENERATED_CPP_FILES) \
$(NODIST_GENERATED_HEADER_FILES)
-libqtui_a_CFLAGS = $(AM_CLEAN_CFLAGS)
-
libqtui_a_DEPENDENCIES =
-# Common headers
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) \
- $(LIBGNUTLS_CFLAGS)
-
-AM_CXXFLAGS = $(AM_CLEAN_CFLAGS)
-
AM_V_MOC = $(am__v_MOC_@AM_V@)
am__v_MOC_ = $(am__v_MOC_@AM_DEFAULT_V@)
am__v_MOC_0 = @echo " MOC " $@;
diff --git a/wiretap/Makefile.am b/wiretap/Makefile.am
index 51af38caa3..05d60eca60 100644
--- a/wiretap/Makefile.am
+++ b/wiretap/Makefile.am
@@ -19,25 +19,18 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-include ../Makefile.am.inc
+include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
ACLOCAL_AMFLAGS = `../aclocal-flags`
-include Makefile.common
+AM_CPPFLAGS += -DWS_BUILD_DLL
noinst_LTLIBRARIES = libwiretap_generated.la
lib_LTLIBRARIES = libwiretap.la
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
libwiretap_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
-AM_NON_GENERATED_CFLAGS =-DWS_BUILD_DLL
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_NON_GENERATED_CFLAGS += -Werror
-endif
-
-AM_CPPFLAGS = -I$(srcdir)/..
-
CLEANFILES = \
libwiretap.a \
libwiretap.la \
@@ -56,10 +49,10 @@ MAINTAINERCLEANFILES = \
libwiretap_la_SOURCES = \
$(NONGENERATED_C_FILES) \
$(NONGENERATED_HEADER_FILES)
-libwiretap_la_CFLAGS = $(AM_NON_GENERATED_CFLAGS)
libwiretap_generated_la_SOURCES = \
$(GENERATED_C_FILES)
+libwiretap_generated_la_CFLAGS = $(GENERATED_CFLAGS)
EXTRA_DIST = \
README.airmagnet \
@@ -72,8 +65,6 @@ EXTRA_DIST = \
libwiretap_la_LIBADD = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la $(GLIB_LIBS)
libwiretap_la_DEPENDENCIES = libwiretap_generated.la ${top_builddir}/wsutil/libwsutil.la
-RUNLEX = $(top_srcdir)/tools/runlex.sh
-
k12text_lex.h : k12text.c
ascend_scanner_lex.h : ascend_scanner.c
diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am
index f8c3f2bfb2..23c171d104 100644
--- a/wsutil/Makefile.am
+++ b/wsutil/Makefile.am
@@ -18,8 +18,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+include Makefile.common
+include $(top_srcdir)/Makefile.am.inc
+
ACLOCAL_AMFLAGS = `../aclocal-flags`
+AM_CPPFLAGS += $(LIBGCRYPT_CFLAGS) -DWS_BUILD_DLL
+
# Optional headers for ABI checking
wsutil_optional_abi_includes =
@@ -47,26 +52,12 @@ if SSE42_SUPPORTED
wsutil_optional_objects += libwsutil_sse42.la
endif
-include ../Makefile.am.inc
-
-include Makefile.common
-
-AM_CFLAGS =-DWS_BUILD_DLL
-
-if HAVE_WARNINGS_AS_ERRORS
-AM_CFLAGS += -Werror
-endif
-
noinst_LTLIBRARIES = libwsutil_sse42.la
lib_LTLIBRARIES = libwsutil.la
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
libwsutil_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@
-AM_CPPFLAGS = -I$(srcdir)/.. \
- $(LIBGCRYPT_CFLAGS) \
- -DTOP_SRCDIR=\"$(abs_top_srcdir)\"
-
LIBWSUTIL_SRC = $(LIBWSUTIL_COMMON_SRC)
LIBWSUTIL_INCLUDES = $(LIBWSUTIL_COMMON_INCLUDES)
@@ -82,7 +73,7 @@ libwsutil_la_SOURCES = \
libwsutil_sse42_la_SOURCES = \
ws_mempbrk_sse42.c
-libwsutil_sse42_la_CFLAGS = $(AM_CFLAGS) @CFLAGS_SSE42@
+libwsutil_sse42_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_SSE42)
EXTRA_libwsutil_la_SOURCES = \
floorl.c \