- Make --enable-static work again (configure.in, Makefile.am)
[obnox/wireshark/wip.git] / Makefile.am
index 4d0db7124b76af7803042c852b30758c7d6276ba..0bed5f41bc93a70c1002e4bcd19ff9779c79db16 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile.am
 # Automake file for Ethereal
 #
-# $Id: Makefile.am,v 1.553 2003/02/14 19:39:54 guy Exp $
+# $Id: Makefile.am,v 1.622 2003/09/05 07:44:44 jmayer Exp $
 #
 # Ethereal - Network traffic analyzer
 # By Gerald Combs <gerald@ethereal.com>
@@ -65,34 +65,37 @@ bin_SCRIPTS = @idl2eth_bin@
 man1_MANS = @ethereal_man@ @editcap_man@ @mergecap_man@ @tethereal_man@ @text2pcap_man@ @idl2eth_man@
 man_MANS =
 
-EXTRA_PROGRAMS = ethereal ethereal_static tethereal tethereal_static editcap mergecap dftest text2pcap
+EXTRA_PROGRAMS = ethereal tethereal editcap mergecap dftest text2pcap
 EXTRA_SCRIPTS = idl2eth
 
 #
-# Install "manuf" in the directory for Ethereal configuration files.
+# Ethereal configuration files are put in $(pkgdatadir).  It currently
+# contains the "manuf" file and a "diameter" directory.
 #
-sysconf_DATA = manuf
+pkgdata_DATA = manuf
 
 #
 # Install the Diameter DTD and XML files in the "diameter" subdirectory
 # of that directory.
 #
-diameterdir = $(sysconfdir)/diameter
+diameterdir = $(pkgdatadir)/diameter
 diameter_DATA = dictionary.dtd dictionary.xml mobileipv4.xml \
        nasreq.xml sunping.xml
 
 DISSECTOR_SRC = \
        packet-aarp.c  \
+       packet-acap.c  \
        packet-afp.c   \
        packet-afs.c   \
        packet-aim.c   \
        packet-ajp13.c          \
+       packet-ans.c   \
        packet-aodv.c  \
-       packet-aodv6.c \
        packet-arcnet.c \
        packet-arp.c   \
        packet-asap.c  \
        packet-ascend.c\
+       packet-asf.c   \
        packet-atalk.c \
        packet-atm.c   \
        packet-auto_rp.c   \
@@ -100,6 +103,7 @@ DISSECTOR_SRC = \
        packet-bacnet.c   \
        packet-beep.c \
        packet-bgp.c   \
+       packet-bofl.c  \
        packet-bootp.c \
        packet-bootparams.c \
        packet-bpdu.c  \
@@ -108,6 +112,7 @@ DISSECTOR_SRC = \
        packet-cdp.c   \
        packet-cgmp.c  \
        packet-chdlc.c  \
+       packet-cisco-oui.c \
        packet-clearcase.c  \
        packet-clip.c  \
        packet-clnp.c  \
@@ -119,6 +124,7 @@ DISSECTOR_SRC = \
        packet-dccp.c \
        packet-dcerpc.c  \
        packet-dcerpc-afs4int.c  \
+       packet-dcerpc-atsvc.c \
        packet-dcerpc-bossvr.c  \
        packet-dcerpc-browser.c  \
        packet-dcerpc-cds_clerkserver.c  \
@@ -137,6 +143,7 @@ DISSECTOR_SRC = \
        packet-dcerpc-lsa.c \
        packet-dcerpc-lsa-ds.c \
        packet-dcerpc-mapi.c  \
+       packet-dcerpc-messenger.c  \
        packet-dcerpc-mgmt.c  \
        packet-dcerpc-ndr.c  \
        packet-dcerpc-netlogon.c \
@@ -159,6 +166,7 @@ DISSECTOR_SRC = \
        packet-dcerpc-secidmap.c \
        packet-dcerpc-spoolss.c \
        packet-dcerpc-srvsvc.c \
