Make "editcap" one of the standard targets, so it's built and installed

by default.

Use the automake mechanisms for it, and, having done so, arrange that it
not be linked with GTK+ (which it doesn't need) - it currently links
with libpcap, but that should be fixed as well.  (It also needs a man
page.)

svn path=/trunk/; revision=1445
This commit is contained in:
Guy Harris 2000-01-09 20:05:37 +00:00
parent a5ad1c8c12
commit d061d39bd3
2 changed files with 23 additions and 11 deletions

View File

@ -1,7 +1,7 @@
# Makefile.am # Makefile.am
# Automake file for Ethereal # Automake file for Ethereal
# #
# $Id: Makefile.am,v 1.146 2000/01/08 21:56:29 gram Exp $ # $Id: Makefile.am,v 1.147 2000/01/09 20:05:36 guy Exp $
# #
# Ethereal - Network traffic analyzer # Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@zing.org> # By Gerald Combs <gerald@zing.org>
@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
bin_PROGRAMS = ethereal bin_PROGRAMS = ethereal editcap
man_MANS = ethereal.1 man_MANS = ethereal.1
@ -274,10 +274,13 @@ ethereal_LDADD = \
$(ethereal_additional_libs) \ $(ethereal_additional_libs) \
@SNMP_A@ \ @SNMP_A@ \
@LIBLTDL@ "-dlopen" self \ @LIBLTDL@ "-dlopen" self \
"-dlopen" plugins/gryphon/gryphon.la "-dlopen" plugins/gryphon/gryphon.la @GTK_LIBS@
ethereal_LDFLAGS = -export-dynamic ethereal_LDFLAGS = -export-dynamic
editcap_SOURCES = editcap.c
editcap_DEPENDENCIES = wiretap/libwiretap.a
editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
# #
# Build "register.c", which contains a function "register_all_protocols()" # Build "register.c", which contains a function "register_all_protocols()"
@ -314,12 +317,6 @@ ps.c: print.ps rdps
rdps: rdps.c rdps: rdps.c
$(CC) -o rdps $(srcdir)/rdps.c $(CC) -o rdps $(srcdir)/rdps.c
editcap.o: editcap.c
$(COMPILE) -c $(srcdir)/editcap.c
editcap: editcap.o wiretap/libwiretap.a
$(LINK) -o editcap editcap.o wiretap/libwiretap.a `glib-config --libs` -lz
randpkt.o: randpkt.c randpkt.o: randpkt.c
$(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c

View File

@ -1,4 +1,4 @@
# $Id: configure.in,v 1.70 2000/01/07 05:21:09 gram Exp $ # $Id: configure.in,v 1.71 2000/01/09 20:05:37 guy Exp $
dnl dnl
dnl Process this file with autoconf 2.13 or later to produce a dnl Process this file with autoconf 2.13 or later to produce a
dnl configure script; 2.12 doesn't generate a "configure" script that dnl configure script; 2.12 doesn't generate a "configure" script that
@ -87,8 +87,23 @@ case "$host_os" in
;; ;;
esac esac
# GLib checks
# This doesn't add GLIB_CFLAGS to CFLAGS, because AM_PATH_GTK will add
# GTK_CFLAGS to CFLAGS, and GTK_CFLAGS is a superset of CFLAGS.
# However, this means that both @GLIB_LIBS@ and @GTK_LIBS@ will be
# set when generating the Makefile, so we can make programs that require
# only GLib link with @GLIB_LIBS@ and make programs that require GTK+
# link with @GTK_LIBS@ (which includes @GLIB_LIBS@).
# We don't add $GLIB_LIBS to LIBS, because we don't want to force all
# programs to be built with GLib.
#
AM_PATH_GLIB(1.2.0, , AC_MSG_ERROR(GLib distribution not found.))
# GTK checks # GTK checks
AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS", # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
# programs to be built with GTK+.
#
AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS",
AC_MSG_ERROR(GTK+ distribution not found.)) AC_MSG_ERROR(GTK+ distribution not found.))
dnl pcap check dnl pcap check