Add support for building dumpcap, and fix dumpcap to build on UN*X.

svn path=/trunk/; revision=16618
This commit is contained in:
Guy Harris 2005-11-28 11:40:28 +00:00
parent bee3824471
commit 4e4c2942e7
3 changed files with 36 additions and 4 deletions

View File

@ -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

View File

@ -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"

View File

@ -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;
}