aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-09-03 00:42:00 +0100
committerJoão Valverde <j@v6e.pt>2017-09-15 10:11:55 +0000
commite7ef19efc0e928b50644b37772ccbf176e74f766 (patch)
tree1d6a4bb5163e5b094d5c5879d96b961113258315
parentc52a702ae81b1ae7311a8b58e625f86fb211e7c5 (diff)
autotools: Initial work to install headers for the benefit of plugins
Install public headers required to build plugins for libwireshark (taps and dissectors). The source tree is organized to serve the CLI/GUI parts of wireshark. Plugins are built in tree. This change is intende to allow plugins to be built out-of-tree but we want to avoid dumping all headers into /usr/include. To be continued incrementally to fix errors and omissions. Change-Id: Iaa0def0ba3de4b456a29114c315544d2d64fa748 Reviewed-on: https://code.wireshark.org/review/23374 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.am53
-rw-r--r--docbook/release-notes.asciidoc6
-rw-r--r--epan/Makefile.am14
-rw-r--r--epan/dfilter/Makefile.am15
-rw-r--r--epan/dissectors/Makefile.am6
-rw-r--r--epan/ftypes/Makefile.am6
-rw-r--r--epan/wmem/Makefile.am32
-rw-r--r--wsutil/Makefile.am6
8 files changed, 82 insertions, 56 deletions
diff --git a/Makefile.am b/Makefile.am
index 5c1ebd5fef..b7db8736ef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -393,30 +393,15 @@ GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
EXTCAP_COMMON_SRC = \
extcap.c \
- extcap_parser.c \
+ extcap_parser.c \
extcap_spawn.c
-EXTCAP_COMMON_INCLUDES = \
- extcap.h \
- extcap_parser.h \
- extcap_spawn.h
-
# sources common for wireshark, tshark, and rawshark
SHARK_COMMON_SRC = \
cfile.c \
frame_tvbuff.c \
sync_pipe_write.c
-# corresponding headers
-SHARK_COMMON_INCLUDES = \
- cfile.h \
- file.h \
- fileset.h \
- frame_tvbuff.h \
- register.h \
- ws_symbol_export.h \
- ws_attributes.h
-
# wireshark specifics
WIRESHARK_COMMON_SRC = \
$(SHARK_COMMON_SRC) \
@@ -427,15 +412,6 @@ WIRESHARK_COMMON_SRC = \
summary.c \
ws_version_info.c
-# corresponding headers
-WIRESHARK_COMMON_INCLUDES = \
- capture_info.h \
- capture_opts.h \
- globals.h \
- log.h \
- summary.h \
- sync_pipe.h
-
if HAVE_EXTCAP
SHARK_COMMON_SRC += $(EXTCAP_COMMON_SRC)
endif
@@ -761,15 +737,30 @@ dumpcap_LDADD = \
@LIBCAP_LIBS@ \
@LIBNL_LIBS@
+pkginclude_HEADERS = \
+ cfile.h \
+ file.h \
+ register.h \
+ globals.h \
+ log.h \
+ ws_symbol_export.h \
+ ws_attributes.h \
+ ws_diag_control.h
+
# this target needed for distribution only
noinst_HEADERS = \
- $(SHARK_COMMON_INCLUDES) \
- $(EXTCAP_COMMON_INCLUDES) \
- $(WIRESHARK_COMMON_INCLUDES) \
+ capture_info.h \
+ capture_opts.h \
capture_stop_conditions.h \
- conditions.h \
- ringbuffer.h \
- ws_diag_control.h \
+ conditions.h \
+ fileset.h \
+ frame_tvbuff.h \
+ ringbuffer.h \
+ summary.h \
+ sync_pipe.h \
+ extcap.h \
+ extcap_parser.h \
+ extcap_spawn.h \
ws_version_info.h
#
diff --git a/docbook/release-notes.asciidoc b/docbook/release-notes.asciidoc
index ebcd2f4626..42918dbee9 100644
--- a/docbook/release-notes.asciidoc
+++ b/docbook/release-notes.asciidoc
@@ -13,6 +13,12 @@ used for troubleshooting, analysis, development and education.
== What's New
+ * It's now possible to build plugins out-of-tree on Unix-like systems using
+ autotools (i.e. building Wireshark with autotools will install the necessary
+ dependencies). A pkg-config file is provided to help with this. Only epan plugins
+ supported for now, other types will be added in the future. Note you must still
+ rebuild all plugins between minor releases (X.Y).
+
//=== Bug Fixes
//The following bugs have been fixed:
diff --git a/epan/Makefile.am b/epan/Makefile.am
index 575e922b67..b1c4afb693 100644
--- a/epan/Makefile.am
+++ b/epan/Makefile.am
@@ -170,7 +170,7 @@ LIBWIRESHARK_ALL_SRC = \
$(LIBWIRESHARK_SRC) \
$(LIBWIRESHARK_GENERATED_SRC)
-LIBWIRESHARK_INCLUDES = \
+LIBWIRESHARK_INCLUDES_PUBLIC = \
addr_and_mask.h \
addr_resolv.h \
address.h \
@@ -210,7 +210,6 @@ LIBWIRESHARK_INCLUDES = \
dwarf.h \
eap.h \
eapol_keydes_types.h \
- epan-int.h \
epan.h \
epan_dissect.h \
etypes.h \
@@ -282,7 +281,6 @@ LIBWIRESHARK_INCLUDES = \
tfs.h \
time_fmt.h \
to_str.h \
- to_str-int.h \
tvbparse.h \
tvbuff.h \
tvbuff-int.h \
@@ -293,13 +291,21 @@ LIBWIRESHARK_INCLUDES = \
x264_prt_id.h \
xdlc.h
+LIBWIRESHARK_INCLUDES_PRIVATE = \
+ epan-int.h \
+ to_str-int.h
+
+subpkgincludedir = $(pkgincludedir)/epan
+
+subpkginclude_HEADERS = $(LIBWIRESHARK_INCLUDES_PUBLIC)
+
#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.
libwireshark_la_SOURCES = \
$(LIBWIRESHARK_SRC) \
- $(LIBWIRESHARK_INCLUDES) \
+ $(LIBWIRESHARK_INCLUDES_PRIVATE) \
ws_version_info.c
libwireshark_la_CPPFLAGS = $(AM_CPPFLAGS) -DWS_BUILD_DLL
diff --git a/epan/dfilter/Makefile.am b/epan/dfilter/Makefile.am
index d74af56551..5c82ac4858 100644
--- a/epan/dfilter/Makefile.am
+++ b/epan/dfilter/Makefile.am
@@ -49,13 +49,11 @@ NONGENERATED_C_FILES = \
syntax-tree.c
# Header files that are not generated from other files
-NONGENERATED_HEADER_FILES = \
- dfilter.h \
+NONGENERATED_HEADERS_PRIVATE = \
dfilter-macro.h \
dfilter-int.h \
dfunctions.h \
dfvm.h \
- drange.h \
gencode.h \
semcheck.h \
sttype-function.h \
@@ -64,6 +62,10 @@ NONGENERATED_HEADER_FILES = \
sttype-test.h \
syntax-tree.h
+NONGENERATED_HEADERS_PUBLIC = \
+ dfilter.h \
+ drange.h
+
# Files that generate compileable files
GENERATOR_FILES = \
grammar.lemon \
@@ -95,13 +97,18 @@ NODIST_GENERATED_FILES = \
$(NODIST_GENERATED_C_FILES) \
$(NODIST_GENERATED_HEADER_FILES)
+subpkgincludedir = $(pkgincludedir)/epan/dfilter
+
+subpkginclude_HEADERS = $(NONGENERATED_HEADERS_PUBLIC)
+
+
#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)
+ $(NONGENERATED_HEADERS_PRIVATE)
libdfilter_la_LIBADD = \
libdfilter_generated.la
diff --git a/epan/dissectors/Makefile.am b/epan/dissectors/Makefile.am
index 2a2c2c4d11..868711aa2d 100644
--- a/epan/dissectors/Makefile.am
+++ b/epan/dissectors/Makefile.am
@@ -1880,9 +1880,13 @@ libdissectors_la_SOURCES = \
$(PIDL_DISSECTOR_SRC) \
$(DISSECTOR_SUPPORT_SRC)
+subpkgincludedir = $(pkgincludedir)/epan/dissectors
+
+subpkginclude_HEADERS = \
+ $(DISSECTOR_INCLUDES)
+
# this target needed for distribution only
noinst_HEADERS = \
- $(DISSECTOR_INCLUDES) \
$(FILE_DISSECTOR_INCLUDES)
# include asn1 in the source tarball. But nothing to build...
diff --git a/epan/ftypes/Makefile.am b/epan/ftypes/Makefile.am
index 4256a6d0db..09444f4d36 100644
--- a/epan/ftypes/Makefile.am
+++ b/epan/ftypes/Makefile.am
@@ -25,6 +25,11 @@ AM_CPPFLAGS = $(INCLUDEDIRS) -I$(top_srcdir)/epan $(WS_CPPFLAGS) \
noinst_LTLIBRARIES = libftypes.la
+subpkgincludedir = $(pkgincludedir)/epan/ftypes
+
+subpkginclude_HEADERS = \
+ ftypes.h
+
libftypes_la_SOURCES = \
ftypes.c \
ftype-bytes.c \
@@ -39,7 +44,6 @@ libftypes_la_SOURCES = \
ftype-protocol.c \
ftype-string.c \
ftype-time.c \
- ftypes.h \
ftypes-int.h
EXTRA_DIST = \
diff --git a/epan/wmem/Makefile.am b/epan/wmem/Makefile.am
index e2e316ca6a..dd2962ac01 100644
--- a/epan/wmem/Makefile.am
+++ b/epan/wmem/Makefile.am
@@ -28,6 +28,24 @@ noinst_LTLIBRARIES = libwmem.la
EXTRA_PROGRAMS = wmem_test
+subpkgincludedir = $(pkgincludedir)/epan/wmem
+
+subpkginclude_HEADERS = \
+ wmem.h \
+ wmem_array.h \
+ wmem_core.h \
+ wmem_list.h \
+ wmem_map.h \
+ wmem_miscutl.h \
+ wmem_queue.h \
+ wmem_scopes.h \
+ wmem_stack.h \
+ wmem_strbuf.h \
+ wmem_strutl.h \
+ wmem_tree.h \
+ wmem_interval_tree.h \
+ wmem_user_cb.h
+
libwmem_la_SOURCES = \
wmem_array.c \
wmem_core.c \
@@ -45,27 +63,13 @@ libwmem_la_SOURCES = \
wmem_tree.c \
wmem_interval_tree.c \
wmem_user_cb.c \
- wmem.h \
- wmem_array.h \
- wmem_core.h \
wmem_allocator.h \
wmem_allocator_block.h \
wmem_allocator_block_fast.h \
wmem_allocator_simple.h \
wmem_allocator_strict.h \
- wmem_list.h \
- wmem_map.h \
wmem_map_int.h \
- wmem_miscutl.h \
- wmem_queue.h \
- wmem_scopes.h \
- wmem_stack.h \
- wmem_strbuf.h \
- wmem_strutl.h \
- wmem_tree.h \
wmem_tree-int.h \
- wmem_interval_tree.h \
- wmem_user_cb.h \
wmem_user_cb_int.h
wmem_test_SOURCES = wmem_test.c
diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am
index b2412a4be1..9f50e9b6c9 100644
--- a/wsutil/Makefile.am
+++ b/wsutil/Makefile.am
@@ -112,8 +112,12 @@ noinst_LTLIBRARIES = libwsutil_sse42.la
lib_LTLIBRARIES = libwsutil.la
+subpkgincludedir = $(pkgincludedir)/wsutil
+
+subpkginclude_HEADERS = \
+ $(libwsutil_nonrepl_INCLUDES)
+
libwsutil_la_SOURCES = \
- $(libwsutil_nonrepl_INCLUDES) \
adler32.c \
airpdcap_wep.c \
base32.c \