Browse Source

Import upstream version 3.4.1

Aaron Turner 11 years ago
parent
commit
1bb6d0e15f
100 changed files with 32274 additions and 30117 deletions
  1. BIN
      ._configure.ac
  2. 5 6
      Makefile.am
  3. 20 15
      Makefile.in
  4. 5839 5067
      aclocal.m4
  5. 10 6
      autogen.sh
  6. 543 355
      config/config.guess
  7. 309 92
      config/config.sub
  8. 7512 5396
      config/ltmain.sh
  9. 13712 16666
      configure
  10. 210 244
      configure.ac
  11. BIN
      docs/._CHANGELOG
  12. 38 1
      docs/CHANGELOG
  13. 11 1
      docs/CREDIT
  14. 13 16
      docs/Makefile.am
  15. 29 23
      docs/Makefile.in
  16. 17 10
      lib/Makefile.in
  17. 17 14
      libopts/Makefile.am
  18. 34 24
      libopts/Makefile.in
  19. 129 0
      libopts/ag-char-map.h
  20. 55 23
      libopts/autoopts.c
  21. 8 6
      libopts/autoopts.h
  22. 202 130
      libopts/autoopts/options.h
  23. 176 139
      libopts/autoopts/usage-txt.h
  24. 12 3
      libopts/boolean.c
  25. 13 3
      libopts/compat/compat.h
  26. 171 201
      libopts/configfile.c
  27. 33 70
      libopts/cook.c
  28. 104 66
      libopts/enumeration.c
  29. 4 3
      libopts/environment.c
  30. 170 0
      libopts/file.c
  31. 62 56
      libopts/genshell.c
  32. 37 18
      libopts/genshell.h
  33. 8 0
      libopts/libopts.c
  34. 17 16
      libopts/load.c
  35. 36 10
      libopts/m4/libopts.m4
  36. 7 6
      libopts/makeshell.c
  37. 202 69
      libopts/nested.c
  38. 105 10
      libopts/numeric.c
  39. 582 0
      libopts/parse-duration.c
  40. 82 0
      libopts/parse-duration.h
  41. 10 3
      libopts/pgusage.c
  42. 29 8
      libopts/proto.h
  43. 26 17
      libopts/putshell.c
  44. 128 0
      libopts/reset.c
  45. 3 2
      libopts/restore.c
  46. 388 86
      libopts/save.c
  47. 4 3
      libopts/sort.c
  48. 27 8
      libopts/stack.c
  49. 6 3
      libopts/streqvcmp.c
  50. 3 2
      libopts/text_mmap.c
  51. 89 0
      libopts/time.c
  52. 11 11
      libopts/tokenize.c
  53. 32 15
      libopts/usage.c
  54. 123 0
      libopts/value-type.c
  55. 25 0
      libopts/value-type.h
  56. 7 10
      libopts/version.c
  57. 114 0
      libopts/xat-attribute.c
  58. 22 0
      libopts/xat-attribute.h
  59. 0 6
      scripts/Makefile.am
  60. 35 139
      scripts/Makefile.in
  61. 0 628
      scripts/man2html.c
  62. BIN
      src/._Makefile.am
  63. BIN
      src/._bridge.c
  64. BIN
      src/._send_packets.c
  65. BIN
      src/._sleep.c
  66. BIN
      src/._tcpbridge.c
  67. BIN
      src/._tcpbridge.h
  68. BIN
      src/._tcpprep.c
  69. BIN
      src/._tcpreplay.c
  70. BIN
      src/._tcpreplay.h
  71. BIN
      src/._tcpreplay_opts.def
  72. BIN
      src/._tree.c
  73. 28 29
      src/Makefile.am
  74. 140 74
      src/Makefile.in
  75. 246 88
      src/bridge.c
  76. 3 2
      src/bridge.h
  77. BIN
      src/common/._cidr.c
  78. BIN
      src/common/._dlt_names.h
  79. BIN
      src/common/._fakepoll.c
  80. BIN
      src/common/._fakepoll.h
  81. BIN
      src/common/._interface.c
  82. BIN
      src/common/._interface.h
  83. BIN
      src/common/._sendpacket.c
  84. 1 1
      src/common/Makefile.am
  85. 18 11
      src/common/Makefile.in
  86. 16 16
      src/common/cache.c
  87. 2 2
      src/common/cidr.c
  88. 3 74
      src/common/err.c
  89. 44 26
      src/common/err.h
  90. 3 3
      src/common/fakepcapnav.c
  91. 3 4
      src/common/get.c
  92. 8 3
      src/common/interface.c
  93. 2 2
      src/common/list.c
  94. 93 47
      src/common/sendpacket.c
  95. 22 3
      src/common/sendpacket.h
  96. 4 4
      src/common/services.c
  97. 1 1
      src/common/svn_version.c
  98. 19 19
      src/common/tcpdump.c
  99. 2 2
      src/common/timer.c
  100. 0 0
      src/common/timer.h

BIN
._configure.ac


+ 5 - 6
Makefile.am

@@ -1,6 +1,8 @@
 # $Id$
 AUTOMAKE_OPTIONS = foreign
 
+ACLOCAL_AMFLAGS = -I m4
+
 if NEED_LIBOPTS
 SUBDIRS = scripts lib $(LIBOPTS_DIR) src
 else
@@ -18,8 +20,8 @@ update:
 
 DOCS_DIR = $(top_builddir)/docs
 
-man2html:
-	cd scripts && make man2html
+manpages:
+	cd src && make manpages
 
 docs: manpages
 	echo Making docs in $(DOCS_DIR)
@@ -28,12 +30,9 @@ docs: manpages
 clean-docs:
 	cd $(DOCS_DIR) && make clean-docs
 
-postweb: manpages doxygen
+postweb: docs doxygen
 	cd $(DOCS_DIR) && make postweb
 
-manpages: man2html
-	cd src && make manpages
-
 TEST_DIR = $(top_builddir)/test
 
 autoopts:

+ 20 - 15
Makefile.in

@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -40,7 +40,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	config/install-sh config/ltmain.sh config/missing \
 	config/mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -95,20 +96,22 @@ DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DMALLOC_LIB = @DMALLOC_LIB@
 DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
 GREP = @GREP@
+GROFF = @GROFF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LDNETINC = @LDNETINC@
 LDNETLIB = @LDNETLIB@
@@ -118,10 +121,9 @@ LIBOPTS_DIR = @LIBOPTS_DIR@
 LIBOPTS_LDADD = @LIBOPTS_LDADD@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LNAVLIB = @LNAVLIB@
 LNAV_CFLAGS = @LNAV_CFLAGS@
-LNETINC = @LNETINC@
-LNETLIB = @LNETLIB@
 LN_S = @LN_S@
 LPCAPINC = @LPCAPINC@
 LPCAPLIB = @LPCAPLIB@
@@ -129,8 +131,12 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NM = @NM@
 NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -154,7 +160,7 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -186,6 +192,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 nic1 = @nic1@
@@ -212,6 +219,7 @@ top_srcdir = @top_srcdir@
 
 # $Id$
 AUTOMAKE_OPTIONS = foreign
+ACLOCAL_AMFLAGS = -I m4
 @NEED_LIBOPTS_FALSE@SUBDIRS = scripts lib src
 @NEED_LIBOPTS_TRUE@SUBDIRS = scripts lib $(LIBOPTS_DIR) src
 DIST_SUBDIRS = scripts lib libopts src docs test
@@ -267,7 +275,7 @@ clean-libtool:
 	-rm -rf .libs _libs
 
 distclean-libtool:
-	-rm -f libtool
+	-rm -f libtool config.lt
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -344,7 +352,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
@@ -666,8 +674,8 @@ dist-hook: version manpages update
 update:
 	svn update
 
-man2html:
-	cd scripts && make man2html
+manpages:
+	cd src && make manpages
 
 docs: manpages
 	echo Making docs in $(DOCS_DIR)
@@ -676,12 +684,9 @@ docs: manpages
 clean-docs:
 	cd $(DOCS_DIR) && make clean-docs
 
-postweb: manpages doxygen
+postweb: docs doxygen
 	cd $(DOCS_DIR) && make postweb
 
-manpages: man2html
-	cd src && make manpages
-
 autoopts:
 	cd src && make autoopts
 

File diff suppressed because it is too large
+ 5839 - 5067
aclocal.m4


+ 10 - 6
autogen.sh

@@ -1,10 +1,14 @@
 #!/bin/sh
-
+rm -f config/config.guess config/config.sub config/ltmain.sh 2>/dev/null
 rm -f aclocal.m4 2>/dev/null
-aclocal 
-# aclocal doesn't pick up libopts.m4 so we do it manually
-cat libopts/m4/libopts.m4 libopts/m4/liboptschk.m4  >> aclocal.m4
-autoconf
-automake
+aclocal  -I libopts/m4/
+if test -x "`which libtoolize`" ; then
+    libtoolize --copy
+else
+    # Necessary under OS X
+    glibtoolize --copy
+fi
+autoheader
+automake --add-missing --copy
 autoconf
 

File diff suppressed because it is too large
+ 543 - 355
config/config.guess


+ 309 - 92
config/config.sub

@@ -1,9 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
 
-timestamp='2002-07-03'
+timestamp='2008-09-08'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,14 +22,15 @@ timestamp='2002-07-03'
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # 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 <config-patches@gnu.org>.  Submit a context
 # diff and a properly formatted ChangeLog entry.
 #
@@ -70,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-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, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -83,11 +85,11 @@ Try \`$me --help' for more information."
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -99,7 +101,7 @@ while test $# -gt 0 ; do
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit 0;;
+       exit ;;
 
     * )
        break ;;
@@ -118,7 +120,9 @@ 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* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | 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/'`
     ;;
@@ -144,7 +148,7 @@ case $os in
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis)
+	-apple | -axis | -knuth | -cray)
 		os=
 		basic_machine=$1
 		;;