+       packet-dcerpc-svcctl.c \
        packet-dcerpc-tapi.c \
        packet-dcerpc-tkn4int.c \
        packet-dcerpc-ubikdisk.c \
@@ -169,15 +177,21 @@ DISSECTOR_SRC = \
        packet-dec-bpdu.c \
        packet-dhcpv6.c \
        packet-diameter.c \
+       packet-distcc.c \
        packet-dlsw.c  \
        packet-dns.c   \
        packet-dsi.c   \
        packet-dvmrp.c \
        packet-eap.c \
        packet-eapol.c \
+       packet-echo.c \
+       packet-edonkey.c \
        packet-eigrp.c \
+       packet-enc.c    \
+       packet-enip.c   \
        packet-esis.c  \
        packet-eth.c   \
+       packet-etherip.c        \
        packet-ethertype.c   \
        packet-fc.c \
        packet-fcct.c \
@@ -198,13 +212,18 @@ DISSECTOR_SRC = \
        packet-giop.c  \
        packet-gmrp.c \
        packet-gnutella.c \
+       packet-gprs-ns.c \
        packet-gre.c   \
        packet-gssapi.c \
        packet-gtp.c   \
        packet-gvrp.c  \
        packet-h1.c    \
+       packet-h225.c  \
+       packet-h245.c  \
        packet-h261.c  \
+       packet-h263.c  \
        packet-hclnfsd.c  \
+       packet-hpext.c \
        packet-hsrp.c  \
        packet-http.c  \
        packet-hyperscsi.c \
@@ -221,10 +240,13 @@ DISSECTOR_SRC = \
        packet-imap.c   \
        packet-ip.c    \
        packet-ipfc.c    \
+       packet-ipmi.c  \
        packet-ipp.c   \
        packet-ipsec.c \
+       packet-ipsec-udp.c \
        packet-ipv6.c  \
        packet-ipx.c   \
+       packet-ipxwan.c \
        packet-irc.c   \
        packet-isakmp.c\
        packet-iscsi.c \
@@ -235,20 +257,25 @@ DISSECTOR_SRC = \
        packet-isis-lsp.c \
        packet-isis-snp.c \
        packet-isl.c   \
+       packet-isns.c \
        packet-isup.c  \
        packet-iua.c   \
+       packet-jabber.c \
+       packet-kadm5.c \
        packet-kerberos.c \
        packet-klm.c   \
        packet-l2tp.c  \
        packet-lapb.c  \
        packet-lapbether.c \
        packet-lapd.c  \
+       packet-laplink.c  \
        packet-ldap.c  \
        packet-ldp.c   \
        packet-llc.c   \
        packet-lmi.c   \
        packet-lmp.c   \
        packet-lpd.c   \
+       packet-lwapp.c \
        packet-m2pa.c  \
        packet-m2tp.c  \
        packet-m2ua.c  \
@@ -283,7 +310,10 @@ DISSECTOR_SRC = \
        packet-nfsauth.c \
        packet-nisplus.c \
        packet-nlm.c   \
+       packet-nlsp.c  \
        packet-nntp.c  \
+       packet-nt-oui.c \
+       packet-nt-sonmp.c \
        packet-ntlmssp.c  \
        packet-ntp.c  \
        packet-null.c  \
@@ -291,6 +321,7 @@ DISSECTOR_SRC = \
        packet-osi-options.c \
        packet-ospf.c  \
        packet-pcnfsd.c \
+       packet-per.c \
        packet-pflog.c \
        packet-pgm.c   \
        packet-pim.c   \
@@ -302,6 +333,7 @@ DISSECTOR_SRC = \
        packet-prism.c \
        packet-q2931.c \
        packet-q931.c  \
+       packet-q933.c  \
        packet-qllc.c  \
        packet-quake.c \
        packet-quake2.c \
@@ -313,13 +345,16 @@ DISSECTOR_SRC = \
        packet-rip.c   \
        packet-ripng.c \
        packet-rlogin.c \
