Make "editcap" one of the standard targets, so it's built and installed
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 9 Jan 2000 20:05:37 +0000 (20:05 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 9 Jan 2000 20:05:37 +0000 (20:05 +0000)
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.)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1445 f5534014-38df-0310-8fa8-9805f1628bb7

Makefile.am
configure.in

index 574655989c61d810db4acac162d24a557655a8c5..9721350ccc3263b0b29841eb90dabcdacda80662 100644 (file)
@@ -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 <gerald@zing.org>
@@ -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
 
index 2b8261d48c3aa041d511cd063fb4139c4da42f91..4bcf0f4c24e0db6e56dc69f41d2476573c98c40b 100644 (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 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