@@ -169,6 +173,10 @@ case $os in
 	-hiux*)
 		os=-hiuxwe2
 		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco5)
 		os=-sco3.2v5
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -185,6 +193,10 @@ case $os in
 		# Don't forget version if it is 3.2v4 or newer.
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco*)
 		os=-sco3.2v2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -228,40 +240,55 @@ case $basic_machine in
 	| a29k \
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| fr30 | frv \
+	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
-	| ip2k \
-	| m32r | m68000 | m68k | m88k | mcore \
+	| ip2k | iq2000 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
 	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
 	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| mt \
+	| msp430 \
+	| nios | nios2 \
 	| ns16k | ns32k \
-	| openrisc | or32 \
+	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
-	| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
-	| strongarm \
-	| tahoe | thumb | tic80 | tron \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu | strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xscale | xstormy16 | xtensa \
-	| z8k)
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
 	m6811 | m68hc11 | m6812 | m68hc12)
@@ -271,6 +298,9 @@ case $basic_machine in
 		;;
 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
 
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
@@ -290,48 +320,66 @@ case $basic_machine in
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* \
-	| bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c54x-* \
-	| clipper-* | cydra-* \
+	| avr-* | avr32-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* \
-	| m32r-* \
+	| ip2k-* | iq2000-* \
+	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
 	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipstx39 | mipstx39el \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nios-* | nios2-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
 	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
-	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+	| tron-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-	| xtensa-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa*-* \
 	| ymp-* \
-	| z8k-*)
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -349,6 +397,9 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
 	adobe68k)
 		basic_machine=m68010-adobe
 		os=-scout
@@ -363,6 +414,12 @@ case $basic_machine in
 		basic_machine=a29k-none
 		os=-bsd
 		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	amdahl)
 		basic_machine=580-amdahl
 		os=-sysv
@@ -394,10 +451,22 @@ case $basic_machine in
 		basic_machine=ns32k-sequent
 		os=-dynix
 		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
+        cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -422,12 +491,27 @@ case $basic_machine in
 		basic_machine=j90-cray
 		os=-unicos
 		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
 	cris | cris-* | etrax*)
 		basic_machine=cris-axis
 		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
@@ -450,6 +534,14 @@ case $basic_machine in
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
 	dpx20 | dpx20-*)
 		basic_machine=rs6000-bull
 		os=-bosx
@@ -600,6 +692,14 @@ case $basic_machine in
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	m88k-omron*)
 		basic_machine=m88k-omron
 		;;
@@ -615,6 +715,10 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-mingw32
 		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
@@ -628,10 +732,6 @@ case $basic_machine in
 	mips3*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 		;;
-	mmix*)
-		basic_machine=mmix-knuth
-		os=-mmixware
-		;;
 	monitor)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -644,6 +744,9 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-msdos
 		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
@@ -719,9 +822,12 @@ case $basic_machine in
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
-	or32 | or32-*)
+	openrisc | openrisc-*)
 		basic_machine=or32-unknown
-		os=-coff
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
 		;;
 	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
@@ -739,55 +845,75 @@ case $basic_machine in
 		basic_machine=i860-intel
 		os=-osf
 		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	pbd)
 		basic_machine=sparc-tti
 		;;
 	pbb)
 		basic_machine=m68k-tti
 		;;
-        pc532 | pc532-*)
+	pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	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
 		;;
+	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/^[^-]*-//'`
 		;;
@@ -798,6 +924,10 @@ case $basic_machine in
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
 	rom68k)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -818,6 +948,20 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
 	sequent)
 		basic_machine=i386-sequent
 		;;
@@ -825,6 +969,12 @@ case $basic_machine in
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
 	sparclite-wrs | simso-wrs)
 		basic_machine=sparclite-wrs
 		os=-vxworks
@@ -883,7 +1033,7 @@ case $basic_machine in
 	sun386 | sun386i | roadrunner)
 		basic_machine=i386-sun
 		;;
-        sv1)
+	sv1)
 		basic_machine=sv1-cray
 		os=-unicos
 		;;
@@ -891,10 +1041,6 @@ case $basic_machine in
 		basic_machine=i386-sequent
 		os=-dynix
 		;;
-	t3d)
-		basic_machine=alpha-cray
-		os=-unicos
-		;;
 	t3e)
 		basic_machine=alphaev5-cray
 		os=-unicos
@@ -907,6 +1053,18 @@ case $basic_machine in
 		basic_machine=tic54x-unknown
 		os=-coff
 		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tile*)
+		basic_machine=tile-unknown
+		os=-linux-gnu
+		;;
 	tx39)
 		basic_machine=mipstx39-unknown
 		;;
@@ -920,6 +1078,10 @@ case $basic_machine in
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
 	udi29k)
 		basic_machine=a29k-amd
 		os=-udi
@@ -941,8 +1103,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
@@ -963,11 +1125,11 @@ case $basic_machine in
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
-	windows32)
-		basic_machine=i386-pc
-		os=-windows32-msvcrt
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
 		;;
-        xps | xps100)
+	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
 	ymp)
@@ -978,6 +1140,10 @@ case $basic_machine in
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -997,6 +1163,9 @@ case $basic_machine in
 	romp)
 		basic_machine=romp-ibm
 		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
 	rs6000)
 		basic_machine=rs6000-ibm
 		;;
@@ -1013,16 +1182,13 @@ case $basic_machine in
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
+	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparc | sparcv9 | sparcv9b)
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
 		basic_machine=sparc-sun
 		;;
-        cydra)
+	cydra)
 		basic_machine=cydra-cydrome
 		;;
 	orion)
@@ -1037,10 +1203,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.
 		;;
@@ -1096,18 +1258,23 @@ case $os in
 	      | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1119,16 +1286,21 @@ 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* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
 		os=`echo $os | sed -e 's|mac|macos|'`
 		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
 	-linux*)
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 		;;
@@ -1141,6 +1313,9 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
+        -os400*)
+		os=-os400
+		;;
 	-wince*)
 		os=-wince
 		;;
@@ -1162,6 +1337,9 @@ case $os in
 	-atheos*)
 		os=-atheos
 		;;
+	-syllable*)
+		os=-syllable
+		;;
 	-386bsd)
 		os=-bsd
 		;;
@@ -1172,7 +1350,7 @@ case $os in
 		os=-rtmk-nova
 		;;
 	-ns2 )
-	        os=-nextstep2
+		os=-nextstep2
 		;;
 	-nsk*)
 		os=-nsk
@@ -1184,6 +1362,9 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
+        -tpf*)
+		os=-tpf
+		;;
 	-triton*)
 		os=-sysv3
 		;;
@@ -1211,8 +1392,20 @@ 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
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
 		;;
 	-none)
 		;;
@@ -1236,6 +1429,12 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
+        score-*)
+		os=-elf
+		;;
+        spu-*)
+		os=-elf
+		;;
 	*-acorn)
 		os=-riscix1.2
 		;;
@@ -1245,11 +1444,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-*)
@@ -1270,6 +1472,9 @@ case $basic_machine in
 	m68*-cisco)
 		os=-aout
 		;;
+        mep-*)
+		os=-elf
+		;;
 	mips*-cisco)
 		os=-elf
 		;;
@@ -1288,9 +1493,15 @@ case $basic_machine in
 	*-be)
 		os=-beos
 		;;
+	*-haiku)
+		os=-haiku
+		;;
 	*-ibm)
 		os=-aix
 		;;
+    	*-knuth)
+		os=-mmixware
+		;;
 	*-wec)
 		os=-proelf
 		;;
@@ -1342,19 +1553,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)
@@ -1423,9 +1634,15 @@ case $basic_machine in
 			-mvs* | -opened*)
 				vendor=ibm
 				;;
+			-os400*)
+				vendor=ibm
+				;;
 			-ptx*)
 				vendor=sequent
 				;;
+			-tpf*)
+				vendor=ibm
+				;;
 			-vxsim* | -vxworks* | -windiss*)
 				vendor=wrs
 				;;
@@ -1450,7 +1667,7 @@ case $basic_machine in
 esac
 
 echo $basic_machine$os
-exit 0
+exit
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)

File diff suppressed because it is too large
+ 7512 - 5396
config/ltmain.sh


File diff suppressed because it is too large
+ 13712 - 16666
configure


+ 210 - 244
configure.ac

@@ -1,5 +1,5 @@
 
-dnl $Id: configure.ac 2050 2008-05-23 05:00:04Z aturner $
+dnl $Id: configure.ac 2196 2009-02-04 21:18:09Z aturner $
 
 AC_INIT(tcpreplay)
 AC_CONFIG_SRCDIR(src/tcpreplay.c)
@@ -10,12 +10,14 @@ AM_WITH_DMALLOC
 
 dnl People building from SVN need the same version of Autogen as I'm using
 dnl or specify --disable-local-libopts
-MAINTAINER_AUTOGEN_VERSION=5.9.2
+MAINTAINER_AUTOGEN_VERSION=5.9.7
+
+AC_CONFIG_MACRO_DIR([m4])
 
 dnl Set version info here!
 MAJOR_VERSION=3
-MINOR_VERSION=3
-MICRO_VERSION=2
+MINOR_VERSION=4
+MICRO_VERSION=1
 TCPREPLAY_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
 
 dnl Release is only used for the RPM spec file
@@ -37,10 +39,12 @@ AC_SUBST(host)
 AC_SUBST(build)
 AC_SUBST(target)
 
+have_cygwin=no
 AC_MSG_CHECKING([for cygwin development environment])
 if test `echo $target | grep -c cygwin` -gt 0 ; then
-   AC_DEFINE([HAVE_WIN32], [1], [Windows/Cygwin])
-   AC_MSG_RESULT(yes)
+   	AC_DEFINE([HAVE_WIN32], [1], [Windows/Cygwin])
+   	AC_MSG_RESULT(yes)
+	have_cygwin=yes
 else
    AC_MSG_RESULT(no)
 fi
@@ -56,7 +60,7 @@ AC_PROG_CC_STDC
 AC_PROG_CXX
 AC_PROG_CPP
 AC_PROG_LN_S
