# 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 <gerald@zing.org>
# 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
$(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()"
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
-# $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
;;
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