+       packet-rmcp.c  \
        packet-rmi.c \
+       packet-rmp.c   \
        packet-rpc.c   \
        packet-rpl.c   \
        packet-rquota.c \
        packet-rsh.c   \
        packet-rstat.c \
        packet-rsvp.c  \
+       packet-rsync.c \
        packet-rtcp.c  \
        packet-rtp.c   \
        packet-rtsp.c  \
@@ -333,6 +368,7 @@ DISSECTOR_SRC = \
        packet-sctp.c  \
        packet-sdlc.c  \
        packet-sdp.c   \
+       packet-sflow.c \
        packet-sip.c   \
        packet-skinny.c   \
        packet-slimp3.c   \
@@ -344,6 +380,7 @@ DISSECTOR_SRC = \
        packet-smb-logon.c \
        packet-smb-mailslot.c \
        packet-smb-pipe.c \
+       packet-smb-sidsnooping.c \
        packet-smpp.c \
        packet-smtp.c \
        packet-sna.c   \
@@ -358,12 +395,14 @@ DISSECTOR_SRC = \
        packet-ssl.c   \
        packet-stat.c   \
        packet-stat-notify.c \
+       packet-stun.c  \
        packet-sua.c   \
        packet-syslog.c \
        packet-tacacs.c \
        packet-tcp.c   \
        packet-tds.c   \
        packet-telnet.c\
+       packet-teredo.c\
        packet-tftp.c  \
        packet-time.c  \
        packet-tns.c \
@@ -397,6 +436,7 @@ DISSECTOR_SRC = \
        packet-xot.c   \
        packet-xyplex.c   \
        packet-yhoo.c  \
+       packet-ymsg.c  \
        packet-ypbind.c \
        packet-yppasswd.c \
        packet-ypserv.c \
@@ -404,7 +444,55 @@ DISSECTOR_SRC = \
        packet-zebra.c
 
 if HAVE_PLUGINS
+plugin_libs = \
+       plugins/artnet/artnet.la \
+       plugins/docsis/docsis.la \
+       plugins/giop/cosnaming.la \
+       plugins/giop/coseventcomm.la \
+       plugins/gryphon/gryphon.la \
+       plugins/lwres/lwres.la \
+       plugins/megaco/megaco.la \
+       plugins/mgcp/mgcp.la \
+       plugins/pcli/pcli.la \
+       plugins/rtnet/rtnet.la 
+
+if ENABLE_STATIC
+plugin_ldadd = \
+       plugins/artnet/packet-artnet.o \
+       plugins/docsis/packet-bpkmattr.o \
+       plugins/docsis/packet-bpkmreq.o \
+       plugins/docsis/packet-bpkmrsp.o \
+       plugins/docsis/packet-docsis.o \
+       plugins/docsis/packet-dsaack.o \
+       plugins/docsis/packet-dsareq.o \
+       plugins/docsis/packet-dsarsp.o \
+       plugins/docsis/packet-dscack.o \
+       plugins/docsis/packet-dscreq.o \
+       plugins/docsis/packet-dscrsp.o \
+       plugins/docsis/packet-dsdreq.o \
+       plugins/docsis/packet-dsdrsp.o \
+       plugins/docsis/packet-macmgmt.o \
+       plugins/docsis/packet-map.o \
+       plugins/docsis/packet-regack.o \
+       plugins/docsis/packet-regreq.o \
+       plugins/docsis/packet-regrsp.o \
+       plugins/docsis/packet-rngreq.o \
+       plugins/docsis/packet-rngrsp.o \
+       plugins/docsis/packet-tlv.o \
+       plugins/docsis/packet-uccreq.o \
+       plugins/docsis/packet-uccrsp.o \
+       plugins/docsis/packet-ucd.o \
+       plugins/giop/packet-cosnaming.o \
+       plugins/giop/packet-coseventcomm.o \
+       plugins/gryphon/packet-gryphon.o \
+       plugins/lwres/packet-lwres.o \
+       plugins/megaco/packet-megaco.o \
+       plugins/mgcp/packet-mgcp.o \
+       plugins/pcli/packet-pcli.o \
+       plugins/rtnet/packet-rtnet.o 
+
 plugin_src = \