-AC_PROG_RANLIB
+LT_INIT
 AC_PROG_AWK
 AC_PROG_SED
 AC_PROG_MAKE_SET
@@ -65,6 +69,7 @@ AC_PATH_PROG(PRINTF, printf)
 AC_PATH_PROG(ECHO, echo)
 AC_PATH_PROG(CUT, cut)
 AC_PATH_PROG(AUTOGEN, autogen)
+AC_PATH_PROG(GROFF, groff)
 
 dnl check autogen version
 AUTOGEN_VERSION=unknown
@@ -83,7 +88,7 @@ if test -n "${AUTOGEN}" ; then
 	rm -f autogen.version
 	
 	dnl Compare the installed version with the maintainer version if building from SVN and not using system libopts
-    if test ! -f src/tcpreplay_opts.c && test $enable_local_libopts == yes ; then
+    if test ! -f src/tcpreplay_opts.c && test "x$enable_local_libopts" = "xyes" ; then
         if test $MAINTAINER_AUTOGEN_VERSION != $AUTOGEN_VERSION ; then
             AC_MSG_ERROR([Your version of autogen ($AUTOGEN_VERSION) != libopts tear off ($MAINTAINER_AUTOGEN_VERSION)  Either install the correct version or specify --disable-local-libopts])
         fi
@@ -95,7 +100,7 @@ else
 fi
 AC_DEFINE([AUTOGEN_VERSION], [${AUTOGEN_VERSION}], [What version of autogen is installed on this system])
 
-if test $enable_local_libopts == yes ; then
+if test "x$enable_local_libopts" = "xyes" ; then
     AC_MSG_NOTICE([Using included libopts tearoff])
 else
     AC_MSG_NOTICE([Using system libopts])
