diff --git a/dist/tcpdump/CHANGES b/dist/tcpdump/CHANGES index 5357ac317452..014100755c30 100644 --- a/dist/tcpdump/CHANGES +++ b/dist/tcpdump/CHANGES @@ -1,4 +1,84 @@ -Header: /tcpdump/master/tcpdump/CHANGES,v 1.81 2002/01/21 11:03:33 mcr Exp +Header: /tcpdump/master/tcpdump/CHANGES,v 1.84.2.3 2004/03/30 14:36:24 mcr Exp + +Tue. March 30, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.3 release + + No changes from 3.8.2. Version bumped only to maintain consistency + with libpcap 0.8.3. + +Mon. March 29, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.2 release + + Fixes for print-isakmp.c CVE: CAN-2004-0183, CAN-2004-0184 + http://www.rapid7.com/advisories/R7-0017.html + IP-over-IEEE1394 printing. + some MINGW32 changes. + updates for autoconf 2.5 + fixes for print-aodv.c - check for too short packets + formatting changes to print-ascii for hex output. + check for too short packets: print-bgp.c, print-bootp.c, print-cdp.c, + print-chdlc.c, print-domain.c, print-icmp.c, print-icmp6.c, + print-ip.c, print-lwres.c, print-ospf.c, print-pim.c, + print-ppp.c,print-pppoe.c, print-rsvp.c, print-wb.c + print-ether.c - better handling of unknown types. + print-isoclns.c - additional decoding of types. + print-llc.c - strings for LLC names added. + print-pfloc.c - various enhancements + print-radius.c - better decoding to strings. + +Wed. November 12, 2003. mcr@sandelman.ottawa.on.ca. Summary for 3.8 release + + changed syntax of -E argument so that multiple SAs can be decrypted + fixes for Digital Unix headers and Documentation + __attribute__ fixes + CDP changes from Terry Kennedy . + IPv6 mobility updates from Kazushi Sugyo + Fixes for ASN.1 decoder for 2.100.3 forms. + Added a count of packets received and processed to clarify numbers. + Incorporated WinDUMP patches for Win32 builds. + PPPoE payload length headers. + Fixes for HP C compiler builds. + Use new pcap_breakloop() and pcap_findalldevs() if we can. + BGP output split into multiple lines. + Fixes to 802.11 decoding. + Fixes to PIM decoder. + SuperH is a CPU that can't handle unaligned access. Many fixes for + unaligned access work. + Fixes to Frame-Relay decoder for Q.933/922 frames. + Clarified when Solaris can do captures as non-root. + Added tests/ subdir for examples/regression tests. + New -U flag. -flush stdout after every packet + New -A flag -print ascii only + support for decoding IS-IS inside Cisco HDLC Frames + more verbosity for tftp decoder + mDNS decoder + new BFD decoder + cross compilation patches + RFC 3561 AODV support. + UDP/TCP pseudo-checksum properly for source-route options. + sanitized all files to modified BSD license + Add support for RFC 2625 IP-over-Fibre Channel. + fixes for DECnet support. + Support RFC 2684 bridging of Ethernet, 802.5 Token Ring, and FDDI. + RFC 2684 encapsulation of BPDUs. + +Tuesday, February 25, 2003. fenner@research.att.com. 3.7.2 release + + Fixed infinite loop when parsing malformed isakmp packets. + (reported by iDefense; already fixed in CVS) + Fixed infinite loop when parsing malformed BGP packets. + Fixed buffer overflow with certain malformed NFS packets. + Pretty-print unprintable network names in 802.11 printer. + Handle truncated nbp (appletalk) packets. + Updated DHCPv6 printer to match draft-ietf-dhc-dhcpv6-22.txt + Print IP protocol name even if we don't have a printer for it. + Print IP protocol name or number for fragments. + Print the whole MPLS label stack, not just the top label. + Print request header and file handle for NFS v3 FSINFO and PATHCONF + requests. + Fix NFS packet truncation checks. + Handle "old" DR-Priority and Bidir-Capable PIM HELLO options. + Handle unknown RADIUS attributes properly. + Fix an ASN.1 parsing error that would cause e.g. the OID + 2.100.3 to be misrepresented as 4.20.3 . Monday, January 21, 2002. mcr@sandelman.ottawa.on.ca. Summary for 3.7 release see http://www.tcpdump.org/cvs-log/2002-01-21.10:16:48.html for commit log. @@ -652,5 +732,3 @@ v2.0.1 Sun Jan 26 21:10:10 PDT v2.0 Sun Jan 13 12:20:40 PST 1991 - Initial public release. - -@(#) Header: /tcpdump/master/tcpdump/CHANGES,v 1.81 2002/01/21 11:03:33 mcr Exp (LBL) diff --git a/dist/tcpdump/CREDITS b/dist/tcpdump/CREDITS index 602f2ba4e753..b5c286c2b605 100644 --- a/dist/tcpdump/CREDITS +++ b/dist/tcpdump/CREDITS @@ -2,90 +2,117 @@ This file lists people who have contributed to tcpdump: The current maintainers: Bill Fenner - Assar Westerlund - Alexey Kuznetsov + Fulvio Risso + Guy Harris + Hannes Gredler Jun-ichiro itojun Hagino - Guy Harris - Torsten Landschoff - Michael Richardson - Ken Hornstein + Michael Richardson Additional people who have contributed patches: + Andrew Brown Alfredo Andres + Andrew Hintz Andrew Tridgell Arkadiusz Miskiewicz Armando L. Caro Jr. + Atsushi Onoe Ben Smithurst Brent L. Bates + Brian Ginsbach + Bruce M. Simpson + Carles Kishimoto Bisbe Charlie Lenahan + Charles M. Hannum + Chris Cogdon Chris G. Demetriou Chris Jepeway Craig Rodrigues Crist J. Clark Daniel Hagerty Darren Reed + David Binderman + David Young Francisco Matias Cuenca-Acuna Frank Volf + Fulvio Risso + George Bakos + Gerald Combs Gert Doering + Greg Stark Gilbert Ramirez Jr. - Gisle Vanem - Hannes Gredler + Gisle Vanem + Hank Leininger Harry Raaymakers Heinz-Ado Arnolds Hendrik Scholz Jakob Schlyter Jan Oravec - Jason R. Thorpe + Jason R. Thorpe Jefferson Ogata Jeffrey Hutzelman + Jesper Peterson Jim Hutchins - JINMEI Tatuya + Jonathan Heusser + Tatuya Jinmei Jørgen Thomsen - Juergen Schoenwaelder Julian Cowley Kaarthik Sivakumar Kazushi Sugyo Kelly Carmichael Ken Hornstein - Kevin Steves + Kevin Steves Klaus Klein Kris Kennaway + Krzysztof Halasa Larry Lile Lennert Buytenhek + Loris Degioanni Love Hörnquist-Åstrand Maciej W. Rozycki Marc A. Lehmann + Mark Ellzey Thomas Marko Kiiskila Marshall Rose Martin Husemann Michael Madore Michael Shalayeff Michael T. Stolarchuk + Michele "mydecay" Marchetto Monroe Williams Motonori Shindo Nathan J. Williams Nathaniel Couper-Noles + Neil T. Spring Niels Provos Nickolai Zeldovich Olaf Kirch Onno van der Linden Pascal Hennequin Pasvorn Boonmark + Paul Mundt + Paul S. Traina + Pavlin Radoslavov Pekka Savola + Peter Fales Peter Jeremy Phil Wood Rafal Maszkowski Rick Jones Rick Watson + Rob Braun Roderick Schertler Sami Farin + Scott Rose Sebastian Krahmer Seth Webster + Takashi Yamamoto + Terry Kennedy Timo Koskiahde Tony Li Uns Lider Wilbert de Graaf + Yen Yen Lim The original LBL crew: Steve McCanne diff --git a/dist/tcpdump/FILES b/dist/tcpdump/FILES index 0ac8a3889870..0b868170cc47 100644 --- a/dist/tcpdump/FILES +++ b/dist/tcpdump/FILES @@ -5,15 +5,19 @@ INSTALL LICENSE Makefile.in README +Readme.Win32 VERSION acconfig.h aclocal.m4 addrtoname.c addrtoname.h ah.h +aodv.h appletalk.h arcnet.h atime.awk +atm.h +atmuni31.h bootp.h bpf_dump.c chdlc.h @@ -23,11 +27,14 @@ config.sub configure configure.in decnet.h +enc.h esp.h ether.h ethertype.h extract.h fddi.h +gmpls.c +gmpls.h gmt2local.c gmt2local.h icmp6.h @@ -37,11 +44,14 @@ install-sh interface.h ip.h ip6.h +ipfc.h +ipproto.h ipsec_doi.h ipx.h isakmp.h l2tp.h lane.h +lbl/os-osf4.h lbl/os-solaris2.h lbl/os-sunos4.h lbl/os-ultrix4.h @@ -53,6 +63,8 @@ mib.h missing/addrinfo.h missing/addrsize.h missing/bittypes.h +missing/dlnames.c +missing/datalinks.c missing/getaddrinfo.c missing/getnameinfo.c missing/inet_aton.c @@ -65,6 +77,7 @@ missing/sockstorage.h missing/strdup.c missing/strlcat.c missing/strlcpy.c +missing/strsep.c mkdep nameser.h netbios.h @@ -76,17 +89,21 @@ ospf.h ospf6.h packetdat.awk parsenfsfh.c +pcap-missing.h ppp.h print-802_11.c +print-ap1394.c print-ah.c +print-aodv.c print-arcnet.c print-arp.c print-ascii.c print-atalk.c print-atm.c +print-beep.c +print-bfd.c print-bgp.c print-bootp.c -print-beep.c print-cdp.c print-chdlc.c print-cip.c @@ -96,9 +113,11 @@ print-dhcp6.c print-domain.c print-dvmrp.c print-egp.c +print-enc.c print-esp.c print-ether.c print-fddi.c +print-fr.c print-frag6.c print-gre.c print-hsrp.c @@ -110,16 +129,18 @@ print-ip.c print-ip6.c print-ip6opts.c print-ipcomp.c +print-ipfc.c print-ipx.c print-isakmp.c print-isoclns.c print-krb.c print-l2tp.c print-lane.c -print-lcp.c +print-ldp.c print-llc.c print-lwres.c print-mobile.c +print-mobility.c print-mpls.c print-msdp.c print-netbios.c @@ -137,6 +158,7 @@ print-radius.c print-raw.c print-rip.c print-ripng.c +print-rsvp.c print-rt6.c print-rx.c print-sctp.c @@ -145,6 +167,7 @@ print-sll.c print-smb.c print-snmp.c print-stp.c +print-sunatm.c print-sunrpc.c print-tcp.c print-telnet.c @@ -173,9 +196,23 @@ strcasecmp.c tcp.h tcpdump.1 tcpdump.c +tcpdump-stdinc.h telnet.h timed.h token.h udp.h util.c vfprintf.c +win32/Include/Arpa/tftp.h +win32/Include/errno.h +win32/Include/getopt.h +win32/Include/inetprivate.h +win32/Include/telnet.h +win32/Include/w32_fzs.h +win32/Include/Netinet/in_systm.h +win32/Include/Netinet/ip.h +win32/Include/Rpc/rpc.h +win32/Src/getopt.c +win32/prj/GNUmakefile +win32/prj/WinDump.dsp +win32/prj/WinDump.dsw diff --git a/dist/tcpdump/INSTALL b/dist/tcpdump/INSTALL index 92ec128bfe1e..5756ea17db0d 100644 --- a/dist/tcpdump/INSTALL +++ b/dist/tcpdump/INSTALL @@ -1,4 +1,4 @@ -@(#) Header: /tcpdump/master/tcpdump/INSTALL,v 1.47 2000/12/16 09:07:45 guy Exp (LBL) +@(#) Header: /tcpdump/master/tcpdump/INSTALL,v 1.56.2.3 2004/03/17 19:47:47 guy Exp (LBL) If you have not built libpcap, do so first. See the README file in this directory for the ftp location. @@ -27,8 +27,8 @@ Note that most systems ship tcpdump, but usually an older version. Remember to remove or rename the installed binary when upgrading. If you use Linux, this version of libpcap is known to compile and run -with 2.0.25 and more modern, and 2.2.x kernels. It is guaranteed not -to work with 1.X kernels. +with 2.0.25 and more modern, and 2.2 and later, kernels. It is +guaranteed not to work with 1.X kernels. If your system is not one which we have tested tcpdump on, you may have to modify the configure script and Makefile.in. Please send us patches @@ -39,43 +39,61 @@ Please see "PLATFORMS" for notes about tested platforms. FILES ----- -CHANGES - description of differences between releases +CHANGES - description of differences between releases CREDITS - people that have helped tcpdump along FILES - list of files exported as part of the distribution -INSTALL - this file +INSTALL - this file +LICENSE - the license under which tcpdump is distributed Makefile.in - compilation rules (input to the configure script) README - description of distribution +Readme.Win32 - notes on building tcpdump on Win32 systems (with WinPcap) VERSION - version of this release acconfig.h - autoconf input aclocal.m4 - autoconf macros addrtoname.c - address to hostname routines addrtoname.h - address to hostname definitions +ah.h - IPSEC Authentication Header definitions +aodv.h - AODV definitions appletalk.h - AppleTalk definitions +arcnet.h - ARCNET definitions atime.awk - TCP ack awk script +atm.h - ATM traffic type definitions +atmuni31.h - ATM Q.2931 definitions bootp.h - BOOTP definitions +bpf_dump.c - BPF program printing routines, in case libpcap doesn't + have them +chdlc.h - Cisco HDLC definitions config.guess - autoconf support config.h.in - autoconf input config.sub - autoconf support configure - configure script (run this first) configure.in - configure script source decnet.h - DECnet definitions -dhcp6.h - IPv6 DHCP definitions -dhcp6opt.h - IPv6 DHCP options -ethertype.h - ethernet definitions +enc.h - OpenBSD IPsec encapsulation BPF layer definitions +esp.h - IPSEC Encapsulating Security Payload definitions +ether.h - Ethernet definitions +ethertype.h - Ethernet type value definitions extract.h - alignment definitions fddi.h - Fiber Distributed Data Interface definitions +gmpls.c - GMPLS definitions +gmpls.h - GMPLS declarations gmt2local.c - time conversion routines gmt2local.h - time conversion prototypes +icmp6.h - ICMPv6 definitiions +ieee802_11.h - IEEE 802.11 definitions igrp.h - Interior Gateway Routing Protocol definitions install-sh - BSD style install script interface.h - globals, prototypes and definitions +ip.h - IP definitions +ip6.h - IPv6 definitions +ipfc.h - IP-over-Fibre Channel definitions +ipproto.h - IP protocol type value definitions ipsec_doi.h - ISAKMP packet definitions - RFC2407 ipx.h - IPX definitions isakmp.h - ISAKMP packet definitions - RFC2408 -l2tp.h - -lane.h - -lbl/gnuc.h - gcc macros and defines -lbl/os-*.h - os dependent defines and prototypes +l2tp.h - Layer Two Tunneling Protocol definitions +lane.h - ATM LANE definitions +lbl/os-*.h - OS-dependent defines and prototypes llc.h - LLC definitions machdep.c - machine dependent routines machdep.h - machine dependent definitions @@ -93,82 +111,114 @@ ospf.h - Open Shortest Path First definitions ospf6.h - IPv6 Open Shortest Path First definitions packetdat.awk - TCP chunk summary awk script parsenfsfh.c - Network File System file parser routines +pcap-missing.h - declarations of functions possibly missing from libpcap ppp.h - Point to Point Protocol definitions +print-802_11.c - IEEE 802.11 printer routines +print-ap1394.c - Apple IP-over-IEEE 1394 printer routines print-ah.c - IPSEC Authentication Header printer routines +print-aodv.c - AODV printer routines +print-arcnet.c - ARCNET printer routines print-arp.c - Address Resolution Protocol printer routines print-ascii.c - ASCII packet dump routines print-atalk.c - AppleTalk printer routines -print-atm.c - atm printer routines +print-atm.c - ATM printer routines print-bgp.c - Border Gateway Protocol printer routines print-bootp.c - BOOTP and IPv4 DHCP printer routines -print-chdlc.c - CHDLC printer routines +print-beep.c - BEEP printer routines +print-cdp.c - Cisco Discovery Protocol printer routines +print-chdlc.c - Cisco HDLC printer routines print-cip.c - Classical-IP over ATM routines print-cnfp.c - Cisco NetFlow printer routines print-decnet.c - DECnet printer routines print-dhcp6.c - IPv6 DHCP printer routines print-domain.c - Domain Name System printer routines print-dvmrp.c - Distance Vector Multicast Routing Protocol printer routines +print-enc.c - OpenBSD IPsec encapsulation BPF layer printer routines print-egp.c - External Gateway Protocol printer routines print-esp.c - IPSEC Encapsulating Security Payload printer routines -print-ether.c - ethernet printer routines +print-ether.c - Ethernet printer routines print-fddi.c - Fiber Distributed Data Interface printer routines +print-fr.c - Frame Relay printer routines print-frag6.c - IPv6 fragmentation header printer routines print-gre.c - Generic Routing Encapsulation printer routines +print-hsrp.c - Cisco Hot Standby Router Protocol printer routines print-icmp.c - Internet Control Message Protocol printer routines print-icmp6.c - IPv6 Internet Control Message Protocol printer routines +print-igmp.c - Internet Group Management Protocol printer routines print-igrp.c - Interior Gateway Routing Protocol printer routines -print-ip.c - ip printer routines +print-ip.c - IP printer routines print-ip6.c - IPv6 printer routines print-ip6opts.c - IPv6 header option printer routines print-ipcomp.c - IP Payload Compression Protocol printer routines print-ipx.c - IPX printer routines print-isakmp.c - Internet Security Association and Key Management Protocol -print-isoclns.c - isoclns printer routines +print-isoclns.c - ISO CLNS, ESIS, and ISIS printer routines print-krb.c - Kerberos printer routines print-l2tp.c - Layer Two Tunneling Protocol printer routines -print-lane.c - -print-lcp.c - -print-llc.c - llc printer routines +print-lane.c - ATM LANE printer routines +print-llc.c - IEEE 802.2 LLC printer routines +print-lwres.c - Lightweight Resolver protocol printer routines print-mobile.c - IPv4 mobility printer routines -print-netbios.c - netbios printer routines +print-mobility.c - IPv6 mobility printer routines +print-mpls.c - Multi-Protocol Label Switching printer routines +print-msdp.c - Multicast Source Discovery Protocol printer routines +print-netbios.c - NetBIOS frame protocol printer routines print-nfs.c - Network File System printer routines print-ntp.c - Network Time Protocol printer routines -print-null.c - null printer routines +print-null.c - BSD loopback device printer routines print-ospf.c - Open Shortest Path First printer routines print-ospf6.c - IPv6 Open Shortest Path First printer routines +print-pflog.c - OpenBSD packet filter log file printer routines print-pim.c - Protocol Independent Multicast printer routines print-ppp.c - Point to Point Protocol printer routines -print-pppoe.c - -print-raw.c - raw printer routines +print-pppoe.c - PPP-over-Ethernet printer routines +print-pptp.c - Point-to-Point Tunnelling Protocol printer routines +print-radius.c - Radius protocol printer routines +print-raw.c - Raw IP printer routines print-rip.c - Routing Information Protocol printer routines print-ripng.c - IPv6 Routing Information Protocol printer routines +print-rsvp.c - Resource reSerVation Protocol (RSVP) printer routines print-rt6.c - IPv6 routing header printer routines print-rx.c - AFS RX printer routines +print-sctp.c - Stream Control Transmission Protocol printer routines print-sl.c - Compressed Serial Line Internet Protocol printer routines -print-smb.c - SMB (samba) printer routines +print-sll.c - Linux "cooked" capture printer routines +print-smb.c - SMB/CIFS printer routines print-snmp.c - Simple Network Management Protocol printer routines print-stp.c - IEEE 802.1d spanning tree protocol printer routines +print-sunatm.c - SunATM DLPI capture printer routines print-sunrpc.c - Sun Remote Procedure Call printer routines print-tcp.c - TCP printer routines print-telnet.c - Telnet option printer routines print-tftp.c - Trivial File Transfer Protocol printer routines +print-timed.c - BSD time daemon protocol printer routines print-token.c - Token Ring printer routines print-udp.c - UDP printer routines -print-vjc.c - PPP Van Jacovson compression (RFC1144) printer routines +print-vjc.c - PPP Van Jacobson compression (RFC1144) printer routines print-vrrp.c - Virtual Router Redundancy Protocol -print-wb.c - white board printer routines +print-wb.c - White Board printer routines +print-zephyr.c - Zephyr printer routines route6d.h - packet definition for IPv6 Routing Information Protocol -rx.h - -savestr.c - strdup() replacement -savestr.h - savestr prototypes +rx.h - AFS RX definitions +sctpConstants.h - Stream Control Transmission Protocol constant definitions +sctpHeader.h - Stream Control Transmission Protocol packet definitions send-ack.awk - unidirectional tcp send/ack awk script -setsignal.c - os independent signal routines -setsignal.h - os independent signal prototypes -smb.h - -smbutil.c - +setsignal.c - OS-independent signal routines +setsignal.h - OS-independent signal prototypes +slcompress.h - SLIP/PPP Van Jacobson compression (RFC1144) definitions +slip.h - SLIP definitions +sll.h - Linux "cooked" capture definitions +smb.h - SMB/CIFS definitions +smbutil.c - SMB/CIFS utility routines stime.awk - TCP send awk script strcasecmp.c - missing routine +tcp.h - TCP definitions tcpdump.1 - manual entry tcpdump.c - main program +telnet.h - Telnet definitions +timed.h - BSD time daemon protocol definitions +token.h - Token Ring definitions +udp.h - UDP definitions util.c - utility routines vfprintf.c - emulation routine +win32 - headers and routines for building on Win32 systems diff --git a/dist/tcpdump/Makefile.in b/dist/tcpdump/Makefile.in index 41507bd7484f..44ac67f846cb 100644 --- a/dist/tcpdump/Makefile.in +++ b/dist/tcpdump/Makefile.in @@ -17,7 +17,7 @@ # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#) Header: /tcpdump/master/tcpdump/Makefile.in,v 1.261 2002/02/05 10:07:39 guy Exp (LBL) +# @(#) Header: /tcpdump/master/tcpdump/Makefile.in,v 1.276.2.4 2004/03/28 21:25:02 fenner Exp (LBL) # # Various configurable paths (remember to edit Makefile.in, not Makefile) @@ -43,7 +43,7 @@ CC = @CC@ PROG = tcpdump CCOPT = @V_CCOPT@ INCLS = -I. @V_INCLS@ -DEFS = @DEFS@ +DEFS = @DEFS@ @V_DEFS@ # Standard CFLAGS CFLAGS = $(CCOPT) $(DEFS) $(INCLS) @@ -65,25 +65,26 @@ INSTALL_DATA = @INSTALL_DATA@ @rm -f $@ $(CC) $(CFLAGS) -c $(srcdir)/$*.c -CSRC = addrtoname.c gmt2local.c machdep.c parsenfsfh.c \ - print-802_11.c print-ah.c print-arcnet.c print-arp.c \ - print-ascii.c print-atalk.c print-atm.c print-bgp.c \ - print-bootp.c print-beep.c print-cdp.c print-chdlc.c \ - print-cip.c print-cnfp.c print-decnet.c print-domain.c \ - print-dvmrp.c print-egp.c print-esp.c print-ether.c \ - print-fddi.c print-gre.c print-hsrp.c print-icmp.c \ - print-igmp.c print-igrp.c print-ip.c print-ipcomp.c \ +CSRC = addrtoname.c gmpls.c gmt2local.c machdep.c oui.c parsenfsfh.c \ + print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \ + print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \ + print-beep.c print-bfd.c print-bgp.c print-bootp.c print-cdp.c \ + print-chdlc.c print-cip.c print-cnfp.c print-decnet.c \ + print-domain.c print-dvmrp.c print-enc.c print-egp.c \ + print-esp.c print-ether.c print-fddi.c print-fr.c \ + print-gre.c print-hsrp.c print-icmp.c print-igmp.c \ + print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c \ print-ipx.c print-isakmp.c print-isoclns.c print-krb.c \ - print-l2tp.c print-lane.c print-lcp.c print-llc.c print-lwres.c \ - print-msdp.c print-mobile.c print-mpls.c print-nfs.c \ - print-ntp.c print-null.c print-ospf.c print-pflog.c \ - print-pim.c print-ppp.c print-pppoe.c print-pptp.c \ - print-radius.c print-raw.c print-rip.c print-rx.c \ - print-sctp.c print-sl.c print-sll.c print-snmp.c \ - print-stp.c print-sunrpc.c print-tcp.c \ - print-telnet.c print-tftp.c print-timed.c print-token.c \ - print-udp.c print-vjc.c print-vrrp.c print-wb.c print-zephyr.c \ - setsignal.c tcpdump.c util.c + print-l2tp.c print-lane.c print-ldp.c print-llc.c \ + print-lwres.c print-mobile.c print-mpls.c print-msdp.c \ + print-nfs.c print-ntp.c print-null.c print-ospf.c \ + print-pflog.c print-pim.c print-ppp.c print-pppoe.c \ + print-pptp.c print-radius.c print-raw.c print-rip.c \ + print-rsvp.c print-rx.c print-sctp.c print-sl.c print-sll.c \ + print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \ + print-tcp.c print-telnet.c print-tftp.c print-timed.c \ + print-token.c print-udp.c print-vjc.c print-vrrp.c \ + print-wb.c print-zephyr.c setsignal.c tcpdump.c util.c LOCALSRC = @LOCALSRC@ GENSRC = version.c @@ -99,7 +100,7 @@ HDR = addrtoname.h appletalk.h bootp.h decnet.h \ ipx.h llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h \ setsignal.h \ gnuc.h ipsec_doi.h isakmp.h l2tp.h nameser.h \ - netbios.h oakley.h ospf6.h ppp.h route6d.h + netbios.h oakley.h ospf6.h pf.h ppp.h route6d.h TAGHDR = \ /usr/include/arpa/tftp.h \ @@ -122,6 +123,10 @@ $(PROG): $(OBJ) @V_PCAPDEP@ @rm -f $@ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) +datalinks.o: $(srcdir)/missing/datalinks.c + $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c +dlnames.o: $(srcdir)/missing/dlnames.c + $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c getnameinfo.o: $(srcdir)/missing/getnameinfo.c $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c @@ -138,6 +143,8 @@ strlcat.o: $(srcdir)/missing/strlcat.c $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c strlcpy.o: $(srcdir)/missing/strlcpy.c $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c +strsep.o: $(srcdir)/missing/strsep.c + $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c version.o: version.c $(CC) $(CFLAGS) -c version.c diff --git a/dist/tcpdump/README b/dist/tcpdump/README index 03d1b3987b9c..c123c60eda08 100644 --- a/dist/tcpdump/README +++ b/dist/tcpdump/README @@ -1,6 +1,6 @@ -@(#) Header: /tcpdump/master/tcpdump/README,v 1.62 2002/05/29 07:04:09 guy Exp (LBL) +@(#) Header: /tcpdump/master/tcpdump/README,v 1.63.2.1 2003/11/16 10:17:30 guy Exp (LBL) -TCPDUMP 3.7.1 +TCPDUMP 3.8 Now maintained by "The Tcpdump Group" See www.tcpdump.org @@ -11,8 +11,8 @@ Anonymous CVS is available via: (password "anoncvs") cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout tcpdump -Version 3.7.1 of TCPDUMP can be retrived with the CVS tag "tcpdump_3_7rel1": - cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_3_7rel1 tcpdump +Version 3.8 of TCPDUMP can be retrived with the CVS tag "tcpdump_3_8rel1": + cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_3_8rel1 tcpdump Please send patches against the master copy to patches@tcpdump.org. diff --git a/dist/tcpdump/VERSION b/dist/tcpdump/VERSION index a76ccff2a6e0..269aa9c86de7 100644 --- a/dist/tcpdump/VERSION +++ b/dist/tcpdump/VERSION @@ -1 +1 @@ -3.7.1 +3.8.3 diff --git a/dist/tcpdump/acconfig.h b/dist/tcpdump/acconfig.h index dc5e418d3035..a5a0f06f861a 100644 --- a/dist/tcpdump/acconfig.h +++ b/dist/tcpdump/acconfig.h @@ -1,4 +1,4 @@ -/* $NetBSD: acconfig.h,v 1.1.1.3 2002/05/31 09:28:27 itojun Exp $ */ +/* $NetBSD: acconfig.h,v 1.1.1.4 2004/09/27 17:06:29 dyoung Exp $ */ /* "generated automatically" means DO NOT MAKE CHANGES TO config.h.in -- * make them to acconfig.h and rerun autoheader */ @@ -67,6 +67,27 @@ /* define if you have ether_ntohost() and it works */ #undef USE_ETHER_NTOHOST +/* define if libpcap has pcap_version */ +#undef HAVE_PCAP_VERSION + +/* define if libpcap has pcap_debug */ +#undef HAVE_PCAP_DEBUG + +/* define if libpcap has yydebug */ +#undef HAVE_YYDEBUG + +/* define if libpcap has pcap_list_datalinks() */ +#undef HAVE_PCAP_LIST_DATALINKS + +/* define if libpcap has pcap_set_datalink() */ +#undef HAVE_PCAP_SET_DATALINK + +/* define if libpcap has pcap_datalink_name_to_val() */ +#undef HAVE_PCAP_DATALINK_NAME_TO_VAL + +/* define if libpcap has pcap_datalink_val_to_description() */ +#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION + /* define if unaligned memory accesses fail */ #undef LBL_ALIGN @@ -84,6 +105,7 @@ /* Workaround for missing sized types */ /* XXX this should move to the more standard uint*_t */ +#undef int8_t #undef int16_t #undef int32_t #undef u_int16_t diff --git a/dist/tcpdump/aclocal.m4 b/dist/tcpdump/aclocal.m4 index 9830fbd3de7b..b2d273ca6f99 100644 --- a/dist/tcpdump/aclocal.m4 +++ b/dist/tcpdump/aclocal.m4 @@ -1,4 +1,4 @@ -dnl @(#) Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.81 2002/04/24 06:34:18 guy Exp (LBL) +dnl @(#) Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.98.2.4 2004/03/28 21:04:49 fenner Exp (LBL) dnl dnl Copyright (c) 1995, 1996, 1997, 1998 dnl The Regents of the University of California. All rights reserved. @@ -157,6 +157,51 @@ AC_DEFUN(AC_LBL_C_INIT, fi ]) +# +# Try compiling a sample of the type of code that appears in +# gencode.c with "inline", "__inline__", and "__inline". +# +# Autoconf's AC_C_INLINE, at least in autoconf 2.13, isn't good enough, +# as it just tests whether a function returning "int" can be inlined; +# at least some versions of HP's C compiler can inline that, but can't +# inline a function that returns a struct pointer. +# +AC_DEFUN(AC_LBL_C_INLINE, + [AC_MSG_CHECKING(for inline) + AC_CACHE_VAL(ac_cv_lbl_inline, [ + ac_cv_lbl_inline="" + ac_lbl_cc_inline=no + for ac_lbl_inline in inline __inline__ __inline + do + AC_TRY_COMPILE( + [#define inline $ac_lbl_inline + static inline struct iltest *foo(void); + struct iltest { + int iltest1; + int iltest2; + }; + + static inline struct iltest * + foo() + { + static struct iltest xxx; + + return &xxx; + }],,ac_lbl_cc_inline=yes,) + if test "$ac_lbl_cc_inline" = yes ; then + break; + fi + done + if test "$ac_lbl_cc_inline" = yes ; then + ac_cv_lbl_inline=$ac_lbl_inline + fi]) + if test ! -z "$ac_cv_lbl_inline" ; then + AC_MSG_RESULT($ac_cv_lbl_inline) + else + AC_MSG_RESULT(no) + fi + AC_DEFINE_UNQUOTED(inline, $ac_cv_lbl_inline, [Define as token for inline if inlining supported])]) + dnl dnl Use pfopen.c if available and pfopen() not in standard libraries dnl Require libpcap @@ -191,9 +236,9 @@ AC_DEFUN(AC_LBL_LIBPCAP, AC_MSG_CHECKING(for local pcap library) libpcap=FAIL lastdir=FAIL - places=`ls .. | sed -e 's,/$,,' -e 's,^,../,' | \ + places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ egrep '/libpcap-[[0-9]]*.[[0-9]]*(.[[0-9]]*)?([[ab]][[0-9]]*)?$'` - for dir in $places ../libpcap libpcap ; do + for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do basedir=`echo $dir | sed -e 's/[[ab]][[0-9]]*$//'` if test $lastdir = $basedir ; then dnl skip alphas when an actual release is present @@ -212,6 +257,36 @@ AC_DEFUN(AC_LBL_LIBPCAP, if test $libpcap = FAIL ; then AC_MSG_ERROR(see the INSTALL doc for more info) fi + dnl + dnl Good old Red Hat Linux puts "pcap.h" in + dnl "/usr/include/pcap"; had the LBL folks done so, + dnl that would have been a good idea, but for + dnl the Red Hat folks to do so just breaks source + dnl compatibility with other systems. + dnl + dnl We work around this by assuming that, as we didn't + dnl find a local libpcap, libpcap is in /usr/lib or + dnl /usr/local/lib and that the corresponding header + dnl file is under one of those directories; if we don't + dnl find it in either of those directories, we check to + dnl see if it's in a "pcap" subdirectory of them and, + dnl if so, add that subdirectory to the "-I" list. + dnl + AC_MSG_CHECKING(for extraneous pcap header directories) + if test \( ! -r /usr/local/include/pcap.h \) -a \ + \( ! -r /usr/include/pcap.h \); then + if test -r /usr/local/include/pcap/pcap.h; then + d="/usr/local/include/pcap" + elif test -r /usr/include/pcap/pcap.h; then + d="/usr/include/pcap" + fi + fi + if test -z "$d" ; then + AC_MSG_RESULT(not found) + else + $2="-I$d $$2" + AC_MSG_RESULT(found -- -I$d added) + fi else $1=$libpcap places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ @@ -235,8 +310,42 @@ AC_DEFUN(AC_LBL_LIBPCAP, AC_MSG_RESULT(yes) LIBS="$LIBS -I:$pseexe" fi + # + # We need "-lodm" and "-lcfg", as libpcap requires them on + # AIX, and we just build a static libpcap.a and thus can't + # arrange that when you link with libpcap you automatically + # link with those libraries. + # + LIBS="$LIBS -lodm -lcfg" ;; - esac]) + esac + + dnl + dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()", + dnl and "pcap_datalink_name_to_val()", and use substitute versions + dnl if they're not present + dnl + AC_CHECK_FUNC(pcap_list_datalinks, + AC_DEFINE(HAVE_PCAP_LIST_DATALINKS), + AC_LIBOBJ(datalinks)) + AC_CHECK_FUNC(pcap_set_datalink, + AC_DEFINE(HAVE_PCAP_SET_DATALINK)) + AC_CHECK_FUNC(pcap_datalink_name_to_val, + [ + AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL) + AC_CHECK_FUNC(pcap_datalink_val_to_description, + AC_DEFINE(HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION), + AC_LIBOBJ(dlnames)) + ], + AC_LIBOBJ(dlnames)) + + dnl + dnl Check for "pcap_breakloop()"; you can't substitute for it if + dnl it's absent (it has hooks into the live capture routines), + dnl so just define the HAVE_ value if it's there. + dnl + AC_CHECK_FUNCS(pcap_breakloop) +]) dnl dnl Define RETSIGTYPE and RETSIGVAL @@ -493,8 +602,39 @@ AC_DEFUN(AC_LBL_UNALIGNED_ACCESS, AC_CACHE_VAL(ac_cv_lbl_unaligned_fail, [case "$host_cpu" in + # + # These are CPU types where: + # + # the CPU faults on an unaligned access, but at least some + # OSes that support that CPU catch the fault and simulate + # the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) - + # the simulation is slow, so we don't want to use it; + # + # the CPU, I infer (from the old + # # XXX: should also check that they don't do weird things (like on arm) - alpha*|arm*|hp*|mips*|sparc*|ia64) + # + # comment) doesn't fault on unaligned accesses, but doesn't + # do a normal unaligned fetch, either (e.g., presumably, ARM); + # + # for whatever reason, the test program doesn't work + # (this has been claimed to be the case for several of those + # CPUs - I don't know what the problem is; the problem + # was reported as "the test program dumps core" for SuperH, + # but that's what the test program is *supposed* to do - + # it dumps core before it writes anything, so the test + # for an empty output file should find an empty output + # file and conclude that unaligned accesses don't work). + # + # This run-time test won't work if you're cross-compiling, so + # in order to support cross-compiling for a particular CPU, + # we have to wire in the list of CPU types anyway, as far as + # I know, so perhaps we should just have a set of CPUs on + # which we know it doesn't work, a set of CPUs on which we + # know it does work, and have the script just fail on other + # cpu types and update it when such a failure occurs. + # + alpha*|arm*|hp*|mips*|sh*|sparc*|ia64|nv1) ac_cv_lbl_unaligned_fail=yes ;; @@ -549,7 +689,8 @@ EOF dnl dnl If using gcc and the file .devel exists: dnl Compile with -g (if supported) and -Wall -dnl If using gcc 2, do extra prototype checking +dnl If using gcc 2 or later, do extra prototype checking and some other +dnl checks dnl If an os prototype include exists, symlink os-proto.h to it dnl dnl usage: @@ -575,7 +716,7 @@ AC_DEFUN(AC_LBL_DEVEL, fi $1="$$1 -Wall" if test $ac_cv_lbl_gcc_vers -gt 1 ; then - $1="$$1 -Wmissing-prototypes -Wstrict-prototypes" + $1="$$1 -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W" fi fi else @@ -613,6 +754,11 @@ dnl results: dnl dnl LIBS dnl +dnl XXX - "AC_LBL_LIBRARY_NET" was redone to use "AC_SEARCH_LIBS" +dnl rather than "AC_LBL_CHECK_LIB", so this isn't used any more. +dnl We keep it around for reference purposes in case it's ever +dnl useful in the future. +dnl define(AC_LBL_CHECK_LIB, [AC_MSG_CHECKING([for $2 in -l$1]) @@ -1052,6 +1198,9 @@ ac_cv___attribute__=yes, ac_cv___attribute__=no)]) if test "$ac_cv___attribute__" = "yes"; then AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__]) + V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\"" +else + V_DEFS="$V_DEFS -D_U_=\"\"" fi AC_MSG_RESULT($ac_cv___attribute__) ]) diff --git a/dist/tcpdump/aodv.h b/dist/tcpdump/aodv.h new file mode 100644 index 000000000000..7c75a9eaf717 --- /dev/null +++ b/dist/tcpdump/aodv.h @@ -0,0 +1,192 @@ +/* $NetBSD: aodv.h,v 1.1.1.1 2004/09/27 17:06:30 dyoung Exp $ */ + +/* @(#) Header: /tcpdump/master/tcpdump/aodv.h,v 1.3 2003/09/13 01:34:42 guy Exp (LBL) */ +/* + * Copyright (c) 2003 Bruce M. Simpson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Bruce M. Simpson. + * 4. Neither the name of Bruce M. Simpson nor the names of co- + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Bruce M. Simpson AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Bruce M. Simpson OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _AODV_H_ +#define _AODV_H_ + +struct aodv_rreq { + u_int8_t rreq_type; /* AODV message type (1) */ + u_int8_t rreq_flags; /* various flags */ + u_int8_t rreq_zero0; /* reserved, set to zero */ + u_int8_t rreq_hops; /* number of hops from originator */ + u_int32_t rreq_id; /* request ID */ + u_int32_t rreq_da; /* destination IPv4 address */ + u_int32_t rreq_ds; /* destination sequence number */ + u_int32_t rreq_oa; /* originator IPv4 address */ + u_int32_t rreq_os; /* originator sequence number */ +}; +#ifdef INET6 +struct aodv_rreq6 { + u_int8_t rreq_type; /* AODV message type (1) */ + u_int8_t rreq_flags; /* various flags */ + u_int8_t rreq_zero0; /* reserved, set to zero */ + u_int8_t rreq_hops; /* number of hops from originator */ + u_int32_t rreq_id; /* request ID */ + struct in6_addr rreq_da; /* destination IPv6 address */ + u_int32_t rreq_ds; /* destination sequence number */ + struct in6_addr rreq_oa; /* originator IPv6 address */ + u_int32_t rreq_os; /* originator sequence number */ +}; +struct aodv_rreq6_draft_01 { + u_int8_t rreq_type; /* AODV message type (16) */ + u_int8_t rreq_flags; /* various flags */ + u_int8_t rreq_zero0; /* reserved, set to zero */ + u_int8_t rreq_hops; /* number of hops from originator */ + u_int32_t rreq_id; /* request ID */ + u_int32_t rreq_ds; /* destination sequence number */ + u_int32_t rreq_os; /* originator sequence number */ + struct in6_addr rreq_da; /* destination IPv6 address */ + struct in6_addr rreq_oa; /* originator IPv6 address */ +}; +#endif + +#define RREQ_JOIN 0x80 /* join (reserved for multicast */ +#define RREQ_REPAIR 0x40 /* repair (reserved for multicast */ +#define RREQ_GRAT 0x20 /* gratuitous RREP */ +#define RREQ_DEST 0x10 /* destination only */ +#define RREQ_UNKNOWN 0x08 /* unknown destination sequence num */ +#define RREQ_FLAGS_MASK 0xF8 /* mask for rreq_flags */ + +struct aodv_rrep { + u_int8_t rrep_type; /* AODV message type (2) */ + u_int8_t rrep_flags; /* various flags */ + u_int8_t rrep_ps; /* prefix size */ + u_int8_t rrep_hops; /* number of hops from o to d */ + u_int32_t rrep_da; /* destination IPv4 address */ + u_int32_t rrep_ds; /* destination sequence number */ + u_int32_t rrep_oa; /* originator IPv4 address */ + u_int32_t rrep_life; /* lifetime of this route */ +}; +#ifdef INET6 +struct aodv_rrep6 { + u_int8_t rrep_type; /* AODV message type (2) */ + u_int8_t rrep_flags; /* various flags */ + u_int8_t rrep_ps; /* prefix size */ + u_int8_t rrep_hops; /* number of hops from o to d */ + struct in6_addr rrep_da; /* destination IPv6 address */ + u_int32_t rrep_ds; /* destination sequence number */ + struct in6_addr rrep_oa; /* originator IPv6 address */ + u_int32_t rrep_life; /* lifetime of this route */ +}; +struct aodv_rrep6_draft_01 { + u_int8_t rrep_type; /* AODV message type (17) */ + u_int8_t rrep_flags; /* various flags */ + u_int8_t rrep_ps; /* prefix size */ + u_int8_t rrep_hops; /* number of hops from o to d */ + u_int32_t rrep_ds; /* destination sequence number */ + struct in6_addr rrep_da; /* destination IPv6 address */ + struct in6_addr rrep_oa; /* originator IPv6 address */ + u_int32_t rrep_life; /* lifetime of this route */ +}; +#endif + +#define RREP_REPAIR 0x80 /* repair (reserved for multicast */ +#define RREP_ACK 0x40 /* acknowledgement required */ +#define RREP_FLAGS_MASK 0xC0 /* mask for rrep_flags */ +#define RREP_PREFIX_MASK 0x1F /* mask for prefix size */ + +struct rerr_unreach { + u_int32_t u_da; /* IPv4 address */ + u_int32_t u_ds; /* sequence number */ +}; +#ifdef INET6 +struct rerr_unreach6 { + struct in6_addr u_da; /* IPv6 address */ + u_int32_t u_ds; /* sequence number */ +}; +struct rerr_unreach6_draft_01 { + struct in6_addr u_da; /* IPv6 address */ + u_int32_t u_ds; /* sequence number */ +}; +#endif + +struct aodv_rerr { + u_int8_t rerr_type; /* AODV message type (3 or 18) */ + u_int8_t rerr_flags; /* various flags */ + u_int8_t rerr_zero0; /* reserved, set to zero */ + u_int8_t rerr_dc; /* destination count */ + union { + struct rerr_unreach dest[1]; +#ifdef INET6 + struct rerr_unreach6 dest6[1]; + struct rerr_unreach6_draft_01 dest6_draft_01[1]; +#endif + } r; +}; + +#define RERR_NODELETE 0x80 /* don't delete the link */ +#define RERR_FLAGS_MASK 0x80 /* mask for rerr_flags */ + +struct aodv_rrep_ack { + u_int8_t ra_type; + u_int8_t ra_zero0; +}; + +union aodv { + struct aodv_rreq rreq; + struct aodv_rrep rrep; + struct aodv_rerr rerr; + struct aodv_rrep_ack rrep_ack; +#ifdef INET6 + struct aodv_rreq6 rreq6; + struct aodv_rreq6_draft_01 rreq6_draft_01; + struct aodv_rrep6 rrep6; + struct aodv_rrep6_draft_01 rrep6_draft_01; +#endif +}; + +#define AODV_RREQ 1 /* route request */ +#define AODV_RREP 2 /* route response */ +#define AODV_RERR 3 /* error report */ +#define AODV_RREP_ACK 4 /* route response acknowledgement */ + +#define AODV_V6_DRAFT_01_RREQ 16 /* IPv6 route request */ +#define AODV_V6_DRAFT_01_RREP 17 /* IPv6 route response */ +#define AODV_V6_DRAFT_01_RERR 18 /* IPv6 error report */ +#define AODV_V6_DRAFT_01_RREP_ACK 19 /* IPV6 route response acknowledgment */ + +struct aodv_ext { + u_int8_t type; /* extension type */ + u_int8_t length; /* extension length */ +}; + +struct aodv_hello { + struct aodv_ext eh; /* extension header */ + u_int32_t interval; /* expect my next hello in + * (n) ms */ +}; + +#define AODV_EXT_HELLO 1 + +#endif /* _AODV_H_ */ diff --git a/dist/tcpdump/appletalk.h b/dist/tcpdump/appletalk.h index 7d73b801448d..eaa3a703f733 100644 --- a/dist/tcpdump/appletalk.h +++ b/dist/tcpdump/appletalk.h @@ -1,4 +1,4 @@ -/* $NetBSD: appletalk.h,v 1.1.1.1 2001/06/25 19:26:29 itojun Exp $ */ +/* $NetBSD: appletalk.h,v 1.1.1.2 2004/09/27 17:06:30 dyoung Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993, 1994, 1995, 1996 @@ -22,7 +22,7 @@ * * AppleTalk protocol formats (courtesy Bill Croft of Stanford/SUMEX). * - * @(#) Header: /tcpdump/master/tcpdump/appletalk.h,v 1.13 2000/10/03 02:54:54 itojun Exp (LBL) + * @(#) Header: /tcpdump/master/tcpdump/appletalk.h,v 1.15 2002/12/11 07:13:49 guy Exp (LBL) */ struct LAP { diff --git a/dist/tcpdump/atm.h b/dist/tcpdump/atm.h new file mode 100644 index 000000000000..2fce99e44c27 --- /dev/null +++ b/dist/tcpdump/atm.h @@ -0,0 +1,27 @@ +/* $NetBSD: atm.h,v 1.1.1.1 2004/09/27 17:06:30 dyoung Exp $ */ + +/* + * Copyright (c) 2002 Guy Harris. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code + * distributions retain the above copyright notice and this paragraph + * in its entirety, and (2) distributions including binary code include + * the above copyright notice and this paragraph in its entirety in + * the documentation or other materials provided with the distribution. + * The name of Guy Harris may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#) Header: /tcpdump/master/tcpdump/atm.h,v 1.1 2002/07/11 09:17:22 guy Exp + */ + +/* + * Traffic types for ATM. + */ +#define ATM_UNKNOWN 0 /* Unknown */ +#define ATM_LANE 1 /* LANE */ +#define ATM_LLC 2 /* LLC encapsulation */ diff --git a/dist/tcpdump/atmuni31.h b/dist/tcpdump/atmuni31.h new file mode 100644 index 000000000000..299cbc1815dc --- /dev/null +++ b/dist/tcpdump/atmuni31.h @@ -0,0 +1,89 @@ +/* $NetBSD: atmuni31.h,v 1.1.1.1 2004/09/27 17:06:30 dyoung Exp $ */ + +/* + * Copyright (c) 1997 Yen Yen Lim and North Dakota State University + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Yen Yen Lim and + North Dakota State University + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @(#) Header: /tcpdump/master/tcpdump/atmuni31.h,v 1.2 2002/08/05 07:47:23 guy Exp (LBL) + */ + +/* Based on UNI3.1 standard by ATM Forum */ + +/* ATM traffic types based on VPI=0 and (the following VCI */ +#define PPC 0x05 /* Point-to-point signal msg */ +#define BCC 0x02 /* Broadcast signal msg */ +#define OAMF4SC 0x03 /* Segment OAM F4 flow cell */ +#define OAMF4EC 0x04 /* End-to-end OAM F4 flow cell */ +#define METAC 0x01 /* Meta signal msg */ +#define ILMIC 0x10 /* ILMI msg */ + +/* Q.2931 signalling messages */ +#define CALL_PROCEED 0x02 /* call proceeding */ +#define CONNECT 0x07 /* connect */ +#define CONNECT_ACK 0x0f /* connect_ack */ +#define SETUP 0x05 /* setup */ +#define RELEASE 0x4d /* release */ +#define RELEASE_DONE 0x5a /* release_done */ +#define RESTART 0x46 /* restart */ +#define RESTART_ACK 0x4e /* restart ack */ +#define STATUS 0x7d /* status */ +#define STATUS_ENQ 0x75 /* status ack */ +#define ADD_PARTY 0x80 /* add party */ +#define ADD_PARTY_ACK 0x81 /* add party ack */ +#define ADD_PARTY_REJ 0x82 /* add party rej */ +#define DROP_PARTY 0x83 /* drop party */ +#define DROP_PARTY_ACK 0x84 /* drop party ack */ + +/* Information Element Parameters in the signalling messages */ +#define CAUSE 0x08 /* cause */ +#define ENDPT_REF 0x54 /* endpoint reference */ +#define AAL_PARA 0x58 /* ATM adaptation layer parameters */ +#define TRAFF_DESCRIP 0x59 /* atm traffic descriptors */ +#define CONNECT_ID 0x5a /* connection identifier */ +#define QOS_PARA 0x5c /* quality of service parameters */ +#define B_HIGHER 0x5d /* broadband higher layer information */ +#define B_BEARER 0x5e /* broadband bearer capability */ +#define B_LOWER 0x5f /* broadband lower information */ +#define CALLING_PARTY 0x6c /* calling party number */ +#define CALLED_PARTY 0x70 /* called party nmber */ + +#define Q2931 0x09 + +/* Q.2931 signalling general messages format */ +#define PROTO_POS 0 /* offset of protocol discriminator */ +#define CALL_REF_POS 2 /* offset of call reference value */ +#define MSG_TYPE_POS 5 /* offset of message type */ +#define MSG_LEN_POS 7 /* offset of mesage length */ +#define IE_BEGIN_POS 9 /* offset of first information element */ + +/* format of signalling messages */ +#define TYPE_POS 0 +#define LEN_POS 2 +#define FIELD_BEGIN_POS 4 diff --git a/dist/tcpdump/bootp.h b/dist/tcpdump/bootp.h index dc3e599cbf6b..96b12d00cd32 100644 --- a/dist/tcpdump/bootp.h +++ b/dist/tcpdump/bootp.h @@ -1,6 +1,6 @@ -/* $NetBSD: bootp.h,v 1.1.1.1 2001/06/25 19:26:29 itojun Exp $ */ +/* $NetBSD: bootp.h,v 1.1.1.2 2004/09/27 17:06:30 dyoung Exp $ */ -/* @(#) Header: /tcpdump/master/tcpdump/bootp.h,v 1.11 2001/01/09 07:39:13 fenner Exp (LBL) */ +/* @(#) Header: /tcpdump/master/tcpdump/bootp.h,v 1.15 2003/07/01 19:16:06 guy Exp (LBL) */ /* * Bootstrap Protocol (BOOTP). RFC951 and RFC1048. * @@ -29,7 +29,7 @@ struct bootp { u_int8_t bp_hops; /* gateway hops */ u_int32_t bp_xid; /* transaction ID */ u_int16_t bp_secs; /* seconds since boot began */ - u_int16_t bp_flags; /* flags: 0x8000 is broadcast */ + u_int16_t bp_flags; /* flags - see bootp_flag_values[] in print-bootp.c */ struct in_addr bp_ciaddr; /* client IP address */ struct in_addr bp_yiaddr; /* 'your' IP address */ struct in_addr bp_siaddr; /* server IP address */ @@ -46,9 +46,8 @@ struct bootp { #define IPPORT_BOOTPS 67 #define IPPORT_BOOTPC 68 -#define BOOTREPLY 2 -#define BOOTREQUEST 1 - +#define BOOTPREPLY 2 +#define BOOTPREQUEST 1 /* * Vendor magic cookie (v_magic) for CMU diff --git a/dist/tcpdump/config.guess b/dist/tcpdump/config.guess index ba661651615d..4c5bde8a2806 100755 --- a/dist/tcpdump/config.guess +++ b/dist/tcpdump/config.guess @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2001-04-20' +timestamp='2003-10-16' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,8 +24,9 @@ timestamp='2001-04-20' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Written by Per Bothner . -# Please send patches to . +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -52,7 +53,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -87,33 +88,45 @@ if test $# != 0; then exit 1 fi +trap 'exit 1' 1 2 15 -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. -# CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 - if test $? = 0 ; then - CC_FOR_BUILD="$c"; break - fi - done - rm -f $dummy.c $dummy.o $dummy.rel + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found + CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac +esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) +# (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi @@ -127,29 +140,31 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) - # Netbsd (nbsd) targets should (where applicable) match one or + # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - *) machine=${UNAME_MACHINE}-unknown ;; + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then @@ -165,71 +180,115 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pegasos:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - cat <$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - esac - fi - rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -242,33 +301,18 @@ EOF Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; @@ -286,6 +330,13 @@ EOF NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; @@ -314,7 +365,7 @@ EOF echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) @@ -328,9 +379,6 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -357,18 +405,6 @@ EOF *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; @@ -385,6 +421,7 @@ EOF echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ @@ -406,15 +443,20 @@ EOF exit (-1); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -475,6 +517,7 @@ EOF exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include @@ -486,8 +529,7 @@ EOF exit(0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -496,7 +538,7 @@ EOF fi exit 0 ;; *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else @@ -536,10 +578,8 @@ EOF 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - case "${HPUX_REV}" in - 11.[0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 @@ -548,12 +588,13 @@ EOF case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac - fi ;; - esac - if [ "${HP_ARCH}" = "" ]; then - sed 's/^ //' << EOF >$dummy.c + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include @@ -586,11 +627,21 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) @@ -598,6 +649,7 @@ EOF echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int @@ -623,8 +675,7 @@ EOF exit (0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -633,7 +684,7 @@ EOF 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; - *9??*:MPE/iX:*:*) + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) @@ -652,9 +703,6 @@ EOF parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -673,40 +721,37 @@ EOF C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -718,10 +763,21 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + # GNU/KFreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -732,11 +788,17 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix + echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin @@ -748,112 +810,84 @@ EOF echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) + # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) - cat >$dummy.c < /* for printf() prototype */ -int main (int argc, char *argv[]) { -#else -int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __MIPSEB__ - printf ("%s-unknown-linux-gnu\n", argv[1]); -#endif -#ifdef __MIPSEL__ - printf ("%sel-unknown-linux-gnu\n", argv[1]); -#endif - return 0; -} + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) - # Determine Lib Version - cat >$dummy.c < -#if defined(__GLIBC__) -extern char __libc_version[]; -extern char __libc_release[]; -#endif -main(argc, argv) - int argc; - char *argv[]; -{ -#if defined(__GLIBC__) - printf("%s %s\n", __libc_version, __libc_release); -#else - printf("unknown\n"); -#endif - return 0; -} -EOF - LIBC="" - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy | grep 1\.99 > /dev/null - if test "$?" = 0 ; then LIBC="libc1" ; fi - fi - rm -f $dummy.c $dummy - echo powerpc-unknown-linux-gnu${LIBC} + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) - cat <$dummy.s - .data - \$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - .text - .globl main - .align 4 - .ent main - main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - LIBC="" - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) UNAME_MACHINE="alpha" ;; - 1-0) UNAME_MACHINE="alphaev5" ;; - 1-1) UNAME_MACHINE="alphaev56" ;; - 1-101) UNAME_MACHINE="alphapca56" ;; - 2-303) UNAME_MACHINE="alphaev6" ;; - 2-307) UNAME_MACHINE="alphaev67" ;; - esac - objdump --private-headers $dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.s $dummy + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) @@ -870,6 +904,9 @@ EOF s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; @@ -883,71 +920,62 @@ EOF # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. - ld_supported_emulations=`cd /; ld --help 2>&1 \ - | sed -ne '/supported emulations:/!d + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g - s/.*supported emulations: *// + s/.*supported targets: *// s/ .*// p'` - case "$ld_supported_emulations" in - i*86linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 - ;; - elf_i*86) + case "$ld_supported_targets" in + elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; - i*86coff) + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 - ;; - esac - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - case "${UNAME_MACHINE}" in - i*86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; esac # Determine whether the default compiler is a.out or elf - cat >$dummy.c < -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) @@ -958,6 +986,23 @@ EOF # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -966,36 +1011,32 @@ EOF echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; - i*86:*:5:7*) - # Fixed at (any) Pentium or better - UNAME_MACHINE=i586 - if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then - echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1019,9 +1060,15 @@ EOF # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -1038,9 +1085,6 @@ EOF mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; @@ -1067,8 +1111,8 @@ EOF echo ns32k-sni-sysv fi exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) @@ -1080,6 +1124,10 @@ EOF # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; @@ -1108,6 +1156,9 @@ EOF SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; @@ -1115,18 +1166,24 @@ EOF echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) - echo `uname -p`-apple-darwin${UNAME_RELEASE} + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) + NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1149,11 +1206,6 @@ EOF fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; @@ -1172,11 +1224,18 @@ EOF *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; + *:DRAGONFLY:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly${UNAME_RELEASE} + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +eval $set_cc_for_build cat >$dummy.c < @@ -1291,8 +1350,7 @@ main () } EOF -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. diff --git a/dist/tcpdump/config.h.in b/dist/tcpdump/config.h.in index 351cca3edf5d..a8d564d6e90b 100644 --- a/dist/tcpdump/config.h.in +++ b/dist/tcpdump/config.h.in @@ -1,19 +1,7 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ +/* config.h.in. Generated from configure.in by autoheader. */ /* "generated automatically" means DO NOT MAKE CHANGES TO config.h.in -- * make them to acconfig.h and rerun autoheader */ -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define as __inline if that's what the C compiler calls it. */ -#undef inline - -/* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE - -/* Define if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - /* Define if you have SSLeay 0.9.0b with the buggy cast128. */ #undef HAVE_BUGGY_CAST128 @@ -23,12 +11,24 @@ /* Define if you enable support for the libsmi. */ #undef LIBSMI +/* Define if you have the header file. */ +#undef HAVE_SMI_H + /* define if you have struct __res_state_ext */ #undef HAVE_RES_STATE_EXT /* define if your struct __res_state has the nsort member */ #undef HAVE_NEW_RES_STATE + +/* + * define if struct ether_header.ether_dhost is a struct with ether_addr_octet + */ +#undef ETHER_HEADER_HAS_EA + +/* define if struct ether_arp contains arp_xsha */ +#undef ETHER_ARP_HAS_X + /* define if you have the addrinfo function. */ #undef HAVE_ADDRINFO @@ -47,6 +47,9 @@ /* define if this is a development version, to use additional prototypes. */ #undef HAVE_OS_PROTO_H +/* define if defines __P() */ +#undef HAVE_PORTABLE_PROTOTYPE + /* define if RES_USE_INET6 is defined */ #undef HAVE_RES_USE_INET6 @@ -56,9 +59,33 @@ /* define if you have struct sockaddr_storage */ #undef HAVE_SOCKADDR_STORAGE +/* define if you have both getipnodebyname() and getipnodebyaddr() */ +#undef USE_GETIPNODEBY + /* define if you have ether_ntohost() and it works */ #undef USE_ETHER_NTOHOST +/* define if libpcap has pcap_version */ +#undef HAVE_PCAP_VERSION + +/* define if libpcap has pcap_debug */ +#undef HAVE_PCAP_DEBUG + +/* define if libpcap has yydebug */ +#undef HAVE_YYDEBUG + +/* define if libpcap has pcap_list_datalinks() */ +#undef HAVE_PCAP_LIST_DATALINKS + +/* define if libpcap has pcap_set_datalink() */ +#undef HAVE_PCAP_SET_DATALINK + +/* define if libpcap has pcap_datalink_name_to_val() */ +#undef HAVE_PCAP_DATALINK_NAME_TO_VAL + +/* define if libpcap has pcap_datalink_val_to_description() */ +#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION + /* define if unaligned memory accesses fail */ #undef LBL_ALIGN @@ -76,6 +103,7 @@ /* Workaround for missing sized types */ /* XXX this should move to the more standard uint*_t */ +#undef int8_t #undef int16_t #undef int32_t #undef u_int16_t @@ -99,102 +127,167 @@ /* Define if you have a dnet_htoa declaration in . */ #undef HAVE_NETDNET_DNETDB_H_DNET_HTOA -/* The number of bytes in a char. */ -#undef SIZEOF_CHAR - -/* The number of bytes in a int. */ -#undef SIZEOF_INT - -/* The number of bytes in a long. */ -#undef SIZEOF_LONG - -/* The number of bytes in a short. */ -#undef SIZEOF_SHORT - -/* Define if you have the bpf_dump function. */ +/* Define to 1 if you have the `bpf_dump' function. */ #undef HAVE_BPF_DUMP -/* Define if you have the ether_ntohost function. */ +/* Define to 1 if you have the `ether_ntohost' function. */ #undef HAVE_ETHER_NTOHOST -/* Define if you have the getaddrinfo function. */ -#undef HAVE_GETADDRINFO - -/* Define if you have the getnameinfo function. */ -#undef HAVE_GETNAMEINFO - -/* Define if you have the inet_aton function. */ -#undef HAVE_INET_ATON - -/* Define if you have the inet_ntop function. */ -#undef HAVE_INET_NTOP - -/* Define if you have the inet_pton function. */ -#undef HAVE_INET_PTON - -/* Define if you have the pfopen function. */ -#undef HAVE_PFOPEN - -/* Define if you have the setlinebuf function. */ -#undef HAVE_SETLINEBUF - -/* Define if you have the sigaction function. */ -#undef HAVE_SIGACTION - -/* Define if you have the sigset function. */ -#undef HAVE_SIGSET - -/* Define if you have the snprintf function. */ -#undef HAVE_SNPRINTF - -/* Define if you have the strcasecmp function. */ -#undef HAVE_STRCASECMP - -/* Define if you have the strdup function. */ -#undef HAVE_STRDUP - -/* Define if you have the strlcat function. */ -#undef HAVE_STRLCAT - -/* Define if you have the strlcpy function. */ -#undef HAVE_STRLCPY - -/* Define if you have the vfprintf function. */ -#undef HAVE_VFPRINTF - -/* Define if you have the vsnprintf function. */ -#undef HAVE_VSNPRINTF - -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define if you have the header file. */ -#undef HAVE_NETDNET_DNETDB_H +/* Define to 1 if you have the `getaddrinfo' function. */ +#undef HAVE_GETADDRINFO -/* Define if you have the header file. */ -#undef HAVE_NETINET_IF_ETHER_H +/* Define to 1 if you have the `getnameinfo' function. */ +#undef HAVE_GETNAMEINFO -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_CAST_H +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_RC5_H - -/* Define if you have the header file. */ -#undef HAVE_RPC_RPCENT_H - -/* Define if you have the header file. */ -#undef HAVE_SMI_H - -/* Define if you have the crypto library (-lcrypto). */ +/* Define to 1 if you have the `crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO -/* Define if you have the rpc library (-lrpc). */ +/* Define to 1 if you have the `rpc' library (-lrpc). */ #undef HAVE_LIBRPC -/* Define if you have the smi library (-lsmi). */ +/* Define to 1 if you have the `smi' library (-lsmi). */ #undef HAVE_LIBSMI +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDNET_DNETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_ETHER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IF_ETHER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_EVP_H + +/* Define to 1 if you have the `pcap_breakloop' function. */ +#undef HAVE_PCAP_BREAKLOOP + +/* Define to 1 if you have the `pcap_dump_flush' function. */ +#undef HAVE_PCAP_DUMP_FLUSH + +/* Define to 1 if you have the `pcap_findalldevs' function. */ +#undef HAVE_PCAP_FINDALLDEVS + +/* Define to 1 if the system has the type `pcap_if_t'. */ +#undef HAVE_PCAP_IF_T + +/* Define to 1 if you have the `pcap_lib_version' function. */ +#undef HAVE_PCAP_LIB_VERSION + +/* Define to 1 if you have the `pfopen' function. */ +#undef HAVE_PFOPEN + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPC_RPCENT_H + +/* Define to 1 if you have the `setlinebuf' function. */ +#undef HAVE_SETLINEBUF + +/* Define to 1 if you have the `sigaction' function. */ +#undef HAVE_SIGACTION + +/* Define to 1 if you have the `sigset' function. */ +#undef HAVE_SIGSET + +/* Define to 1 if you have the header file. */ +#undef HAVE_SMI_H + +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strftime' function. */ +#undef HAVE_STRFTIME + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strlcat' function. */ +#undef HAVE_STRLCAT + +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + +/* Define to 1 if you have the `strsep' function. */ +#undef HAVE_STRSEP + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vfprintf' function. */ +#undef HAVE_VFPRINTF + +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + /* define if your compiler has __attribute__ */ #undef HAVE___ATTRIBUTE__ +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* The size of a `char', as computed by sizeof. */ +#undef SIZEOF_CHAR + +/* The size of a `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of a `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of a `short', as computed by sizeof. */ +#undef SIZEOF_SHORT + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define as token for inline if inlining supported */ +#undef inline diff --git a/dist/tcpdump/config.sub b/dist/tcpdump/config.sub index a06a480adafd..56981740d6ef 100755 --- a/dist/tcpdump/config.sub +++ b/dist/tcpdump/config.sub @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2001-04-20' +timestamp='2003-11-03' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -29,7 +29,8 @@ timestamp='2001-04-20' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Please send patches to . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -117,7 +118,8 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -157,6 +159,14 @@ case $os in os=-vxworks basic_machine=$1 ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 ;; @@ -215,26 +225,50 @@ esac case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ - | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ - | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 \ - | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ - | hppa64 \ - | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ - | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | sh[34] \ - | powerpc | powerpcle \ - | 1750a | dsp16xx | pdp10 | pdp11 \ - | mips16 | mips64 | mipsel | mips64el \ - | mips64orion | mips64orionel | mipstx39 | mipstx39el \ - | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ - | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ - | v850 | c4x \ - | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ - | pj | pjl | h8500) + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) @@ -242,7 +276,7 @@ case $basic_machine in basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' @@ -257,31 +291,61 @@ case $basic_machine in exit 1 ;; # Recognize the basic CPU types with company name. - # FIXME: clean up the formatting here. - vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ - | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ - | xmp-* | ymp-* \ - | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ - | hppa2.0n-* | hppa64-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ - | alphaev6[78]-* \ - | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ - | clipper-* | orion-* \ - | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ - | mips16-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ - | mipstx39-* | mipstx39el-* | mcore-* \ - | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ - | [cjt]90-* \ - | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ - | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -313,6 +377,9 @@ case $basic_machine in basic_machine=a29k-none os=-bsd ;; + amd64) + basic_machine=x86_64-pc + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -344,6 +411,10 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -364,16 +435,8 @@ case $basic_machine in basic_machine=c38-convex os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; crds | unos) @@ -388,6 +451,14 @@ case $basic_machine in decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola @@ -568,14 +639,6 @@ case $basic_machine in basic_machine=m68k-atari os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; @@ -590,6 +653,10 @@ case $basic_machine in basic_machine=m68k-rom68k os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) basic_machine=i386-pc os=-msdos @@ -662,6 +729,10 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -669,6 +740,14 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose @@ -691,42 +770,58 @@ case $basic_machine in pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | k6 | nexgen) + pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon) + pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; - pentiumii | pentium2) + pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-*) + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumii-* | pentium2-*) + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown - ;; + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown - ;; + ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; @@ -744,10 +839,26 @@ case $basic_machine in rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent ;; @@ -755,7 +866,10 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; - sparclite-wrs) + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -822,22 +936,42 @@ case $basic_machine in os=-dynix ;; t3e) - basic_machine=t3e-cray + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi @@ -859,8 +993,8 @@ case $basic_machine in os=-vms ;; vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -881,13 +1015,13 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) + xps | xps100) basic_machine=xps100-honeywell ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim @@ -908,13 +1042,6 @@ case $basic_machine in op60c) basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm ;; @@ -934,13 +1061,16 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4) + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; + sh64) + basic_machine=sh64-unknown + ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -955,10 +1085,6 @@ case $basic_machine in pmac | pmac-mpw) basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; @@ -1014,15 +1140,19 @@ case $os in | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1034,8 +1164,10 @@ case $os in ;; esac ;; + -nto-qnx*) + ;; -nto*) - os=-nto-qnx + os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ @@ -1044,6 +1176,9 @@ case $os in -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -1056,6 +1191,9 @@ case $os in -opened*) os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince ;; @@ -1074,14 +1212,20 @@ case $os in -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; -nsk*) os=-nsk @@ -1093,6 +1237,9 @@ case $os in -sinix*) os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 ;; @@ -1120,8 +1267,14 @@ case $os in -xenix) os=-xenix ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos ;; -none) ;; @@ -1154,10 +1307,14 @@ case $basic_machine in arm*-semi) os=-aout ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; - pdp11-*) + pdp11-*) os=-none ;; *-dec | vax-*) @@ -1184,6 +1341,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; @@ -1247,19 +1407,19 @@ case $basic_machine in *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; *-masscomp) @@ -1328,10 +1488,16 @@ case $basic_machine in -mvs* | -opened*) vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; - -vxsim* | -vxworks*) + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) @@ -1346,6 +1512,9 @@ case $basic_machine in -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; + -vos*) + vendor=stratus + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; diff --git a/dist/tcpdump/configure b/dist/tcpdump/configure index b6dac4a68bc7..7907b87ec93e 100755 --- a/dist/tcpdump/configure +++ b/dist/tcpdump/configure @@ -1,98 +1,325 @@ #! /bin/sh - -# From configure.in Revision: 1.149 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# From configure.in Revision: 1.169.2.3 . # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.57. # +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Defaults: -ac_help= +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --without-gcc don't use gcc" -ac_help="$ac_help - --enable-smb enable possibly-buggy SMB printer [default=yes] - --disable-smb disable possibly-buggy SMB printer" -ac_help="$ac_help - --enable-ipv6 enable ipv6 (with ipv4) support - --disable-ipv6 disable ipv6 support" -ac_help="$ac_help - --without-crypto disable crypto support" +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="tcpdump.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SHLICC2 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP LIBOBJS V_CCOPT V_DEFS V_GROUP V_INCLS V_PCAPDEP LOCALSRC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LTLIBOBJS' +ac_subst_files='' # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -101,10 +328,15 @@ program_transform_name=s,x,x, silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -118,17 +350,9 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -136,59 +360,59 @@ do continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -197,95 +421,47 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -294,19 +470,19 @@ EOF -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -320,26 +496,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -356,7 +532,7 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -366,7 +542,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -377,58 +553,57 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -439,99 +614,110 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=tcpdump.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -541,13 +727,440 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-smb enable possibly-buggy SMB printer default=yes + --disable-smb disable possibly-buggy SMB printer + --enable-ipv6 enable ipv6 (with ipv4) support + --disable-ipv6 disable ipv6 support + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --without-gcc don't use gcc + --without-crypto disable crypto support + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.57. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -558,39 +1171,103 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi @@ -604,53 +1281,86 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:624: checking host system type" >&5 -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - - - # Check whether --with-gcc or --without-gcc was given. + + + + + +# Check whether --with-gcc or --without-gcc was given. if test "${with_gcc+set}" = set; then withval="$with_gcc" - : -fi +fi; V_CCOPT="-O" V_INCLS="" if test "${srcdir}" != "." ; then @@ -665,32 +1375,38 @@ fi bsdi*) # Extract the first word of "shlicc2", so it can be a program name with args. set dummy shlicc2; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:670: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_SHLICC2'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_SHLICC2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$SHLICC2"; then ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_SHLICC2="yes" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_SHLICC2="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no" fi fi -SHLICC2="$ac_cv_prog_SHLICC2" +SHLICC2=$ac_cv_prog_SHLICC2 if test -n "$SHLICC2"; then - echo "$ac_t""$SHLICC2" 1>&6 + echo "$as_me:$LINENO: result: $SHLICC2" >&5 +echo "${ECHO_T}$SHLICC2" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test $SHLICC2 = yes ; then @@ -704,214 +1420,643 @@ fi CC=cc export CC fi - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:711: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:741: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift - if test $# -gt 0; then + if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:792: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - ;; - esac + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:824: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + test -n "$ac_ct_CC" && break +done -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross + CC=$ac_ct_CC +fi -cat > conftest.$ac_ext << EOF +fi -#line 835 "configure" -#include "confdefs.h" -main(){return(0);} -EOF -if { (eval echo configure:840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no else - ac_cv_prog_cc_cross=yes + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:866: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:871: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done else - cat > conftest.c <&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me #endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes else - GCC= + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:899: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - ac_cv_prog_cc_g=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" + CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" @@ -925,16 +2070,233 @@ else CFLAGS= fi fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$GCC" = yes ; then if test "$SHLICC2" = yes ; then ac_cv_lbl_gcc_vers=2 V_CCOPT="-O2" else - echo $ac_n "checking gcc version""... $ac_c" 1>&6 -echo "configure:936: checking gcc version" >&5 - if eval "test \"`echo '$''{'ac_cv_lbl_gcc_vers'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking gcc version" >&5 +echo $ECHO_N "checking gcc version... $ECHO_C" >&6 + if test "${ac_cv_lbl_gcc_vers+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \ sed -e '/^gcc version /!d' \ @@ -943,83 +2305,127 @@ else -e 's/\..*//'` fi - echo "$ac_t""$ac_cv_lbl_gcc_vers" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_gcc_vers" >&5 +echo "${ECHO_T}$ac_cv_lbl_gcc_vers" >&6 if test $ac_cv_lbl_gcc_vers -gt 1 ; then V_CCOPT="-O2" fi fi else - echo $ac_n "checking that $CC handles ansi prototypes""... $ac_c" 1>&6 -echo "configure:954: checking that $CC handles ansi prototypes" >&5 - if eval "test \"`echo '$''{'ac_cv_lbl_cc_ansi_prototypes'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking that $CC handles ansi prototypes" >&5 +echo $ECHO_N "checking that $CC handles ansi prototypes... $ECHO_C" >&6 + if test "${ac_cv_lbl_cc_ansi_prototypes+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -int main() { +int +main () +{ int frob(int, char *) -; return 0; } -EOF -if { (eval echo configure:966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lbl_cc_ansi_prototypes=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lbl_cc_ansi_prototypes=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lbl_cc_ansi_prototypes=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_lbl_cc_ansi_prototypes" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_ansi_prototypes" >&5 +echo "${ECHO_T}$ac_cv_lbl_cc_ansi_prototypes" >&6 if test $ac_cv_lbl_cc_ansi_prototypes = no ; then case "$host_os" in hpux*) - echo $ac_n "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)""... $ac_c" 1>&6 -echo "configure:984: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5 + echo "$as_me:$LINENO: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5 +echo $ECHO_N "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)... $ECHO_C" >&6 savedcflags="$CFLAGS" CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS" - if eval "test \"`echo '$''{'ac_cv_lbl_cc_hpux_cc_aa'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_lbl_cc_hpux_cc_aa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -int main() { +int +main () +{ int frob(int, char *) -; return 0; } -EOF -if { (eval echo configure:998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lbl_cc_hpux_cc_aa=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lbl_cc_hpux_cc_aa=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lbl_cc_hpux_cc_aa=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_lbl_cc_hpux_cc_aa" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_hpux_cc_aa" >&5 +echo "${ECHO_T}$ac_cv_lbl_cc_hpux_cc_aa" >&6 if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then - { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5 +echo "$as_me: error: see the INSTALL doc for more info" >&2;} + { (exit 1); exit 1; }; } fi CFLAGS="$savedcflags" V_CCOPT="-Aa $V_CCOPT" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _HPUX_SOURCE 1 -EOF +_ACEOF ;; *) - { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5 +echo "$as_me: error: see the INSTALL doc for more info" >&2;} + { (exit 1); exit 1; }; } ;; esac fi @@ -1037,97 +2443,161 @@ EOF ;; ultrix*) - echo $ac_n "checking that Ultrix $CC hacks const in prototypes""... $ac_c" 1>&6 -echo "configure:1042: checking that Ultrix $CC hacks const in prototypes" >&5 - if eval "test \"`echo '$''{'ac_cv_lbl_cc_const_proto'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking that Ultrix $CC hacks const in prototypes" >&5 +echo $ECHO_N "checking that Ultrix $CC hacks const in prototypes... $ECHO_C" >&6 + if test "${ac_cv_lbl_cc_const_proto+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -int main() { +int +main () +{ struct a { int b; }; void c(const struct a *) -; return 0; } -EOF -if { (eval echo configure:1055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lbl_cc_const_proto=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lbl_cc_const_proto=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lbl_cc_const_proto=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_lbl_cc_const_proto" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_const_proto" >&5 +echo "${ECHO_T}$ac_cv_lbl_cc_const_proto" >&6 if test $ac_cv_lbl_cc_const_proto = no ; then - cat >> confdefs.h <<\EOF -#define const -EOF + cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF fi ;; esac fi -echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1079: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 + if test "${ac_cv_lbl_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break + ac_cv_lbl_inline="" + ac_lbl_cc_inline=no + for ac_lbl_inline in inline __inline__ __inline + do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define inline $ac_lbl_inline + static inline struct iltest *foo(void); + struct iltest { + int iltest1; + int iltest2; + }; + + static inline struct iltest * + foo() + { + static struct iltest xxx; + + return &xxx; + } +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lbl_cc_inline=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + if test "$ac_lbl_cc_inline" = yes ; then + break; + fi + done + if test "$ac_lbl_cc_inline" = yes ; then + ac_cv_lbl_inline=$ac_lbl_inline + fi fi -echo "$ac_t""$ac_cv_c_inline" 1>&6 -case "$ac_cv_c_inline" in - inline | yes) ;; - no) cat >> confdefs.h <<\EOF -#define inline -EOF - ;; - *) cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_lbl_inline" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + +cat >>confdefs.h <<_ACEOF +#define inline $ac_cv_lbl_inline +_ACEOF -echo $ac_n "checking for __attribute__""... $ac_c" 1>&6 -echo "configure:1120: checking for __attribute__" >&5 -if eval "test \"`echo '$''{'ac_cv___attribute__'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for __attribute__" >&5 +echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6 +if test "${ac_cv___attribute__+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -int main() { +int +main () +{ static void foo(void) __attribute__ ((noreturn)); @@ -1137,181 +2607,770 @@ foo(void) exit(1); } -; return 0; } -EOF -if { (eval echo configure:1143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv___attribute__=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv___attribute__=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv___attribute__=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi if test "$ac_cv___attribute__" = "yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define HAVE___ATTRIBUTE__ 1 -EOF +_ACEOF + V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\"" +else + V_DEFS="$V_DEFS -D_U_=\"\"" fi -echo "$ac_t""$ac_cv___attribute__" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5 +echo "${ECHO_T}$ac_cv___attribute__" >&6 -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1165: checking how to run the C preprocessor" >&5 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -for ac_hdr in fcntl.h rpc/rpcent.h netinet/if_ether.h netdnet/dnetdb.h + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1248: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no fi rm -f conftest* + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : else - echo "$ac_t""no" 1>&6 + ac_cv_header_stdc=no fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + done -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1285: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + + + + + +for ac_header in fcntl.h rpc/rpcent.h netdnet/dnetdb.h netinet/ether.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in netinet/if_ether.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include #include -int main() { -struct tm *tp; -; return 0; } -EOF -if { (eval echo configure:1299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$ac_t""$ac_cv_header_time" 1>&6 +ac_cv_header_time=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 -EOF +_ACEOF fi @@ -1319,30 +3378,35 @@ fi case "$host_os" in linux*) - echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6 -echo "configure:1324: checking Linux kernel version" >&5 + echo "$as_me:$LINENO: checking Linux kernel version" >&5 +echo $ECHO_N "checking Linux kernel version... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_linux_vers+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_linux_vers=unknown fi else - if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_linux_vers+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_linux_vers=`uname -r 2>&1 | \ sed -n -e '$s/.* //' -e '$s/\..*//p'` fi fi - echo "$ac_t""$ac_cv_linux_vers" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_linux_vers" >&5 +echo "${ECHO_T}$ac_cv_linux_vers" >&6 if test $ac_cv_linux_vers = unknown ; then - { echo "configure: error: cannot determine linux version when cross-compiling" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: cannot determine linux version when cross-compiling" >&5 +echo "$as_me: error: cannot determine linux version when cross-compiling" >&2;} + { (exit 1); exit 1; }; } fi if test $ac_cv_linux_vers -lt 2 ; then - { echo "configure: error: version 2 or higher required; see the INSTALL doc for more info" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: version 2 or higher required; see the INSTALL doc for more info" >&5 +echo "$as_me: error: version 2 or higher required; see the INSTALL doc for more info" >&2;} + { (exit 1); exit 1; }; } fi ;; @@ -1351,112 +3415,236 @@ fi esac -for ac_hdr in smi.h + +for ac_header in smi.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1359: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - echo "$ac_t""no" 1>&6 + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + done -echo $ac_n "checking for smiInit in -lsmi""... $ac_c" 1>&6 -echo "configure:1396: checking for smiInit in -lsmi" >&5 -ac_lib_var=`echo smi'_'smiInit | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking for smiInit in -lsmi" >&5 +echo $ECHO_N "checking for smiInit in -lsmi... $ECHO_C" >&6 +if test "${ac_cv_lib_smi_smiInit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsmi $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char smiInit(); - -int main() { -smiInit() -; return 0; } -EOF -if { (eval echo configure:1415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char smiInit (); +int +main () +{ +smiInit (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_smi_smiInit=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_smi_smiInit=no fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo smi | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_lib_smi_smiInit" >&6 +if test $ac_cv_lib_smi_smiInit = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSMI 1 +_ACEOF LIBS="-lsmi $LIBS" -else - echo "$ac_t""no" 1>&6 fi if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes then -echo $ac_n "checking whether to enable libsmi""... $ac_c" 1>&6 -echo "configure:1445: checking whether to enable libsmi" >&5 +echo "$as_me:$LINENO: checking whether to enable libsmi" >&5 +echo $ECHO_N "checking whether to enable libsmi... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - echo "$ac_t""not when cross-compiling" 1>&6 + echo "$as_me:$LINENO: result: not when cross-compiling" >&5 +echo "${ECHO_T}not when cross-compiling" >&6 libsmi=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* libsmi available check */ #include main() { int current, revision, age, n; const int required = 2; - if (smiInit("")) + if (smiInit("")) exit(1); if (strcmp(SMI_LIBRARY_VERSION, smi_library_version)) exit(2); @@ -1468,85 +3656,109 @@ main() exit(0); } -EOF -if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define LIBSMI 1 -EOF +_ACEOF libsmi=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - case $? in - 1) echo "$ac_t""no - smiInit failed" 1>&6 ;; - 2) echo "$ac_t""no - header/library version mismatch" 1>&6 ;; - 3) echo "$ac_t""no - can't determine library version" 1>&6 ;; - 4) echo "$ac_t""no - too old" 1>&6 ;; - *) echo "$ac_t""no" 1>&6 ;; + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + case $? in + 1) echo "$as_me:$LINENO: result: no - smiInit failed" >&5 +echo "${ECHO_T}no - smiInit failed" >&6 ;; + 2) echo "$as_me:$LINENO: result: no - header/library version mismatch" >&5 +echo "${ECHO_T}no - header/library version mismatch" >&6 ;; + 3) echo "$as_me:$LINENO: result: no - can't determine library version" >&5 +echo "${ECHO_T}no - can't determine library version" >&6 ;; + 4) echo "$as_me:$LINENO: result: no - too old" >&5 +echo "${ECHO_T}no - too old" >&6 ;; + *) echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; esac libsmi=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi fi -fi - -echo $ac_n "checking whether to enable the possibly-buggy SMB printer""... $ac_c" 1>&6 -echo "configure:1500: checking whether to enable the possibly-buggy SMB printer" >&5 +echo "$as_me:$LINENO: checking whether to enable the possibly-buggy SMB printer" >&5 +echo $ECHO_N "checking whether to enable the possibly-buggy SMB printer... $ECHO_C" >&6 # Check whether --enable-smb or --disable-smb was given. if test "${enable_smb+set}" = set; then enableval="$enable_smb" - : + else enableval=yes -fi - +fi; case "$enableval" in -yes) echo "$ac_t""yes" 1>&6 - echo "configure: warning: The SMB printer may have exploitable buffer overflows!!!" 1>&2 - cat >> confdefs.h <<\EOF +yes) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&5 +echo "$as_me: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&2;} + cat >>confdefs.h <<\_ACEOF #define TCPDUMP_DO_SMB 1 -EOF +_ACEOF LOCALSRC="print-smb.c smbutil.c $LOCALSRC" ;; -*) echo "$ac_t""no" 1>&6 +*) echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; esac -CFLAGS="$CFLAGS -Dss_family=__ss_family -Dss_len=__ss_len" -echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6 -echo "configure:1524: checking whether to enable ipv6" >&5 +echo "$as_me:$LINENO: checking whether to enable ipv6" >&5 +echo $ECHO_N "checking whether to enable ipv6... $ECHO_C" >&6 # Check whether --enable-ipv6 or --disable-ipv6 was given. if test "${enable_ipv6+set}" = set; then enableval="$enable_ipv6" case "$enableval" in -yes) echo "$ac_t""yes" 1>&6 - LOCALSRC="print-ip6.c print-ip6opts.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC" - cat >> confdefs.h <<\EOF +yes) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC" + cat >>confdefs.h <<\_ACEOF #define INET6 1 -EOF +_ACEOF ipv6=yes ;; *) - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ipv6=no ;; - esac + esac else if test "$cross_compiling" = yes; then - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ipv6=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* AF_INET6 available check */ #include #include @@ -1558,51 +3770,64 @@ main() exit(0); } -EOF -if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6 - LOCALSRC="print-ip6.c print-ip6opts.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC" - cat >> confdefs.h <<\EOF +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC" + cat >>confdefs.h <<\_ACEOF #define INET6 1 -EOF +_ACEOF ipv6=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - echo "$ac_t""no" 1>&6 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ipv6=no fi -rm -fr conftest* +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - -fi - +fi; ipv6type=unknown ipv6lib=none ipv6trylibc=no if test "$ipv6" = "yes"; then - echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 -echo "configure:1591: checking ipv6 stack type" >&5 + echo "$as_me:$LINENO: checking ipv6 stack type" >&5 +echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6 for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do case $i in inria) - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef IPV6_INRIA_VERSION yes #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i; CFLAGS="-DINET6 $CFLAGS" fi @@ -1610,18 +3835,20 @@ rm -f conftest* ;; kame) - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef __KAME__ yes #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i; ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib; @@ -1632,18 +3859,20 @@ rm -f conftest* ;; linux-glibc) - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 yes #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i; CFLAGS="-DINET6 $CFLAGS" fi @@ -1651,7 +3880,7 @@ rm -f conftest* ;; linux-libinet6) - if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then + if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then ipv6type=$i ipv6lib=inet6 ipv6libdir=/usr/inet6/lib @@ -1660,18 +3889,20 @@ rm -f conftest* fi ;; toshiba) - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef _TOSHIBA_INET6 yes #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i; ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib; @@ -1681,18 +3912,20 @@ rm -f conftest* ;; v6d) - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef __V6D__ yes #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i; ipv6lib=v6; ipv6libdir=/usr/local/v6/lib; @@ -1702,18 +3935,20 @@ rm -f conftest* ;; zeta) - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef _ZETA_MINAMI_INET6 yes #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i; ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib; @@ -1727,7 +3962,8 @@ rm -f conftest* break fi done - echo "$ac_t""$ipv6type" 1>&6 + echo "$as_me:$LINENO: result: $ipv6type" >&5 +echo "${ECHO_T}$ipv6type" >&6 fi if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then @@ -1748,75 +3984,137 @@ fi if test "$ipv6" = "yes"; then - -echo $ac_n "checking for library containing getaddrinfo""... $ac_c" 1>&6 -echo "configure:1754: checking for library containing getaddrinfo" >&5 -if eval "test \"`echo '$''{'ac_cv_search_getaddrinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + # + # XXX - on Tru64 UNIX 5.1, there is no "getaddrinfo()" + # function in libc; there are "ngetaddrinfo()" and + # "ogetaddrinfo()" functions, and #defines + # "getaddrinfo" to be either "ngetaddrinfo" or + # "ogetaddrinfo", depending on whether _SOCKADDR_LEN + # or _XOPEN_SOURCE_EXTENDED are defined or not. + # + # So this test doesn't work on Tru64 5.1, and possibly + # on other 5.x releases. This causes the configure + # script to become confused, and results in libpcap + # being unbuildable. + # + echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5 +echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6 +if test "${ac_cv_search_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_getaddrinfo="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -getaddrinfo() -; return 0; } -EOF -if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getaddrinfo (); +int +main () +{ +getaddrinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_search_getaddrinfo="none required" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_getaddrinfo" = "no" && for i in socket; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -getaddrinfo() -; return 0; } -EOF -if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_getaddrinfo="-l$i" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_getaddrinfo" = no; then + for ac_lib in socket; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getaddrinfo (); +int +main () +{ +getaddrinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_getaddrinfo="-l$ac_lib" break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$ac_t""$ac_cv_search_getaddrinfo" 1>&6 -if test "$ac_cv_search_getaddrinfo" != "no"; then +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6 +if test "$ac_cv_search_getaddrinfo" != no; then test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS" - echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 -echo "configure:1811: checking getaddrinfo bug" >&5 - if eval "test \"`echo '$''{'td_cv_buggygetaddrinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 +echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6 + if test "${td_cv_buggygetaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then td_cv_buggygetaddrinfo=yes else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include @@ -1835,6 +4133,7 @@ main() hints.ai_family = AF_UNSPEC; hints.ai_flags = passive ? AI_PASSIVE : 0; hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { (void)gai_strerror(gaierr); goto bad; @@ -1911,609 +4210,1685 @@ main() exit(1); } -EOF -if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then td_cv_buggygetaddrinfo=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - td_cv_buggygetaddrinfo=yes -fi -rm -fr conftest* -fi + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +td_cv_buggygetaddrinfo=yes +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi fi if test "$td_cv_buggygetaddrinfo" = no; then - echo "$ac_t""good" 1>&6 + echo "$as_me:$LINENO: result: good" >&5 +echo "${ECHO_T}good" >&6 else - echo "$ac_t""buggy" 1>&6 + echo "$as_me:$LINENO: result: buggy" >&5 +echo "${ECHO_T}buggy" >&6 fi if test "$td_cv_buggygetaddrinfo" = "yes"; then + # + # XXX - it doesn't appear that "ipv6type" can ever be + # set to "linux". Should this be testing for + # "linux-glibc", or for that *or* "linux-libinet6"? + # If the latter, note that "linux-libinet6" is also + # the type given to some non-Linux OSes. + # if test "$ipv6type" != "linux"; then echo 'Fatal: You must get working getaddrinfo() function.' echo ' or you can specify "--disable-ipv6"'. exit 1 else echo 'Warning: getaddrinfo() implementation on your system seems be buggy.' - echo ' Better upgreade your system library to newest version' + echo ' Better upgrade your system library to newest version' echo ' of GNU C library (aka glibc).' fi fi - -else : - + fi - for ac_func in getaddrinfo getnameinfo + + + +for ac_func in getaddrinfo getnameinfo do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1954: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:1982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" + LIBOBJS="$LIBOBJS $ac_func.$ac_objext" fi done fi -echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 -echo "configure:2010: checking for inet_ntop" >&5 -cat > conftest.$ac_ext < -#include -#include -#include -int main() { -char src[4], dst[128]; -inet_ntop(AF_INET, src, dst, sizeof(dst)); -; return 0; } -EOF -if { (eval echo configure:2023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 + +echo "$as_me:$LINENO: checking for dnet_htoa declaration in netdnet/dnetdb.h" >&5 +echo $ECHO_N "checking for dnet_htoa declaration in netdnet/dnetdb.h... $ECHO_C" >&6 +if test "${td_cv_decl_netdnet_dnetdb_h_dnet_htoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - for ac_func in inet_ntop -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2034: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" -fi -done - - -fi -rm -f conftest* -echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 -echo "configure:2091: checking for inet_pton" >&5 -cat > conftest.$ac_ext < -#include -#include -#include -int main() { -char src[128], dst[4]; -inet_pton(AF_INET, src, dst); -; return 0; } -EOF -if { (eval echo configure:2104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - for ac_func in inet_pton -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2115: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" -fi -done - - -fi -rm -f conftest* -echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -echo "configure:2172: checking for inet_aton" >&5 -cat > conftest.$ac_ext < -#include -#include -int main() { -char src[128]; -struct in_addr dst; -inet_aton(src, &dst); -; return 0; } -EOF -if { (eval echo configure:2185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - for ac_func in inet_aton -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2196: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" -fi -done - - -fi -rm -f conftest* - - - echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6 -echo "configure:2255: checking if sockaddr struct has sa_len member" >&5 - if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -# include -int main() { -u_int i = sizeof(((struct sockaddr *)0)->sa_len) -; return 0; } -EOF -if { (eval echo configure:2269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sockaddr_has_sa_len=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_sockaddr_has_sa_len=no -fi -rm -f conftest* -fi - - echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6 - if test $ac_cv_sockaddr_has_sa_len = yes ; then - cat >> confdefs.h <<\EOF -#define HAVE_SOCKADDR_SA_LEN 1 -EOF - - fi - -if test "$ac_cv_sockaddr_has_sa_len" = no; then - missing_includes=yes -fi - -echo $ac_n "checking for dnet_htoa declaration in netdnet/dnetdb.h""... $ac_c" 1>&6 -echo "configure:2294: checking for dnet_htoa declaration in netdnet/dnetdb.h" >&5 -if eval "test \"`echo '$''{'td_cv_decl_netdnet_dnetdb_h_dnet_htoa'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "dnet_htoa" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "dnet_htoa" >/dev/null 2>&1; then td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes else - rm -rf conftest* td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no fi rm -f conftest* fi - -echo "$ac_t""$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" 1>&6 +echo "$as_me:$LINENO: result: $td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&5 +echo "${ECHO_T}$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&6 if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1 -EOF +_ACEOF fi -echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:2324: checking size of char" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for char" >&5 +echo $ECHO_N "checking for char... $ECHO_C" >&6 +if test "${ac_cv_type_char+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((char *) 0) + return 0; +if (sizeof (char)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_char=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_char=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5 +echo "${ECHO_T}$ac_cv_type_char" >&6 + +echo "$as_me:$LINENO: checking size of char" >&5 +echo $ECHO_N "checking size of char... $ECHO_C" >&6 +if test "${ac_cv_sizeof_char+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_char" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_char=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - ac_cv_sizeof_char=1 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (char)); } +unsigned long ulongval () { return (long) (sizeof (char)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(char)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (char))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (char)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (char)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } -EOF -if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_char=`cat conftestval` +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_char=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_sizeof_char=0 fi -rm -fr conftest* fi - -fi -echo "$ac_t""$ac_cv_sizeof_char" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_char" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR $ac_cv_sizeof_char -EOF +_ACEOF -echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2363: checking size of short" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for short" >&5 +echo $ECHO_N "checking for short... $ECHO_C" >&6 +if test "${ac_cv_type_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((short *) 0) + return 0; +if (sizeof (short)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_short=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_short=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6 + +echo "$as_me:$LINENO: checking size of short" >&5 +echo $ECHO_N "checking size of short... $ECHO_C" >&6 +if test "${ac_cv_sizeof_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_short" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_short=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - ac_cv_sizeof_short=2 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (short)); } +unsigned long ulongval () { return (long) (sizeof (short)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (short))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (short)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (short)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } -EOF -if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_short=`cat conftestval` +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_sizeof_short=0 fi -rm -fr conftest* fi - -fi -echo "$ac_t""$ac_cv_sizeof_short" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short -EOF +_ACEOF -echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2402: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6 +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((int *) 0) + return 0; +if (sizeof (int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_int=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6 + +echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_int" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - ac_cv_sizeof_int=4 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (int)); } +unsigned long ulongval () { return (long) (sizeof (int)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (int))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (int)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (int)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } -EOF -if { (eval echo configure:2421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_sizeof_int=0 fi -rm -fr conftest* fi - -fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int -EOF +_ACEOF -echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2441: checking size of long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6 +if test "${ac_cv_type_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long *) 0) + return 0; +if (sizeof (long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6 + +echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac else if test "$cross_compiling" = yes; then - ac_cv_sizeof_long=4 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (long)); } +unsigned long ulongval () { return (long) (sizeof (long)); } #include -main() +#include +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; } -EOF -if { (eval echo configure:2460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_sizeof_long=0 fi -rm -fr conftest* fi - -fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long -EOF +_ACEOF - echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 -echo "configure:2483: checking for addrinfo" >&5 - if eval "test \"`echo '$''{'ac_cv_addrinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for addrinfo" >&5 +echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6 + if test "${ac_cv_addrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include -int main() { +int +main () +{ struct addrinfo a -; return 0; } -EOF -if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_addrinfo=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_addrinfo=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_addrinfo=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_addrinfo" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_addrinfo" >&5 +echo "${ECHO_T}$ac_cv_addrinfo" >&6 if test $ac_cv_addrinfo = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ADDRINFO 1 -EOF +_ACEOF else - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NEED_ADDRINFO_H 1 -EOF +_ACEOF fi @@ -2522,36 +5897,39 @@ if test "$ac_cv_addrinfo" = no; then fi - echo $ac_n "checking for NI_MAXSERV""... $ac_c" 1>&6 -echo "configure:2527: checking for NI_MAXSERV" >&5 - if eval "test \"`echo '$''{'ac_cv_maxserv'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for NI_MAXSERV" >&5 +echo $ECHO_N "checking for NI_MAXSERV... $ECHO_C" >&6 + if test "${ac_cv_maxserv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef NI_MAXSERV yes #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "yes" >/dev/null 2>&1; then ac_cv_maxserv=yes else - rm -rf conftest* ac_cv_maxserv=no fi rm -f conftest* fi - echo "$ac_t""$ac_cv_maxserv" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_maxserv" >&5 +echo "${ECHO_T}$ac_cv_maxserv" >&6 if test $ac_cv_maxserv != yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NEED_ADDRINFO_H 1 -EOF +_ACEOF fi @@ -2560,36 +5938,39 @@ if test "$ac_cv_maxserv" = no; then fi - echo $ac_n "checking for NI_NAMEREQD""... $ac_c" 1>&6 -echo "configure:2565: checking for NI_NAMEREQD" >&5 - if eval "test \"`echo '$''{'ac_cv_namereqd'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for NI_NAMEREQD" >&5 +echo $ECHO_N "checking for NI_NAMEREQD... $ECHO_C" >&6 + if test "${ac_cv_namereqd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #ifdef NI_NOFQDN yes #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "yes" >/dev/null 2>&1; then ac_cv_namereqd=yes else - rm -rf conftest* ac_cv_namereqd=no fi rm -f conftest* fi - echo "$ac_t""$ac_cv_namereqd" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_namereqd" >&5 +echo "${ECHO_T}$ac_cv_namereqd" >&6 if test $ac_cv_namereqd != yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NEED_ADDRINFO_H 1 -EOF +_ACEOF fi @@ -2598,38 +5979,57 @@ if test "$ac_cv_namereqd" = no; then fi - echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 -echo "configure:2603: checking for sockaddr_storage" >&5 - if eval "test \"`echo '$''{'ac_cv_sa_storage'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for sockaddr_storage" >&5 +echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6 + if test "${ac_cv_sa_storage+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include # include -int main() { +int +main () +{ struct sockaddr_storage s -; return 0; } -EOF -if { (eval echo configure:2617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_sa_storage=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_sa_storage=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_sa_storage=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_sa_storage" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_sa_storage" >&5 +echo "${ECHO_T}$ac_cv_sa_storage" >&6 if test $ac_cv_sa_storage = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_STORAGE 1 -EOF +_ACEOF fi @@ -2639,72 +6039,110 @@ fi ac_cv_addrsz=yes - echo $ac_n "checking for INADDRSZ""... $ac_c" 1>&6 -echo "configure:2644: checking for INADDRSZ" >&5 - if eval "test \"`echo '$''{'ac_cv_inaddrsz'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for INADDRSZ" >&5 +echo $ECHO_N "checking for INADDRSZ... $ECHO_C" >&6 + if test "${ac_cv_inaddrsz+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include -int main() { +int +main () +{ int a = INADDRSZ -; return 0; } -EOF -if { (eval echo configure:2657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_inaddrsz=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_inaddrsz=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_inaddrsz=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_inaddrsz" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_inaddrsz" >&5 +echo "${ECHO_T}$ac_cv_inaddrsz" >&6 if test $ac_cv_inaddrsz = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_INADDRSZ 1 -EOF +_ACEOF else ac_cv_addrsz=no fi - echo $ac_n "checking for IN6ADDRSZ""... $ac_c" 1>&6 -echo "configure:2679: checking for IN6ADDRSZ" >&5 - if eval "test \"`echo '$''{'ac_cv_in6addrsz'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for IN6ADDRSZ" >&5 +echo $ECHO_N "checking for IN6ADDRSZ... $ECHO_C" >&6 + if test "${ac_cv_in6addrsz+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include -int main() { +int +main () +{ int a = IN6ADDRSZ -; return 0; } -EOF -if { (eval echo configure:2692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_in6addrsz=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_in6addrsz=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_in6addrsz=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_in6addrsz" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_in6addrsz" >&5 +echo "${ECHO_T}$ac_cv_in6addrsz" >&6 if test $ac_cv_in6addrsz = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_IN6ADDRSZ 1 -EOF +_ACEOF else ac_cv_addrsz=no @@ -2715,39 +6153,58 @@ if test "$ac_cv_addrsz" = no; then fi - echo $ac_n "checking for RES_USE_INET6""... $ac_c" 1>&6 -echo "configure:2720: checking for RES_USE_INET6" >&5 - if eval "test \"`echo '$''{'ac_cv_res_inet6'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for RES_USE_INET6" >&5 +echo $ECHO_N "checking for RES_USE_INET6... $ECHO_C" >&6 + if test "${ac_cv_res_inet6+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include # include # include -int main() { +int +main () +{ int a = RES_USE_INET6 -; return 0; } -EOF -if { (eval echo configure:2735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_res_inet6=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_res_inet6=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_res_inet6=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_res_inet6" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_res_inet6" >&5 +echo "${ECHO_T}$ac_cv_res_inet6" >&6 if test $ac_cv_res_inet6 = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_RES_USE_INET6 1 -EOF +_ACEOF fi @@ -2756,40 +6213,59 @@ if test "$ac_cv_res_inet6" = no; then fi - echo $ac_n "checking for res_state_ext""... $ac_c" 1>&6 -echo "configure:2761: checking for res_state_ext" >&5 - if eval "test \"`echo '$''{'ac_cv_res_state_ext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for res_state_ext" >&5 +echo $ECHO_N "checking for res_state_ext... $ECHO_C" >&6 + if test "${ac_cv_res_state_ext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include # include # include # include -int main() { +int +main () +{ struct __res_state_ext e -; return 0; } -EOF -if { (eval echo configure:2777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_res_state_ext=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_res_state_ext=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_res_state_ext=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_res_state_ext" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_res_state_ext" >&5 +echo "${ECHO_T}$ac_cv_res_state_ext" >&6 if test $ac_cv_res_state_ext = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_RES_STATE_EXT 1 -EOF +_ACEOF fi @@ -2798,40 +6274,59 @@ if test "$ac_cv_res_state_ext" = no; then fi - echo $ac_n "checking for nsort in res_state""... $ac_c" 1>&6 -echo "configure:2803: checking for nsort in res_state" >&5 - if eval "test \"`echo '$''{'ac_cv_res_state'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for nsort in res_state" >&5 +echo $ECHO_N "checking for nsort in res_state... $ECHO_C" >&6 + if test "${ac_cv_res_state+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include # include # include # include -int main() { +int +main () +{ struct __res_state e; e.nsort = 0 -; return 0; } -EOF -if { (eval echo configure:2819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_res_state=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_res_state=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_res_state=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_res_state" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_res_state" >&5 +echo "${ECHO_T}$ac_cv_res_state" >&6 if test $ac_cv_res_state = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_NEW_RES_STATE 1 -EOF +_ACEOF fi @@ -2842,125 +6337,279 @@ if test "$missing_includes" = "yes"; then fi -for ac_func in vfprintf strcasecmp strlcat strlcpy strdup + + + + + + +for ac_func in vfprintf strcasecmp strlcat strlcpy strdup strsep do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2849: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" + LIBOBJS="$LIBOBJS $ac_func.$ac_objext" +fi +done + + + +for ac_func in strftime +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + fi done for ac_func in ether_ntohost do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2906: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:2934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -echo "configure:2954: checking for buggy ether_ntohost" >&5 -if eval "test \"`echo '$''{'ac_cv_buggy_ether_ntohost'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + + echo "$as_me:$LINENO: checking for buggy ether_ntohost" >&5 +echo $ECHO_N "checking for buggy ether_ntohost... $ECHO_C" >&6 +if test "${ac_cv_buggy_ether_ntohost+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then ac_cv_buggy_ether_ntohost="not while cross-compiling" else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include @@ -2976,165 +6625,237 @@ else ether_ntohost(name, (struct ether_addr *)ea); exit(0); } - -EOF -if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_buggy_ether_ntohost=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_buggy_ether_ntohost=yes -fi -rm -fr conftest* -fi + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_buggy_ether_ntohost=yes fi - -echo "$ac_t""$ac_cv_buggy_ether_ntohost" 1>&6 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_buggy_ether_ntohost" >&5 +echo "${ECHO_T}$ac_cv_buggy_ether_ntohost" >&6 if test "$ac_cv_buggy_ether_ntohost" = "no"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_ETHER_NTOHOST 1 -EOF +_ACEOF fi -else - echo "$ac_t""no" 1>&6 fi done + for ac_func in setlinebuf do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3012: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done needsnprintf=no + + for ac_func in vsnprintf snprintf do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3069: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:3097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -needsnprintf=yes + needsnprintf=yes fi done if test $needsnprintf = yes; then - LIBOBJS="$LIBOBJS snprintf.o" + LIBOBJS="$LIBOBJS snprintf.o.$ac_objext" fi - echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3128: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include #ifdef signal -#undef signal +# undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); @@ -3142,157 +6863,230 @@ extern "C" void (*signal (int, void (*)(int)))(int); void (*signal ()) (); #endif -int main() { +int +main () +{ int i; -; return 0; } -EOF -if { (eval echo configure:3150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_signal=void else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6 + +cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal -EOF +_ACEOF if test "$ac_cv_type_signal" = void ; then - cat >> confdefs.h <<\EOF -#define RETSIGVAL -EOF + cat >>confdefs.h <<\_ACEOF +#define RETSIGVAL +_ACEOF else - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define RETSIGVAL (0) -EOF +_ACEOF fi case "$host_os" in irix*) - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _BSD_SIGNALS 1 -EOF +_ACEOF ;; *) - for ac_func in sigaction + +for ac_func in sigaction do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3192: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done if test $ac_cv_func_sigaction = no ; then - for ac_func in sigset + +for ac_func in sigset do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3248: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:3276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -3300,177 +7094,280 @@ done ;; esac - -echo $ac_n "checking for library containing dnet_htoa""... $ac_c" 1>&6 -echo "configure:3306: checking for library containing dnet_htoa" >&5 -if eval "test \"`echo '$''{'ac_cv_search_dnet_htoa'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for library containing dnet_htoa" >&5 +echo $ECHO_N "checking for library containing dnet_htoa... $ECHO_C" >&6 +if test "${ac_cv_search_dnet_htoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_dnet_htoa="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -dnet_htoa() -; return 0; } -EOF -if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_htoa (); +int +main () +{ +dnet_htoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_search_dnet_htoa="none required" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_dnet_htoa" = "no" && for i in dnet; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -dnet_htoa() -; return 0; } -EOF -if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_dnet_htoa="-l$i" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_dnet_htoa" = no; then + for ac_lib in dnet; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_htoa (); +int +main () +{ +dnet_htoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_dnet_htoa="-l$ac_lib" break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$ac_t""$ac_cv_search_dnet_htoa" 1>&6 -if test "$ac_cv_search_dnet_htoa" != "no"; then +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_dnet_htoa" >&5 +echo "${ECHO_T}$ac_cv_search_dnet_htoa" >&6 +if test "$ac_cv_search_dnet_htoa" != no; then test "$ac_cv_search_dnet_htoa" = "none required" || LIBS="$ac_cv_search_dnet_htoa $LIBS" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_DNET_HTOA 1 -EOF +_ACEOF -else : - fi -echo $ac_n "checking for main in -lrpc""... $ac_c" 1>&6 -echo "configure:3371: checking for main in -lrpc" >&5 -ac_lib_var=`echo rpc'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + + +echo "$as_me:$LINENO: checking for main in -lrpc" >&5 +echo $ECHO_N "checking for main in -lrpc... $ECHO_C" >&6 +if test "${ac_cv_lib_rpc_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lrpc $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + +int +main () +{ +main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_rpc_main=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_rpc_main=no fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo rpc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_lib_rpc_main" >&6 +if test $ac_cv_lib_rpc_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRPC 1 +_ACEOF LIBS="-lrpc $LIBS" -else - echo "$ac_t""no" 1>&6 fi - -echo $ac_n "checking for library containing getrpcbynumber""... $ac_c" 1>&6 -echo "configure:3415: checking for library containing getrpcbynumber" >&5 -if eval "test \"`echo '$''{'ac_cv_search_getrpcbynumber'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for library containing getrpcbynumber" >&5 +echo $ECHO_N "checking for library containing getrpcbynumber... $ECHO_C" >&6 +if test "${ac_cv_search_getrpcbynumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_getrpcbynumber="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -getrpcbynumber() -; return 0; } -EOF -if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getrpcbynumber (); +int +main () +{ +getrpcbynumber (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_search_getrpcbynumber="none required" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_getrpcbynumber" = "no" && for i in nsl; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -getrpcbynumber() -; return 0; } -EOF -if { (eval echo configure:3455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_getrpcbynumber="-l$i" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_getrpcbynumber" = no; then + for ac_lib in nsl; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getrpcbynumber (); +int +main () +{ +getrpcbynumber (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_getrpcbynumber="-l$ac_lib" break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_getrpcbynumber" >&5 +echo "${ECHO_T}$ac_cv_search_getrpcbynumber" >&6 +if test "$ac_cv_search_getrpcbynumber" != no; then + test "$ac_cv_search_getrpcbynumber" = "none required" || LIBS="$ac_cv_search_getrpcbynumber $LIBS" + fi -echo "$ac_t""$ac_cv_search_getrpcbynumber" 1>&6 -if test "$ac_cv_search_getrpcbynumber" != "no"; then - test "$ac_cv_search_getrpcbynumber" = "none required" || LIBS="$ac_cv_search_getrpcbynumber $LIBS" - -else : - -fi @@ -3478,349 +7375,549 @@ fi # libraries (i.e. libc): # Some OSes (eg. Solaris) place it in libnsl # Some strange OSes (SINIX) have it in libsocket: - -echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6 -echo "configure:3484: checking for library containing gethostbyname" >&5 -if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_search_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_gethostbyname="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -gethostbyname() -; return 0; } -EOF -if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_search_gethostbyname="none required" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_gethostbyname" = "no" && for i in nsl socket resolv; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -gethostbyname() -; return 0; } -EOF -if { (eval echo configure:3524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_gethostbyname="-l$i" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_gethostbyname" = no; then + for ac_lib in nsl socket resolv; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_gethostbyname="-l$ac_lib" break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6 +if test "$ac_cv_search_gethostbyname" != no; then + test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" + fi -echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6 -if test "$ac_cv_search_gethostbyname" != "no"; then - test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" - -else : - -fi # Unfortunately libsocket sometimes depends on libnsl and # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this. if test "$ac_cv_search_gethostbyname" = "no" then - echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6 -echo "configure:3549: checking for gethostbyname in -lsocket" >&5 -ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for gethostbyname in -lsocket" >&5 +echo $ECHO_N "checking for gethostbyname in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname(); - -int main() { -gethostbyname() -; return 0; } -EOF -if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_gethostbyname=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_socket_gethostbyname=no fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_gethostbyname" >&6 +if test $ac_cv_lib_socket_gethostbyname = yes; then LIBS="-lsocket -lnsl $LIBS" -else - echo "$ac_t""no" 1>&6 fi fi - -echo $ac_n "checking for library containing socket""... $ac_c" 1>&6 -echo "configure:3591: checking for library containing socket" >&5 -if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for library containing socket" >&5 +echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6 +if test "${ac_cv_search_socket+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_socket="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -socket() -; return 0; } -EOF -if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socket (); +int +main () +{ +socket (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_search_socket="none required" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_socket" = "no" && for i in socket; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -socket() -; return 0; } -EOF -if { (eval echo configure:3631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_socket="-l$i" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_socket" = no; then + for ac_lib in socket; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socket (); +int +main () +{ +socket (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_socket="-l$ac_lib" break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$ac_t""$ac_cv_search_socket" 1>&6 -if test "$ac_cv_search_socket" != "no"; then +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5 +echo "${ECHO_T}$ac_cv_search_socket" >&6 +if test "$ac_cv_search_socket" != no; then test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS" - -else : - echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:3650: checking for socket in -lsocket" >&5 -ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + else - ac_save_LIBS="$LIBS" + echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_socket+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char socket(); - -int main() { -socket() -; return 0; } -EOF -if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char socket (); +int +main () +{ +socket (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_socket=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_socket_socket=no fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 +if test $ac_cv_lib_socket_socket = yes; then LIBS="-lsocket -lnsl $LIBS" -else - echo "$ac_t""no" 1>&6 fi fi + # DLPI needs putmsg under HPUX so test for -lstr while we're at it - -echo $ac_n "checking for library containing putmsg""... $ac_c" 1>&6 -echo "configure:3693: checking for library containing putmsg" >&5 -if eval "test \"`echo '$''{'ac_cv_search_putmsg'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for library containing putmsg" >&5 +echo $ECHO_N "checking for library containing putmsg... $ECHO_C" >&6 +if test "${ac_cv_search_putmsg+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_putmsg="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -putmsg() -; return 0; } -EOF -if { (eval echo configure:3711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char putmsg (); +int +main () +{ +putmsg (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_search_putmsg="none required" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_putmsg" = "no" && for i in str; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -putmsg() -; return 0; } -EOF -if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_putmsg="-l$i" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_putmsg" = no; then + for ac_lib in str; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char putmsg (); +int +main () +{ +putmsg (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_putmsg="-l$ac_lib" break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_putmsg" >&5 +echo "${ECHO_T}$ac_cv_search_putmsg" >&6 +if test "$ac_cv_search_putmsg" != no; then + test "$ac_cv_search_putmsg" = "none required" || LIBS="$ac_cv_search_putmsg $LIBS" + fi -echo "$ac_t""$ac_cv_search_putmsg" 1>&6 -if test "$ac_cv_search_putmsg" != "no"; then - test "$ac_cv_search_putmsg" = "none required" || LIBS="$ac_cv_search_putmsg $LIBS" - -else : - -fi - + LBL_LIBS="$LIBS" pfopen=/usr/examples/packetfilter/pfopen.c if test -f $pfopen ; then - for ac_func in pfopen + +for ac_func in pfopen do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3761: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:3789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done if test $ac_cv_func_pfopen = "no" ; then - echo "$ac_t""Using $pfopen" 1>&6 + echo "$as_me:$LINENO: result: Using $pfopen" >&5 +echo "${ECHO_T}Using $pfopen" >&6 LIBS="$LIBS $pfopen" fi fi - echo $ac_n "checking for local pcap library""... $ac_c" 1>&6 -echo "configure:3819: checking for local pcap library" >&5 + echo "$as_me:$LINENO: checking for local pcap library" >&5 +echo $ECHO_N "checking for local pcap library... $ECHO_C" >&6 libpcap=FAIL lastdir=FAIL - places=`ls .. | sed -e 's,/$,,' -e 's,^,../,' | \ + places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'` - for dir in $places ../libpcap libpcap ; do + for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'` if test $lastdir = $basedir ; then continue; @@ -3832,45 +7929,82 @@ echo "configure:3819: checking for local pcap library" >&5 fi done if test $libpcap = FAIL ; then - echo "$ac_t""not found" 1>&6 - echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6 -echo "configure:3838: checking for main in -lpcap" >&5 -ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6 + echo "$as_me:$LINENO: checking for main in -lpcap" >&5 +echo $ECHO_N "checking for main in -lpcap... $ECHO_C" >&6 +if test "${ac_cv_lib_pcap_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + +int +main () +{ +main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pcap_main=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_pcap_main=no fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_pcap_main" >&5 +echo "${ECHO_T}$ac_cv_lib_pcap_main" >&6 +if test $ac_cv_lib_pcap_main = yes; then libpcap="-lpcap" -else - echo "$ac_t""no" 1>&6 fi if test $libpcap = FAIL ; then - { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5 +echo "$as_me: error: see the INSTALL doc for more info" >&2;} + { (exit 1); exit 1; }; } + fi + echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5 +echo $ECHO_N "checking for extraneous pcap header directories... $ECHO_C" >&6 + if test \( ! -r /usr/local/include/pcap.h \) -a \ + \( ! -r /usr/include/pcap.h \); then + if test -r /usr/local/include/pcap/pcap.h; then + d="/usr/local/include/pcap" + elif test -r /usr/include/pcap/pcap.h; then + d="/usr/include/pcap" + fi + fi + if test -z "$d" ; then + echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6 + else + V_INCLS="-I$d $V_INCLS" + echo "$as_me:$LINENO: result: found -- -I$d added" >&5 +echo "${ECHO_T}found -- -I$d added" >&6 fi else V_PCAPDEP=$libpcap @@ -3881,81 +8015,1061 @@ fi elif test -r $places/pcap.h; then V_INCLS="-I$places $V_INCLS" else - { echo "configure: error: cannot find pcap.h" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: cannot find pcap.h" >&5 +echo "$as_me: error: cannot find pcap.h" >&2;} + { (exit see INSTALL); exit see INSTALL; }; } fi - echo "$ac_t""$libpcap" 1>&6 + echo "$as_me:$LINENO: result: $libpcap" >&5 +echo "${ECHO_T}$libpcap" >&6 fi LIBS="$libpcap $LIBS" case "$host_os" in aix*) pseexe="/lib/pse.exp" - echo $ac_n "checking for $pseexe""... $ac_c" 1>&6 -echo "configure:3895: checking for $pseexe" >&5 + echo "$as_me:$LINENO: checking for $pseexe" >&5 +echo $ECHO_N "checking for $pseexe... $ECHO_C" >&6 if test -f $pseexe ; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 LIBS="$LIBS -I:$pseexe" fi + # + # We need "-lodm" and "-lcfg", as libpcap requires them on + # AIX, and we just build a static libpcap.a and thus can't + # arrange that when you link with libpcap you automatically + # link with those libraries. + # + LIBS="$LIBS -lodm -lcfg" ;; esac -for ac_func in bpf_dump -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3906: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for pcap_list_datalinks" >&5 +echo $ECHO_N "checking for pcap_list_datalinks... $ECHO_C" >&6 +if test "${ac_cv_func_pcap_list_datalinks+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include + which can conflict with char pcap_list_datalinks (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); + builtin and then its argument prototype would still apply. */ +char pcap_list_datalinks (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_pcap_list_datalinks) || defined (__stub___pcap_list_datalinks) +choke me +#else +char (*f) () = pcap_list_datalinks; +#endif +#ifdef __cplusplus +} +#endif -int main() { +int +main () +{ +return f != pcap_list_datalinks; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_pcap_list_datalinks=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_pcap_list_datalinks=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_pcap_list_datalinks" >&5 +echo "${ECHO_T}$ac_cv_func_pcap_list_datalinks" >&6 +if test $ac_cv_func_pcap_list_datalinks = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_PCAP_LIST_DATALINKS 1 +_ACEOF + +else + LIBOBJS="$LIBOBJS datalinks.$ac_objext" +fi + + echo "$as_me:$LINENO: checking for pcap_set_datalink" >&5 +echo $ECHO_N "checking for pcap_set_datalink... $ECHO_C" >&6 +if test "${ac_cv_func_pcap_set_datalink+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char pcap_set_datalink (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pcap_set_datalink (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_pcap_set_datalink) || defined (__stub___pcap_set_datalink) +choke me +#else +char (*f) () = pcap_set_datalink; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != pcap_set_datalink; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_pcap_set_datalink=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_pcap_set_datalink=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_pcap_set_datalink" >&5 +echo "${ECHO_T}$ac_cv_func_pcap_set_datalink" >&6 +if test $ac_cv_func_pcap_set_datalink = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_PCAP_SET_DATALINK 1 +_ACEOF + +fi + + echo "$as_me:$LINENO: checking for pcap_datalink_name_to_val" >&5 +echo $ECHO_N "checking for pcap_datalink_name_to_val... $ECHO_C" >&6 +if test "${ac_cv_func_pcap_datalink_name_to_val+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char pcap_datalink_name_to_val (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pcap_datalink_name_to_val (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_pcap_datalink_name_to_val) || defined (__stub___pcap_datalink_name_to_val) +choke me +#else +char (*f) () = pcap_datalink_name_to_val; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != pcap_datalink_name_to_val; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_pcap_datalink_name_to_val=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_pcap_datalink_name_to_val=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_pcap_datalink_name_to_val" >&5 +echo "${ECHO_T}$ac_cv_func_pcap_datalink_name_to_val" >&6 +if test $ac_cv_func_pcap_datalink_name_to_val = yes; then + + cat >>confdefs.h <<\_ACEOF +#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1 +_ACEOF + + echo "$as_me:$LINENO: checking for pcap_datalink_val_to_description" >&5 +echo $ECHO_N "checking for pcap_datalink_val_to_description... $ECHO_C" >&6 +if test "${ac_cv_func_pcap_datalink_val_to_description+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char pcap_datalink_val_to_description (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pcap_datalink_val_to_description (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_pcap_datalink_val_to_description) || defined (__stub___pcap_datalink_val_to_description) +choke me +#else +char (*f) () = pcap_datalink_val_to_description; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != pcap_datalink_val_to_description; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_pcap_datalink_val_to_description=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_pcap_datalink_val_to_description=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_pcap_datalink_val_to_description" >&5 +echo "${ECHO_T}$ac_cv_func_pcap_datalink_val_to_description" >&6 +if test $ac_cv_func_pcap_datalink_val_to_description = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1 +_ACEOF + +else + LIBOBJS="$LIBOBJS dlnames.$ac_objext" +fi + + +else + LIBOBJS="$LIBOBJS dlnames.$ac_objext" +fi + + + +for ac_func in pcap_breakloop +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done - + + +# +# Check for these after AC_LBL_LIBPCAP, so we link with the appropriate +# libraries (e.g., "-lsocket -lnsl" on Solaris). +# +# We don't use AC_REPLACE_FUNCS because that uses AC_CHECK_FUNCS which +# use AC_CHECK_FUNC which doesn't let us specify the right #includes +# to make this work on BSD/OS 4.x. BSD/OS 4.x ships with the BIND8 +# resolver, and the way it defines inet_{ntop,pton} is rather strange; +# it does not ship with a libc symbol "inet_ntop()", it ships with +# "_inet_ntop()", and has a #define macro in one of the system headers +# to rename it. +# +echo "$as_me:$LINENO: checking for inet_ntop" >&5 +echo $ECHO_N "checking for inet_ntop... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +int +main () +{ +char src[4], dst[128]; +inet_ntop(AF_INET, src, dst, sizeof(dst)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + LIBOBJS="$LIBOBJS inet_ntop.o.$ac_objext" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +echo "$as_me:$LINENO: checking for inet_pton" >&5 +echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +int +main () +{ +char src[128], dst[4]; +inet_pton(AF_INET, src, dst); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + LIBOBJS="$LIBOBJS inet_pton.o.$ac_objext" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +echo "$as_me:$LINENO: checking for inet_aton" >&5 +echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ +char src[128]; +struct in_addr dst; +inet_aton(src, &dst); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + LIBOBJS="$LIBOBJS inet_aton.o.$ac_objext" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + + + echo "$as_me:$LINENO: checking if sockaddr struct has sa_len member" >&5 +echo $ECHO_N "checking if sockaddr struct has sa_len member... $ECHO_C" >&6 + if test "${ac_cv_sockaddr_has_sa_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# include +# include +int +main () +{ +u_int i = sizeof(((struct sockaddr *)0)->sa_len) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sockaddr_has_sa_len=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_sockaddr_has_sa_len=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $ac_cv_sockaddr_has_sa_len" >&5 +echo "${ECHO_T}$ac_cv_sockaddr_has_sa_len" >&6 + if test $ac_cv_sockaddr_has_sa_len = yes ; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_SOCKADDR_SA_LEN 1 +_ACEOF + + fi + +if test "$ac_cv_sockaddr_has_sa_len" = no; then + missing_includes=yes +fi + + + + +for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test $ac_cv_func_pcap_findalldevs = "yes" ; then + echo "$as_me:$LINENO: checking for pcap_if_t" >&5 +echo $ECHO_N "checking for pcap_if_t... $ECHO_C" >&6 +if test "${ac_cv_type_pcap_if_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +if ((pcap_if_t *) 0) + return 0; +if (sizeof (pcap_if_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_pcap_if_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_pcap_if_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_pcap_if_t" >&5 +echo "${ECHO_T}$ac_cv_type_pcap_if_t" >&6 +if test $ac_cv_type_pcap_if_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_PCAP_IF_T 1 +_ACEOF + + +fi + +fi +if test $ac_cv_func_pcap_lib_version = "no" ; then + echo "$as_me:$LINENO: checking whether pcap_version is defined by libpcap" >&5 +echo $ECHO_N "checking whether pcap_version is defined by libpcap... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + +char * +return_pcap_version(void) +{ + extern char pcap_version[]; + + return pcap_version; +} + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lbl_cv_pcap_version_defined=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lbl_cv_pcap_version_defined=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$ac_lbl_cv_pcap_version_defined" = yes ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF +#define HAVE_PCAP_VERSION 1 +_ACEOF + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +fi +echo "$as_me:$LINENO: checking whether pcap_debug is defined by libpcap" >&5 +echo $ECHO_N "checking whether pcap_debug is defined by libpcap... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + +int +return_pcap_debug(void) +{ + extern int pcap_debug; + + return pcap_debug; +} + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lbl_cv_pcap_debug_defined=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lbl_cv_pcap_debug_defined=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF +#define HAVE_PCAP_DEBUG 1 +_ACEOF + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + # + # OK, what about "yydebug"? + # + echo "$as_me:$LINENO: checking whether yydebug is defined by libpcap" >&5 +echo $ECHO_N "checking whether yydebug is defined by libpcap... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + int + return_yydebug(void) + { + extern int yydebug; + + return yydebug; + } + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lbl_cv_yydebug_defined=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lbl_cv_yydebug_defined=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$ac_lbl_cv_yydebug_defined" = yes ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF +#define HAVE_YYDEBUG 1 +_ACEOF + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +fi + +for ac_func in bpf_dump +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + LIBOBJS="$LIBOBJS $ac_func.$ac_objext" +fi +done + + V_GROUP=0 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then V_GROUP=wheel @@ -3963,9 +9077,9 @@ fi case "$host_os" in aix*) - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define _SUN 1 -EOF +_ACEOF ;; @@ -3986,14 +9100,18 @@ if test -f /dev/bpf0 ; then V_GROUP=bpf fi -echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6 -echo "configure:3991: checking for u_int8_t using $CC" >&5 - if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for int8_t using $CC" >&5 +echo $ECHO_N "checking for int8_t using $CC... $ECHO_C" >&6 + if test "${ac_cv_lbl_have_int8_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include "confdefs.h" # include @@ -4001,37 +9119,113 @@ else # include # include # endif -int main() { +int +main () +{ +int8_t i + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lbl_have_int8_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lbl_have_int8_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi + + echo "$as_me:$LINENO: result: $ac_cv_lbl_have_int8_t" >&5 +echo "${ECHO_T}$ac_cv_lbl_have_int8_t" >&6 + if test $ac_cv_lbl_have_int8_t = no ; then + cat >>confdefs.h <<\_ACEOF +#define int8_t signed char +_ACEOF + + fi +echo "$as_me:$LINENO: checking for u_int8_t using $CC" >&5 +echo $ECHO_N "checking for u_int8_t using $CC... $ECHO_C" >&6 + if test "${ac_cv_lbl_have_u_int8_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# include "confdefs.h" +# include +# if STDC_HEADERS +# include +# include +# endif +int +main () +{ u_int8_t i -; return 0; } -EOF -if { (eval echo configure:4009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lbl_have_u_int8_t=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lbl_have_u_int8_t=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lbl_have_u_int8_t=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_lbl_have_u_int8_t" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_have_u_int8_t" >&5 +echo "${ECHO_T}$ac_cv_lbl_have_u_int8_t" >&6 if test $ac_cv_lbl_have_u_int8_t = no ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define u_int8_t u_char -EOF +_ACEOF fi -echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6 -echo "configure:4029: checking for int16_t using $CC" >&5 - if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for int16_t using $CC" >&5 +echo $ECHO_N "checking for int16_t using $CC... $ECHO_C" >&6 + if test "${ac_cv_lbl_have_int16_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include "confdefs.h" # include @@ -4039,37 +9233,56 @@ else # include # include # endif -int main() { +int +main () +{ int16_t i -; return 0; } -EOF -if { (eval echo configure:4047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lbl_have_int16_t=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lbl_have_int16_t=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lbl_have_int16_t=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_lbl_have_int16_t" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_have_int16_t" >&5 +echo "${ECHO_T}$ac_cv_lbl_have_int16_t" >&6 if test $ac_cv_lbl_have_int16_t = no ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define int16_t short -EOF +_ACEOF fi -echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6 -echo "configure:4067: checking for u_int16_t using $CC" >&5 - if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for u_int16_t using $CC" >&5 +echo $ECHO_N "checking for u_int16_t using $CC... $ECHO_C" >&6 + if test "${ac_cv_lbl_have_u_int16_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include "confdefs.h" # include @@ -4077,37 +9290,56 @@ else # include # include # endif -int main() { +int +main () +{ u_int16_t i -; return 0; } -EOF -if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lbl_have_u_int16_t=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lbl_have_u_int16_t=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lbl_have_u_int16_t=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_lbl_have_u_int16_t" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_have_u_int16_t" >&5 +echo "${ECHO_T}$ac_cv_lbl_have_u_int16_t" >&6 if test $ac_cv_lbl_have_u_int16_t = no ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define u_int16_t u_short -EOF +_ACEOF fi -echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6 -echo "configure:4105: checking for int32_t using $CC" >&5 - if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for int32_t using $CC" >&5 +echo $ECHO_N "checking for int32_t using $CC... $ECHO_C" >&6 + if test "${ac_cv_lbl_have_int32_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include "confdefs.h" # include @@ -4115,37 +9347,56 @@ else # include # include # endif -int main() { +int +main () +{ int32_t i -; return 0; } -EOF -if { (eval echo configure:4123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lbl_have_int32_t=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lbl_have_int32_t=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lbl_have_int32_t=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_lbl_have_int32_t" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_have_int32_t" >&5 +echo "${ECHO_T}$ac_cv_lbl_have_int32_t" >&6 if test $ac_cv_lbl_have_int32_t = no ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define int32_t int -EOF +_ACEOF fi -echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6 -echo "configure:4143: checking for u_int32_t using $CC" >&5 - if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for u_int32_t using $CC" >&5 +echo $ECHO_N "checking for u_int32_t using $CC... $ECHO_C" >&6 + if test "${ac_cv_lbl_have_u_int32_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include "confdefs.h" # include @@ -4153,27 +9404,42 @@ else # include # include # endif -int main() { +int +main () +{ u_int32_t i -; return 0; } -EOF -if { (eval echo configure:4161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lbl_have_u_int32_t=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lbl_have_u_int32_t=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lbl_have_u_int32_t=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_lbl_have_u_int32_t" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_have_u_int32_t" >&5 +echo "${ECHO_T}$ac_cv_lbl_have_u_int32_t" >&6 if test $ac_cv_lbl_have_u_int32_t = no ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define u_int32_t u_int -EOF +_ACEOF fi @@ -4189,7 +9455,7 @@ rm -f os-proto.h fi V_CCOPT="$V_CCOPT -Wall" if test $ac_cv_lbl_gcc_vers -gt 1 ; then - V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes" + V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W" fi fi else @@ -4207,59 +9473,110 @@ rm -f os-proto.h name="lbl/os-$os.h" if test -f $name ; then ln -s $name os-proto.h - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_OS_PROTO_H 1 -EOF +_ACEOF else - echo "configure: warning: can't find $name" 1>&2 + { echo "$as_me:$LINENO: WARNING: can't find $name" >&5 +echo "$as_me: WARNING: can't find $name" >&2;} fi fi -echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6 -echo "configure:4221: checking if sockaddr struct has sa_len member" >&5 - if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking if sockaddr struct has sa_len member" >&5 +echo $ECHO_N "checking if sockaddr struct has sa_len member... $ECHO_C" >&6 + if test "${ac_cv_lbl_sockaddr_has_sa_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include # include -int main() { +int +main () +{ u_int i = sizeof(((struct sockaddr *)0)->sa_len) -; return 0; } -EOF -if { (eval echo configure:4235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lbl_sockaddr_has_sa_len=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_lbl_sockaddr_has_sa_len=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lbl_sockaddr_has_sa_len=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_sockaddr_has_sa_len" >&5 +echo "${ECHO_T}$ac_cv_lbl_sockaddr_has_sa_len" >&6 if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_SA_LEN 1 -EOF +_ACEOF fi -echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6 -echo "configure:4256: checking if unaligned accesses fail" >&5 - if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking if unaligned accesses fail" >&5 +echo $ECHO_N "checking if unaligned accesses fail... $ECHO_C" >&6 + if test "${ac_cv_lbl_unaligned_fail+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$host_cpu" in + # + # These are CPU types where: + # + # the CPU faults on an unaligned access, but at least some + # OSes that support that CPU catch the fault and simulate + # the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) - + # the simulation is slow, so we don't want to use it; + # + # the CPU, I infer (from the old + # # XXX: should also check that they don't do weird things (like on arm) - alpha*|arm*|hp*|mips*|sparc*|ia64) + # + # comment) doesn't fault on unaligned accesses, but doesn't + # do a normal unaligned fetch, either (e.g., presumably, ARM); + # + # for whatever reason, the test program doesn't work + # (this has been claimed to be the case for several of those + # CPUs - I don't know what the problem is; the problem + # was reported as "the test program dumps core" for SuperH, + # but that's what the test program is *supposed* to do - + # it dumps core before it writes anything, so the test + # for an empty output file should find an empty output + # file and conclude that unaligned accesses don't work). + # + # This run-time test won't work if you're cross-compiling, so + # in order to support cross-compiling for a particular CPU, + # we have to wire in the list of CPU types anyway, as far as + # I know, so perhaps we should just have a set of CPUs on + # which we know it doesn't work, a set of CPUs on which we + # know it does work, and have the script just fail on other + # cpu types and update it when such a failure occurs. + # + alpha*|arm*|hp*|mips*|sh*|sparc*|ia64|nv1) ac_cv_lbl_unaligned_fail=yes ;; @@ -4307,63 +9624,97 @@ EOF esac fi - echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_lbl_unaligned_fail" >&5 +echo "${ECHO_T}$ac_cv_lbl_unaligned_fail" >&6 if test $ac_cv_lbl_unaligned_fail = yes ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LBL_ALIGN 1 -EOF +_ACEOF fi - echo $ac_n "checking for h_errno""... $ac_c" 1>&6 -echo "configure:4321: checking for h_errno" >&5 - if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for h_errno" >&5 +echo $ECHO_N "checking for h_errno... $ECHO_C" >&6 + if test "${ac_cv_var_h_errno+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ # include # include -int main() { +int +main () +{ int foo = h_errno; -; return 0; } -EOF -if { (eval echo configure:4335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_var_h_errno=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_var_h_errno=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_var_h_errno=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - echo "$ac_t""$ac_cv_var_h_errno" 1>&6 + echo "$as_me:$LINENO: result: $ac_cv_var_h_errno" >&5 +echo "${ECHO_T}$ac_cv_var_h_errno" >&6 if test "$ac_cv_var_h_errno" = "yes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_H_ERRNO 1 -EOF +_ACEOF fi + # Check whether --with-crypto or --without-crypto was given. if test "${with_crypto+set}" = set; then withval="$with_crypto" - : + else - -echo $ac_n "checking for SSLeay""... $ac_c" 1>&6 -echo "configure:4363: checking for SSLeay" >&5 + +echo "$as_me:$LINENO: checking for SSLeay" >&5 +echo $ECHO_N "checking for SSLeay... $ECHO_C" >&6 ac_cv_ssleay_path=no incdir=no for dir in /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do - if test -d $dir/lib -a -f $dir/lib/libcrypto.a; then + # + # XXX - is there a better way to check if a given library is + # in a given directory than checking each of the possible + # shared library suffixes? + # + # Are there any other suffixes we need to look for? Do we have to + # worry about ".so.{version}"? + # + # Or should we just look for "libcrypto.*"? + # + if test -d $dir/lib -a \( -f $dir/lib/libcrypto.a -o \ + -f $dir/lib/libcrypto.so -o \ + -f $dir/lib/libcrypto.sl -o \ + -f $dir/lib/libcrypto.dylib \); then ac_cv_ssleay_path=$dir fi if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then @@ -4376,7 +9727,8 @@ for dir in /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do incdir=no fi done -echo "$ac_t""$ac_cv_ssleay_path" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_ssleay_path" >&5 +echo "${ECHO_T}$ac_cv_ssleay_path" >&6 if test "$ac_cv_ssleay_path" != no; then V_INCLS="$V_INCLS $incdir" LDFLAGS="-L$dir/lib $LDFLAGS" @@ -4386,195 +9738,217 @@ if test "$ac_cv_ssleay_path" != no; then if test -f $ac_cv_ssleay_path/lib/librsaref.a; then LIBS="$LIBS -lrsaref" fi - echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6 -echo "configure:4391: checking for des_cbc_encrypt in -lcrypto" >&5 -ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking for des_cbc_encrypt in -lcrypto" >&5 +echo $ECHO_N "checking for des_cbc_encrypt in -lcrypto... $ECHO_C" >&6 +if test "${ac_cv_lib_crypto_des_cbc_encrypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char des_cbc_encrypt(); - -int main() { -des_cbc_encrypt() -; return 0; } -EOF -if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char des_cbc_encrypt (); +int +main () +{ +des_cbc_encrypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_crypto_des_cbc_encrypt=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_crypto_des_cbc_encrypt=no fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_lib_crypto_des_cbc_encrypt" >&6 +if test $ac_cv_lib_crypto_des_cbc_encrypt = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPTO 1 +_ACEOF LIBS="-lcrypto $LIBS" -else - echo "$ac_t""no" 1>&6 fi - bak_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $V_INCLS" - for ac_hdr in openssl/cast.h + +for ac_header in openssl/evp.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4444: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - echo "$ac_t""no" 1>&6 + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + done - - if test "$ac_cv_header_openssl_cast_h" = "yes"; then - echo $ac_n "checking for buggy CAST128""... $ac_c" 1>&6 -echo "configure:4483: checking for buggy CAST128" >&5 - if eval "test \"`echo '$''{'td_cv_buggy_cast128'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - td_cv_buggy_cast128="cross-compiling, assume yes" -else - cat > conftest.$ac_ext < -main() -{ - unsigned char key[] = {0x01,0x23,0x45,0x67,0x12}; - unsigned char in[] = {0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF}; - unsigned char out[sizeof(in)]; - unsigned char ok[] = {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E}; - CAST_KEY ks; - CAST_set_key(&ks, sizeof(key), key); - CAST_ecb_encrypt(in, out, &ks, CAST_ENCRYPT); - if (memcmp(out, ok, sizeof(ok)) != 0) - return 0; - else - return 1; -} -EOF -if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - td_cv_buggy_cast128=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - td_cv_buggy_cast128=no -fi -rm -fr conftest* fi -fi - - echo "$ac_t""$td_cv_buggy_cast128" 1>&6 - if test "$td_cv_buggy_cast128" != no; then - echo "NOTE: SSLeay 0.9.0b has a bug in CAST128 en/decoding routine." - echo "disabling CAST128 support." - cat >> confdefs.h <<\EOF -#define HAVE_BUGGY_CAST128 1 -EOF - - fi - fi - - CPPFLAGS=$bak_CPPFLAGS -fi - -fi - -for ac_hdr in openssl/rc5.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4544: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done +fi; @@ -4590,440 +9964,1253 @@ done # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:4599: checking for a BSD compatible install" >&5 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done - ;; - esac - done - IFS="$ac_save_IFS" + done + ;; +esac +done + fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. - INSTALL="$ac_install_sh" + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + ac_config_headers="$ac_config_headers config.h" + ac_config_commands="$ac_config_commands default-1" -trap '' 1 2 15 -cat > confcache <<\EOF + ac_config_files="$ac_config_files Makefile" +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + : ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@SHLICC2@%$SHLICC2%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@LIBOBJS@%$LIBOBJS%g -s%@V_CCOPT@%$V_CCOPT%g -s%@V_GROUP@%$V_GROUP%g -s%@V_INCLS@%$V_INCLS%g -s%@V_PCAPDEP@%$V_PCAPDEP%g -s%@LOCALSRC@%$LOCALSRC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi -EOF -cat >> $CONFIG_STATUS </dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' else - ac_dir_suffix= ac_dots= + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.57, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + + + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@SHLICC2@,$SHLICC2,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@V_CCOPT@,$V_CCOPT,;t t +s,@V_DEFS@,$V_DEFS,;t t +s,@V_GROUP@,$V_GROUP,;t t +s,@V_INCLS@,$V_INCLS,;t t +s,@V_PCAPDEP@,$V_PCAPDEP,;t t +s,@LOCALSRC@,$LOCALSRC,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out fi - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* +# +# CONFIG_HEADER section. +# # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' +ac_uD=',;t' -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating $ac_file + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in -EOF +_ACEOF -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS rm -f conftest.tail -while : +while grep . conftest.defines >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines done -rm -f conftest.vals +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi -fi; done + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } -EOF -cat >> $CONFIG_STATUS <>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` -EOF -cat >> $CONFIG_STATUS <<\EOF -if test -f .devel; then + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + default-1 ) if test -f .devel; then echo timestamp > stamp-h cat Makefile-devel-adds >> Makefile make depend +fi ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } fi exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -exit 0 diff --git a/dist/tcpdump/configure.in b/dist/tcpdump/configure.in index c05bcedad0c8..fab932bbe379 100644 --- a/dist/tcpdump/configure.in +++ b/dist/tcpdump/configure.in @@ -1,4 +1,4 @@ -dnl @(#) Header: /tcpdump/master/tcpdump/configure.in,v 1.149 2002/04/07 02:16:03 guy Exp (LBL) +dnl @(#) Header: /tcpdump/master/tcpdump/configure.in,v 1.169.2.3 2004/03/28 21:04:48 fenner Exp (LBL) dnl dnl Copyright (c) 1994, 1995, 1996, 1997 dnl The Regents of the University of California. All rights reserved. @@ -6,17 +6,19 @@ dnl dnl Process this file with autoconf to produce a configure script. dnl -AC_REVISION(Revision: 1.149) -AC_PREREQ(2.13) +AC_REVISION(Revision: 1.169.2.3) +AC_PREREQ(2.50) AC_INIT(tcpdump.c) AC_CANONICAL_HOST AC_LBL_C_INIT(V_CCOPT, V_INCLS) -AC_C_INLINE +AC_LBL_C_INLINE AC_C___ATTRIBUTE__ -AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netinet/if_ether.h netdnet/dnetdb.h) +AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netdnet/dnetdb.h netinet/ether.h) +AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include +#include ]) AC_HEADER_TIME case "$host_os" in @@ -102,14 +104,13 @@ yes) AC_MSG_RESULT(yes) ;; esac -CFLAGS="$CFLAGS -Dss_family=__ss_family -Dss_len=__ss_len" AC_MSG_CHECKING([whether to enable ipv6]) AC_ARG_ENABLE(ipv6, [ --enable-ipv6 enable ipv6 (with ipv4) support --disable-ipv6 disable ipv6 support], [ case "$enableval" in yes) AC_MSG_RESULT(yes) - LOCALSRC="print-ip6.c print-ip6opts.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC" + LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC" AC_DEFINE(INET6) ipv6=yes ;; @@ -131,7 +132,7 @@ main() } ], [ AC_MSG_RESULT(yes) - LOCALSRC="print-ip6.c print-ip6opts.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC" + LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC" AC_DEFINE(INET6) ipv6=yes], [ AC_MSG_RESULT(no) @@ -150,8 +151,8 @@ if test "$ipv6" = "yes"; then case $i in inria) dnl http://www.kame.net/ - AC_EGREP_CPP(yes, [dnl -#include + AC_EGREP_CPP(yes, +[#include #ifdef IPV6_INRIA_VERSION yes #endif], @@ -160,8 +161,8 @@ yes ;; kame) dnl http://www.kame.net/ - AC_EGREP_CPP(yes, [dnl -#include + AC_EGREP_CPP(yes, +[#include #ifdef __KAME__ yes #endif], @@ -173,8 +174,8 @@ yes ;; linux-glibc) dnl http://www.v6.linux.or.jp/ - AC_EGREP_CPP(yes, [dnl -#include + AC_EGREP_CPP(yes, +[#include #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 yes #endif], @@ -183,6 +184,10 @@ yes ;; linux-libinet6) dnl http://www.v6.linux.or.jp/ + dnl + dnl This also matches Solaris 8 and Tru64 UNIX 5.1, + dnl and possibly other versions of those OSes + dnl if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then ipv6type=$i ipv6lib=inet6 @@ -192,8 +197,8 @@ yes fi ;; toshiba) - AC_EGREP_CPP(yes, [dnl -#include + AC_EGREP_CPP(yes, +[#include #ifdef _TOSHIBA_INET6 yes #endif], @@ -203,8 +208,8 @@ yes CFLAGS="-DINET6 $CFLAGS"]) ;; v6d) - AC_EGREP_CPP(yes, [dnl -#include + AC_EGREP_CPP(yes, +[#include #ifdef __V6D__ yes #endif], @@ -214,8 +219,8 @@ yes CFLAGS="-I/usr/local/v6/include $CFLAGS"]) ;; zeta) - AC_EGREP_CPP(yes, [dnl -#include + AC_EGREP_CPP(yes, +[#include #ifdef _ZETA_MINAMI_INET6 yes #endif], @@ -250,6 +255,19 @@ fi if test "$ipv6" = "yes"; then + # + # XXX - on Tru64 UNIX 5.1, there is no "getaddrinfo()" + # function in libc; there are "ngetaddrinfo()" and + # "ogetaddrinfo()" functions, and #defines + # "getaddrinfo" to be either "ngetaddrinfo" or + # "ogetaddrinfo", depending on whether _SOCKADDR_LEN + # or _XOPEN_SOURCE_EXTENDED are defined or not. + # + # So this test doesn't work on Tru64 5.1, and possibly + # on other 5.x releases. This causes the configure + # script to become confused, and results in libpcap + # being unbuildable. + # AC_SEARCH_LIBS(getaddrinfo, socket, [dnl AC_MSG_CHECKING(getaddrinfo bug) AC_CACHE_VAL(td_cv_buggygetaddrinfo, [AC_TRY_RUN([ @@ -270,6 +288,7 @@ main() hints.ai_family = AF_UNSPEC; hints.ai_flags = passive ? AI_PASSIVE : 0; hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { (void)gai_strerror(gaierr); goto bad; @@ -356,52 +375,26 @@ main() fi if test "$td_cv_buggygetaddrinfo" = "yes"; then + # + # XXX - it doesn't appear that "ipv6type" can ever be + # set to "linux". Should this be testing for + # "linux-glibc", or for that *or* "linux-libinet6"? + # If the latter, note that "linux-libinet6" is also + # the type given to some non-Linux OSes. + # if test "$ipv6type" != "linux"; then echo 'Fatal: You must get working getaddrinfo() function.' echo ' or you can specify "--disable-ipv6"'. exit 1 else echo 'Warning: getaddrinfo() implementation on your system seems be buggy.' - echo ' Better upgreade your system library to newest version' + echo ' Better upgrade your system library to newest version' echo ' of GNU C library (aka glibc).' fi fi ]) AC_REPLACE_FUNCS(getaddrinfo getnameinfo) fi -dnl AC_TRY_COMPILE(inet_ntop inet_pton inet_aton) -AC_MSG_CHECKING(for inet_ntop) -AC_TRY_COMPILE([#include -#include -#include -#include ], [char src[4], dst[128]; -inet_ntop(AF_INET, src, dst, sizeof(dst));], - [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) - AC_REPLACE_FUNCS(inet_ntop)]) -AC_MSG_CHECKING(for inet_pton) -AC_TRY_COMPILE([#include -#include -#include -#include ], [char src[128], dst[4]; -inet_pton(AF_INET, src, dst);], - [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) - AC_REPLACE_FUNCS(inet_pton)]) -AC_MSG_CHECKING(for inet_aton) -AC_TRY_COMPILE([#include -#include -#include ], [char src[128]; -struct in_addr dst; -inet_aton(src, &dst);], - [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) - AC_REPLACE_FUNCS(inet_aton)]) - -dnl portability macros for getaddrinfo/getnameinfo -dnl -dnl Check for sa_len -AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len) -if test "$ac_cv_sockaddr_has_sa_len" = no; then - missing_includes=yes -fi AC_CACHE_CHECK([for dnet_htoa declaration in netdnet/dnetdb.h], [td_cv_decl_netdnet_dnetdb_h_dnet_htoa], @@ -488,7 +481,8 @@ if test "$missing_includes" = "yes"; then fi -AC_REPLACE_FUNCS(vfprintf strcasecmp strlcat strlcpy strdup) +AC_REPLACE_FUNCS(vfprintf strcasecmp strlcat strlcpy strdup strsep) +AC_CHECK_FUNCS(strftime) AC_CHECK_FUNCS(ether_ntohost, [ AC_CACHE_CHECK(for buggy ether_ntohost, ac_cv_buggy_ether_ntohost, [ AC_TRY_RUN([ @@ -519,7 +513,7 @@ needsnprintf=no AC_CHECK_FUNCS(vsnprintf snprintf,, [needsnprintf=yes]) if test $needsnprintf = yes; then - LIBOBJS="$LIBOBJS snprintf.o" + AC_LIBOBJ(snprintf.o) fi AC_LBL_TYPE_SIGNAL @@ -536,6 +530,121 @@ dnl AC_CHECK_HEADERS(zlib.h) AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS) +# +# Check for these after AC_LBL_LIBPCAP, so we link with the appropriate +# libraries (e.g., "-lsocket -lnsl" on Solaris). +# +# We don't use AC_REPLACE_FUNCS because that uses AC_CHECK_FUNCS which +# use AC_CHECK_FUNC which doesn't let us specify the right #includes +# to make this work on BSD/OS 4.x. BSD/OS 4.x ships with the BIND8 +# resolver, and the way it defines inet_{ntop,pton} is rather strange; +# it does not ship with a libc symbol "inet_ntop()", it ships with +# "_inet_ntop()", and has a #define macro in one of the system headers +# to rename it. +# +dnl AC_TRY_COMPILE(inet_ntop inet_pton inet_aton) +AC_MSG_CHECKING(for inet_ntop) +AC_TRY_LINK([#include +#include +#include +#include ], [char src[4], dst[128]; +inet_ntop(AF_INET, src, dst, sizeof(dst));], + [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) + AC_LIBOBJ(inet_ntop.o)]) +AC_MSG_CHECKING(for inet_pton) +AC_TRY_LINK([#include +#include +#include +#include ], [char src[128], dst[4]; +inet_pton(AF_INET, src, dst);], + [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) + AC_LIBOBJ(inet_pton.o)]) +AC_MSG_CHECKING(for inet_aton) +AC_TRY_LINK([#include +#include +#include ], [char src[128]; +struct in_addr dst; +inet_aton(src, &dst);], + [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) + AC_LIBOBJ(inet_aton.o)]) + +dnl portability macros for getaddrinfo/getnameinfo +dnl +dnl Check for sa_len +AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len) +if test "$ac_cv_sockaddr_has_sa_len" = no; then + missing_includes=yes +fi + +AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version) +if test $ac_cv_func_pcap_findalldevs = "yes" ; then +dnl Check for MacOS X, which may ship pcap.h from 0.6 but libpcap may +dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't +dnl have pcap_if_t. + AC_CHECK_TYPES(pcap_if_t, , , [#include ]) +fi +if test $ac_cv_func_pcap_lib_version = "no" ; then + AC_MSG_CHECKING(whether pcap_version is defined by libpcap) + AC_TRY_LINK([], + [ +char * +return_pcap_version(void) +{ + extern char pcap_version[]; + + return pcap_version; +} + ], + ac_lbl_cv_pcap_version_defined=yes, + ac_lbl_cv_pcap_version_defined=no) + if test "$ac_lbl_cv_pcap_version_defined" = yes ; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PCAP_VERSION) + else + AC_MSG_RESULT(no) + fi +fi +AC_MSG_CHECKING(whether pcap_debug is defined by libpcap) +AC_TRY_LINK([], + [ +int +return_pcap_debug(void) +{ + extern int pcap_debug; + + return pcap_debug; +} + ], + ac_lbl_cv_pcap_debug_defined=yes, + ac_lbl_cv_pcap_debug_defined=no) +if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PCAP_DEBUG) +else + AC_MSG_RESULT(no) + # + # OK, what about "yydebug"? + # + AC_MSG_CHECKING(whether yydebug is defined by libpcap) + AC_TRY_LINK([], + [ + int + return_yydebug(void) + { + extern int yydebug; + + return yydebug; + } + ], + ac_lbl_cv_yydebug_defined=yes, + ac_lbl_cv_yydebug_defined=no) + if test "$ac_lbl_cv_yydebug_defined" = yes ; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_YYDEBUG) + else + AC_MSG_RESULT(no) + fi +fi AC_REPLACE_FUNCS(bpf_dump) dnl moved to libpcap in 0.6 V_GROUP=0 @@ -566,6 +675,7 @@ if test -f /dev/bpf0 ; then V_GROUP=bpf fi +AC_LBL_CHECK_TYPE(int8_t, signed char) AC_LBL_CHECK_TYPE(u_int8_t, u_char) AC_LBL_CHECK_TYPE(int16_t, short) AC_LBL_CHECK_TYPE(u_int16_t, u_short) @@ -586,7 +696,20 @@ AC_MSG_CHECKING(for SSLeay) ac_cv_ssleay_path=no incdir=no for dir in /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do - if test -d $dir/lib -a -f $dir/lib/libcrypto.a; then + # + # XXX - is there a better way to check if a given library is + # in a given directory than checking each of the possible + # shared library suffixes? + # + # Are there any other suffixes we need to look for? Do we have to + # worry about ".so.{version}"? + # + # Or should we just look for "libcrypto.*"? + # + if test -d $dir/lib -a \( -f $dir/lib/libcrypto.a -o \ + -f $dir/lib/libcrypto.so -o \ + -f $dir/lib/libcrypto.sl -o \ + -f $dir/lib/libcrypto.dylib \); then ac_cv_ssleay_path=$dir fi if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then @@ -611,46 +734,13 @@ if test "$ac_cv_ssleay_path" != no; then fi AC_CHECK_LIB(crypto, des_cbc_encrypt) - bak_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $V_INCLS" - AC_CHECK_HEADERS(openssl/cast.h) - - if test "$ac_cv_header_openssl_cast_h" = "yes"; then - AC_MSG_CHECKING(for buggy CAST128) - AC_CACHE_VAL(td_cv_buggy_cast128, [AC_TRY_RUN(dnl -[ -#include -main() -{ - unsigned char key[] = {0x01,0x23,0x45,0x67,0x12}; - unsigned char in[] = {0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF}; - unsigned char out[sizeof(in)]; - unsigned char ok[] = {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E}; - CAST_KEY ks; - CAST_set_key(&ks, sizeof(key), key); - CAST_ecb_encrypt(in, out, &ks, CAST_ENCRYPT); - if (memcmp(out, ok, sizeof(ok)) != 0) - return 0; - else - return 1; -}], - [td_cv_buggy_cast128=yes], - [td_cv_buggy_cast128=no], - [td_cv_buggy_cast128="cross-compiling, assume yes"])]) - AC_MSG_RESULT($td_cv_buggy_cast128) - if test "$td_cv_buggy_cast128" != no; then - echo "NOTE: SSLeay 0.9.0b has a bug in CAST128 en/decoding routine." - echo "disabling CAST128 support." - AC_DEFINE(HAVE_BUGGY_CAST128) - fi - fi - - CPPFLAGS=$bak_CPPFLAGS + AC_CHECK_HEADERS(openssl/evp.h) fi ]) -AC_CHECK_HEADERS(openssl/rc5.h) AC_SUBST(V_CCOPT) +AC_SUBST(V_DEFS) AC_SUBST(V_GROUP) AC_SUBST(V_INCLS) AC_SUBST(V_PCAPDEP) diff --git a/dist/tcpdump/decnet.h b/dist/tcpdump/decnet.h index 5da78c00677e..d3cb35ba1291 100644 --- a/dist/tcpdump/decnet.h +++ b/dist/tcpdump/decnet.h @@ -1,4 +1,4 @@ -/* $NetBSD: decnet.h,v 1.1.1.1 2001/06/25 19:26:31 itojun Exp $ */ +/* $NetBSD: decnet.h,v 1.1.1.2 2004/09/27 17:06:44 dyoung Exp $ */ /* * Copyright (c) 1992, 1994, 1996 @@ -20,10 +20,18 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) Header: /tcpdump/master/tcpdump/decnet.h,v 1.7 2000/10/03 02:54:55 itojun Exp (LBL) + * @(#) Header: /tcpdump/master/tcpdump/decnet.h,v 1.11 2002/12/11 07:13:50 guy Exp (LBL) */ +#ifndef WIN32 typedef u_int8_t byte[1]; /* single byte field */ +#else +/* + * the keyword 'byte' generates conflicts in Windows + */ +typedef unsigned char Byte[1]; /* single byte field */ +#define byte Byte +#endif /* WIN32 */ typedef u_int8_t word[2]; /* 2 byte field */ typedef u_int8_t longword[4]; /* 4 bytes field */ diff --git a/dist/tcpdump/enc.h b/dist/tcpdump/enc.h new file mode 100644 index 000000000000..23b852bd4009 --- /dev/null +++ b/dist/tcpdump/enc.h @@ -0,0 +1,49 @@ +/* $NetBSD: enc.h,v 1.1.1.1 2004/09/27 17:06:44 dyoung Exp $ */ + +/* @(#) Header: /tcpdump/master/tcpdump/enc.h,v 1.1 2003/03/08 08:55:33 guy Exp (LBL) */ +/* From $OpenBSD: if_enc.h,v 1.8 2001/06/25 05:14:00 angelos Exp $ */ +/* + * The authors of this code are John Ioannidis (ji@tla.org), + * Angelos D. Keromytis (kermit@csd.uch.gr) and + * Niels Provos (provos@physnet.uni-hamburg.de). + * + * This code was written by John Ioannidis for BSD/OS in Athens, Greece, + * in November 1995. + * + * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996, + * by Angelos D. Keromytis. + * + * Additional transforms and features in 1997 and 1998 by Angelos D. Keromytis + * and Niels Provos. + * + * Copyright (C) 1995, 1996, 1997, 1998 by John Ioannidis, Angelos D. Keromytis + * and Niels Provos. + * Copyright (c) 2001, Angelos D. Keromytis. + * + * Permission to use, copy, and modify this software with or without fee + * is hereby granted, provided that this entire notice is included in + * all copies of any software which is or includes a copy or + * modification of this software. + * You may use this code under the GNU public license if you so wish. Please + * contribute changes back to the authors under this freer than GPL license + * so that we may further the use of strong encryption without limitations to + * all. + * + * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY + * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE + * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR + * PURPOSE. + */ + +#define ENC_HDRLEN 12 + +/* From $OpenBSD: mbuf.h,v 1.56 2002/01/25 15:50:23 art Exp $ */ +#define M_CONF 0x0400 /* packet was encrypted (ESP-transport) */ +#define M_AUTH 0x0800 /* packet was authenticated (AH) */ + +struct enchdr { + u_int32_t af; + u_int32_t spi; + u_int32_t flags; +}; diff --git a/dist/tcpdump/ethertype.h b/dist/tcpdump/ethertype.h index ce521d74aea8..cc9d3c7c8ed1 100644 --- a/dist/tcpdump/ethertype.h +++ b/dist/tcpdump/ethertype.h @@ -1,4 +1,4 @@ -/* $NetBSD: ethertype.h,v 1.1.1.1 2001/06/25 19:26:31 itojun Exp $ */ +/* $NetBSD: ethertype.h,v 1.1.1.2 2004/09/27 17:06:44 dyoung Exp $ */ /* * Copyright (c) 1993, 1994, 1996 @@ -20,7 +20,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) Header: /tcpdump/master/tcpdump/ethertype.h,v 1.16 2001/06/21 17:56:02 itojun Exp (LBL) + * @(#) Header: /tcpdump/master/tcpdump/ethertype.h,v 1.20 2003/07/01 19:10:26 guy Exp (LBL) */ /* @@ -71,9 +71,6 @@ #ifndef ETHERTYPE_SCA #define ETHERTYPE_SCA 0x6007 #endif -#ifndef ETHERTYPE_REVARP -#define ETHERTYPE_REVARP 0x8035 -#endif #ifndef ETHERTYPE_LANBRIDGE #define ETHERTYPE_LANBRIDGE 0x8038 #endif @@ -122,3 +119,11 @@ #ifndef ETHERTYPE_LOOPBACK #define ETHERTYPE_LOOPBACK 0x9000 #endif +#ifndef ETHERTYPE_VMAN +#define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */ +#endif +#ifndef ETHERTYPE_ISO +#define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */ +#endif + +extern const struct tok ethertype_values[]; diff --git a/dist/tcpdump/extract.h b/dist/tcpdump/extract.h index 4aaeda9f9fa3..d03959f39657 100644 --- a/dist/tcpdump/extract.h +++ b/dist/tcpdump/extract.h @@ -1,4 +1,4 @@ -/* $NetBSD: extract.h,v 1.1.1.2 2002/02/18 09:07:27 itojun Exp $ */ +/* $NetBSD: extract.h,v 1.1.1.3 2004/09/27 17:06:44 dyoung Exp $ */ /* * Copyright (c) 1992, 1993, 1994, 1995, 1996 @@ -20,40 +20,81 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) Header: /tcpdump/master/tcpdump/extract.h,v 1.17 2001/09/17 21:57:52 fenner Exp (LBL) + * @(#) Header: /tcpdump/master/tcpdump/extract.h,v 1.19 2002/12/11 07:13:51 guy Exp (LBL) */ /* Network to host order macros */ #ifdef LBL_ALIGN +/* + * The processor doesn't natively handle unaligned loads. + */ +#ifdef HAVE___ATTRIBUTE__ +/* + * We have __attribute__; we assume that means we have __attribute__((packed)). + * Declare packed structures containing a u_int16_t and a u_int32_t, + * cast the pointer to point to one of those, and fetch through it; + * the GCC manual doesn't appear to explicitly say that + * __attribute__((packed)) causes the compiler to generate unaligned-safe + * code, but it apppears to do so. + * + * We do this in case the compiler can generate, for this instruction set, + * better code to do an unaligned load and pass stuff to "ntohs()" or + * "ntohl()" than the code to fetch the bytes one at a time and + * assemble them. (That might not be the case on a little-endian platform, + * where "ntohs()" and "ntohl()" might not be done inline.) + */ +typedef struct { + u_int16_t val; +} __attribute__((packed)) unaligned_u_int16_t; + +typedef struct { + u_int32_t val; +} __attribute__((packed)) unaligned_u_int32_t; + #define EXTRACT_16BITS(p) \ - ((u_int16_t)*((const u_int8_t *)(p) + 0) << 8 | \ - (u_int16_t)*((const u_int8_t *)(p) + 1)) + ((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val)) #define EXTRACT_32BITS(p) \ - ((u_int32_t)*((const u_int8_t *)(p) + 0) << 24 | \ - (u_int32_t)*((const u_int8_t *)(p) + 1) << 16 | \ - (u_int32_t)*((const u_int8_t *)(p) + 2) << 8 | \ - (u_int32_t)*((const u_int8_t *)(p) + 3)) -#else + ((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val)) +#else /* HAVE___ATTRIBUTE__ */ +/* + * We don't have __attribute__, so do unaligned loads of big-endian + * quantities the hard way - fetch the bytes one at a time and + * assemble them. + */ +#define EXTRACT_16BITS(p) \ + ((u_int16_t)((u_int16_t)*((const u_int8_t *)(p) + 0) << 8 | \ + (u_int16_t)*((const u_int8_t *)(p) + 1))) +#define EXTRACT_32BITS(p) \ + ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 0) << 24 | \ + (u_int32_t)*((const u_int8_t *)(p) + 1) << 16 | \ + (u_int32_t)*((const u_int8_t *)(p) + 2) << 8 | \ + (u_int32_t)*((const u_int8_t *)(p) + 3))) +#endif /* HAVE___ATTRIBUTE__ */ +#else /* LBL_ALIGN */ +/* + * The processor natively handles unaligned loads, so we can just + * cast the pointer and fetch through it. + */ #define EXTRACT_16BITS(p) \ ((u_int16_t)ntohs(*(const u_int16_t *)(p))) #define EXTRACT_32BITS(p) \ ((u_int32_t)ntohl(*(const u_int32_t *)(p))) -#endif +#endif /* LBL_ALIGN */ #define EXTRACT_24BITS(p) \ - ((u_int32_t)*((const u_int8_t *)(p) + 0) << 16 | \ - (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \ - (u_int32_t)*((const u_int8_t *)(p) + 2)) + ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 0) << 16 | \ + (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \ + (u_int32_t)*((const u_int8_t *)(p) + 2))) /* Little endian protocol host order macros */ #define EXTRACT_LE_8BITS(p) (*(p)) #define EXTRACT_LE_16BITS(p) \ - ((u_int16_t)*((const u_int8_t *)(p) + 1) << 8 | \ - (u_int16_t)*((const u_int8_t *)(p) + 0)) + ((u_int16_t)((u_int16_t)*((const u_int8_t *)(p) + 1) << 8 | \ + (u_int16_t)*((const u_int8_t *)(p) + 0))) #define EXTRACT_LE_32BITS(p) \ - ((u_int32_t)*((const u_int8_t *)(p) + 3) << 24 | \ - (u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \ - (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \ - (u_int32_t)*((const u_int8_t *)(p) + 0)) + ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 3) << 24 | \ + (u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \ + (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \ + (u_int32_t)*((const u_int8_t *)(p) + 0))) diff --git a/dist/tcpdump/fddi.h b/dist/tcpdump/fddi.h index 1dd09e5c5819..d8e2ed379cb4 100644 --- a/dist/tcpdump/fddi.h +++ b/dist/tcpdump/fddi.h @@ -1,4 +1,4 @@ -/* $NetBSD: fddi.h,v 1.1.1.1 2001/06/25 19:26:31 itojun Exp $ */ +/* $NetBSD: fddi.h,v 1.1.1.2 2004/09/27 17:06:46 dyoung Exp $ */ /* * Copyright (c) 1992, 1993, 1994, 1995, 1996 @@ -20,7 +20,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) Header: /tcpdump/master/tcpdump/fddi.h,v 1.9 2000/10/09 02:59:39 guy Exp (LBL) + * @(#) Header: /tcpdump/master/tcpdump/fddi.h,v 1.11 2002/12/11 07:13:51 guy Exp (LBL) */ /* diff --git a/dist/tcpdump/gmpls.c b/dist/tcpdump/gmpls.c new file mode 100644 index 000000000000..f85ddc0aed84 --- /dev/null +++ b/dist/tcpdump/gmpls.c @@ -0,0 +1,136 @@ +/* $NetBSD: gmpls.c,v 1.1.1.1 2004/09/27 17:06:46 dyoung Exp $ */ + +/* + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code + * distributions retain the above copyright notice and this paragraph + * in its entirety, and (2) distributions including binary code include + * the above copyright notice and this paragraph in its entirety in + * the documentation or other materials provided with the distribution. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND + * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE. + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/gmpls.c,v 1.2.2.2 2003/11/16 08:51:05 guy Exp (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include "interface.h" + +/* rfc3471 */ +struct tok gmpls_link_prot_values[] = { + { 0x01, "Extra Traffic"}, + { 0x02, "Unprotected"}, + { 0x04, "Shared"}, + { 0x08, "Dedicated 1:1"}, + { 0x10, "Dedicated 1+1"}, + { 0x20, "Enhanced"}, + { 0x40, "Reserved"}, + { 0x80, "Reserved"}, + { 0, NULL } +}; + +/* rfc3471 */ +struct tok gmpls_switch_cap_values[] = { + { 1, "Packet-Switch Capable-1"}, + { 2, "Packet-Switch Capable-2"}, + { 3, "Packet-Switch Capable-3"}, + { 4, "Packet-Switch Capable-4"}, + { 51, "Layer-2 Switch Capable"}, + { 100, "Time-Division-Multiplex"}, + { 150, "Lambda-Switch Capable"}, + { 200, "Fiber-Switch Capable"}, + { 0, NULL } +}; + +/* rfc3471 */ +struct tok gmpls_encoding_values[] = { + { 1, "Packet"}, + { 2, "Ethernet V2/DIX"}, + { 3, "ANSI/ETSI PDH"}, + { 4, "Reserved"}, + { 5, "SDH ITU-T G.707/SONET ANSI T1.105"}, + { 6, "Reserved"}, + { 7, "Digital Wrapper"}, + { 8, "Lambda (photonic)"}, + { 9, "Fiber"}, + { 10, "Reserved"}, + { 11, "FiberChannel"}, + { 0, NULL } +}; + +/* rfc3471 */ +struct tok gmpls_payload_values[] = { + { 0, "Unknown"}, + { 1, "Reserved"}, + { 2, "Reserved"}, + { 3, "Reserved"}, + { 4, "Reserved"}, + { 5, "Asynchronous mapping of E4"}, + { 6, "Asynchronous mapping of DS3/T3"}, + { 7, "Asynchronous mapping of E3"}, + { 8, "Bit synchronous mapping of E3"}, + { 9, "Byte synchronous mapping of E3"}, + { 10, "Asynchronous mapping of DS2/T2"}, + { 11, "Bit synchronous mapping of DS2/T2"}, + { 12, "Reserved"}, + { 13, "Asynchronous mapping of E1"}, + { 14, "Byte synchronous mapping of E1"}, + { 15, "Byte synchronous mapping of 31 * DS0"}, + { 16, "Asynchronous mapping of DS1/T1"}, + { 17, "Bit synchronous mapping of DS1/T1"}, + { 18, "Byte synchronous mapping of DS1/T1"}, + { 19, "VC-11 in VC-12"}, + { 20, "Reserved"}, + { 21, "Reserved"}, + { 22, "DS1 SF Asynchronous"}, + { 23, "DS1 ESF Asynchronous"}, + { 24, "DS3 M23 Asynchronous"}, + { 25, "DS3 C-Bit Parity Asynchronous"}, + { 26, "VT/LOVC"}, + { 27, "STS SPE/HOVC"}, + { 28, "POS - No Scrambling, 16 bit CRC"}, + { 29, "POS - No Scrambling, 32 bit CRC"}, + { 30, "POS - Scrambling, 16 bit CRC"}, + { 31, "POS - Scrambling, 32 bit CRC"}, + { 32, "ATM mapping"}, + { 33, "Ethernet PHY"}, + { 34, "SONET/SDH"}, + { 35, "Reserved (SONET deprecated)"}, + { 36, "Digital Wrapper"}, + { 37, "Lambda"}, + { 38, "ANSI/ETSI PDH"}, + { 39, "Reserved"}, + { 40, "Link Access Protocol SDH (X.85 and X.86)"}, + { 41, "FDDI"}, + { 42, "DQDB (ETSI ETS 300 216)"}, + { 43, "FiberChannel-3 (Services)"}, + { 44, "HDLC"}, + { 45, "Ethernet V2/DIX (only)"}, + { 46, "Ethernet 802.3 (only)"}, +/* draft-ietf-ccamp-gmpls-g709-04.txt */ + { 47, "G.709 ODUj"}, + { 48, "G.709 OTUk(v)"}, + { 49, "CBR/CBRa"}, + { 50, "CBRb"}, + { 51, "BSOT"}, + { 52, "BSNT"}, + { 53, "IP/PPP (GFP)"}, + { 54, "Ethernet MAC (framed GFP)"}, + { 55, "Ethernet PHY (transparent GFP)"}, + { 56, "ESCON"}, + { 57, "FICON"}, + { 58, "Fiber Channel"}, + { 0, NULL } +}; diff --git a/dist/tcpdump/gmpls.h b/dist/tcpdump/gmpls.h new file mode 100644 index 000000000000..8d2419ae2fcc --- /dev/null +++ b/dist/tcpdump/gmpls.h @@ -0,0 +1,22 @@ +/* $NetBSD: gmpls.h,v 1.1.1.1 2004/09/27 17:06:46 dyoung Exp $ */ + +/* @(#) Header: /tcpdump/master/tcpdump/gmpls.h,v 1.2 2003/06/09 23:28:09 guy Exp (LBL) */ +/* + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code + * distributions retain the above copyright notice and this paragraph + * in its entirety, and (2) distributions including binary code include + * the above copyright notice and this paragraph in its entirety in + * the documentation or other materials provided with the distribution. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND + * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE. + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +extern struct tok gmpls_link_prot_values[]; +extern struct tok gmpls_switch_cap_values[]; +extern struct tok gmpls_encoding_values[]; +extern struct tok gmpls_payload_values[]; diff --git a/dist/tcpdump/ieee802_11.h b/dist/tcpdump/ieee802_11.h index b9737aa1795d..3f70fbbdcb25 100644 --- a/dist/tcpdump/ieee802_11.h +++ b/dist/tcpdump/ieee802_11.h @@ -1,6 +1,6 @@ -/* $NetBSD: ieee802_11.h,v 1.1.1.1 2001/06/25 19:26:31 itojun Exp $ */ +/* $NetBSD: ieee802_11.h,v 1.1.1.2 2004/09/27 17:06:46 dyoung Exp $ */ -/* @(#) Header: /tcpdump/master/tcpdump/ieee802_11.h,v 1.3 2001/06/14 09:50:01 guy Exp (LBL) */ +/* @(#) Header: /tcpdump/master/tcpdump/ieee802_11.h,v 1.9 2003/07/22 17:36:57 guy Exp (LBL) */ /* * Copyright (c) 2001 * Fortress Technologies @@ -23,52 +23,87 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define IEEE802_11_FC_LEN 2 +/* Lengths of 802.11 header components. */ +#define IEEE802_11_FC_LEN 2 +#define IEEE802_11_DUR_LEN 2 +#define IEEE802_11_DA_LEN 6 +#define IEEE802_11_SA_LEN 6 +#define IEEE802_11_BSSID_LEN 6 +#define IEEE802_11_RA_LEN 6 +#define IEEE802_11_TA_LEN 6 +#define IEEE802_11_SEQ_LEN 2 +#define IEEE802_11_IV_LEN 3 +#define IEEE802_11_KID_LEN 1 -#define T_MGMT 0x0 /* management */ -#define T_CTRL 0x1 /* control */ -#define T_DATA 0x2 /* data */ -#define T_RESV 0x3 /* reserved */ +/* Frame check sequence length. */ +#define IEEE802_11_FCS_LEN 4 -#define ST_ASSOC_REQUEST 0x0 -#define ST_ASSOC_RESPONSE 0x1 -#define ST_REASSOC_REQUEST 0x2 -#define ST_REASSOC_RESPONSE 0x3 -#define ST_PROBE_REQUEST 0x4 -#define ST_PROBE_RESPONSE 0x5 +/* Lengths of beacon components. */ +#define IEEE802_11_TSTAMP_LEN 8 +#define IEEE802_11_BCNINT_LEN 2 +#define IEEE802_11_CAPINFO_LEN 2 +#define IEEE802_11_LISTENINT_LEN 2 + +#define IEEE802_11_AID_LEN 2 +#define IEEE802_11_STATUS_LEN 2 +#define IEEE802_11_REASON_LEN 2 + +/* Length of previous AP in reassocation frame */ +#define IEEE802_11_AP_LEN 6 + +#define T_MGMT 0x0 /* management */ +#define T_CTRL 0x1 /* control */ +#define T_DATA 0x2 /* data */ +#define T_RESV 0x3 /* reserved */ + +#define ST_ASSOC_REQUEST 0x0 +#define ST_ASSOC_RESPONSE 0x1 +#define ST_REASSOC_REQUEST 0x2 +#define ST_REASSOC_RESPONSE 0x3 +#define ST_PROBE_REQUEST 0x4 +#define ST_PROBE_RESPONSE 0x5 /* RESERVED 0x6 */ /* RESERVED 0x7 */ -#define ST_BEACON 0x8 -#define ST_ATIM 0x9 -#define ST_DISASSOC 0xA -#define ST_AUTH 0xB -#define ST_DEAUTH 0xC +#define ST_BEACON 0x8 +#define ST_ATIM 0x9 +#define ST_DISASSOC 0xA +#define ST_AUTH 0xB +#define ST_DEAUTH 0xC /* RESERVED 0xD */ /* RESERVED 0xE */ /* RESERVED 0xF */ -#define CTRL_PS_POLL 0xA -#define CTRL_RTS 0xB -#define CTRL_CTS 0xC -#define CTRL_ACK 0xD -#define CTRL_CF_END 0xE -#define CTRL_END_ACK 0xF +#define CTRL_PS_POLL 0xA +#define CTRL_RTS 0xB +#define CTRL_CTS 0xC +#define CTRL_ACK 0xD +#define CTRL_CF_END 0xE +#define CTRL_END_ACK 0xF + +#define DATA_DATA 0x0 +#define DATA_DATA_CF_ACK 0x1 +#define DATA_DATA_CF_POLL 0x2 +#define DATA_DATA_CF_ACK_POLL 0x3 +#define DATA_NODATA 0x4 +#define DATA_NODATA_CF_ACK 0x5 +#define DATA_NODATA_CF_POLL 0x6 +#define DATA_NODATA_CF_ACK_POLL 0x7 /* * Bits in the frame control field. */ -#define FC_VERSION(fc) ((fc) & 0x3) -#define FC_TYPE(fc) (((fc) >> 2) & 0x3) -#define FC_SUBTYPE(fc) (((fc) >> 4) & 0xF) -#define FC_TO_DS(fc) ((fc) & 0x0100) -#define FC_FROM_DS(fc) ((fc) & 0x0200) -#define FC_MORE_FLAG(fc) ((fc) & 0x0400) -#define FC_RETRY(fc) ((fc) & 0x0800) -#define FC_POWER_MGMT(fc) ((fc) & 0x1000) -#define FC_MORE_DATA(fc) ((fc) & 0x2000) -#define FC_WEP(fc) ((fc) & 0x4000) -#define FC_ORDER(fc) ((fc) & 0x8000) +#define FC_VERSION(fc) ((fc) & 0x3) +#define FC_TYPE(fc) (((fc) >> 2) & 0x3) +#define FC_SUBTYPE(fc) (((fc) >> 4) & 0xF) +#define FC_TO_DS(fc) ((fc) & 0x0100) +#define FC_FROM_DS(fc) ((fc) & 0x0200) +#define FC_MORE_FLAG(fc) ((fc) & 0x0400) +#define FC_RETRY(fc) ((fc) & 0x0800) +#define FC_POWER_MGMT(fc) ((fc) & 0x1000) +#define FC_MORE_DATA(fc) ((fc) & 0x2000) +#define FC_WEP(fc) ((fc) & 0x4000) +#define FC_ORDER(fc) ((fc) & 0x8000) struct mgmt_header_t { u_int16_t fc; @@ -79,19 +114,21 @@ struct mgmt_header_t { u_int16_t seq_ctrl; }; -#define MGMT_HEADER_LEN (2+2+6+6+6+2) +#define MGMT_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\ + IEEE802_11_DA_LEN+IEEE802_11_SA_LEN+\ + IEEE802_11_BSSID_LEN+IEEE802_11_SEQ_LEN) -#define CAPABILITY_ESS(cap) ((cap) & 0x0001) -#define CAPABILITY_IBSS(cap) ((cap) & 0x0002) -#define CAPABILITY_CFP(cap) ((cap) & 0x0004) -#define CAPABILITY_CFP_REQ(cap) ((cap) & 0x0008) -#define CAPABILITY_PRIVACY(cap) ((cap) & 0x0010) +#define CAPABILITY_ESS(cap) ((cap) & 0x0001) +#define CAPABILITY_IBSS(cap) ((cap) & 0x0002) +#define CAPABILITY_CFP(cap) ((cap) & 0x0004) +#define CAPABILITY_CFP_REQ(cap) ((cap) & 0x0008) +#define CAPABILITY_PRIVACY(cap) ((cap) & 0x0010) struct ssid_t { u_int8_t element_id; u_int8_t length; u_char ssid[33]; /* 32 + 1 for null */ -} ; +}; struct rates_t { u_int8_t element_id; @@ -137,13 +174,13 @@ struct tim_t { u_int8_t bitmap[251]; }; -#define E_SSID 0 -#define E_RATES 1 -#define E_FH 2 -#define E_DS 3 -#define E_CF 4 -#define E_TIM 5 -#define E_IBSS 6 +#define E_SSID 0 +#define E_RATES 1 +#define E_FH 2 +#define E_DS 3 +#define E_CF 4 +#define E_TIM 5 +#define E_IBSS 6 /* reserved 7 */ /* reserved 8 */ /* reserved 9 */ @@ -155,7 +192,7 @@ struct tim_t { /* reserved 15 */ /* reserved 16 */ -#define E_CHALLENGE 16 +#define E_CHALLENGE 16 /* reserved 17 */ /* reserved 18 */ /* reserved 19 */ @@ -191,7 +228,8 @@ struct ctrl_rts_t { u_int8_t fcs[4]; }; -#define CTRL_RTS_LEN (2+2+6+6+4) +#define CTRL_RTS_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\ + IEEE802_11_RA_LEN+IEEE802_11_TA_LEN) struct ctrl_cts_t { u_int16_t fc; @@ -200,7 +238,7 @@ struct ctrl_cts_t { u_int8_t fcs[4]; }; -#define CTRL_CTS_LEN (2+2+6+4) +#define CTRL_CTS_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN) struct ctrl_ack_t { u_int16_t fc; @@ -209,7 +247,7 @@ struct ctrl_ack_t { u_int8_t fcs[4]; }; -#define CTRL_ACK_LEN (2+2+6+4) +#define CTRL_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN) struct ctrl_ps_poll_t { u_int16_t fc; @@ -219,7 +257,8 @@ struct ctrl_ps_poll_t { u_int8_t fcs[4]; }; -#define CTRL_PS_POLL_LEN (2+2+6+6+4) +#define CTRL_PS_POLL_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_AID_LEN+\ + IEEE802_11_BSSID_LEN+IEEE802_11_TA_LEN) struct ctrl_end_t { u_int16_t fc; @@ -229,7 +268,8 @@ struct ctrl_end_t { u_int8_t fcs[4]; }; -#define CTRL_END_LEN (2+2+6+6+4) +#define CTRL_END_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\ + IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN) struct ctrl_end_ack_t { u_int16_t fc; @@ -239,8 +279,9 @@ struct ctrl_end_ack_t { u_int8_t fcs[4]; }; -#define CTRL_END_ACK_LEN (2+2+6+6+4) +#define CTRL_END_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\ + IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN) -#define IV_IV(iv) ((iv) & 0xFFFFFF) -#define IV_PAD(iv) (((iv) >> 24) & 0x3F) -#define IV_KEYID(iv) (((iv) >> 30) & 0x03) +#define IV_IV(iv) ((iv) & 0xFFFFFF) +#define IV_PAD(iv) (((iv) >> 24) & 0x3F) +#define IV_KEYID(iv) (((iv) >> 30) & 0x03) diff --git a/dist/tcpdump/igrp.h b/dist/tcpdump/igrp.h index 1a557240ffdb..c909d30ea259 100644 --- a/dist/tcpdump/igrp.h +++ b/dist/tcpdump/igrp.h @@ -1,6 +1,6 @@ -/* $NetBSD: igrp.h,v 1.1.1.1 2001/06/25 19:26:31 itojun Exp $ */ +/* $NetBSD: igrp.h,v 1.1.1.2 2004/09/27 17:06:46 dyoung Exp $ */ -/* @(#) Header: /tcpdump/master/tcpdump/igrp.h,v 1.4 2000/12/17 23:07:49 guy Exp (LBL) */ +/* @(#) Header: /tcpdump/master/tcpdump/igrp.h,v 1.6 2002/12/11 07:13:52 guy Exp (LBL) */ /* Cisco IGRP definitions */ /* IGRP Header */ diff --git a/dist/tcpdump/ipfc.h b/dist/tcpdump/ipfc.h new file mode 100644 index 000000000000..718c95680bbe --- /dev/null +++ b/dist/tcpdump/ipfc.h @@ -0,0 +1,31 @@ +/* $NetBSD: ipfc.h,v 1.1.1.1 2004/09/27 17:06:30 dyoung Exp $ */ + +/* + * Copyright (c) 1992, 1993, 1994, 1995, 1996 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code distributions + * retain the above copyright notice and this paragraph in its entirety, (2) + * distributions including binary code include the above copyright notice and + * this paragraph in its entirety in the documentation or other materials + * provided with the distribution, and (3) all advertising materials mentioning + * features or use of this software display the following acknowledgement: + * ``This product includes software developed by the University of California, + * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of + * the University nor the names of its contributors may be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#) Header: /tcpdump/master/tcpdump/ipfc.h,v 1.4 2002/12/11 07:13:53 guy Exp (LBL) + */ + +struct ipfc_header { + u_char ipfc_dhost[8]; + u_char ipfc_shost[8]; +}; + +#define IPFC_HDRLEN 16 diff --git a/dist/tcpdump/ipproto.h b/dist/tcpdump/ipproto.h new file mode 100644 index 000000000000..731d27da9aea --- /dev/null +++ b/dist/tcpdump/ipproto.h @@ -0,0 +1,138 @@ +/* $NetBSD: ipproto.h,v 1.1.1.1 2004/09/27 17:06:28 dyoung Exp $ */ + +/* + * Copyright (c) 1982, 1986, 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#) Header: /tcpdump/master/tcpdump/ipproto.h,v 1.1.2.1 2003/11/24 20:31:22 guy Exp (LBL) + * + * From: + * @(#)in.h 8.3 (Berkeley) 1/3/94 + * $FreeBSD: src/sys/netinet/in.h,v 1.38.2.3 1999/08/29 16:29:34 peter Exp $ + */ + +#ifndef IPPROTO_IP +#define IPPROTO_IP 0 /* dummy for IP */ +#endif +#ifndef IPPROTO_HOPOPTS +#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */ +#endif +#ifndef IPPROTO_ICMP +#define IPPROTO_ICMP 1 /* control message protocol */ +#endif +#ifndef IPPROTO_IGMP +#define IPPROTO_IGMP 2 /* group mgmt protocol */ +#endif +#ifndef IPPROTO_IPV4 +#define IPPROTO_IPV4 4 +#endif +#ifndef IPPROTO_TCP +#define IPPROTO_TCP 6 /* tcp */ +#endif +#ifndef IPPROTO_EGP +#define IPPROTO_EGP 8 /* exterior gateway protocol */ +#endif +#ifndef IPPROTO_IGRP +#define IPPROTO_IGRP 9 +#endif +#ifndef IPPROTO_UDP +#define IPPROTO_UDP 17 /* user datagram protocol */ +#endif +#ifndef IPPROTO_IPV6 +#define IPPROTO_IPV6 41 +#endif +#ifndef IPPROTO_ROUTING +#define IPPROTO_ROUTING 43 /* IPv6 routing header */ +#endif +#ifndef IPPROTO_FRAGMENT +#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ +#endif +#ifndef IPPROTO_RSVP +#define IPPROTO_RSVP 46 /* resource reservation */ +#endif +#ifndef IPPROTO_GRE +#define IPPROTO_GRE 47 /* General Routing Encap. */ +#endif +#ifndef IPPROTO_ESP +#define IPPROTO_ESP 50 /* SIPP Encap Sec. Payload */ +#endif +#ifndef IPPROTO_AH +#define IPPROTO_AH 51 /* SIPP Auth Header */ +#endif +#ifndef IPPROTO_MOBILE +#define IPPROTO_MOBILE 55 +#endif +#ifndef IPPROTO_ICMPV6 +#define IPPROTO_ICMPV6 58 /* ICMPv6 */ +#endif +#ifndef IPPROTO_NONE +#define IPPROTO_NONE 59 /* IPv6 no next header */ +#endif +#ifndef IPPROTO_DSTOPTS +#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */ +#endif +#ifndef IPPROTO_MOBILITY_OLD +/* + * The current Protocol Numbers list says that the IP protocol number for + * mobility headers is 135; it cites draft-ietf-mobileip-ipv6-24, but + * that draft doesn't actually give a number. + * + * It appears that 62 used to be used, even though that's assigned to + * a protocol called CFTP; however, the only reference for CFTP is a + * Network Message from BBN back in 1982, so, for now, we support 62, + * aas well as 135, as a protocol number for mobility headers. + */ +#define IPPROTO_MOBILITY_OLD 62 +#endif +#ifndef IPPROTO_ND +#define IPPROTO_ND 77 /* Sun net disk proto (temp.) */ +#endif +#ifndef IPPROTO_IGRP +#define IPPROTO_IGRP 88 /* Cisco/GXS IGRP */ +#endif +#ifndef IPPROTO_OSPF +#define IPPROTO_OSPF 89 +#endif +#ifndef IPPROTO_PIM +#define IPPROTO_PIM 103 +#endif +#ifndef IPPROTO_IPCOMP +#define IPPROTO_IPCOMP 108 +#endif +#ifndef IPPROTO_VRRP +#define IPPROTO_VRRP 112 +#endif +#ifndef IPPROTO_SCTP +#define IPPROTO_SCTP 132 +#endif +#ifndef IPPROTO_MOBILITY +#define IPPROTO_MOBILITY 135 +#endif diff --git a/dist/tcpdump/ipsec_doi.h b/dist/tcpdump/ipsec_doi.h index f10984f43496..82218c51fb9e 100644 --- a/dist/tcpdump/ipsec_doi.h +++ b/dist/tcpdump/ipsec_doi.h @@ -1,9 +1,9 @@ -/* $NetBSD: ipsec_doi.h,v 1.1.1.1 2001/06/25 19:26:32 itojun Exp $ */ +/* $NetBSD: ipsec_doi.h,v 1.1.1.2 2004/09/27 17:06:48 dyoung Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -15,7 +15,7 @@ * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* YIPS @(#)Id: ipsec_doi.h,v 1.4 2000/10/04 03:00:29 itojun Exp */ +/* YIPS @(#)Id: ipsec_doi.h,v 1.7 2002/12/11 07:13:53 guy Exp */ /* refer to RFC 2407 */ diff --git a/dist/tcpdump/ipx.h b/dist/tcpdump/ipx.h index c862531fc84c..1c41bc43682b 100644 --- a/dist/tcpdump/ipx.h +++ b/dist/tcpdump/ipx.h @@ -1,9 +1,9 @@ -/* $NetBSD: ipx.h,v 1.1.1.2 2002/05/31 09:28:27 itojun Exp $ */ +/* $NetBSD: ipx.h,v 1.1.1.3 2004/09/27 17:06:48 dyoung Exp $ */ /* - * IPX protocol formats + * IPX protocol formats * - * @(#) Header: /tcpdump/master/tcpdump/ipx.h,v 1.5 2002/03/05 11:35:45 guy Exp + * @(#) Header: /tcpdump/master/tcpdump/ipx.h,v 1.8 2002/12/11 07:13:54 guy Exp */ /* well-known sockets */ diff --git a/dist/tcpdump/isakmp.h b/dist/tcpdump/isakmp.h index 637dcca51891..cb27b12668e9 100644 --- a/dist/tcpdump/isakmp.h +++ b/dist/tcpdump/isakmp.h @@ -1,9 +1,9 @@ -/* $NetBSD: isakmp.h,v 1.1.1.1 2001/06/25 19:26:32 itojun Exp $ */ +/* $NetBSD: isakmp.h,v 1.1.1.2 2004/09/27 17:06:48 dyoung Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -15,7 +15,7 @@ * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* YIPS @(#)Id: isakmp.h,v 1.7 2000/10/03 05:16:38 itojun Exp */ +/* YIPS @(#)Id: isakmp.h,v 1.10 2002/12/11 07:13:54 guy Exp */ /* refer to RFC 2408 */ diff --git a/dist/tcpdump/lane.h b/dist/tcpdump/lane.h index d36b18b0c362..4a2e24538f9d 100644 --- a/dist/tcpdump/lane.h +++ b/dist/tcpdump/lane.h @@ -1,8 +1,8 @@ -/* $NetBSD: lane.h,v 1.1.1.1 2001/06/25 19:26:32 itojun Exp $ */ +/* $NetBSD: lane.h,v 1.1.1.2 2004/09/27 17:06:48 dyoung Exp $ */ /* - * Marko Kiiskila carnil@cs.tut.fi - * + * Marko Kiiskila carnil@cs.tut.fi + * * Tampere University of Technology - Telecommunications Laboratory * * Permission to use, copy, modify and distribute this @@ -14,15 +14,15 @@ * documentation, and that the use of this software is * acknowledged in any publications resulting from using * the software. - * + * * TUT ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION AND DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS * SOFTWARE. - * + * */ -/* Id: lane.h,v 1.3 2000/10/03 02:54:56 itojun Exp */ +/* Id: lane.h,v 1.7 2002/12/11 07:13:54 guy Exp */ #ifndef ETHER_ADDR_LEN #define ETHER_ADDR_LEN 6 @@ -34,3 +34,10 @@ struct lecdatahdr_8023 { u_int8_t h_source[ETHER_ADDR_LEN]; u_int16_t h_type; }; + +struct lane_controlhdr { + u_int16_t lec_header; + u_int8_t lec_proto; + u_int8_t lec_vers; + u_int16_t lec_opcode; +}; diff --git a/dist/tcpdump/llc.h b/dist/tcpdump/llc.h index f0dab0631db4..a62ccaeb43f1 100644 --- a/dist/tcpdump/llc.h +++ b/dist/tcpdump/llc.h @@ -1,4 +1,4 @@ -/* $NetBSD: llc.h,v 1.1.1.2 2002/05/31 09:27:59 itojun Exp $ */ +/* $NetBSD: llc.h,v 1.1.1.3 2004/09/27 17:06:49 dyoung Exp $ */ /* * Copyright (c) 1993, 1994, 1997 @@ -20,7 +20,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) Header: /tcpdump/master/tcpdump/llc.h,v 1.14 2002/04/07 09:50:30 guy Exp (LBL) + * @(#) Header: /tcpdump/master/tcpdump/llc.h,v 1.16 2002/12/11 07:13:54 guy Exp (LBL) */ /* diff --git a/dist/tcpdump/netbios.h b/dist/tcpdump/netbios.h index 5c4827ce913a..f40be0ea2dd9 100644 --- a/dist/tcpdump/netbios.h +++ b/dist/tcpdump/netbios.h @@ -1,9 +1,9 @@ -/* $NetBSD: netbios.h,v 1.1.1.1 2001/06/25 19:26:32 itojun Exp $ */ +/* $NetBSD: netbios.h,v 1.1.1.2 2004/09/27 17:06:51 dyoung Exp $ */ /* * NETBIOS protocol formats * - * @(#) Header: /tcpdump/master/tcpdump/netbios.h,v 1.1.1.1 1999/10/07 23:47:10 mcr Exp + * @(#) Header: /tcpdump/master/tcpdump/netbios.h,v 1.3 2002/12/11 07:13:55 guy Exp */ struct p8022Hdr { diff --git a/dist/tcpdump/ntp.h b/dist/tcpdump/ntp.h index e9b45c7fe119..7f7873b30fa3 100644 --- a/dist/tcpdump/ntp.h +++ b/dist/tcpdump/ntp.h @@ -1,6 +1,6 @@ -/* $NetBSD: ntp.h,v 1.1.1.1 2001/06/25 19:26:32 itojun Exp $ */ +/* $NetBSD: ntp.h,v 1.1.1.2 2004/09/27 17:06:51 dyoung Exp $ */ -/* Header: /tcpdump/master/tcpdump/ntp.h,v 1.4 2000/10/03 02:54:57 itojun Exp */ +/* Header: /tcpdump/master/tcpdump/ntp.h,v 1.7 2003/08/06 04:58:21 guy Exp */ /* * Based on ntp.h from the U of MD implementation @@ -10,7 +10,7 @@ /* * Definitions for the masses */ -#define JAN_1970 2208988800 /* 1970 - 1900 in seconds */ +#define JAN_1970 2208988800U /* 1970 - 1900 in seconds */ /* * Structure definitions for NTP fixed point values diff --git a/dist/tcpdump/oakley.h b/dist/tcpdump/oakley.h index f001dd5da6e0..23db480987cd 100644 --- a/dist/tcpdump/oakley.h +++ b/dist/tcpdump/oakley.h @@ -1,9 +1,9 @@ -/* $NetBSD: oakley.h,v 1.1.1.1 2001/06/25 19:26:32 itojun Exp $ */ +/* $NetBSD: oakley.h,v 1.1.1.2 2004/09/27 17:06:51 dyoung Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -15,7 +15,7 @@ * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* YIPS @(#)Id: oakley.h,v 1.1 1999/10/30 05:11:10 itojun Exp */ +/* YIPS @(#)Id: oakley.h,v 1.4 2002/12/11 07:13:56 guy Exp */ /* refer to RFC 2409 */ diff --git a/dist/tcpdump/ospf.h b/dist/tcpdump/ospf.h index 52e2bbd2da48..0e4fb991d703 100644 --- a/dist/tcpdump/ospf.h +++ b/dist/tcpdump/ospf.h @@ -1,6 +1,6 @@ -/* $NetBSD: ospf.h,v 1.1.1.1 2001/06/25 19:26:33 itojun Exp $ */ +/* $NetBSD: ospf.h,v 1.1.1.2 2004/09/27 17:06:52 dyoung Exp $ */ -/* @(#) Header: /tcpdump/master/tcpdump/ospf.h,v 1.3 2000/12/17 23:07:50 guy Exp (LBL) */ +/* @(#) Header: /tcpdump/master/tcpdump/ospf.h,v 1.11 2003/10/22 17:08:46 hannes Exp (LBL) */ /* * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. @@ -23,25 +23,34 @@ * * OSPF support contributed by Jeffrey Honig (jch@mitchell.cit.cornell.edu) */ -#define OSPF_TYPE_UMD 0 /* UMd's special monitoring packets */ -#define OSPF_TYPE_HELLO 1 /* Hello */ -#define OSPF_TYPE_DB 2 /* Database Description */ -#define OSPF_TYPE_LSR 3 /* Link State Request */ -#define OSPF_TYPE_LSU 4 /* Link State Update */ -#define OSPF_TYPE_LSA 5 /* Link State Ack */ -#define OSPF_TYPE_MAX 6 +#define OSPF_TYPE_UMD 0 /* UMd's special monitoring packets */ +#define OSPF_TYPE_HELLO 1 /* Hello */ +#define OSPF_TYPE_DD 2 /* Database Description */ +#define OSPF_TYPE_LS_REQ 3 /* Link State Request */ +#define OSPF_TYPE_LS_UPDATE 4 /* Link State Update */ +#define OSPF_TYPE_LS_ACK 5 /* Link State Ack */ -/* Options *_options */ +/* Options field + * + * +------------------------------------+ + * | * | O | DC | EA | N/P | MC | E | T | + * +------------------------------------+ + * + */ + #define OSPF_OPTION_T 0x01 /* T bit: TOS support */ #define OSPF_OPTION_E 0x02 /* E bit: External routes advertised */ #define OSPF_OPTION_MC 0x04 /* MC bit: Multicast capable */ +#define OSPF_OPTION_NP 0x08 /* N/P bit: NSSA capable */ +#define OSPF_OPTION_EA 0x10 /* EA bit: External Attribute capable */ +#define OSPF_OPTION_DC 0x20 /* DC bit: Demand circuit capable */ +#define OSPF_OPTION_O 0x40 /* O bit: Opaque LSA capable */ /* ospf_authtype */ #define OSPF_AUTH_NONE 0 /* No auth-data */ #define OSPF_AUTH_SIMPLE 1 /* Simple password */ #define OSPF_AUTH_MD5 2 /* MD5 authentication */ -#define OSPF_AUTH_MD5_LEN 16 /* length of MD5 authentication */ - +#define OSPF_AUTH_MD5_LEN 16 /* length of MD5 authentication */ /* db_flags */ #define OSPF_DB_INIT 0x04 /* */ @@ -56,7 +65,33 @@ #define LS_TYPE_ASE 5 /* ASE */ #define LS_TYPE_GROUP 6 /* Group membership (multicast */ /* extensions 23 July 1991) */ -#define LS_TYPE_MAX 7 +#define LS_TYPE_NSSA 7 /* rfc1587 - Not so Stubby Areas */ +#define LS_TYPE_OPAQUE_LL 9 /* rfc2370 - Opaque Link Local */ +#define LS_TYPE_OPAQUE_AL 10 /* rfc2370 - Opaque Link Local */ +#define LS_TYPE_OPAQUE_DW 11 /* rfc2370 - Opaque Domain Wide */ + +#define LS_OPAQUE_TYPE_TE 1 /* rfc3630 */ +#define LS_OPAQUE_TYPE_GRACE 3 /* draft-ietf-ospf-hitless-restart */ + +#define LS_OPAQUE_TE_TLV_ROUTER 1 /* rfc3630 */ +#define LS_OPAQUE_TE_TLV_LINK 2 /* rfc3630 */ + +#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE 1 /* rfc3630 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_ID 2 /* rfc3630 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_LOCAL_IP 3 /* rfc3630 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_REMOTE_IP 4 /* rfc3630 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_TE_METRIC 5 /* rfc3630 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_MAX_BW 6 /* rfc3630 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_MAX_RES_BW 7 /* rfc3630 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_UNRES_BW 8 /* rfc3630 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_ADMIN_GROUP 9 /* rfc3630 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_LOCAL_REMOTE_ID 11 /* draft-ietf-ccamp-ospf-gmpls-extensions */ +#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE 14 /* draft-ietf-ccamp-ospf-gmpls-extensions */ +#define LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR 15 /* draft-ietf-ccamp-ospf-gmpls-extensions */ +#define LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP 16 /* draft-ietf-ccamp-ospf-gmpls-extensions */ + +#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE_PTP 1 /* rfc3630 */ +#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE_MA 2 /* rfc3630 */ /************************************************* * @@ -97,12 +132,18 @@ struct lsa_hdr { u_int16_t ls_age; u_int8_t ls_options; u_int8_t ls_type; - struct in_addr ls_stateid; + union { + struct in_addr lsa_id; + struct { /* opaque LSAs change the LSA-ID field */ + u_int8_t opaque_type; + u_int8_t opaque_id[3]; + } opaque_field; + } un_lsa_id; struct in_addr ls_router; u_int32_t ls_seq; u_int16_t ls_chksum; u_int16_t ls_length; -} ; +}; /* link state advertisement */ struct lsa { @@ -151,8 +192,21 @@ struct lsa { u_int32_t mcla_vtype; struct in_addr mcla_vid; } un_mcla[1]; + + /* Opaque TE LSA */ + struct { + u_int16_t type; + u_int16_t length; + u_int8_t data[1]; /* may repeat */ + } un_te_lsa_tlv; + + /* Unknown LSA */ + struct unknown { + u_int8_t data[1]; /* may repeat */ + } un_unknown[1]; + } lsa_un; -} ; +}; /* @@ -162,7 +216,7 @@ struct tos_metric { u_int8_t tos_type; u_int8_t tos_zero; u_int16_t tos_metric; -} ; +}; #define OSPF_AUTH_SIZE 8 @@ -203,8 +257,14 @@ struct ospfhdr { /* Link State Request */ struct lsr { - u_int32_t ls_type; - struct in_addr ls_stateid; + u_int8_t ls_type[4]; + union { + struct in_addr ls_stateid; + struct { /* opaque LSAs change the LSA-ID field */ + u_int8_t opaque_type; + u_int8_t opaque_id[3]; + } opaque_field; + } un_ls_stateid; struct in_addr ls_router; } un_lsr[1]; /* may repeat */ @@ -219,7 +279,7 @@ struct ospfhdr { struct lsa_hdr lsa_lshdr[1]; /* may repeat */ } un_lsa ; } ospf_un ; -} ; +}; #define ospf_hello ospf_un.un_hello #define ospf_db ospf_un.un_db diff --git a/dist/tcpdump/ospf6.h b/dist/tcpdump/ospf6.h index bc9f9abd6471..6e17145e76d7 100644 --- a/dist/tcpdump/ospf6.h +++ b/dist/tcpdump/ospf6.h @@ -1,6 +1,6 @@ -/* $NetBSD: ospf6.h,v 1.1.1.1 2001/06/25 19:26:33 itojun Exp $ */ +/* $NetBSD: ospf6.h,v 1.1.1.2 2004/09/27 17:06:52 dyoung Exp $ */ -/* @(#) Header: /tcpdump/master/tcpdump/ospf6.h,v 1.3 2000/12/17 23:07:50 guy Exp (LBL) */ +/* @(#) Header: /tcpdump/master/tcpdump/ospf6.h,v 1.6 2002/12/11 07:13:56 guy Exp (LBL) */ /* * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. @@ -107,7 +107,7 @@ struct lsa_hdr { u_int32_t ls_seq; u_int16_t ls_chksum; u_int16_t ls_length; -} ; +}; struct lsa_prefix { u_int8_t lsa_p_len; @@ -155,7 +155,7 @@ struct lsa { /* AS external links advertisements */ struct { u_int32_t asla_metric; - struct lsa_prefix asla_prefix[1]; + struct lsa_prefix asla_prefix[1]; /* some optional fields follow */ } un_asla; @@ -197,7 +197,7 @@ struct lsa { struct lsa_prefix intra_ap_prefix[1]; } un_intra_ap; } lsa_un; -} ; +}; /* @@ -207,7 +207,7 @@ struct tos_metric { u_int8_t tos_type; u_int8_t tos_zero; u_int16_t tos_metric; -} ; +}; #define OSPF_AUTH_SIZE 8 @@ -270,7 +270,7 @@ struct ospf6hdr { struct lsa_hdr lsa_lshdr[1]; /* may repeat */ } un_lsa ; } ospf6_un ; -} ; +}; #define ospf6_hello ospf6_un.un_hello #define ospf6_db ospf6_un.un_db diff --git a/dist/tcpdump/oui.c b/dist/tcpdump/oui.c new file mode 100644 index 000000000000..3b1a641f516a --- /dev/null +++ b/dist/tcpdump/oui.c @@ -0,0 +1,64 @@ +/* $NetBSD: oui.c,v 1.1.1.1 2004/09/27 17:06:52 dyoung Exp $ */ + +/* + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code + * distributions retain the above copyright notice and this paragraph + * in its entirety, and (2) distributions including binary code include + * the above copyright notice and this paragraph in its entirety in + * the documentation or other materials provided with the distribution. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND + * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE. + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/oui.c,v 1.2.2.1 2004/02/06 14:38:51 hannes Exp (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "interface.h" +#include "oui.h" + +/* FIXME complete OUI list using a script */ + +struct tok oui_values[] = { + { 0x009069, "Juniper"}, + { 0x00000c, "Cisco"}, +}; + +/* list taken from ethereal/packet-radius.c */ + +struct tok smi_values[] = { + { SMI_ACC, "ACC"}, + { SMI_CISCO, "Cisco"}, + { SMI_SHIVA, "Shiva"}, + { SMI_MICROSOFT, "Microsoft"}, + { SMI_LIVINGSTON, "Livingston"}, + { SMI_3COM, "3Com"}, + { SMI_ASCEND, "Ascend"}, + { SMI_BAY, "Bay Networks"}, + { SMI_FOUNDRY, "Foundry"}, + { SMI_VERSANET, "Versanet"}, + { SMI_REDBACK, "Redback"}, + { SMI_JUNIPER, "Juniper Networks"}, + { SMI_APTIS, "Aptis"}, + { SMI_COSINE, "CoSine Communications"}, + { SMI_SHASTA, "Shasta"}, + { SMI_NOMADIX, "Nomadix"}, + { SMI_UNISPHERE, "Unisphere Networks"}, + { SMI_ISSANNI, "Issanni Communications"}, + { SMI_QUINTUM, "Quintum"}, + { SMI_COLUBRIS, "Colubris"}, + { SMI_COLUMBIA_UNIVERSITY, "Columbia University"}, + { SMI_THE3GPP, "3GPP"}, + { 0, NULL } +}; diff --git a/dist/tcpdump/oui.h b/dist/tcpdump/oui.h new file mode 100644 index 000000000000..14d4a71aff2b --- /dev/null +++ b/dist/tcpdump/oui.h @@ -0,0 +1,43 @@ +/* $NetBSD: oui.h,v 1.1.1.1 2004/09/27 17:06:52 dyoung Exp $ */ + +/* @(#) Header: /tcpdump/master/tcpdump/oui.h,v 1.2.2.1 2004/02/06 14:38:50 hannes Exp (LBL) */ +/* + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code + * distributions retain the above copyright notice and this paragraph + * in its entirety, and (2) distributions including binary code include + * the above copyright notice and this paragraph in its entirety in + * the documentation or other materials provided with the distribution. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND + * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE. + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +extern struct tok oui_values[]; +extern struct tok smi_values[]; + +#define SMI_ACC 5 +#define SMI_CISCO 9 +#define SMI_SHIVA 166 +#define SMI_LIVINGSTON 307 +#define SMI_MICROSOFT 311 +#define SMI_3COM 429 +#define SMI_ASCEND 529 +#define SMI_BAY 1584 +#define SMI_FOUNDRY 1991 +#define SMI_VERSANET 2180 +#define SMI_REDBACK 2352 +#define SMI_JUNIPER 2636 +#define SMI_APTIS 2637 +#define SMI_COSINE 3085 +#define SMI_SHASTA 3199 +#define SMI_NOMADIX 3309 +#define SMI_UNISPHERE 4874 +#define SMI_ISSANNI 5948 +#define SMI_QUINTUM 6618 +#define SMI_COLUBRIS 8744 +#define SMI_COLUMBIA_UNIVERSITY 11862 +#define SMI_THE3GPP 10415 diff --git a/dist/tcpdump/pcap-missing.h b/dist/tcpdump/pcap-missing.h new file mode 100644 index 000000000000..cce2ce6a7564 --- /dev/null +++ b/dist/tcpdump/pcap-missing.h @@ -0,0 +1,58 @@ +/* $NetBSD: pcap-missing.h,v 1.1.1.1 2004/09/27 17:06:52 dyoung Exp $ */ + +/* + * Copyright (c) 1988-2002 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code distributions + * retain the above copyright notice and this paragraph in its entirety, (2) + * distributions including binary code include the above copyright notice and + * this paragraph in its entirety in the documentation or other materials + * provided with the distribution, and (3) all advertising materials mentioning + * features or use of this software display the following acknowledgement: + * ``This product includes software developed by the University of California, + * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of + * the University nor the names of its contributors may be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#) Header: /tcpdump/master/tcpdump/pcap-missing.h,v 1.1.2.1 2003/11/18 23:12:11 guy Exp (LBL) + */ + +#ifndef tcpdump_pcap_missing_h +#define tcpdump_pcap_missing_h + +/* + * Declarations of functions that might be missing from libpcap. + */ + +#ifndef HAVE_PCAP_LIST_DATALINKS +extern int pcap_list_datalinks(pcap_t *, int **); +#endif + +#ifndef HAVE_PCAP_DATALINK_NAME_TO_VAL +/* + * We assume no platform has one but not the other. + */ +extern int pcap_datalink_name_to_val(const char *); +extern const char *pcap_datalink_val_to_name(int); +#endif + +#ifndef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION +extern const char *pcap_datalink_val_to_description(int); +#endif + +#endif + + + + + + + + + diff --git a/dist/tcpdump/pf.h b/dist/tcpdump/pf.h new file mode 100644 index 000000000000..c6e050b170af --- /dev/null +++ b/dist/tcpdump/pf.h @@ -0,0 +1,79 @@ +/* $NetBSD: pf.h,v 1.1.1.1 2004/09/27 17:06:52 dyoung Exp $ */ + +/* + * Copyright (c) 2001 Daniel Hartmeier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @(#) Header: /tcpdump/master/tcpdump/pf.h,v 1.1.2.1 2004/03/28 21:25:03 fenner Exp (LBL) + */ + +/* from $OpenBSD: pfvar.h,v 1.170 2003/08/22 21:50:34 david Exp $ */ + +enum { PF_INOUT=0, PF_IN=1, PF_OUT=2 }; +enum { PF_PASS=0, PF_DROP=1, PF_SCRUB=2, PF_NAT=3, PF_NONAT=4, + PF_BINAT=5, PF_NOBINAT=6, PF_RDR=7, PF_NORDR=8, PF_SYNPROXY_DROP=9 }; + +/* Reasons code for passing/dropping a packet */ +#define PFRES_MATCH 0 /* Explicit match of a rule */ +#define PFRES_BADOFF 1 /* Bad offset for pull_hdr */ +#define PFRES_FRAG 2 /* Dropping following fragment */ +#define PFRES_SHORT 3 /* Dropping short packet */ +#define PFRES_NORM 4 /* Dropping by normalizer */ +#define PFRES_MEMORY 5 /* Dropped due to lacking mem */ +#define PFRES_MAX 6 /* total+1 */ + +#define PFRES_NAMES { \ + "match", \ + "bad-offset", \ + "fragment", \ + "short", \ + "normalize", \ + "memory", \ + NULL \ +} + +#define PF_RULESET_NAME_SIZE 16 + +/* from $OpenBSD: if_pflog.h,v 1.9 2003/07/15 20:27:27 dhartmei Exp $ */ + +#ifndef IFNAMSIZ +#define IFNAMSIZ 16 +#endif + +struct pfloghdr { + u_int8_t length; + sa_family_t af; + u_int8_t action; + u_int8_t reason; + char ifname[IFNAMSIZ]; + char ruleset[PF_RULESET_NAME_SIZE]; + u_int32_t rulenr; + u_int32_t subrulenr; + u_int8_t dir; + u_int8_t pad[3]; +}; +#define PFLOG_HDRLEN sizeof(struct pfloghdr) diff --git a/dist/tcpdump/ppp.h b/dist/tcpdump/ppp.h index dd6ea96f078d..626a3bc1855c 100644 --- a/dist/tcpdump/ppp.h +++ b/dist/tcpdump/ppp.h @@ -1,6 +1,6 @@ -/* $NetBSD: ppp.h,v 1.1.1.1 2001/06/25 19:26:33 itojun Exp $ */ +/* $NetBSD: ppp.h,v 1.1.1.2 2004/09/27 17:06:52 dyoung Exp $ */ -/* @(#) Header: /tcpdump/master/tcpdump/ppp.h,v 1.12 2001/02/04 02:17:55 fenner Exp (LBL) */ +/* @(#) Header: /tcpdump/master/tcpdump/ppp.h,v 1.14 2003/05/22 15:29:22 hannes Exp (LBL) */ /* * Point to Point Protocol (PPP) RFC1331 * @@ -40,6 +40,8 @@ #define PPP_HELLO 0x0201 /* 802.1d Hello Packets */ #define PPP_LUXCOM 0x0231 /* Luxcom */ #define PPP_SNS 0x0233 /* Sigma Network Systems */ +#define PPP_MPLS_UCAST 0x0281 /* rfc 3032 */ +#define PPP_MPLS_MCAST 0x0283 /* rfc 3022 */ #define PPP_IPCP 0x8021 /* IP Control Protocol */ #define PPP_OSICP 0x8023 /* OSI Network Layer Control Protocol */ @@ -51,13 +53,17 @@ #define PPP_VINESCP 0x8035 /* Banyan Vines Control Protocol */ #define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */ #define PPP_CCP 0x80fd /* Compress Control Protocol */ +#define PPP_MPLSCP 0x8281 /* rfc 3022 */ #define PPP_LCP 0xc021 /* Link Control Protocol */ #define PPP_PAP 0xc023 /* Password Authentication Protocol */ #define PPP_LQM 0xc025 /* Link Quality Monitoring */ +#define PPP_SPAP 0xc027 #define PPP_CHAP 0xc223 /* Challenge Handshake Authentication Protocol */ #define PPP_BACP 0xc02b /* Bandwidth Allocation Control Protocol */ #define PPP_BAP 0xc02d /* BAP */ #define PPP_MP 0xc03d /* Multi-Link */ +#define PPP_SPAP_OLD 0xc123 +#define PPP_EAP 0xc227 extern struct tok ppptype2str[]; diff --git a/dist/tcpdump/print-aodv.c b/dist/tcpdump/print-aodv.c new file mode 100644 index 000000000000..baf6c84bb5db --- /dev/null +++ b/dist/tcpdump/print-aodv.c @@ -0,0 +1,457 @@ +/* $NetBSD: print-aodv.c,v 1.1.1.1 2004/09/27 17:06:54 dyoung Exp $ */ + +/* + * Copyright (c) 2003 Bruce M. Simpson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Bruce M. Simpson. + * 4. Neither the name of Bruce M. Simpson nor the names of co- + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Bruce M. Simpson AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Bruce M. Simpson OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/print-aodv.c,v 1.8.2.3 2004/03/24 00:30:41 guy Exp (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include +#include + +#include "interface.h" +#include "addrtoname.h" +#include "extract.h" /* must come after interface.h */ + +#include "aodv.h" + +static void +aodv_extension(const struct aodv_ext *ep, u_int length) +{ + u_int i; + const struct aodv_hello *ah; + + switch (ep->type) { + case AODV_EXT_HELLO: + if (snapend < (u_char *) ep) { + printf(" [|hello]"); + return; + } + i = min(length, (u_int)(snapend - (u_char *)ep)); + if (i < sizeof(struct aodv_hello)) { + printf(" [|hello]"); + return; + } + i -= sizeof(struct aodv_hello); + ah = (void *)ep; + printf("\n\text HELLO %ld ms", + (unsigned long)EXTRACT_32BITS(&ah->interval)); + break; + + default: + printf("\n\text %u %u", ep->type, ep->length); + break; + } +} + +static void +aodv_rreq(const union aodv *ap, const u_char *dat, u_int length) +{ + u_int i; + + if (snapend < dat) { + printf(" [|aodv]"); + return; + } + i = min(length, (u_int)(snapend - dat)); + if (i < sizeof(ap->rreq)) { + printf(" [|rreq]"); + return; + } + i -= sizeof(ap->rreq); + printf(" rreq %u %s%s%s%s%shops %u id 0x%08lx\n" + "\tdst %s seq %lu src %s seq %lu", length, + ap->rreq.rreq_type & RREQ_JOIN ? "[J]" : "", + ap->rreq.rreq_type & RREQ_REPAIR ? "[R]" : "", + ap->rreq.rreq_type & RREQ_GRAT ? "[G]" : "", + ap->rreq.rreq_type & RREQ_DEST ? "[D]" : "", + ap->rreq.rreq_type & RREQ_UNKNOWN ? "[U] " : " ", + ap->rreq.rreq_hops, + (unsigned long)EXTRACT_32BITS(&ap->rreq.rreq_id), + ipaddr_string(&ap->rreq.rreq_da), + (unsigned long)EXTRACT_32BITS(&ap->rreq.rreq_ds), + ipaddr_string(&ap->rreq.rreq_oa), + (unsigned long)EXTRACT_32BITS(&ap->rreq.rreq_os)); + if (i >= sizeof(struct aodv_ext)) + aodv_extension((void *)(&ap->rreq + 1), i); +} + +static void +aodv_rrep(const union aodv *ap, const u_char *dat, u_int length) +{ + u_int i; + + if (snapend < dat) { + printf(" [|aodv]"); + return; + } + i = min(length, (u_int)(snapend - dat)); + if (i < sizeof(ap->rrep)) { + printf(" [|rrep]"); + return; + } + i -= sizeof(ap->rrep); + printf(" rrep %u %s%sprefix %u hops %u\n" + "\tdst %s dseq %lu src %s %lu ms", length, + ap->rrep.rrep_type & RREP_REPAIR ? "[R]" : "", + ap->rrep.rrep_type & RREP_ACK ? "[A] " : " ", + ap->rrep.rrep_ps & RREP_PREFIX_MASK, + ap->rrep.rrep_hops, + ipaddr_string(&ap->rrep.rrep_da), + (unsigned long)EXTRACT_32BITS(&ap->rrep.rrep_ds), + ipaddr_string(&ap->rrep.rrep_oa), + (unsigned long)EXTRACT_32BITS(&ap->rrep.rrep_life)); + if (i >= sizeof(struct aodv_ext)) + aodv_extension((void *)(&ap->rrep + 1), i); +} + +static void +aodv_rerr(const union aodv *ap, const u_char *dat, u_int length) +{ + u_int i; + const struct rerr_unreach *dp = NULL; + int n, trunc; + + if (snapend < dat) { + printf(" [|aodv]"); + return; + } + i = min(length, (u_int)(snapend - dat)); + if (i < offsetof(struct aodv_rerr, r)) { + printf(" [|rerr]"); + return; + } + i -= offsetof(struct aodv_rerr, r); + dp = &ap->rerr.r.dest[0]; + n = ap->rerr.rerr_dc * sizeof(ap->rerr.r.dest[0]); + printf(" rerr %s [items %u] [%u]:", + ap->rerr.rerr_flags & RERR_NODELETE ? "[D]" : "", + ap->rerr.rerr_dc, length); + trunc = n - (i/sizeof(ap->rerr.r.dest[0])); + for (; i >= sizeof(ap->rerr.r.dest[0]); + ++dp, i -= sizeof(ap->rerr.r.dest[0])) { + printf(" {%s}(%ld)", ipaddr_string(&dp->u_da), + (unsigned long)EXTRACT_32BITS(&dp->u_ds)); + } + if (trunc) + printf("[|rerr]"); +} + +static void +#ifdef INET6 +aodv_v6_rreq(const union aodv *ap, const u_char *dat, u_int length) +#else +aodv_v6_rreq(const union aodv *ap _U_, const u_char *dat _U_, u_int length) +#endif +{ +#ifdef INET6 + u_int i; + + if (snapend < dat) { + printf(" [|aodv]"); + return; + } + i = min(length, (u_int)(snapend - dat)); + if (i < sizeof(ap->rreq6)) { + printf(" [|rreq6]"); + return; + } + i -= sizeof(ap->rreq6); + printf(" v6 rreq %u %s%s%s%s%shops %u id 0x%08lx\n" + "\tdst %s seq %lu src %s seq %lu", length, + ap->rreq6.rreq_type & RREQ_JOIN ? "[J]" : "", + ap->rreq6.rreq_type & RREQ_REPAIR ? "[R]" : "", + ap->rreq6.rreq_type & RREQ_GRAT ? "[G]" : "", + ap->rreq6.rreq_type & RREQ_DEST ? "[D]" : "", + ap->rreq6.rreq_type & RREQ_UNKNOWN ? "[U] " : " ", + ap->rreq6.rreq_hops, + (unsigned long)EXTRACT_32BITS(&ap->rreq6.rreq_id), + ip6addr_string(&ap->rreq6.rreq_da), + (unsigned long)EXTRACT_32BITS(&ap->rreq6.rreq_ds), + ip6addr_string(&ap->rreq6.rreq_oa), + (unsigned long)EXTRACT_32BITS(&ap->rreq6.rreq_os)); + if (i >= sizeof(struct aodv_ext)) + aodv_extension((void *)(&ap->rreq6 + 1), i); +#else + printf(" v6 rreq %u", length); +#endif +} + +static void +#ifdef INET6 +aodv_v6_rrep(const union aodv *ap, const u_char *dat, u_int length) +#else +aodv_v6_rrep(const union aodv *ap _U_, const u_char *dat _U_, u_int length) +#endif +{ +#ifdef INET6 + u_int i; + + if (snapend < dat) { + printf(" [|aodv]"); + return; + } + i = min(length, (u_int)(snapend - dat)); + if (i < sizeof(ap->rrep6)) { + printf(" [|rrep6]"); + return; + } + i -= sizeof(ap->rrep6); + printf(" rrep %u %s%sprefix %u hops %u\n" + "\tdst %s dseq %lu src %s %lu ms", length, + ap->rrep6.rrep_type & RREP_REPAIR ? "[R]" : "", + ap->rrep6.rrep_type & RREP_ACK ? "[A] " : " ", + ap->rrep6.rrep_ps & RREP_PREFIX_MASK, + ap->rrep6.rrep_hops, + ip6addr_string(&ap->rrep6.rrep_da), + (unsigned long)EXTRACT_32BITS(&ap->rrep6.rrep_ds), + ip6addr_string(&ap->rrep6.rrep_oa), + (unsigned long)EXTRACT_32BITS(&ap->rrep6.rrep_life)); + if (i >= sizeof(struct aodv_ext)) + aodv_extension((void *)(&ap->rrep6 + 1), i); +#else + printf(" rrep %u", length); +#endif +} + +static void +#ifdef INET6 +aodv_v6_rerr(const union aodv *ap, u_int length) +#else +aodv_v6_rerr(const union aodv *ap _U_, u_int length) +#endif +{ +#ifdef INET6 + const struct rerr_unreach6 *dp6 = NULL; + int i, j, n, trunc; + + i = length - offsetof(struct aodv_rerr, r); + j = sizeof(ap->rerr.r.dest6[0]); + dp6 = &ap->rerr.r.dest6[0]; + n = ap->rerr.rerr_dc * j; + printf(" rerr %s [items %u] [%u]:", + ap->rerr.rerr_flags & RERR_NODELETE ? "[D]" : "", + ap->rerr.rerr_dc, length); + trunc = n - (i/j); + for (; i -= j >= 0; ++dp6) { + printf(" {%s}(%ld)", ip6addr_string(&dp6->u_da), + (unsigned long)EXTRACT_32BITS(&dp6->u_ds)); + } + if (trunc) + printf("[|rerr]"); +#else + printf(" rerr %u", length); +#endif +} + +static void +#ifdef INET6 +aodv_v6_draft_01_rreq(const union aodv *ap, const u_char *dat, u_int length) +#else +aodv_v6_draft_01_rreq(const union aodv *ap _U_, const u_char *dat _U_, + u_int length) +#endif +{ +#ifdef INET6 + u_int i; + + if (snapend < dat) { + printf(" [|aodv]"); + return; + } + i = min(length, (u_int)(snapend - dat)); + if (i < sizeof(ap->rreq6_draft_01)) { + printf(" [|rreq6]"); + return; + } + i -= sizeof(ap->rreq6_draft_01); + printf(" rreq %u %s%s%s%s%shops %u id 0x%08lx\n" + "\tdst %s seq %lu src %s seq %lu", length, + ap->rreq6_draft_01.rreq_type & RREQ_JOIN ? "[J]" : "", + ap->rreq6_draft_01.rreq_type & RREQ_REPAIR ? "[R]" : "", + ap->rreq6_draft_01.rreq_type & RREQ_GRAT ? "[G]" : "", + ap->rreq6_draft_01.rreq_type & RREQ_DEST ? "[D]" : "", + ap->rreq6_draft_01.rreq_type & RREQ_UNKNOWN ? "[U] " : " ", + ap->rreq6_draft_01.rreq_hops, + (unsigned long)EXTRACT_32BITS(&ap->rreq6_draft_01.rreq_id), + ip6addr_string(&ap->rreq6_draft_01.rreq_da), + (unsigned long)EXTRACT_32BITS(&ap->rreq6_draft_01.rreq_ds), + ip6addr_string(&ap->rreq6_draft_01.rreq_oa), + (unsigned long)EXTRACT_32BITS(&ap->rreq6_draft_01.rreq_os)); + if (i >= sizeof(struct aodv_ext)) + aodv_extension((void *)(&ap->rreq6_draft_01 + 1), i); +#else + printf(" rreq %u", length); +#endif +} + +static void +#ifdef INET6 +aodv_v6_draft_01_rrep(const union aodv *ap, const u_char *dat, u_int length) +#else +aodv_v6_draft_01_rrep(const union aodv *ap _U_, const u_char *dat _U_, + u_int length) +#endif +{ +#ifdef INET6 + u_int i; + + if (snapend < dat) { + printf(" [|aodv]"); + return; + } + i = min(length, (u_int)(snapend - dat)); + if (i < sizeof(ap->rrep6_draft_01)) { + printf(" [|rrep6]"); + return; + } + i -= sizeof(ap->rrep6_draft_01); + printf(" rrep %u %s%sprefix %u hops %u\n" + "\tdst %s dseq %lu src %s %lu ms", length, + ap->rrep6_draft_01.rrep_type & RREP_REPAIR ? "[R]" : "", + ap->rrep6_draft_01.rrep_type & RREP_ACK ? "[A] " : " ", + ap->rrep6_draft_01.rrep_ps & RREP_PREFIX_MASK, + ap->rrep6_draft_01.rrep_hops, + ip6addr_string(&ap->rrep6_draft_01.rrep_da), + (unsigned long)EXTRACT_32BITS(&ap->rrep6_draft_01.rrep_ds), + ip6addr_string(&ap->rrep6_draft_01.rrep_oa), + (unsigned long)EXTRACT_32BITS(&ap->rrep6_draft_01.rrep_life)); + if (i >= sizeof(struct aodv_ext)) + aodv_extension((void *)(&ap->rrep6_draft_01 + 1), i); +#else + printf(" rrep %u", length); +#endif +} + +static void +#ifdef INET6 +aodv_v6_draft_01_rerr(const union aodv *ap, u_int length) +#else +aodv_v6_draft_01_rerr(const union aodv *ap _U_, u_int length) +#endif +{ +#ifdef INET6 + const struct rerr_unreach6_draft_01 *dp6 = NULL; + int i, j, n, trunc; + + i = length - offsetof(struct aodv_rerr, r); + j = sizeof(ap->rerr.r.dest6_draft_01[0]); + dp6 = &ap->rerr.r.dest6_draft_01[0]; + n = ap->rerr.rerr_dc * j; + printf(" rerr %s [items %u] [%u]:", + ap->rerr.rerr_flags & RERR_NODELETE ? "[D]" : "", + ap->rerr.rerr_dc, length); + trunc = n - (i/j); + for (; i -= j >= 0; ++dp6) { + printf(" {%s}(%ld)", ip6addr_string(&dp6->u_da), + (unsigned long)EXTRACT_32BITS(&dp6->u_ds)); + } + if (trunc) + printf("[|rerr]"); +#else + printf(" rerr %u", length); +#endif +} + +void +aodv_print(const u_char *dat, u_int length, int is_ip6) +{ + const union aodv *ap; + + ap = (union aodv *)dat; + if (snapend < dat) { + printf(" [|aodv]"); + return; + } + if (min(length, (u_int)(snapend - dat)) < sizeof(ap->rrep_ack)) { + printf(" [|aodv]"); + return; + } + printf(" aodv"); + + switch (ap->rerr.rerr_type) { + + case AODV_RREQ: + if (is_ip6) + aodv_v6_rreq(ap, dat, length); + else + aodv_rreq(ap, dat, length); + break; + + case AODV_RREP: + if (is_ip6) + aodv_v6_rrep(ap, dat, length); + else + aodv_rrep(ap, dat, length); + break; + + case AODV_RERR: + if (is_ip6) + aodv_v6_rerr(ap, length); + else + aodv_rerr(ap, dat, length); + break; + + case AODV_RREP_ACK: + printf(" rrep-ack %u", length); + break; + + case AODV_V6_DRAFT_01_RREQ: + aodv_v6_draft_01_rreq(ap, dat, length); + break; + + case AODV_V6_DRAFT_01_RREP: + aodv_v6_draft_01_rrep(ap, dat, length); + break; + + case AODV_V6_DRAFT_01_RERR: + aodv_v6_draft_01_rerr(ap, length); + break; + + case AODV_V6_DRAFT_01_RREP_ACK: + printf(" rrep-ack %u", length); + break; + + default: + printf(" %u %u", ap->rreq.rreq_type, length); + } +} diff --git a/dist/tcpdump/print-ap1394.c b/dist/tcpdump/print-ap1394.c new file mode 100644 index 000000000000..ee8c8f53a6f4 --- /dev/null +++ b/dist/tcpdump/print-ap1394.c @@ -0,0 +1,121 @@ +/* $NetBSD: print-ap1394.c,v 1.1.1.1 2004/09/27 17:06:54 dyoung Exp $ */ + +/* + * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code distributions + * retain the above copyright notice and this paragraph in its entirety, (2) + * distributions including binary code include the above copyright notice and + * this paragraph in its entirety in the documentation or other materials + * provided with the distribution, and (3) all advertising materials mentioning + * features or use of this software display the following acknowledgement: + * ``This product includes software developed by the University of California, + * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of + * the University nor the names of its contributors may be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/print-ap1394.c,v 1.1.2.1 2004/03/17 22:15:53 guy Exp (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include + +#include "interface.h" +#include "addrtoname.h" +#include "ethertype.h" + +/* + * Structure of a header for Apple's IP-over-IEEE 1384 BPF header. + */ +#define FIREWIRE_EUI64_LEN 8 +struct firewire_header { + u_char firewire_dhost[FIREWIRE_EUI64_LEN]; + u_char firewire_shost[FIREWIRE_EUI64_LEN]; + u_short firewire_type; +}; + +/* + * Length of that header; note that some compilers may pad + * "struct firewire_header" to a multiple of 4 bytes, for example, so + * "sizeof (struct firewire_header)" may not give the right answer. + */ +#define FIREWIRE_HDRLEN 18 + +static inline void +ap1394_hdr_print(register const u_char *bp, u_int length) +{ + register const struct firewire_header *fp; + fp = (const struct firewire_header *)bp; + + (void)printf("%s > %s", + linkaddr_string(fp->firewire_dhost, FIREWIRE_EUI64_LEN), + linkaddr_string(fp->firewire_shost, FIREWIRE_EUI64_LEN)); + + if (!qflag) { + (void)printf(", ethertype %s (0x%04x)", + tok2str(ethertype_values,"Unknown", ntohs(fp->firewire_type)), + ntohs(fp->firewire_type)); + } else { + (void)printf(", %s", tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", ntohs(fp->firewire_type))); + } + + (void)printf(", length %u: ", length); +} + +/* + * This is the top level routine of the printer. 'p' points + * to the ether header of the packet, 'h->ts' is the timestamp, + * 'h->length' is the length of the packet off the wire, and 'h->caplen' + * is the number of bytes actually captured. + */ +u_int +ap1394_if_print(const struct pcap_pkthdr *h, const u_char *p) +{ + u_int length = h->len; + u_int caplen = h->caplen; + struct firewire_header *fp; + u_short ether_type; + u_short extracted_ether_type; + + if (caplen < FIREWIRE_HDRLEN) { + printf("[|ap1394]"); + return FIREWIRE_HDRLEN; + } + + if (eflag) + ap1394_hdr_print(p, length); + + length -= FIREWIRE_HDRLEN; + caplen -= FIREWIRE_HDRLEN; + fp = (struct firewire_header *)p; + p += FIREWIRE_HDRLEN; + + ether_type = ntohs(fp->firewire_type); + + extracted_ether_type = 0; + if (ether_encap_print(ether_type, p, length, caplen, + &extracted_ether_type) == 0) { + /* ether_type not known, print raw packet */ + if (!eflag) + ap1394_hdr_print((u_char *)fp, length + FIREWIRE_HDRLEN); + + if (!xflag && !qflag) + default_print(p, caplen); + } + + return FIREWIRE_HDRLEN; +} diff --git a/dist/tcpdump/print-bfd.c b/dist/tcpdump/print-bfd.c new file mode 100644 index 000000000000..295c180d5aea --- /dev/null +++ b/dist/tcpdump/print-bfd.c @@ -0,0 +1,162 @@ +/* $NetBSD: print-bfd.c,v 1.1.1.1 2004/09/27 17:06:57 dyoung Exp $ */ + +/* + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code + * distributions retain the above copyright notice and this paragraph + * in its entirety, and (2) distributions including binary code include + * the above copyright notice and this paragraph in its entirety in + * the documentation or other materials provided with the distribution. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND + * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE. + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/print-bfd.c,v 1.3.2.2 2003/11/16 08:51:12 guy Exp"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include + +#include "interface.h" +#include "extract.h" +#include "addrtoname.h" + +#include "udp.h" + +/* + * Control packet, draft-katz-ward-bfd-01.txt + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * |Vers | Diag |H|D|P|F| Rsvd | Detect Mult | Length | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | My Discriminator | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Your Discriminator | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Desired Min TX Interval | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Required Min RX Interval | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Required Min Echo RX Interval | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + +struct bfd_header_t { + u_int8_t version_diag; + u_int8_t flags; + u_int8_t detect_time_multiplier; + u_int8_t length; + u_int8_t my_discriminator[4]; + u_int8_t your_discriminator[4]; + u_int8_t desired_min_tx_interval[4]; + u_int8_t required_min_rx_interval[4]; + u_int8_t required_min_echo_interval[4]; +}; + +#define BFD_EXTRACT_VERSION(x) (((x)&0xe0)>>5) +#define BFD_EXTRACT_DIAG(x) ((x)&0x1f) + +static const struct tok bfd_port_values[] = { + { BFD_CONTROL_PORT, "Control" }, + { BFD_ECHO_PORT, "Echo" }, + { 0, NULL } +}; + + +static const struct tok bfd_diag_values[] = { + { 0, "No Diagnostic" }, + { 1, "Control Detection Time Expired" }, + { 2, "Echo Function Failed" }, + { 3, "Neighbor Signaled Session Down" }, + { 4, "Forwarding Plane Reset" }, + { 5, "Path Down" }, + { 6, "Concatenated Path Down" }, + { 7, "Administratively Down" }, + { 0, NULL } +}; + +static const struct tok bfd_flag_values[] = { + { 0x80, "I Hear You" }, + { 0x40, "Demand" }, + { 0x20, "Poll" }, + { 0x10, "Final" }, + { 0x08, "Reserved" }, + { 0x04, "Reserved" }, + { 0x02, "Reserved" }, + { 0x01, "Reserved" }, + { 0, NULL } +}; + +void +bfd_print(register const u_char *pptr, register u_int len, register u_int port) +{ + const struct bfd_header_t *bfd_header; + + bfd_header = (const struct bfd_header_t *)pptr; + TCHECK(*bfd_header); + + switch (port) { + + case BFD_CONTROL_PORT: + if (vflag < 1 ) + { + printf("BFDv%u, %s, Flags: [%s], length: %u", + BFD_EXTRACT_VERSION(bfd_header->version_diag), + tok2str(bfd_port_values, "unknown (%u)", port), + bittok2str(bfd_flag_values, "none", bfd_header->flags), + len); + return; + } + + printf("BFDv%u, length: %u\n\t%s, Flags: [%s], Diagnostic: %s (0x%02x)", + BFD_EXTRACT_VERSION(bfd_header->version_diag), + len, + tok2str(bfd_port_values, "unknown (%u)", port), + bittok2str(bfd_flag_values, "none", bfd_header->flags), + tok2str(bfd_diag_values,"unknown",BFD_EXTRACT_DIAG(bfd_header->version_diag)), + BFD_EXTRACT_DIAG(bfd_header->version_diag)); + + printf("\n\tDetection Timer Multiplier: %u (%u ms Detection time), BFD Length: %u", + bfd_header->detect_time_multiplier, + bfd_header->detect_time_multiplier * EXTRACT_32BITS(bfd_header->desired_min_tx_interval)/1000, + bfd_header->length); + + + printf("\n\tMy Discriminator: 0x%08x", EXTRACT_32BITS(bfd_header->my_discriminator)); + printf(", Your Discriminator: 0x%08x", EXTRACT_32BITS(bfd_header->your_discriminator)); + printf("\n\t Desired min Tx Interval: %4u ms", EXTRACT_32BITS(bfd_header->desired_min_tx_interval)/1000); + printf("\n\t Required min Rx Interval: %4u ms", EXTRACT_32BITS(bfd_header->required_min_rx_interval)/1000); + printf("\n\t Required min Echo Interval: %4u ms", EXTRACT_32BITS(bfd_header->required_min_echo_interval)/1000); + break; + + case BFD_ECHO_PORT: /* not yet supported - fall through */ + + default: + printf("BFD, %s, length: %u", + tok2str(bfd_port_values, "unknown (%u)", port), + len); + if (vflag >= 1) { + if(!print_unknown_data(pptr,"\n\t",len)) + return; + } + break; + } + return; + +trunc: + printf("[|BFD]"); +} diff --git a/dist/tcpdump/print-enc.c b/dist/tcpdump/print-enc.c new file mode 100644 index 000000000000..472a375cd9d7 --- /dev/null +++ b/dist/tcpdump/print-enc.c @@ -0,0 +1,80 @@ +/* $NetBSD: print-enc.c,v 1.1.1.1 2004/09/27 17:07:03 dyoung Exp $ */ + +/* $OpenBSD: print-enc.c,v 1.7 2002/02/19 19:39:40 millert Exp $ */ + +/* + * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code distributions + * retain the above copyright notice and this paragraph in its entirety, (2) + * distributions including binary code include the above copyright notice and + * this paragraph in its entirety in the documentation or other materials + * provided with the distribution, and (3) all advertising materials mentioning + * features or use of this software display the following acknowledgement: + * ``This product includes software developed by the University of California, + * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of + * the University nor the names of its contributors may be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/print-enc.c,v 1.1.2.2 2003/11/16 08:51:19 guy Exp (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include + +#include "interface.h" +#include "addrtoname.h" + +#include "enc.h" + +#define ENC_PRINT_TYPE(wh, xf, nam) \ + if ((wh) & (xf)) { \ + printf("%s%s", nam, (wh) == (xf) ? "): " : ","); \ + (wh) &= ~(xf); \ + } + +u_int +enc_if_print(const struct pcap_pkthdr *h, register const u_char *p) +{ + register u_int length = h->len; + register u_int caplen = h->caplen; + int flags; + const struct enchdr *hdr; + + if (caplen < ENC_HDRLEN) { + printf("[|enc]"); + goto out; + } + + hdr = (struct enchdr *)p; + flags = hdr->flags; + if (flags == 0) + printf("(unprotected): "); + else + printf("("); + ENC_PRINT_TYPE(flags, M_AUTH, "authentic"); + ENC_PRINT_TYPE(flags, M_CONF, "confidential"); + /* ENC_PRINT_TYPE(flags, M_TUNNEL, "tunnel"); */ + printf("SPI 0x%08x: ", (u_int32_t)ntohl(hdr->spi)); + + length -= ENC_HDRLEN; + /* XXX - use the address family */ + ip_print(p + ENC_HDRLEN, length); + +out: + return (ENC_HDRLEN); +} diff --git a/dist/tcpdump/print-fr.c b/dist/tcpdump/print-fr.c new file mode 100644 index 000000000000..1317dd9ba168 --- /dev/null +++ b/dist/tcpdump/print-fr.c @@ -0,0 +1,489 @@ +/* $NetBSD: print-fr.c,v 1.1.1.1 2004/09/27 17:07:03 dyoung Exp $ */ + +/* + * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code distributions + * retain the above copyright notice and this paragraph in its entirety, (2) + * distributions including binary code include the above copyright notice and + * this paragraph in its entirety in the documentation or other materials + * provided with the distribution, and (3) all advertising materials mentioning + * features or use of this software display the following acknowledgement: + * ``This product includes software developed by the University of California, + * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of + * the University nor the names of its contributors may be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#)Header: /tcpdump/master/tcpdump/print-fr.c,v 1.17.2.3 2003/12/15 03:37:45 guy Exp (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "addrtoname.h" +#include "interface.h" +#include "ethertype.h" +#include "extract.h" + +static void lmi_print(const u_char *, u_int); + +#define NLPID_LMI 0x08 /* ANSI T1.617 Annex D or ITU-T Q.933 Annex A */ +#define NLPID_CISCO_LMI 0x09 /* The original, aka Cisco, aka Gang of Four */ +#define NLPID_SNAP 0x80 +#define NLPID_CLNP 0x81 +#define NLPID_ESIS 0x82 +#define NLPID_ISIS 0x83 +#define NLPID_CONS 0x84 +#define NLPID_IDRP 0x85 +#define NLPID_X25_ESIS 0x8a +#define NLPID_IPV6 0x8e +#define NLPID_IP 0xcc + +#define FR_EA_BIT 0x01 + + +/* Finds out Q.922 address length, DLCI and flags. Returns 0 on success */ +static int parse_q922_addr(const u_char *p, u_int *dlci, u_int *addr_len, + char **flags_ptr) +{ + static char flags[32]; + size_t len; + + if ((p[0] & FR_EA_BIT)) + return -1; + + *flags_ptr = flags; + *addr_len = 2; + *dlci = ((p[0] & 0xFC) << 2) | ((p[1] & 0xF0) >> 4); + + strcpy(flags, (p[0] & 0x02) ? "C!, " : ""); + if (p[1] & 0x08) + strcat(flags, "FECN, "); + if (p[1] & 0x04) + strcat(flags, "BECN, "); + if (p[1] & 0x02) + strcat(flags, "DE, "); + + len = strlen(flags); + if (len > 1) + flags[len - 2] = '\x0'; /* delete trailing comma and space */ + + if (p[1] & FR_EA_BIT) + return 0; /* 2-byte Q.922 address */ + + p += 2; + (*addr_len)++; /* 3- or 4-byte Q.922 address */ + if ((p[0] & FR_EA_BIT) == 0) { + *dlci = (*dlci << 7) | (p[0] >> 1); + (*addr_len)++; /* 4-byte Q.922 address */ + p++; + } + + if ((p[0] & FR_EA_BIT) == 0) + return -1; /* more than 4 bytes of Q.922 address? */ + + if (p[0] & 0x02) { + len = strlen(flags); + snprintf(flags + len, sizeof(flags) - len, + "%sdlcore %x", len ? ", " : "", p[0] >> 2); + } else + *dlci = (*dlci << 6) | (p[0] >> 2); + + return 0; +} + + +static const char *fr_nlpids[256]; + +static void +init_fr_nlpids(void) +{ + int i; + static int fr_nlpid_flag = 0; + + if (!fr_nlpid_flag) { + for (i=0; i < 256; i++) + fr_nlpids[i] = NULL; + fr_nlpids[NLPID_LMI] = "LMI"; + fr_nlpids[NLPID_CISCO_LMI] = "Cisco LMI"; + fr_nlpids[NLPID_SNAP] = "SNAP"; + fr_nlpids[NLPID_CLNP] = "CLNP"; + fr_nlpids[NLPID_ESIS] = "ESIS"; + fr_nlpids[NLPID_ISIS] = "ISIS"; + fr_nlpids[NLPID_CONS] = "CONS"; + fr_nlpids[NLPID_IDRP] = "IDRP"; + fr_nlpids[NLPID_X25_ESIS] = "X25_ESIS"; + fr_nlpids[NLPID_IP] = "IP"; + } + fr_nlpid_flag = 1; +} + +/* Frame Relay packet structure, with flags and CRC removed + + +---------------------------+ + | Q.922 Address* | + +-- --+ + | | + +---------------------------+ + | Control (UI = 0x03) | + +---------------------------+ + | Optional Pad (0x00) | + +---------------------------+ + | NLPID | + +---------------------------+ + | . | + | . | + | . | + | Data | + | . | + | . | + +---------------------------+ + + * Q.922 addresses, as presently defined, are two octets and + contain a 10-bit DLCI. In some networks Q.922 addresses + may optionally be increased to three or four octets. +*/ + +static u_int +fr_hdrlen(const u_char *p, u_int addr_len, u_int caplen) +{ + if ((caplen > addr_len + 1 /* UI */ + 1 /* pad */) && + !p[addr_len + 1] /* pad exist */) + return addr_len + 1 /* UI */ + 1 /* pad */ + 1 /* NLPID */; + else + return addr_len + 1 /* UI */ + 1 /* NLPID */; +} + +static const char * +fr_protostring(u_int8_t proto) +{ + static char buf[5+1+2+1]; + + init_fr_nlpids(); + + if (nflag || fr_nlpids[proto] == NULL) { + snprintf(buf, sizeof(buf), "proto %02x", proto); + return buf; + } + return fr_nlpids[proto]; +} + +static void +fr_hdr_print(int length, u_int dlci, char *flags, u_char nlpid) +{ + if (qflag) + (void)printf("DLCI %u, %s%slength %d: ", + dlci, flags, *flags ? ", " : "", length); + else + (void)printf("DLCI %u, %s%s%s, length %d: ", + dlci, flags, *flags ? ", " : "", + fr_protostring(nlpid), length); +} + +u_int +fr_if_print(const struct pcap_pkthdr *h, register const u_char *p) +{ + register u_int length = h->len; + register u_int caplen = h->caplen; + u_short extracted_ethertype; + u_int32_t orgcode; + register u_short et; + u_int dlci; + int addr_len; + u_char nlpid; + u_int hdr_len; + char *flags; + + if (caplen < 4) { /* minimum frame header length */ + printf("[|fr]"); + return caplen; + } + + if (parse_q922_addr(p, &dlci, &addr_len, &flags)) { + printf("Invalid Q.922 address"); + return caplen; + } + + hdr_len = fr_hdrlen(p, addr_len, caplen); + + if (caplen < hdr_len) { + printf("[|fr]"); + return caplen; + } + + if (p[addr_len] != 0x03) + printf("UI %02x! ", p[addr_len]); + + if (!p[addr_len + 1]) { /* pad byte should be used with 3-byte Q.922 */ + if (addr_len != 3) + printf("Pad! "); + } else if (addr_len == 3) + printf("No pad! "); + + nlpid = p[hdr_len - 1]; + + p += hdr_len; + length -= hdr_len; + caplen -= hdr_len; + + if (eflag) + fr_hdr_print(length, dlci, flags, nlpid); + + switch (nlpid) { + case NLPID_IP: + ip_print(p, length); + break; + +#ifdef INET6 + case NLPID_IPV6: + ip6_print(p, length); + break; +#endif + case NLPID_CLNP: + case NLPID_ESIS: + case NLPID_ISIS: + isoclns_print(p, length, caplen); + break; + + case NLPID_SNAP: + orgcode = EXTRACT_24BITS(p); + et = EXTRACT_16BITS(p + 3); + if (snap_print((const u_char *)(p + 5), length - 5, + caplen - 5, &extracted_ethertype, orgcode, et, + 0) == 0) { + /* ether_type not known, print raw packet */ + if (!eflag) + fr_hdr_print(length + hdr_len, + dlci, flags, nlpid); + if (extracted_ethertype) { + printf("(SNAP %s) ", + etherproto_string(htons(extracted_ethertype))); + } + if (!xflag && !qflag) + default_print(p - hdr_len, caplen + hdr_len); + } + break; + + case NLPID_LMI: + lmi_print(p, length); + break; + + default: + if (!eflag) + fr_hdr_print(length + hdr_len, + dlci, flags, nlpid); + if (!xflag) + default_print(p, caplen); + } + + return hdr_len; +} + +/* + * Q.933 decoding portion for framerelay specific. + */ + +/* Q.933 packet format + Format of Other Protocols + using Q.933 NLPID + +-------------------------------+ + | Q.922 Address | + +---------------+---------------+ + |Control 0x03 | NLPID 0x08 | + +---------------+---------------+ + | L2 Protocol ID | + | octet 1 | octet 2 | + +-------------------------------+ + | L3 Protocol ID | + | octet 2 | octet 2 | + +-------------------------------+ + | Protocol Data | + +-------------------------------+ + | FCS | + +-------------------------------+ + */ + +/* L2 (Octet 1)- Call Reference Usually is 0x0 */ + +/* + * L2 (Octet 2)- Message Types definition 1 byte long. + */ +/* Call Establish */ +#define MSG_TYPE_ESC_TO_NATIONAL 0x00 +#define MSG_TYPE_ALERT 0x01 +#define MSG_TYPE_CALL_PROCEEDING 0x02 +#define MSG_TYPE_CONNECT 0x07 +#define MSG_TYPE_CONNECT_ACK 0x0F +#define MSG_TYPE_PROGRESS 0x03 +#define MSG_TYPE_SETUP 0x05 +/* Call Clear */ +#define MSG_TYPE_DISCONNECT 0x45 +#define MSG_TYPE_RELEASE 0x4D +#define MSG_TYPE_RELEASE_COMPLETE 0x5A +#define MSG_TYPE_RESTART 0x46 +#define MSG_TYPE_RESTART_ACK 0x4E +/* Status */ +#define MSG_TYPE_STATUS 0x7D +#define MSG_TYPE_STATUS_ENQ 0x75 + +#define MSG_ANSI_LOCKING_SHIFT 0x95 +#define ONE_BYTE_IE_MASK 0xF0 /* details? */ + +#define ANSI_REPORT_TYPE_IE 0x01 +#define ANSI_LINK_VERIFY_IE_91 0x19 /* details? */ +#define ANSI_LINK_VERIFY_IE 0x03 +#define ANSI_PVC_STATUS_IE 0x07 + +#define CCITT_REPORT_TYPE_IE 0x51 +#define CCITT_LINK_VERIFY_IE 0x53 +#define CCITT_PVC_STATUS_IE 0x57 + +struct common_ie_header { + u_int8_t ie_id; + u_int8_t ie_len; +}; + +#define FULL_STATUS 0 +#define LINK_VERIFY 1 +#define ASYNC_PVC 2 + + +/* Parses DLCI information element. */ +static const char * parse_dlci_ie(const u_char *p, u_int ie_len, char *buffer, + size_t buffer_len) +{ + u_int dlci; + + if ((ie_len < 3) || + (p[0] & 0x80) || + ((ie_len == 3) && !(p[1] & 0x80)) || + ((ie_len == 4) && ((p[1] & 0x80) || !(p[2] & 0x80))) || + ((ie_len == 5) && ((p[1] & 0x80) || (p[2] & 0x80) || + !(p[3] & 0x80))) || + (ie_len > 5) || + !(p[ie_len - 1] & 0x80)) + return "Invalid DLCI IE"; + + dlci = ((p[0] & 0x3F) << 4) | ((p[1] & 0x78) >> 3); + if (ie_len == 4) + dlci = (dlci << 6) | ((p[2] & 0x7E) >> 1); + else if (ie_len == 5) + dlci = (dlci << 13) | (p[2] & 0x7F) | ((p[3] & 0x7E) >> 1); + + snprintf(buffer, buffer_len, "DLCI %d: status %s%s", dlci, + p[ie_len - 1] & 0x8 ? "New, " : "", + p[ie_len - 1] & 0x2 ? "Active" : "Inactive"); + + return buffer; +} + + +static void +lmi_print(const u_char *p, u_int length) +{ + const u_char *ptemp = p; + const char *decode_str; + char temp_str[255]; + struct common_ie_header *ie_p; + int is_ansi = 0; + + if (length < 9) { /* shortest: Q.933a LINK VERIFY */ + printf("[|lmi]"); + return; + } + + if (p[2] == MSG_ANSI_LOCKING_SHIFT) + is_ansi = 1; + + /* printing out header part */ + printf(is_ansi ? "ANSI" : "CCITT"); + if (p[0]) + printf(" Call Ref: %02x!", p[0]); + + switch(p[1]) { + + case MSG_TYPE_STATUS: + printf(" STATUS REPLY\n"); + break; + + case MSG_TYPE_STATUS_ENQ: + printf(" STATUS ENQUIRY\n"); + break; + + default: + printf(" UNKNOWN MSG Type %02x\n", p[1]); + break; + } + + if (length < (u_int)(2 - is_ansi)) { + printf("[|lmi]"); + return; + } + length -= 2 - is_ansi; + ptemp += 2 + is_ansi; + + /* Loop through the rest of IE */ + while (length > 0) { + ie_p = (struct common_ie_header *)ptemp; + if (length < sizeof(struct common_ie_header) || + length < sizeof(struct common_ie_header) + ie_p->ie_len) { + printf("[|lmi]"); + return; + } + + if ((is_ansi && ie_p->ie_id == ANSI_REPORT_TYPE_IE) || + (!is_ansi && ie_p->ie_id == CCITT_REPORT_TYPE_IE)) { + switch(ptemp[2]) { + + case FULL_STATUS: + decode_str = "FULL STATUS"; + break; + + case LINK_VERIFY: + decode_str = "LINK VERIFY"; + break; + + case ASYNC_PVC: + decode_str = "Async PVC Status"; + break; + + default: + decode_str = "Reserved Value"; + break; + } + } else if ((is_ansi && (ie_p->ie_id == ANSI_LINK_VERIFY_IE_91 || + ie_p->ie_id == ANSI_LINK_VERIFY_IE)) || + (!is_ansi && ie_p->ie_id == CCITT_LINK_VERIFY_IE)) { + snprintf(temp_str, sizeof(temp_str), + "TX Seq: %3d, RX Seq: %3d", + ptemp[2], ptemp[3]); + decode_str = temp_str; + } else if ((is_ansi && ie_p->ie_id == ANSI_PVC_STATUS_IE) || + (!is_ansi && ie_p->ie_id == CCITT_PVC_STATUS_IE)) { + decode_str = parse_dlci_ie(ptemp + 2, ie_p->ie_len, + temp_str, sizeof(temp_str)); + } else + decode_str = "Non-decoded Value"; + + printf("\t\tIE: %02X Len: %d, %s\n", + ie_p->ie_id, ie_p->ie_len, decode_str); + length = length - ie_p->ie_len - 2; + ptemp = ptemp + ie_p->ie_len + 2; + } +} diff --git a/dist/tcpdump/print-ipfc.c b/dist/tcpdump/print-ipfc.c new file mode 100644 index 000000000000..c592af34316e --- /dev/null +++ b/dist/tcpdump/print-ipfc.c @@ -0,0 +1,139 @@ +/* $NetBSD: print-ipfc.c,v 1.1.1.1 2004/09/27 17:07:07 dyoung Exp $ */ + +/* + * Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code distributions + * retain the above copyright notice and this paragraph in its entirety, (2) + * distributions including binary code include the above copyright notice and + * this paragraph in its entirety in the documentation or other materials + * provided with the distribution, and (3) all advertising materials mentioning + * features or use of this software display the following acknowledgement: + * ``This product includes software developed by the University of California, + * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of + * the University nor the names of its contributors may be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/print-ipfc.c,v 1.4.2.2 2003/11/16 08:51:28 guy Exp (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" +#include "addrtoname.h" +#include "ethertype.h" + +#include "ether.h" +#include "ipfc.h" + +/* + * RFC 2625 IP-over-Fibre Channel. + */ + +/* Extract src, dst addresses */ +static inline void +extract_ipfc_addrs(const struct ipfc_header *ipfcp, char *ipfcsrc, + char *ipfcdst) +{ + /* + * We assume that, as per RFC 2625, the lower 48 bits of the + * source and destination addresses are MAC addresses. + */ + memcpy(ipfcdst, (const char *)&ipfcp->ipfc_dhost[2], 6); + memcpy(ipfcsrc, (const char *)&ipfcp->ipfc_shost[2], 6); +} + +/* + * Print the Network_Header + */ +static inline void +ipfc_hdr_print(register const struct ipfc_header *ipfcp _U_, + register u_int length, register const u_char *ipfcsrc, + register const u_char *ipfcdst) +{ + const char *srcname, *dstname; + + srcname = etheraddr_string(ipfcsrc); + dstname = etheraddr_string(ipfcdst); + + /* + * XXX - show the upper 16 bits? Do so only if "vflag" is set? + */ + (void) printf("%s %s %d: ", srcname, dstname, length); +} + +static void +ipfc_print(const u_char *p, u_int length, u_int caplen) +{ + const struct ipfc_header *ipfcp = (const struct ipfc_header *)p; + struct ether_header ehdr; + u_short extracted_ethertype; + + if (caplen < IPFC_HDRLEN) { + printf("[|ipfc]"); + return; + } + /* + * Get the network addresses into a canonical form + */ + extract_ipfc_addrs(ipfcp, (char *)ESRC(&ehdr), (char *)EDST(&ehdr)); + + if (eflag) + ipfc_hdr_print(ipfcp, length, ESRC(&ehdr), EDST(&ehdr)); + + /* Skip over Network_Header */ + length -= IPFC_HDRLEN; + p += IPFC_HDRLEN; + caplen -= IPFC_HDRLEN; + + /* Frame Control field determines interpretation of packet */ + extracted_ethertype = 0; + /* Try to print the LLC-layer header & higher layers */ + if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr), + &extracted_ethertype) == 0) { + /* + * Some kinds of LLC packet we cannot + * handle intelligently + */ + if (!eflag) + ipfc_hdr_print(ipfcp, length + IPFC_HDRLEN, + ESRC(&ehdr), EDST(&ehdr)); + if (extracted_ethertype) { + printf("(LLC %s) ", + etherproto_string(htons(extracted_ethertype))); + } + if (!xflag && !qflag) + default_print(p, caplen); + } +} + +/* + * This is the top level routine of the printer. 'p' points + * to the Network_Header of the packet, 'h->ts' is the timestamp, + * 'h->length' is the length of the packet off the wire, and 'h->caplen' + * is the number of bytes actually captured. + */ +u_int +ipfc_if_print(const struct pcap_pkthdr *h, register const u_char *p) +{ + ipfc_print(p, h->len, h->caplen); + + return (IPFC_HDRLEN); +} diff --git a/dist/tcpdump/print-ldp.c b/dist/tcpdump/print-ldp.c new file mode 100644 index 000000000000..669f73facbda --- /dev/null +++ b/dist/tcpdump/print-ldp.c @@ -0,0 +1,384 @@ +/* $NetBSD: print-ldp.c,v 1.1.1.1 2004/09/27 17:07:12 dyoung Exp $ */ + +/* + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code + * distributions retain the above copyright notice and this paragraph + * in its entirety, and (2) distributions including binary code include + * the above copyright notice and this paragraph in its entirety in + * the documentation or other materials provided with the distribution. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND + * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE. + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.4.2.2 2003/11/16 08:51:31 guy Exp"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" +#include "extract.h" +#include "addrtoname.h" + +/* + * ldp common header + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Version | PDU Length | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | LDP Identifier | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + */ + +struct ldp_common_header { + u_int8_t version[2]; + u_int8_t pdu_length[2]; + u_int8_t lsr_id[4]; + u_int8_t label_space[2]; +}; + +#define LDP_VERSION 1 + +/* + * ldp message header + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * |U| Message Type | Message Length | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Message ID | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * + + + * | Mandatory Parameters | + * + + + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * + + + * | Optional Parameters | + * + + + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + +struct ldp_msg_header { + u_int8_t type[2]; + u_int8_t length[2]; + u_int8_t id[4]; +}; + +#define LDP_MASK_MSG_TYPE(x) ((x)&0x7fff) +#define LDP_MASK_U_BIT(x) ((x)&0x8000) + +#define LDP_MSG_NOTIF 0x0001 +#define LDP_MSG_HELLO 0x0100 +#define LDP_MSG_INIT 0x0200 +#define LDP_MSG_KEEPALIVE 0x0201 +#define LDP_MSG_ADDRESS 0x0300 +#define LDP_MSG_ADDRESS_WITHDRAW 0x0301 +#define LDP_MSG_LABEL_MAPPING 0x0400 +#define LDP_MSG_LABEL_REQUEST 0x0401 +#define LDP_MSG_LABEL_WITHDRAW 0x0402 +#define LDP_MSG_LABEL_RELEASE 0x0403 +#define LDP_MSG_LABEL_ABORT_REQUEST 0x0404 + +#define LDP_VENDOR_PRIVATE_MIN 0x3e00 +#define LDP_VENDOR_PRIVATE_MAX 0x3eff +#define LDP_EXPERIMENTAL_MIN 0x3f00 +#define LDP_EXPERIMENTAL_MAX 0x3fff + +static const struct tok ldp_msg_values[] = { + { LDP_MSG_NOTIF, "Notification" }, + { LDP_MSG_HELLO, "Hello" }, + { LDP_MSG_INIT, "Initialization" }, + { LDP_MSG_KEEPALIVE, "Keepalive" }, + { LDP_MSG_ADDRESS, "Address" }, + { LDP_MSG_ADDRESS_WITHDRAW, "Address Widthdraw" }, + { LDP_MSG_LABEL_MAPPING, "Label Mapping" }, + { LDP_MSG_LABEL_REQUEST, "Label Request" }, + { LDP_MSG_LABEL_WITHDRAW, "Label Withdraw" }, + { LDP_MSG_LABEL_RELEASE, "Label Release" }, + { LDP_MSG_LABEL_ABORT_REQUEST, "Label Abort Request" }, + { 0, NULL} +}; + +#define LDP_MASK_TLV_TYPE(x) ((x)&0x3fff) +#define LDP_MASK_F_BIT(x) ((x)&0x4000) + +#define LDP_TLV_FEC 0x0100 +#define LDP_TLV_ADDRESS_LIST 0x0101 +#define LDP_TLV_HOP_COUNT 0x0103 +#define LDP_TLV_PATH_VECTOR 0x0104 +#define LDP_TLV_GENERIC_LABEL 0x0200 +#define LDP_TLV_ATM_LABEL 0x0201 +#define LDP_TLV_FR_LABEL 0x0202 +#define LDP_TLV_STATUS 0x0300 +#define LDP_TLV_EXTD_STATUS 0x0301 +#define LDP_TLV_RETURNED_PDU 0x0302 +#define LDP_TLV_RETURNED_MSG 0x0303 +#define LDP_TLV_COMMON_HELLO 0x0400 +#define LDP_TLV_IPV4_TRANSPORT_ADDR 0x0401 +#define LDP_TLV_CONFIG_SEQ_NUMBER 0x0402 +#define LDP_TLV_IPV6_TRANSPORT_ADDR 0x0403 +#define LDP_TLV_COMMON_SESSION 0x0500 +#define LDP_TLV_ATM_SESSION_PARM 0x0501 +#define LDP_TLV_FR_SESSION_PARM 0x0502 +#define LDP_TLV_LABEL_REQUEST_MSG_ID 0x0600 + +static const struct tok ldp_tlv_values[] = { + { LDP_TLV_FEC, "FEC" }, + { LDP_TLV_ADDRESS_LIST, "Address List" }, + { LDP_TLV_HOP_COUNT, "Hop Count" }, + { LDP_TLV_PATH_VECTOR, "Path Vector" }, + { LDP_TLV_GENERIC_LABEL, "Generic Label" }, + { LDP_TLV_ATM_LABEL, "ATM Label" }, + { LDP_TLV_FR_LABEL, "Frame-Relay Label" }, + { LDP_TLV_STATUS, "Status" }, + { LDP_TLV_EXTD_STATUS, "Extended Status" }, + { LDP_TLV_RETURNED_PDU, "Returned PDU" }, + { LDP_TLV_RETURNED_MSG, "Returned Message" }, + { LDP_TLV_COMMON_HELLO, "Common Hello Parameters" }, + { LDP_TLV_IPV4_TRANSPORT_ADDR, "IPv4 Transport Address" }, + { LDP_TLV_CONFIG_SEQ_NUMBER, "Configuration Sequence Number" }, + { LDP_TLV_IPV6_TRANSPORT_ADDR, "IPv6 Transport Address" }, + { LDP_TLV_COMMON_SESSION, "Common Session Parameters" }, + { LDP_TLV_ATM_SESSION_PARM, "ATM Session Parameters" }, + { LDP_TLV_FR_SESSION_PARM, "Frame-Relay Session Parameters" }, + { LDP_TLV_LABEL_REQUEST_MSG_ID, "Label Request Message ID" }, + { 0, NULL} +}; + +#define FALSE 0 +#define TRUE 1 + +int ldp_tlv_print(register const u_char *); + +/* + * ldp tlv header + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * |U|F| Type | Length | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * | Value | + * ~ ~ + * | | + * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + +int +ldp_tlv_print(register const u_char *tptr) { + + struct ldp_tlv_header { + u_int8_t type[2]; + u_int8_t length[2]; + }; + + const struct ldp_tlv_header *ldp_tlv_header; + u_short tlv_type,tlv_len,tlv_tlen; + + ldp_tlv_header = (const struct ldp_tlv_header *)tptr; + tlv_len=EXTRACT_16BITS(ldp_tlv_header->length); + tlv_tlen=tlv_len; + tlv_type=LDP_MASK_TLV_TYPE(EXTRACT_16BITS(ldp_tlv_header->type)); + + /* FIXME vendor private / experimental check */ + printf("\n\t %s TLV (0x%04x), length: %u, Flags: [%s and %s forward if unknown]", + tok2str(ldp_tlv_values, + "Unknown", + tlv_type), + tlv_type, + tlv_len, + LDP_MASK_U_BIT(EXTRACT_16BITS(&ldp_tlv_header->type)) ? "continue processing" : "ignore", + LDP_MASK_F_BIT(EXTRACT_16BITS(&ldp_tlv_header->type)) ? "do" : "don't"); + + tptr+=sizeof(struct ldp_tlv_header); + + switch(tlv_type) { + + case LDP_TLV_COMMON_HELLO: + printf("\n\t Hold Time: %us, Flags: [%s Hello%s]", + EXTRACT_16BITS(tptr), + (EXTRACT_16BITS(tptr+2)&0x8000) ? "Targeted" : "Link", + (EXTRACT_16BITS(tptr+2)&0x4000) ? ", Request for targeted Hellos" : ""); + break; + + case LDP_TLV_IPV4_TRANSPORT_ADDR: + printf("\n\t IPv4 Transport Address: %s", ipaddr_string(tptr)); + break; +#ifdef INET6 + case LDP_TLV_IPV6_TRANSPORT_ADDR: + printf("\n\t IPv6 Transport Address: %s", ip6addr_string(tptr)); + break; +#endif + case LDP_TLV_CONFIG_SEQ_NUMBER: + printf("\n\t Sequence Number: %u", EXTRACT_32BITS(tptr)); + break; + + /* + * FIXME those are the defined TLVs that lack a decoder + * you are welcome to contribute code ;-) + */ + + case LDP_TLV_FEC: + case LDP_TLV_ADDRESS_LIST: + case LDP_TLV_HOP_COUNT: + case LDP_TLV_PATH_VECTOR: + case LDP_TLV_GENERIC_LABEL: + case LDP_TLV_ATM_LABEL: + case LDP_TLV_FR_LABEL: + case LDP_TLV_STATUS: + case LDP_TLV_EXTD_STATUS: + case LDP_TLV_RETURNED_PDU: + case LDP_TLV_RETURNED_MSG: + case LDP_TLV_COMMON_SESSION: + case LDP_TLV_ATM_SESSION_PARM: + case LDP_TLV_FR_SESSION_PARM: + case LDP_TLV_LABEL_REQUEST_MSG_ID: + + default: + if (vflag <= 1) + print_unknown_data(tptr,"\n\t ",tlv_tlen); + break; + } + return(tlv_len+4); /* Type & Length fields not included */ +} + +void +ldp_print(register const u_char *pptr, register u_int len) { + + const struct ldp_common_header *ldp_com_header; + const struct ldp_msg_header *ldp_msg_header; + const u_char *tptr,*msg_tptr; + u_short tlen; + u_short msg_len,msg_type,msg_tlen; + int hexdump,processed; + + tptr=pptr; + ldp_com_header = (const struct ldp_common_header *)pptr; + TCHECK(*ldp_com_header); + + /* + * Sanity checking of the header. + */ + if (EXTRACT_16BITS(&ldp_com_header->version) != LDP_VERSION) { + printf("LDP version %u packet not supported", + EXTRACT_16BITS(&ldp_com_header->version)); + return; + } + + /* print the LSR-ID, label-space & length */ + printf("%sLDP, Label-Space-ID: %s:%u, length: %u", + (vflag < 1) ? "" : "\n\t", + ipaddr_string(&ldp_com_header->lsr_id), + EXTRACT_16BITS(&ldp_com_header->label_space), + len); + + /* bail out if non-verbose */ + if (vflag < 1) + return; + + /* ok they seem to want to know everything - lets fully decode it */ + tlen=EXTRACT_16BITS(ldp_com_header->pdu_length); + + tptr+=sizeof(const struct ldp_common_header); + tlen-=sizeof(const struct ldp_common_header); + + while(tlen>0) { + /* did we capture enough for fully decoding the msg header ? */ + if (!TTEST2(*tptr, sizeof(struct ldp_msg_header))) + goto trunc; + + ldp_msg_header = (const struct ldp_msg_header *)tptr; + msg_len=EXTRACT_16BITS(ldp_msg_header->length); + msg_type=LDP_MASK_MSG_TYPE(EXTRACT_16BITS(ldp_msg_header->type)); + + /* FIXME vendor private / experimental check */ + printf("\n\t %s Message (0x%04x), length: %u, Message ID: 0x%08x, Flags: [%s if unknown]", + tok2str(ldp_msg_values, + "Unknown", + msg_type), + msg_type, + msg_len, + EXTRACT_32BITS(&ldp_msg_header->id), + LDP_MASK_U_BIT(EXTRACT_16BITS(&ldp_msg_header->type)) ? "continue processing" : "ignore"); + + msg_tptr=tptr+sizeof(struct ldp_msg_header); + msg_tlen=msg_len-sizeof(struct ldp_msg_header)+4; /* Type & Length fields not included */ + + /* did we capture enough for fully decoding the message ? */ + if (!TTEST2(*tptr, msg_len)) + goto trunc; + hexdump=FALSE; + + switch(msg_type) { + + case LDP_MSG_HELLO: + while(msg_tlen >= 4) { + processed = ldp_tlv_print(msg_tptr); + if (processed == 0) + break; + msg_tlen-=processed; + msg_tptr+=processed; + } + break; + + /* + * FIXME those are the defined messages that lack a decoder + * you are welcome to contribute code ;-) + */ + + case LDP_MSG_NOTIF: + case LDP_MSG_INIT: + case LDP_MSG_KEEPALIVE: + case LDP_MSG_ADDRESS: + case LDP_MSG_ADDRESS_WITHDRAW: + case LDP_MSG_LABEL_MAPPING: + case LDP_MSG_LABEL_REQUEST: + case LDP_MSG_LABEL_WITHDRAW: + case LDP_MSG_LABEL_RELEASE: + case LDP_MSG_LABEL_ABORT_REQUEST: + + default: + if (vflag <= 1) + print_unknown_data(msg_tptr,"\n\t ",msg_tlen); + break; + } + /* do we want to see an additionally hexdump ? */ + if (vflag > 1 || hexdump==TRUE) + print_unknown_data(tptr+sizeof(sizeof(struct ldp_msg_header)),"\n\t ", + msg_len); + + tptr+=msg_len; + tlen-=msg_len; + } + return; +trunc: + printf("\n\t\t packet exceeded snapshot"); +} + diff --git a/dist/tcpdump/print-mobility.c b/dist/tcpdump/print-mobility.c new file mode 100644 index 000000000000..805e6dac6b17 --- /dev/null +++ b/dist/tcpdump/print-mobility.c @@ -0,0 +1,316 @@ +/* $NetBSD: print-mobility.c,v 1.1.1.1 2004/09/27 17:07:14 dyoung Exp $ */ + +/* + * Copyright (C) 2002 WIDE Project. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/print-mobility.c,v 1.9.2.2 2003/11/16 08:51:33 guy Exp"; +#endif + +#ifdef INET6 +#include + +#include + +#include "ip6.h" + +#include "interface.h" +#include "addrtoname.h" +#include "extract.h" /* must come after interface.h */ + +/* Mobility header */ +struct ip6_mobility { + u_int8_t ip6m_pproto; /* following payload protocol (for PG) */ + u_int8_t ip6m_len; /* length in units of 8 octets */ + u_int8_t ip6m_type; /* message type */ + u_int8_t reserved; /* reserved */ + u_int16_t ip6m_cksum; /* sum of IPv6 pseudo-header and MH */ + union { + u_int16_t ip6m_un_data16[1]; /* type-specific field */ + u_int8_t ip6m_un_data8[2]; /* type-specific fiedl */ + } ip6m_dataun; +}; + +#define ip6m_data16 ip6m_dataun.ip6m_un_data16 +#define ip6m_data8 ip6m_dataun.ip6m_un_data8 + +#define IP6M_MINLEN 8 + +/* message type */ +#define IP6M_BINDING_REQUEST 0 /* Binding Refresh Request */ +#define IP6M_HOME_TEST_INIT 1 /* Home Test Init */ +#define IP6M_CAREOF_TEST_INIT 2 /* Care-of Test Init */ +#define IP6M_HOME_TEST 3 /* Home Test */ +#define IP6M_CAREOF_TEST 4 /* Care-of Test */ +#define IP6M_BINDING_UPDATE 5 /* Binding Update */ +#define IP6M_BINDING_ACK 6 /* Binding Acknowledgement */ +#define IP6M_BINDING_ERROR 7 /* Binding Error */ + +/* Mobility Header Options */ +#define IP6MOPT_MINLEN 2 +#define IP6MOPT_PAD1 0x0 /* Pad1 */ +#define IP6MOPT_PADN 0x1 /* PadN */ +#define IP6MOPT_REFRESH 0x2 /* Binding Refresh Advice */ +#define IP6MOPT_REFRESH_MINLEN 4 +#define IP6MOPT_ALTCOA 0x3 /* Alternate Care-of Address */ +#define IP6MOPT_ALTCOA_MINLEN 18 +#define IP6MOPT_NONCEID 0x4 /* Nonce Indices */ +#define IP6MOPT_NONCEID_MINLEN 6 +#define IP6MOPT_AUTH 0x5 /* Binding Authorization Data */ +#define IP6MOPT_AUTH_MINLEN 12 + +static void +mobility_opt_print(const u_char *bp, int len) +{ + int i; + int optlen; + + for (i = 0; i < len; i += optlen) { + if (bp[i] == IP6MOPT_PAD1) + optlen = 1; + else { + if (i + 1 < len) + optlen = bp[i + 1] + 2; + else + goto trunc; + } + if (i + optlen > len) + goto trunc; + + switch (bp[i]) { + case IP6MOPT_PAD1: + printf("(pad1)"); + break; + case IP6MOPT_PADN: + if (len - i < IP6MOPT_MINLEN) { + printf("(padn: trunc)"); + goto trunc; + } + printf("(padn)"); + break; + case IP6MOPT_REFRESH: + if (len - i < IP6MOPT_REFRESH_MINLEN) { + printf("(refresh: trunc)"); + goto trunc; + } + /* units of 4 secs */ + printf("(refresh: %d)", + EXTRACT_16BITS(&bp[i+2]) << 2); + break; + case IP6MOPT_ALTCOA: + if (len - i < IP6MOPT_ALTCOA_MINLEN) { + printf("(altcoa: trunc)"); + goto trunc; + } + printf("(alt-CoA: %s)", ip6addr_string(&bp[i+2])); + break; + case IP6MOPT_NONCEID: + if (len - i < IP6MOPT_NONCEID_MINLEN) { + printf("(ni: trunc)"); + goto trunc; + } + printf("(ni: ho=0x%04x co=0x%04x)", + EXTRACT_16BITS(&bp[i+2]), + EXTRACT_16BITS(&bp[i+4])); + break; + case IP6MOPT_AUTH: + if (len - i < IP6MOPT_AUTH_MINLEN) { + printf("(auth: trunc)"); + goto trunc; + } + printf("(auth)"); + break; + default: + if (len - i < IP6MOPT_MINLEN) { + printf("(sopt_type %d: trunc)", bp[i]); + goto trunc; + } + printf("(type-0x%02x: len=%d)", bp[i], bp[i + 1]); + break; + } + } + return; + +trunc: + printf("[trunc] "); +} + +/* + * Mobility Header + */ +int +mobility_print(const u_char *bp, const u_char *bp2) +{ + const struct ip6_mobility *mh; + const struct ip6_hdr *ip6; + const u_char *ep; + int mhlen, hlen, type; + + mh = (struct ip6_mobility *)bp; + ip6 = (struct ip6_hdr *)bp2; + + /* 'ep' points to the end of available data. */ + ep = snapend; + + if (!TTEST(mh->ip6m_len)) { + /* + * There's not enough captured data to include the + * mobility header length. + * + * Our caller expects us to return the length, however, + * so return a value that will run to the end of the + * captured data. + * + * XXX - "ip6_print()" doesn't do anything with the + * returned length, however, as it breaks out of the + * header-processing loop. + */ + mhlen = ep - bp; + goto trunc; + } + mhlen = (int)((mh->ip6m_len + 1) << 3); + + /* XXX ip6m_cksum */ + + TCHECK(mh->ip6m_type); + type = mh->ip6m_type; + switch (type) { + case IP6M_BINDING_REQUEST: + printf("mobility: BRR"); + hlen = IP6M_MINLEN; + break; + case IP6M_HOME_TEST_INIT: + case IP6M_CAREOF_TEST_INIT: + printf("mobility: %soTI", + type == IP6M_HOME_TEST_INIT ? "H" : "C"); + hlen = IP6M_MINLEN; + if (vflag) { + TCHECK2(*mh, hlen + 8); + printf(" %s Init Cookie=%08x:%08x", + type == IP6M_HOME_TEST_INIT ? "Home" : "Care-of", + EXTRACT_32BITS(&bp[hlen]), + EXTRACT_32BITS(&bp[hlen + 4])); + } + hlen += 8; + break; + case IP6M_HOME_TEST: + case IP6M_CAREOF_TEST: + printf("mobility: %soT", + type == IP6M_HOME_TEST ? "H" : "C"); + TCHECK(mh->ip6m_data16[0]); + printf(" nonce id=0x%x", EXTRACT_16BITS(&mh->ip6m_data16[0])); + hlen = IP6M_MINLEN; + if (vflag) { + TCHECK2(*mh, hlen + 8); + printf(" %s Init Cookie=%08x:%08x", + type == IP6M_HOME_TEST ? "Home" : "Care-of", + EXTRACT_32BITS(&bp[hlen]), + EXTRACT_32BITS(&bp[hlen + 4])); + } + hlen += 8; + if (vflag) { + TCHECK2(*mh, hlen + 8); + printf(" %s Keygen Token=%08x:%08x", + type == IP6M_HOME_TEST ? "Home" : "Care-of", + EXTRACT_32BITS(&bp[hlen]), + EXTRACT_32BITS(&bp[hlen + 4])); + } + hlen += 8; + break; + case IP6M_BINDING_UPDATE: + printf("mobility: BU"); + TCHECK(mh->ip6m_data16[0]); + printf(" seq#=%d", EXTRACT_16BITS(&mh->ip6m_data16[0])); + hlen = IP6M_MINLEN; + TCHECK2(*mh, hlen + 1); + if (bp[hlen] & 0xf0) + printf(" "); + if (bp[hlen] & 0x80) + printf("A"); + if (bp[hlen] & 0x40) + printf("H"); + if (bp[hlen] & 0x20) + printf("L"); + if (bp[hlen] & 0x10) + printf("K"); + /* Reserved (4bits) */ + hlen += 1; + /* Reserved (8bits) */ + hlen += 1; + TCHECK2(*mh, hlen + 2); + /* units of 4 secs */ + printf(" lifetime=%d", EXTRACT_16BITS(&bp[hlen]) << 2); + hlen += 2; + break; + case IP6M_BINDING_ACK: + printf("mobility: BA"); + TCHECK(mh->ip6m_data8[0]); + printf(" status=%d", mh->ip6m_data8[0]); + if (mh->ip6m_data8[1] & 0x80) + printf(" K"); + /* Reserved (7bits) */ + hlen = IP6M_MINLEN; + TCHECK2(*mh, hlen + 2); + printf(" seq#=%d", EXTRACT_16BITS(&bp[hlen])); + hlen += 2; + TCHECK2(*mh, hlen + 2); + /* units of 4 secs */ + printf(" lifetime=%d", EXTRACT_16BITS(&bp[hlen]) << 2); + hlen += 2; + break; + case IP6M_BINDING_ERROR: + printf("mobility: BE"); + TCHECK(mh->ip6m_data8[0]); + printf(" status=%d", mh->ip6m_data8[0]); + /* Reserved */ + hlen = IP6M_MINLEN; + TCHECK2(*mh, hlen + 16); + printf(" homeaddr %s", ip6addr_string(&bp[hlen])); + hlen += 16; + break; + default: + printf("mobility: type-#%d len=%d", type, mh->ip6m_len); + return(mhlen); + break; + } + if (vflag) + mobility_opt_print(&bp[hlen], mhlen - hlen); + + return(mhlen); + + trunc: + fputs("[|MOBILITY]", stdout); + return(mhlen); +} +#endif /* INET6 */ diff --git a/dist/tcpdump/print-rsvp.c b/dist/tcpdump/print-rsvp.c new file mode 100644 index 000000000000..14394753509b --- /dev/null +++ b/dist/tcpdump/print-rsvp.c @@ -0,0 +1,1256 @@ +/* $NetBSD: print-rsvp.c,v 1.1.1.1 2004/09/27 17:07:24 dyoung Exp $ */ + +/* + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code + * distributions retain the above copyright notice and this paragraph + * in its entirety, and (2) distributions including binary code include + * the above copyright notice and this paragraph in its entirety in + * the documentation or other materials provided with the distribution. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND + * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE. + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.24.2.3 2004/03/24 04:01:08 guy Exp"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "interface.h" +#include "extract.h" +#include "addrtoname.h" +#include "ethertype.h" +#include "gmpls.h" + +/* + * RFC 2205 common header + * + * 0 1 2 3 + * +-------------+-------------+-------------+-------------+ + * | Vers | Flags| Msg Type | RSVP Checksum | + * +-------------+-------------+-------------+-------------+ + * | Send_TTL | (Reserved) | RSVP Length | + * +-------------+-------------+-------------+-------------+ + * + */ + +struct rsvp_common_header { + u_int8_t version_flags; + u_int8_t msg_type; + u_int8_t checksum[2]; + u_int8_t ttl; + u_int8_t reserved; + u_int8_t length[2]; +}; + +/* + * RFC2205 object header + * + * + * 0 1 2 3 + * +-------------+-------------+-------------+-------------+ + * | Length (bytes) | Class-Num | C-Type | + * +-------------+-------------+-------------+-------------+ + * | | + * // (Object contents) // + * | | + * +-------------+-------------+-------------+-------------+ + */ + +struct rsvp_object_header { + u_int8_t length[2]; + u_int8_t class_num; + u_int8_t ctype; +}; + +#define RSVP_VERSION 1 +#define RSVP_EXTRACT_VERSION(x) (((x)&0xf0)>>4) +#define RSVP_EXTRACT_FLAGS(x) ((x)&0x0f) + +#define RSVP_MSGTYPE_PATH 1 +#define RSVP_MSGTYPE_RESV 2 +#define RSVP_MSGTYPE_PATHERR 3 +#define RSVP_MSGTYPE_RESVERR 4 +#define RSVP_MSGTYPE_PATHTEAR 5 +#define RSVP_MSGTYPE_RESVTEAR 6 +#define RSVP_MSGTYPE_RESVCONF 7 +#define RSVP_MSGTYPE_AGGREGATE 12 +#define RSVP_MSGTYPE_ACK 13 +#define RSVP_MSGTYPE_HELLO_OLD 14 /* ancient Hellos */ +#define RSVP_MSGTYPE_SREFRESH 15 +#define RSVP_MSGTYPE_HELLO 20 + +static const struct tok rsvp_msg_type_values[] = { + { RSVP_MSGTYPE_PATH, "Path" }, + { RSVP_MSGTYPE_RESV, "Resv" }, + { RSVP_MSGTYPE_PATHERR, "PathErr" }, + { RSVP_MSGTYPE_RESVERR, "ResvErr" }, + { RSVP_MSGTYPE_PATHTEAR, "PathTear" }, + { RSVP_MSGTYPE_RESVTEAR, "ResvTear" }, + { RSVP_MSGTYPE_RESVCONF, "ResvConf" }, + { RSVP_MSGTYPE_AGGREGATE, "Aggregate" }, + { RSVP_MSGTYPE_ACK, "Acknowledgement" }, + { RSVP_MSGTYPE_HELLO_OLD, "Hello (Old)" }, + { RSVP_MSGTYPE_SREFRESH, "Refresh" }, + { RSVP_MSGTYPE_HELLO, "Hello" }, + { 0, NULL} +}; + +static const struct tok rsvp_header_flag_values[] = { + { 0x01, "Refresh reduction capable" }, /* rfc2961 */ + { 0, NULL} +}; + +#define RSVP_OBJ_SESSION 1 /* rfc2205 */ +#define RSVP_OBJ_RSVP_HOP 3 /* rfc2205, rfc3473 */ +#define RSVP_OBJ_INTEGRITY 4 +#define RSVP_OBJ_TIME_VALUES 5 /* rfc2205 */ +#define RSVP_OBJ_ERROR_SPEC 6 +#define RSVP_OBJ_SCOPE 7 +#define RSVP_OBJ_STYLE 8 /* rfc2205 */ +#define RSVP_OBJ_FLOWSPEC 9 /* rfc2215 */ +#define RSVP_OBJ_FILTERSPEC 10 /* rfc2215 */ +#define RSVP_OBJ_SENDER_TEMPLATE 11 +#define RSVP_OBJ_SENDER_TSPEC 12 /* rfc2215 */ +#define RSVP_OBJ_ADSPEC 13 /* rfc2215 */ +#define RSVP_OBJ_POLICY_DATA 14 +#define RSVP_OBJ_CONFIRM 15 /* rfc2205 */ +#define RSVP_OBJ_LABEL 16 /* rfc3209 */ +#define RSVP_OBJ_LABEL_REQ 19 /* rfc3209 */ +#define RSVP_OBJ_ERO 20 /* rfc3209 */ +#define RSVP_OBJ_RRO 21 /* rfc3209 */ +#define RSVP_OBJ_HELLO 22 /* rfc3209 */ +#define RSVP_OBJ_MESSAGE_ID 23 +#define RSVP_OBJ_MESSAGE_ID_ACK 24 +#define RSVP_OBJ_MESSAGE_ID_LIST 25 +#define RSVP_OBJ_RECOVERY_LABEL 34 /* rfc3473 */ +#define RSVP_OBJ_UPSTREAM_LABEL 35 /* rfc3473 */ +#define RSVP_OBJ_LABEL_SET 36 /* rfc3473 */ +#define RSVP_OBJ_PROTECTION 37 /* rfc3473 */ +#define RSVP_OBJ_DETOUR 63 /* draft-ietf-mpls-rsvp-lsp-fastreroute-01 */ +#define RSVP_OBJ_SUGGESTED_LABEL 129 /* rfc3473 */ +#define RSVP_OBJ_ACCEPT_LABEL_SET 130 /* rfc3473 */ +#define RSVP_OBJ_RESTART_CAPABILITY 131 /* rfc3473 */ +#define RSVP_OBJ_NOTIFY_REQ 195 /* rfc3473 */ +#define RSVP_OBJ_ADMIN_STATUS 196 /* rfc3473 */ +#define RSVP_OBJ_PROPERTIES 204 /* juniper proprietary */ +#define RSVP_OBJ_FASTREROUTE 205 /* draft-ietf-mpls-rsvp-lsp-fastreroute-01 */ +#define RSVP_OBJ_SESSION_ATTRIBUTE 207 /* rfc3209 */ +#define RSVP_OBJ_CALL_ID 230 /* rfc3474 */ +#define RSVP_OBJ_CALL_OPS 236 /* rfc3474 */ + +static const struct tok rsvp_obj_values[] = { + { RSVP_OBJ_SESSION, "Session" }, + { RSVP_OBJ_RSVP_HOP, "RSVP Hop" }, + { RSVP_OBJ_INTEGRITY, "Integrity" }, + { RSVP_OBJ_TIME_VALUES, "Time Values" }, + { RSVP_OBJ_ERROR_SPEC, "Error Spec" }, + { RSVP_OBJ_SCOPE, "Scope" }, + { RSVP_OBJ_STYLE, "Style" }, + { RSVP_OBJ_FLOWSPEC, "Flowspec" }, + { RSVP_OBJ_FILTERSPEC, "FilterSpec" }, + { RSVP_OBJ_SENDER_TEMPLATE, "Sender Template" }, + { RSVP_OBJ_SENDER_TSPEC, "Sender TSpec" }, + { RSVP_OBJ_ADSPEC, "Adspec" }, + { RSVP_OBJ_POLICY_DATA, "Policy Data" }, + { RSVP_OBJ_CONFIRM, "Confirm" }, + { RSVP_OBJ_LABEL, "Label" }, + { RSVP_OBJ_LABEL_REQ, "Label Request" }, + { RSVP_OBJ_ERO, "ERO" }, + { RSVP_OBJ_RRO, "RRO" }, + { RSVP_OBJ_HELLO, "Hello" }, + { RSVP_OBJ_MESSAGE_ID, "Message ID" }, + { RSVP_OBJ_MESSAGE_ID_ACK, "Message ID Ack" }, + { RSVP_OBJ_MESSAGE_ID_LIST, "Message ID List" }, + { RSVP_OBJ_RECOVERY_LABEL, "Recovery Label" }, + { RSVP_OBJ_UPSTREAM_LABEL, "Upstream Label" }, + { RSVP_OBJ_LABEL_SET, "Label Set" }, + { RSVP_OBJ_ACCEPT_LABEL_SET, "Acceptable Label Set" }, + { RSVP_OBJ_DETOUR, "Detour" }, + { RSVP_OBJ_SUGGESTED_LABEL, "Suggested Label" }, + { RSVP_OBJ_PROPERTIES, "Properties" }, + { RSVP_OBJ_FASTREROUTE, "Fast Re-Route" }, + { RSVP_OBJ_SESSION_ATTRIBUTE, "Session Attribute" }, + { RSVP_OBJ_CALL_ID, "Call-ID" }, + { RSVP_OBJ_CALL_OPS, "Call Capability" }, + { RSVP_OBJ_RESTART_CAPABILITY, "Restart Capability" }, + { RSVP_OBJ_NOTIFY_REQ, "Notify Request" }, + { RSVP_OBJ_PROTECTION, "Protection" }, + { RSVP_OBJ_ADMIN_STATUS, "Administrative Status" }, + { 0, NULL} +}; + +#define RSVP_CTYPE_IPV4 1 +#define RSVP_CTYPE_IPV6 2 +#define RSVP_CTYPE_TUNNEL_IPV4 7 +#define RSVP_CTYPE_TUNNEL_IPV6 8 +#define RSVP_CTYPE_1 1 +#define RSVP_CTYPE_2 2 +#define RSVP_CTYPE_3 3 +#define RSVP_CTYPE_4 4 + +/* + * the ctypes are not globally unique so for + * translating it to strings we build a table based + * on objects offsetted by the ctype + */ + +static const struct tok rsvp_ctype_values[] = { + { 256*RSVP_OBJ_RSVP_HOP+RSVP_CTYPE_IPV4, "IPv4" }, + { 256*RSVP_OBJ_RSVP_HOP+RSVP_CTYPE_IPV6, "IPv6" }, + { 256*RSVP_OBJ_RSVP_HOP+RSVP_CTYPE_3, "IPv4 plus opt. TLVs" }, + { 256*RSVP_OBJ_RSVP_HOP+RSVP_CTYPE_4, "IPv6 plus opt. TLVs" }, + { 256*RSVP_OBJ_NOTIFY_REQ+RSVP_CTYPE_IPV4, "IPv4" }, + { 256*RSVP_OBJ_NOTIFY_REQ+RSVP_CTYPE_IPV6, "IPv6" }, + { 256*RSVP_OBJ_CONFIRM+RSVP_CTYPE_IPV4, "IPv4" }, + { 256*RSVP_OBJ_CONFIRM+RSVP_CTYPE_IPV6, "IPv6" }, + { 256*RSVP_OBJ_TIME_VALUES+RSVP_CTYPE_1, "1" }, + { 256*RSVP_OBJ_FLOWSPEC+RSVP_CTYPE_1, "obsolete" }, + { 256*RSVP_OBJ_FLOWSPEC+RSVP_CTYPE_2, "IntServ" }, + { 256*RSVP_OBJ_SENDER_TSPEC+RSVP_CTYPE_2, "IntServ" }, + { 256*RSVP_OBJ_ADSPEC+RSVP_CTYPE_2, "IntServ" }, + { 256*RSVP_OBJ_FILTERSPEC+RSVP_CTYPE_IPV4, "IPv4" }, + { 256*RSVP_OBJ_FILTERSPEC+RSVP_CTYPE_IPV6, "IPv6" }, + { 256*RSVP_OBJ_FILTERSPEC+RSVP_CTYPE_3, "IPv6 Flow-label" }, + { 256*RSVP_OBJ_FILTERSPEC+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" }, + { 256*RSVP_OBJ_SESSION+RSVP_CTYPE_IPV4, "IPv4" }, + { 256*RSVP_OBJ_SESSION+RSVP_CTYPE_IPV6, "IPv6" }, + { 256*RSVP_OBJ_SESSION+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" }, + { 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_IPV4, "IPv4" }, + { 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_IPV6, "IPv6" }, + { 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" }, + { 256*RSVP_OBJ_STYLE+RSVP_CTYPE_1, "1" }, + { 256*RSVP_OBJ_HELLO+RSVP_CTYPE_1, "Hello Request" }, + { 256*RSVP_OBJ_HELLO+RSVP_CTYPE_2, "Hello Ack" }, + { 256*RSVP_OBJ_LABEL_REQ+RSVP_CTYPE_1, "without label range" }, + { 256*RSVP_OBJ_LABEL_REQ+RSVP_CTYPE_2, "with ATM label range" }, + { 256*RSVP_OBJ_LABEL_REQ+RSVP_CTYPE_3, "with FR label range" }, + { 256*RSVP_OBJ_LABEL_REQ+RSVP_CTYPE_4, "Generalized Label" }, + { 256*RSVP_OBJ_LABEL+RSVP_CTYPE_1, "Label" }, + { 256*RSVP_OBJ_LABEL+RSVP_CTYPE_2, "Generalized Label" }, + { 256*RSVP_OBJ_LABEL+RSVP_CTYPE_3, "Waveband Switching" }, + { 256*RSVP_OBJ_SUGGESTED_LABEL+RSVP_CTYPE_1, "Label" }, + { 256*RSVP_OBJ_SUGGESTED_LABEL+RSVP_CTYPE_2, "Generalized Label" }, + { 256*RSVP_OBJ_SUGGESTED_LABEL+RSVP_CTYPE_3, "Waveband Switching" }, + { 256*RSVP_OBJ_UPSTREAM_LABEL+RSVP_CTYPE_1, "Label" }, + { 256*RSVP_OBJ_UPSTREAM_LABEL+RSVP_CTYPE_2, "Generalized Label" }, + { 256*RSVP_OBJ_UPSTREAM_LABEL+RSVP_CTYPE_3, "Waveband Switching" }, + { 256*RSVP_OBJ_RECOVERY_LABEL+RSVP_CTYPE_1, "Label" }, + { 256*RSVP_OBJ_RECOVERY_LABEL+RSVP_CTYPE_2, "Generalized Label" }, + { 256*RSVP_OBJ_RECOVERY_LABEL+RSVP_CTYPE_3, "Waveband Switching" }, + { 256*RSVP_OBJ_ERO+RSVP_CTYPE_IPV4, "IPv4" }, + { 256*RSVP_OBJ_RRO+RSVP_CTYPE_IPV4, "IPv4" }, + { 256*RSVP_OBJ_ERROR_SPEC+RSVP_CTYPE_IPV4, "IPv4" }, + { 256*RSVP_OBJ_ERROR_SPEC+RSVP_CTYPE_IPV6, "IPv6" }, + { 256*RSVP_OBJ_ERROR_SPEC+RSVP_CTYPE_3, "IPv4 plus opt. TLVs" }, + { 256*RSVP_OBJ_ERROR_SPEC+RSVP_CTYPE_4, "IPv6 plus opt. TLVs" }, + { 256*RSVP_OBJ_RESTART_CAPABILITY+RSVP_CTYPE_1, "IPv4" }, + { 256*RSVP_OBJ_SESSION_ATTRIBUTE+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" }, + { 256*RSVP_OBJ_FASTREROUTE+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" }, + { 256*RSVP_OBJ_DETOUR+RSVP_CTYPE_TUNNEL_IPV4, "Tunnel IPv4" }, + { 256*RSVP_OBJ_PROPERTIES+RSVP_CTYPE_1, "1" }, + { 0, NULL} +}; + +#define RSVP_OBJ_XRO_MASK_SUBOBJ(x) ((x)&0x7f) +#define RSVP_OBJ_XRO_MASK_LOOSE(x) ((x)&0x80) + +#define RSVP_OBJ_XRO_RES 0 +#define RSVP_OBJ_XRO_IPV4 1 +#define RSVP_OBJ_XRO_IPV6 2 +#define RSVP_OBJ_XRO_ASN 32 +#define RSVP_OBJ_XRO_MPLS 64 + +static const struct tok rsvp_obj_xro_values[] = { + { RSVP_OBJ_XRO_RES, "Reserved" }, + { RSVP_OBJ_XRO_IPV4, "IPv4 prefix" }, + { RSVP_OBJ_XRO_IPV6, "IPv6 prefix" }, + { RSVP_OBJ_XRO_ASN, "Autonomous system number" }, + { RSVP_OBJ_XRO_MPLS, "MPLS label switched path termination" }, + { 0, NULL} +}; + +/* draft-ietf-mpls-rsvp-lsp-fastreroute-02.txt */ +static const struct tok rsvp_obj_rro_flag_values[] = { + { 0x01, "Local protection available" }, + { 0x02, "Local protection in use" }, + { 0x04, "Bandwidth protection" }, + { 0x08, "Node protection" }, + { 0, NULL} +}; + +static const struct tok rsvp_resstyle_values[] = { + { 17, "Wildcard Filter" }, + { 10, "Fixed Filter" }, + { 18, "Shared Explicit" }, + { 0, NULL} +}; + +#define RSVP_OBJ_INTSERV_GUARANTEED_SERV 2 +#define RSVP_OBJ_INTSERV_CONTROLLED_LOAD 5 + +static const struct tok rsvp_intserv_service_type_values[] = { + { 1, "Default/Global Information" }, + { RSVP_OBJ_INTSERV_GUARANTEED_SERV, "Guaranteed Service" }, + { RSVP_OBJ_INTSERV_CONTROLLED_LOAD, "Controlled Load" }, + { 0, NULL} +}; + +static const struct tok rsvp_intserv_parameter_id_values[] = { + { 4, "IS hop cnt" }, + { 6, "Path b/w estimate" }, + { 8, "Minimum path latency" }, + { 10, "Composed MTU" }, + { 127, "Token Bucket TSpec" }, + { 130, "Guaranteed Service RSpec" }, + { 133, "End-to-end composed value for C" }, + { 134, "End-to-end composed value for D" }, + { 135, "Since-last-reshaping point composed C" }, + { 136, "Since-last-reshaping point composed D" }, + { 0, NULL} +}; + +static struct tok rsvp_session_attribute_flag_values[] = { + { 0x01, "Local Protection desired" }, + { 0x02, "Label Recording desired" }, + { 0x04, "SE Style desired" }, + { 0x08, "Bandwidth protection desired" }, /* draft-ietf-mpls-rsvp-lsp-fastreroute-02.txt */ + { 0x10, "Node protection desired" }, /* draft-ietf-mpls-rsvp-lsp-fastreroute-02.txt */ + { 0, NULL} +}; + +static struct tok rsvp_obj_prop_tlv_values[] = { + { 0x01, "Cos" }, + { 0x02, "Metric 1" }, + { 0x04, "Metric 2" }, + { 0x08, "CCC Status" }, + { 0x10, "Path Type" }, + { 0, NULL} +}; + +#define RSVP_OBJ_ERROR_SPEC_CODE_ROUTING 24 +#define RSVP_OBJ_ERROR_SPEC_CODE_NOTIFY 25 + +static struct tok rsvp_obj_error_code_values[] = { + { RSVP_OBJ_ERROR_SPEC_CODE_ROUTING, "Routing Problem" }, + { RSVP_OBJ_ERROR_SPEC_CODE_NOTIFY, "Notify Error" }, + { 0, NULL} +}; + +static struct tok rsvp_obj_error_code_routing_values[] = { + { 1, "Bad EXPLICIT_ROUTE object" }, + { 2, "Bad strict node" }, + { 3, "Bad loose node" }, + { 4, "Bad initial subobject" }, + { 5, "No route available toward destination" }, + { 6, "Unacceptable label value" }, + { 7, "RRO indicated routing loops" }, + { 8, "non-RSVP-capable router in the path" }, + { 9, "MPLS label allocation failure" }, + { 10, "Unsupported L3PID" }, + { 0, NULL} +}; + +#define FALSE 0 +#define TRUE 1 + + +static int rsvp_intserv_print(const u_char *, u_short); + +/* + * this is a dissector for all the intserv defined + * specs as defined per rfc2215 + * it is called from various rsvp objects; + * returns the amount of bytes being processed + */ +static int +rsvp_intserv_print(const u_char *tptr, u_short obj_tlen) { + + int parameter_id,parameter_length; + union { + float f; + u_int32_t i; + } bw; + + if (obj_tlen < 4) + return 0; + parameter_id = *(tptr); + parameter_length = EXTRACT_16BITS(tptr+2)<<2; /* convert wordcount to bytecount */ + + printf("\n\t Parameter ID: %s (%u), length: %u, Flags: [0x%02x]", + tok2str(rsvp_intserv_parameter_id_values,"unknown",parameter_id), + parameter_id, + parameter_length, + *(tptr+1)); + + if (obj_tlen < parameter_length+4) + return 0; + switch(parameter_id) { /* parameter_id */ + + case 4: + /* + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | 4 (e) | (f) | 1 (g) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | IS hop cnt (32-bit unsigned integer) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + if (parameter_length == 4) + printf("\n\t\tIS hop count: %u", EXTRACT_32BITS(tptr+4)); + break; + + case 6: + /* + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | 6 (h) | (i) | 1 (j) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Path b/w estimate (32-bit IEEE floating point number) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + if (parameter_length == 4) { + bw.i = EXTRACT_32BITS(tptr+4); + printf("\n\t\tPath b/w estimate: %.10g Mbps", bw.f/125000); + } + break; + + case 8: + /* + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | 8 (k) | (l) | 1 (m) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Minimum path latency (32-bit integer) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + if (parameter_length == 4) { + printf("\n\t\tMinimum path latency: "); + if (EXTRACT_32BITS(tptr+4) == 0xffffffff) + printf("don't care"); + else + printf("%u", EXTRACT_32BITS(tptr+4)); + } + break; + + case 10: + + /* + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | 10 (n) | (o) | 1 (p) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Composed MTU (32-bit unsigned integer) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + if (parameter_length == 4) + printf("\n\t\tComposed MTU: %u bytes", EXTRACT_32BITS(tptr+4)); + break; + case 127: + /* + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | 127 (e) | 0 (f) | 5 (g) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Token Bucket Rate [r] (32-bit IEEE floating point number) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Token Bucket Size [b] (32-bit IEEE floating point number) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Peak Data Rate [p] (32-bit IEEE floating point number) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Minimum Policed Unit [m] (32-bit integer) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Maximum Packet Size [M] (32-bit integer) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + + if (parameter_length == 20) { + bw.i = EXTRACT_32BITS(tptr+4); + printf("\n\t\tToken Bucket Rate: %.10g Mbps", bw.f/125000); + bw.i = EXTRACT_32BITS(tptr+8); + printf("\n\t\tToken Bucket Size: %.10g bytes", bw.f); + bw.i = EXTRACT_32BITS(tptr+12); + printf("\n\t\tPeak Data Rate: %.10g Mbps", bw.f/125000); + printf("\n\t\tMinimum Policed Unit: %u bytes", EXTRACT_32BITS(tptr+16)); + printf("\n\t\tMaximum Packet Size: %u bytes", EXTRACT_32BITS(tptr+20)); + } + break; + + case 130: + /* + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | 130 (h) | 0 (i) | 2 (j) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Rate [R] (32-bit IEEE floating point number) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Slack Term [S] (32-bit integer) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + + if (parameter_length == 8) { + bw.i = EXTRACT_32BITS(tptr+4); + printf("\n\t\tRate: %.10g Mbps", bw.f/125000); + printf("\n\t\tSlack Term: %u", EXTRACT_32BITS(tptr+8)); + } + break; + + case 133: + case 134: + case 135: + case 136: + if (parameter_length == 4) + printf("\n\t\tValue: %u", EXTRACT_32BITS(tptr+4)); + break; + + default: + if (vflag <= 1) + print_unknown_data(tptr+4,"\n\t\t",parameter_length); + } + return (parameter_length+4); /* header length 4 bytes */ +} + +void +rsvp_print(register const u_char *pptr, register u_int len) { + + const struct rsvp_common_header *rsvp_com_header; + const struct rsvp_object_header *rsvp_obj_header; + const u_char *tptr,*obj_tptr; + u_short tlen,rsvp_obj_len,rsvp_obj_ctype,obj_tlen,intserv_serv_tlen; + int hexdump,processed,padbytes,error_code,error_value; + union { + float f; + u_int32_t i; + } bw; + u_int8_t namelen; + u_int i; + + tptr=pptr; + rsvp_com_header = (const struct rsvp_common_header *)pptr; + TCHECK(*rsvp_com_header); + + /* + * Sanity checking of the header. + */ + if (RSVP_EXTRACT_VERSION(rsvp_com_header->version_flags) != RSVP_VERSION) { + printf("RSVP version %u packet not supported", + RSVP_EXTRACT_VERSION(rsvp_com_header->version_flags)); + return; + } + + /* in non-verbose mode just lets print the basic Message Type*/ + if (vflag < 1) { + printf("RSVP %s Message, length: %u", + tok2str(rsvp_msg_type_values, "unknown (%u)",rsvp_com_header->msg_type), + len); + return; + } + + /* ok they seem to want to know everything - lets fully decode it */ + + tlen=EXTRACT_16BITS(rsvp_com_header->length); + + printf("RSVP\n\tv: %u, msg-type: %s, Flags: [%s], length: %u, ttl: %u, checksum: 0x%04x", + RSVP_EXTRACT_VERSION(rsvp_com_header->version_flags), + tok2str(rsvp_msg_type_values, "unknown, type: %u",rsvp_com_header->msg_type), + bittok2str(rsvp_header_flag_values,"none",RSVP_EXTRACT_FLAGS(rsvp_com_header->version_flags)), + tlen, + rsvp_com_header->ttl, + EXTRACT_16BITS(rsvp_com_header->checksum)); + + if (tlen < sizeof(const struct rsvp_common_header)) + return; + tptr+=sizeof(const struct rsvp_common_header); + tlen-=sizeof(const struct rsvp_common_header); + + while(tlen>0) { + /* did we capture enough for fully decoding the object header ? */ + if (!TTEST2(*tptr, sizeof(struct rsvp_object_header))) + goto trunc; + + rsvp_obj_header = (const struct rsvp_object_header *)tptr; + rsvp_obj_len=EXTRACT_16BITS(rsvp_obj_header->length); + rsvp_obj_ctype=rsvp_obj_header->ctype; + + if(rsvp_obj_len % 4 || rsvp_obj_len < sizeof(struct rsvp_object_header)) + return; + + printf("\n\t %s Object (%u) Flags: [%s", + tok2str(rsvp_obj_values, + "Unknown", + rsvp_obj_header->class_num), + rsvp_obj_header->class_num, + ((rsvp_obj_header->class_num)&0x80) ? "ignore" : "reject"); + + if (rsvp_obj_header->class_num > 128) + printf(" %s", + ((rsvp_obj_header->class_num)&0x40) ? "and forward" : "silently"); + + printf(" if unknown], Class-Type: %s (%u), length: %u", + tok2str(rsvp_ctype_values, + "Unknown", + ((rsvp_obj_header->class_num)<<8)+rsvp_obj_ctype), + rsvp_obj_ctype, + rsvp_obj_len); + + obj_tptr=tptr+sizeof(struct rsvp_object_header); + obj_tlen=rsvp_obj_len-sizeof(struct rsvp_object_header); + + /* did we capture enough for fully decoding the object ? */ + if (!TTEST2(*tptr, rsvp_obj_len)) + goto trunc; + hexdump=FALSE; + + switch(rsvp_obj_header->class_num) { + case RSVP_OBJ_SESSION: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_IPV4: + if (obj_tlen < 8) + return; + printf("\n\t IPv4 DestAddress: %s, Protocol ID: 0x%02x", + ipaddr_string(obj_tptr), + *(obj_tptr+4)); + printf("\n\t Flags: [0x%02x], DestPort %u", + *(obj_tptr+5), + EXTRACT_16BITS(obj_tptr+6)); + obj_tlen-=8; + obj_tptr+=8; + break; +#ifdef INET6 + case RSVP_CTYPE_IPV6: + if (obj_tlen < 20) + return; + printf("\n\t IPv6 DestAddress: %s, Protocol ID: 0x%02x", + ip6addr_string(obj_tptr), + *(obj_tptr+16)); + printf("\n\t Flags: [0x%02x], DestPort %u", + *(obj_tptr+17), + EXTRACT_16BITS(obj_tptr+18)); + obj_tlen-=20; + obj_tptr+=20; + break; + + case RSVP_CTYPE_TUNNEL_IPV6: + if (obj_tlen < 36) + return; + printf("\n\t IPv6 Tunnel EndPoint: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s", + ip6addr_string(obj_tptr), + EXTRACT_16BITS(obj_tptr+18), + ip6addr_string(obj_tptr+20)); + obj_tlen-=36; + obj_tptr+=36; + break; +#endif + case RSVP_CTYPE_TUNNEL_IPV4: + if (obj_tlen < 12) + return; + printf("\n\t IPv4 Tunnel EndPoint: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s", + ipaddr_string(obj_tptr), + EXTRACT_16BITS(obj_tptr+6), + ipaddr_string(obj_tptr+8)); + obj_tlen-=12; + obj_tptr+=12; + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_CONFIRM: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_IPV4: + if (obj_tlen < 4) + return; + printf("\n\t IPv4 Receiver Address: %s", + ipaddr_string(obj_tptr)); + obj_tlen-=4; + obj_tptr+=4; + break; +#ifdef INET6 + case RSVP_CTYPE_IPV6: + if (obj_tlen < 16) + return; + printf("\n\t IPv6 Receiver Address: %s", + ip6addr_string(obj_tptr)); + obj_tlen-=16; + obj_tptr+=16; + break; +#endif + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_NOTIFY_REQ: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_IPV4: + if (obj_tlen < 4) + return; + printf("\n\t IPv4 Notify Node Address: %s", + ipaddr_string(obj_tptr)); + obj_tlen-=4; + obj_tptr+=4; + break; +#ifdef INET6 + case RSVP_CTYPE_IPV6: + if (obj_tlen < 16) + return; + printf("\n\t IPv6 Notify Node Address: %s", + ip6addr_string(obj_tptr)); + obj_tlen-=16; + obj_tptr+=16; + break; +#endif + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_SUGGESTED_LABEL: /* fall through */ + case RSVP_OBJ_UPSTREAM_LABEL: /* fall through */ + case RSVP_OBJ_RECOVERY_LABEL: /* fall through */ + case RSVP_OBJ_LABEL: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_1: + while(obj_tlen >= 4 ) { + printf("\n\t Label: %u", EXTRACT_32BITS(obj_tptr)); + obj_tlen-=4; + obj_tptr+=4; + } + break; + case RSVP_CTYPE_2: + if (obj_tlen < 4) + return; + printf("\n\t Generalized Label: %u", + EXTRACT_32BITS(obj_tptr)); + obj_tlen-=4; + obj_tptr+=4; + break; + case RSVP_CTYPE_3: + if (obj_tlen < 12) + return; + printf("\n\t Waveband ID: %u\n\t Start Label: %u, Stop Label: %u", + EXTRACT_32BITS(obj_tptr), + EXTRACT_32BITS(obj_tptr+4), + EXTRACT_32BITS(obj_tptr+8)); + obj_tlen-=12; + obj_tptr+=12; + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_STYLE: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_1: + if (obj_tlen < 4) + return; + printf("\n\t Reservation Style: %s, Flags: [0x%02x]", + tok2str(rsvp_resstyle_values, + "Unknown", + EXTRACT_24BITS(obj_tptr+1)), + *(obj_tptr)); + obj_tlen-=4; + obj_tptr+=4; + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_SENDER_TEMPLATE: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_IPV4: + if (obj_tlen < 8) + return; + printf("\n\t Source Address: %s, Source Port: %u", + ipaddr_string(obj_tptr), + EXTRACT_16BITS(obj_tptr+6)); + obj_tlen-=8; + obj_tptr+=8; + break; +#ifdef INET6 + case RSVP_CTYPE_IPV6: + if (obj_tlen < 20) + return; + printf("\n\t Source Address: %s, Source Port: %u", + ip6addr_string(obj_tptr), + EXTRACT_16BITS(obj_tptr+18)); + obj_tlen-=20; + obj_tptr+=20; + break; +#endif + case RSVP_CTYPE_TUNNEL_IPV4: + if (obj_tlen < 8) + return; + printf("\n\t IPv4 Tunnel Sender Address: %s, LSP-ID: 0x%04x", + ipaddr_string(obj_tptr), + EXTRACT_16BITS(obj_tptr+6)); + obj_tlen-=8; + obj_tptr+=8; + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_LABEL_REQ: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_1: + while(obj_tlen >= 4 ) { + printf("\n\t L3 Protocol ID: %s", + tok2str(ethertype_values, + "Unknown Protocol (0x%04x)", + EXTRACT_16BITS(obj_tptr+2))); + obj_tlen-=4; + obj_tptr+=4; + } + break; + case RSVP_CTYPE_2: + if (obj_tlen < 12) + return; + printf("\n\t L3 Protocol ID: %s", + tok2str(ethertype_values, + "Unknown Protocol (0x%04x)", + EXTRACT_16BITS(obj_tptr+2))); + printf(",%s merge capability",((*(obj_tptr+4))&0x80) ? "no" : "" ); + printf("\n\t Minimum VPI/VCI: %u/%u", + (EXTRACT_16BITS(obj_tptr+4))&0xfff, + (EXTRACT_16BITS(obj_tptr+6))&0xfff); + printf("\n\t Maximum VPI/VCI: %u/%u", + (EXTRACT_16BITS(obj_tptr+8))&0xfff, + (EXTRACT_16BITS(obj_tptr+10))&0xfff); + obj_tlen-=12; + obj_tptr+=12; + break; + case RSVP_CTYPE_3: + if (obj_tlen < 12) + return; + printf("\n\t L3 Protocol ID: %s", + tok2str(ethertype_values, + "Unknown Protocol (0x%04x)", + EXTRACT_16BITS(obj_tptr+2))); + printf("\n\t Minimum/Maximum DLCI: %u/%u, %s%s bit DLCI", + (EXTRACT_32BITS(obj_tptr+4))&0x7fffff, + (EXTRACT_32BITS(obj_tptr+8))&0x7fffff, + (((EXTRACT_16BITS(obj_tptr+4)>>7)&3) == 0 ) ? "10" : "", + (((EXTRACT_16BITS(obj_tptr+4)>>7)&3) == 2 ) ? "23" : ""); + obj_tlen-=12; + obj_tptr+=12; + break; + case RSVP_CTYPE_4: + if (obj_tlen < 8) + return; + printf("\n\t LSP Encoding Type: %s (%u)", + tok2str(gmpls_encoding_values, + "Unknown", + *obj_tptr), + *obj_tptr); + printf("\n\t Switching Type: %s (%u), Payload ID: %s (0x%04x)", + tok2str(gmpls_switch_cap_values, + "Unknown", + *(obj_tptr+1)), + *(obj_tptr+1), + tok2str(gmpls_payload_values, + "Unknown", + EXTRACT_16BITS(obj_tptr+2)), + EXTRACT_16BITS(obj_tptr+2)); + obj_tlen-=8; + obj_tptr+=8; + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_RRO: + case RSVP_OBJ_ERO: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_IPV4: + while(obj_tlen >= 4 ) { + printf("\n\t Subobject Type: %s", + tok2str(rsvp_obj_xro_values, + "Unknown %u", + RSVP_OBJ_XRO_MASK_SUBOBJ(*obj_tptr))); + switch(RSVP_OBJ_XRO_MASK_SUBOBJ(*obj_tptr)) { + case RSVP_OBJ_XRO_IPV4: + printf(", %s, %s/%u, Flags: [%s]", + RSVP_OBJ_XRO_MASK_LOOSE(*obj_tptr) ? "Loose" : "Strict", + ipaddr_string(obj_tptr+2), + *(obj_tptr+6), + bittok2str(rsvp_obj_rro_flag_values, + "none", + *(obj_tptr+7))); /* rfc3209 says that this field is rsvd. */ + } + obj_tlen-=*(obj_tptr+1); + obj_tptr+=*(obj_tptr+1); + } + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_HELLO: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_1: + case RSVP_CTYPE_2: + if (obj_tlen < 8) + return; + printf("\n\t Source Instance: 0x%08x, Destination Instance: 0x%08x", + EXTRACT_32BITS(obj_tptr), + EXTRACT_32BITS(obj_tptr+4)); + obj_tlen-=8; + obj_tptr+=8; + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_RESTART_CAPABILITY: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_1: + if (obj_tlen < 8) + return; + printf("\n\t Restart Time: %ums, Recovery Time: %ums", + EXTRACT_16BITS(obj_tptr), + EXTRACT_16BITS(obj_tptr+4)); + obj_tlen-=8; + obj_tptr+=8; + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_SESSION_ATTRIBUTE: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_TUNNEL_IPV4: + if (obj_tlen < 4) + return; + namelen = *(obj_tptr+3); + if (obj_tlen < 4+namelen) + return; + printf("\n\t Session Name: "); + for (i = 0; i < namelen; i++) + safeputchar(*(obj_tptr+4+i)); + printf("\n\t Setup Priority: %u, Holding Priority: %u, Flags: [%s]", + (int)*obj_tptr, + (int)*(obj_tptr+1), + tok2str(rsvp_session_attribute_flag_values, + "none", + *(obj_tptr+2))); + + obj_tlen-=4+*(obj_tptr+3); + obj_tptr+=4+*(obj_tptr+3); + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_RSVP_HOP: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_3: /* fall through - FIXME add TLV parser */ + case RSVP_CTYPE_IPV4: + if (obj_tlen < 8) + return; + printf("\n\t Previous/Next Interface: %s, Logical Interface Handle: 0x%08x", + ipaddr_string(obj_tptr), + EXTRACT_32BITS(obj_tptr+4)); + obj_tlen-=8; + obj_tptr+=8; + hexdump=TRUE; /* unless we have a TLV parser lets just hexdump */ + break; +#ifdef INET6 + case RSVP_CTYPE_4: /* fall through - FIXME add TLV parser */ + case RSVP_CTYPE_IPV6: + if (obj_tlen < 20) + return; + printf("\n\t Previous/Next Interface: %s, Logical Interface Handle: 0x%08x", + ip6addr_string(obj_tptr), + EXTRACT_32BITS(obj_tptr+16)); + obj_tlen-=20; + obj_tptr+=20; + hexdump=TRUE; /* unless we have a TLV parser lets just hexdump */ + break; +#endif + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_TIME_VALUES: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_1: + if (obj_tlen < 4) + return; + printf("\n\t Refresh Period: %ums", + EXTRACT_32BITS(obj_tptr)); + obj_tlen-=4; + obj_tptr+=4; + break; + default: + hexdump=TRUE; + } + break; + + /* those three objects do share the same semantics */ + case RSVP_OBJ_SENDER_TSPEC: + case RSVP_OBJ_ADSPEC: + case RSVP_OBJ_FLOWSPEC: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_2: + if (obj_tlen < 4) + return; + printf("\n\t Msg-Version: %u, length: %u", + (*obj_tptr & 0xf0) >> 4, + EXTRACT_16BITS(obj_tptr+2)<<2); + obj_tptr+=4; /* get to the start of the service header */ + obj_tlen-=4; + + while (obj_tlen >= 4) { + intserv_serv_tlen=EXTRACT_16BITS(obj_tptr+2)<<2; + printf("\n\t Service Type: %s (%u), break bit %s set, Service length: %u", + tok2str(rsvp_intserv_service_type_values,"unknown",*(obj_tptr)), + *(obj_tptr), + (*(obj_tptr+1)&0x80) ? "" : "not", + intserv_serv_tlen); + + obj_tptr+=4; /* get to the start of the parameter list */ + obj_tlen-=4; + + while (intserv_serv_tlen>=4) { + processed = rsvp_intserv_print(obj_tptr, obj_tlen); + if (processed == 0) + break; + obj_tlen-=processed; + intserv_serv_tlen-=processed; + obj_tptr+=processed; + } + } + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_FILTERSPEC: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_IPV4: + if (obj_tlen < 8) + return; + printf("\n\t Source Address: %s, Source Port: %u", + ipaddr_string(obj_tptr), + EXTRACT_16BITS(obj_tptr+6)); + obj_tlen-=8; + obj_tptr+=8; + break; +#ifdef INET6 + case RSVP_CTYPE_IPV6: + if (obj_tlen < 20) + return; + printf("\n\t Source Address: %s, Source Port: %u", + ip6addr_string(obj_tptr), + EXTRACT_16BITS(obj_tptr+18)); + obj_tlen-=20; + obj_tptr+=20; + break; + case RSVP_CTYPE_3: + if (obj_tlen < 20) + return; + printf("\n\t Source Address: %s, Flow Label: %u", + ip6addr_string(obj_tptr), + EXTRACT_24BITS(obj_tptr+17)); + obj_tlen-=20; + obj_tptr+=20; + break; + case RSVP_CTYPE_TUNNEL_IPV6: + if (obj_tlen < 20) + return; + printf("\n\t Source Address: %s, LSP-ID: 0x%04x", + ipaddr_string(obj_tptr), + EXTRACT_16BITS(obj_tptr+18)); + obj_tlen-=20; + obj_tptr+=20; + break; +#endif + case RSVP_CTYPE_TUNNEL_IPV4: + if (obj_tlen < 8) + return; + printf("\n\t Source Address: %s, LSP-ID: 0x%04x", + ipaddr_string(obj_tptr), + EXTRACT_16BITS(obj_tptr+6)); + obj_tlen-=8; + obj_tptr+=8; + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_FASTREROUTE: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_TUNNEL_IPV4: + if (obj_tlen < 16) + return; + bw.i = EXTRACT_32BITS(obj_tptr+4); + printf("\n\t Setup Priority: %u, Holding Priority: %u, Hop-limit: %u, Bandwidth: %.10g Mbps", + (int)*obj_tptr, + (int)*(obj_tptr+1), + (int)*(obj_tptr+2), + bw.f*8/1000000); + printf("\n\t Include Colors: 0x%08x, Exclude Colors: 0x%08x", + EXTRACT_32BITS(obj_tptr+8), + EXTRACT_32BITS(obj_tptr+12)); + obj_tlen-=16; + obj_tptr+=16; + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_DETOUR: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_TUNNEL_IPV4: + while(obj_tlen >= 8) { + printf("\n\t PLR-ID: %s, Avoid-Node-ID: %s", + ipaddr_string(obj_tptr), + ipaddr_string(obj_tptr+4)); + obj_tlen-=8; + obj_tptr+=8; + } + break; + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_ERROR_SPEC: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_3: /* fall through - FIXME add TLV parser */ + case RSVP_CTYPE_IPV4: + if (obj_tlen < 8) + return; + error_code=*(obj_tptr+5); + error_value=EXTRACT_16BITS(obj_tptr+6); + printf("\n\t Error Node Adress: %s, Flags: [0x%02x]\n\t Error Code: %s (%u)", + ipaddr_string(obj_tptr), + *(obj_tptr+4), + tok2str(rsvp_obj_error_code_values,"unknown",error_code), + error_code); + switch (error_code) { + case RSVP_OBJ_ERROR_SPEC_CODE_ROUTING: + printf(", Error Value: %s (%u)", + tok2str(rsvp_obj_error_code_routing_values,"unknown",error_value), + error_value); + break; + default: + printf(", Unknown Error Value (%u)", error_value); + break; + } + obj_tlen-=8; + obj_tptr+=8; + break; +#ifdef INET6 + case RSVP_CTYPE_4: /* fall through - FIXME add TLV parser */ + case RSVP_CTYPE_IPV6: + if (obj_tlen < 20) + return; + error_code=*(obj_tptr+17); + error_value=EXTRACT_16BITS(obj_tptr+18); + printf("\n\t Error Node Adress: %s, Flags: [0x%02x]\n\t Error Code: %s (%u)", + ip6addr_string(obj_tptr), + *(obj_tptr+16), + tok2str(rsvp_obj_error_code_values,"unknown",error_code), + error_code); + + switch (error_code) { + case RSVP_OBJ_ERROR_SPEC_CODE_ROUTING: + printf(", Error Value: %s (%u)", + tok2str(rsvp_obj_error_code_routing_values,"unknown",error_value), + error_value); + break; + default: + break; + } + obj_tlen-=20; + obj_tptr+=20; + break; +#endif + default: + hexdump=TRUE; + } + break; + + case RSVP_OBJ_PROPERTIES: + switch(rsvp_obj_ctype) { + case RSVP_CTYPE_1: + if (obj_tlen < 4) + return; + padbytes = EXTRACT_16BITS(obj_tptr+2); + printf("\n\t TLV count: %u, padding bytes: %u", + EXTRACT_16BITS(obj_tptr), + padbytes); + obj_tlen-=4; + obj_tptr+=4; + /* loop through as long there is anything longer than the TLV header (2) */ + while(obj_tlen >= 2 + padbytes) { + printf("\n\t %s TLV (0x%02x), length: %u", /* length includes header */ + tok2str(rsvp_obj_prop_tlv_values,"unknown",*obj_tptr), + *obj_tptr, + *(obj_tptr+1)); + if (obj_tlen < *(obj_tptr+1)) + return; + print_unknown_data(obj_tptr+2,"\n\t\t",*(obj_tptr+1)-2); + obj_tlen-=*(obj_tptr+1); + obj_tptr+=*(obj_tptr+1); + } + break; + default: + hexdump=TRUE; + } + break; + + /* + * FIXME those are the defined objects that lack a decoder + * you are welcome to contribute code ;-) + */ + + case RSVP_OBJ_INTEGRITY: + case RSVP_OBJ_SCOPE: + case RSVP_OBJ_POLICY_DATA: + case RSVP_OBJ_MESSAGE_ID: + case RSVP_OBJ_MESSAGE_ID_ACK: + case RSVP_OBJ_MESSAGE_ID_LIST: + case RSVP_OBJ_LABEL_SET: + case RSVP_OBJ_ACCEPT_LABEL_SET: + case RSVP_OBJ_PROTECTION: + default: + if (vflag <= 1) + print_unknown_data(obj_tptr,"\n\t ",obj_tlen); + break; + } + /* do we want to see an additionally hexdump ? */ + if (vflag > 1 || hexdump==TRUE) + print_unknown_data(tptr+sizeof(sizeof(struct rsvp_object_header)),"\n\t ", + rsvp_obj_len-sizeof(struct rsvp_object_header)); + + tptr+=rsvp_obj_len; + tlen-=rsvp_obj_len; + } + return; +trunc: + printf("\n\t\t packet exceeded snapshot"); +} diff --git a/dist/tcpdump/print-sunatm.c b/dist/tcpdump/print-sunatm.c new file mode 100644 index 000000000000..c5858ee14331 --- /dev/null +++ b/dist/tcpdump/print-sunatm.c @@ -0,0 +1,119 @@ +/* $NetBSD: print-sunatm.c,v 1.1.1.1 2004/09/27 17:07:30 dyoung Exp $ */ + +/* + * Copyright (c) 1997 Yen Yen Lim and North Dakota State University + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Yen Yen Lim and + North Dakota State University + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef lint +static const char rcsid[] _U_ = + "@(#) Header: /tcpdump/master/tcpdump/print-sunatm.c,v 1.5.2.2 2003/11/16 08:51:47 guy Exp (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +struct mbuf; +struct rtentry; + +#include +#include + +#include "interface.h" +#include "extract.h" +#include "addrtoname.h" + +#include "atm.h" +#include "atmuni31.h" + +/* SunATM header for ATM packet */ +#define DIR_POS 0 /* Direction (0x80 = transmit, 0x00 = receive) */ +#define VPI_POS 1 /* VPI */ +#define VCI_POS 2 /* VCI */ +#define PKT_BEGIN_POS 4 /* Start of the ATM packet */ + +/* Protocol type values in the bottom for bits of the byte at SUNATM_DIR_POS. */ +#define PT_LANE 0x01 /* LANE */ +#define PT_LLC 0x02 /* LLC encapsulation */ + +/* + * This is the top level routine of the printer. 'p' points + * to the SunATM pseudo-header for the packet, 'h->ts' is the timestamp, + * 'h->length' is the length of the packet off the wire, and 'h->caplen' + * is the number of bytes actually captured. + */ +u_int +sunatm_if_print(const struct pcap_pkthdr *h, const u_char *p) +{ + u_int caplen = h->caplen; + u_int length = h->len; + u_short vci; + u_char vpi; + u_int traftype; + + if (caplen < PKT_BEGIN_POS) { + printf("[|atm]"); + return (caplen); + } + + if (eflag) { + if (p[DIR_POS] & 0x80) + printf("Tx: "); + else + printf("Rx: "); + } + + switch (p[DIR_POS] & 0x0f) { + + case PT_LANE: + traftype = ATM_LANE; + break; + + case PT_LLC: + traftype = ATM_LLC; + break; + + default: + traftype = ATM_UNKNOWN; + break; + } + + vci = EXTRACT_16BITS(&p[VCI_POS]); + vpi = p[VPI_POS]; + + p += PKT_BEGIN_POS; + caplen -= PKT_BEGIN_POS; + length -= PKT_BEGIN_POS; + atm_print(vpi, vci, traftype, p, length, caplen); + + return (PKT_BEGIN_POS); +} diff --git a/dist/tcpdump/sctpConstants.h b/dist/tcpdump/sctpConstants.h index d4ccba1ea359..33274632ebb9 100644 --- a/dist/tcpdump/sctpConstants.h +++ b/dist/tcpdump/sctpConstants.h @@ -1,6 +1,6 @@ -/* $NetBSD: sctpConstants.h,v 1.1.1.2 2002/02/18 09:09:02 itojun Exp $ */ +/* $NetBSD: sctpConstants.h,v 1.1.1.3 2004/09/27 17:07:33 dyoung Exp $ */ -/* @(#) Header: /tcpdump/master/tcpdump/sctpConstants.h,v 1.2 2001/06/28 10:17:22 guy Exp (LBL) */ +/* @(#) Header: /tcpdump/master/tcpdump/sctpConstants.h,v 1.4 2003/06/03 23:49:23 guy Exp (LBL) */ /* SCTP reference Implementation Copyright (C) 1999 Cisco And Motorola * @@ -33,14 +33,14 @@ * * This file is part of the SCTP reference Implementation * - * + * * Please send any bug reports or fixes you make to one of the following email * addresses: - * + * * rstewar1@email.mot.com * kmorneau@cisco.com * qxie1@email.mot.com - * + * * Any bugs reported given to us we will try to fix... any fixes shared will * be incorperated into the next SCTP release. */ @@ -60,7 +60,7 @@ */ /*#define USE_MD5 1*/ -/* the SCTP protocol signature +/* the SCTP protocol signature * this includes the version number * encoded in the last 4 bits of the * signature. @@ -84,7 +84,7 @@ /* default max I can burst out after a fast retransmit */ #define SCTP_DEF_MAX_BURST 4 -/* Packet transmit states in the sent +/* Packet transmit states in the sent * field in the SCTP_transmitOnQueue struct */ #define SCTP_DATAGRAM_UNSENT 0 @@ -108,8 +108,8 @@ #define SCTP_DATA 0x00 #define SCTP_INITIATION 0x01 #define SCTP_INITIATION_ACK 0x02 -#define SCTP_SELECTIVE_ACK 0x03 -#define SCTP_HEARTBEAT_REQUEST 0x04 +#define SCTP_SELECTIVE_ACK 0x03 +#define SCTP_HEARTBEAT_REQUEST 0x04 #define SCTP_HEARTBEAT_ACK 0x05 #define SCTP_ABORT_ASSOCIATION 0x06 #define SCTP_SHUTDOWN 0x07 @@ -241,7 +241,7 @@ #define SCTP_STARTING_MAPARRAY 10000 /* Here we define the timer types used - * by the implementation has + * by the implementation has * arguments in the set/get timer type calls. */ #define SCTP_TIMER_INIT 0 @@ -250,7 +250,7 @@ #define SCTP_TIMER_SHUTDOWN 3 #define SCTP_TIMER_HEARTBEAT 4 #define SCTP_TIMER_PMTU 5 -/* number of timer types in the base SCTP +/* number of timer types in the base SCTP * structure used in the set/get and has * the base default. */ @@ -354,7 +354,7 @@ /* Events that SCTP will look for, these * are or'd together to declare what SCTP - * wants. Each select mask/poll list should be + * wants. Each select mask/poll list should be * set for the fd, if the bit is on. */ #define SCTP_EVENT_READ 0x000001 @@ -363,7 +363,7 @@ /* The following constant is a value for this * particular implemenation. It is quite arbitrary and - * is used to limit how much data will be queued up to + * is used to limit how much data will be queued up to * a sender, waiting for cwnd to be larger than flightSize. * All implementations will need this protection is some * way due to buffer size constraints. @@ -373,9 +373,9 @@ -/* This constant (SCTP_MAX_READBUFFER) define +/* This constant (SCTP_MAX_READBUFFER) define * how big the read/write buffer is - * when we enter the fd event notification + * when we enter the fd event notification * the buffer is put on the stack, so the bigger * it is the more stack you chew up, however it * has got to be big enough to handle the bigest @@ -394,7 +394,7 @@ #define SCTP_MIN_RWND 1500 #define SCTP_WINDOW_MIN 1500 /* smallest rwnd can be */ -#define SCTP_WINDOW_MAX 1048576 /* biggest I can grow rwnd to +#define SCTP_WINDOW_MAX 1048576 /* biggest I can grow rwnd to * My playing around suggests a * value greater than 64k does not * do much, I guess via the kernel @@ -413,7 +413,7 @@ * size to. This governs what is the * largest size we will use, of course * PMTU will raise this up to - * the largest interface MTU or the + * the largest interface MTU or the * ceiling below if there is no * SIOCGIFMTU. */ @@ -516,11 +516,6 @@ #define SCTP_DEAMON_PORT 9899 - -#ifndef IPPROTO_SCTP -#define IPPROTO_SCTP 132 /* the Official IANA number :-) */ -#endif - /* Deamon registration message types/responses */ #define DEAMON_REGISTER 0x01 #define DEAMON_REGISTER_ACK 0x02 @@ -544,7 +539,7 @@ { \ (ts)->tv_sec = (tv)->tv_sec; \ (ts)->tv_nsec = (tv)->tv_usec * 1000; \ -} +} #endif /* pegs */ diff --git a/dist/tcpdump/sctpHeader.h b/dist/tcpdump/sctpHeader.h index e9f5043976c2..cc6cf1fcd9e9 100644 --- a/dist/tcpdump/sctpHeader.h +++ b/dist/tcpdump/sctpHeader.h @@ -1,6 +1,6 @@ -/* $NetBSD: sctpHeader.h,v 1.1.1.2 2002/02/18 09:09:04 itojun Exp $ */ +/* $NetBSD: sctpHeader.h,v 1.1.1.3 2004/09/27 17:07:34 dyoung Exp $ */ -/* @(#) Header: /tcpdump/master/tcpdump/sctpHeader.h,v 1.3 2001/08/01 03:34:00 guy Exp (LBL) */ +/* @(#) Header: /tcpdump/master/tcpdump/sctpHeader.h,v 1.6 2002/12/11 07:14:11 guy Exp (LBL) */ /* SCTP reference Implementation Copyright (C) 1999 Cisco And Motorola * @@ -33,14 +33,14 @@ * * This file is part of the SCTP reference Implementation * - * + * * Please send any bug reports or fixes you make to one of the following email * addresses: - * + * * rstewar1@email.mot.com * kmorneau@cisco.com * qxie1@email.mot.com - * + * * Any bugs reported given to us we will try to fix... any fixes shared will * be incorperated into the next SCTP release. */ @@ -59,39 +59,39 @@ extern "C" { #ifdef TRU64 #define _64BITS 1 -#endif +#endif struct sctpHeader{ - u_short source; - u_short destination; - u_int verificationTag; - u_int adler32; + u_int16_t source; + u_int16_t destination; + u_int32_t verificationTag; + u_int32_t adler32; }; /* various descriptor parsers */ struct sctpChunkDesc{ - u_char chunkID; - u_char chunkFlg; - u_short chunkLength; + u_int8_t chunkID; + u_int8_t chunkFlg; + u_int16_t chunkLength; }; struct sctpParamDesc{ - u_short paramType; - u_short paramLength; + u_int16_t paramType; + u_int16_t paramLength; }; struct sctpRelChunkDesc{ struct sctpChunkDesc chk; - u_int serialNumber; + u_int32_t serialNumber; }; struct sctpVendorSpecificParam { struct sctpParamDesc p; /* type must be 0xfffe */ - u_int vendorId; /* vendor ID from RFC 1700 */ - u_short vendorSpecificType; - u_short vendorSpecificLen; + u_int32_t vendorId; /* vendor ID from RFC 1700 */ + u_int16_t vendorSpecificType; + u_int16_t vendorSpecificLen; }; @@ -103,55 +103,55 @@ struct sctpVendorSpecificParam { /* this is used for init ack, too */ struct sctpInitiation{ - u_int initTag; /* tag of mine */ - u_int rcvWindowCredit; /* rwnd */ - u_short NumPreopenStreams; /* OS */ - u_short MaxInboundStreams; /* MIS */ - u_int initialTSN; + u_int32_t initTag; /* tag of mine */ + u_int32_t rcvWindowCredit; /* rwnd */ + u_int16_t NumPreopenStreams; /* OS */ + u_int16_t MaxInboundStreams; /* MIS */ + u_int32_t initialTSN; /* optional param's follow in sctpParamDesc form */ }; struct sctpV4IpAddress{ struct sctpParamDesc p; /* type is set to SCTP_IPV4_PARAM_TYPE, len=10 */ - u_int ipAddress; + u_int32_t ipAddress; }; struct sctpV6IpAddress{ struct sctpParamDesc p; /* type is set to SCTP_IPV6_PARAM_TYPE, len=22 */ - u_char ipAddress[16]; + u_int8_t ipAddress[16]; }; struct sctpDNSName{ struct sctpParamDesc param; - u_char name[1]; + u_int8_t name[1]; }; struct sctpCookiePreserve{ struct sctpParamDesc p; /* type is set to SCTP_COOKIE_PRESERVE, len=8 */ - u_int extraTime; + u_int32_t extraTime; }; struct sctpTimeStamp{ - u_int ts_sec; - u_int ts_usec; + u_int32_t ts_sec; + u_int32_t ts_usec; }; /* wire structure of my cookie */ struct cookieMessage{ - u_int TieTag_curTag; /* copied from assoc if present */ - u_int TieTag_hisTag; /* copied from assoc if present */ - int cookieLife; /* life I will award this cookie */ + u_int32_t TieTag_curTag; /* copied from assoc if present */ + u_int32_t TieTag_hisTag; /* copied from assoc if present */ + int32_t cookieLife; /* life I will award this cookie */ struct sctpTimeStamp timeEnteringState; /* the time I built cookie */ struct sctpInitiation initAckISent; /* the INIT-ACK that I sent to my peer */ - u_int addressWhereISent[4]; /* I make this 4 ints so I get 128bits for future */ - int addrtype; /* address type */ - u_short locScope; /* V6 local scope flag */ - u_short siteScope; /* V6 site scope flag */ + u_int32_t addressWhereISent[4]; /* I make this 4 ints so I get 128bits for future */ + int32_t addrtype; /* address type */ + u_int16_t locScope; /* V6 local scope flag */ + u_int16_t siteScope; /* V6 site scope flag */ /* at the end is tacked on the INIT chunk sent in - * its entirety and of course our + * its entirety and of course our * signature. */ }; @@ -173,23 +173,23 @@ struct sctpSendableInit{ }; -/* Selective Acknowledgement +/* Selective Acknowledgement * has the following structure with * a optional ammount of trailing int's - * on the last part (based on the numberOfDesc + * on the last part (based on the numberOfDesc * field). */ struct sctpSelectiveAck{ - u_int highestConseqTSN; - u_int updatedRwnd; - u_short numberOfdesc; - u_short numDupTsns; + u_int32_t highestConseqTSN; + u_int32_t updatedRwnd; + u_int16_t numberOfdesc; + u_int16_t numDupTsns; }; struct sctpSelectiveFrag{ - u_short fragmentStart; - u_short fragmentEnd; + u_int16_t fragmentStart; + u_int16_t fragmentEnd; }; @@ -199,12 +199,12 @@ struct sctpUnifiedSack{ }; /* for both RTT request/response the - * following is sent + * following is sent */ struct sctpHBrequest { - u_int time_value_1; - u_int time_value_2; + u_int32_t time_value_1; + u_int32_t time_value_2; }; /* here is what I read and respond with to. */ @@ -219,13 +219,13 @@ struct sctpHBsender{ struct sctpChunkDesc hdr; struct sctpParamDesc hb; struct sctpHBrequest rtt; - char addrFmt[SCTP_ADDRMAX]; - unsigned short userreq; + int8_t addrFmt[SCTP_ADDRMAX]; + u_int16_t userreq; }; - -/* for the abort and shutdown ACK + +/* for the abort and shutdown ACK * we must carry the init tag in the common header. Just the * common header is all that is needed with a chunk descriptor. */ @@ -241,15 +241,15 @@ struct sctpUnifiedAbortLight{ struct sctpUnifiedAbortHeavy{ struct sctpHeader mh; struct sctpChunkDesc uh; - unsigned short causeCode; - unsigned short causeLen; + u_int16_t causeCode; + u_int16_t causeLen; }; /* For the graceful shutdown we must carry * the tag (in common header) and the highest consequitive acking value */ struct sctpShutdown { - u_int TSN_Seen; + u_int32_t TSN_Seen; }; struct sctpUnifiedShutdown{ @@ -262,8 +262,8 @@ struct sctpUnifiedShutdown{ * that is defined as a operation error. */ struct sctpOpErrorCause{ - u_short cause; - u_short causeLen; + u_int16_t cause; + u_int16_t causeLen; }; struct sctpUnifiedOpError{ @@ -275,15 +275,15 @@ struct sctpUnifiedStreamError{ struct sctpHeader mh; struct sctpChunkDesc uh; struct sctpOpErrorCause c; - u_short strmNum; - u_short reserved; + u_int16_t strmNum; + u_int16_t reserved; }; struct staleCookieMsg{ struct sctpHeader mh; struct sctpChunkDesc uh; struct sctpOpErrorCause c; - u_int moretime; + u_int32_t moretime; }; /* the following is used in all sends @@ -296,10 +296,10 @@ struct sctpUnifiedSingleMsg{ }; struct sctpDataPart{ - u_int TSN; - u_short streamId; - u_short sequence; - u_int payloadtype; + u_int32_t TSN; + u_int16_t streamId; + u_int16_t sequence; + u_int32_t payloadtype; }; struct sctpUnifiedDatagram{ @@ -309,14 +309,14 @@ struct sctpUnifiedDatagram{ struct sctpECN_echo{ struct sctpChunkDesc uh; - u_int Lowest_TSN; -}; + u_int32_t Lowest_TSN; +}; struct sctpCWR{ struct sctpChunkDesc uh; - u_int TSN_reduced_at; -}; + u_int32_t TSN_reduced_at; +}; #ifdef __cplusplus } diff --git a/dist/tcpdump/smb.h b/dist/tcpdump/smb.h index 0231196bd275..4db8d70dc524 100644 --- a/dist/tcpdump/smb.h +++ b/dist/tcpdump/smb.h @@ -1,7 +1,7 @@ -/* $NetBSD: smb.h,v 1.1.1.2 2002/02/18 09:09:06 itojun Exp $ */ +/* $NetBSD: smb.h,v 1.1.1.3 2004/09/27 17:07:35 dyoung Exp $ */ -/* @(#) Header: /tcpdump/master/tcpdump/smb.h,v 1.7 2002/01/17 04:38:29 guy Exp (LBL) */ -/* +/* @(#) Header: /tcpdump/master/tcpdump/smb.h,v 1.8 2002/06/11 17:09:00 itojun Exp (LBL) */ +/* * Copyright (C) Andrew Tridgell 1995-1999 * * This software may be distributed either under the terms of the diff --git a/dist/tcpdump/tcpdump-stdinc.h b/dist/tcpdump/tcpdump-stdinc.h new file mode 100644 index 000000000000..ac4c7a711bfb --- /dev/null +++ b/dist/tcpdump/tcpdump-stdinc.h @@ -0,0 +1,130 @@ +/* $NetBSD: tcpdump-stdinc.h,v 1.1.1.1 2004/09/27 17:07:36 dyoung Exp $ */ + +/* + * Copyright (c) 2002 - 2003 + * NetGroup, Politecnico di Torino (Italy) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Politecnico di Torino nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @(#) Header: /tcpdump/master/tcpdump/tcpdump-stdinc.h,v 1.7.2.1 2003/11/16 09:57:50 guy Exp (LBL) + */ + +/* + * Include the appropriate OS header files on Windows and various flavors + * of UNIX, and also define some additional items and include various + * non-OS header files on Windows, and; this isolates most of the platform + * differences to this one file. + */ + +#ifndef tcpdump_stdinc_h +#define tcpdump_stdinc_h + +#ifdef WIN32 + +#include +#include +#include "bittypes.h" +#include +#include +#include +#include "IP6_misc.h" +#include + +#ifdef __MINGW32__ +#include +int* _errno(); +#define errno (*_errno()) + +#define INET_ADDRSTRLEN 16 +#define INET6_ADDRSTRLEN 46 + +#endif /* __MINGW32__ */ + +#ifndef toascii +#define toascii(c) ((c) & 0x7f) +#endif + +#ifndef caddr_t +typedef char* caddr_t; +#endif /* caddr_t */ + +#define MAXHOSTNAMELEN 64 +#define NI_MAXHOST 1025 +#define snprintf _snprintf +#define vsnprintf _vsnprintf +#define RETSIGTYPE void + +#if !defined(__MINGW32__) && !defined(__WATCOMC__) +#undef toascii +#define isascii __isascii +#define toascii __toascii +#define stat _stat +#define open _open +#define fstat _fstat +#define read _read +#define O_RDONLY _O_RDONLY + +typedef short ino_t; +#endif /* __MINGW32__ */ + +#else /* WIN32 */ + +#include +#include +#include +#include +#include /* concession to AIX */ +#include +#include +#include + +#ifdef TIME_WITH_SYS_TIME +#include +#endif + +#include + +#endif /* WIN32 */ + +#ifdef INET6 +#include "ip6.h" +#endif + +#if defined(WIN32) || defined(MSDOS) + #define FOPEN_READ_TXT "rt" + #define FOPEN_READ_BIN "rb" + #define FOPEN_WRITE_TXT "wt" + #define FOPEN_WRITE_BIN "wb" +#else + #define FOPEN_READ_TXT "r" + #define FOPEN_READ_BIN FOPEN_READ_TXT + #define FOPEN_WRITE_TXT "w" + #define FOPEN_WRITE_BIN FOPEN_WRITE_TXT +#endif + +#endif /* tcpdump_stdinc_h */ diff --git a/dist/tcpdump/token.h b/dist/tcpdump/token.h index c4d8fbc3e41f..48ffb6f7ed30 100644 --- a/dist/tcpdump/token.h +++ b/dist/tcpdump/token.h @@ -1,6 +1,6 @@ -/* $NetBSD: token.h,v 1.1.1.1 2001/06/25 19:26:41 itojun Exp $ */ +/* $NetBSD: token.h,v 1.1.1.2 2004/09/27 17:07:36 dyoung Exp $ */ -/* @(#) Header: /tcpdump/master/tcpdump/token.h,v 1.3 2000/10/03 02:55:03 itojun Exp (LBL) */ +/* @(#) Header: /tcpdump/master/tcpdump/token.h,v 1.6 2002/12/11 07:14:12 guy Exp (LBL) */ /* * Copyright (c) 1998, Larry Lile * All rights reserved. @@ -42,7 +42,7 @@ #define LARGEST_FRAME(trp) ((ntohs((trp)->token_rcf) & 0x0070) >> 4) #define RING_NUMBER(trp, x) ((ntohs((trp)->token_rseg[x]) & 0xfff0) >> 4) #define BRIDGE_NUMBER(trp, x) ((ntohs((trp)->token_rseg[x]) & 0x000f)) -#define SEGMENT_COUNT(trp) ((RIF_LENGTH(trp) - 2) / 2) +#define SEGMENT_COUNT(trp) ((int)((RIF_LENGTH(trp) - 2) / 2)) struct token_header { u_int8_t token_ac;