+       plugins/artnet/packet-artnet.c \
        plugins/docsis/packet-bpkmattr.c \
        plugins/docsis/packet-bpkmreq.c \
        plugins/docsis/packet-bpkmrsp.c \
@@ -431,68 +519,37 @@ plugin_src = \
        plugins/giop/packet-cosnaming.c \
        plugins/giop/packet-coseventcomm.c \
        plugins/gryphon/packet-gryphon.c \
+       plugins/lwres/packet-lwres.c \
        plugins/megaco/packet-megaco.c \
        plugins/mgcp/packet-mgcp.c \
-       plugins/pcli/packet-pcli.c
-
-plugin_static_ldadd = \
-       plugins/docsis/packet-bpkmattr-static.o \
-       plugins/docsis/packet-bpkmreq-static.o \
-       plugins/docsis/packet-bpkmrsp-static.o \
-       plugins/docsis/packet-docsis-static.o \
-       plugins/docsis/packet-dsaack-static.o \
-       plugins/docsis/packet-dsareq-static.o \
-       plugins/docsis/packet-dsarsp-static.o \
-       plugins/docsis/packet-dscack-static.o \
-       plugins/docsis/packet-dscreq-static.o \
-       plugins/docsis/packet-dscrsp-static.o \
-       plugins/docsis/packet-dsdreq-static.o \
-       plugins/docsis/packet-dsdrsp-static.o \
-       plugins/docsis/packet-macmgmt-static.o \
-       plugins/docsis/packet-map-static.o \
-       plugins/docsis/packet-regack-static.o \
-       plugins/docsis/packet-regreq-static.o \
-       plugins/docsis/packet-regrsp-static.o \
-       plugins/docsis/packet-rngreq-static.o \
-       plugins/docsis/packet-rngrsp-static.o \
-       plugins/docsis/packet-tlv-static.o \
-       plugins/docsis/packet-uccreq-static.o \
-       plugins/docsis/packet-uccrsp-static.o \
-       plugins/docsis/packet-ucd-static.o \
-       plugins/giop/packet-cosnaming-static.o \
-       plugins/giop/packet-coseventcomm-static.o \
-       plugins/gryphon/packet-gryphon-static.o \
-       plugins/megaco/packet-megaco-static.o \
-       plugins/mgcp/packet-mgcp-static.o \
-       plugins/pcli/packet-pcli-static.o
-
-plugin_libs = \
-       plugins/docsis/docsis.la \
-       plugins/giop/cosnaming.la \
-       plugins/giop/coseventcomm.la \
-       plugins/gryphon/gryphon.la \
-       plugins/megaco/megaco.la \
-       plugins/mgcp/mgcp.la \
-       plugins/pcli/pcli.la
+       plugins/pcli/packet-pcli.c \
+       plugins/rtnet/packet-rtnet.c 
 
+else           # ENABLE_STATIC
 plugin_ldadd = \
        "-dlopen" self  \
+       "-dlopen" plugins/artnet/artnet.la \
        "-dlopen" plugins/docsis/docsis.la \
        "-dlopen" plugins/giop/cosnaming.la \
        "-dlopen" plugins/giop/coseventcomm.la \
        "-dlopen" plugins/gryphon/gryphon.la \
+       "-dlopen" plugins/lwres/lwres.la \
        "-dlopen" plugins/megaco/megaco.la \
        "-dlopen" plugins/mgcp/mgcp.la \
-       "-dlopen" plugins/pcli/pcli.la
-else
+       "-dlopen" plugins/pcli/pcli.la \
+       "-dlopen" plugins/rtnet/rtnet.la 
+
 plugin_src =
 