@@ -281,9 +286,9 @@ AC_ARG_ENABLE(force-pf,
 	AC_HELP_STRING([--enable-force-pf], [Force using Linux's PF_PACKET for sending packets]),
 	[ AC_DEFINE([FORCE_INJECT_PF], [1], [Force using Linux's PF_PACKET for sending packets])])
 
-AC_ARG_ENABLE(force-libnet,
-	AC_HELP_STRING([--enable-force-libnet], [Force using libnet for sending packets]),
-	[ AC_DEFINE([FORCE_INJECT_LIBNET], [1], [Force using libnet for sending packets])])
+AC_ARG_ENABLE(force-libdnet,
+	AC_HELP_STRING([--enable-force-libdnet], [Force using libdnet for sending packets]),
+	[ AC_DEFINE([FORCE_INJECT_LIBDNET], [1], [Force using libdnet for sending packets])])
 		
 AC_ARG_ENABLE(force-inject,
 	AC_HELP_STRING([--enable-force-inject], [Force using libpcap's pcap_inject() for sending packets]),
@@ -293,16 +298,6 @@ AC_ARG_ENABLE(force-sendpacket,
 	AC_HELP_STRING([--enable-force-sendpacket], [Force using libpcap's pcap_sendpacket() for sending packets]),
 	[ AC_DEFINE([FORCE_INJECT_PCAP_SENDPACKET], [1], [Force using libpcap's pcap_sendpacket() for sending packets])])
 
-tcpreplay_edit=no
-AC_ARG_ENABLE(tcpreplay-edit,
-	AC_HELP_STRING([--enable-tcpreplay-edit], [Link packet editing code with tcpreplay]),
-	[ AC_DEFINE([TCPREPLAY_EDIT], [1], [Link packet editing code with tcpreplay])
-	tcpreplay_edit=yes
-	])
-
-AM_CONDITIONAL([ENABLE_TCPREPLAY_EDIT], [test x$tcpreplay_edit = xyes])
-
-
 dnl Dynamic link libraries
 dynamic_link=no
 AC_ARG_ENABLE(dynamic-link,
@@ -340,145 +335,6 @@ if test x$inet_addr = no ; then
     AC_MSG_ERROR([We need inet_addr.  See bug 26])
 fi
 
-dnl ##################################################
-dnl Checks for libnet IFF you specify --enable-libnet.
-dnl We no longer by default use libnet unless you tell me to.
-dnl ##################################################
-foundnet=no
-trynetdir=no
-have_libnet=no
-use_libnet=no
-
-AC_ARG_ENABLE(libnet,
-	AC_HELP_STRING([--enable-libnet], [Enable using the libnet 1.1.x library (deprecated)]),
-	[ if test x$enableval = xyes; then
-		use_libnet=yes
-		AC_MSG_WARN([Due to bugs in libnet, it is no longer officially supported])
-	  fi]
-)
-
-AC_ARG_WITH(libnet,
-    AC_HELP_STRING([--with-libnet=DIR], [Use libnet in DIR]),
-    [trynetdir=$withval])
-
-if test x$use_libnet = xyes ; then
-	AC_MSG_CHECKING(for libnet)
-
-	for testdir in $trynetdir /usr/local /opt/local /usr ; do 
-    	if test -f "${testdir}/include/libnet.h" -a $foundnet = no ; then
-        	LNETINC="${testdir}/include/libnet.h"
-	        LNETINCDIR="${testdir}/include"
-	        if test $dynamic_link = yes; then
-				if test -f "${testdir}/lib64/libnet${shrext_cmds}" ; then
-		            LNETLIB="-L${testdir}/lib64 -lnet"
-				elif test -f "${testdir}/lib/libnet${shrext_cmds}" ; then
-					LNETLIB="-L${testdir}/lib -lnet"
-				else
-					AC_ERROR([Unable to find libnet in ${testdir}])
-				fi
-	        elif test -f "${testdir}/lib64/libnet.${libext}" ; then
-	            LNETLIB="${testdir}/lib64/libnet.${libext}"
-	        elif test -f "${testdir}/lib/libnet.${libext}" ; then
-	            LNETLIB="${testdir}/lib/libnet.${libext}"
-		 	else
-				AC_ERROR([Unable to find matching library for header file in ${testdir}])
-			fi
-        	foundnet=$testdir
-     	fi
-	done
-	
-
-	if test x$foundnet = xno ; then
-	    AC_MSG_RESULT(no)
-	else
-	    AC_MSG_RESULT($foundnet)
-		have_libnet=yes
-		AC_DEFINE([HAVE_LIBNET], [1], [Enable libnet support])
-	fi
-
-fi
-
-
-AC_SUBST(LNETINC)
-AC_SUBST(LNETLIB)
-
-if test $foundnet != no ; then
-	OLDLIBS="$LIBS"
-	OLDCFLAGS="$CFLAGS"
-	LIBS="$LNETLIB"
-	CFLAGS="$CFLAGS -I$LNETINCDIR"
-
-
-	dnl Check to see what version of libnet
-	dnl this code has been reduced a lot, but probably still could be
-	dnl reduced quite a bit more if we chose too
-	AC_MSG_CHECKING(for libnet version)
-
-	AC_TRY_RUN([
-#include <string.h>
-#define LIBNET_LIL_ENDIAN 1
-#include "$LNETINC"
-#define LIB_TEST "1.0"
-	/* 
-	 * simple proggy to test the version of libnet
-	 * returns zero if it's 1.0.x 
-	 * or one otherwise
-	 */
-	int
-	main (int argc, char *argv[])
-	{
-	        if (strncmp(LIB_TEST, LIBNET_VERSION, 3) == 0)
-	                exit(0);
-	        exit(1);
-	}],
-	        libnet_ver_10=yes
-	        AC_MSG_RESULT(1.0.x), 
-	        libnet_ver_10=no,
-	        libnet_ver_10=no
-	        )
-
-	AC_TRY_RUN([
-#include <string.h>
-#include "$LNETINC"
-#define LIB_TEST "1.1"
-	/* 
-	 * simple proggy to test the version of libnet
-	 * returns zero if it's 1.0.x 
-	 * or one otherwise
-	 */
-	int
-	main (int argc, char *argv[])
-	{
-	        if (strncmp(LIB_TEST, LIBNET_VERSION, 3) == 0)
-	                exit(0);
-	        exit(1);
-	}],
-	        libnet_ver_11=yes
-	        AC_MSG_RESULT(1.1.x), 
-	        libnet_ver_11=no,
-	        libnet_ver_11=no
-	        )
-
-
-	if test $libnet_ver_10 = no -a $libnet_ver_11 = no ; then
-	        AC_MSG_RESULT(unknown)
-	        AC_MSG_ERROR(Unable to determine version of libnet)
-	fi
-
-	if test $libnet_ver_10 = yes ; then
-	          AC_MSG_ERROR(Libnet version 1.0.x is no longer supported.
-	                Please upgrade to 1.1.0 or better)
-	fi
-
-
-	dnl restore LIBS & CFLAGS
-	LIBS="$OLDLIBS"
-	CFLAGS="$OLDCFLAGS"
-
-fi 
-
-dnl END OF if test $foundnet = yes
-
 dnl #####################################################
 dnl Checks for libpcap
 dnl #####################################################
@@ -531,7 +387,6 @@ OLDCFLAGS="$CFLAGS -I$LPCAPINCDIR"
 LIBS="$LPCAPLIB"
 CFLAGS="$CFLAGS -I$LPCAPINCDIR"
 
-
 dnl Check to see what version of libpcap
 dnl this code has been reduced a lot, but probably still could be
 dnl reduced quite a bit more if we chose too
@@ -628,6 +483,32 @@ elif test $libcap_ver7 = yes ; then
     libpcap_version=">= 0.7.0"
 fi
 
+dnl Check for pcap_setnonblock()
+AC_MSG_CHECKING(for pcap_setnonblock)
+AC_LINK_IFELSE(AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "$LPCAPINC"
+]],[[
+    pcap_t *p;
+    char *errbuf;
+    
+    pcap_setnonblock(p, 1, errbuf);
+    exit(0);
+]]), [
+    have_pcap_setnonblock=yes
+    AC_MSG_RESULT(yes)
+], [
+    have_pcap_setnonblock=no
+    AC_MSG_RESULT(no)
+])
+
+if test $have_pcap_setnonblock = yes ; then
+    AC_DEFINE([HAVE_PCAP_SETNONBLOCK], [1], 
+              [Does libpcap have pcap_setnonblock?])
+fi
+
 dnl Check to see if we've got pcap_datalink_val_to_name()
 AC_MSG_CHECKING(for pcap_datalink_val_to_description)
 AC_LINK_IFELSE(AC_LANG_PROGRAM([[
@@ -649,9 +530,38 @@ AC_LINK_IFELSE(AC_LANG_PROGRAM([[
 
 if test $have_dlt_to_desc = yes ; then
     AC_DEFINE([HAVE_DLT_VAL_TO_DESC], [1], 
-              [Does libpcap have dlt_val_to_desc?])
+              [Does libpcap have pcap_datalink_val_to_description?])
+fi
+
+dnl Check for pcap_get_selectable_fd()
+AC_MSG_CHECKING(for pcap_get_selectable_fd)
+AC_LINK_IFELSE(AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "$LPCAPINC"
+]], [[
+    int f;
+    pcap_t *p;
+    f = pcap_get_selectable_fd(p);
+    exit(0);
+]]), [
+    have_pcap_get_selectable_fd=yes
+    AC_MSG_RESULT(yes)
+], [
+    have_pcap_get_selectable_fd=no
+    AC_MSG_RESULT(no)
+])
+
+if test x$have_pcap_get_selectable_fd = xyes ; then
+    AC_DEFINE([HAVE_PCAP_GET_SELECTABLE_FD], [1], 
+        [Does libpcap have pcap_get_selectable_fd?])
 fi
 
+dnl Important: winpcap apparently defines functions in it's header files
+dnl which aren't actually in the library.  Totally fucked up.  Hence, we
+dnl must actually LINK the code, not just compile it.
+
 dnl Check to see if we've got pcap_dump_fopen()
 AC_MSG_CHECKING(for pcap_dump_fopen)
 AC_LINK_IFELSE(AC_LANG_PROGRAM([[
@@ -682,24 +592,74 @@ fi
 have_pcap_inject=no
 dnl Check to see if we've got pcap_inject()
 AC_MSG_CHECKING(for pcap_inject sending support)
-AC_TRY_COMPILE([
+AC_LINK_IFELSE(AC_LANG_PROGRAM([[
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include "$LPCAPINC"
-],[
+]],[[
 	pcap_t *pcap;
 	char *buf;
     pcap_inject(pcap, (void *)buf, 0);
-],[
-	AC_DEFINE([HAVE_PCAP_INJECT], [1], 
-              [Does libpcap have pcap_inject?])
-	AC_MSG_RESULT(yes)
-	have_pcap_inject=yes
-],[
-	AC_MSG_RESULT(no)
+]]),[
+    have_pcap_inject=yes
+    AC_MSG_RESULT(yes)
+], [
+    have_pcap_inject=no
+    AC_MSG_RESULT(no)
+])
+
+if test $have_pcap_inject = yes ; then
+	AC_DEFINE([HAVE_PCAP_INJECT], [1], [Does libpcap have pcap_inject?])
+fi
+
+have_pcap_sendpacket=no
+dnl Check to see if we've got pcap_sendpacket()
+AC_MSG_CHECKING(for pcap_sendpacket sending support)
+AC_LINK_IFELSE(AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "$LPCAPINC"
+]],[[
+	pcap_t *pcap;
+	u_char *buf;
+    pcap_sendpacket(pcap, buf, 0);
+]]),[
+    have_pcap_sendpacket=yes
+    AC_MSG_RESULT(yes)
+], [
+    have_pcap_sendpacket=no
+    AC_MSG_RESULT(no)
 ])
 
+if test $have_pcap_sendpacket = yes ; then
+	AC_DEFINE([HAVE_PCAP_SENDPACKET], [1], [Does libpcap have pcap_sendpacket?])
+fi
+
+have_pcap_breakloop=no
+AC_MSG_CHECKING(for pcap_breakloop)
+AC_LINK_IFELSE(AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "$LPCAPINC"
+]],[[
+	pcap_t *pcap;
+    pcap_sendpacket(pcap);
+]]),[
+    have_pcap_breakloop=yes
+    AC_MSG_RESULT(yes)
+], [
+    have_pcap_breakloop=no
+    AC_MSG_RESULT(no)
+])
+
+if test $have_pcap_breakloop = yes ; then
+	AC_DEFINE([HAVE_PCAP_BREAKLOOP], [1], [Does libpcap have pcap_breakloop?])
+fi
+
+
 have_pcap_version=no
 dnl Check to see if we have pcap_version[]
 AC_MSG_CHECKING(for pcap_version[])
@@ -718,26 +678,29 @@ extern char pcap_version[];
 	AC_MSG_RESULT(no)
 ])
 
-have_pcap_sendpacket=no
-dnl Check to see if we've got pcap_sendpacket()
-AC_MSG_CHECKING(for pcap_sendpacket sending support)
-AC_TRY_COMPILE([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "$LPCAPINC"
-],[
-	pcap_t *pcap;
-	u_char *buf;
-    pcap_sendpacket(pcap, buf, 0);
-],[
-	AC_DEFINE([HAVE_PCAP_SENDPACKET], [1], 
-              [Does libpcap have pcap_sendpacket?])
-	AC_MSG_RESULT(yes)
-	have_pcap_sendpacket=yes
-],[
-	AC_MSG_RESULT(no)
-])
+
+# Tcpbridge requires libpcap and pcap_sendpacket()
+enable_tcpbridge=no
+if test x$foundpcap != xno -a x$have_pcap_sendpacket = xyes ; then
+
+    # if we have pcap_sendpacket() then we can build tcpbridge on non-BPF systems
+    if test x$have_bpf = xno; then
+        AC_DEFINE(ENABLE_TCPBRIDGE, [1], [Compile tcpbridge])
+    	enable_tcpbridge=yes
+    	AC_MSG_NOTICE([Building tcpbridge])
+    	
+    # BPF systems need to also have pcap_setnonblock()
+    elif test x$have_pcap_setnonblock = xyes ; then
+        AC_DEFINE(ENABLE_TCPBRIDGE, [1], [Compile tcpbridge])
+    	enable_tcpbridge=yes
+    	AC_MSG_NOTICE([Building tcpbridge])    
+    else
+    	AC_MSG_WARN([Unable to build tcpbridge.  Try installing latest libpcap!])
+    fi
+fi
+AM_CONDITIONAL(COMPILE_TCPBRIDGE, [test x$enable_tcpbridge = xyes ])
+
+
 
 have_pf=no
 dnl Check for linux PF_PACKET support
@@ -801,23 +764,61 @@ main(int argc, char *argv[]) {
 	])
 
 
+dnl ##################################################
+dnl # Check for libdnet, but only if not Cygwin! 
+dnl ##################################################
+founddnet=no
+have_libdnet=no
+libdnet_version=
+enable_fragroute=no
+trydnetdir=/usr/local
+
+if test $have_cygwin == no ; then
+	AC_MSG_CHECKING(for libdnet)
+	AC_ARG_WITH(libdnet,
+	    AC_HELP_STRING([--with-libdnet=DIR], [Use libdnet in DIR]),
+	    [trydnetdir=$withval])
+ 
+	for testdir in $trydnetdir /usr/local /opt/local /usr ; do 
+	   	if test -x ${testdir}/bin/dnet-config -a $founddnet = no ; then
+	           LDNETINC="`$testdir/bin/dnet-config --cflags`"
+	           LDNETLIB="`$testdir/bin/dnet-config --libs`"
+	           libdnet_version="`$testdir/bin/dnet-config --version`"
+	       	founddnet=$testdir
+	    	fi
+	done
+
+	if test $founddnet = no ; then
+		AC_MSG_RESULT(no)
+		AC_MSG_WARN([libdnet not found, disabling fragroute feature])
+	else
+		AC_MSG_RESULT($founddnet)
+		enable_fragroute=yes
+		have_libdnet=yes
+	    AC_DEFINE([HAVE_LIBDNET], [1], [Do we have libdnet?])
+	fi
+
+else
+	AC_MSG_NOTICE([Skipping libdnet check under Cygwin for compatibility reasons])
+fi
+
+
+AC_SUBST(LDNETINC)
+AC_SUBST(LDNETLIB)
+AC_DEFINE_UNQUOTED([LIBDNET_VERSION], "$libdnet_version", [Version of libdnet])
+
+AM_CONDITIONAL(COMPILE_FRAGROUTE, [test x$founddnet != xno])
+if test x$founddnet != xno ; then
+    AC_DEFINE(ENABLE_FRAGROUTE, [1], [Enable fragroute module])
+fi
+
+
 dnl Make sure we have a valid packet injection mechanisim
 if test $have_bpf = no -a $have_pcap_inject = no -a $have_pcap_sendpacket = no \
 	-a $have_libdnet = no -a $have_pf = no ; then
 	AC_MSG_ERROR([Unable to find a supported method to send packets.  Please upgrade your libpcap or enable libdnet])
 fi
 
-dnl Libpcap support doesn't give us a method to get the hardware address of the
-dnl interfaces which prevents us from doing proper filtering to prevent bridging loops
-enable_tcpbridge=yes
-if test $have_bpf = no -a $have_libdnet = no -a $have_pf = no ; then
-	AC_MSG_NOTICE([tcpbridge support disabled without BPF, Libdnet or Linux PF_PACKET])
-	enable_tcpbridge=no
-fi
-
-# ADT: Commented for now
-# AM_CONDITIONAL(ENABLE_TCPBRIDGE, [test $enable_tcpbridge = yes])
-
 dnl Older versions of libpcap are missing some DLT types
 dnl If doesn't exist, we'll define them in src/common/fakepcap.h
 AC_MSG_CHECKING(for DLT_LINUX_SLL in libpcap)
@@ -888,42 +889,6 @@ dnl restore LIBS & CFLAGS
 LIBS="$OLDLIBS"
 CFLAGS="$OLDCFLAGS"
 
-dnl ##################################################
-dnl # Check for libdnet
-dnl ##################################################
-founddnet=no
-enable_fragroute=no
-trydnetdir=/usr/local
-AC_MSG_CHECKING(for libdnet)
-AC_ARG_WITH(libdnet,
-    AC_HELP_STRING([--with-libdnet=DIR], [Use libdnet in DIR]),
-    [trydnetdir=$withval])
- 
-	for testdir in $trydnetdir /usr/local /opt/local /usr ; do 
-    	if test -x ${testdir}/bin/dnet-config -a $founddnet = no ; then
-            LDNETINC="`$testdir/bin/dnet-config --cflags`"
-            LDNETLIB="`$testdir/bin/dnet-config --libs`"
-
-        	founddnet=$testdir
-     	fi
-	done
-
-	if test $founddnet = no ; then
-		AC_MSG_RESULT(no)
-		AC_MSG_WARN([libdnet not found, disabling fragroute feature])
-	else
-		AC_MSG_RESULT($founddnet)
-		enable_fragroute=yes
-	    AC_DEFINE([HAVE_LIBDNET], [1], [Do we have libdnet?])
-	fi
-
-AC_SUBST(LDNETINC)
-AC_SUBST(LDNETLIB)
-AM_CONDITIONAL(COMPILE_FRAGROUTE, [test x$founddnet != xno])
-if test x$founddnet != xno ; then
-    AC_DEFINE(ENABLE_FRAGROUTE, [1], [Enable fragroute module])
-fi
-
 
 dnl ##################################################
 dnl # Check for pcapnav
@@ -1134,6 +1099,7 @@ case $host in
     fi
     AC_DEFINE([HAVE_ABSOLUTE_TIME], [1], [Have OS X UpTime()/AbsoluteTime high-precision timing])
     osx_frameworks=yes
+    AC_DEFINE([HAVE_DARWIN], [1], [Building Apple/Darwin])
 	AC_MSG_RESULT(Apple OS X)
 	;;
 
@@ -1213,24 +1179,24 @@ AC_MSG_RESULT(
              TCPREPLAY Suite Configuration Results (${TCPREPLAY_VERSION})
 ##########################################################################
 libpcap:                    ${foundpcap} (${libpcap_version})
-libnet:                     ${foundnet}
-libdnet:                    ${founddnet}
+libdnet:                    ${founddnet} (${libdnet_version})
 autogen:                    ${AUTOGEN} (${AUTOGEN_VERSION})
 Use libopts tearoff:        ${enable_local_libopts}
 64bit counter support:      ${use64bit_counters}
 tcpdump binary path:        ${tcpdump_path}
 tcpreplay edit support:     ${tcpreplay_edit}
-tcpbridge support:          ${enable_tcpbridge}
 fragroute support:          ${enable_fragroute}
+tcpbridge support:          ${enable_tcpbridge}
 
 Supported Packet Injection Methods (*):
 Linux PF_PACKET:            ${have_pf}
 BSD BPF:                    ${have_bpf}
-libnet:                     ${have_libnet}
+libdnet:                    ${have_libdnet}
 pcap_inject:                ${have_pcap_inject}
-pcap_sendpacket:            ${have_pcap_sendpacket}
+pcap_sendpacket:            ${have_pcap_sendpacket} **
 
 * In order of preference; see configure --help to override
+** Required for tcpbridge
 )
 
 

BIN
docs/._CHANGELOG


+ 38 - 1
docs/CHANGELOG

@@ -1,4 +1,41 @@
-$Id: CHANGELOG 2063 2008-06-20 16:03:22Z aturner $
+$Id: CHANGELOG 2215 2009-02-18 04:46:51Z aturner $
+
+02/18/2009: Version 3.4.1
+    - Sendpacket method did not match documentation (#361)
+    - Fix compile issue on systems without err.h (#363)
+    - Fix tcpprep --mac not processing non-IPv4 packets (#369)
+    - Always build tcpreplay w/ editing features as tcpreplay-edit (#372)
+    - Fix potential tcpbridge issues under OS X & *BSD (#373)
+    - Fix crash on 4 byte strictly aligned systems (#377)
+    - Add MTU truncation to tcprewrite/tcpreplay-edit (#379)
+
+01/15/2009: Version 3.4.0
+    - Add libdnet and remove libnet support for sending packets (#302)
+    - Fix numerous 802.11 decoder bugs (#325)
+    - Fix compile issue under Linux (#326)
+    - Fix Mbps/sec nonsense (#327)
+    - Fix tcprewrite crash when packets have no L3+ data (#328)
+    - Clean up err.c/err.h code and improve performance for non-debug builds (#331)
+    - Fix timesdiv() timer code (#332)
+    - Improve high-performance packet sending via multiple packets/interval (#334)
+    - Fix statistics report errors (#335)
+    - Fix BPF filters not being used in tcpbridge (#336)
+    - Improve tcpbridge performance (#337)
+    - Only use two libpcap handles for tcpbridge (#338)
+    - Fix autotools usage errors (#340)
+    - Clean up 'make test' results (#341)
+    - Update to AutoGen/AutoOpts 5.9.7 (#342)
+    - Fix compiler warnings from GCC 4.2 (#344)
+    - Fix numerous memory corruption bugs in libtcpedit DLT plugin code (#345)
+    - Add support for editing IPv4 TOS/DiffServ/ECN (#348)
+    - Update autotools to more recent versions (#349)
+    - Report injection method via -V (#352)
+    - Fix DLT_USER l2len check bug (#353)
+    - Replace man2html w/ groff (#354)
+    - Fix false pcap_inject() detection under Windows/Winpcap (#355)
+    - tcpbridge now builds under Win32/Cygwin
+    - libdnet is no longer an option for Win32/Cygwin (#57)
+    - tcpbridge now supports --listnics (#357)
 
 06/20/2008: Version 3.3.2
     - Fix (again) tcpbridge --unidir assert error (#308)

+ 11 - 1
docs/CREDIT

@@ -1,4 +1,4 @@
-$Id: CREDIT 1782 2007-04-02 04:21:30Z aturner $ 
+$Id: CREDIT 2101 2009-01-04 22:42:57Z aturner $ 
 
 tcpreplay and it's associated utilities (tcpprep, tcprewrite and flowreplay)
 were designed and written by Aaron Turner.
@@ -43,3 +43,13 @@ Denis McLaughlin <denism@cyberus.ca>
 Andrew Edgecombe <andrew.edgecombe@nec.com.au>
 	- Patch to support caching pcap files in memory when looping
 	  which provides a significant performance improvement
+    - Patch to fix issue with -M option
+
+Joerg Mayer  <jmayer@loplof.de>
+   - Patch for auto* to fix various warnings & errors
+
+Jim West <jim_west@agilent.com>
+   - Patch to fix Solaris compiling issues
+
+Bojan Smojver <bojan@rexursive.com>
+   - For maintaining the RPM package and helping with portability issues

+ 13 - 16
docs/Makefile.am

@@ -2,34 +2,31 @@ MAKEFLAGS=-s
 
 .PHONY: manpages
 
-MAN2HTML = ../scripts/man2html
-
-docs: manpages
-
+docs: clean-docs manpages
 
 web/tcpreplay.html:
-	$(MAN2HTML) < ../src/tcpreplay.1 > web/tcpreplay.html
+	@GROFF@ -Thtml -mman ../src/tcpreplay.1 > web/tcpreplay.html
 
 web/tcpprep.html:
-	$(MAN2HTML) < ../src/tcpprep.1 > web/tcpprep.html
-
-web/flowreplay.html:
-	$(MAN2HTML) < ../src/flowreplay.1 > web/flowreplay.html
+	@GROFF@ -Thtml -mman ../src/tcpprep.1 > web/tcpprep.html
 
 web/tcprewrite.html:
-	$(MAN2HTML) < ../src/tcprewrite.1 > web/tcprewrite.html
+	@GROFF@ -Thtml -mman ../src/tcprewrite.1 > web/tcprewrite.html
 
 web/tcpbridge.html:
-	$(MAN2HTML) < ../src/tcpbridge.1 > web/tcpbridge.html
+	@GROFF@ -Thtml -mman ../src/tcpbridge.1 > web/tcpbridge.html
+
+web/tcpreplay-edit.html:
+	@GROFF@ -Thtml -mman ../src/tcpreplay-edit.1 > web/tcpreplay-edit.html
 
-manpages: web/tcpreplay.html web/tcpprep.html web/flowreplay.html \
-	web/tcprewrite.html web/tcpbridge.html 
+manpages: web/tcpreplay.html web/tcpprep.html web/tcprewrite.html \
+    web/tcpbridge.html web/tcpreplay-edit.html
 
 postweb: manpages
-	rsync -e ssh --exclude '.svn/' --exclude '/**/.svn/' --exclude '/**~' \
+	rsync -qe ssh --exclude '.svn/' --exclude '/**/.svn/' --exclude '/**~' \
 	--exclude '*~' -avz web/ \
-	aturner@voigner.synfin.net:/var/www-vhosts/tcpreplay/
-	scp CHANGELOG TODO aturner@voigner.synfin.net:/var/www-vhosts/tcpreplay/
+	aturner@malbec.synfin.net:/var/vhosts/tcpreplay/
+	scp CHANGELOG TODO aturner@malbec.synfin.net:/var/vhosts/tcpreplay/
 
 
 EXTRA_DIST = CHANGELOG CREDIT HACKING INSTALL LICENSE 

+ 29 - 23
docs/Makefile.in

@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -35,7 +35,8 @@ target_triplet = @target@
 subdir = docs
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in INSTALL TODO
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -67,20 +68,22 @@ DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DMALLOC_LIB = @DMALLOC_LIB@
 DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
 GREP = @GREP@
+GROFF = @GROFF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LDNETINC = @LDNETINC@
 LDNETLIB = @LDNETLIB@
@@ -90,10 +93,9 @@ LIBOPTS_DIR = @LIBOPTS_DIR@
 LIBOPTS_LDADD = @LIBOPTS_LDADD@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LNAVLIB = @LNAVLIB@
 LNAV_CFLAGS = @LNAV_CFLAGS@
-LNETINC = @LNETINC@
-LNETLIB = @LNETLIB@
 LN_S = @LN_S@
 LPCAPINC = @LPCAPINC@
 LPCAPLIB = @LPCAPLIB@
@@ -101,8 +103,12 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NM = @NM@
 NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -126,7 +132,7 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -158,6 +164,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 nic1 = @nic1@
@@ -182,7 +189,6 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 MAKEFLAGS = -s
-MAN2HTML = ../scripts/man2html
 EXTRA_DIST = CHANGELOG CREDIT HACKING INSTALL LICENSE 
 MAINTAINERCLEANFILES = Makefile.in 
 all: all-am
@@ -192,8 +198,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
@@ -357,31 +363,31 @@ uninstall-am:
 
 .PHONY: manpages
 
-docs: manpages
+docs: clean-docs manpages
 
 web/tcpreplay.html:
-	$(MAN2HTML) < ../src/tcpreplay.1 > web/tcpreplay.html
+	@GROFF@ -Thtml -mman ../src/tcpreplay.1 > web/tcpreplay.html
 
 web/tcpprep.html:
-	$(MAN2HTML) < ../src/tcpprep.1 > web/tcpprep.html
-
-web/flowreplay.html:
-	$(MAN2HTML) < ../src/flowreplay.1 > web/flowreplay.html
+	@GROFF@ -Thtml -mman ../src/tcpprep.1 > web/tcpprep.html
 
 web/tcprewrite.html:
-	$(MAN2HTML) < ../src/tcprewrite.1 > web/tcprewrite.html
+	@GROFF@ -Thtml -mman ../src/tcprewrite.1 > web/tcprewrite.html
 
 web/tcpbridge.html:
-	$(MAN2HTML) < ../src/tcpbridge.1 > web/tcpbridge.html
+	@GROFF@ -Thtml -mman ../src/tcpbridge.1 > web/tcpbridge.html
+
+web/tcpreplay-edit.html:
+	@GROFF@ -Thtml -mman ../src/tcpreplay-edit.1 > web/tcpreplay-edit.html
 
-manpages: web/tcpreplay.html web/tcpprep.html web/flowreplay.html \
-	web/tcprewrite.html web/tcpbridge.html 
+manpages: web/tcpreplay.html web/tcpprep.html web/tcprewrite.html \
+    web/tcpbridge.html web/tcpreplay-edit.html
 
 postweb: manpages
-	rsync -e ssh --exclude '.svn/' --exclude '/**/.svn/' --exclude '/**~' \
+	rsync -qe ssh --exclude '.svn/' --exclude '/**/.svn/' --exclude '/**~' \
 	--exclude '*~' -avz web/ \
-	aturner@voigner.synfin.net:/var/www-vhosts/tcpreplay/
-	scp CHANGELOG TODO aturner@voigner.synfin.net:/var/www-vhosts/tcpreplay/
+	aturner@malbec.synfin.net:/var/vhosts/tcpreplay/
+	scp CHANGELOG TODO aturner@malbec.synfin.net:/var/vhosts/tcpreplay/
 
 clean-docs: clean
 	-rm -f web/*.html

+ 17 - 10
lib/Makefile.in

@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -38,7 +38,8 @@ subdir = lib
 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -91,20 +92,22 @@ DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DMALLOC_LIB = @DMALLOC_LIB@
 DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
 GREP = @GREP@
+GROFF = @GROFF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LDNETINC = @LDNETINC@
 LDNETLIB = @LDNETLIB@
@@ -114,10 +117,9 @@ LIBOPTS_DIR = @LIBOPTS_DIR@
 LIBOPTS_LDADD = @LIBOPTS_LDADD@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LNAVLIB = @LNAVLIB@
 LNAV_CFLAGS = @LNAV_CFLAGS@
-LNETINC = @LNETINC@
-LNETLIB = @LNETLIB@
 LN_S = @LN_S@
 LPCAPINC = @LPCAPINC@
 LPCAPLIB = @LPCAPLIB@
@@ -125,8 +127,12 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NM = @NM@
 NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -150,7 +156,7 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -182,6 +188,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 nic1 = @nic1@
@@ -218,8 +225,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
@@ -292,7 +299,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS

+ 17 - 14
libopts/Makefile.am

@@ -7,19 +7,22 @@ noinst_LTLIBRARIES      = libopts.la
 endif
 libopts_la_SOURCES      = libopts.c
 libopts_la_CPPFLAGS     = -I$(top_srcdir)
-libopts_la_LDFLAGS      = -version-info  30:0:5
+libopts_la_LDFLAGS      = -version-info  32:0:7
 EXTRA_DIST              = \
     COPYING.gplv3           COPYING.lgplv3          COPYING.mbsd  \
-    MakeDefs.inc            README                  autoopts/options.h  \
-    autoopts/usage-txt.h    autoopts.c              autoopts.h  \
-    boolean.c               compat/compat.h         compat/pathfind.c  \
-    compat/snprintf.c       compat/strchr.c         compat/strdup.c  \
-    compat/windows-config.h configfile.c            cook.c  \
-    enumeration.c           environment.c           genshell.c  \
-    genshell.h              load.c                  m4/libopts.m4  \
-    m4/liboptschk.m4        makeshell.c             nested.c  \
-    numeric.c               pgusage.c               proto.h  \
-    putshell.c              restore.c               save.c  \
-    sort.c                  stack.c                 streqvcmp.c  \
-    text_mmap.c             tokenize.c              usage.c  \
-    version.c
+    MakeDefs.inc            README                  ag-char-map.h  \
+    autoopts/options.h      autoopts/usage-txt.h    autoopts.c  \
+    autoopts.h              boolean.c               compat/compat.h  \
+    compat/pathfind.c       compat/snprintf.c       compat/strchr.c  \
+    compat/strdup.c         compat/windows-config.h configfile.c  \
+    cook.c                  enumeration.c           environment.c  \
+    file.c                  genshell.c              genshell.h  \
+    load.c                  m4/libopts.m4           m4/liboptschk.m4  \
+    makeshell.c             nested.c                numeric.c  \
+    parse-duration.c        parse-duration.h        pgusage.c  \
+    proto.h                 putshell.c              reset.c  \
+    restore.c               save.c                  sort.c  \
+    stack.c                 streqvcmp.c             text_mmap.c  \
+    time.c                  tokenize.c              usage.c  \
+    value-type.c            value-type.h            version.c  \
+    xat-attribute.c         xat-attribute.h

+ 34 - 24
libopts/Makefile.in

@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -36,7 +36,8 @@ target_triplet = @target@
 subdir = libopts
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -99,20 +100,22 @@ DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DMALLOC_LIB = @DMALLOC_LIB@
 DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
 GREP = @GREP@
+GROFF = @GROFF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LDNETINC = @LDNETINC@
 LDNETLIB = @LDNETLIB@
@@ -122,10 +125,9 @@ LIBOPTS_DIR = @LIBOPTS_DIR@
 LIBOPTS_LDADD = @LIBOPTS_LDADD@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LNAVLIB = @LNAVLIB@
 LNAV_CFLAGS = @LNAV_CFLAGS@
-LNETINC = @LNETINC@
-LNETLIB = @LNETLIB@
 LN_S = @LN_S@
 LPCAPINC = @LPCAPINC@
 LPCAPLIB = @LPCAPLIB@
@@ -133,8 +135,12 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NM = @NM@
 NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -158,7 +164,7 @@ abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -190,6 +196,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 nic1 = @nic1@
@@ -218,22 +225,25 @@ MAINTAINERCLEANFILES = Makefile.in
 @INSTALL_LIBOPTS_FALSE@noinst_LTLIBRARIES = libopts.la
 libopts_la_SOURCES = libopts.c
 libopts_la_CPPFLAGS = -I$(top_srcdir)
-libopts_la_LDFLAGS = -version-info  30:0:5
+libopts_la_LDFLAGS = -version-info  32:0:7
 EXTRA_DIST = \
     COPYING.gplv3           COPYING.lgplv3          COPYING.mbsd  \
-    MakeDefs.inc            README                  autoopts/options.h  \
-    autoopts/usage-txt.h    autoopts.c              autoopts.h  \
-    boolean.c               compat/compat.h         compat/pathfind.c  \
-    compat/snprintf.c       compat/strchr.c         compat/strdup.c  \
-    compat/windows-config.h configfile.c            cook.c  \
-    enumeration.c           environment.c           genshell.c  \
-    genshell.h              load.c                  m4/libopts.m4  \
-    m4/liboptschk.m4        makeshell.c             nested.c  \
-    numeric.c               pgusage.c               proto.h  \
-    putshell.c              restore.c               save.c  \
-    sort.c                  stack.c                 streqvcmp.c  \
-    text_mmap.c             tokenize.c              usage.c  \
-    version.c
+    MakeDefs.inc            README                  ag-char-map.h  \
+    autoopts/options.h      autoopts/usage-txt.h    autoopts.c  \
+    autoopts.h              boolean.c               compat/compat.h  \
+    compat/pathfind.c       compat/snprintf.c       compat/strchr.c  \
+    compat/strdup.c         compat/windows-config.h configfile.c  \
+    cook.c                  enumeration.c           environment.c  \
+    file.c                  genshell.c              genshell.h  \
+    load.c                  m4/libopts.m4           m4/liboptschk.m4  \
+    makeshell.c             nested.c                numeric.c  \
+    parse-duration.c        parse-duration.h        pgusage.c  \
+    proto.h                 putshell.c              reset.c  \
+    restore.c               save.c                  sort.c  \
+    stack.c                 streqvcmp.c             text_mmap.c  \
+    time.c                  tokenize.c              usage.c  \
+    value-type.c            value-type.h            version.c  \
+    xat-attribute.c         xat-attribute.h
 
 all: all-am
 
@@ -243,8 +253,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
@@ -354,7 +364,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS

+ 129 - 0
libopts/ag-char-map.h

@@ -0,0 +1,129 @@
+/*
+ *   Character mapping generated 12/31/08 19:07:31
+ *
+ *  This file contains the character classifications
+ *  used by AutoGen and AutoOpts for identifying tokens.
+ */
+#ifndef AG_CHAR_MAP_H_GUARD
+#define AG_CHAR_MAP_H_GUARD 1
+
+#ifdef HAVE_CONFIG_H
+# if defined(HAVE_INTTYPES_H)
+#  include <inttypes.h>
+# elif defined(HAVE_STDINT_H)
+#  include <stdint.h>
+# else
+#  error "no int-types header."
+#  choke-me-now.
+# endif
+#else
+# ifdef __sun
+#  include <inttypes.h>
+# else
+#  include <stdint.h>
+# endif
+#endif
+
+#if 0 /* mapping specification source (from autogen.map) */
+// 
+// %guard          autoopts_internal
+// %file           ag-char-map.h
+// %table          opt-char-cat
+// 
+// %comment
+//         This file contains the character classifications
+//         used by AutoGen and AutoOpts for identifying tokens.
+// %
+// 
+// lower-case      "a-z"
+// upper-case      "A-Z"
+// alphabetic      +lower-case   +upper-case
+// oct-digit       "0-7"
+// dec-digit       "89"          +oct-digit
+// hex-digit       "a-fA-F"      +dec-digit
+// alphanumeric    +alphabetic   +dec-digit
+// var-first       "_"           +alphabetic
+// variable-name   +var-first    +dec-digit
+// option-name     "^-"          +variable-name
+// value-name      ":"           +option-name
+// horiz-white     "\t "
+// compound-name   "[.]"         +value-name   +horiz-white
+// whitespace      "\v\f\r\n\b"  +horiz-white
+// unquotable      "!-~"         -"\"#(),;<=>[\\]`{}?*'"
+// end-xml-token   "/>"          +whitespace
+// graphic         "!-~"
+// plus-n-space    "+"           +whitespace
+// punctuation     "!-~"         -alphanumeric -"_"
+// suffix          "-._"         +alphanumeric
+// suffix-fmt      "%/"          +suffix     
+// false-type      "nNfF0\x00"
+//
+#endif /* 0 -- mapping spec. source */
+
+typedef uint32_t opt_char_cat_mask_t;
+extern opt_char_cat_mask_t const opt_char_cat[128];
+
+static inline int is_opt_char_cat_char(char ch, opt_char_cat_mask_t mask) {
+    unsigned int ix = (unsigned char)ch;
+    return ((ix < 0x7F) && ((opt_char_cat[ix] & mask) != 0)); }
+
+#define IS_LOWER_CASE_CHAR(_c)     is_opt_char_cat_char((_c), 0x00001)
+#define IS_UPPER_CASE_CHAR(_c)     is_opt_char_cat_char((_c), 0x00002)
+#define IS_ALPHABETIC_CHAR(_c)     is_opt_char_cat_char((_c), 0x00003)
+#define IS_OCT_DIGIT_CHAR(_c)      is_opt_char_cat_char((_c), 0x00004)
+#define IS_DEC_DIGIT_CHAR(_c)      is_opt_char_cat_char((_c), 0x0000C)
+#define IS_HEX_DIGIT_CHAR(_c)      is_opt_char_cat_char((_c), 0x0001C)
+#define IS_ALPHANUMERIC_CHAR(_c)   is_opt_char_cat_char((_c), 0x0000F)
+#define IS_VAR_FIRST_CHAR(_c)      is_opt_char_cat_char((_c), 0x00023)
+#define IS_VARIABLE_NAME_CHAR(_c)  is_opt_char_cat_char((_c), 0x0002F)
+#define IS_OPTION_NAME_CHAR(_c)    is_opt_char_cat_char((_c), 0x0006F)
+#define IS_VALUE_NAME_CHAR(_c)     is_opt_char_cat_char((_c), 0x000EF)
+#define IS_HORIZ_WHITE_CHAR(_c)    is_opt_char_cat_char((_c), 0x00100)
+#define IS_COMPOUND_NAME_CHAR(_c)  is_opt_char_cat_char((_c), 0x003EF)
+#define IS_WHITESPACE_CHAR(_c)     is_opt_char_cat_char((_c), 0x00500)
+#define IS_UNQUOTABLE_CHAR(_c)     is_opt_char_cat_char((_c), 0x00800)
+#define IS_END_XML_TOKEN_CHAR(_c)  is_opt_char_cat_char((_c), 0x01500)
+#define IS_GRAPHIC_CHAR(_c)        is_opt_char_cat_char((_c), 0x02000)
+#define IS_PLUS_N_SPACE_CHAR(_c)   is_opt_char_cat_char((_c), 0x04500)
+#define IS_PUNCTUATION_CHAR(_c)    is_opt_char_cat_char((_c), 0x08000)
+#define IS_SUFFIX_CHAR(_c)         is_opt_char_cat_char((_c), 0x1000F)
+#define IS_SUFFIX_FMT_CHAR(_c)     is_opt_char_cat_char((_c), 0x3000F)
+#define IS_FALSE_TYPE_CHAR(_c)     is_opt_char_cat_char((_c), 0x40000)
+
+#ifdef AUTOOPTS_INTERNAL
+opt_char_cat_mask_t const opt_char_cat[128] = {
+  /*x00*/ 0x40000, /*x01*/ 0x00000, /*x02*/ 0x00000, /*x03*/ 0x00000,
+  /*x04*/ 0x00000, /*x05*/ 0x00000, /*x06*/ 0x00000, /*\a */ 0x00000,
+  /*\b */ 0x00400, /*\t */ 0x00100, /*\n */ 0x00400, /*\v */ 0x00400,
+  /*\f */ 0x00400, /*\r */ 0x00400, /*x0E*/ 0x00000, /*x0F*/ 0x00000,
+  /*x10*/ 0x00000, /*x11*/ 0x00000, /*x12*/ 0x00000, /*x13*/ 0x00000,
+  /*x14*/ 0x00000, /*x15*/ 0x00000, /*x16*/ 0x00000, /*x17*/ 0x00000,
+  /*x18*/ 0x00000, /*x19*/ 0x00000, /*x1A*/ 0x00000, /*x1B*/ 0x00000,
+  /*x1C*/ 0x00000, /*x1D*/ 0x00000, /*x1E*/ 0x00000, /*x1F*/ 0x00000,
+  /*   */ 0x00100, /* ! */ 0x0A800, /* " */ 0x0A000, /* # */ 0x0A000,
+  /* $ */ 0x0A800, /* % */ 0x2A800, /* & */ 0x0A800, /* ' */ 0x0A000,
+  /* ( */ 0x0A000, /* ) */ 0x0A000, /* * */ 0x0A000, /* + */ 0x0E800,
+  /* , */ 0x0A000, /* - */ 0x1A840, /* . */ 0x1AA00, /* / */ 0x2B800,
+  /* 0 */ 0x42804, /* 1 */ 0x02804, /* 2 */ 0x02804, /* 3 */ 0x02804,
+  /* 4 */ 0x02804, /* 5 */ 0x02804, /* 6 */ 0x02804, /* 7 */ 0x02804,
+  /* 8 */ 0x02808, /* 9 */ 0x02808, /* : */ 0x0A880, /* ; */ 0x0A000,
+  /* < */ 0x0A000, /* = */ 0x0A000, /* > */ 0x0B000, /* ? */ 0x0A000,
+  /* @ */ 0x0A800, /* A */ 0x02812, /* B */ 0x02812, /* C */ 0x02812,
+  /* D */ 0x02812, /* E */ 0x02812, /* F */ 0x42812, /* G */ 0x02802,
+  /* H */ 0x02802, /* I */ 0x02802, /* J */ 0x02802, /* K */ 0x02802,
+  /* L */ 0x02802, /* M */ 0x02802, /* N */ 0x42802, /* O */ 0x02802,
+  /* P */ 0x02802, /* Q */ 0x02802, /* R */ 0x02802, /* S */ 0x02802,
+  /* T */ 0x02802, /* U */ 0x02802, /* V */ 0x02802, /* W */ 0x02802,
+  /* X */ 0x02802, /* Y */ 0x02802, /* Z */ 0x02802, /* [ */ 0x0A200,
+  /* \ */ 0x0A000, /* ] */ 0x0A200, /* ^ */ 0x0A840, /* _ */ 0x12820,
+  /* ` */ 0x0A000, /* a */ 0x02811, /* b */ 0x02811, /* c */ 0x02811,
+  /* d */ 0x02811, /* e */ 0x02811, /* f */ 0x42811, /* g */ 0x02801,
+  /* h */ 0x02801, /* i */ 0x02801, /* j */ 0x02801, /* k */ 0x02801,
+  /* l */ 0x02801, /* m */ 0x02801, /* n */ 0x42801, /* o */ 0x02801,
+  /* p */ 0x02801, /* q */ 0x02801, /* r */ 0x02801, /* s */ 0x02801,
+  /* t */ 0x02801, /* u */ 0x02801, /* v */ 0x02801, /* w */ 0x02801,
+  /* x */ 0x02801, /* y */ 0x02801, /* z */ 0x02801, /* { */ 0x0A000,
+  /* | */ 0x0A800, /* } */ 0x0A000, /* ~ */ 0x0A800, /*x7F*/ 0x00000
+};
+#endif /* AUTOOPTS_INTERNAL */
+#endif /* AG_CHAR_MAP_H_GUARD */

+ 55 - 23
libopts/autoopts.c

@@ -1,7 +1,7 @@
 
 /*
- *  $Id: autoopts.c,v 4.27 2007/07/04 21:36:36 bkorb Exp $
- *  Time-stamp:      "2007-07-04 14:33:39 bkorb"
+ *  $Id: autoopts.c,v 4.36 2008/12/20 18:35:26 bkorb Exp $
+ *  Time-stamp:      "2008-12-16 14:52:28 bkorb"
  *
  *  This file contains all of the routines that must be linked into
  *  an executable to use the generated option processing.  The optional
@@ -10,7 +10,8 @@
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is copyright (c) 1992-2007 by Bruce Korb - all rights reserved
+ *  AutoOpts is copyright (c) 1992-2008 by Bruce Korb - all rights reserved
+ *  AutoOpts is copyright (c) 1992-2008 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -32,7 +33,7 @@
 static char const zNil[] = "";
 
 /* = = = START-STATIC-FORWARD = = = */
-/* static forward declarations maintained by :mkfwd */
+/* static forward declarations maintained by mk-fwd */
 static tSuccess
 findOptDesc( tOptions* pOpts, tOptState* pOptState );
 
@@ -261,15 +262,21 @@ longOptionFind( tOptions* pOpts, char* pzOptName, tOptState* pOptState )
     int        matchCt  = 0;
     int        matchIdx = 0;
     int        nameLen;
+    char       opt_name_buf[128];
 
     /*
      *  IF the value is attached to the name,
-     *  THEN clip it off.
-     *  Either way, figure out how long our name is
+     *  copy it off so we can NUL terminate.
      */
     if (pzEq != NULL) {
         nameLen = (int)(pzEq - pzOptName);
-        *pzEq = NUL;
+        if (nameLen >= sizeof(opt_name_buf))
+            return FAILURE;
+        memcpy(opt_name_buf, pzOptName, nameLen);
+        opt_name_buf[nameLen] = NUL;
+        pzOptName = opt_name_buf;
+        pzEq++;
+
     } else nameLen = strlen( pzOptName );
 
     do  {
@@ -325,9 +332,6 @@ longOptionFind( tOptions* pOpts, char* pzOptName, tOptState* pOptState )
 
     } while (pOD++, (++idx < idxLim));
 
-    if (pzEq != NULL)
-        *(pzEq++) = '=';
-
     /*
      *  Make sure we either found an exact match or found only one partial
      */
@@ -366,8 +370,8 @@ longOptionFind( tOptions* pOpts, char* pzOptName, tOptState* pOptState )
      *  THEN call the usage procedure.
      */
     if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) {
-        fprintf( stderr, zIllOptStr, pOpts->pzProgPath,
-                 (matchCt == 0) ? zIllegal : zAmbiguous, pzOptName );
+        fprintf(stderr, (matchCt == 0) ? zIllOptStr : zAmbigOptStr,
+                pOpts->pzProgPath, pzOptName);
         (*pOpts->pUsageProc)( pOpts, EXIT_FAILURE );
     }
 
@@ -418,7 +422,7 @@ shortOptionFind( tOptions* pOpts, uint_t optValue, tOptState* pOptState )
      *  THEN the result is the "option" itself and the
      *       option is the specially marked "number" option.
      */
-    if (  isdigit( optValue )
+    if (  IS_DEC_DIGIT_CHAR(optValue)
        && (pOpts->specOptIdx.number_option != NO_EQUIVALENT) ) {
         pOptState->pOD = \
         pRes           = pOpts->pOptDesc + pOpts->specOptIdx.number_option;
@@ -465,16 +469,28 @@ findOptDesc( tOptions* pOpts, tOptState* pOptState )
      *  IF all arguments must be named options, ...
      */
     if (NAMED_OPTS(pOpts)) {
-        char* pz = pOpts->pzCurOpt;
+        char *   pz  = pOpts->pzCurOpt;
+        int      def;
+        tSuccess res; 
+        tAoUS *  def_opt;
+
         pOpts->curOptIdx++;
 
+        if (*pz != '-')
+            return longOptionFind(pOpts, pz, pOptState);
+
         /*
-         *  Skip over any flag/option markers.
-         *  In this mode, they are not required.
+         *  The name is prefixed with one or more hyphens.  Strip them off
+         *  and disable the "default_opt" setting.  Use heavy recasting to
+         *  strip off the "const" quality of the "default_opt" field.
          */
-        while (*pz == '-') pz++;
-
-        return longOptionFind( pOpts, pz, pOptState );
+        while (*(++pz) == '-')   ;
+        def_opt = (void *)&(pOpts->specOptIdx.default_opt);
+        def = *def_opt;
+        *def_opt = NO_EQUIVALENT;
+        res = longOptionFind(pOpts, pz, pOptState);
+        *def_opt = def;
+        return res;
     }
 
     /*
@@ -669,8 +685,8 @@ nextOption( tOptions* pOpts, tOptState* pOptState )
 
         default:
         case TOPT_DEFAULT:
-            fputs( "AutoOpts lib error: defaulted to option with optional arg\n",
-                   stderr );
+            fputs("AutoOpts lib error: defaulted to option with optional arg\n",
+                  stderr );
             exit( EX_SOFTWARE );
         }
 
@@ -814,7 +830,8 @@ doPresets( tOptions* pOpts )
      *  has a --load-opts option.  See if a command line option has disabled
      *  option presetting.
      */
-    if (pOpts->specOptIdx.save_opts != 0) {
+    if (  (pOpts->specOptIdx.save_opts != NO_EQUIVALENT)
+       && (pOpts->specOptIdx.save_opts != 0)) {
         pOD = pOpts->pOptDesc + pOpts->specOptIdx.save_opts + 1;
         if (DISABLED_OPT(pOD))
             return SUCCESS;
@@ -1041,6 +1058,20 @@ optionProcess(
         if (! SUCCESSFUL( doPresets( pOpts )))
             return 0;
 
+        /*
+         *  IF option name conversion was suppressed but it is not suppressed
+         *  for the command line, then it's time to translate option names.
+         *  Usage text will not get retranslated.
+         */
+        if (  ((pOpts->fOptSet & OPTPROC_TRANSLATE) != 0)
+           && (pOpts->pTransProc != NULL)
+           && ((pOpts->fOptSet & OPTPROC_NO_XLAT_MASK)
+              == OPTPROC_NXLAT_OPT_CFG)  )  {
+
+            pOpts->fOptSet &= ~OPTPROC_NXLAT_OPT_CFG;
+            (*pOpts->pTransProc)();
+        }
+
         if ((pOpts->fOptSet & OPTPROC_REORDER) != 0)
             optionSort( pOpts );
 
@@ -1067,7 +1098,8 @@ optionProcess(
      *  THEN do that now before testing for conflicts.
      *       (conflicts are ignored in preset options)
      */
-    if (pOpts->specOptIdx.save_opts != 0) {
+    if (  (pOpts->specOptIdx.save_opts != NO_EQUIVALENT)
+       && (pOpts->specOptIdx.save_opts != 0)) {
         tOptDesc*  pOD = pOpts->pOptDesc + pOpts->specOptIdx.save_opts;
 
         if (SELECTED_OPT( pOD )) {

+ 8 - 6
libopts/autoopts.h

@@ -1,15 +1,16 @@
 
 /*
- *  Time-stamp:      "2007-07-04 11:33:08 bkorb"
+ *  Time-stamp:      "2008-11-01 20:08:06 bkorb"
  *
- *  autoopts.h  $Id: autoopts.h,v 4.25 2007/07/04 21:36:36 bkorb Exp $
+ *  autoopts.h  $Id: autoopts.h,v 4.29 2008/11/02 18:51:26 bkorb Exp $
  *
  *  This file defines all the global structures and special values
  *  used in the automated option processing library.
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
- *  AutoOpts is copyright (c) 1992-2007 by Bruce Korb - all rights reserved
+ *  AutoOpts is copyright (c) 1992-2008 by Bruce Korb - all rights reserved
+ *  AutoOpts is copyright (c) 1992-2008 by Bruce Korb - all rights reserved
  *
  *  AutoOpts is available under any one of two licenses.  The license
  *  in use must be one of these two and the choice is under the control
@@ -32,6 +33,7 @@
 #define AUTOGEN_AUTOOPTS_H
 
 #include "compat/compat.h"
+#include "ag-char-map.h"
 
 #define AO_NAME_LIMIT           127
 #define AO_NAME_SIZE            ((size_t)(AO_NAME_LIMIT + 1))
@@ -86,8 +88,6 @@ typedef int tDirection;
 #define PROCESSING(d)           ((d)>0)
 #define PRESETTING(d)           ((d)<0)
 
-#define ISNAMECHAR( c )         (isalnum(c) || ((c) == '_') || ((c) == '-'))
-
 /*
  *  Procedure success codes
  *
@@ -198,6 +198,7 @@ typedef struct {
     tCC*    pzStr;
     tCC*    pzReq;
     tCC*    pzNum;
+    tCC*    pzFile;
     tCC*    pzKey;
     tCC*    pzKeyL;
     tCC*    pzBool;
@@ -208,11 +209,12 @@ typedef struct {
     tCC*    pzNoF;
     tCC*    pzSpc;
     tCC*    pzOptFmt;
+    tCC*    pzTime;
 } arg_types_t;
 
 #define AGALOC( c, w )          ao_malloc((size_t)c)
 #define AGREALOC( p, c, w )     ao_realloc((void*)p, (size_t)c)
-#define AGFREE( p )             ao_free((void*)p)
+#define AGFREE(_p)              do{void*X=(void*)_p;ao_free(X);}while(0)
 #define AGDUPSTR( p, s, w )     (p = ao_strdup(s))
 
 static void *

+ 202 - 130
libopts/autoopts/options.h

@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (options.h)
  *  
- *  It has been AutoGen-ed  Saturday July 28, 2007 at 01:01:42 PM PDT
+ *  It has been AutoGen-ed  Wednesday December 31, 2008 at 07:07:15 PM PST
  *  From the definitions    funcs.def
  *  and the template file   options_h
  *
@@ -27,6 +27,7 @@
 #ifndef AUTOOPTS_OPTIONS_H_GUARD
 #define AUTOOPTS_OPTIONS_H_GUARD 1
 #include <sys/types.h>
+#include <stdio.h>
 
 #if defined(HAVE_STDINT_H)
 # include <stdint.h>
@@ -65,8 +66,8 @@
  *  values for "opt_name" are available.
  */