aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-11-28 11:40:28 +0000
committerGuy Harris <guy@alum.mit.edu>2005-11-28 11:40:28 +0000
commit4e4c2942e728daa807c2fdb5041dd0afc0e100ca (patch)
treef9de5f9811271f7492e72617feb8b903e65b3ebc
parentbee3824471a27c035aefdfb2a0ec11e9deba0494 (diff)
Add support for building dumpcap, and fix dumpcap to build on UN*X.
svn path=/trunk/; revision=16618
-rw-r--r--Makefile.am20
-rw-r--r--configure.in17
-rw-r--r--dumpcap.c3
3 files changed, 36 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 4d6afb5cbe..13013ba281 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -60,14 +60,14 @@ ACLOCAL_AMFLAGS = `./aclocal-flags`
# automake will arrange that the Makefile define it as the union of all
# the "man{section}_MANS" variables.
#
-bin_PROGRAMS = @ethereal_bin@ @capinfos_bin@ @editcap_bin@ @mergecap_bin@ @tethereal_bin@ @dftest_bin@ @randpkt_bin@ @text2pcap_bin@
+bin_PROGRAMS = @ethereal_bin@ @capinfos_bin@ @editcap_bin@ @mergecap_bin@ @tethereal_bin@ @dftest_bin@ @randpkt_bin@ @text2pcap_bin@ @dumpcap_bin@
bin_SCRIPTS = @idl2eth_bin@
man1_MANS = @ethereal_man@ @capinfos_man@ @editcap_man@ @mergecap_man@ @tethereal_man@ @text2pcap_man@ @idl2eth_man@
man4_MANS = @etherealfilter_man@
man_MANS =
EXTRA_PROGRAMS = ethereal tethereal capinfos editcap mergecap dftest \
- randpkt text2pcap
+ randpkt text2pcap dumpcap
EXTRA_SCRIPTS = idl2eth
#
@@ -423,6 +423,22 @@ dftest_LDADD = \
dftest_LDFLAGS = -export-dynamic
+dumpcap_additional_libs = \
+ wiretap/libwiretap.la \
+ epan/libethereal.la
+
+dumpcap_DEPENDENCIES = \
+ $(dumpcap_additional_libs) \
+ $(plugin_libs)
+
+dumpcap_LDADD = \
+ $(dumpcap_additional_libs) \
+ @SNMP_LIBS@ @SSL_LIBS@ \
+ $(plugin_ldadd) \
+ @PCRE_LIBS@ \
+ @GLIB_LIBS@ -lm \
+ @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@
+
#
# XXX - "svnversion.h" is distributed in the release tarball; should
# we be deleting it with "make clean", or should we only do that with
diff --git a/configure.in b/configure.in
index af457fccbe..0256e6ae05 100644
--- a/configure.in
+++ b/configure.in
@@ -541,6 +541,22 @@ AC_SUBST(editcap_bin)
AC_SUBST(editcap_man)
+# Enable/disable dumpcap
+
+AC_ARG_ENABLE(dumpcap,
+[ --enable-dumpcap build dumpcap. [default=no]],enable_dumpcap=$enableval,enable_dumpcap=no)
+
+if test "x$enable_dumpcap" = "xyes" ; then
+ dumpcap_bin="dumpcap\$(EXEEXT)"
+ dumpcap_man="dumpcap.1"
+else
+ dumpcap_bin=""
+ dumpcap_man=""
+fi
+AC_SUBST(dumpcap_bin)
+AC_SUBST(dumpcap_man)
+
+
# Enable/disable capinfos
AC_ARG_ENABLE(capinfos,
@@ -1310,6 +1326,7 @@ echo " Build ethereal : $enable_ethereal"
echo " Build tethereal : $enable_tethereal"
echo " Build capinfos : $enable_capinfos"
echo " Build editcap : $enable_editcap"
+echo " Build dumpcap : $enable_dumpcap"
echo " Build mergecap : $enable_mergecap"
echo " Build text2pcap : $enable_text2pcap"
echo " Build idl2eth : $enable_idl2eth"
diff --git a/dumpcap.c b/dumpcap.c
index 79fbdbaba0..ca515da4f5 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -6,7 +6,6 @@
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
@@ -474,9 +473,9 @@ if (capture_opts->iface == NULL) {
#ifdef _WIN32
/* Shutdown windows sockets */
WSACleanup();
-#endif
destroy_console();
+#endif
return err;
}