-plugin_static_ldadd =
+endif          # ENABLE_STATIC
+
+else           # HAVE_PLUGINS
+plugin_src =
 
 plugin_libs =
 
 plugin_ldadd =
-endif
+endif          # HAVE_PLUGINS
 
 noinst_HEADERS = \
        packet-afp.h   \
@@ -511,6 +568,7 @@ noinst_HEADERS = \
        packet-clip.h  \
        packet-data.h \
        packet-dccp.h \
+       packet-dcerpc-atsvc.h \
        packet-dcerpc-browser.h \
        packet-dcerpc-dce122.h \
        packet-dcerpc-dfs.h \
@@ -523,6 +581,7 @@ noinst_HEADERS = \
        packet-dcerpc-samr.h \
        packet-dcerpc-spoolss.h \
        packet-dcerpc-srvsvc.h \
+       packet-dcerpc-svcctl.h \
        packet-dcerpc-tapi.h \
        packet-dcerpc-wkssvc.h \
        packet-dcerpc.h \
@@ -530,6 +589,7 @@ noinst_HEADERS = \
        packet-diameter-defs.h \
        packet-dns.h   \
        packet-dvmrp.h \
+       packet-edonkey.h \
        packet-esis.h  \
        packet-eth.h   \
        packet-fc.h \
@@ -548,7 +608,10 @@ noinst_HEADERS = \
        packet-gnutella.h \
        packet-gssapi.h \
        packet-gtp.h    \
+       packet-h225.h    \
+       packet-h245.h    \
        packet-hclnfsd.h  \
+       packet-hpext.h  \
        packet-http.h  \
        packet-ieee80211.h \
        packet-ieee8023.h \
@@ -568,6 +631,7 @@ noinst_HEADERS = \
        packet-klm.h   \
        packet-ldap.h  \
        packet-llc.h   \
+       packet-mip6.h  \
        packet-mount.h \
        packet-mrdisc.h \
        packet-msnip.h \
@@ -578,12 +642,12 @@ noinst_HEADERS = \
        packet-nfs.h   \
        packet-nisplus.h \
        packet-nlm.h   \
-       packet-ntlmssp.h  \
        packet-ntp.h  \
        packet-null.h  \
        packet-osi-options.h \
        packet-osi.h   \
        packet-pcnfsd.h \
+       packet-per.h   \
        packet-pflog.h \
        packet-pim.h   \
        packet-portmap.h   \
@@ -607,6 +671,7 @@ noinst_HEADERS = \
        packet-smb-logon.h \
        packet-smb-mailslot.h \
        packet-smb-pipe.h \
+       packet-smb-sidsnooping.h \
        packet-sna.h   \
        packet-snmp.h   \
        packet-spray.h \
@@ -626,13 +691,14 @@ noinst_HEADERS = \
        packet-wtls.h \
        packet-wtp.h \
        packet-x11-keysym.h     \
-       packet-yhoo.h  \
        packet-ypbind.h \
        packet-yppasswd.h \
        packet-ypserv.h \
        packet-ypxfr.h
 
 ETHEREAL_COMMON_SRC = \
+       adler32.c      \
+       adler32.h      \
        afn.c          \
        afn.h          \
        aftypes.h      \
@@ -651,6 +717,8 @@ ETHEREAL_COMMON_SRC = \
        column.h       \
        conditions.c   \
        conditions.h   \
+       crc32.c        \
+       crc32.h        \
        crypt-des.c    \
        crypt-des.h    \
        crypt-md4.c    \
@@ -659,20 +727,25 @@ ETHEREAL_COMMON_SRC = \
        crypt-md5.h    \
        crypt-rc4.c    \
        crypt-rc4.h    \
-       packet-dcerpc-nt.c \
+       disabled_protos.c      \
+       disabled_protos.h      \
        etypes.h       \
        file.h         \
        follow.c       \
        follow.h       \
        format-oid.h   \
