From d061d39bd3b6541ea699e6bf2c1896588c336490 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 9 Jan 2000 20:05:37 +0000 Subject: [PATCH] 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 --- Makefile.am | 15 ++++++--------- configure.in | 19 +++++++++++++++++-- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index 574655989c..9721350ccc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ # Makefile.am # 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 # By Gerald Combs @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -bin_PROGRAMS = ethereal +bin_PROGRAMS = ethereal editcap man_MANS = ethereal.1 @@ -274,10 +274,13 @@ ethereal_LDADD = \ $(ethereal_additional_libs) \ @SNMP_A@ \ @LIBLTDL@ "-dlopen" self \ - "-dlopen" plugins/gryphon/gryphon.la + "-dlopen" plugins/gryphon/gryphon.la @GTK_LIBS@ 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()" @@ -314,12 +317,6 @@ ps.c: print.ps rdps rdps: 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 $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c diff --git a/configure.in b/configure.in index 2b8261d48c..4bcf0f4c24 100644 --- a/configure.in +++ b/configure.in @@ -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 Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -87,8 +87,23 @@ case "$host_os" in ;; 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 -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.)) dnl pcap check