+       g711.c          \
+       g711.h          \
        greproto.h     \
        in_cksum.c     \
        in_cksum.h     \
+       ip_opts.h      \
        ipproto.c      \
        ipproto.h      \
        llcsaps.h      \
        nlpid.h        \
        oui.h          \
+       packet-dcerpc-nt.c \
        pcap-util.c    \
        pcap-util.h    \
        ppptypes.h     \
@@ -691,10 +764,13 @@ ETHEREAL_COMMON_SRC = \
        ringbuffer.c   \
        ringbuffer.h   \
        rpc_defrag.h   \
+       rtp_pt.h       \
        sctpppids.h    \
        smb.h          \
        tap.c           \
        tap.h           \
+       timestats.c     \
+       timestats.h     \
        util.c         \
        util.h         \
        x11-declarations.h \
@@ -729,26 +805,6 @@ ethereal_SOURCES = \
        summary.h      \
        ui_util.h
 
-ethereal_static_SOURCES = \
-       $(DISSECTOR_SRC) \
-       $(ETHEREAL_COMMON_SRC) \
-       register-static.c     \
-       capture.c      \
-       capture.h      \
-       file.c         \
-       filters.c      \
-       filters.h      \
-       globals.h      \
-       menu.h         \
-       progress_dlg.h \
-       proto_hier_stats.h      \
-       proto_hier_stats.c      \
-       simple_dialog.h \
-       statusbar.h    \
-       summary.c      \
-       summary.h      \
-       ui_util.h
-
 EXTRA_ethereal_SOURCES = \
        snprintf.c      \
        snprintf.h      \
@@ -788,10 +844,6 @@ ethereal_DEPENDENCIES = \
        $(ethereal_additional_libs)     \
        $(plugin_libs)
 
-ethereal_static_DEPENDENCIES = \
-       $(ethereal_optional_objects)    \
-       $(ethereal_additional_libs)
-
 # This automake variable adds to the link-line for the executable.
 #
 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
@@ -799,33 +851,34 @@ ethereal_static_DEPENDENCIES = \
 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
 # applications are X applications).
+
+if ENABLE_STATIC
+ethereal_LDFLAGS = -Wl,-static -all-static
+else
+ethereal_LDFLAGS = -export-dynamic
+endif
+
 ethereal_LDADD = \
        $(ethereal_optional_objects)    \
        $(ethereal_additional_libs)     \
        @SNMP_LIBS@ @SSL_LIBS@          \
        $(plugin_ldadd)                 \
-       @PCAP_LIBS@ @GTK_LIBS@
-
-ethereal_static_LDADD = \
-       "-all-static"                   \
-       $(plugin_static_ldadd)          \
-       $(ethereal_optional_objects)    \
-       $(ethereal_additional_libs)     \
-       @SNMP_LIBS@ @SSL_LIBS@          \
-       @PCAP_LIBS@ @GTK_LIBS@
-
-ethereal_LDFLAGS = -export-dynamic
-ethereal_static_LDFLAGS = -Wl,-static
+       @PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@
 
 TETHEREAL_TAP_SRC = \
+       tap-bootpstat.c         \
        tap-dcerpcstat.c        \
+       tap-httpstat.c          \
        tap-iostat.c            \
        tap-iousers.c           \
+       tap-mgcpstat.c          \
        tap-protocolinfo.c      \
        tap-protohierstat.c     \
        tap-rpcstat.c           \
        tap-rpcprogs.c          \
-       tap-smbstat.c
+       tap-smbsids.c           \
+       tap-smbstat.c           \
+       tap-wspstat.c
 
 tethereal_SOURCES = \
        $(DISSECTOR_SRC) \
@@ -835,14 +888,6 @@ tethereal_SOURCES = \
        register.c     \
        tethereal.c
 
-tethereal_static_SOURCES = \
-       $(DISSECTOR_SRC) \
-       $(ETHEREAL_COMMON_SRC) \
-       $(TETHEREAL_TAP_SRC) \
-       tethereal-tap-register.c \
-       register-static.c     \
-       tethereal.c
-
 # Additional libs that I know how to build. These will be
 # linked into the tethereal executable.
 tethereal_additional_libs =            \
@@ -857,31 +902,20 @@ tethereal_DEPENDENCIES = \
        $(tethereal_additional_libs)    \
        $(plugin_libs)
 
-tethereal_static_DEPENDENCIES = \
-       $(ethereal_optional_objects)    \
-       $(tethereal_additional_libs)
-
 # This automake variable adds to the link-line for the executable
-tethereal_LDADD = wiretap/libwiretap.a \
+tethereal_LDADD = \
        $(ethereal_optional_objects)    \
        $(tethereal_additional_libs)    \
        @SNMP_LIBS@ @SSL_LIBS@          \
        $(plugin_ldadd)                 \
-       @GLIB_LIBS@ -lm \
-       @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
-
-tethereal_static_LDADD = \
-       "-all-static"           \
-       $(plugin_static_ldadd)  \
-       wiretap/libwiretap.a    \
-       $(ethereal_optional_objects)    \
-       $(tethereal_additional_libs)    \
-       @SNMP_LIBS@ @SSL_LIBS@          \
-       @GLIB_LIBS@ -lm \
-       @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
+       @GLIB_LIBS@ -lm                 \
+       @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
 
+if ENABLE_STATIC
+tethereal_LDFLAGS = -Wl,-static -all-static
+else
 tethereal_LDFLAGS = -export-dynamic
-tethereal_static_LDFLAGS = -Wl,-static
+endif
 
 # Optional objects that I know how to build, and that are needed by
 # text2pcap.
@@ -948,13 +982,15 @@ SUFFIXES = .sh
 # The second argument is the directory in which the source files live.
 # All subsequent arguments are the files to scan.
 #
-register.c: $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
-       @echo Making register.c
-       @$(srcdir)/make-reg-dotc register.c $(srcdir) $(DISSECTOR_SRC)
-
-register-static.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
-       @echo Making register-static.c
-       @$(srcdir)/make-reg-dotc register-static.c $(srcdir) $(plugin_src) $(DISSECTOR_SRC)
+register.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
+       @if test -n $(PYTHON); then \
+               echo Making register.c with python ; \
+               $(PYTHON) $(srcdir)/make-reg-dotc.py $(srcdir) $(DISSECTOR_SRC) ; \
+       else \
+               echo Making register.c with shell script ; \
+               $(srcdir)/make-reg-dotc register.c $(srcdir) \
+                       $(plugin_src) $(DISSECTOR_SRC) ; \
+       fi
 
 #
 # Build "tethereal-tap-register.c", which contains a function 
@@ -1011,7 +1047,7 @@ dftest_LDADD = \
        @SNMP_LIBS@ @SSL_LIBS@          \
        $(plugin_ldadd)                 \
        @GLIB_LIBS@ -lm \
-       @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
+       @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
 
 dftest_LDFLAGS = -export-dynamic
 
@@ -1020,12 +1056,14 @@ CLEANFILES =    \
 
 DISTCLEANFILES =       \
        aclocal-missing/*.m4 \
-       register.c      \
-       register-static.c \
-       rdps            \
        ps.c            \
+       rdps            \
        *~
 
+MAINTAINERCLEANFILES =         \
+       register.c              \
+       ps.c
+
 EXTRA_DIST = \
        Ethereal.desktop        \
        FAQ                     \
@@ -1144,7 +1182,6 @@ if SETUID_INSTALL
 install-exec-hook:
        -chmod +s $(DESTDIR)$(bindir)/ethereal
        -chmod +s $(DESTDIR)$(bindir)/tethereal
-       -chmod +s $(DESTDIR)$(bindir)/ethereal_static
 else
 install-exec-hook:
 endif