[-]
[+]
|
Added |
sflowtool.changes
|
|
[-]
[+]
|
Changed |
sflowtool.spec
^
|
|
[-]
[+]
|
Deleted |
sflowtool-3.10.tar.bz2/mkinstalldirs
^
|
@@ -1,99 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-errstatus=0
-dirmode=""
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
-
-# process command line arguments
-while test $# -gt 0 ; do
- case "${1}" in
- -h | --help | --h* ) # -h for help
- echo "${usage}" 1>&2; exit 0 ;;
- -m ) # -m PERM arg
- shift
- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
- dirmode="${1}"
- shift ;;
- -- ) shift; break ;; # stop option processing
- -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
- * ) break ;; # first non-opt arg
- esac
-done
-
-for file
-do
- if test -d "$file"; then
- shift
- else
- break
- fi
-done
-
-case $# in
-0) exit 0 ;;
-esac
-
-case $dirmode in
-'')
- if mkdir -p -- . 2>/dev/null; then
- echo "mkdir -p -- $*"
- exec mkdir -p -- "$@"
- fi ;;
-*)
- if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
- echo "mkdir -m $dirmode -p -- $*"
- exec mkdir -m "$dirmode" -p -- "$@"
- fi ;;
-esac
-
-for file
-do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- pathcomp="$pathcomp$d"
- case "$pathcomp" in
- -* ) pathcomp=./$pathcomp ;;
- esac
-
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp"
-
- mkdir "$pathcomp" || lasterr=$?
-
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- else
- if test ! -z "$dirmode"; then
- echo "chmod $dirmode $pathcomp"
-
- lasterr=""
- chmod "$dirmode" "$pathcomp" || lasterr=$?
-
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
- fi
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 3
-# End:
-# mkinstalldirs ends here
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/ChangeLog
^
|
@@ -1,3 +1,33 @@
+Apr-14-2011:
+ 3.20 - compiles clean on MS Visual C++ (with project->options->advanced->compile-as = C++)
+ - make listening for ipv4 only an option: "-4"
+Apr-7-2011:
+ 3.19 - open and bind ipv4 socket if ipv6 socket fails
+ - fix print format string error - thanks to Rick Jones
+Dec-22-2010
+ 3.18 - add decodes for sflow-httpd, and common-logfile-format output (experimental)
+Sep-23-2010
+ 3.17 - add decodes for sflow-memcached (experimental)
+ - add decodes for virtual host-sflow structs
+May-17-2010
+ 3.16 - host-sflow memory counters changed to 64-bit
+April-8-2010
+ 3.15 - add host-sflow structure decodes
+ - add more wifi-sflow structure decodes
+ - fix bug/overrun vulnerability in getData32 - thanks to Sven Eshenberg
+April-22-2009
+ 3.14 - clear dst_peer_as,dst_as every time - thanks to Marc Lavine
+October-10-2008
+ 3.13 - revert to using select() for WIN32 - thanks to Marc Lavine
+ - allow NetFlow forwarding when input was IPV4 structure - thanks to Sergey Drazhnikov
+ - detect missing command-line arguments
+August-14-2007
+ - allow new POS and 80211 header-protocol types
+June-4-2007
+ 3.12 - clear the gotIPV6 flag for each sampled header - thanks to Rita Hiu
+June-1-2007
+ 3.11 - use non-blocking I/O - thanks to Wolfgang Powisch
+ - avoid struct timeval in pcap header because time_t is 64-bits on some platforms
March-28-2006
3.10 - use poll() instead of select()
- removed dcd_srcIP, dcd_dstIP and used the SFLAddress fields ipsrc and ipdst instead
@@ -55,4 +85,4 @@
1.2 changes to allow compilation on Solaris - thanks to Bogdan Ionescu from University of Ottowa
May-31-2001
1.0 initial release, works with sFlow version 2
-
\ No newline at end of file
+
|
[-]
[+]
|
Added |
sflowtool-3.20.tar.bz2/INSTALL.Windows
^
|
@@ -0,0 +1,2 @@
+The code in the "src" directory compiles cleanly in a Microsoft Visual C++ "console application" project on Windows 7, provided you set the option to compile as C++ (Project>Properties>C/C++>Advanced>Compile As == C++)
+
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/Makefile.am
^
|
@@ -1,2 +1,2 @@
SUBDIRS=src
-EXTRA_DIST=scripts
+EXTRA_DIST=scripts/ipTopTalkers scripts/ipTrafficMatrix scripts/README scripts/sflowenable scripts/sflowRRDChart.cgi scripts/sflowRRDLoad INSTALL.Windows
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/Makefile.in
^
|
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,105 +13,181 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-SHELL = @SHELL@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-host_alias = @host_alias@
+build_triplet = @build@
host_triplet = @host@
-
-EXEEXT = @EXEEXT@
-OBJEXT = @OBJEXT@
-PATH_SEPARATOR = @PATH_SEPARATOR@
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+ config.guess config.sub depcomp install-sh missing
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
+am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
SUBDIRS = src
-EXTRA_DIST = scripts
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
- uninstall-info-recursive all-recursive install-data-recursive \
- install-exec-recursive installdirs-recursive install-recursive \
- uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
- Makefile.in NEWS aclocal.m4 config.guess config.h.in config.sub \
- configure configure.in depcomp install-sh missing mkinstalldirs
-DIST_SUBDIRS = $(SUBDIRS)
+EXTRA_DIST = scripts/ipTopTalkers scripts/ipTrafficMatrix scripts/README scripts/sflowenable scripts/sflowRRDChart.cgi scripts/sflowRRDLoad INSTALL.Windows
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
-$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): configure.in
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@@ -123,10 +199,10 @@
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
-
-$(srcdir)/config.h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/config.h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
- touch $(srcdir)/config.h.in
+ rm -f stamp-h1
+ touch $@
distclean-hdr:
-rm -f config.h stamp-h1
@@ -139,7 +215,13 @@
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @set fnord $$MAKEFLAGS; amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -151,7 +233,7 @@
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -159,7 +241,13 @@
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $$MAKEFLAGS; amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -180,17 +268,16 @@
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
-
-ETAGS = etags
-ETAGSFLAGS =
-
-tags: TAGS
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -200,14 +287,23 @@
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
+tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
@@ -216,8 +312,24 @@
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(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; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
@@ -226,29 +338,24 @@
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = .
-distdir = $(PACKAGE)-$(VERSION)
-
-am__remove_distdir = \
- { test ! -d $(distdir) \
- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr $(distdir); }; }
-
-GZIP_ENV = --best
-distcleancheck_listfiles = find . -type f -print
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
- @list='$(DISTFILES)'; for file in $$list; do \
+ $(mkdir_p) $(distdir)/scripts
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -263,45 +370,75 @@
|| exit 1; \
fi; \
done
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$(top_distdir)" \
- distdir=../$(distdir)/$$subdir \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ -find $(distdir) -type d ! -perm -755 -exec chmod a+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
- $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
- $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
- $(am__remove_distdir)
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
chmod a-w $(distdir)
- dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
- && cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -309,23 +446,40 @@
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
- || { echo "ERROR: files left after uninstall:" ; \
- find $$dc_install_base -type f -print ; \
- exit 1; } >&2 ) \
- && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
- && rm -f $(distdir).tar.gz \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
- @echo "$(distdir).tar.gz is ready for distribution" | \
- sed 'h;s/./=/g;p;x;p;x'
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
distcleancheck: distclean
- if test '$(srcdir)' = . ; then \
+ @if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
- test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left after distclean:" ; \
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
@@ -333,7 +487,6 @@
all-am: Makefile config.h
installdirs: installdirs-recursive
installdirs-am:
-
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
@@ -345,7 +498,7 @@
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -353,7 +506,7 @@
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -364,12 +517,15 @@
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
dvi-am:
+html: html-recursive
+
info: info-recursive
info-am:
@@ -386,32 +542,40 @@
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf autom4te.cache
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
-.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
- clean-generic clean-recursive dist dist-all dist-gzip distcheck \
- distclean distclean-generic distclean-hdr distclean-recursive \
- distclean-tags distcleancheck distdir dvi dvi-am dvi-recursive \
- info info-am info-recursive install install-am install-data \
- install-data-am install-data-recursive install-exec \
- install-exec-am install-exec-recursive install-info \
- install-info-am install-info-recursive install-man \
- install-recursive install-strip installcheck installcheck-am \
- installdirs installdirs-am installdirs-recursive \
- maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-recursive tags tags-recursive uninstall \
- uninstall-am uninstall-info-am uninstall-info-recursive \
- uninstall-recursive
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-recursive ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
+ dist-tarZ dist-zip distcheck distclean distclean-generic \
+ distclean-hdr distclean-recursive distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/NEWS
^
|
@@ -1 +1,3 @@
-Feb-5-2002 http://www.sflow.org now online.
\ No newline at end of file
+Jun-1-2007 http://www.inmon.com/products/sFlowTrend.php
+Apr-17-2007 http://www.inmon.com/support/sentinel2_release.php
+Feb-5-2002 http://www.sflow.org now online
\ No newline at end of file
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/README
^
|
@@ -221,5 +221,5 @@
---
----------------------------------------
-Neil McKee (mailto:neil_mckee@inmon.com)
+Neil McKee (mailto:neil.mckee@inmon.com)
InMon Corp. http://www.inmon.com
\ No newline at end of file
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/aclocal.m4
^
|
@@ -1,7 +1,7 @@
-# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,307 +11,32 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# Do all the work for Automake. -*- Autoconf -*-
-
-# This macro actually does too much some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
-
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-AC_PREREQ([2.52])
-
-# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
-# the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
- AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
- AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_MISSING_PROG(AMTAR, tar)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_][CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_][CC],
- defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_][CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_][CXX],
- defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.6.3])])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
-
-# serial 2
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+ [AM_AUTOMAKE_VERSION([1.9.6])])
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
-# Check to make sure that the build environment is sane.
-#
-
-# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
-
-# serial 3
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# -*- Autoconf -*-
-
-
-# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
-
-# serial 3
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# AM_AUX_DIR_EXPAND
-
-# Copyright 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
@@ -351,105 +76,61 @@
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
-# Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])
-
-AC_DEFUN([AM_AUX_DIR_EXPAND], [
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
+# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 7
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-# AM_PROG_INSTALL_STRIP
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# Copyright 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
-
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# serial 4 -*- Autoconf -*-
-
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
-
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+# serial 8
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
@@ -487,18 +168,34 @@
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@@ -516,13 +213,25 @@
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- am_cv_$1_dependencies_compiler_type=$depmode
- break
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
fi
done
@@ -533,6 +242,9 @@
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
@@ -541,16 +253,8 @@
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
-[rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
- DEPDIR=.deps
-else
- # MS-DOS does not allow filenames that begin with a dot.
- DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
-AC_SUBST([DEPDIR])
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
@@ -558,8 +262,8 @@
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking Speeds up one-time builds
- --enable-dependency-tracking Do not reject slow dependency extractors])
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
@@ -568,26 +272,16 @@
AC_SUBST([AMDEPBACKSLASH])
])
-# Generate code to set up dependency tracking. -*- Autoconf -*-
+# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-#serial 2
+#serial 3
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
@@ -606,27 +300,21 @@
else
continue
fi
- grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
- # Extract the definition of DEP_FILES from the Makefile without
- # running `make'.
- DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n -e '/^U = / s///p' < "$mf"`
- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- # We invoke sed twice because it is the simplest approach to
- # changing $(DEPDIR) to its actual value in the expansion.
- for file in `sed -n -e '
- /^DEP_FILES = .*\\\\$/ {
- s/^DEP_FILES = //
- :loop
- s/\\\\$//
- p
- n
- /\\\\$/ b loop
- p
- }
- /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
@@ -652,33 +340,186 @@
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
-# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 8
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# serial 2
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
-doit:
+am__doit:
@echo done
+.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
@@ -692,7 +533,7 @@
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
@@ -706,131 +547,316 @@
_am_result=BSD
fi
fi
-AC_SUBST(am__include)
-AC_SUBST(am__quote)
-AC_MSG_RESULT($_am_result)
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
-# AM_CONDITIONAL -*- Autoconf -*-
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 4
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
-# serial 5
-AC_PREREQ(2.52)
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
else
- $1_TRUE='#'
- $1_FALSE=
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([conditional \"$1\" was never defined.
-Usually this means the macro was only invoked conditionally.])
-fi])])
+AC_SUBST([mkdir_p])])
-# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
+# Helper functions for option handling. -*- Autoconf -*-
-# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# serial 3
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# 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.
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-AC_PREREQ([2.52])
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-# serial 6
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. We must strip everything past the first ":",
-# and everything past the last "/".
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# _AM_DIRNAME(PATH)
-# -----------------
-# Like AS_DIRNAME, only do it during macro expansion
-AC_DEFUN([_AM_DIRNAME],
- [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
- m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
- m4_if(regexp([$1], [^/.*]), -1,
- [.],
- patsubst([$1], [^\(/\).*], [\1])),
- patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
- patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
-])# _AM_DIRNAME
-
-
-# The stamp files are numbered to have different names.
-# We could number them on a directory basis, but that's additional
-# complications, let's have a unique counter.
-m4_define([_AM_STAMP_Count], [0])
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# _AM_STAMP(HEADER)
-# -----------------
-# The name of the stamp file for HEADER.
-AC_DEFUN([_AM_STAMP],
-[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
-AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
- [:.*])))/stamp-h[]_AM_STAMP_Count])
-
-
-# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
-# ------------------------------------------------------------
-# We used to try to get a real timestamp in stamp-h. But the fear is that
-# that will cause unnecessary cvs conflicts.
-AC_DEFUN([_AM_CONFIG_HEADER],
-[# Add the stamp file to the list of files AC keeps track of,
-# along with our hook.
-AC_CONFIG_HEADERS([$1],
- [# update the timestamp
-echo 'timestamp for $1' >"_AM_STAMP([$1])"
-$2],
- [$3])
-])# _AM_CONFIG_HEADER
-
-
-# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
-# --------------------------------------------------------------
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
-])# AM_CONFIG_HEADER
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/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, 2004, 2005 Free Software Foundation, Inc.
-timestamp='2001-09-04'
+timestamp='2005-07-08'
# 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
@@ -17,15 +17,18 @@
#
# 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.
-# Written by Per Bothner <bothner@cygnus.com>.
-# Please send patches to <config-patches@gnu.org>.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. 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 +55,7 @@
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -65,11 +68,11 @@
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.
@@ -87,30 +90,42 @@
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.
-set_cc_for_build='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
+# 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 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 ;
- rm -f $dummy.c $dummy.o $dummy.rel ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac'
+esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -127,29 +142,30 @@
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
@@ -166,120 +182,125 @@
;;
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 ;;
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
+ case $UNAME_RELEASE in
+ *4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # 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 Pn.n version is a patched version.
# 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 <<EOF >$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
- eval $set_cc_for_build
- $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"
- ;;
- 2-1307)
- UNAME_MACHINE="alphaev68"
- ;;
- esac
- fi
- rm -f $dummy.s $dummy
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit 0 ;;
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
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
# of the specific Alpha model?
echo alpha-pc-interix
- exit 0 ;;
+ exit ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
- exit 0 ;;
+ exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
- exit 0;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:[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}
- exit 0 ;;
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
- exit 0 ;;
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
- exit 0;;
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
- exit 0;;
+ exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -287,25 +308,32 @@
else
echo pyramid-pyramid-bsd
fi
- exit 0 ;;
+ exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
- exit 0 ;;
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
@@ -314,12 +342,12 @@
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit 0 ;;
+ exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
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)
@@ -329,16 +357,10 @@
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
- exit 0 ;;
+ exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
- exit 0 ;;
- sparc*:NetBSD:*)
- echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
- exit 0 ;;
- atari*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
# 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
@@ -349,49 +371,40 @@
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:*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 ;;
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
- exit 0 ;;
+ exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -415,27 +428,33 @@
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 &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
- exit 0 ;;
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
- exit 0 ;;
+ exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
- exit 0 ;;
+ exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
- exit 0 ;;
+ exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -451,29 +470,29 @@
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
- exit 0 ;;
+ exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
- exit 0 ;;
+ exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
- exit 0 ;;
+ exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit 0 ;;
+ exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
- exit 0 ;;
+ exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
@@ -481,7 +500,7 @@
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit 0 ;;
+ exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
@@ -496,17 +515,20 @@
exit(0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- echo rs6000-ibm-aix3.2.5
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
- exit 0 ;;
+ exit ;;
*: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
@@ -518,38 +540,36 @@
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit 0 ;;
+ exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
- exit 0 ;;
+ exit ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
- exit 0 ;;
+ exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
+ exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
- exit 0 ;;
+ exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
- exit 0 ;;
+ exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
- exit 0 ;;
+ exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
- exit 0 ;;
+ exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
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
@@ -558,13 +578,13 @@
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
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -597,17 +617,37 @@
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
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
+ exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
- exit 0 ;;
+ exit ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -635,158 +675,210 @@
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 && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
- exit 0 ;;
+ exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
- exit 0 ;;
+ exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
- exit 0 ;;
+ exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
- exit 0 ;;
+ exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
- exit 0 ;;
+ exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
- exit 0 ;;
+ exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
- exit 0 ;;
+ exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
- exit 0 ;;
- hppa*:OpenBSD:*:*)
- echo hppa-unknown-openbsd
- exit 0 ;;
+ exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit 0 ;;
- CRAY*X-MP:*:*:*)
- echo xmp-cray-unicos
- exit 0 ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
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 ;;
+ exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY-2:*:*:*)
- echo cray2-cray-unicos
- exit 0 ;;
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
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}
- exit 0 ;;
+ exit ;;
+ 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 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*: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/[-_].*/\./'`
- exit 0 ;;
+ exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
- exit 0 ;;
+ exit ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
- exit 0 ;;
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
+ exit ;;
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ exit ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
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
- exit 0 ;;
+ echo i586-pc-interix
+ exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
+ exit ;;
+ amd64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
- exit 0 ;;
+ exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
*:GNU:*:*)
+ # the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit 0 ;;
+ exit ;;
+ *: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 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
+ exit ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux
- exit 0 ;;
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
mips:Linux:*:*)
- case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
- big) echo mips-unknown-linux-gnu && exit 0 ;;
- little) echo mipsel-unknown-linux-gnu && exit 0 ;;
- esac
+ 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
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ 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; }
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -800,7 +892,7 @@
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 ;;
+ exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -808,27 +900,31 @@
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
esac
- exit 0 ;;
+ exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
- exit 0 ;;
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
i*86:Linux:*:*)
# 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_targets=`cd /; ld --help 2>&1 \
+ # 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 targets: *//
@@ -840,52 +936,54 @@
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
+ exit ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0 ;;
+ exit ;;
"")
# 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 ;;
+ exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
- cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h> /* 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-pc-linux-gnu\n", argv[1]);
-# else
- printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-# endif
-# else
- printf ("%s-pc-linux-gnulibc1\n", argv[1]);
-# endif
-#else
- printf ("%s-pc-linux-gnuaout\n", argv[1]);
-#endif
- return 0;
-}
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #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
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
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 ;;
+ exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
@@ -893,7 +991,27 @@
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit 0 ;;
+ exit ;;
+ 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 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
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
@@ -901,99 +1019,100 @@
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
- exit 0 ;;
- i*86:*:5:[78]*)
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
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 ;;
+ exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/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 ;;
+ exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
- exit 0 ;;
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
- exit 0 ;;
+ exit ;;
paragon:*:*:*)
echo i860-intel-osf1
- exit 0 ;;
+ exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
- exit 0 ;;
+ exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
- 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)
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 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 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4 && exit 0 ;;
+ && { echo i486-ncr-sysv4; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
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 ;;
+ exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1001,82 +1120,99 @@
else
echo ns32k-sni-sysv
fi
- exit 0 ;;
+ exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
- exit 0 ;;
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
- exit 0 ;;
+ exit ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
- exit 0 ;;
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
- exit 0 ;;
+ exit ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
- exit 0 ;;
+ exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
- exit 0 ;;
+ exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
- exit 0 ;;
+ exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
- exit 0 ;;
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Darwin:*:*)
- echo `uname -p`-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ *86) UNAME_PROCESSOR=i686 ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
*: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
- exit 0 ;;
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
- exit 0 ;;
- NSR-[KW]:NONSTOP_KERNEL:*:*)
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
- exit 0 ;;
+ exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
- exit 0 ;;
+ exit ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
@@ -1087,36 +1223,44 @@
UNAME_MACHINE="$cputype"
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 ;;
+ exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
- exit 0 ;;
+ exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
- exit 0 ;;
+ exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
- exit 0 ;;
+ exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
- exit 0 ;;
+ exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
- exit 0 ;;
+ exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
- exit 0 ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1148,7 +1292,7 @@
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix"); exit (0);
+ printf ("arm-acorn-riscix\n"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
@@ -1237,12 +1381,12 @@
}
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 && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
# Convex versions that predate uname can use getsysinfo(1)
@@ -1251,22 +1395,22 @@
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
c34*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
c38*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
c4*)
echo c4-convex-bsd
- exit 0 ;;
+ exit ;;
esac
fi
@@ -1277,7 +1421,9 @@
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- ftp://ftp.gnu.org/pub/gnu/config/
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/config.h.in
^
|
@@ -3,6 +3,9 @@
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
@@ -39,14 +42,20 @@
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
-/* description */
-#undef HAVE_STRUCT_IN6_ADDR
+/* Define to 1 if you have the `strspn' function. */
+#undef HAVE_STRSPN
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
@@ -66,12 +75,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* description */
-#undef HAVE_U_INT64_T
-
-/* description */
-#undef HAVE_U_INTXX_T
-
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/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, 2004, 2005 Free Software Foundation, Inc.
-timestamp='2001-09-07'
+timestamp='2005-07-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,15 +21,17 @@
#
# 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>.
+
+# Please send patches to <config-patches@gnu.org>. 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.
@@ -69,7 +71,7 @@
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -82,11 +84,11 @@
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.
@@ -98,7 +100,7 @@
*local*)
# First pass through any local machine types.
echo $1
- exit 0;;
+ exit ;;
* )
break ;;
@@ -117,7 +119,8 @@
# 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* | windows32-*)
+ 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/'`
;;
@@ -143,7 +146,7 @@
-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
;;
@@ -226,35 +229,56 @@
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 \
+ | bfin \
| c4x | clipper \
- | d10v | d30v | dsp16xx \
- | fr30 \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
- | m32r | m68000 | m68k | m88k | mcore \
- | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el | mips64vr4300 \
- | mips64vr4300el | mips64vr5000 | mips64vr5000el \
- | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
- | mipsisa32 \
+ | ip2k | iq2000 \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | ms1 \
+ | msp430 \
| ns16k | ns32k \
- | openrisc \
+ | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | s390 | s390x \
- | sh | sh[34] | sh[34]eb | shbe | shle \
- | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
- | stormy16 | strongarm \
- | tahoe | thumb | tic80 | tron \
- | v850 \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
| we32k \
- | x86 | xscale \
+ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
+ m32c)
+ basic_machine=$basic_machine-unknown
+ ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -278,41 +302,65 @@
580-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alphapca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armv*-* \
- | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c54x-* \
- | clipper-* | cray2-* | cydra-* \
- | d10v-* | d30v-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | fx80-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
- | m32r-* \
- | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | mcore-* \
- | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
- | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
- | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+ | ip2k-* | iq2000-* \
+ | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | ms1-* \
+ | msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | s390-* | s390x-* \
- | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
- | sparc-* | sparc64-* | sparc86x-* | sparclite-* \
- | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
- | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
- | v850-* | vax-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
+ m32c-*)
+ ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -329,6 +377,9 @@
basic_machine=a29k-amd
os=-udi
;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@@ -343,6 +394,12 @@
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
@@ -374,6 +431,10 @@
basic_machine=ns32k-sequent
os=-dynix
;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -394,30 +455,45 @@
basic_machine=c38-convex
os=-bsd
;;
- cray | ymp)
- basic_machine=ymp-cray
+ cray | j90)
+ basic_machine=j90-cray
os=-unicos
;;
- cray2)
- basic_machine=cray2-cray
- os=-unicos
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
;;
- [cjt]90)
- basic_machine=${basic_machine}-cray
- os=-unicos
+ cr16c)
+ basic_machine=cr16c-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
;;
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
@@ -426,6 +502,10 @@
basic_machine=m88k-motorola
os=-sysv3
;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@@ -598,28 +678,20 @@
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/'`
;;
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
;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -699,6 +771,13 @@
basic_machine=hppa1.1-oki
os=-proelf
;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@@ -721,49 +800,55 @@
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/^[^-]*-//'`
;;
@@ -784,10 +869,26 @@
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
;;
@@ -795,7 +896,10 @@
basic_machine=sh-hitachi
os=-hms
;;
- sparclite-wrs)
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -862,22 +966,42 @@
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
@@ -899,8 +1023,8 @@
os=-vms
;;
vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
+ basic_machine=f301-fujitsu
+ ;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
@@ -921,17 +1045,17 @@
basic_machine=hppa1.1-winbond
os=-proelf
;;
- windows32)
- basic_machine=i386-pc
- os=-windows32-msvcrt
- ;;
- xmp)
- basic_machine=xmp-cray
- os=-unicos
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
;;
- xps | xps100)
+ xps | xps100)
basic_machine=xps100-honeywell
;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
@@ -952,16 +1076,12 @@
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
;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
rs6000)
basic_machine=rs6000-ibm
;;
@@ -978,13 +1098,13 @@
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh3eb | sh4eb)
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
- cydra)
+ cydra)
basic_machine=cydra-cydrome
;;
orion)
@@ -999,10 +1119,6 @@
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
- c4x*)
- basic_machine=c4x-none
- os=-coff
- ;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
@@ -1058,17 +1174,21 @@
| -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* \
+ | -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* \
| -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* | -vos*)
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1080,16 +1200,21 @@
;;
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|'`
;;
@@ -1102,6 +1227,9 @@
-opened*)
os=-openedition
;;
+ -os400*)
+ os=-os400
+ ;;
-wince*)
os=-wince
;;
@@ -1120,14 +1248,23 @@
-acis*)
os=-aos
;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
-ns2 )
- os=-nextstep2
+ os=-nextstep2
;;
-nsk*)
os=-nsk
@@ -1139,6 +1276,9 @@
-sinix*)
os=-sysv4
;;
+ -tpf*)
+ os=-tpf
+ ;;
-triton*)
os=-sysv3
;;
@@ -1166,8 +1306,17 @@
-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
;;
-none)
;;
@@ -1200,10 +1349,14 @@
arm*-semi)
os=-aout
;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
- pdp11-*)
+ pdp11-*)
os=-none
;;
*-dec | vax-*)
@@ -1230,6 +1383,9 @@
mips*-*)
os=-elf
;;
+ or32-*)
+ os=-coff
+ ;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
@@ -1239,9 +1395,15 @@
*-be)
os=-beos
;;
+ *-haiku)
+ os=-haiku
+ ;;
*-ibm)
os=-aix
;;
+ *-knuth)
+ os=-mmixware
+ ;;
*-wec)
os=-proelf
;;
@@ -1293,19 +1455,19 @@
*-next)
os=-nextstep3
;;
- *-gould)
+ *-gould)
os=-sysv
;;
- *-highlevel)
+ *-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
- *-sgi)
+ *-sgi)
os=-irix
;;
- *-siemens)
+ *-siemens)
os=-sysv4
;;
*-masscomp)
@@ -1374,10 +1536,16 @@
-mvs* | -opened*)
vendor=ibm
;;
+ -os400*)
+ vendor=ibm
+ ;;
-ptx*)
vendor=sequent
;;
- -vxsim* | -vxworks*)
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
@@ -1401,7 +1569,7 @@
esac
echo $basic_machine$os
-exit 0
+exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/configure
^
|
@@ -1,9 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57.
+# Generated by GNU Autoconf 2.59.
#
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -20,9 +19,10 @@
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
@@ -41,7 +41,7 @@
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
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
@@ -218,16 +218,17 @@
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
+ test -d ./-p && rmdir ./-p
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"
+as_tr_cpp="eval 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"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
@@ -309,7 +310,7 @@
# include <unistd.h>
#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 INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPP EGREP LIBOBJS LTLIBOBJS'
+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 INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPP EGREP LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -668,7 +669,7 @@
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+ localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
@@ -708,10 +709,10 @@
# Try the directory containing this script, then its parent.
ac_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -803,9 +804,9 @@
cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -849,8 +850,8 @@
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --disable-dependency-tracking Speeds up one-time builds
- --enable-dependency-tracking Do not reject slow dependency extractors
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
Some influential environment variables:
CC C compiler command
@@ -897,12 +898,45 @@
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`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
@@ -913,7 +947,7 @@
echo
$SHELL $ac_srcdir/configure --help=recursive
elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
+ test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
@@ -927,8 +961,7 @@
if $ac_init_version; then
cat <<\_ACEOF
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -940,7 +973,7 @@
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
+generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1017,19 +1050,19 @@
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.
+ 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
+ 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.
@@ -1063,12 +1096,12 @@
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"
+ "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"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
}
@@ -1097,7 +1130,7 @@
for ac_var in $ac_subst_files
do
eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
@@ -1116,7 +1149,7 @@
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
- rm -f core core.* *.core &&
+ rm -f core *.core &&
rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
@@ -1196,7 +1229,7 @@
# 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
+ 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"
@@ -1213,13 +1246,13 @@
,);;
*)
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:$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:$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:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
@@ -1268,8 +1301,8 @@
PACKAGE=sflowtool
-VERSION=3.10
-am__api_version="1.6"
+VERSION=3.20
+am__api_version="1.9"
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -1306,6 +1339,7 @@
# 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"
+# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
@@ -1322,6 +1356,7 @@
case $as_dir/ in
./ | .// | /cC/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
@@ -1329,20 +1364,20 @@
# 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
+ 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
done
;;
@@ -1430,7 +1465,6 @@
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed
-
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -1444,6 +1478,39 @@
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -1486,7 +1553,7 @@
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1513,7 +1580,16 @@
SET_MAKE="MAKE=${MAKE-make}"
fi
- # test to see if srcdir already configured
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
{ { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
@@ -1521,6 +1597,16 @@
{ (exit 1); exit 1; }; }
fi
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
# Define the identity of the package.
PACKAGE=$PACKAGE
VERSION=$VERSION
@@ -1551,9 +1637,6 @@
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
install_sh=${install_sh-"$am_aux_dir/install-sh"}
# Installed binaries are usually stripped using `strip' when the user
@@ -1646,15 +1729,18 @@
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-# Add the stamp file to the list of files AC keeps track of,
-# along with our hook.
- ac_config_headers="$ac_config_headers config.h"
+ ac_config_headers="$ac_config_headers config.h"
+
# Checks for programs.
@@ -1994,7 +2080,6 @@
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2014,8 +2099,8 @@
# 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
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $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
@@ -2035,23 +2120,23 @@
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.
- ;;
+ # This is the source file.
+ ;;
[ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
+ # 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;;
+ 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;;
+ break;;
esac
done
else
@@ -2125,8 +2210,8 @@
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;;
+ export ac_cv_exeext
+ break;;
* ) break;;
esac
done
@@ -2151,7 +2236,6 @@
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
@@ -2202,7 +2286,6 @@
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
@@ -2222,11 +2305,21 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2239,7 +2332,7 @@
ac_compiler_gnu=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
@@ -2255,7 +2348,6 @@
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
@@ -2272,11 +2364,21 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2289,7 +2391,7 @@
ac_cv_prog_cc_g=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err 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
@@ -2316,7 +2418,6 @@
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
@@ -2344,6 +2445,16 @@
va_end (v);
return s;
}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2370,11 +2481,21 @@
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
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2387,7 +2508,7 @@
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext
+rm -f conftest.err conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
@@ -2415,19 +2536,28 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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 <stdlib.h>' \
+ '' \
'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 ();' \
@@ -2435,14 +2565,13 @@
'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 <stdlib.h>
$ac_declaration
+#include <stdlib.h>
int
main ()
{
@@ -2453,11 +2582,21 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2470,9 +2609,8 @@
continue
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2489,11 +2627,21 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2505,7 +2653,7 @@
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
@@ -2519,30 +2667,22 @@
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err 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
-rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
- DEPDIR=.deps
-else
- # MS-DOS does not allow filenames that begin with a dot.
- DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
-
+DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
am_make=${MAKE-make}
cat > confinc << 'END'
-doit:
+am__doit:
@echo done
+.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
@@ -2557,7 +2697,7 @@
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
@@ -2617,18 +2757,34 @@
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@@ -2646,13 +2802,25 @@
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- am_cv_CC_dependencies_compiler_type=$depmode
- break
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
fi
done
@@ -2669,6 +2837,18 @@
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
# Checks for libraries.
# Make sure we can run config.sub.
@@ -2761,7 +2941,6 @@
# 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
@@ -2772,7 +2951,7 @@
#else
# include <assert.h>
#endif
- Syntax error
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2784,6 +2963,7 @@
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2804,7 +2984,6 @@
# 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
@@ -2822,6 +3001,7 @@
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2868,7 +3048,6 @@
# 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
@@ -2879,7 +3058,7 @@
#else
# include <assert.h>
#endif
- Syntax error
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2891,6 +3070,7 @@
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2911,7 +3091,6 @@
# 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
@@ -2929,6 +3108,7 @@
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2989,7 +3169,6 @@
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
@@ -3010,11 +3189,21 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3027,12 +3216,11 @@
ac_cv_header_stdc=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err 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
@@ -3054,7 +3242,6 @@
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3079,7 +3266,6 @@
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3091,9 +3277,9 @@
# 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'))
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
@@ -3104,7 +3290,7 @@
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
+ || toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
@@ -3129,7 +3315,7 @@
( 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
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
@@ -3154,7 +3340,7 @@
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.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
@@ -3163,7 +3349,6 @@
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
@@ -3175,11 +3360,21 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3192,7 +3387,7 @@
eval "$as_ac_Header=no"
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err 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
@@ -3213,7 +3408,8 @@
-for ac_header in netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h
+
+for ac_header in fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -3229,7 +3425,6 @@
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
@@ -3240,11 +3435,21 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3257,7 +3462,7 @@
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -3265,7 +3470,6 @@
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
@@ -3283,6 +3487,7 @@
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -3302,33 +3507,32 @@
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag 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
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- no:yes )
+ 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: 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: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&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;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@@ -3339,7 +3543,7 @@
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- eval "$as_ac_Header=$ac_header_preproc"
+ 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
@@ -3362,7 +3566,6 @@
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
@@ -3425,11 +3628,21 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3442,7 +3655,7 @@
ac_cv_c_const=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
@@ -3460,7 +3673,6 @@
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
@@ -3481,11 +3693,21 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3498,7 +3720,7 @@
ac_cv_header_time=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err 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
@@ -3511,401 +3733,424 @@
fi
-echo "$as_me:$LINENO: checking for struct in6_addr" >&5
-echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6
-if test "${ac_cv_have_struct_in6_addr+set}" = set; then
+# Checks for library functions.
+
+
+for ac_header in sys/select.h sys/socket.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 <<_ACEOF
-#line $LINENO "configure"
+ # 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
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-int
-main ()
-{
- struct in6_addr s; s.s6_addr[0] = 0;
- ;
- return 0;
-}
+$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
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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_have_struct_in6_addr="yes"
+ ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_struct_in6_addr="no"
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5
-echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6
-if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_IN6_ADDR
-_ACEOF
-
+ac_header_compiler=no
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
-echo "$as_me:$LINENO: checking for u_intXX_t types" >&5
-echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6
-if test "${ac_cv_have_u_intxx_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+# 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
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
- #include <sys/types.h>
-int
-main ()
-{
- u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
- ;
- return 0;
-}
+#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
+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); }; }; then
- ac_cv_have_u_intxx_t="yes"
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_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_cv_have_u_intxx_t="no"
-
+ ac_header_preproc=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+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:$ac_c_preproc_warn_flag 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 compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ 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: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&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;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_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: $ac_cv_have_u_intxx_t" >&5
-echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6
-if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_U_INTXX_T
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- have_u_intxx_t=1
fi
-echo "$as_me:$LINENO: checking for u_int64_t types" >&5
-echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6
-if test "${ac_cv_have_u_int64_t+set}" = set; then
+done
+
+echo "$as_me:$LINENO: checking types of arguments for select" >&5
+echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
+if test "${ac_cv_func_select_args+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+ for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
+ for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
+ for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
- #include <sys/types.h>
+$ac_includes_default
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
int
main ()
{
- u_int64_t a; a = 1;
+extern int select ($ac_arg1,
+ $ac_arg234, $ac_arg234, $ac_arg234,
+ $ac_arg5);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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_have_u_int64_t="yes"
+ ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_u_int64_t="no"
-
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ done
+done
+# Provide a safe default value.
+: ${ac_cv_func_select_args='int,int *,struct timeval *'}
fi
-echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5
-echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6
-if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
+echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
+echo "${ECHO_T}$ac_cv_func_select_args" >&6
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_U_INT64_T
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG1 $1
_ACEOF
- have_u_int64_t=1
-fi
-# Checks for library functions.
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG234 ($2)
+_ACEOF
-for ac_header in sys/select.h sys/socket.h
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG5 ($3)
+_ACEOF
+
+rm -f conftest*
+
+
+for ac_func in strftime
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
+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
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- # 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"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* 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
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (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
+ (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=$?
- 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
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=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"
+eval "$as_ac_var=no"
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+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_header" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
-fi
-
-done
-
-echo "$as_me:$LINENO: checking types of arguments for select" >&5
-echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
-if test "${ac_cv_func_select_args+set}" = set; then
+else
+ # strftime is in -lintl on SCO UNIX.
+echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
+echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_strftime+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
- for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
- for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#if HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#endif
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#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 strftime ();
int
main ()
{
-extern int select ($ac_arg1,
- $ac_arg234, $ac_arg234, $ac_arg234,
- $ac_arg5);
+strftime ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 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); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { 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_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
+ ac_cv_lib_intl_strftime=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_lib_intl_strftime=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- done
- done
-done
-# Provide a safe default value.
-: ${ac_cv_func_select_args='int,int *,struct timeval *'}
-
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
-echo "${ECHO_T}$ac_cv_func_select_args" >&6
-ac_save_IFS=$IFS; IFS=','
-set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
-IFS=$ac_save_IFS
-shift
-
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG1 $1
+echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
+if test $ac_cv_lib_intl_strftime = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRFTIME 1
_ACEOF
+LIBS="-lintl $LIBS"
+fi
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG234 ($2)
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG5 ($3)
-_ACEOF
-
-rm -f conftest*
+fi
+done
for ac_func in vprintf
@@ -3917,21 +4162,28 @@
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. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef $ac_func
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -3962,11 +4214,21 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 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); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3979,7 +4241,8 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err 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
@@ -3994,21 +4257,28 @@
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. */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define _doprnt innocuous__doprnt
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef _doprnt
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -4039,11 +4309,21 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 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); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4056,7 +4336,8 @@
ac_cv_func__doprnt=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
echo "${ECHO_T}$ac_cv_func__doprnt" >&6
@@ -4078,7 +4359,9 @@
-for ac_func in gethostbyname memset select socket strdup strerror
+
+
+for ac_func in gethostbyname memset select socket strdup strerror strspn strtol
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -4087,21 +4370,28 @@
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. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef $ac_func
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -4132,11 +4422,21 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 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); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (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); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4149,7 +4449,8 @@
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err 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
@@ -4192,13 +4493,13 @@
# `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"
+ "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"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
} |
@@ -4228,13 +4529,13 @@
# 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[ ]*=/{
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
+s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
-s/^[^=]*=[ ]*$//;
+s/^[^=]*=[ ]*$//;
}'
fi
@@ -4245,7 +4546,7 @@
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$//'`
+ 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'
@@ -4262,6 +4563,13 @@
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -4296,9 +4604,10 @@
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
@@ -4317,7 +4626,7 @@
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
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
@@ -4496,16 +4805,17 @@
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
+ test -d ./-p && rmdir ./-p
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"
+as_tr_cpp="eval 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"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
@@ -4532,7 +4842,7 @@
cat >&5 <<_CSEOF
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.57. Invocation command line was
+generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -4576,9 +4886,9 @@
-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
+ instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+ instantiate the configuration header FILE
Configuration files:
$config_files
@@ -4595,11 +4905,10 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.57,
+configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright (C) 2003 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
@@ -4797,6 +5106,7 @@
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
s,@PACKAGE@,$PACKAGE,;t t
s,@VERSION@,$VERSION,;t t
s,@ACLOCAL@,$ACLOCAL,;t t
@@ -4804,13 +5114,17 @@
s,@AUTOMAKE@,$AUTOMAKE,;t t
s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
-s,@AMTAR@,$AMTAR,;t t
s,@install_sh@,$install_sh,;t t
s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
@@ -4825,6 +5139,8 @@
s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
@@ -4866,9 +5182,9 @@
(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"
+ 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"
+ 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
@@ -4886,21 +5202,21 @@
# 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,:.*,,'` ;;
+ 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=`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 ||
+ 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; }
@@ -4916,10 +5232,10 @@
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 ||
+ 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; }
@@ -4957,12 +5273,45 @@
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`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
case $INSTALL in
@@ -4984,7 +5333,7 @@
configure_input="$ac_file. "
fi
configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
+ sed 's,.*/,,'` by configure."
# First look for the input files in the build tree, otherwise in the
# src tree.
@@ -4993,24 +5342,24 @@
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
+ # 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;;
+ 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
+ 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;;
+ fi;;
esac
done` || { (exit 1); exit 1; }
_ACEOF
@@ -5052,12 +5401,12 @@
# 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_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_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'
@@ -5066,11 +5415,11 @@
# 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,:.*,,'` ;;
+ 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=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
@@ -5084,28 +5433,29 @@
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
+ # 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;;
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ 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
+ 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;;
+ fi;;
esac
done` || { (exit 1); exit 1; }
# Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
_ACEOF
@@ -5128,9 +5478,9 @@
s,[\\$`],\\&,g
t clear
: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+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
+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
@@ -5144,13 +5494,13 @@
# 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.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+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 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
@@ -5159,7 +5509,7 @@
# Write a limited-size here document to $tmp/defines.sed.
echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
# Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
@@ -5186,7 +5536,7 @@
# Write a limited-size here document to $tmp/undefs.sed.
echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
# Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
@@ -5220,10 +5570,10 @@
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 ||
+ 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; }
@@ -5239,10 +5589,10 @@
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 ||
+ 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; }
@@ -5262,13 +5612,29 @@
cat $tmp/config.h
rm -f $tmp/config.h
fi
- # Run the commands associated with the file.
- case $ac_file in
- config.h ) # update the timestamp
-echo 'timestamp for config.h' >"./stamp-h1"
- ;;
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
+echo "timestamp for $ac_file" >`(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'`/stamp-h$_am_stamp_count
+done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
@@ -5280,16 +5646,41 @@
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 ||
+ 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'`
+ { 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
@@ -5315,12 +5706,45 @@
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`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
{ echo "$as_me:$LINENO: executing $ac_dest commands" >&5
@@ -5338,10 +5762,10 @@
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`(dirname "$mf") 2>/dev/null ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -5351,36 +5775,30 @@
else
continue
fi
- grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
- # Extract the definition of DEP_FILES from the Makefile without
- # running `make'.
- DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n -e '/^U = / s///p' < "$mf"`
- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- # We invoke sed twice because it is the simplest approach to
- # changing $(DEPDIR) to its actual value in the expansion.
- for file in `sed -n -e '
- /^DEP_FILES = .*\\\\$/ {
- s/^DEP_FILES = //
- :loop
- s/\\\\$//
- p
- n
- /\\\\$/ b loop
- p
- }
- /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`(dirname "$file") 2>/dev/null ||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -5396,10 +5814,10 @@
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 ||
+ 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; }
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/configure.in
^
|
@@ -4,7 +4,7 @@
AC_PREREQ(2.57)
AC_INIT(src/sflowtool.c)
PACKAGE=sflowtool
-VERSION=3.10
+VERSION=3.20
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR([src/sflow.h])
@@ -23,57 +23,17 @@
# Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
+AC_CHECK_HEADERS([fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_TIME
-AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
- AC_TRY_COMPILE(
- [
-#include <sys/types.h>
-#include <netinet/in.h>
- ],
- [ struct in6_addr s; s.s6_addr[0] = 0; ],
- [ ac_cv_have_struct_in6_addr="yes" ],
- [ ac_cv_have_struct_in6_addr="no" ]
- )
-])
-if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
- AC_DEFINE([HAVE_STRUCT_IN6_ADDR], [], [description])
-fi
-
-AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
- AC_TRY_COMPILE(
- [ #include <sys/types.h> ],
- [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
- [ ac_cv_have_u_intxx_t="yes" ],
- [ ac_cv_have_u_intxx_t="no" ]
- )
-])
-if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
- AC_DEFINE([HAVE_U_INTXX_T], [], [description])
- have_u_intxx_t=1
-fi
-
-AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
- AC_TRY_COMPILE(
- [ #include <sys/types.h> ],
- [ u_int64_t a; a = 1;],
- [ ac_cv_have_u_int64_t="yes" ],
- [ ac_cv_have_u_int64_t="no" ]
- )
-])
-if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
- AC_DEFINE([HAVE_U_INT64_T], [], [description])
- have_u_int64_t=1
-fi
-
# Checks for library functions.
AC_FUNC_SELECT_ARGTYPES
+AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([gethostbyname memset select socket strdup strerror])
+AC_CHECK_FUNCS([gethostbyname memset select socket strdup strerror strspn strtol])
AC_CONFIG_FILES([Makefile
src/Makefile])
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/depcomp
^
|
@@ -1,7 +1,9 @@
#! /bin/sh
-
# depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,8 +17,8 @@
# 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
@@ -25,22 +27,45 @@
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
-# `libtool' can also be set to `yes' or `no'.
-
-if test -z "$depfile"; then
- base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
- dir=`echo "$object" | sed 's,/.*$,/,'`
- if test "$dir" = "$object"; then
- dir=
- fi
- # FIXME: should be _deps on DOS.
- depfile="$dir.deps/$base"
-fi
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
@@ -172,19 +197,25 @@
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. This file always lives in the current directory.
- # Also, the AIX compiler puts `$object:' at the start of each line;
- # $object doesn't have directory information.
- stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
- outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
-
stat=$?
+
+ if test -f "$tmpdepfile"; then :
+ else
+ stripped=`echo "$stripped" | sed 's,^.*/,,'`
+ tmpdepfile="$stripped.u"
+ fi
+
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
@@ -192,6 +223,7 @@
fi
if test -f "$tmpdepfile"; then
+ outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
@@ -206,6 +238,44 @@
rm -f "$tmpdepfile"
;;
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -217,31 +287,47 @@
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
- tmpdepfile1="$dir.libs/$base.lo.d"
- tmpdepfile2="$dir.libs/$base.d"
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mecanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
- tmpdepfile1="$dir$base.o.d"
- tmpdepfile2="$dir$base.d"
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
- rm -f "$tmpdepfile1" "$tmpdepfile2"
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
- if test -f "$tmpdepfile1"; then
- tmpdepfile="$tmpdepfile1"
- else
- tmpdepfile="$tmpdepfile2"
- fi
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a space and a tab in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
@@ -254,7 +340,7 @@
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o.
+ # always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
@@ -265,9 +351,7 @@
shift
fi
- # Remove `-o $object'. We will use -o /dev/null later,
- # however we can't do the remplacement now because
- # `-o $object' might simply not be used
+ # Remove `-o $object'.
IFS=" "
for arg
do
@@ -287,7 +371,11 @@
done
test -z "$dashmflag" && dashmflag=-M
- "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
@@ -306,6 +394,13 @@
makedepend)
"$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
# X makedepend
shift
cleared=no
@@ -318,7 +413,9 @@
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
- -*)
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
@@ -339,7 +436,7 @@
cpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout.
+ # always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
@@ -370,7 +467,8 @@
done
"$@" -E |
- sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
@@ -381,7 +479,7 @@
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
+ # always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
@@ -421,3 +519,12 @@
esac
exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/install-sh
^
|
@@ -1,19 +1,38 @@
#!/bin/sh
-#
# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2005-05-14.22
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
#
-# Copyright 1991 by the Massachusetts Institute of Technology
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -23,13 +42,11 @@
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
-
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
-
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
@@ -41,211 +58,266 @@
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+chowncmd=
+chgrpcmd=
+stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- :
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=$mkdirprog
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f "$src" ] || [ -d "$src" ]
- then
- :
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- :
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- :
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c (ignored)
+-d create directories instead of installing files.
+-g GROUP $chgrpprog installed files to GROUP.
+-m MODE $chmodprog installed files to MODE.
+-o USER $chownprog installed files to USER.
+-s $stripprog installed files.
+-t DIRECTORY install into DIRECTORY.
+-T report an error if DSTFILE is a directory.
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
- '
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
+ -t) dstarg=$2
+ shift
+ shift
+ continue;;
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
+ -T) no_target_directory=true
shift
+ continue;;
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- :
- fi
+ --version) echo "$0 $scriptversion"; exit $?;;
- pathcomp="${pathcomp}/"
+ *) # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ test -n "$dir_arg$dstarg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- :
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
-fi &&
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ mkdircmd=:
+ chmodcmd=
+ else
+ mkdircmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dstarg: Is a directory" >&2
+ exit 1
+ fi
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ shift
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp"
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test -d "$pathcomp" || exit
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $mkdircmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Copy the file name to the temp name.
+ $doit $cpprog "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now rename the file to the real destination.
+ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+ || {
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit 1
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ }
+ }
+ fi || { (exit 1); exit 1; }
+done
-exit 0
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+ (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/missing
^
|
@@ -1,6 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -15,8 +19,8 @@
# 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
@@ -38,18 +42,24 @@
configure_ac=configure.in
fi
+msg="missing on your system"
+
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@@ -74,11 +84,15 @@
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing 0.4 - GNU automake"
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
;;
-*)
@@ -87,14 +101,44 @@
exit 1
;;
- aclocal*)
+esac
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+ lex|yacc)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
fi
+ ;;
+esac
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+ aclocal*)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
@@ -102,13 +146,8 @@
;;
autoconf)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
@@ -116,13 +155,8 @@
;;
autoheader)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
@@ -140,13 +174,8 @@
;;
automake*)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
@@ -156,16 +185,11 @@
;;
autom4te)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
proper tools for further handling them.
- You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+ You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
@@ -185,7 +209,7 @@
bison|yacc)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
@@ -215,7 +239,7 @@
lex|flex)
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
@@ -237,13 +261,8 @@
;;
help2man)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
@@ -262,32 +281,30 @@
;;
makeinfo)
- if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
- # We have makeinfo, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
-WARNING: \`$1' is missing on your system. You should only need it if
+WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
- fi
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
touch $file
;;
tar)
shift
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
@@ -323,10 +340,10 @@
*)
echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
- system. You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequirements for installing
+ it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
@@ -334,3 +351,10 @@
esac
exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/src/Makefile.in
^
|
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,121 +13,180 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-host_alias = @host_alias@
+build_triplet = @build@
host_triplet = @host@
-
-EXEEXT = @EXEEXT@
-OBJEXT = @OBJEXT@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-AMTAR = @AMTAR@
-AWK = @AWK@
-CC = @CC@
-DEPDIR = @DEPDIR@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-PACKAGE = @PACKAGE@
-STRIP = @STRIP@
-VERSION = @VERSION@
-am__include = @am__include@
-am__quote = @am__quote@
-install_sh = @install_sh@
-bin_PROGRAMS = sflowtool
-sflowtool_SOURCES = sflow.h sflowtool.h sflowtool.c
+bin_PROGRAMS = sflowtool$(EXEEXT)
subdir = src
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
-bin_PROGRAMS = sflowtool$(EXEEXT)
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
-
am_sflowtool_OBJECTS = sflowtool.$(OBJEXT)
sflowtool_OBJECTS = $(am_sflowtool_OBJECTS)
sflowtool_LDADD = $(LDADD)
-sflowtool_DEPENDENCIES =
-sflowtool_LDFLAGS =
-
-DEFS = @DEFS@
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/sflowtool.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-CFLAGS = @CFLAGS@
-DIST_SOURCES = $(sflowtool_SOURCES)
-DIST_COMMON = Makefile.am Makefile.in
SOURCES = $(sflowtool_SOURCES)
-
+DIST_SOURCES = $(sflowtool_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+sflowtool_SOURCES = sflow.h sflowtool.h sflowtool.c
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
@@ -135,8 +194,8 @@
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
- rm -f $(DESTDIR)$(bindir)/$$f; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@@ -146,35 +205,28 @@
$(LINK) $(sflowtool_LDFLAGS) $(sflowtool_OBJECTS) $(sflowtool_LDADD) $(LIBS)
mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
+ -rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sflowtool.Po@am__quote@
-distclean-depend:
- -rm -rf ./$(DEPDIR)
-
.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
uninstall-info-am:
-ETAGS = etags
-ETAGSFLAGS =
-
-tags: TAGS
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
@@ -183,6 +235,7 @@
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
+tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -194,8 +247,24 @@
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(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; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
@@ -204,19 +273,21 @@
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @list='$(DISTFILES)'; for file in $$list; do \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -234,10 +305,10 @@
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
-
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
-
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -249,7 +320,7 @@
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -257,7 +328,7 @@
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -267,14 +338,17 @@
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
dvi-am:
+html: html-am
+
info: info-am
info-am:
@@ -290,25 +364,34 @@
installcheck-am:
maintainer-clean: maintainer-clean-am
-
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic distclean distclean-compile distclean-depend \
- distclean-generic distclean-tags distdir dvi dvi-am info \
- info-am install install-am install-binPROGRAMS install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic ctags distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-exec install-exec-am \
+ install-info install-info-am install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-info-am
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/src/sflow.h
^
|
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002-2006 InMon Corp. Licensed under the terms of the InMon sFlow licence: */
+/* Copyright (c) 2002-2011 InMon Corp. Licensed under the terms of the InMon sFlow licence: */
/* http://www.inmon.com/technology/sflowlicense.txt */
/////////////////////////////////////////////////////////////////////////////////
@@ -12,18 +12,27 @@
extern "C" {
#endif
+typedef struct {
+ uint32_t addr;
+} SFLIPv4;
+
+typedef struct {
+ u_char addr[16];
+} SFLIPv6;
+
+typedef union _SFLAddress_value {
+ SFLIPv4 ip_v4;
+ SFLIPv6 ip_v6;
+} SFLAddress_value;
+
enum SFLAddress_type {
+ SFLADDRESSTYPE_UNDEFINED = 0,
SFLADDRESSTYPE_IP_V4 = 1,
SFLADDRESSTYPE_IP_V6 = 2
};
-typedef union _SFLAddress_value {
- struct in_addr ip_v4;
- struct in6_addr ip_v6;
-} SFLAddress_value;
-
typedef struct _SFLAddress {
- u_int32_t type; /* enum SFLAddress_type */
+ uint32_t type; /* enum SFLAddress_type */
SFLAddress_value address;
} SFLAddress;
@@ -47,55 +56,59 @@
SFLHEADER_AAL5_IP = 10, /* e.g. Cisco AAL5 mux */
SFLHEADER_IPv4 = 11,
SFLHEADER_IPv6 = 12,
- SFLHEADER_MPLS = 13
+ SFLHEADER_MPLS = 13,
+ SFLHEADER_POS = 14,
+ SFLHEADER_IEEE80211MAC = 15,
+ SFLHEADER_IEEE80211_AMPDU = 16,
+ SFLHEADER_IEEE80211_AMSDU_SUBFRAME = 17
};
/* raw sampled header */
typedef struct _SFLSampled_header {
- u_int32_t header_protocol; /* (enum SFLHeader_protocol) */
- u_int32_t frame_length; /* Original length of packet before sampling */
- u_int32_t stripped; /* header/trailer bytes stripped by sender */
- u_int32_t header_length; /* length of sampled header bytes to follow */
- u_int8_t *header_bytes; /* Header bytes */
+ uint32_t header_protocol; /* (enum SFLHeader_protocol) */
+ uint32_t frame_length; /* Original length of packet before sampling */
+ uint32_t stripped; /* header/trailer bytes stripped by sender */
+ uint32_t header_length; /* length of sampled header bytes to follow */
+ uint8_t *header_bytes; /* Header bytes */
} SFLSampled_header;
/* decoded ethernet header */
typedef struct _SFLSampled_ethernet {
- u_int32_t eth_len; /* The length of the MAC packet excluding
+ uint32_t eth_len; /* The length of the MAC packet excluding
lower layer encapsulations */
- u_int8_t src_mac[8]; /* 6 bytes + 2 pad */
- u_int8_t dst_mac[8];
- u_int32_t eth_type;
+ uint8_t src_mac[8]; /* 6 bytes + 2 pad */
+ uint8_t dst_mac[8];
+ uint32_t eth_type;
} SFLSampled_ethernet;
/* decoded IP version 4 header */
typedef struct _SFLSampled_ipv4 {
- u_int32_t length; /* The length of the IP packet
+ uint32_t length; /* The length of the IP packet
excluding lower layer encapsulations */
- u_int32_t protocol; /* IP Protocol type (for example, TCP = 6, UDP = 17) */
- struct in_addr src_ip; /* Source IP Address */
- struct in_addr dst_ip; /* Destination IP Address */
- u_int32_t src_port; /* TCP/UDP source port number or equivalent */
- u_int32_t dst_port; /* TCP/UDP destination port number or equivalent */
- u_int32_t tcp_flags; /* TCP flags */
- u_int32_t tos; /* IP type of service */
+ uint32_t protocol; /* IP Protocol type (for example, TCP = 6, UDP = 17) */
+ SFLIPv4 src_ip; /* Source IP Address */
+ SFLIPv4 dst_ip; /* Destination IP Address */
+ uint32_t src_port; /* TCP/UDP source port number or equivalent */
+ uint32_t dst_port; /* TCP/UDP destination port number or equivalent */
+ uint32_t tcp_flags; /* TCP flags */
+ uint32_t tos; /* IP type of service */
} SFLSampled_ipv4;
/* decoded IP version 6 data */
typedef struct _SFLSampled_ipv6 {
- u_int32_t length; /* The length of the IP packet
+ uint32_t length; /* The length of the IP packet
excluding lower layer encapsulations */
- u_int32_t protocol; /* IP Protocol type (for example, TCP = 6, UDP = 17) */
- struct in6_addr src_ip; /* Source IP Address */
- struct in6_addr dst_ip; /* Destination IP Address */
- u_int32_t src_port; /* TCP/UDP source port number or equivalent */
- u_int32_t dst_port; /* TCP/UDP destination port number or equivalent */
- u_int32_t tcp_flags; /* TCP flags */
- u_int32_t priority; /* IP priority */
+ uint32_t protocol; /* IP Protocol type (for example, TCP = 6, UDP = 17) */
+ SFLIPv6 src_ip; /* Source IP Address */
+ SFLIPv6 dst_ip; /* Destination IP Address */
+ uint32_t src_port; /* TCP/UDP source port number or equivalent */
+ uint32_t dst_port; /* TCP/UDP destination port number or equivalent */
+ uint32_t tcp_flags; /* TCP flags */
+ uint32_t priority; /* IP priority */
} SFLSampled_ipv6;
/* Extended data types */
@@ -103,18 +116,18 @@
/* Extended switch data */
typedef struct _SFLExtended_switch {
- u_int32_t src_vlan; /* The 802.1Q VLAN id of incomming frame */
- u_int32_t src_priority; /* The 802.1p priority */
- u_int32_t dst_vlan; /* The 802.1Q VLAN id of outgoing frame */
- u_int32_t dst_priority; /* The 802.1p priority */
+ uint32_t src_vlan; /* The 802.1Q VLAN id of incomming frame */
+ uint32_t src_priority; /* The 802.1p priority */
+ uint32_t dst_vlan; /* The 802.1Q VLAN id of outgoing frame */
+ uint32_t dst_priority; /* The 802.1p priority */
} SFLExtended_switch;
/* Extended router data */
typedef struct _SFLExtended_router {
SFLAddress nexthop; /* IP address of next hop router */
- u_int32_t src_mask; /* Source address prefix mask bits */
- u_int32_t dst_mask; /* Destination address prefix mask bits */
+ uint32_t src_mask; /* Source address prefix mask bits */
+ uint32_t dst_mask; /* Destination address prefix mask bits */
} SFLExtended_router;
/* Extended gateway data */
@@ -124,40 +137,40 @@
};
typedef struct _SFLExtended_as_path_segment {
- u_int32_t type; /* enum SFLExtended_as_path_segment_type */
- u_int32_t length; /* number of AS numbers in set/sequence */
+ uint32_t type; /* enum SFLExtended_as_path_segment_type */
+ uint32_t length; /* number of AS numbers in set/sequence */
union {
- u_int32_t *set;
- u_int32_t *seq;
+ uint32_t *set;
+ uint32_t *seq;
} as;
} SFLExtended_as_path_segment;
typedef struct _SFLExtended_gateway {
SFLAddress nexthop; /* Address of the border router that should
be used for the destination network */
- u_int32_t as; /* AS number for this gateway */
- u_int32_t src_as; /* AS number of source (origin) */
- u_int32_t src_peer_as; /* AS number of source peer */
- u_int32_t dst_as_path_segments; /* number of segments in path */
+ uint32_t as; /* AS number for this gateway */
+ uint32_t src_as; /* AS number of source (origin) */
+ uint32_t src_peer_as; /* AS number of source peer */
+ uint32_t dst_as_path_segments; /* number of segments in path */
SFLExtended_as_path_segment *dst_as_path; /* list of seqs or sets */
- u_int32_t communities_length; /* number of communities */
- u_int32_t *communities; /* set of communities */
- u_int32_t localpref; /* LocalPref associated with this route */
+ uint32_t communities_length; /* number of communities */
+ uint32_t *communities; /* set of communities */
+ uint32_t localpref; /* LocalPref associated with this route */
} SFLExtended_gateway;
typedef struct _SFLString {
- u_int32_t len;
+ uint32_t len;
char *str;
} SFLString;
/* Extended user data */
typedef struct _SFLExtended_user {
- u_int32_t src_charset; /* MIBEnum value of character set used to encode a string - See RFC 2978
+ uint32_t src_charset; /* MIBEnum value of character set used to encode a string - See RFC 2978
Where possible UTF-8 encoding (MIBEnum=106) should be used. A value
of zero indicates an unknown encoding. */
SFLString src_user;
- u_int32_t dst_charset;
+ uint32_t dst_charset;
SFLString dst_user;
} SFLExtended_user;
@@ -169,7 +182,7 @@
};
typedef struct _SFLExtended_url {
- u_int32_t direction; /* enum SFLExtended_url_direction */
+ uint32_t direction; /* enum SFLExtended_url_direction */
SFLString url; /* URL associated with the packet flow.
Must be URL encoded */
SFLString host; /* The host field from the HTTP header */
@@ -178,8 +191,8 @@
/* Extended MPLS data */
typedef struct _SFLLabelStack {
- u_int32_t depth;
- u_int32_t *stack; /* first entry is top of stack - see RFC 3032 for encoding */
+ uint32_t depth;
+ uint32_t *stack; /* first entry is top of stack - see RFC 3032 for encoding */
} SFLLabelStack;
typedef struct _SFLExtended_mpls {
@@ -203,14 +216,14 @@
typedef struct _SFLExtended_mpls_tunnel {
SFLString tunnel_lsp_name; /* Tunnel name */
- u_int32_t tunnel_id; /* Tunnel ID */
- u_int32_t tunnel_cos; /* Tunnel COS value */
+ uint32_t tunnel_id; /* Tunnel ID */
+ uint32_t tunnel_cos; /* Tunnel COS value */
} SFLExtended_mpls_tunnel;
typedef struct _SFLExtended_mpls_vc {
SFLString vc_instance_name; /* VC instance name */
- u_int32_t vll_vc_id; /* VLL/VC instance ID */
- u_int32_t vc_label_cos; /* VC Label COS value */
+ uint32_t vll_vc_id; /* VLL/VC instance ID */
+ uint32_t vc_label_cos; /* VC Label COS value */
} SFLExtended_mpls_vc;
/* Extended MPLS FEC
@@ -218,7 +231,7 @@
typedef struct _SFLExtended_mpls_FTN {
SFLString mplsFTNDescr;
- u_int32_t mplsFTNMask;
+ uint32_t mplsFTNMask;
} SFLExtended_mpls_FTN;
/* Extended MPLS LVP FEC
@@ -227,7 +240,7 @@
from packet header */
typedef struct _SFLExtended_mpls_LDP_FEC {
- u_int32_t mplsFecAddrPrefixLength;
+ uint32_t mplsFecAddrPrefixLength;
} SFLExtended_mpls_LDP_FEC;
/* Extended VLAN tunnel information
@@ -255,23 +268,245 @@
innermost. */
} SFLExtended_vlan_tunnel;
+ ////////////////// IEEE 802.11 Extension structs ////////////////////
- ////////////////// InMon Extension structs //////////////////////////
+/* The 4-byte cipher_suite identifier follows the format of the cipher suite
+ selector value from the 802.11i (TKIP/CCMP amendment to 802.11i)
+ The most significant three bytes contain the OUI and the least significant
+ byte contains the Suite Type.
+
+ The currently assigned values are:
+
+ OUI |Suite type |Meaning
+ ----------------------------------------------------
+ 00-0F-AC | 0 | Use group cipher suite
+ 00-0F-AC | 1 | WEP-40
+ 00-0F-AC | 2 | TKIP
+ 00-0F-AC | 3 | Reserved
+ 00-0F-AC | 4 | CCMP
+ 00-0F-AC | 5 | WEP-104
+ 00-0F-AC | 6-255 | Reserved
+ Vendor OUI | Other | Vendor specific
+ Other | Any | Reserved
+ ----------------------------------------------------
+*/
+
+typedef uint32_t SFLCipherSuite;
+
+/* Extended wifi Payload
+ Used to provide unencrypted version of 802.11 MAC data. If the
+ MAC data is not encrypted then the agent must not include an
+ extended_wifi_payload structure.
+ If 802.11 MAC data is encrypted then the sampled_header structure
+ should only contain the MAC header (since encrypted data cannot
+ be decoded by the sFlow receiver). If the sFlow agent has access to
+ the unencrypted payload, it should add an extended_wifi_payload
+ structure containing the unencrypted data bytes from the sampled
+ packet header, starting at the beginning of the 802.2 LLC and not
+ including any trailing encryption footers. */
+/* opaque = flow_data; enterprise = 0; format = 1013 */
-typedef struct _SFLProcess {
- u_int32_t pid;
- SFLString command;
-} SFLProcess;
-
-#define SFL_MAX_PROCESSES 10
-typedef struct _SFLExtended_process {
- u_int32_t num_processes;
- SFLProcess processes[SFL_MAX_PROCESSES];
-} SFLExtended_process;
+typedef struct _SFLExtended_wifi_payload {
+ SFLCipherSuite cipherSuite;
+ SFLSampled_header header;
+} SFLExtended_wifi_payload;
- //////////////////////////////////////////////////////////////////////
+typedef enum {
+ IEEE80211_A=1,
+ IEEE80211_B=2,
+ IEEE80211_G=3,
+ IEEE80211_N=4,
+} SFL_IEEE80211_version;
+
+/* opaque = flow_data; enterprise = 0; format = 1014 */
+
+#define SFL_MAX_SSID_LEN 256
+
+typedef struct _SFLExtended_wifi_rx {
+ uint32_t ssid_len;
+ char *ssid;
+ char bssid[6]; /* BSSID */
+ SFL_IEEE80211_version version; /* version */
+ uint32_t channel; /* channel number */
+ uint64_t speed;
+ uint32_t rsni; /* received signal to noise ratio, see dot11FrameRprtRSNI */
+ uint32_t rcpi; /* received channel power, see dot11FrameRprtLastRCPI */
+ uint32_t packet_duration_us; /* amount of time that the successfully received pkt occupied RF medium.*/
+} SFLExtended_wifi_rx;
+
+/* opaque = flow_data; enterprise = 0; format = 1015 */
+
+typedef struct _SFLExtended_wifi_tx {
+ uint32_t ssid_len;
+ char *ssid; /* SSID string */
+ char bssid[6]; /* BSSID */
+ SFL_IEEE80211_version version; /* version */
+ uint32_t transmissions; /* number of transmissions for sampled
+ packet.
+ 0 = unkown
+ 1 = packet was successfully transmitted
+ on first attempt
+ n > 1 = n - 1 retransmissions */
+ uint32_t packet_duration_us; /* amount of time that the successfully
+ transmitted packet occupied the
+ RF medium */
+ uint32_t retrans_duration_us; /* amount of time that failed transmission
+ attempts occupied the RF medium */
+ uint32_t channel; /* channel number */
+ uint64_t speed;
+ uint32_t power_mw; /* transmit power in mW. */
+} SFLExtended_wifi_tx;
+
+/* Extended 802.11 Aggregation Data */
+/* A flow_sample of an aggregated frame would consist of a packet
+ header for the whole frame + any other extended structures that
+ apply (e.g. 80211_tx/rx etc.) + an extended_wifi_aggregation
+ structure which would contain an array of pdu structures (one
+ for each PDU in the aggregate). A pdu is simply an array of
+ flow records, in the simplest case a packet header for each PDU,
+ but extended structures could be included as well. */
+
+/* opaque = flow_data; enterprise = 0; format = 1016 */
+
+struct _SFLFlow_Pdu; // forward decl
+
+typedef struct _SFLExtended_aggregation {
+ uint32_t num_pdus;
+ struct _SFFlow_Pdu *pdus;
+} SFLExtended_aggregation;
+
+/* Extended socket information,
+ Must be filled in for all application transactions associated with a network socket
+ Omit if transaction associated with non-network IPC */
+
+/* IPv4 Socket */
+/* opaque = flow_data; enterprise = 0; format = 2100 */
+typedef struct _SFLExtended_socket_ipv4 {
+ uint32_t protocol; /* IP Protocol (e.g. TCP = 6, UDP = 17) */
+ SFLIPv4 local_ip; /* local IP address */
+ SFLIPv4 remote_ip; /* remote IP address */
+ uint32_t local_port; /* TCP/UDP local port number or equivalent */
+ uint32_t remote_port; /* TCP/UDP remote port number of equivalent */
+} SFLExtended_socket_ipv4;
+
+#define XDRSIZ_SFLEXTENDED_SOCKET4 20
+
+/* IPv6 Socket */
+/* opaque = flow_data; enterprise = 0; format = 2101 */
+typedef struct _SFLExtended_socket_ipv6 {
+ uint32_t protocol; /* IP Protocol (e.g. TCP = 6, UDP = 17) */
+ SFLIPv6 local_ip; /* local IP address */
+ SFLIPv6 remote_ip; /* remote IP address */
+ uint32_t local_port; /* TCP/UDP local port number or equivalent */
+ uint32_t remote_port; /* TCP/UDP remote port number of equivalent */
+} SFLExtended_socket_ipv6;
+
+#define XDRSIZ_SFLEXTENDED_SOCKET6 44
+
+typedef enum {
+ MEMCACHE_PROT_OTHER = 0,
+ MEMCACHE_PROT_ASCII = 1,
+ MEMCACHE_PROT_BINARY = 2,
+} SFLMemcache_prot;
+
+typedef enum {
+ MEMCACHE_CMD_OTHER = 0,
+ MEMCACHE_CMD_SET = 1,
+ MEMCACHE_CMD_ADD = 2,
+ MEMCACHE_CMD_REPLACE = 3,
+ MEMCACHE_CMD_APPEND = 4,
+ MEMCACHE_CMD_PREPEND = 5,
+ MEMCACHE_CMD_CAS = 6,
+ MEMCACHE_CMD_GET = 7,
+ MEMCACHE_CMD_GETS = 8,
+} SFLMemcache_cmd;
+
+enum SFLMemcache_operation_status {
+ MEMCACHE_OP_UNKNOWN = 0,
+ MEMCACHE_OP_OK = 1,
+ MEMCACHE_OP_ERROR = 2,
+ MEMCACHE_OP_CLIENT_ERROR = 3,
+ MEMCACHE_OP_SERVER_ERROR = 4,
+ MEMCACHE_OP_STORED = 5,
+ MEMCACHE_OP_NOT_STORED = 6,
+ MEMCACHE_OP_EXISTS = 7,
+ MEMCACHE_OP_NOT_FOUND = 8,
+ MEMCACHE_OP_DELETED = 9,
+};
-enum SFLFlow_type_tag {
+#define SFL_MAX_MEMCACHE_KEY 255
+
+typedef struct _SFLSampled_memcache {
+ uint32_t protocol; /* SFLMemcache_prot */
+ uint32_t command; /* SFLMemcache_cmd */
+ SFLString key; /* up to 255 chars */
+ uint32_t nkeys;
+ uint32_t value_bytes;
+ uint32_t duration_uS;
+ uint32_t status; /* SFLMemcache_operation_status */
+} SFLSampled_memcache;
+
+typedef enum {
+ SFHTTP_OTHER = 0,
+ SFHTTP_OPTIONS = 1,
+ SFHTTP_GET = 2,
+ SFHTTP_HEAD = 3,
+ SFHTTP_POST = 4,
+ SFHTTP_PUT = 5,
+ SFHTTP_DELETE = 6,
+ SFHTTP_TRACE = 7,
+ SFHTTP_CONNECT = 8,
+} SFLHTTP_method;
+
+#define SFL_MAX_HTTP_URI 255
+#define SFL_MAX_HTTP_HOST 32
+#define SFL_MAX_HTTP_REFERRER 255
+#define SFL_MAX_HTTP_USERAGENT 64
+#define SFL_MAX_HTTP_AUTHUSER 32
+#define SFL_MAX_HTTP_MIMETYPE 32
+
+typedef struct _SFLSampled_http {
+ SFLHTTP_method method;
+ uint32_t protocol; /* 1.1=1001 */
+ SFLString uri; /* URI exactly as it came from the client (up to 255 bytes) */
+ SFLString host; /* Host value from request header (<= 32 bytes) */
+ SFLString referrer; /* Referer value from request header (<=255 bytes) */
+ SFLString useragent; /* User-Agent value from request header (<= 64 bytes)*/
+ SFLString authuser; /* RFC 1413 identity of user (<=32 bytes)*/
+ SFLString mimetype; /* Mime-Type (<=32 bytes) */
+ uint64_t bytes; /* Content-Length of document transferred */
+ uint32_t uS; /* duration of the operation (microseconds) */
+ uint32_t status; /* HTTP status code */
+} SFLSampled_http;
+
+
+typedef enum {
+ SFLOW_CAL_TRANSACTION_OTHER=0,
+ SFLOW_CAL_TRANSACTION_START,
+ SFLOW_CAL_TRANSACTION_END,
+ SFLOW_CAL_TRANSACTION_ATOMIC,
+ SFLOW_CAL_TRANSACTION_EVENT,
+ SFLOW_CAL_NUM_TRANSACTION_TYPES
+} EnumSFLCALTransaction;
+
+static const char *CALTransactionNames[] = {"OTHER", "START", "END","ATOMIC", "EVENT" };
+
+typedef struct _SFLSampled_CAL {
+ EnumSFLCALTransaction type;
+ uint32_t depth;
+ SFLString pool;
+ SFLString transaction;
+ SFLString operation;
+ SFLString status;
+ uint64_t duration_uS;
+} SFLSampled_CAL;
+
+#define SFLCAL_MAX_POOL_LEN 32
+#define SFLCAL_MAX_TRANSACTION_LEN 128
+#define SFLCAL_MAX_OPERATION_LEN 128
+#define SFLCAL_MAX_STATUS_LEN 64
+
+enum SFLFlow_type_tag {
/* enterprise = 0, format = ... */
SFLFLOW_HEADER = 1, /* Packet headers are sampled */
SFLFLOW_ETHERNET = 2, /* MAC layer information */
@@ -289,8 +524,15 @@
SFLFLOW_EX_MPLS_FTN = 1010,
SFLFLOW_EX_MPLS_LDP_FEC = 1011,
SFLFLOW_EX_VLAN_TUNNEL = 1012, /* VLAN stack */
- /* enterprise = 4300 (inmon)...*/
- SFLFLOW_EX_PROCESS = (4300 << 12) + 3, /* =17612803 Extended Process information */
+ SFLFLOW_EX_80211_PAYLOAD = 1013,
+ SFLFLOW_EX_80211_RX = 1014,
+ SFLFLOW_EX_80211_TX = 1015,
+ SFLFLOW_EX_AGGREGATION = 1016,
+ SFLFLOW_EX_SOCKET4 = 2100,
+ SFLFLOW_EX_SOCKET6 = 2101,
+ SFLFLOW_MEMCACHE = 2200,
+ SFLFLOW_HTTP = 2201,
+ SFLFLOW_CAL = (4300 << 12) + 5, /* 4300 is InMon enterprise no. */
};
typedef union _SFLFlow_type {
@@ -298,6 +540,9 @@
SFLSampled_ethernet ethernet;
SFLSampled_ipv4 ipv4;
SFLSampled_ipv6 ipv6;
+ SFLSampled_memcache memcache;
+ SFLSampled_http http;
+ SFLSampled_CAL cal;
SFLExtended_switch sw;
SFLExtended_router router;
SFLExtended_gateway gateway;
@@ -310,14 +555,18 @@
SFLExtended_mpls_FTN mpls_ftn;
SFLExtended_mpls_LDP_FEC mpls_ldp_fec;
SFLExtended_vlan_tunnel vlan_tunnel;
- // extensions
- SFLExtended_process process;
+ SFLExtended_wifi_payload wifi_payload;
+ SFLExtended_wifi_rx wifi_rx;
+ SFLExtended_wifi_tx wifi_tx;
+ SFLExtended_aggregation aggregation;
+ SFLExtended_socket_ipv4 socket4;
+ SFLExtended_socket_ipv6 socket6;
} SFLFlow_type;
typedef struct _SFLFlow_sample_element {
struct _SFLFlow_sample_element *nxt;
- u_int32_t tag; /* SFLFlow_type_tag */
- u_int32_t length;
+ uint32_t tag; /* SFLFlow_type_tag */
+ uint32_t length;
SFLFlow_type flowType;
} SFLFlow_sample_element;
@@ -327,24 +576,31 @@
SFLFLOW_SAMPLE_EXPANDED = 3, /* enterprise = 0 : format = 3 */
SFLCOUNTERS_SAMPLE_EXPANDED = 4 /* enterprise = 0 : format = 4 */
};
+
+typedef struct _SFLFlow_Pdu {
+ struct _SFLFlow_Pdu *nxt;
+ uint32_t num_elements;
+ SFLFlow_sample_element *elements;
+} SFLFlow_Pdu;
+
/* Format of a single flow sample */
typedef struct _SFLFlow_sample {
- /* u_int32_t tag; */ /* SFL_sample_tag -- enterprise = 0 : format = 1 */
- /* u_int32_t length; */
- u_int32_t sequence_number; /* Incremented with each flow sample
+ /* uint32_t tag; */ /* SFL_sample_tag -- enterprise = 0 : format = 1 */
+ /* uint32_t length; */
+ uint32_t sequence_number; /* Incremented with each flow sample
generated */
- u_int32_t source_id; /* fsSourceId */
- u_int32_t sampling_rate; /* fsPacketSamplingRate */
- u_int32_t sample_pool; /* Total number of packets that could have been
+ uint32_t source_id; /* fsSourceId */
+ uint32_t sampling_rate; /* fsPacketSamplingRate */
+ uint32_t sample_pool; /* Total number of packets that could have been
sampled (i.e. packets skipped by sampling
process + total number of samples) */
- u_int32_t drops; /* Number of times a packet was dropped due to
+ uint32_t drops; /* Number of times a packet was dropped due to
lack of resources */
- u_int32_t input; /* SNMP ifIndex of input interface.
+ uint32_t input; /* SNMP ifIndex of input interface.
0 if interface is not known. */
- u_int32_t output; /* SNMP ifIndex of output interface,
+ uint32_t output; /* SNMP ifIndex of output interface,
0 if interface is not known.
Set most significant bit to indicate
multiple destination interfaces
@@ -359,32 +615,32 @@
0x80000000 indicates a packet sent to
an unknown number of
interfaces greater than 1.*/
- u_int32_t num_elements;
+ uint32_t num_elements;
SFLFlow_sample_element *elements;
} SFLFlow_sample;
/* same thing, but the expanded version (for full 32-bit ifIndex numbers) */
typedef struct _SFLFlow_sample_expanded {
- /* u_int32_t tag; */ /* SFL_sample_tag -- enterprise = 0 : format = 1 */
- /* u_int32_t length; */
- u_int32_t sequence_number; /* Incremented with each flow sample
+ /* uint32_t tag; */ /* SFL_sample_tag -- enterprise = 0 : format = 1 */
+ /* uint32_t length; */
+ uint32_t sequence_number; /* Incremented with each flow sample
generated */
- u_int32_t ds_class; /* EXPANDED */
- u_int32_t ds_index; /* EXPANDED */
- u_int32_t sampling_rate; /* fsPacketSamplingRate */
- u_int32_t sample_pool; /* Total number of packets that could have been
+ uint32_t ds_class; /* EXPANDED */
+ uint32_t ds_index; /* EXPANDED */
+ uint32_t sampling_rate; /* fsPacketSamplingRate */
+ uint32_t sample_pool; /* Total number of packets that could have been
sampled (i.e. packets skipped by sampling
process + total number of samples) */
- u_int32_t drops; /* Number of times a packet was dropped due to
+ uint32_t drops; /* Number of times a packet was dropped due to
lack of resources */
- u_int32_t inputFormat; /* EXPANDED */
- u_int32_t input; /* SNMP ifIndex of input interface.
+ uint32_t inputFormat; /* EXPANDED */
+ uint32_t input; /* SNMP ifIndex of input interface.
0 if interface is not known. */
- u_int32_t outputFormat; /* EXPANDED */
- u_int32_t output; /* SNMP ifIndex of output interface,
+ uint32_t outputFormat; /* EXPANDED */
+ uint32_t output; /* SNMP ifIndex of output interface,
0 if interface is not known. */
- u_int32_t num_elements;
+ uint32_t num_elements;
SFLFlow_sample_element *elements;
} SFLFlow_sample_expanded;
@@ -393,109 +649,394 @@
/* Generic interface counters - see RFC 1573, 2233 */
typedef struct _SFLIf_counters {
- u_int32_t ifIndex;
- u_int32_t ifType;
- u_int64_t ifSpeed;
- u_int32_t ifDirection; /* Derived from MAU MIB (RFC 2668)
+ uint32_t ifIndex;
+ uint32_t ifType;
+ uint64_t ifSpeed;
+ uint32_t ifDirection; /* Derived from MAU MIB (RFC 2668)
0 = unknown, 1 = full-duplex,
2 = half-duplex, 3 = in, 4 = out */
- u_int32_t ifStatus; /* bit field with the following bits assigned:
+ uint32_t ifStatus; /* bit field with the following bits assigned:
bit 0 = ifAdminStatus (0 = down, 1 = up)
bit 1 = ifOperStatus (0 = down, 1 = up) */
- u_int64_t ifInOctets;
- u_int32_t ifInUcastPkts;
- u_int32_t ifInMulticastPkts;
- u_int32_t ifInBroadcastPkts;
- u_int32_t ifInDiscards;
- u_int32_t ifInErrors;
- u_int32_t ifInUnknownProtos;
- u_int64_t ifOutOctets;
- u_int32_t ifOutUcastPkts;
- u_int32_t ifOutMulticastPkts;
- u_int32_t ifOutBroadcastPkts;
- u_int32_t ifOutDiscards;
- u_int32_t ifOutErrors;
- u_int32_t ifPromiscuousMode;
+ uint64_t ifInOctets;
+ uint32_t ifInUcastPkts;
+ uint32_t ifInMulticastPkts;
+ uint32_t ifInBroadcastPkts;
+ uint32_t ifInDiscards;
+ uint32_t ifInErrors;
+ uint32_t ifInUnknownProtos;
+ uint64_t ifOutOctets;
+ uint32_t ifOutUcastPkts;
+ uint32_t ifOutMulticastPkts;
+ uint32_t ifOutBroadcastPkts;
+ uint32_t ifOutDiscards;
+ uint32_t ifOutErrors;
+ uint32_t ifPromiscuousMode;
} SFLIf_counters;
/* Ethernet interface counters - see RFC 2358 */
typedef struct _SFLEthernet_counters {
- u_int32_t dot3StatsAlignmentErrors;
- u_int32_t dot3StatsFCSErrors;
- u_int32_t dot3StatsSingleCollisionFrames;
- u_int32_t dot3StatsMultipleCollisionFrames;
- u_int32_t dot3StatsSQETestErrors;
- u_int32_t dot3StatsDeferredTransmissions;
- u_int32_t dot3StatsLateCollisions;
- u_int32_t dot3StatsExcessiveCollisions;
- u_int32_t dot3StatsInternalMacTransmitErrors;
- u_int32_t dot3StatsCarrierSenseErrors;
- u_int32_t dot3StatsFrameTooLongs;
- u_int32_t dot3StatsInternalMacReceiveErrors;
- u_int32_t dot3StatsSymbolErrors;
+ uint32_t dot3StatsAlignmentErrors;
+ uint32_t dot3StatsFCSErrors;
+ uint32_t dot3StatsSingleCollisionFrames;
+ uint32_t dot3StatsMultipleCollisionFrames;
+ uint32_t dot3StatsSQETestErrors;
+ uint32_t dot3StatsDeferredTransmissions;
+ uint32_t dot3StatsLateCollisions;
+ uint32_t dot3StatsExcessiveCollisions;
+ uint32_t dot3StatsInternalMacTransmitErrors;
+ uint32_t dot3StatsCarrierSenseErrors;
+ uint32_t dot3StatsFrameTooLongs;
+ uint32_t dot3StatsInternalMacReceiveErrors;
+ uint32_t dot3StatsSymbolErrors;
} SFLEthernet_counters;
/* Token ring counters - see RFC 1748 */
typedef struct _SFLTokenring_counters {
- u_int32_t dot5StatsLineErrors;
- u_int32_t dot5StatsBurstErrors;
- u_int32_t dot5StatsACErrors;
- u_int32_t dot5StatsAbortTransErrors;
- u_int32_t dot5StatsInternalErrors;
- u_int32_t dot5StatsLostFrameErrors;
- u_int32_t dot5StatsReceiveCongestions;
- u_int32_t dot5StatsFrameCopiedErrors;
- u_int32_t dot5StatsTokenErrors;
- u_int32_t dot5StatsSoftErrors;
- u_int32_t dot5StatsHardErrors;
- u_int32_t dot5StatsSignalLoss;
- u_int32_t dot5StatsTransmitBeacons;
- u_int32_t dot5StatsRecoverys;
- u_int32_t dot5StatsLobeWires;
- u_int32_t dot5StatsRemoves;
- u_int32_t dot5StatsSingles;
- u_int32_t dot5StatsFreqErrors;
+ uint32_t dot5StatsLineErrors;
+ uint32_t dot5StatsBurstErrors;
+ uint32_t dot5StatsACErrors;
+ uint32_t dot5StatsAbortTransErrors;
+ uint32_t dot5StatsInternalErrors;
+ uint32_t dot5StatsLostFrameErrors;
+ uint32_t dot5StatsReceiveCongestions;
+ uint32_t dot5StatsFrameCopiedErrors;
+ uint32_t dot5StatsTokenErrors;
+ uint32_t dot5StatsSoftErrors;
+ uint32_t dot5StatsHardErrors;
+ uint32_t dot5StatsSignalLoss;
+ uint32_t dot5StatsTransmitBeacons;
+ uint32_t dot5StatsRecoverys;
+ uint32_t dot5StatsLobeWires;
+ uint32_t dot5StatsRemoves;
+ uint32_t dot5StatsSingles;
+ uint32_t dot5StatsFreqErrors;
} SFLTokenring_counters;
/* 100 BaseVG interface counters - see RFC 2020 */
typedef struct _SFLVg_counters {
- u_int32_t dot12InHighPriorityFrames;
- u_int64_t dot12InHighPriorityOctets;
- u_int32_t dot12InNormPriorityFrames;
- u_int64_t dot12InNormPriorityOctets;
- u_int32_t dot12InIPMErrors;
- u_int32_t dot12InOversizeFrameErrors;
- u_int32_t dot12InDataErrors;
- u_int32_t dot12InNullAddressedFrames;
- u_int32_t dot12OutHighPriorityFrames;
- u_int64_t dot12OutHighPriorityOctets;
- u_int32_t dot12TransitionIntoTrainings;
- u_int64_t dot12HCInHighPriorityOctets;
- u_int64_t dot12HCInNormPriorityOctets;
- u_int64_t dot12HCOutHighPriorityOctets;
+ uint32_t dot12InHighPriorityFrames;
+ uint64_t dot12InHighPriorityOctets;
+ uint32_t dot12InNormPriorityFrames;
+ uint64_t dot12InNormPriorityOctets;
+ uint32_t dot12InIPMErrors;
+ uint32_t dot12InOversizeFrameErrors;
+ uint32_t dot12InDataErrors;
+ uint32_t dot12InNullAddressedFrames;
+ uint32_t dot12OutHighPriorityFrames;
+ uint64_t dot12OutHighPriorityOctets;
+ uint32_t dot12TransitionIntoTrainings;
+ uint64_t dot12HCInHighPriorityOctets;
+ uint64_t dot12HCInNormPriorityOctets;
+ uint64_t dot12HCOutHighPriorityOctets;
} SFLVg_counters;
typedef struct _SFLVlan_counters {
- u_int32_t vlan_id;
- u_int64_t octets;
- u_int32_t ucastPkts;
- u_int32_t multicastPkts;
- u_int32_t broadcastPkts;
- u_int32_t discards;
+ uint32_t vlan_id;
+ uint64_t octets;
+ uint32_t ucastPkts;
+ uint32_t multicastPkts;
+ uint32_t broadcastPkts;
+ uint32_t discards;
} SFLVlan_counters;
+typedef struct _SFLWifi_counters {
+ uint32_t dot11TransmittedFragmentCount;
+ uint32_t dot11MulticastTransmittedFrameCount;
+ uint32_t dot11FailedCount;
+ uint32_t dot11RetryCount;
+ uint32_t dot11MultipleRetryCount;
+ uint32_t dot11FrameDuplicateCount;
+ uint32_t dot11RTSSuccessCount;
+ uint32_t dot11RTSFailureCount;
+ uint32_t dot11ACKFailureCount;
+ uint32_t dot11ReceivedFragmentCount;
+ uint32_t dot11MulticastReceivedFrameCount;
+ uint32_t dot11FCSErrorCount;
+ uint32_t dot11TransmittedFrameCount;
+ uint32_t dot11WEPUndecryptableCount;
+ uint32_t dot11QoSDiscardedFragmentCount;
+ uint32_t dot11AssociatedStationCount;
+ uint32_t dot11QoSCFPollsReceivedCount;
+ uint32_t dot11QoSCFPollsUnusedCount;
+ uint32_t dot11QoSCFPollsUnusableCount;
+ uint32_t dot11QoSCFPollsLostCount;
+} SFLWifi_counters;
+
/* Processor Information */
/* opaque = counter_data; enterprise = 0; format = 1001 */
typedef struct _SFLProcessor_counters {
- u_int32_t five_sec_cpu; /* 5 second average CPU utilization */
- u_int32_t one_min_cpu; /* 1 minute average CPU utilization */
- u_int32_t five_min_cpu; /* 5 minute average CPU utilization */
- u_int64_t total_memory; /* total memory (in bytes) */
- u_int64_t free_memory; /* free memory (in bytes) */
+ uint32_t five_sec_cpu; /* 5 second average CPU utilization */
+ uint32_t one_min_cpu; /* 1 minute average CPU utilization */
+ uint32_t five_min_cpu; /* 5 minute average CPU utilization */
+ uint64_t total_memory; /* total memory (in bytes) */
+ uint64_t free_memory; /* free memory (in bytes) */
} SFLProcessor_counters;
+
+typedef struct _SFLRadio_counters {
+ uint32_t elapsed_time; /* elapsed time in ms */
+ uint32_t on_channel_time; /* time in ms spent on channel */
+ uint32_t on_channel_busy_time; /* time in ms spent on channel and busy */
+} SFLRadio_counters;
+
+ /* host sflow */
+
+enum SFLMachine_type {
+ SFLMT_unknown = 0,
+ SFLMT_other = 1,
+ SFLMT_x86 = 2,
+ SFLMT_x86_64 = 3,
+ SFLMT_ia64 = 4,
+ SFLMT_sparc = 5,
+ SFLMT_alpha = 6,
+ SFLMT_powerpc = 7,
+ SFLMT_m68k = 8,
+ SFLMT_mips = 9,
+ SFLMT_arm = 10,
+ SFLMT_hppa = 11,
+ SFLMT_s390 = 12
+};
+
+enum SFLOS_name {
+ SFLOS_unknown = 0,
+ SFLOS_other = 1,
+ SFLOS_linux = 2,
+ SFLOS_windows = 3,
+ SFLOS_darwin = 4,
+ SFLOS_hpux = 5,
+ SFLOS_aix = 6,
+ SFLOS_dragonfly = 7,
+ SFLOS_freebsd = 8,
+ SFLOS_netbsd = 9,
+ SFLOS_openbsd = 10,
+ SFLOS_osf = 11,
+ SFLOS_solaris = 12
+};
+
+typedef struct _SFLMacAddress {
+ uint8_t mac[8];
+} SFLMacAddress;
+
+typedef struct _SFLAdaptor {
+ uint32_t ifIndex;
+ uint32_t num_macs;
+ SFLMacAddress macs[1];
+} SFLAdaptor;
+
+typedef struct _SFLAdaptorList {
+ uint32_t capacity;
+ uint32_t num_adaptors;
+ SFLAdaptor **adaptors;
+} SFLAdaptorList;
+
+typedef struct _SFLHost_parent {
+ uint32_t dsClass; /* sFlowDataSource class */
+ uint32_t dsIndex; /* sFlowDataSource index */
+} SFLHost_parent;
+
+
+#define SFL_MAX_HOSTNAME_LEN 64
+#define SFL_MAX_OSRELEASE_LEN 32
+
+typedef struct _SFLHostId {
+ SFLString hostname;
+ u_char uuid[16];
+ uint32_t machine_type; /* enum SFLMachine_type */
+ uint32_t os_name; /* enum SFLOS_name */
+ SFLString os_release; /* max len 32 bytes */
+} SFLHostId;
+
+typedef struct _SFLHost_nio_counters {
+ uint64_t bytes_in;
+ uint32_t pkts_in;
+ uint32_t errs_in;
+ uint32_t drops_in;
+ uint64_t bytes_out;
+ uint32_t pkts_out;
+ uint32_t errs_out;
+ uint32_t drops_out;
+} SFLHost_nio_counters;
+
+typedef struct _SFLHost_cpu_counters {
+ float load_one; /* 1 minute load avg. */
+ float load_five; /* 5 minute load avg. */
+ float load_fifteen; /* 15 minute load avg. */
+ uint32_t proc_run; /* running threads */
+ uint32_t proc_total; /* total threads */
+ uint32_t cpu_num; /* # CPU cores */
+ uint32_t cpu_speed; /* speed in MHz of CPU */
+ uint32_t uptime; /* seconds since last reboot */
+ uint32_t cpu_user; /* time executing in user mode processes (ms) */
+ uint32_t cpu_nice; /* time executing niced processs (ms) */
+ uint32_t cpu_system; /* time executing kernel mode processes (ms) */
+ uint32_t cpu_idle; /* idle time (ms) */
+ uint32_t cpu_wio; /* time waiting for I/O to complete (ms) */
+ uint32_t cpu_intr; /* time servicing interrupts (ms) */
+ uint32_t cpu_sintr; /* time servicing softirqs (ms) */
+ uint32_t interrupts; /* interrupt count */
+ uint32_t contexts; /* context switch count */
+} SFLHost_cpu_counters;
+
+typedef struct _SFLHost_mem_counters {
+ uint64_t mem_total; /* total bytes */
+ uint64_t mem_free; /* free bytes */
+ uint64_t mem_shared; /* shared bytes */
+ uint64_t mem_buffers; /* buffers bytes */
+ uint64_t mem_cached; /* cached bytes */
+ uint64_t swap_total; /* swap total bytes */
+ uint64_t swap_free; /* swap free bytes */
+ uint32_t page_in; /* page in count */
+ uint32_t page_out; /* page out count */
+ uint32_t swap_in; /* swap in count */
+ uint32_t swap_out; /* swap out count */
+} SFLHost_mem_counters;
+
+typedef struct _SFLHost_dsk_counters {
+ uint64_t disk_total;
+ uint64_t disk_free;
+ uint32_t part_max_used; /* as percent * 100, so 100==1% */
+ uint32_t reads; /* reads issued */
+ uint64_t bytes_read; /* bytes read */
+ uint32_t read_time; /* read time (ms) */
+ uint32_t writes; /* writes completed */
+ uint64_t bytes_written; /* bytes written */
+ uint32_t write_time; /* write time (ms) */
+} SFLHost_dsk_counters;
+
+/* Virtual Node Statistics */
+/* opaque = counter_data; enterprise = 0; format = 2100 */
+
+typedef struct _SFLHost_vrt_node_counters {
+ uint32_t mhz; /* expected CPU frequency */
+ uint32_t cpus; /* the number of active CPUs */
+ uint64_t memory; /* memory size in bytes */
+ uint64_t memory_free; /* unassigned memory in bytes */
+ uint32_t num_domains; /* number of active domains */
+} SFLHost_vrt_node_counters;
+
+/* Virtual Domain Statistics */
+/* opaque = counter_data; enterprise = 0; format = 2101 */
+
+/* virDomainState imported from libvirt.h */
+enum SFLVirDomainState {
+ SFL_VIR_DOMAIN_NOSTATE = 0, /* no state */
+ SFL_VIR_DOMAIN_RUNNING = 1, /* the domain is running */
+ SFL_VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
+ SFL_VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
+ SFL_VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
+ SFL_VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
+ SFL_VIR_DOMAIN_CRASHED = 6 /* the domain is crashed */
+};
+
+typedef struct _SFLHost_vrt_cpu_counters {
+ uint32_t state; /* virtDomainState */
+ uint32_t cpuTime; /* the CPU time used in mS */
+ uint32_t cpuCount; /* number of virtual CPUs for the domain */
+} SFLHost_vrt_cpu_counters;
+
+/* Virtual Domain Memory statistics */
+/* opaque = counter_data; enterprise = 0; format = 2102 */
+
+typedef struct _SFLHost_vrt_mem_counters {
+ uint64_t memory; /* memory in bytes used by domain */
+ uint64_t maxMemory; /* memory in bytes allowed */
+} SFLHost_vrt_mem_counters;
+
+/* Virtual Domain Disk statistics */
+/* opaque = counter_data; enterprise = 0; format = 2103 */
+
+typedef struct _SFLHost_vrt_dsk_counters {
+ uint64_t capacity; /* logical size in bytes */
+ uint64_t allocation; /* current allocation in bytes */
+ uint64_t available; /* remaining free bytes */
+ uint32_t rd_req; /* number of read requests */
+ uint64_t rd_bytes; /* number of read bytes */
+ uint32_t wr_req; /* number of write requests */
+ uint64_t wr_bytes; /* number of written bytes */
+ uint32_t errs; /* read/write errors */
+} SFLHost_vrt_dsk_counters;
+
+/* Virtual Domain Network statistics */
+/* opaque = counter_data; enterprise = 0; format = 2104 */
+
+typedef struct _SFLHost_vrt_nio_counters {
+ uint64_t bytes_in;
+ uint32_t pkts_in;
+ uint32_t errs_in;
+ uint32_t drops_in;
+ uint64_t bytes_out;
+ uint32_t pkts_out;
+ uint32_t errs_out;
+ uint32_t drops_out;
+} SFLHost_vrt_nio_counters;
+
+typedef struct _SFLMemcache_counters {
+ uint32_t uptime; /* Number of seconds this server has been running */
+ uint32_t rusage_user; /* Accumulated user time for this process (ms)*/
+ uint32_t rusage_system; /* Accumulated system time for this process (ms)*/
+ uint32_t curr_connections; /* Number of open connections */
+ uint32_t total_connections; /* Total number of connections opened since
+ the server started running */
+ uint32_t connection_structures; /* Number of connection structures
+ allocated by the server */
+ uint32_t cmd_get; /* Cumulative number of retrieval requests */
+ uint32_t cmd_set; /* Cumulative number of storage requests */
+ uint32_t cmd_flush; /* */
+ uint32_t get_hits; /* Number of keys that have been requested and
+ found present */
+ uint32_t get_misses; /* Number of items that have been requested
+ and not found */
+ uint32_t delete_misses;
+ uint32_t delete_hits;
+ uint32_t incr_misses;
+ uint32_t incr_hits;
+ uint32_t decr_misses;
+ uint32_t decr_hits;
+ uint32_t cas_misses;
+ uint32_t cas_hits;
+ uint32_t cas_badval;
+ uint32_t auth_cmds;
+ uint32_t auth_errors;
+ uint64_t bytes_read;
+ uint64_t bytes_written;
+ uint32_t limit_maxbytes;
+ uint32_t accepting_conns;
+ uint32_t listen_disabled_num;
+ uint32_t threads;
+ uint32_t conn_yields;
+ uint64_t bytes;
+ uint32_t curr_items;
+ uint32_t total_items;
+ uint32_t evictions;
+} SFLMemcache_counters;
+
+typedef struct _SFLHTTP_counters {
+ uint32_t method_option_count;
+ uint32_t method_get_count;
+ uint32_t method_head_count;
+ uint32_t method_post_count;
+ uint32_t method_put_count;
+ uint32_t method_delete_count;
+ uint32_t method_trace_count;
+ uint32_t methd_connect_count;
+ uint32_t method_other_count;
+ uint32_t status_1XX_count;
+ uint32_t status_2XX_count;
+ uint32_t status_3XX_count;
+ uint32_t status_4XX_count;
+ uint32_t status_5XX_count;
+ uint32_t status_other_count;
+} SFLHTTP_counters;
+
+
+typedef struct _SFLCAL_counters {
+ uint32_t transactions;
+ uint32_t errors;
+ uint64_t duration_uS;
+} SFLCAL_counters;
/* Counters data */
@@ -506,7 +1047,24 @@
SFLCOUNTERS_TOKENRING = 3,
SFLCOUNTERS_VG = 4,
SFLCOUNTERS_VLAN = 5,
- SFLCOUNTERS_PROCESSOR = 1001
+ SFLCOUNTERS_80211 = 6,
+ SFLCOUNTERS_PROCESSOR = 1001,
+ SFLCOUNTERS_RADIO = 1002,
+ SFLCOUNTERS_HOST_HID = 2000, /* host id */
+ SFLCOUNTERS_ADAPTORS = 2001, /* host adaptors */
+ SFLCOUNTERS_HOST_PAR = 2002, /* host parent */
+ SFLCOUNTERS_HOST_CPU = 2003, /* host cpu */
+ SFLCOUNTERS_HOST_MEM = 2004, /* host memory */
+ SFLCOUNTERS_HOST_DSK = 2005, /* host storage I/O */
+ SFLCOUNTERS_HOST_NIO = 2006, /* host network I/O */
+ SFLCOUNTERS_HOST_VRT_NODE = 2100, /* host virt node */
+ SFLCOUNTERS_HOST_VRT_CPU = 2101, /* host virt cpu */
+ SFLCOUNTERS_HOST_VRT_MEM = 2102, /* host virt mem */
+ SFLCOUNTERS_HOST_VRT_DSK = 2103, /* host virt storage */
+ SFLCOUNTERS_HOST_VRT_NIO = 2104, /* host virt network I/O */
+ SFLCOUNTERS_MEMCACHE = 2200, /* memcached */
+ SFLCOUNTERS_HTTP = 2201, /* http */
+ SFLCOUNTERS_CAL = (4300 << 12) + 5,
};
typedef union _SFLCounters_type {
@@ -515,35 +1073,52 @@
SFLTokenring_counters tokenring;
SFLVg_counters vg;
SFLVlan_counters vlan;
+ SFLWifi_counters wifi;
SFLProcessor_counters processor;
+ SFLRadio_counters radio;
+ SFLHostId hostId;
+ SFLAdaptorList *adaptors;
+ SFLHost_parent host_par;
+ SFLHost_cpu_counters host_cpu;
+ SFLHost_mem_counters host_mem;
+ SFLHost_dsk_counters host_dsk;
+ SFLHost_nio_counters host_nio;
+ SFLHost_vrt_node_counters host_vrt_node;
+ SFLHost_vrt_cpu_counters host_vrt_cpu;
+ SFLHost_vrt_mem_counters host_vrt_mem;
+ SFLHost_vrt_dsk_counters host_vrt_dsk;
+ SFLHost_vrt_nio_counters host_vrt_nio;
+ SFLMemcache_counters memcache;
+ SFLHTTP_counters http;
+ SFLCAL_counters cal;
} SFLCounters_type;
typedef struct _SFLCounters_sample_element {
struct _SFLCounters_sample_element *nxt; /* linked list */
- u_int32_t tag; /* SFLCounters_type_tag */
- u_int32_t length;
+ uint32_t tag; /* SFLCounters_type_tag */
+ uint32_t length;
SFLCounters_type counterBlock;
} SFLCounters_sample_element;
typedef struct _SFLCounters_sample {
- /* u_int32_t tag; */ /* SFL_sample_tag -- enterprise = 0 : format = 2 */
- /* u_int32_t length; */
- u_int32_t sequence_number; /* Incremented with each counters sample
+ /* uint32_t tag; */ /* SFL_sample_tag -- enterprise = 0 : format = 2 */
+ /* uint32_t length; */
+ uint32_t sequence_number; /* Incremented with each counters sample
generated by this source_id */
- u_int32_t source_id; /* fsSourceId */
- u_int32_t num_elements;
+ uint32_t source_id; /* fsSourceId */
+ uint32_t num_elements;
SFLCounters_sample_element *elements;
} SFLCounters_sample;
/* same thing, but the expanded version, so ds_index can be a full 32 bits */
typedef struct _SFLCounters_sample_expanded {
- /* u_int32_t tag; */ /* SFL_sample_tag -- enterprise = 0 : format = 2 */
- /* u_int32_t length; */
- u_int32_t sequence_number; /* Incremented with each counters sample
+ /* uint32_t tag; */ /* SFL_sample_tag -- enterprise = 0 : format = 2 */
+ /* uint32_t length; */
+ uint32_t sequence_number; /* Incremented with each counters sample
generated by this source_id */
- u_int32_t ds_class; /* EXPANDED */
- u_int32_t ds_index; /* EXPANDED */
- u_int32_t num_elements;
+ uint32_t ds_class; /* EXPANDED */
+ uint32_t ds_index; /* EXPANDED */
+ uint32_t num_elements;
SFLCounters_sample_element *elements;
} SFLCounters_sample_expanded;
@@ -558,17 +1133,17 @@
};
typedef struct _SFLSample_datagram_hdr {
- u_int32_t datagram_version; /* (enum SFLDatagram_version) = VERSION5 = 5 */
+ uint32_t datagram_version; /* (enum SFLDatagram_version) = VERSION5 = 5 */
SFLAddress agent_address; /* IP address of sampling agent */
- u_int32_t sub_agent_id; /* Used to distinguishing between datagram
+ uint32_t sub_agent_id; /* Used to distinguishing between datagram
streams from separate agent sub entities
within an device. */
- u_int32_t sequence_number; /* Incremented with each sample datagram
+ uint32_t sequence_number; /* Incremented with each sample datagram
generated */
- u_int32_t uptime; /* Current time (in milliseconds since device
+ uint32_t uptime; /* Current time (in milliseconds since device
last booted). Should be set as close to
datagram transmission time as possible.*/
- u_int32_t num_records; /* Number of tag-len-val flow/counter records to follow */
+ uint32_t num_records; /* Number of tag-len-val flow/counter records to follow */
} SFLSample_datagram_hdr;
#define SFL_MAX_DATAGRAM_SIZE 1500
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/src/sflowtool.c
^
|
@@ -1,7 +1,15 @@
-/* Copyright (c) 2002-2006 InMon Corp. Licensed under the terms of the InMon sFlow licence: */
+/* Copyright (c) 2002-2011 InMon Corp. Licensed under the terms of the InMon sFlow licence: */
/* http://www.inmon.com/technology/sflowlicense.txt */
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#ifdef WIN32
+#include "config_windows.h"
+#else
#include "config.h"
+#endif
#include <stdio.h>
#include <stdarg.h>
@@ -9,22 +17,28 @@
#include <string.h>
#include <errno.h>
#include <sys/types.h>
+#include <fcntl.h>
#include <time.h>
#include <setjmp.h>
-#ifdef WIN32
-#include "winsock2.h"
-#include "fcntl.h"
+#ifdef WIN32
#else
#include <unistd.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/poll.h>
+#include <netinet/in_systm.h>
+#include <netinet/in.h>
#endif
-#include "sflowtool.h"
#include "sflow.h" // sFlow v5
+#include "sflowtool.h" // sFlow v2/4
+
+// If the platform is Linux, enable the source-spoofing feature too.
+#ifdef linux
+#define SPOOFSOURCE 1
+#endif
/*
#ifdef DARWIN
@@ -37,61 +51,69 @@
*/
/* just do it in a portable way... */
-static u_int32_t MyByteSwap32(u_int32_t n) {
+static uint32_t MyByteSwap32(uint32_t n) {
return (((n & 0x000000FF)<<24) +
((n & 0x0000FF00)<<8) +
((n & 0x00FF0000)>>8) +
((n & 0xFF000000)>>24));
}
-static u_int16_t MyByteSwap16(u_int16_t n) {
+static uint16_t MyByteSwap16(uint16_t n) {
return ((n >> 8) | (n << 8));
}
+#ifndef PRIu64
+# ifdef WIN32
+# define PRIu64 "I64u"
+# else
+# define PRIu64 "llu"
+# endif
+#endif
+
#define YES 1
#define NO 0
/* define my own IP header struct - to ease portability */
struct myiphdr
{
- u_int8_t version_and_headerLen;
- u_int8_t tos;
- u_int16_t tot_len;
- u_int16_t id;
- u_int16_t frag_off;
- u_int8_t ttl;
- u_int8_t protocol;
- u_int16_t check;
- u_int32_t saddr;
- u_int32_t daddr;
+ uint8_t version_and_headerLen;
+ uint8_t tos;
+ uint16_t tot_len;
+ uint16_t id;
+ uint16_t frag_off;
+ uint8_t ttl;
+ uint8_t protocol;
+ uint16_t check;
+ uint32_t saddr;
+ uint32_t daddr;
};
/* same for tcp */
struct mytcphdr
{
- u_int16_t th_sport; /* source port */
- u_int16_t th_dport; /* destination port */
- u_int32_t th_seq; /* sequence number */
- u_int32_t th_ack; /* acknowledgement number */
- u_int8_t th_off_and_unused;
- u_int8_t th_flags;
- u_int16_t th_win; /* window */
- u_int16_t th_sum; /* checksum */
- u_int16_t th_urp; /* urgent pointer */
+ uint16_t th_sport; /* source port */
+ uint16_t th_dport; /* destination port */
+ uint32_t th_seq; /* sequence number */
+ uint32_t th_ack; /* acknowledgement number */
+ uint8_t th_off_and_unused;
+ uint8_t th_flags;
+ uint16_t th_win; /* window */
+ uint16_t th_sum; /* checksum */
+ uint16_t th_urp; /* urgent pointer */
};
/* and UDP */
struct myudphdr {
- u_int16_t uh_sport; /* source port */
- u_int16_t uh_dport; /* destination port */
- u_int16_t uh_ulen; /* udp length */
- u_int16_t uh_sum; /* udp checksum */
+ uint16_t uh_sport; /* source port */
+ uint16_t uh_dport; /* destination port */
+ uint16_t uh_ulen; /* udp length */
+ uint16_t uh_sum; /* udp checksum */
};
/* and ICMP */
struct myicmphdr
{
- u_int8_t type; /* message type */
- u_int8_t code; /* type sub-code */
+ uint8_t type; /* message type */
+ uint8_t code; /* type sub-code */
/* ignore the rest */
};
@@ -107,19 +129,20 @@
/* tcpdump file format */
struct pcap_file_header {
- u_int32_t magic;
- u_int16_t version_major;
- u_int16_t version_minor;
- u_int32_t thiszone; /* gmt to local correction */
- u_int32_t sigfigs; /* accuracy of timestamps */
- u_int32_t snaplen; /* max length saved portion of each pkt */
- u_int32_t linktype; /* data link type (DLT_*) */
+ uint32_t magic;
+ uint16_t version_major;
+ uint16_t version_minor;
+ uint32_t thiszone; /* gmt to local correction */
+ uint32_t sigfigs; /* accuracy of timestamps */
+ uint32_t snaplen; /* max length saved portion of each pkt */
+ uint32_t linktype; /* data link type (DLT_*) */
};
struct pcap_pkthdr {
- struct timeval ts; /* time stamp */
- u_int32_t caplen; /* length of portion present */
- u_int32_t len; /* length this packet (off wire) */
+ uint32_t ts_sec; /* time stamp - used to be struct timeval, but time_t can be 64 bits now */
+ uint32_t ts_usec;
+ uint32_t caplen; /* length of portion present */
+ uint32_t len; /* length this packet (off wire) */
/* some systems expect to see more information here. For example,
* on some versions of RedHat Linux, there are three extra fields:
* int index;
@@ -132,21 +155,21 @@
typedef struct _SFForwardingTarget {
struct _SFForwardingTarget *nxt;
struct in_addr host;
- u_int32_t port;
+ uint32_t port;
struct sockaddr_in addr;
int sock;
} SFForwardingTarget;
-typedef enum { SFLFMT_FULL=0, SFLFMT_PCAP, SFLFMT_LINE, SFLFMT_NETFLOW, SFLFMT_FWD } EnumSFLFormat;
+typedef enum { SFLFMT_FULL=0, SFLFMT_PCAP, SFLFMT_LINE, SFLFMT_NETFLOW, SFLFMT_FWD, SFLFMT_CLF } EnumSFLFormat;
typedef struct _SFConfig {
/* sflow(R) options */
- u_int16_t sFlowInputPort;
+ uint16_t sFlowInputPort;
/* netflow(TM) options */
- u_int16_t netFlowOutputPort;
+ uint16_t netFlowOutputPort;
struct in_addr netFlowOutputIP;
int netFlowOutputSocket;
- u_int16_t netFlowPeerAS;
+ uint16_t netFlowPeerAS;
int disableNetFlowScale;
/* tcpdump options */
char *readPcapFileName;
@@ -154,15 +177,15 @@
struct pcap_file_header readPcapHdr;
char *writePcapFile;
EnumSFLFormat outputFormat;
- u_int32_t tcpdumpHdrPad;
+ uint32_t tcpdumpHdrPad;
u_char zeroPad[100];
int pcapSwap;
#ifdef SPOOFSOURCE
int spoofSource;
- u_int16_t ipid;
+ uint16_t ipid;
struct mySendPacket sendPkt;
- u_int32_t packetLen;
+ uint32_t packetLen;
#endif
SFForwardingTarget *forwardingTargets;
@@ -174,88 +197,107 @@
/* content stripping */
int removeContent;
+
+ /* options to restrict IP socket / bind */
+ int listen4;
+ int listen6;
+ int listenControlled;
} SFConfig;
/* make the options structure global to the program */
static SFConfig sfConfig;
+/* define a separate global we can use to construct the common-log-file format */
+typedef struct _SFCommonLogFormat {
+#define SFLFMT_CLF_MAX_LINE 2000
+ int valid;
+ char client[64];
+ char http_log[SFLFMT_CLF_MAX_LINE];
+} SFCommonLogFormat;
+
+static SFCommonLogFormat sfCLF;
+static const char *SFHTTP_method_names[] = { "-", "OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT" };
+
typedef struct _SFSample {
struct in_addr sourceIP;
SFLAddress agent_addr;
- u_int32_t agentSubId;
+ uint32_t agentSubId;
/* the raw pdu */
u_char *rawSample;
- u_int32_t rawSampleLen;
+ uint32_t rawSampleLen;
u_char *endp;
+ time_t pcapTimestamp;
/* decode cursor */
- u_int32_t *datap;
+ uint32_t *datap;
- u_int32_t datagramVersion;
- u_int32_t sampleType;
- u_int32_t ds_class;
- u_int32_t ds_index;
+ uint32_t datagramVersion;
+ uint32_t sampleType;
+ uint32_t ds_class;
+ uint32_t ds_index;
/* generic interface counter sample */
SFLIf_counters ifCounters;
/* sample stream info */
- u_int32_t sysUpTime;
- u_int32_t sequenceNo;
- u_int32_t sampledPacketSize;
- u_int32_t samplesGenerated;
- u_int32_t meanSkipCount;
- u_int32_t samplePool;
- u_int32_t dropEvents;
+ uint32_t sysUpTime;
+ uint32_t sequenceNo;
+ uint32_t sampledPacketSize;
+ uint32_t samplesGenerated;
+ uint32_t meanSkipCount;
+ uint32_t samplePool;
+ uint32_t dropEvents;
/* the sampled header */
- u_int32_t packet_data_tag;
- u_int32_t headerProtocol;
+ uint32_t packet_data_tag;
+ uint32_t headerProtocol;
u_char *header;
int headerLen;
- u_int32_t stripped;
+ uint32_t stripped;
/* header decode */
int gotIPV4;
+ int gotIPV4Struct;
int offsetToIPV4;
int gotIPV6;
+ int gotIPV6Struct;
int offsetToIPV6;
int offsetToPayload;
SFLAddress ipsrc;
SFLAddress ipdst;
- u_int32_t dcd_ipProtocol;
- u_int32_t dcd_ipTos;
- u_int32_t dcd_ipTTL;
- u_int32_t dcd_sport;
- u_int32_t dcd_dport;
- u_int32_t dcd_tcpFlags;
- u_int32_t ip_fragmentOffset;
- u_int32_t udp_pduLen;
+ uint32_t dcd_ipProtocol;
+ uint32_t dcd_ipTos;
+ uint32_t dcd_ipTTL;
+ uint32_t dcd_sport;
+ uint32_t dcd_dport;
+ uint32_t dcd_tcpFlags;
+ uint32_t ip_fragmentOffset;
+ uint32_t udp_pduLen;
/* ports */
- u_int32_t inputPortFormat;
- u_int32_t outputPortFormat;
- u_int32_t inputPort;
- u_int32_t outputPort;
+ uint32_t inputPortFormat;
+ uint32_t outputPortFormat;
+ uint32_t inputPort;
+ uint32_t outputPort;
/* ethernet */
- u_int32_t eth_type;
- u_int32_t eth_len;
+ uint32_t eth_type;
+ uint32_t eth_len;
u_char eth_src[8];
u_char eth_dst[8];
/* vlan */
- u_int32_t in_vlan;
- u_int32_t in_priority;
- u_int32_t internalPriority;
- u_int32_t out_vlan;
- u_int32_t out_priority;
+ uint32_t in_vlan;
+ uint32_t in_priority;
+ uint32_t internalPriority;
+ uint32_t out_vlan;
+ uint32_t out_priority;
int vlanFilterReject;
/* extended data fields */
- u_int32_t num_extended;
- u_int32_t extended_data_tag;
+ uint32_t num_extended;
+ uint32_t extended_data_tag;
#define SASAMPLE_EXTENDED_DATA_SWITCH 1
#define SASAMPLE_EXTENDED_DATA_ROUTER 4
#define SASAMPLE_EXTENDED_DATA_GATEWAY 8
@@ -271,42 +313,42 @@
/* IP forwarding info */
SFLAddress nextHop;
- u_int32_t srcMask;
- u_int32_t dstMask;
+ uint32_t srcMask;
+ uint32_t dstMask;
/* BGP info */
SFLAddress bgp_nextHop;
- u_int32_t my_as;
- u_int32_t src_as;
- u_int32_t src_peer_as;
- u_int32_t dst_as_path_len;
- u_int32_t *dst_as_path;
+ uint32_t my_as;
+ uint32_t src_as;
+ uint32_t src_peer_as;
+ uint32_t dst_as_path_len;
+ uint32_t *dst_as_path;
/* note: version 4 dst as path segments just get printed, not stored here, however
* the dst_peer and dst_as are filled in, since those are used for netflow encoding
*/
- u_int32_t dst_peer_as;
- u_int32_t dst_as;
+ uint32_t dst_peer_as;
+ uint32_t dst_as;
- u_int32_t communities_len;
- u_int32_t *communities;
- u_int32_t localpref;
+ uint32_t communities_len;
+ uint32_t *communities;
+ uint32_t localpref;
/* user id */
#define SA_MAX_EXTENDED_USER_LEN 200
- u_int32_t src_user_charset;
- u_int32_t src_user_len;
+ uint32_t src_user_charset;
+ uint32_t src_user_len;
char src_user[SA_MAX_EXTENDED_USER_LEN+1];
- u_int32_t dst_user_charset;
- u_int32_t dst_user_len;
+ uint32_t dst_user_charset;
+ uint32_t dst_user_len;
char dst_user[SA_MAX_EXTENDED_USER_LEN+1];
/* url */
#define SA_MAX_EXTENDED_URL_LEN 200
#define SA_MAX_EXTENDED_HOST_LEN 200
- u_int32_t url_direction;
- u_int32_t url_len;
+ uint32_t url_direction;
+ uint32_t url_len;
char url[SA_MAX_EXTENDED_URL_LEN+1];
- u_int32_t host_len;
+ uint32_t host_len;
char host[SA_MAX_EXTENDED_HOST_LEN+1];
/* mpls */
@@ -317,13 +359,18 @@
SFLAddress nat_dst;
/* counter blocks */
- u_int32_t statsSamplingInterval;
- u_int32_t counterBlockVersion;
+ uint32_t statsSamplingInterval;
+ uint32_t counterBlockVersion;
/* exception handler context */
jmp_buf env;
-#define SFABORT(s, r) longjmp((s)->env, (r))
+#ifdef DEBUG
+# define SFABORT(s, r) abort()
+#else
+# define SFABORT(s, r) longjmp((s)->env, (r))
+#endif
+
#define SF_ABORT_EOS 1
#define SF_ABORT_DECODE_ERROR 2
#define SF_ABORT_LENGTH_ERROR 3
@@ -333,38 +380,38 @@
/* Cisco netflow version 5 record format */
typedef struct _NFFlow5 {
- u_int32_t srcIP;
- u_int32_t dstIP;
- u_int32_t nextHop;
- u_int16_t if_in;
- u_int16_t if_out;
- u_int32_t frames;
- u_int32_t bytes;
- u_int32_t firstTime;
- u_int32_t lastTime;
- u_int16_t srcPort;
- u_int16_t dstPort;
- u_int8_t pad1;
- u_int8_t tcpFlags;
- u_int8_t ipProto;
- u_int8_t ipTos;
- u_int16_t srcAS;
- u_int16_t dstAS;
- u_int8_t srcMask; /* No. bits */
- u_int8_t dstMask; /* No. bits */
- u_int16_t pad2;
+ uint32_t srcIP;
+ uint32_t dstIP;
+ uint32_t nextHop;
+ uint16_t if_in;
+ uint16_t if_out;
+ uint32_t frames;
+ uint32_t bytes;
+ uint32_t firstTime;
+ uint32_t lastTime;
+ uint16_t srcPort;
+ uint16_t dstPort;
+ uint8_t pad1;
+ uint8_t tcpFlags;
+ uint8_t ipProto;
+ uint8_t ipTos;
+ uint16_t srcAS;
+ uint16_t dstAS;
+ uint8_t srcMask; /* No. bits */
+ uint8_t dstMask; /* No. bits */
+ uint16_t pad2;
} NFFlow5;
typedef struct _NFFlowHdr5 {
- u_int16_t version;
- u_int16_t count;
- u_int32_t sysUpTime;
- u_int32_t unixSeconds;
- u_int32_t unixNanoSeconds;
- u_int32_t flowSequence;
- u_int8_t engineType;
- u_int8_t engineId;
- u_int16_t sampling_interval;
+ uint16_t version;
+ uint16_t count;
+ uint32_t sysUpTime;
+ uint32_t unixSeconds;
+ uint32_t unixNanoSeconds;
+ uint32_t flowSequence;
+ uint8_t engineType;
+ uint8_t engineId;
+ uint16_t sampling_interval;
} NFFlowHdr5;
typedef struct _NFFlowPkt5 {
@@ -372,6 +419,8 @@
NFFlow5 flow; /* normally an array, but here we always send just 1 at a time */
} NFFlowPkt5;
+static void readFlowSample_header(SFSample *sample);
+static void readFlowSample(SFSample *sample, int expanded);
/*_________________---------------------------__________________
_________________ sf_log __________________
@@ -421,11 +470,35 @@
}
/*_________________---------------------------__________________
+ _________________ URLEncode __________________
+ -----------------___________________________------------------
+*/
+
+char *URLEncode(char *in, char *out, int outlen)
+{
+ register char c, *r = in, *w = out;
+ int maxlen = (strlen(in) * 3) + 1;
+ if(outlen < maxlen) return "URLEncode: not enough space";
+ while (c = *r++) {
+ if(isalnum(c)) *w++ = c;
+ else if(isspace(c)) *w++ = '+';
+ else {
+ *w++ = '%';
+ *w++ = bin2hex(c >> 4);
+ *w++ = bin2hex(c & 0x0f);
+ }
+ }
+ *w++ = '\0';
+ return out;
+}
+
+
+/*_________________---------------------------__________________
_________________ IP_to_a __________________
-----------------___________________________------------------
*/
-char *IP_to_a(u_int32_t ipaddr, char *buf)
+char *IP_to_a(uint32_t ipaddr, char *buf)
{
u_char *ip = (u_char *)&ipaddr;
sprintf(buf, "%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]);
@@ -434,9 +507,9 @@
static char *printAddress(SFLAddress *address, char *buf, int bufLen) {
if(address->type == SFLADDRESSTYPE_IP_V4)
- IP_to_a(address->address.ip_v4.s_addr, buf);
+ IP_to_a(address->address.ip_v4.addr, buf);
else {
- u_char *b = address->address.ip_v6.s6_addr;
+ u_char *b = address->address.ip_v6.addr;
// should really be: snprintf(buf, buflen,...) but snprintf() is not always available
sprintf(buf, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9],b[10],b[11],b[12],b[13],b[14],b[15],b[16]);
@@ -517,11 +590,7 @@
// source
char agentIP[51];
printf("CNTR,%s,", printAddress(&sample->agent_addr, agentIP, 50));
-#ifdef WIN32
- printf("%lu,%lu,%I64u,%lu,%lu,%I64u,%lu,%lu,%lu,%lu,%lu,%lu,%I64u,%lu,%lu,%lu,%lu,%lu,%lu\n",
-#else
- printf("%lu,%lu,%llu,%lu,%lu,%llu,%lu,%lu,%lu,%lu,%lu,%lu,%llu,%lu,%lu,%lu,%lu,%lu,%lu\n",
-#endif
+ printf("%u,%u,%"PRIu64",%u,%u,%"PRIu64",%u,%u,%u,%u,%u,%u,%"PRIu64",%u,%u,%u,%u,%u,%u\n",
sample->ifCounters.ifIndex,
sample->ifCounters.ifType,
sample->ifCounters.ifSpeed,
@@ -551,13 +620,13 @@
static void receiveError(SFSample *sample, char *errm, int hexdump)
{
char ipbuf[51];
- u_char scratch[6000];
+ char scratch[6000];
char *msg = "";
char *hex = "";
- u_int32_t markOffset = (u_char *)sample->datap - sample->rawSample;
+ uint32_t markOffset = (u_char *)sample->datap - sample->rawSample;
if(errm) msg = errm;
if(hexdump) {
- printHex(sample->rawSample, sample->rawSampleLen, scratch, 6000, markOffset, 16);
+ printHex(sample->rawSample, sample->rawSampleLen, (u_char *)scratch, 6000, markOffset, 16);
hex = scratch;
}
fprintf(stderr, "%s (source IP = %s) %s\n", msg, IP_to_a(sample->sourceIP.s_addr, ipbuf), hex);
@@ -571,8 +640,9 @@
*/
static void lengthCheck(SFSample *sample, char *description, u_char *start, int len) {
- u_int32_t actualLen = (u_char *)sample->datap - start;
- if(actualLen != len) {
+ uint32_t actualLen = (u_char *)sample->datap - start;
+ uint32_t adjustedLen = ((len + 3) >> 2) << 2;
+ if(actualLen != adjustedLen) {
fprintf(stderr, "%s length error (expected %d, found %d)\n", description, len, actualLen);
SFABORT(sample, SF_ABORT_LENGTH_ERROR);
}
@@ -596,10 +666,11 @@
u_char *start = (u_char *)sample->header;
u_char *end = start + sample->headerLen;
u_char *ptr = start;
- u_int16_t type_len;
+ uint16_t type_len;
/* assume not found */
sample->gotIPV4 = NO;
+ sample->gotIPV6 = NO;
if(sample->headerLen < NFT_ETHHDR_SIZ) return; /* not enough for an Ethernet header */
@@ -615,16 +686,16 @@
if(type_len == 0x8100) {
/* VLAN - next two bytes */
- u_int32_t vlanData = (ptr[0] << 8) + ptr[1];
- u_int32_t vlan = vlanData & 0x0fff;
- u_int32_t priority = vlanData >> 13;
+ uint32_t vlanData = (ptr[0] << 8) + ptr[1];
+ uint32_t vlan = vlanData & 0x0fff;
+ uint32_t priority = vlanData >> 13;
ptr += 2;
/* _____________________________________ */
/* | pri | c | vlan-id | */
/* ------------------------------------- */
/* [priority = 3bits] [Canonical Format Flag = 1bit] [vlan-id = 12 bits] */
- sf_log("decodedVLAN %lu\n", vlan);
- sf_log("decodedPriority %lu\n", priority);
+ sf_log("decodedVLAN %u\n", vlan);
+ sf_log("decodedPriority %u\n", priority);
sample->in_vlan = vlan;
/* now get the type_len again (next two bytes) */
type_len = (ptr[0] << 8) + ptr[1];
@@ -705,16 +776,114 @@
}
}
+/*_________________---------------------------__________________
+ _________________ decode80211MAC __________________
+ -----------------___________________________------------------
+ store the offset to the start of the ipv4 header in the sequence_number field
+ or -1 if not found.
+*/
+
+#define WIFI_MIN_HDR_SIZ 24
+
+static void decode80211MAC(SFSample *sample)
+{
+ u_char *start = (u_char *)sample->header;
+ u_char *end = start + sample->headerLen;
+ u_char *ptr = start;
+
+ /* assume not found */
+ sample->gotIPV4 = NO;
+ sample->gotIPV6 = NO;
+
+ if(sample->headerLen < WIFI_MIN_HDR_SIZ) return; /* not enough for an 80211 MAC header */
+
+ uint32_t fc = (ptr[1] << 8) + ptr[0]; // [b7..b0][b15..b8]
+ uint32_t protocolVersion = fc & 3;
+ uint32_t control = (fc >> 2) & 3;
+ uint32_t subType = (fc >> 4) & 15;
+ uint32_t toDS = (fc >> 8) & 1;
+ uint32_t fromDS = (fc >> 9) & 1;
+ uint32_t moreFrag = (fc >> 10) & 1;
+ uint32_t retry = (fc >> 11) & 1;
+ uint32_t pwrMgt = (fc >> 12) & 1;
+ uint32_t moreData = (fc >> 13) & 1;
+ uint32_t encrypted = (fc >> 14) & 1;
+ uint32_t order = fc >> 15;
+
+ ptr += 2;
+
+ uint32_t duration_id = (ptr[1] << 8) + ptr[0]; // not in network byte order either?
+ ptr += 2;
+
+ switch(control) {
+ case 0: // mgmt
+ case 1: // ctrl
+ case 3: // rsvd
+ break;
+
+ case 2: // data
+ {
+
+ u_char *macAddr1 = ptr;
+ ptr += 6;
+ u_char *macAddr2 = ptr;
+ ptr += 6;
+ u_char *macAddr3 = ptr;
+ ptr += 6;
+ uint32_t sequence = (ptr[0] << 8) + ptr[1];
+ ptr += 2;
+
+ // ToDS FromDS Addr1 Addr2 Addr3 Addr4
+ // 0 0 DA SA BSSID N/A (ad-hoc)
+ // 0 1 DA BSSID SA N/A
+ // 1 0 BSSID SA DA N/A
+ // 1 1 RA TA DA SA (wireless bridge)
+
+ u_char *rxMAC = macAddr1;
+ u_char *txMAC = macAddr2;
+ u_char *srcMAC = NULL;
+ u_char *dstMAC = NULL;
+
+ if(toDS) {
+ dstMAC = macAddr3;
+ if(fromDS) {
+ srcMAC = ptr; // macAddr4. 1,1 => (wireless bridge)
+ ptr += 6;
+ }
+ else srcMAC = macAddr2; // 1,0
+ }
+ else {
+ dstMAC = macAddr1;
+ if(fromDS) srcMAC = macAddr3; // 0,1
+ else srcMAC = macAddr2; // 0,0
+ }
+
+ if(srcMAC) {
+ sf_log("srcMAC %02x%02x%02x%02x%02x%02x\n", srcMAC[0], srcMAC[1], srcMAC[2], srcMAC[3], srcMAC[4], srcMAC[5]);
+ memcpy(sample->eth_src, srcMAC, 6);
+ }
+ if(dstMAC) {
+ sf_log("dstMAC %02x%02x%02x%02x%02x%02x\n", dstMAC[0], dstMAC[1], dstMAC[2], dstMAC[3], dstMAC[4], dstMAC[5]);
+ memcpy(sample->eth_dst, srcMAC, 6);
+ }
+ if(txMAC) sf_log("txMAC %02x%02x%02x%02x%02x%02x\n", txMAC[0], txMAC[1], txMAC[2], txMAC[3], txMAC[4], txMAC[5]);
+ if(rxMAC) sf_log("rxMAC %02x%02x%02x%02x%02x%02x\n", rxMAC[0], rxMAC[1], rxMAC[2], rxMAC[3], rxMAC[4], rxMAC[5]);
+ }
+ }
+}
/*_________________---------------------------__________________
_________________ decodeIPLayer4 __________________
-----------------___________________________------------------
*/
-static void decodeIPLayer4(SFSample *sample, u_char *ptr, u_int32_t ipProtocol) {
+static void decodeIPLayer4(SFSample *sample, u_char *ptr) {
u_char *end = sample->header + sample->headerLen;
- if(ptr > (end - 8)) return; // not enough header bytes left
- switch(ipProtocol) {
+ if(ptr > (end - 8)) {
+ // not enough header bytes left
+ return;
+ }
+ switch(sample->dcd_ipProtocol) {
case 1: /* ICMP */
{
struct myicmphdr icmp;
@@ -738,7 +907,8 @@
sf_log("TCPDstPort %u\n",sample->dcd_dport);
sf_log("TCPFlags %u\n", sample->dcd_tcpFlags);
headerBytes = (tcp.th_off_and_unused >> 4) * 4;
- sample->offsetToPayload = ptr + headerBytes - sample->header;
+ ptr += headerBytes;
+ sample->offsetToPayload = ptr - sample->header;
}
break;
case 17: /* UDP */
@@ -776,9 +946,9 @@
memcpy(&ip, ptr, sizeof(ip));
/* Value copy all ip elements into sample */
sample->ipsrc.type = SFLADDRESSTYPE_IP_V4;
- sample->ipsrc.address.ip_v4.s_addr = ip.saddr;
+ sample->ipsrc.address.ip_v4.addr = ip.saddr;
sample->ipdst.type = SFLADDRESSTYPE_IP_V4;
- sample->ipdst.address.ip_v4.s_addr = ip.daddr;
+ sample->ipdst.address.ip_v4.addr = ip.daddr;
sample->dcd_ipProtocol = ip.protocol;
sample->dcd_ipTos = ip.tos;
sample->dcd_ipTTL = ip.ttl;
@@ -798,7 +968,7 @@
/* advance the pointer to the next protocol layer */
/* ip headerLen is expressed as a number of quads */
ptr += (ip.version_and_headerLen & 0x0f) * 4;
- decodeIPLayer4(sample, ptr, ip.protocol);
+ decodeIPLayer4(sample, ptr);
}
}
}
@@ -810,13 +980,12 @@
static void decodeIPV6(SFSample *sample)
{
- u_int16_t payloadLen;
- u_int32_t label;
- u_int32_t nextHeader;
+ uint16_t payloadLen;
+ uint32_t label;
+ uint32_t nextHeader;
u_char *end = sample->header + sample->headerLen;
if(sample->gotIPV6) {
- char buf[51];
u_char *ptr = sample->header + sample->offsetToIPV6;
// check the version
@@ -872,7 +1041,7 @@
// nextHeader == 50 || // encryption - don't bother coz we'll not be able to read any further
nextHeader == 51 || // auth
nextHeader == 60) { // destination options
- u_int32_t optionLen, skip;
+ uint32_t optionLen, skip;
sf_log("IP6HeaderExtension: %d\n", nextHeader);
nextHeader = ptr[0];
optionLen = 8 * (ptr[1] + 1); // second byte gives option len in 8-byte chunks, not counting first 8
@@ -885,7 +1054,7 @@
// remember as the ip protocol...
sample->dcd_ipProtocol = nextHeader;
sf_log("IPProtocol %u\n", sample->dcd_ipProtocol);
- decodeIPLayer4(sample, ptr, sample->dcd_ipProtocol);
+ decodeIPLayer4(sample, ptr);
}
}
@@ -966,8 +1135,8 @@
char buf[2048];
int bytes = 0;
struct pcap_pkthdr hdr;
- hdr.ts.tv_sec = time(NULL);
- hdr.ts.tv_usec = 0;
+ hdr.ts_sec = (uint32_t)time(NULL);
+ hdr.ts_usec = 0;
hdr.len = sample->sampledPacketSize;
hdr.caplen = sample->headerLen;
if(sfConfig.removeContent && sample->offsetToPayload) {
@@ -999,7 +1168,7 @@
_________________ in_checksum __________________
-----------------___________________________------------------
*/
-static u_int16_t in_checksum(u_int16_t *addr, int len)
+static uint16_t in_checksum(uint16_t *addr, int len)
{
int nleft = len;
u_short *w = addr;
@@ -1067,7 +1236,7 @@
static void sendNetFlowDatagram_spoof(SFSample *sample, NFFlowPkt5 *pkt)
{
- u_int16_t packetLen = sizeof(*pkt) + sizeof(struct myiphdr) + sizeof(struct myudphdr);
+ uint16_t packetLen = sizeof(*pkt) + sizeof(struct myiphdr) + sizeof(struct myudphdr);
// copy the data into the send packet
memcpy(sfConfig.sendPkt.data, (char *)pkt, sizeof(*pkt));
// increment the ip-id
@@ -1076,9 +1245,9 @@
sfConfig.sendPkt.ip.tot_len = htons(packetLen);
sfConfig.sendPkt.udp.uh_ulen = htons(packetLen - sizeof(struct myiphdr));
// set the source address to the source address of the input event
- sfConfig.sendPkt.ip.saddr = sample->agent_addr.address.ip_v4.s_addr;
+ sfConfig.sendPkt.ip.saddr = sample->agent_addr.address.ip_v4.addr;
// IP header checksum
- sfConfig.sendPkt.ip.check = in_checksum((u_int16_t *)&sfConfig.sendPkt.ip, sizeof(struct myiphdr));
+ sfConfig.sendPkt.ip.check = in_checksum((uint16_t *)&sfConfig.sendPkt.ip, sizeof(struct myiphdr));
if (sfConfig.sendPkt.ip.check == 0) sfConfig.sendPkt.ip.check = 0xffff;
// UDP Checksum
// copy out those parts of the IP header that are supposed to be in the UDP checksum,
@@ -1087,8 +1256,8 @@
{
char *ptr;
struct udpmagichdr {
- u_int32_t src;
- u_int32_t dst;
+ uint32_t src;
+ uint32_t dst;
u_char zero;
u_char proto;
u_short len;
@@ -1108,7 +1277,7 @@
memcpy(ptr, &h, sizeof(struct udpmagichdr));
// compute the checksum
sfConfig.sendPkt.udp.uh_sum = 0;
- sfConfig.sendPkt.udp.uh_sum = in_checksum((u_int16_t *)ptr,
+ sfConfig.sendPkt.udp.uh_sum = in_checksum((uint16_t *)ptr,
ntohs(sfConfig.sendPkt.udp.uh_ulen) + sizeof(struct udpmagichdr));
if (sfConfig.sendPkt.udp.uh_sum == 0) sfConfig.sendPkt.udp.uh_sum = 0xffff;
// copy the save bytes back again
@@ -1177,8 +1346,8 @@
static void sendNetFlowDatagram(SFSample *sample)
{
NFFlowPkt5 pkt;
- time_t now = time(NULL);
- u_int32_t bytes;
+ uint32_t now = (uint32_t)time(NULL);
+ uint32_t bytes;
// ignore fragments
if(sample->ip_fragmentOffset > 0) return;
// count the bytes from the start of IP header, with the exception that
@@ -1197,11 +1366,11 @@
pkt.hdr.unixNanoSeconds = 0; /* no need to be more accurate than 1 second */
pkt.hdr.flowSequence = htonl(NFFlowSequenceNo++);
- pkt.flow.srcIP = sample->ipsrc.address.ip_v4.s_addr;
- pkt.flow.dstIP = sample->ipdst.address.ip_v4.s_addr;
- pkt.flow.nextHop = sample->nextHop.address.ip_v4.s_addr;
- pkt.flow.if_in = htons((u_int16_t)sample->inputPort);
- pkt.flow.if_out= htons((u_int16_t)sample->outputPort);
+ pkt.flow.srcIP = sample->ipsrc.address.ip_v4.addr;
+ pkt.flow.dstIP = sample->ipdst.address.ip_v4.addr;
+ pkt.flow.nextHop = sample->nextHop.address.ip_v4.addr;
+ pkt.flow.if_in = htons((uint16_t)sample->inputPort);
+ pkt.flow.if_out= htons((uint16_t)sample->outputPort);
if(!sfConfig.disableNetFlowScale) {
pkt.flow.frames = htonl(sample->meanSkipCount);
@@ -1209,7 +1378,7 @@
}
else {
/* set the sampling_interval header field too (used to be a 16-bit reserved field) */
- u_int16_t samp_ival = (u_int16_t)sample->meanSkipCount;
+ uint16_t samp_ival = (uint16_t)sample->meanSkipCount;
pkt.hdr.sampling_interval = htons(samp_ival & 0x4000);
pkt.flow.frames = htonl(1);
pkt.flow.bytes = htonl(bytes);
@@ -1217,23 +1386,23 @@
pkt.flow.firstTime = pkt.hdr.sysUpTime; /* set the start and end time to be now (in milliseconds since last boot) */
pkt.flow.lastTime = pkt.hdr.sysUpTime;
- pkt.flow.srcPort = htons((u_int16_t)sample->dcd_sport);
- pkt.flow.dstPort = htons((u_int16_t)sample->dcd_dport);
+ pkt.flow.srcPort = htons((uint16_t)sample->dcd_sport);
+ pkt.flow.dstPort = htons((uint16_t)sample->dcd_dport);
pkt.flow.tcpFlags = sample->dcd_tcpFlags;
pkt.flow.ipProto = sample->dcd_ipProtocol;
pkt.flow.ipTos = sample->dcd_ipTos;
if(sfConfig.netFlowPeerAS) {
- pkt.flow.srcAS = htons((u_int16_t)sample->src_peer_as);
- pkt.flow.dstAS = htons((u_int16_t)sample->dst_peer_as);
+ pkt.flow.srcAS = htons((uint16_t)sample->src_peer_as);
+ pkt.flow.dstAS = htons((uint16_t)sample->dst_peer_as);
}
else {
- pkt.flow.srcAS = htons((u_int16_t)sample->src_as);
- pkt.flow.dstAS = htons((u_int16_t)sample->dst_as);
+ pkt.flow.srcAS = htons((uint16_t)sample->src_as);
+ pkt.flow.dstAS = htons((uint16_t)sample->dst_as);
}
- pkt.flow.srcMask = (u_int8_t)sample->srcMask;
- pkt.flow.dstMask = (u_int8_t)sample->dstMask;
+ pkt.flow.srcMask = (uint8_t)sample->srcMask;
+ pkt.flow.dstMask = (uint8_t)sample->dstMask;
#ifdef SPOOFSOURCE
if(sfConfig.spoofSource) {
@@ -1252,57 +1421,72 @@
-----------------___________________________------------------
*/
-static u_int32_t getData32(SFSample *sample) {
- if((u_char *)sample->datap > sample->endp) SFABORT(sample, SF_ABORT_EOS);
- return ntohl(*(sample->datap)++);
+static uint32_t getData32_nobswap(SFSample *sample) {
+ uint32_t ans = *(sample->datap)++;
+ // make sure we didn't run off the end of the datagram. Thanks to
+ // Sven Eschenberg for spotting a bug/overrun-vulnerabilty that was here before.
+ if((u_char *)sample->datap > sample->endp) {
+ SFABORT(sample, SF_ABORT_EOS);
+ }
+ return ans;
+}
+
+static uint32_t getData32(SFSample *sample) {
+ return ntohl(getData32_nobswap(sample));
}
-static u_int32_t getData32_nobswap(SFSample *sample) {
- if((u_char *)sample->datap > sample->endp) SFABORT(sample, SF_ABORT_EOS);
- return *(sample->datap)++;
+static float getFloat(SFSample *sample) {
+ float fl;
+ uint32_t reg = getData32(sample);
+ memcpy(&fl, ®, 4);
+ return fl;
}
-static u_int64_t getData64(SFSample *sample) {
- u_int64_t tmpLo, tmpHi;
+static uint64_t getData64(SFSample *sample) {
+ uint64_t tmpLo, tmpHi;
tmpHi = getData32(sample);
tmpLo = getData32(sample);
return (tmpHi << 32) + tmpLo;
}
-static void skipBytes(SFSample *sample, int skip) {
+static void skipBytes(SFSample *sample, uint32_t skip) {
int quads = (skip + 3) / 4;
sample->datap += quads;
- if((u_char *)sample->datap > sample->endp) SFABORT(sample, SF_ABORT_EOS);
+ if(skip > sample->rawSampleLen || (u_char *)sample->datap > sample->endp) {
+ SFABORT(sample, SF_ABORT_EOS);
+ }
}
-static u_int32_t sf_log_next32(SFSample *sample, char *fieldName) {
- u_int32_t val = getData32(sample);
- sf_log("%s %lu\n", fieldName, val);
+static uint32_t sf_log_next32(SFSample *sample, char *fieldName) {
+ uint32_t val = getData32(sample);
+ sf_log("%s %u\n", fieldName, val);
return val;
}
-static u_int64_t sf_log_next64(SFSample *sample, char *fieldName) {
- u_int64_t val64 = getData64(sample);
-#ifdef WIN32
- sf_log("%s %I64u\n", fieldName, val64);
-#else
- sf_log("%s %llu\n", fieldName, val64);
-#endif
+static uint64_t sf_log_next64(SFSample *sample, char *fieldName) {
+ uint64_t val64 = getData64(sample);
+ sf_log("%s %"PRIu64"\n", fieldName, val64);
return val64;
}
void sf_log_percentage(SFSample *sample, char *fieldName)
{
- u_int32_t hundredths = getData32(sample);
- if(hundredths == (u_int32_t)-1) sf_log("%s unknown\n", fieldName);
+ uint32_t hundredths = getData32(sample);
+ if(hundredths == (uint32_t)-1) sf_log("%s unknown\n", fieldName);
else {
- float percent = (float)hundredths / 10.0;
+ float percent = (float)hundredths / (float)100.0;
sf_log("%s %.1f\n", fieldName, percent);
}
}
-static u_int32_t getString(SFSample *sample, char *buf, int bufLen) {
- u_int32_t len, read_len;
+static float sf_log_nextFloat(SFSample *sample, char *fieldName) {
+ float val = getFloat(sample);
+ sf_log("%s %.3f\n", fieldName, val);
+ return val;
+}
+
+static uint32_t getString(SFSample *sample, char *buf, uint32_t bufLen) {
+ uint32_t len, read_len;
len = getData32(sample);
// truncate if too long
read_len = (len >= bufLen) ? (bufLen - 1) : len;
@@ -1312,24 +1496,24 @@
return len;
}
-static u_int32_t getAddress(SFSample *sample, SFLAddress *address) {
+static uint32_t getAddress(SFSample *sample, SFLAddress *address) {
address->type = getData32(sample);
if(address->type == SFLADDRESSTYPE_IP_V4)
- address->address.ip_v4.s_addr = getData32_nobswap(sample);
+ address->address.ip_v4.addr = getData32_nobswap(sample);
else {
- memcpy(&address->address.ip_v6.s6_addr, sample->datap, 16);
+ memcpy(&address->address.ip_v6.addr, sample->datap, 16);
skipBytes(sample, 16);
}
return address->type;
}
-static char *printTag(u_int32_t tag, char *buf, int bufLen) {
+static char *printTag(uint32_t tag, char *buf, int bufLen) {
// should really be: snprintf(buf, buflen,...) but snprintf() is not always available
- sprintf(buf, "%lu:%lu", (tag >> 12), (tag & 0x00000FFF));
+ sprintf(buf, "%u:%u", (tag >> 12), (tag & 0x00000FFF));
return buf;
}
-static void skipTLVRecord(SFSample *sample, u_int32_t tag, u_int32_t len, char *description) {
+static void skipTLVRecord(SFSample *sample, uint32_t tag, uint32_t len, char *description) {
char buf[51];
sf_log("skipping unknown %s: %s len=%d\n", description, printTag(tag, buf, 50), len);
skipBytes(sample, len);
@@ -1350,10 +1534,10 @@
sample->extended_data_tag |= SASAMPLE_EXTENDED_DATA_SWITCH;
- sf_log("in_vlan %lu\n", sample->in_vlan);
- sf_log("in_priority %lu\n", sample->in_priority);
- sf_log("out_vlan %lu\n", sample->out_vlan);
- sf_log("out_priority %lu\n", sample->out_priority);
+ sf_log("in_vlan %u\n", sample->in_vlan);
+ sf_log("in_priority %u\n", sample->in_priority);
+ sf_log("out_vlan %u\n", sample->out_vlan);
+ sf_log("out_priority %u\n", sample->out_priority);
}
/*_________________---------------------------__________________
@@ -1363,7 +1547,6 @@
static void readExtendedRouter(SFSample *sample)
{
- u_int32_t addrType;
char buf[51];
sf_log("extendedType ROUTER\n");
getAddress(sample, &sample->nextHop);
@@ -1373,8 +1556,8 @@
sample->extended_data_tag |= SASAMPLE_EXTENDED_DATA_ROUTER;
sf_log("nextHop %s\n", printAddress(&sample->nextHop, buf, 50));
- sf_log("srcSubnetMask %lu\n", sample->srcMask);
- sf_log("dstSubnetMask %lu\n", sample->dstMask);
+ sf_log("srcSubnetMask %u\n", sample->srcMask);
+ sf_log("dstSubnetMask %u\n", sample->dstMask);
}
/*_________________---------------------------__________________
@@ -1389,6 +1572,12 @@
sample->my_as = getData32(sample);
sample->src_as = getData32(sample);
sample->src_peer_as = getData32(sample);
+
+ // clear dst_peer_as and dst_as to make sure we are not
+ // remembering values from a previous sample - (thanks Marc Lavine)
+ sample->dst_peer_as = 0;
+ sample->dst_as = 0;
+
sample->dst_as_path_len = getData32(sample);
/* just point at the dst_as_path array */
if(sample->dst_as_path_len > 0) {
@@ -1402,18 +1591,18 @@
sample->extended_data_tag |= SASAMPLE_EXTENDED_DATA_GATEWAY;
- sf_log("my_as %lu\n", sample->my_as);
- sf_log("src_as %lu\n", sample->src_as);
- sf_log("src_peer_as %lu\n", sample->src_peer_as);
- sf_log("dst_as %lu\n", sample->dst_as);
- sf_log("dst_peer_as %lu\n", sample->dst_peer_as);
- sf_log("dst_as_path_len %lu\n", sample->dst_as_path_len);
+ sf_log("my_as %u\n", sample->my_as);
+ sf_log("src_as %u\n", sample->src_as);
+ sf_log("src_peer_as %u\n", sample->src_peer_as);
+ sf_log("dst_as %u\n", sample->dst_as);
+ sf_log("dst_peer_as %u\n", sample->dst_peer_as);
+ sf_log("dst_as_path_len %u\n", sample->dst_as_path_len);
if(sample->dst_as_path_len > 0) {
- u_int32_t i = 0;
+ uint32_t i = 0;
for(; i < sample->dst_as_path_len; i++) {
if(i == 0) sf_log("dst_as_path ");
else sf_log("-");
- sf_log("%lu", ntohl(sample->dst_as_path[i]));
+ sf_log("%u", ntohl(sample->dst_as_path[i]));
}
sf_log("\n");
}
@@ -1426,8 +1615,8 @@
static void readExtendedGateway(SFSample *sample)
{
- u_int32_t segments;
- int seg;
+ uint32_t segments;
+ uint32_t seg;
char buf[51];
sf_log("extendedType GATEWAY\n");
@@ -1440,27 +1629,33 @@
sample->my_as = getData32(sample);
sample->src_as = getData32(sample);
sample->src_peer_as = getData32(sample);
- sf_log("my_as %lu\n", sample->my_as);
- sf_log("src_as %lu\n", sample->src_as);
- sf_log("src_peer_as %lu\n", sample->src_peer_as);
+ sf_log("my_as %u\n", sample->my_as);
+ sf_log("src_as %u\n", sample->src_as);
+ sf_log("src_peer_as %u\n", sample->src_peer_as);
segments = getData32(sample);
+
+ // clear dst_peer_as and dst_as to make sure we are not
+ // remembering values from a previous sample - (thanks Marc Lavine)
+ sample->dst_peer_as = 0;
+ sample->dst_as = 0;
+
if(segments > 0) {
sf_log("dst_as_path ");
for(seg = 0; seg < segments; seg++) {
- u_int32_t seg_type;
- u_int32_t seg_len;
- int i;
+ uint32_t seg_type;
+ uint32_t seg_len;
+ uint32_t i;
seg_type = getData32(sample);
seg_len = getData32(sample);
for(i = 0; i < seg_len; i++) {
- u_int32_t asNumber;
+ uint32_t asNumber;
asNumber = getData32(sample);
/* mark the first one as the dst_peer_as */
if(i == 0 && seg == 0) sample->dst_peer_as = asNumber;
else sf_log("-");
/* make sure the AS sets are in parentheses */
if(i == 0 && seg_type == SFLEXTENDED_AS_SET) sf_log("(");
- sf_log("%lu", asNumber);
+ sf_log("%u", asNumber);
/* mark the last one as the dst_as */
if(seg == (segments - 1) && i == (seg_len - 1)) sample->dst_as = asNumber;
}
@@ -1468,8 +1663,8 @@
}
sf_log("\n");
}
- sf_log("dst_as %lu\n", sample->dst_as);
- sf_log("dst_peer_as %lu\n", sample->dst_peer_as);
+ sf_log("dst_as %u\n", sample->dst_as);
+ sf_log("dst_peer_as %u\n", sample->dst_peer_as);
sample->communities_len = getData32(sample);
/* just point at the communities array */
@@ -1479,17 +1674,17 @@
sample->extended_data_tag |= SASAMPLE_EXTENDED_DATA_GATEWAY;
if(sample->communities_len > 0) {
- int j = 0;
+ uint32_t j = 0;
for(; j < sample->communities_len; j++) {
if(j == 0) sf_log("BGP_communities ");
else sf_log("-");
- sf_log("%lu", ntohl(sample->communities[j]));
+ sf_log("%u", ntohl(sample->communities[j]));
}
sf_log("\n");
}
sample->localpref = getData32(sample);
- sf_log("BGP_localpref %lu\n", sample->localpref);
+ sf_log("BGP_localpref %u\n", sample->localpref);
}
@@ -1532,7 +1727,7 @@
sf_log("extendedType URL\n");
sample->url_direction = getData32(sample);
- sf_log("url_direction %lu\n", sample->url_direction);
+ sf_log("url_direction %u\n", sample->url_direction);
sample->url_len = getString(sample, sample->url, SA_MAX_EXTENDED_URL_LEN);
sf_log("url %s\n", sample->url);
if(sample->datagramVersion >= 5) {
@@ -1551,20 +1746,20 @@
static void mplsLabelStack(SFSample *sample, char *fieldName)
{
SFLLabelStack lstk;
- u_int32_t lab;
+ uint32_t lab;
lstk.depth = getData32(sample);
/* just point at the lablelstack array */
- if(lstk.depth > 0) lstk.stack = (u_int32_t *)sample->datap;
+ if(lstk.depth > 0) lstk.stack = (uint32_t *)sample->datap;
/* and skip over it in the input */
skipBytes(sample, lstk.depth * 4);
if(lstk.depth > 0) {
- int j = 0;
+ uint32_t j = 0;
for(; j < lstk.depth; j++) {
if(j == 0) sf_log("%s ", fieldName);
else sf_log("-");
lab = ntohl(lstk.stack[j]);
- sf_log("%lu.%lu.%lu.%lu",
+ sf_log("%u.%u.%u.%u",
(lab >> 12), // label
(lab >> 9) & 7, // experimental
(lab >> 8) & 1, // bottom of stack
@@ -1618,14 +1813,14 @@
{
#define SA_MAX_TUNNELNAME_LEN 100
char tunnel_name[SA_MAX_TUNNELNAME_LEN+1];
- u_int32_t tunnel_id, tunnel_cos;
+ uint32_t tunnel_id, tunnel_cos;
if(getString(sample, tunnel_name, SA_MAX_TUNNELNAME_LEN) > 0)
sf_log("mpls_tunnel_lsp_name %s\n", tunnel_name);
tunnel_id = getData32(sample);
- sf_log("mpls_tunnel_id %lu\n", tunnel_id);
+ sf_log("mpls_tunnel_id %u\n", tunnel_id);
tunnel_cos = getData32(sample);
- sf_log("mpls_tunnel_cos %lu\n", tunnel_cos);
+ sf_log("mpls_tunnel_cos %u\n", tunnel_cos);
sample->extended_data_tag |= SASAMPLE_EXTENDED_DATA_MPLS_TUNNEL;
}
@@ -1638,13 +1833,13 @@
{
#define SA_MAX_VCNAME_LEN 100
char vc_name[SA_MAX_VCNAME_LEN+1];
- u_int32_t vll_vc_id, vc_cos;
+ uint32_t vll_vc_id, vc_cos;
if(getString(sample, vc_name, SA_MAX_VCNAME_LEN) > 0)
sf_log("mpls_vc_name %s\n", vc_name);
vll_vc_id = getData32(sample);
- sf_log("mpls_vll_vc_id %lu\n", vll_vc_id);
+ sf_log("mpls_vll_vc_id %u\n", vll_vc_id);
vc_cos = getData32(sample);
- sf_log("mpls_vc_cos %lu\n", vc_cos);
+ sf_log("mpls_vc_cos %u\n", vc_cos);
sample->extended_data_tag |= SASAMPLE_EXTENDED_DATA_MPLS_VC;
}
@@ -1657,11 +1852,11 @@
{
#define SA_MAX_FTN_LEN 100
char ftn_descr[SA_MAX_FTN_LEN+1];
- u_int32_t ftn_mask;
+ uint32_t ftn_mask;
if(getString(sample, ftn_descr, SA_MAX_FTN_LEN) > 0)
sf_log("mpls_ftn_descr %s\n", ftn_descr);
ftn_mask = getData32(sample);
- sf_log("mpls_ftn_mask %lu\n", ftn_mask);
+ sf_log("mpls_ftn_mask %u\n", ftn_mask);
sample->extended_data_tag |= SASAMPLE_EXTENDED_DATA_MPLS_FTN;
}
@@ -1672,8 +1867,8 @@
static void readExtendedMplsLDP_FEC(SFSample *sample)
{
- u_int32_t fec_addr_prefix_len = getData32(sample);
- sf_log("mpls_fec_addr_prefix_len %lu\n", fec_addr_prefix_len);
+ uint32_t fec_addr_prefix_len = getData32(sample);
+ sf_log("mpls_fec_addr_prefix_len %u\n", fec_addr_prefix_len);
sample->extended_data_tag |= SASAMPLE_EXTENDED_DATA_MPLS_LDP_FEC;
}
@@ -1684,21 +1879,21 @@
static void readExtendedVlanTunnel(SFSample *sample)
{
- u_int32_t lab;
+ uint32_t lab;
SFLLabelStack lstk;
lstk.depth = getData32(sample);
/* just point at the lablelstack array */
- if(lstk.depth > 0) lstk.stack = (u_int32_t *)sample->datap;
+ if(lstk.depth > 0) lstk.stack = (uint32_t *)sample->datap;
/* and skip over it in the input */
skipBytes(sample, lstk.depth * 4);
if(lstk.depth > 0) {
- int j = 0;
+ uint32_t j = 0;
for(; j < lstk.depth; j++) {
if(j == 0) sf_log("vlan_tunnel ");
else sf_log("-");
lab = ntohl(lstk.stack[j]);
- sf_log("0x%04x.%lu.%lu.%lu",
+ sf_log("0x%04x.%u.%u.%u",
(lab >> 16), // TPI
(lab >> 13) & 7, // priority
(lab >> 12) & 1, // CFI
@@ -1710,20 +1905,85 @@
}
/*_________________---------------------------__________________
- _________________ readExtendedProcess __________________
+ _________________ readExtendedWifiPayload __________________
-----------------___________________________------------------
*/
-static void readExtendedProcess(SFSample *sample)
+static void readExtendedWifiPayload(SFSample *sample)
{
- char pname[51];
- u_int32_t num_processes, i;
- sf_log("extendedType process\n");
- num_processes = getData32(sample);
- for(i = 0; i < num_processes; i++) {
- u_int32_t pid = getData32(sample);
- if(getString(sample, pname, 50) > 0) sf_log("pid %lu %s\n", pid, pname);
- else sf_log("pid %lu <no_process_name>\n", pid);
+ sf_log_next32(sample, "cipher_suite");
+ readFlowSample_header(sample);
+}
+
+/*_________________---------------------------__________________
+ _________________ readExtendedWifiRx __________________
+ -----------------___________________________------------------
+*/
+
+static void readExtendedWifiRx(SFSample *sample)
+{
+ uint32_t i;
+ u_char *bssid;
+ char ssid[SFL_MAX_SSID_LEN+1];
+ if(getString(sample, ssid, SFL_MAX_SSID_LEN) > 0) {
+ sf_log("rx_SSID %s\n", ssid);
+ }
+
+ bssid = (u_char *)sample->datap;
+ sf_log("rx_BSSID ");
+ for(i = 0; i < 6; i++) sf_log("%02x", bssid[i]);
+ sf_log("\n");
+ skipBytes(sample, 6);
+
+ sf_log_next32(sample, "rx_version");
+ sf_log_next32(sample, "rx_channel");
+ sf_log_next64(sample, "rx_speed");
+ sf_log_next32(sample, "rx_rsni");
+ sf_log_next32(sample, "rx_rcpi");
+ sf_log_next32(sample, "rx_packet_uS");
+}
+
+/*_________________---------------------------__________________
+ _________________ readExtendedWifiTx __________________
+ -----------------___________________________------------------
+*/
+
+static void readExtendedWifiTx(SFSample *sample)
+{
+ uint32_t i;
+ u_char *bssid;
+ char ssid[SFL_MAX_SSID_LEN+1];
+ if(getString(sample, ssid, SFL_MAX_SSID_LEN) > 0) {
+ sf_log("tx_SSID %s\n", ssid);
+ }
+
+ bssid = (u_char *)sample->datap;
+ sf_log("tx_BSSID ");
+ for(i = 0; i < 6; i++) sf_log("%02x", bssid[i]);
+ sf_log("\n");
+ skipBytes(sample, 6);
+
+ sf_log_next32(sample, "tx_version");
+ sf_log_next32(sample, "tx_transmissions");
+ sf_log_next32(sample, "tx_packet_uS");
+ sf_log_next32(sample, "tx_retrans_uS");
+ sf_log_next32(sample, "tx_channel");
+ sf_log_next64(sample, "tx_speed");
+ sf_log_next32(sample, "tx_power_mW");
+}
+
+/*_________________---------------------------__________________
+ _________________ readExtendedAggregation __________________
+ -----------------___________________________------------------
+*/
+
+static void readExtendedAggregation(SFSample *sample)
+{
+ uint32_t i, num_pdus = getData32(sample);
+ sf_log("aggregation_num_pdus %u\n", num_pdus);
+ for(i = 0; i < num_pdus; i++) {
+ sf_log("aggregation_pdu %u\n", i);
+ readFlowSample(sample, NO); // not sure if this the right one here $$$
}
}
@@ -1736,22 +1996,22 @@
{
sf_log("flowSampleType HEADER\n");
sample->headerProtocol = getData32(sample);
- sf_log("headerProtocol %lu\n", sample->headerProtocol);
+ sf_log("headerProtocol %u\n", sample->headerProtocol);
sample->sampledPacketSize = getData32(sample);
- sf_log("sampledPacketSize %lu\n", sample->sampledPacketSize);
+ sf_log("sampledPacketSize %u\n", sample->sampledPacketSize);
if(sample->datagramVersion > 4) {
// stripped count introduced in sFlow version 5
sample->stripped = getData32(sample);
- sf_log("strippedBytes %lu\n", sample->stripped);
+ sf_log("strippedBytes %u\n", sample->stripped);
}
sample->headerLen = getData32(sample);
- sf_log("headerLen %lu\n", sample->headerLen);
+ sf_log("headerLen %u\n", sample->headerLen);
sample->header = (u_char *)sample->datap; /* just point at the header */
skipBytes(sample, sample->headerLen);
{
char scratch[2000];
- printHex(sample->header, sample->headerLen, scratch, 2000, 0, 2000);
+ printHex(sample->header, sample->headerLen, (u_char *)scratch, 2000, 0, 2000);
sf_log("headerBytes %s\n", scratch);
}
@@ -1768,6 +2028,9 @@
sample->gotIPV6 = YES;
sample->offsetToIPV6 = 0;
break;
+ case SFLHEADER_IEEE80211MAC:
+ decode80211MAC(sample);
+ break;
case SFLHEADER_ISO88024_TOKENBUS:
case SFLHEADER_ISO88025_TOKENRING:
case SFLHEADER_FDDI:
@@ -1778,6 +2041,9 @@
case SFLHEADER_AAL5:
case SFLHEADER_AAL5_IP:
case SFLHEADER_MPLS:
+ case SFLHEADER_POS:
+ case SFLHEADER_IEEE80211_AMPDU:
+ case SFLHEADER_IEEE80211_AMSDU_SUBFRAME:
sf_log("NO_DECODE headerProtocol=%d\n", sample->headerProtocol);
break;
default:
@@ -1813,8 +2079,8 @@
memcpy(sample->eth_dst, sample->datap, 6);
skipBytes(sample, 6);
sample->eth_type = getData32(sample);
- sf_log("ethernet_type %lu\n", sample->eth_type);
- sf_log("ethernet_len %lu\n", sample->eth_len);
+ sf_log("ethernet_type %u\n", sample->eth_type);
+ sf_log("ethernet_len %u\n", sample->eth_len);
p = sample->eth_src;
sf_log("ethernet_src %02x%02x%02x%02x%02x%02x\n", p[0], p[1], p[2], p[3], p[4], p[5]);
p = sample->eth_dst;
@@ -1838,8 +2104,8 @@
SFLSampled_ipv4 nfKey;
memcpy(&nfKey, sample->header, sizeof(nfKey));
sample->sampledPacketSize = ntohl(nfKey.length);
- sf_log("sampledPacketSize %lu\n", sample->sampledPacketSize);
- sf_log("IPSize %lu\n", sample->sampledPacketSize);
+ sf_log("sampledPacketSize %u\n", sample->sampledPacketSize);
+ sf_log("IPSize %u\n", sample->sampledPacketSize);
sample->ipsrc.type = SFLADDRESSTYPE_IP_V4;
sample->ipsrc.address.ip_v4 = nfKey.src_ip;
sample->ipdst.type = SFLADDRESSTYPE_IP_V4;
@@ -1894,8 +2160,8 @@
SFLSampled_ipv6 nfKey6;
memcpy(&nfKey6, sample->header, sizeof(nfKey6));
sample->sampledPacketSize = ntohl(nfKey6.length);
- sf_log("sampledPacketSize %lu\n", sample->sampledPacketSize);
- sf_log("IPSize %lu\n", sample->sampledPacketSize);
+ sf_log("sampledPacketSize %u\n", sample->sampledPacketSize);
+ sf_log("IPSize %u\n", sample->sampledPacketSize);
sample->ipsrc.type = SFLADDRESSTYPE_IP_V6;
memcpy(&sample->ipsrc.address.ip_v6, &nfKey6.src_ip, 16);
sample->ipdst.type = SFLADDRESSTYPE_IP_V6;
@@ -1903,8 +2169,8 @@
sample->dcd_ipProtocol = ntohl(nfKey6.protocol);
sf_log("srcIP6 %s\n", printAddress(&sample->ipsrc, buf, 50));
sf_log("dstIP6 %s\n", printAddress(&sample->ipdst, buf, 50));
- sf_log("IPProtocol %lu\n", sample->dcd_ipProtocol);
- sf_log("priority %lu\n", ntohl(nfKey6.priority));
+ sf_log("IPProtocol %u\n", sample->dcd_ipProtocol);
+ sf_log("priority %u\n", ntohl(nfKey6.priority));
sample->dcd_sport = ntohl(nfKey6.src_port);
sample->dcd_dport = ntohl(nfKey6.dst_port);
switch(sample->dcd_ipProtocol) {
@@ -1933,6 +2199,181 @@
}
}
+/*_________________----------------------------__________________
+ _________________ readFlowSample_memcache __________________
+ -----------------____________________________------------------
+*/
+
+static void readFlowSample_memcache(SFSample *sample)
+{
+ char key[SFL_MAX_MEMCACHE_KEY+1];
+#define ENC_KEY_BYTES (SFL_MAX_MEMCACHE_KEY * 3) + 1
+ char enc_key[ENC_KEY_BYTES];
+ sf_log("flowSampleType memcache\n");
+ sf_log_next32(sample, "memcache_op_protocol");
+ sf_log_next32(sample, "memcache_op_cmd");
+ if(getString(sample, key, SFL_MAX_MEMCACHE_KEY) > 0) {
+ sf_log("memcache_op_key %s\n", URLEncode(key, enc_key, ENC_KEY_BYTES));
+ }
+ sf_log_next32(sample, "memcache_op_nkeys");
+ sf_log_next32(sample, "memcache_op_value_bytes");
+ sf_log_next32(sample, "memcache_op_duration_uS");
+ sf_log_next32(sample, "memcache_op_status");
+}
+
+/*_________________----------------------------__________________
+ _________________ readFlowSample_http __________________
+ -----------------____________________________------------------
+*/
+
+static void readFlowSample_http(SFSample *sample)
+{
+ char uri[SFL_MAX_HTTP_URI+1];
+ char host[SFL_MAX_HTTP_HOST+1];
+ char referrer[SFL_MAX_HTTP_REFERRER+1];
+ char useragent[SFL_MAX_HTTP_USERAGENT+1];
+ char authuser[SFL_MAX_HTTP_AUTHUSER+1];
+ char mimetype[SFL_MAX_HTTP_MIMETYPE+1];
+ uint32_t method;
+ uint32_t protocol;
+ uint32_t status;
+ uint64_t bytes;
+
+ sf_log("flowSampleType http\n");
+ method = sf_log_next32(sample, "http_method");
+ protocol = sf_log_next32(sample, "http_protocol");
+ if(getString(sample, uri, SFL_MAX_HTTP_URI) > 0) {
+ sf_log("http_uri %s\n", uri);
+ }
+ if(getString(sample, host, SFL_MAX_HTTP_HOST) > 0) {
+ sf_log("http_host %s\n", host);
+ }
+ if(getString(sample, referrer, SFL_MAX_HTTP_REFERRER) > 0) {
+ sf_log("http_referrer %s\n", referrer);
+ }
+ if(getString(sample, useragent, SFL_MAX_HTTP_USERAGENT) > 0) {
+ sf_log("http_useragent %s\n", useragent);
+ }
+ if(getString(sample, authuser, SFL_MAX_HTTP_AUTHUSER) > 0) {
+ sf_log("http_authuser %s\n", authuser);
+ }
+ if(getString(sample, mimetype, SFL_MAX_HTTP_MIMETYPE) > 0) {
+ sf_log("http_mimetype %s\n", mimetype);
+ }
+ bytes = sf_log_next64(sample, "http_bytes");
+ sf_log_next32(sample, "http_duration_uS");
+ status = sf_log_next32(sample, "http_status");
+
+ if(sfConfig.outputFormat == SFLFMT_CLF) {
+ time_t now = time(NULL);
+ char nowstr[200];
+ strftime(nowstr, 200, "%d/%b/%Y:%H:%M:%S %z", localtime(&now));
+ snprintf(sfCLF.http_log, SFLFMT_CLF_MAX_LINE, "- %s [%s] \"%s %s HTTP/%u.%u\" %u %"PRIu64" \"%s\" \"%s\"",
+ authuser[0] ? authuser : "-",
+ nowstr,
+ SFHTTP_method_names[method],
+ uri[0] ? uri : "-",
+ protocol / 1000,
+ protocol % 1000,
+ status,
+ bytes,
+ referrer[0] ? referrer : "-",
+ useragent[0] ? useragent : "-");
+ sfCLF.valid = YES;
+ }
+}
+
+/*_________________----------------------------__________________
+ _________________ readFlowSample_memcache __________________
+ -----------------____________________________------------------
+*/
+
+static void readFlowSample_CAL(SFSample *sample)
+{
+ char pool[SFLCAL_MAX_POOL_LEN];
+ char transaction[SFLCAL_MAX_TRANSACTION_LEN];
+ char operation[SFLCAL_MAX_OPERATION_LEN];
+ char status[SFLCAL_MAX_STATUS_LEN];
+
+ sf_log("flowSampleType CAL\n");
+
+ uint32_t ttype = getData32(sample);
+ if(ttype < SFLOW_CAL_NUM_TRANSACTION_TYPES) {
+ sf_log("transaction_type %s\n", CALTransactionNames[ttype]);
+ }
+ else {
+ sf_log("transaction_type %u\n", ttype);
+ }
+
+ sf_log_next32(sample, "depth");
+ if(getString(sample, pool, SFLCAL_MAX_POOL_LEN) > 0) {
+ sf_log("pool %s\n", pool);
+ }
+ if(getString(sample, transaction, SFLCAL_MAX_TRANSACTION_LEN) > 0) {
+ sf_log("transaction %s\n", transaction);
+ }
+ if(getString(sample, operation, SFLCAL_MAX_OPERATION_LEN) > 0) {
+ sf_log("operation %s\n", operation);
+ }
+ if(getString(sample, status, SFLCAL_MAX_STATUS_LEN) > 0) {
+ sf_log("status %s\n", status);
+ }
+ sf_log_next64(sample, "duration_uS");
+}
+
+/*_________________----------------------------__________________
+ _________________ readExtendedSocket4 __________________
+ -----------------____________________________------------------
+*/
+
+static void readExtendedSocket4(SFSample *sample)
+{
+ char buf[51];
+ sf_log("extendedType socket4\n");
+ sf_log_next32(sample, "socket4_ip_protocol");
+ sample->ipsrc.type = SFLADDRESSTYPE_IP_V4;
+ sample->ipsrc.address.ip_v4.addr = getData32_nobswap(sample);
+ sample->ipdst.type = SFLADDRESSTYPE_IP_V4;
+ sample->ipdst.address.ip_v4.addr = getData32_nobswap(sample);
+ sf_log("socket4_local_ip %s\n", printAddress(&sample->ipsrc, buf, 50));
+ sf_log("socket4_remote_ip %s\n", printAddress(&sample->ipdst, buf, 50));
+ sf_log_next32(sample, "socket4_local_port");
+ sf_log_next32(sample, "socket4_remote_port");
+
+ if(sfConfig.outputFormat == SFLFMT_CLF) {
+ memcpy(sfCLF.client, buf, 50);
+ sfCLF.client[50] = '\0';
+ }
+
+}
+
+/*_________________----------------------------__________________
+ _________________ readExtendedSocket6 __________________
+ -----------------____________________________------------------
+*/
+
+static void readExtendedSocket6(SFSample *sample)
+{
+ char buf[51];
+ sf_log("extendedType socket6\n");
+ sf_log_next32(sample, "socket6_ip_protocol");
+ sample->ipsrc.type = SFLADDRESSTYPE_IP_V6;
+ memcpy(&sample->ipsrc.address.ip_v6, sample->datap, 16);
+ skipBytes(sample, 16);
+ sample->ipdst.type = SFLADDRESSTYPE_IP_V6;
+ memcpy(&sample->ipdst.address.ip_v6, sample->datap, 16);
+ skipBytes(sample, 16);
+ sf_log("socket6_local_ip %s\n", printAddress(&sample->ipsrc, buf, 50));
+ sf_log("socket6_remote_ip %s\n", printAddress(&sample->ipdst, buf, 50));
+ sf_log_next32(sample, "socket6_local_port");
+ sf_log_next32(sample, "socket6_remote_port");
+
+ if(sfConfig.outputFormat == SFLFMT_CLF) {
+ memcpy(sfCLF.client, buf, 51);
+ sfCLF.client[50] = '\0';
+ }
+}
+
/*_________________---------------------------__________________
_________________ readFlowSample_v2v4 __________________
-----------------___________________________------------------
@@ -1943,12 +2384,12 @@
sf_log("sampleType FLOWSAMPLE\n");
sample->samplesGenerated = getData32(sample);
- sf_log("sampleSequenceNo %lu\n", sample->samplesGenerated);
+ sf_log("sampleSequenceNo %u\n", sample->samplesGenerated);
{
- u_int32_t samplerId = getData32(sample);
+ uint32_t samplerId = getData32(sample);
sample->ds_class = samplerId >> 24;
sample->ds_index = samplerId & 0x00ffffff;
- sf_log("sourceId %lu:%lu\n", sample->ds_class, sample->ds_index);
+ sf_log("sourceId %u:%u\n", sample->ds_class, sample->ds_index);
}
sample->meanSkipCount = getData32(sample);
@@ -1956,33 +2397,39 @@
sample->dropEvents = getData32(sample);
sample->inputPort = getData32(sample);
sample->outputPort = getData32(sample);
- sf_log("meanSkipCount %lu\n", sample->meanSkipCount);
- sf_log("samplePool %lu\n", sample->samplePool);
- sf_log("dropEvents %lu\n", sample->dropEvents);
- sf_log("inputPort %lu\n", sample->inputPort);
+ sf_log("meanSkipCount %u\n", sample->meanSkipCount);
+ sf_log("samplePool %u\n", sample->samplePool);
+ sf_log("dropEvents %u\n", sample->dropEvents);
+ sf_log("inputPort %u\n", sample->inputPort);
if(sample->outputPort & 0x80000000) {
- u_int32_t numOutputs = sample->outputPort & 0x7fffffff;
+ uint32_t numOutputs = sample->outputPort & 0x7fffffff;
if(numOutputs > 0) sf_log("outputPort multiple %d\n", numOutputs);
else sf_log("outputPort multiple >1\n");
}
- else sf_log("outputPort %lu\n", sample->outputPort);
+ else sf_log("outputPort %u\n", sample->outputPort);
sample->packet_data_tag = getData32(sample);
switch(sample->packet_data_tag) {
case INMPACKETTYPE_HEADER: readFlowSample_header(sample); break;
- case INMPACKETTYPE_IPV4: readFlowSample_IPv4(sample); break;
- case INMPACKETTYPE_IPV6: readFlowSample_IPv6(sample); break;
+ case INMPACKETTYPE_IPV4:
+ sample->gotIPV4Struct = YES;
+ readFlowSample_IPv4(sample);
+ break;
+ case INMPACKETTYPE_IPV6:
+ sample->gotIPV6Struct = YES;
+ readFlowSample_IPv6(sample);
+ break;
default: receiveError(sample, "unexpected packet_data_tag", YES); break;
}
sample->extended_data_tag = 0;
{
- u_int32_t x;
+ uint32_t x;
sample->num_extended = getData32(sample);
for(x = 0; x < sample->num_extended; x++) {
- u_int32_t extended_tag;
+ uint32_t extended_tag;
extended_tag = getData32(sample);
switch(extended_tag) {
case INMEXTENDED_SWITCH: readExtendedSwitch(sample); break;
@@ -2002,7 +2449,7 @@
switch(sfConfig.outputFormat) {
case SFLFMT_NETFLOW:
/* if we are exporting netflow and we have an IPv4 layer, compose the datagram now */
- if(sfConfig.netFlowOutputSocket && sample->gotIPV4) sendNetFlowDatagram(sample);
+ if(sfConfig.netFlowOutputSocket && (sample->gotIPV4 || sample->gotIPV4Struct)) sendNetFlowDatagram(sample);
break;
case SFLFMT_PCAP:
/* if we are writing tcpdump format, write the next packet record now */
@@ -2012,6 +2459,7 @@
/* or line-by-line output... */
writeFlowLine(sample);
break;
+ case SFLFMT_CLF:
case SFLFMT_FULL:
default:
/* if it was full-detail output then it was done as we went along */
@@ -2027,31 +2475,31 @@
static void readFlowSample(SFSample *sample, int expanded)
{
- u_int32_t num_elements, sampleLength, actualSampleLength;
+ uint32_t num_elements, sampleLength;
u_char *sampleStart;
sf_log("sampleType FLOWSAMPLE\n");
sampleLength = getData32(sample);
sampleStart = (u_char *)sample->datap;
sample->samplesGenerated = getData32(sample);
- sf_log("sampleSequenceNo %lu\n", sample->samplesGenerated);
+ sf_log("sampleSequenceNo %u\n", sample->samplesGenerated);
if(expanded) {
sample->ds_class = getData32(sample);
sample->ds_index = getData32(sample);
}
else {
- u_int32_t samplerId = getData32(sample);
+ uint32_t samplerId = getData32(sample);
sample->ds_class = samplerId >> 24;
sample->ds_index = samplerId & 0x00ffffff;
}
- sf_log("sourceId %lu:%lu\n", sample->ds_class, sample->ds_index);
+ sf_log("sourceId %u:%u\n", sample->ds_class, sample->ds_index);
sample->meanSkipCount = getData32(sample);
sample->samplePool = getData32(sample);
sample->dropEvents = getData32(sample);
- sf_log("meanSkipCount %lu\n", sample->meanSkipCount);
- sf_log("samplePool %lu\n", sample->samplePool);
- sf_log("dropEvents %lu\n", sample->dropEvents);
+ sf_log("meanSkipCount %u\n", sample->meanSkipCount);
+ sf_log("samplePool %u\n", sample->samplePool);
+ sf_log("dropEvents %u\n", sample->dropEvents);
if(expanded) {
sample->inputPortFormat = getData32(sample);
sample->inputPort = getData32(sample);
@@ -2059,7 +2507,7 @@
sample->outputPort = getData32(sample);
}
else {
- u_int32_t inp, outp;
+ uint32_t inp, outp;
inp = getData32(sample);
outp = getData32(sample);
sample->inputPortFormat = inp >> 30;
@@ -2069,24 +2517,28 @@
}
switch(sample->inputPortFormat) {
- case 3: sf_log("inputPort format==3 %lu\n", sample->inputPort); break;
- case 2: sf_log("inputPort multiple %lu\n", sample->inputPort); break;
- case 1: sf_log("inputPort dropCode %lu\n", sample->inputPort); break;
- case 0: sf_log("inputPort %lu\n", sample->inputPort); break;
+ case 3: sf_log("inputPort format==3 %u\n", sample->inputPort); break;
+ case 2: sf_log("inputPort multiple %u\n", sample->inputPort); break;
+ case 1: sf_log("inputPort dropCode %u\n", sample->inputPort); break;
+ case 0: sf_log("inputPort %u\n", sample->inputPort); break;
}
switch(sample->outputPortFormat) {
- case 3: sf_log("outputPort format==3 %lu\n", sample->outputPort); break;
- case 2: sf_log("outputPort multiple %lu\n", sample->outputPort); break;
- case 1: sf_log("outputPort dropCode %lu\n", sample->outputPort); break;
- case 0: sf_log("outputPort %lu\n", sample->outputPort); break;
+ case 3: sf_log("outputPort format==3 %u\n", sample->outputPort); break;
+ case 2: sf_log("outputPort multiple %u\n", sample->outputPort); break;
+ case 1: sf_log("outputPort dropCode %u\n", sample->outputPort); break;
+ case 0: sf_log("outputPort %u\n", sample->outputPort); break;
}
+ // clear the CLF record
+ sfCLF.valid = NO;
+ sfCLF.client[0] = '\0';
+
num_elements = getData32(sample);
{
- int el;
+ uint32_t el;
for(el = 0; el < num_elements; el++) {
- u_int32_t tag, length;
+ uint32_t tag, length;
u_char *start;
char buf[51];
tag = getData32(sample);
@@ -2099,6 +2551,9 @@
case SFLFLOW_ETHERNET: readFlowSample_ethernet(sample); break;
case SFLFLOW_IPV4: readFlowSample_IPv4(sample); break;
case SFLFLOW_IPV6: readFlowSample_IPv6(sample); break;
+ case SFLFLOW_MEMCACHE: readFlowSample_memcache(sample); break;
+ case SFLFLOW_HTTP: readFlowSample_http(sample); break;
+ case SFLFLOW_CAL: readFlowSample_CAL(sample); break;
case SFLFLOW_EX_SWITCH: readExtendedSwitch(sample); break;
case SFLFLOW_EX_ROUTER: readExtendedRouter(sample); break;
case SFLFLOW_EX_GATEWAY: readExtendedGateway(sample); break;
@@ -2111,7 +2566,12 @@
case SFLFLOW_EX_MPLS_FTN: readExtendedMplsFTN(sample); break;
case SFLFLOW_EX_MPLS_LDP_FEC: readExtendedMplsLDP_FEC(sample); break;
case SFLFLOW_EX_VLAN_TUNNEL: readExtendedVlanTunnel(sample); break;
- case SFLFLOW_EX_PROCESS: readExtendedProcess(sample); break;
+ case SFLFLOW_EX_80211_PAYLOAD: readExtendedWifiPayload(sample); break;
+ case SFLFLOW_EX_80211_RX: readExtendedWifiRx(sample); break;
+ case SFLFLOW_EX_80211_TX: readExtendedWifiTx(sample); break;
+ /* case SFLFLOW_EX_AGGREGATION: readExtendedAggregation(sample); break; */
+ case SFLFLOW_EX_SOCKET4: readExtendedSocket4(sample); break;
+ case SFLFLOW_EX_SOCKET6: readExtendedSocket6(sample); break;
default: skipTLVRecord(sample, tag, length, "flow_sample_element"); break;
}
lengthCheck(sample, "flow_sample_element", start, length);
@@ -2133,6 +2593,9 @@
/* or line-by-line output... */
writeFlowLine(sample);
break;
+ case SFLFMT_CLF:
+ printf("%s %s\n", sfCLF.client, sfCLF.http_log);
+ break;
case SFLFMT_FULL:
default:
/* if it was full-detail output then it was done as we went along */
@@ -2255,7 +2718,7 @@
static void readCounters_vlan(SFSample *sample)
{
sample->in_vlan = getData32(sample);
- sf_log("in_vlan %lu\n", sample->in_vlan);
+ sf_log("in_vlan %u\n", sample->in_vlan);
sf_log_next64(sample, "octets");
sf_log_next32(sample, "ucastPkts");
sf_log_next32(sample, "multicastPkts");
@@ -2264,6 +2727,35 @@
}
/*_________________---------------------------__________________
+ _________________ readCounters_80211 __________________
+ -----------------___________________________------------------
+*/
+
+static void readCounters_80211(SFSample *sample)
+{
+ sf_log_next32(sample, "dot11TransmittedFragmentCount");
+ sf_log_next32(sample, "dot11MulticastTransmittedFrameCount");
+ sf_log_next32(sample, "dot11FailedCount");
+ sf_log_next32(sample, "dot11RetryCount");
+ sf_log_next32(sample, "dot11MultipleRetryCount");
+ sf_log_next32(sample, "dot11FrameDuplicateCount");
+ sf_log_next32(sample, "dot11RTSSuccessCount");
+ sf_log_next32(sample, "dot11RTSFailureCount");
+ sf_log_next32(sample, "dot11ACKFailureCount");
+ sf_log_next32(sample, "dot11ReceivedFragmentCount");
+ sf_log_next32(sample, "dot11MulticastReceivedFrameCount");
+ sf_log_next32(sample, "dot11FCSErrorCount");
+ sf_log_next32(sample, "dot11TransmittedFrameCount");
+ sf_log_next32(sample, "dot11WEPUndecryptableCount");
+ sf_log_next32(sample, "dot11QoSDiscardedFragmentCount");
+ sf_log_next32(sample, "dot11AssociatedStationCount");
+ sf_log_next32(sample, "dot11QoSCFPollsReceivedCount");
+ sf_log_next32(sample, "dot11QoSCFPollsUnusedCount");
+ sf_log_next32(sample, "dot11QoSCFPollsUnusableCount");
+ sf_log_next32(sample, "dot11QoSCFPollsLostCount");
+}
+
+/*_________________---------------------------__________________
_________________ readCounters_processor __________________
-----------------___________________________------------------
*/
@@ -2276,6 +2768,311 @@
sf_log_next64(sample, "total_memory_bytes");
sf_log_next64(sample, "free_memory_bytes");
}
+
+/*_________________---------------------------__________________
+ _________________ readCounters_radio __________________
+ -----------------___________________________------------------
+*/
+
+static void readCounters_radio(SFSample *sample)
+{
+ sf_log_next32(sample, "radio_elapsed_time");
+ sf_log_next32(sample, "radio_on_channel_time");
+ sf_log_next32(sample, "radio_on_channel_busy_time");
+}
+
+/*_________________---------------------------__________________
+ _________________ readCounters_host_hid __________________
+ -----------------___________________________------------------
+*/
+
+static void readCounters_host_hid(SFSample *sample)
+{
+ uint32_t i;
+ u_char *uuid;
+ char hostname[SFL_MAX_HOSTNAME_LEN+1];
+ char os_release[SFL_MAX_OSRELEASE_LEN+1];
+ if(getString(sample, hostname, SFL_MAX_HOSTNAME_LEN) > 0) {
+ sf_log("hostname %s\n", hostname);
+ }
+ uuid = (u_char *)sample->datap;
+ sf_log("UUID ");
+ for(i = 0; i < 16; i++) sf_log("%02x", uuid[i]);
+ sf_log("\n");
+ skipBytes(sample, 16);
+ sf_log_next32(sample, "machine_type");
+ sf_log_next32(sample, "os_name");
+ if(getString(sample, os_release, SFL_MAX_OSRELEASE_LEN) > 0) {
+ sf_log("os_release %s\n", os_release);
+ }
+}
+
+/*_________________---------------------------__________________
+ _________________ readCounters_adaptors __________________
+ -----------------___________________________------------------
+*/
+
+static void readCounters_adaptors(SFSample *sample)
+{
+ u_char *mac;
+ uint32_t i, j, ifindex, num_macs, num_adaptors = getData32(sample);
+ for(i = 0; i < num_adaptors; i++) {
+ ifindex = getData32(sample);
+ sf_log("adaptor_%u_ifIndex %u\n", i, ifindex);
+ num_macs = getData32(sample);
+ sf_log("adaptor_%u_MACs %u\n", i, num_macs);
+ for(j = 0; j < num_macs; j++) {
+ mac = (u_char *)sample->datap;
+ sf_log("adaptor_%u_MAC_%u %02x%02x%02x%02x%02x%02x\n",
+ i, j,
+ mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
+ skipBytes(sample, 8);
+ }
+ }
+}
+
+
+/*_________________----------------------------__________________
+ _________________ readCounters_host_parent __________________
+ -----------------____________________________------------------
+*/
+
+static void readCounters_host_parent(SFSample *sample)
+{
+ sf_log_next32(sample, "parent_dsClass");
+ sf_log_next32(sample, "parent_dsIndex");
+}
+
+/*_________________---------------------------__________________
+ _________________ readCounters_host_cpu __________________
+ -----------------___________________________------------------
+*/
+
+static void readCounters_host_cpu(SFSample *sample)
+{
+ sf_log_nextFloat(sample, "cpu_load_one");
+ sf_log_nextFloat(sample, "cpu_load_five");
+ sf_log_nextFloat(sample, "cpu_load_fifteen");
+ sf_log_next32(sample, "cpu_proc_run");
+ sf_log_next32(sample, "cpu_proc_total");
+ sf_log_next32(sample, "cpu_num");
+ sf_log_next32(sample, "cpu_speed");
+ sf_log_next32(sample, "cpu_uptime");
+ sf_log_next32(sample, "cpu_user");
+ sf_log_next32(sample, "cpu_nice");
+ sf_log_next32(sample, "cpu_system");
+ sf_log_next32(sample, "cpu_idle");
+ sf_log_next32(sample, "cpu_wio");
+ sf_log_next32(sample, "cpuintr");
+ sf_log_next32(sample, "cpu_sintr");
+ sf_log_next32(sample, "cpuinterrupts");
+ sf_log_next32(sample, "cpu_contexts");
+}
+
+/*_________________---------------------------__________________
+ _________________ readCounters_host_mem __________________
+ -----------------___________________________------------------
+*/
+
+static void readCounters_host_mem(SFSample *sample)
+{
+ sf_log_next64(sample, "mem_total");
+ sf_log_next64(sample, "mem_free");
+ sf_log_next64(sample, "mem_shared");
+ sf_log_next64(sample, "mem_buffers");
+ sf_log_next64(sample, "mem_cached");
+ sf_log_next64(sample, "swap_total");
+ sf_log_next64(sample, "swap_free");
+ sf_log_next32(sample, "page_in");
+ sf_log_next32(sample, "page_out");
+ sf_log_next32(sample, "swap_in");
+ sf_log_next32(sample, "swap_out");
+}
+
+
+/*_________________---------------------------__________________
+ _________________ readCounters_host_dsk __________________
+ -----------------___________________________------------------
+*/
+
+static void readCounters_host_dsk(SFSample *sample)
+{
+ sf_log_next64(sample, "disk_total");
+ sf_log_next64(sample, "disk_free");
+ sf_log_next32(sample, "disk_partition_max_used");
+ sf_log_next32(sample, "disk_reads");
+ sf_log_next64(sample, "disk_bytes_read");
+ sf_log_next32(sample, "disk_read_time");
+ sf_log_next32(sample, "disk_writes");
+ sf_log_next64(sample, "disk_bytes_written");
+ sf_log_next32(sample, "disk_write_time");
+}
+
+/*_________________---------------------------__________________
+ _________________ readCounters_host_nio __________________
+ -----------------___________________________------------------
+*/
+
+static void readCounters_host_nio(SFSample *sample)
+{
+ sf_log_next64(sample, "nio_bytes_in");
+ sf_log_next32(sample, "nio_pkts_in");
+ sf_log_next32(sample, "nio_errs_in");
+ sf_log_next32(sample, "nio_drops_in");
+ sf_log_next64(sample, "nio_bytes_out");
+ sf_log_next32(sample, "nio_pkts_out");
+ sf_log_next32(sample, "nio_errs_out");
+ sf_log_next32(sample, "nio_drops_out");
+}
+
+/*_________________-----------------------------__________________
+ _________________ readCounters_host_vnode __________________
+ -----------------_____________________________------------------
+*/
+
+static void readCounters_host_vnode(SFSample *sample)
+{
+ sf_log_next32(sample, "vnode_mhz");
+ sf_log_next32(sample, "vnode_cpus");
+ sf_log_next64(sample, "vnode_memory");
+ sf_log_next64(sample, "vnode_memory_free");
+ sf_log_next32(sample, "vnode_num_domains");
+}
+
+/*_________________----------------------------__________________
+ _________________ readCounters_host_vcpu __________________
+ -----------------____________________________------------------
+*/
+
+static void readCounters_host_vcpu(SFSample *sample)
+{
+ sf_log_next32(sample, "vcpu_state");
+ sf_log_next32(sample, "vcpu_cpu_mS");
+ sf_log_next32(sample, "vcpu_cpuCount");
+}
+
+/*_________________----------------------------__________________
+ _________________ readCounters_host_vmem __________________
+ -----------------____________________________------------------
+*/
+
+static void readCounters_host_vmem(SFSample *sample)
+{
+ sf_log_next64(sample, "vmem_memory");
+ sf_log_next64(sample, "vmem_maxMemory");
+}
+
+/*_________________----------------------------__________________
+ _________________ readCounters_host_vdsk __________________
+ -----------------____________________________------------------
+*/
+
+static void readCounters_host_vdsk(SFSample *sample)
+{
+ sf_log_next64(sample, "vdsk_capacity");
+ sf_log_next64(sample, "vdsk_allocation");
+ sf_log_next64(sample, "vdsk_available");
+ sf_log_next32(sample, "vdsk_rd_req");
+ sf_log_next64(sample, "vdsk_rd_bytes");
+ sf_log_next32(sample, "vdsk_wr_req");
+ sf_log_next64(sample, "vdsk_wr_bytes");
+ sf_log_next32(sample, "vdsk_errs");
+}
+
+/*_________________----------------------------__________________
+ _________________ readCounters_host_vnio __________________
+ -----------------____________________________------------------
+*/
+
+static void readCounters_host_vnio(SFSample *sample)
+{
+ sf_log_next64(sample, "vnio_bytes_in");
+ sf_log_next32(sample, "vnio_pkts_in");
+ sf_log_next32(sample, "vnio_errs_in");
+ sf_log_next32(sample, "vnio_drops_in");
+ sf_log_next64(sample, "vnio_bytes_out");
+ sf_log_next32(sample, "vnio_pkts_out");
+ sf_log_next32(sample, "vnio_errs_out");
+ sf_log_next32(sample, "vnio_drops_out");
+}
+
+/*_________________----------------------------__________________
+ _________________ readCounters_memcache __________________
+ -----------------____________________________------------------
+*/
+
+static void readCounters_memcache(SFSample *sample)
+{
+ sf_log_next32(sample, "memcache_uptime");
+ sf_log_next32(sample, "memcache_rusage_user");
+ sf_log_next32(sample, "memcache_rusage_system");
+ sf_log_next32(sample, "memcache_curr_connections");
+ sf_log_next32(sample, "memcache_total_connections");
+ sf_log_next32(sample, "memcache_connection_structures");
+ sf_log_next32(sample, "memcache_cmd_get");
+ sf_log_next32(sample, "memcache_cmd_set");
+ sf_log_next32(sample, "memcache_cmd_flush");
+ sf_log_next32(sample, "memcache_get_hits");
+ sf_log_next32(sample, "memcache_get_misses");
+ sf_log_next32(sample, "memcache_delete_misses");
+ sf_log_next32(sample, "memcache_delete_hits");
+ sf_log_next32(sample, "memcache_incr_misses");
+ sf_log_next32(sample, "memcache_incr_hits");
+ sf_log_next32(sample, "memcache_decr_misses");
+ sf_log_next32(sample, "memcache_decr_hits");
+ sf_log_next32(sample, "memcache_cas_misses");
+ sf_log_next32(sample, "memcache_cas_hits");
+ sf_log_next32(sample, "memcache_cas_badval");
+ sf_log_next32(sample, "memcache_auth_cmds");
+ sf_log_next32(sample, "memcache_auth_errors");
+ sf_log_next64(sample, "memcache_bytes_read");
+ sf_log_next64(sample, "memcache_bytes_written");
+ sf_log_next32(sample, "memcache_limit_maxbytes");
+ sf_log_next32(sample, "memcache_accepting_conns");
+ sf_log_next32(sample, "memcache_listen_disabled_num");
+ sf_log_next32(sample, "memcache_threads");
+ sf_log_next32(sample, "memcache_conn_yields");
+ sf_log_next64(sample, "memcache_bytes");
+ sf_log_next32(sample, "memcache_curr_items");
+ sf_log_next32(sample, "memcache_total_items");
+ sf_log_next32(sample, "memcache_evictions");
+}
+
+/*_________________----------------------------__________________
+ _________________ readCounters_http __________________
+ -----------------____________________________------------------
+*/
+
+static void readCounters_http(SFSample *sample)
+{
+ sf_log_next32(sample, "http_method_option_count");
+ sf_log_next32(sample, "http_method_get_count");
+ sf_log_next32(sample, "http_method_head_count");
+ sf_log_next32(sample, "http_method_post_count");
+ sf_log_next32(sample, "http_method_put_count");
+ sf_log_next32(sample, "http_method_delete_count");
+ sf_log_next32(sample, "http_method_trace_count");
+ sf_log_next32(sample, "http_methd_connect_count");
+ sf_log_next32(sample, "http_method_other_count");
+ sf_log_next32(sample, "http_status_1XX_count");
+ sf_log_next32(sample, "http_status_2XX_count");
+ sf_log_next32(sample, "http_status_3XX_count");
+ sf_log_next32(sample, "http_status_4XX_count");
+ sf_log_next32(sample, "http_status_5XX_count");
+ sf_log_next32(sample, "http_status_other_count");
+}
+
+/*_________________----------------------------__________________
+ _________________ readCounters_CAL __________________
+ -----------------____________________________------------------
+*/
+
+static void readCounters_CAL(SFSample *sample)
+{
+ sf_log_next32(sample, "transactions");
+ sf_log_next32(sample, "errors");
+ sf_log_next64(sample, "duration_uS");
+}
/*_________________---------------------------__________________
_________________ readCountersSample_v2v4 __________________
@@ -2286,20 +3083,20 @@
{
sf_log("sampleType COUNTERSSAMPLE\n");
sample->samplesGenerated = getData32(sample);
- sf_log("sampleSequenceNo %lu\n", sample->samplesGenerated);
+ sf_log("sampleSequenceNo %u\n", sample->samplesGenerated);
{
- u_int32_t samplerId = getData32(sample);
+ uint32_t samplerId = getData32(sample);
sample->ds_class = samplerId >> 24;
sample->ds_index = samplerId & 0x00ffffff;
}
- sf_log("sourceId %lu:%lu\n", sample->ds_class, sample->ds_index);
+ sf_log("sourceId %u:%u\n", sample->ds_class, sample->ds_index);
sample->statsSamplingInterval = getData32(sample);
- sf_log("statsSamplingInterval %lu\n", sample->statsSamplingInterval);
+ sf_log("statsSamplingInterval %u\n", sample->statsSamplingInterval);
/* now find out what sort of counter blocks we have here... */
sample->counterBlockVersion = getData32(sample);
- sf_log("counterBlockVersion %lu\n", sample->counterBlockVersion);
+ sf_log("counterBlockVersion %u\n", sample->counterBlockVersion);
/* first see if we should read the generic stats */
switch(sample->counterBlockVersion) {
@@ -2335,32 +3132,32 @@
static void readCountersSample(SFSample *sample, int expanded)
{
- u_int32_t sampleLength;
- u_int32_t num_elements;
- char *sampleStart;
+ uint32_t sampleLength;
+ uint32_t num_elements;
+ u_char *sampleStart;
sf_log("sampleType COUNTERSSAMPLE\n");
sampleLength = getData32(sample);
sampleStart = (u_char *)sample->datap;
sample->samplesGenerated = getData32(sample);
- sf_log("sampleSequenceNo %lu\n", sample->samplesGenerated);
+ sf_log("sampleSequenceNo %u\n", sample->samplesGenerated);
if(expanded) {
sample->ds_class = getData32(sample);
sample->ds_index = getData32(sample);
}
else {
- u_int32_t samplerId = getData32(sample);
+ uint32_t samplerId = getData32(sample);
sample->ds_class = samplerId >> 24;
sample->ds_index = samplerId & 0x00ffffff;
}
- sf_log("sourceId %lu:%lu\n", sample->ds_class, sample->ds_index);
+ sf_log("sourceId %u:%u\n", sample->ds_class, sample->ds_index);
num_elements = getData32(sample);
{
- int el;
+ uint32_t el;
for(el = 0; el < num_elements; el++) {
- u_int32_t tag, length;
- char *start;
+ uint32_t tag, length;
+ u_char *start;
char buf[51];
tag = getData32(sample);
sf_log("counterBlock_tag %s\n", printTag(tag, buf, 50));
@@ -2373,7 +3170,24 @@
case SFLCOUNTERS_TOKENRING:readCounters_tokenring(sample); break;
case SFLCOUNTERS_VG: readCounters_vg(sample); break;
case SFLCOUNTERS_VLAN: readCounters_vlan(sample); break;
+ case SFLCOUNTERS_80211: readCounters_80211(sample); break;
case SFLCOUNTERS_PROCESSOR: readCounters_processor(sample); break;
+ case SFLCOUNTERS_RADIO: readCounters_radio(sample); break;
+ case SFLCOUNTERS_HOST_HID: readCounters_host_hid(sample); break;
+ case SFLCOUNTERS_ADAPTORS: readCounters_adaptors(sample); break;
+ case SFLCOUNTERS_HOST_PAR: readCounters_host_parent(sample); break;
+ case SFLCOUNTERS_HOST_CPU: readCounters_host_cpu(sample); break;
+ case SFLCOUNTERS_HOST_MEM: readCounters_host_mem(sample); break;
+ case SFLCOUNTERS_HOST_DSK: readCounters_host_dsk(sample); break;
+ case SFLCOUNTERS_HOST_NIO: readCounters_host_nio(sample); break;
+ case SFLCOUNTERS_HOST_VRT_NODE: readCounters_host_vnode(sample); break;
+ case SFLCOUNTERS_HOST_VRT_CPU: readCounters_host_vcpu(sample); break;
+ case SFLCOUNTERS_HOST_VRT_MEM: readCounters_host_vmem(sample); break;
+ case SFLCOUNTERS_HOST_VRT_DSK: readCounters_host_vdsk(sample); break;
+ case SFLCOUNTERS_HOST_VRT_NIO: readCounters_host_vnio(sample); break;
+ case SFLCOUNTERS_MEMCACHE: readCounters_memcache(sample); break;
+ case SFLCOUNTERS_HTTP: readCounters_http(sample); break;
+ case SFLCOUNTERS_CAL: readCounters_CAL(sample); break;
default: skipTLVRecord(sample, tag, length, "counters_sample_element"); break;
}
lengthCheck(sample, "counters_sample_element", start, length);
@@ -2391,17 +3205,17 @@
static void readSFlowDatagram(SFSample *sample)
{
- u_int32_t addressType;
- u_int32_t samplesInPacket;
+ uint32_t samplesInPacket;
struct timeval now;
char buf[51];
/* log some datagram info */
- now.tv_sec = time(NULL);
+ now.tv_sec = (long)time(NULL);
now.tv_usec = 0;
sf_log("datagramSourceIP %s\n", IP_to_a(sample->sourceIP.s_addr, buf));
- sf_log("datagramSize %lu\n", sample->rawSampleLen);
- sf_log("unixSecondsUTC %lu\n", now.tv_sec);
+ sf_log("datagramSize %u\n", sample->rawSampleLen);
+ sf_log("unixSecondsUTC %u\n", now.tv_sec);
+ if(sample->pcapTimestamp) sf_log("pcapTimestamp %s\n", ctime(&sample->pcapTimestamp)); // thanks to Richard Clayton for this bugfix
/* check the version */
sample->datagramVersion = getData32(sample);
@@ -2418,21 +3232,25 @@
/* version 5 has an agent sub-id as well */
if(sample->datagramVersion >= 5) {
sample->agentSubId = getData32(sample);
- sf_log("agentSubId %lu\n", sample->agentSubId);
+ sf_log("agentSubId %u\n", sample->agentSubId);
}
sample->sequenceNo = getData32(sample); /* this is the packet sequence number */
sample->sysUpTime = getData32(sample);
samplesInPacket = getData32(sample);
sf_log("agent %s\n", printAddress(&sample->agent_addr, buf, 50));
- sf_log("packetSequenceNo %lu\n", sample->sequenceNo);
- sf_log("sysUpTime %lu\n", sample->sysUpTime);
- sf_log("samplesInPacket %lu\n", samplesInPacket);
+ sf_log("packetSequenceNo %u\n", sample->sequenceNo);
+ sf_log("sysUpTime %u\n", sample->sysUpTime);
+ sf_log("samplesInPacket %u\n", samplesInPacket);
/* now iterate and pull out the flows and counters samples */
{
- u_int32_t samp = 0;
+ uint32_t samp = 0;
for(; samp < samplesInPacket; samp++) {
+ if((u_char *)sample->datap >= sample->endp) {
+ fprintf(stderr, "unexpected end of datagram after sample %d of %d\n", samp, samplesInPacket);
+ SFABORT(sample, SF_ABORT_EOS);
+ }
// just read the tag, then call the approriate decode fn
sample->sampleType = getData32(sample);
sf_log("startSample ----------------------\n");
@@ -2469,7 +3287,7 @@
sf_log("startDatagram =================================\n");
if((exceptionVal = setjmp(sample->env)) == 0) {
// TRY
- sample->datap = (u_int32_t *)sample->rawSample;
+ sample->datap = (uint32_t *)sample->rawSample;
sample->endp = (u_char *)sample->rawSample + sample->rawSampleLen;
readSFlowDatagram(sample);
}
@@ -2485,7 +3303,7 @@
-----------------_____________________________------------------
*/
-static int openInputUDPSocket(u_int16_t port)
+static int openInputUDPSocket(uint16_t port)
{
int soc;
struct sockaddr_in myaddr_in;
@@ -2493,20 +3311,62 @@
/* Create socket */
memset((char *)&myaddr_in, 0, sizeof(struct sockaddr_in));
myaddr_in.sin_family = AF_INET;
- myaddr_in.sin_addr.s_addr = INADDR_ANY;
+ //myaddr_in6.sin6_addr.s_addr = INADDR_ANY;
myaddr_in.sin_port = htons(port);
-
+
if ((soc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
- fprintf(stderr, "socket() failed, %s\n", strerror(errno));
- exit(-6);
+ fprintf(stderr, "v4 socket() creation failed, %s\n", strerror(errno));
+ return -1;
}
+#ifndef WIN32
+ /* make socket non-blocking */
+ int save_fd = fcntl(soc, F_GETFL);
+ save_fd |= O_NONBLOCK;
+ fcntl(soc, F_SETFL, save_fd);
+#endif /* WIN32 */
+
/* Bind the socket */
- if (bind(soc, (struct sockaddr *)&myaddr_in, sizeof(struct sockaddr_in)) == -1) {
- fprintf(stderr, "bind() failed, port = %d : %s\n", port, strerror(errno));
- exit(-7);
+ if(bind(soc, (struct sockaddr *)&myaddr_in, sizeof(struct sockaddr_in)) == -1) {
+ fprintf(stderr, "v4 bind() failed, port = %d : %s\n", port, strerror(errno));
+ return -1;
+ }
+ return soc;
+}
+
+/*__________________-----------------------------__________________
+ _________________ openInputUDP6Socket __________________
+ -----------------_____________________________------------------
+*/
+
+static int openInputUDP6Socket(uint16_t port)
+{
+ int soc;
+ struct sockaddr_in6 myaddr_in6;
+
+ /* Create socket */
+ memset((char *)&myaddr_in6, 0, sizeof(struct sockaddr_in6));
+ myaddr_in6.sin6_family = AF_INET6;
+ //myaddr_in6.sin6_addr = INADDR_ANY;
+ myaddr_in6.sin6_port = htons(port);
+
+ if ((soc = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
+ fprintf(stderr, "v6 socket() creation failed, %s\n", strerror(errno));
+ exit(-6);
}
+#ifndef WIN32
+ /* make socket non-blocking */
+ int save_fd = fcntl(soc, F_GETFL);
+ save_fd |= O_NONBLOCK;
+ fcntl(soc, F_SETFL, save_fd);
+#endif /* WIN32 */
+
+ /* Bind the socket */
+ if(bind(soc, (struct sockaddr *)&myaddr_in6, sizeof(struct sockaddr_in6)) == -1) {
+ fprintf(stderr, "v6 bind() failed, port = %d : %s\n", port, strerror(errno));
+ return -1;
+ }
return soc;
}
@@ -2520,7 +3380,7 @@
struct sockaddr_in peer;
int alen, cc;
#define MAX_PKT_SIZ 65536
- u_char buf[MAX_PKT_SIZ];
+ char buf[MAX_PKT_SIZ];
alen = sizeof(peer);
memset(&peer, 0, sizeof(peer));
cc = recvfrom(soc, buf, MAX_PKT_SIZ, 0, (struct sockaddr *)&peer, &alen);
@@ -2550,7 +3410,7 @@
else {
SFSample sample;
memset(&sample, 0, sizeof(sample));
- sample.rawSample = buf;
+ sample.rawSample = (u_char *)buf;
sample.rawSampleLen = cc;
sample.sourceIP = peer.sin_addr;
receiveSFlowDatagram(&sample);
@@ -2565,12 +3425,10 @@
static int readPcapPacket(FILE *file)
{
- int cc;
u_char buf[2048];
struct pcap_pkthdr hdr;
SFSample sample;
int skipBytes = 0;
- time_t tim;
if(fread(&hdr, sizeof(hdr), 1, file) != 1) {
if(feof(file)) return 0;
@@ -2585,8 +3443,8 @@
}
if(sfConfig.pcapSwap) {
- hdr.ts.tv_sec = MyByteSwap32(hdr.ts.tv_sec);
- hdr.ts.tv_usec = MyByteSwap32(hdr.ts.tv_usec);
+ hdr.ts_sec = MyByteSwap32(hdr.ts_sec);
+ hdr.ts_usec = MyByteSwap32(hdr.ts_usec);
hdr.caplen = MyByteSwap32(hdr.caplen);
hdr.len = MyByteSwap32(hdr.len);
}
@@ -2596,8 +3454,6 @@
exit(-34);
}
- tim = hdr.ts.tv_sec;
- fprintf(stderr, "\npcap_timestamp = %s\n", ctime(&tim)); // thanks to Richard Clayton for this bugfix
if(hdr.caplen < hdr.len) {
fprintf(stderr, "incomplete datagram (pcap snaplen too short)\n");
@@ -2610,6 +3466,7 @@
memset(&sample, 0, sizeof(sample));
sample.rawSample = buf + skipBytes;
sample.rawSampleLen = hdr.caplen - skipBytes;
+ sample.pcapTimestamp = hdr.ts_sec;
receiveSFlowDatagram(&sample);
fflush(stdout);
}
@@ -2629,7 +3486,7 @@
}
}
-static void testVlan(u_int32_t num) {
+static void testVlan(uint32_t num) {
if(num > FILTER_MAX_VLAN) {
fprintf(stderr, "error parsing vlan filter (vlan = <%d> out of range)\n", num);
exit(-20);
@@ -2641,9 +3498,10 @@
char *p = start;
char *sep = " ,";
do {
+ uint32_t first, last;
p += strspn(p, sep); // skip separators
peekForNumber(p);
- u_int32_t first = strtol(p, &p, 0); // read an integer
+ first = strtol(p, &p, 0); // read an integer
testVlan(first);
array[first] = flag;
if(*p == '-') {
@@ -2651,10 +3509,10 @@
p++;
// and read the second integer
peekForNumber(p);
- u_int32_t last = strtol(p, &p, 0);
+ last = strtol(p, &p, 0);
testVlan(last);
if(last > first) {
- int i;
+ uint32_t i;
// iterate over the range
for(i = first; i <= last; i++) array[i] = flag;
}
@@ -2671,7 +3529,7 @@
static int addForwardingTarget(char *hostandport)
{
- SFForwardingTarget *tgt = calloc(1, sizeof(SFForwardingTarget));
+ SFForwardingTarget *tgt = (SFForwardingTarget *)calloc(1, sizeof(SFForwardingTarget));
// expect <host>/<port>
#define MAX_HOSTANDPORT_LEN 100
char hoststr[MAX_HOSTANDPORT_LEN+1];
@@ -2701,9 +3559,9 @@
}
else tgt->host.s_addr = ((struct in_addr *)(ent->h_addr))->s_addr;
}
- sscanf(p, "%lu", &tgt->port);
+ sscanf(p, "%u", &tgt->port);
if(tgt->port <= 0 || tgt->port >= 65535) {
- fprintf(stderr, "invalid port: %lu\n", tgt->port);
+ fprintf(stderr, "invalid port: %u\n", tgt->port);
return NO;
}
@@ -2730,7 +3588,7 @@
static void instructions(char *command)
{
- fprintf(stderr,"Copyright (c) InMon Corporation 2000-2006 ALL RIGHTS RESERVED\n");
+ fprintf(stderr,"Copyright (c) InMon Corporation 2000-2011 ALL RIGHTS RESERVED\n");
fprintf(stderr,"This software provided with NO WARRANTY WHATSOEVER\n");
fprintf(stderr,"\n");
fprintf(stderr,"Usage: %s [-p port]\n", command);
@@ -2742,7 +3600,9 @@
fprintf(stderr, " - ...repeat for multiple collectors)\n");
fprintf(stderr,"\n");
fprintf(stderr,"csv output:\n");
- fprintf(stderr, " -l - (output in line-by-line format)\n"); fprintf(stderr,"\n");
+ fprintf(stderr, " -l - (output in line-by-line format)\n");
+ fprintf(stderr, " -H - (output HTTP common log file format)\n");
+ fprintf(stderr,"\n");
fprintf(stderr,"tcpdump output:\n");
fprintf(stderr, " -t - (output in binary tcpdump(1) format)\n");
fprintf(stderr, " -r file - (read binary tcpdump(1) format)\n");
@@ -2762,6 +3622,9 @@
fprintf(stderr,"Filters:\n");
fprintf(stderr, " +v <vlans> - include vlans (e.g. +v 0-20,4091)\n");
fprintf(stderr, " -v <vlans> - exclude vlans\n");
+ fprintf(stderr, " -4 - listen on IPv4 socket only\n");
+ fprintf(stderr, " -6 - listen on IPv6 socket only\n");
+ fprintf(stderr, " +4 - listen on both IPv4 and IPv6 sockets\n");
fprintf(stderr, "\n");
fprintf(stderr, "=============== Advanced Tools ==============================================\n");
fprintf(stderr, "| sFlowTrend (FREE) - http://www.inmon.com/products/sFlowTrend.php |\n");
@@ -2783,17 +3646,39 @@
/* set defaults */
sfConfig.sFlowInputPort = 6343;
-
+#ifdef WIN32
+ sfConfig.listen4 = YES;
+ sfConfig.listen6 = NO;
+#else
+ sfConfig.listen4 = NO;
+ sfConfig.listen6 = YES;
+#endif
+
/* walk though the args */
while (arg < argc) {
plus = (argv[arg][0] == '+');
minus = (argv[arg][0] == '-');
if(plus == NO && minus == NO) instructions(*argv);
in = argv[arg++][1];
+ /* some options expect an argument - check for that first */
+ switch(in) {
+ case 'p':
+ case 'r':
+ case 'z':
+ case 'c':
+ case 'd':
+ case 'f':
+ case 'v':
+ if(arg >= argc) instructions(*argv);
+ break;
+ default: break;
+ }
+
switch(in) {
case 'p': sfConfig.sFlowInputPort = atoi(argv[arg++]); break;
case 't': sfConfig.outputFormat = SFLFMT_PCAP; break;
case 'l': sfConfig.outputFormat = SFLFMT_LINE; break;
+ case 'H': sfConfig.outputFormat = SFLFMT_CLF; break;
case 'r': sfConfig.readPcapFileName = strdup(argv[arg++]); break;
case 'x': sfConfig.removeContent = YES; break;
case 'z': sfConfig.tcpdumpHdrPad = atoi(argv[arg++]); break;
@@ -2837,6 +3722,16 @@
parseVlanFilter(sfConfig.vlanFilter, NO, argv[arg++]);
}
break;
+ case '4':
+ sfConfig.listenControlled = YES;
+ sfConfig.listen4 = YES;
+ sfConfig.listen6 = plus;
+ break;
+ case '6':
+ sfConfig.listenControlled = YES;
+ sfConfig.listen4 = NO;
+ sfConfig.listen6 = YES;
+ break;
case '?':
case 'h':
default: instructions(*argv);
@@ -2851,7 +3746,7 @@
int main(int argc, char *argv[])
{
- u_int32_t soc;
+ int32_t soc4=-1,soc6=-1;
#ifdef WIN32
WSADATA wsadata;
@@ -2878,9 +3773,23 @@
readPcapHeader();
}
else {
- /* open the input socket */
- soc = openInputUDPSocket(sfConfig.sFlowInputPort);
+ /* open the input socket -- for now it's either a v4 or v6 socket, but in future
+ we may allow both to be opened so that platforms that refuse to allow v4 packets
+ to be received on a v6 socket can still get both. I think for that to really work,
+ however, we will probably need to allow the bind() to be on a particular v4 or v6
+ address. Otherwise it seems likely that we will get a clash(?) */
+ if(sfConfig.listen6) {
+ soc6 = openInputUDP6Socket(sfConfig.sFlowInputPort);
+ }
+ if(sfConfig.listen4 || (soc6 == -1 && !sfConfig.listenControlled)) {
+ soc4 = openInputUDPSocket(sfConfig.sFlowInputPort);
+ }
+ if(soc4 == -1 && soc6 == -1) {
+ fprintf(stderr, "unable to open UDP read socket\n");
+ exit(-7);
+ }
}
+
/* possible open an output socket for netflow */
if(sfConfig.netFlowOutputPort != 0 && sfConfig.netFlowOutputIP.s_addr != 0) openNetFlowSocket();
/* if tcpdump format, write the header */
@@ -2890,19 +3799,42 @@
while(readPcapPacket(sfConfig.readPcapFile));
}
else {
+ fd_set readfds;
+ /* set the select mask */
+ FD_ZERO(&readfds);
/* loop reading packets */
for(;;) {
- struct pollfd my_pollfd = { soc, POLLIN, 0 };
- int nfds = poll(&my_pollfd, 1, 100);
- // we may return prematurely if a signal was caught, in which case nfds will
- // be -1 and errno will be set to EINTR. If we get any other error, abort.
+ int nfds;
+ struct timeval timeout;
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 100000;
+
+ if(soc4 != -1) FD_SET(soc4, &readfds);
+ if(soc6 != -1) FD_SET(soc6, &readfds);
+
+ nfds = select((soc4 > soc6 ? soc4 : soc6) + 1,
+ &readfds,
+ (fd_set *)NULL,
+ (fd_set *)NULL,
+ &timeout);
+ /* we may return prematurely if a signal was caught, in which case
+ * nfds will be -1 and errno will be set to EINTR. If we get any other
+ * error, abort.
+ */
if(nfds < 0 && errno != EINTR) {
fprintf(stderr, "select() returned %d\n", nfds);
exit(-9);
}
- if ((nfds > 0) && (my_pollfd.revents & POLLIN)) readPacket(soc);
+ if(nfds > 0) {
+ if(soc4 != -1 && FD_ISSET(soc4, &readfds)) readPacket(soc4);
+ if(soc6 != -1 && FD_ISSET(soc6, &readfds)) readPacket(soc6);
+ }
}
}
return 0;
}
+
+#if defined(__cplusplus)
+} /* extern "C" */
+#endif
|
[-]
[+]
|
Changed |
sflowtool-3.20.tar.bz2/src/sflowtool.h
^
|
@@ -1,4 +1,4 @@
-/* Copyright (c) 2002-2006 InMon Corp. Licensed under the terms of the InMon sFlow licence: */
+/* Copyright (c) 2002-2011 InMon Corp. Licensed under the terms of the InMon sFlow licence: */
/* http://www.inmon.com/technology/sflowlicense.txt */
#ifndef SFLOWTOOL_H
@@ -8,53 +8,18 @@
extern "C" {
#endif
-#include "config.h"
-
-#ifdef WIN32
-typedef _int64 u_int64_t;
-#define HAVE_U_INT64_T 1
-#else
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#endif /* WIN32 */
-
-#ifndef HAVE_U_INT64_T
-typedef unsigned long long u_int64_t;
-#endif
-
-#ifndef HAVE_U_INTXX_T
-typedef unsigned char u_int8_t;
-typedef unsigned short u_int16_t;
-typedef unsigned long u_int32_t;
-#endif
-
-#ifndef HAVE_STRUCT_IN6_ADDR
-struct in6_addr
-{
- union
- {
- u_int8_t u6_addr8[16];
- u_int16_t u6_addr16[8];
- u_int32_t u6_addr32[4];
- } in6_u;
-#define s6_addr in6_u.u6_addr8
-#define s6_addr16 in6_u.u6_addr16
-#define s6_addr32 in6_u.u6_addr32
-};
-#endif
-
enum INMAddress_type {
INMADDRESSTYPE_IP_V4 = 1,
INMADDRESSTYPE_IP_V6 = 2
};
typedef union _INMAddress_value {
- struct in_addr ip_v4;
- struct in6_addr ip_v6;
+ SFLIPv4 ip_v4;
+ SFLIPv6 ip_v6;
} INMAddress_value;
typedef struct _INMAddress {
- u_int32_t type; /* enum INMAddress_type */
+ uint32_t type; /* enum INMAddress_type */
INMAddress_value address;
} INMAddress;
@@ -82,38 +47,38 @@
};
typedef struct _INMSampled_header {
- u_int32_t header_protocol; /* (enum INMHeader_protocol) */
- u_int32_t frame_length; /* Original length of packet before sampling */
- u_int32_t header_length; /* length of sampled header bytes to follow */
- u_int8_t header[INM_MAX_HEADER_SIZE]; /* Header bytes */
+ uint32_t header_protocol; /* (enum INMHeader_protocol) */
+ uint32_t frame_length; /* Original length of packet before sampling */
+ uint32_t header_length; /* length of sampled header bytes to follow */
+ uint8_t header[INM_MAX_HEADER_SIZE]; /* Header bytes */
} INMSampled_header;
/* Packet IP version 4 data */
typedef struct _INMSampled_ipv4 {
- u_int32_t length; /* The length of the IP packet
+ uint32_t length; /* The length of the IP packet
excluding lower layer encapsulations */
- u_int32_t protocol; /* IP Protocol type (for example, TCP = 6, UDP = 17) */
- struct in_addr src_ip; /* Source IP Address */
- struct in_addr dst_ip; /* Destination IP Address */
- u_int32_t src_port; /* TCP/UDP source port number or equivalent */
- u_int32_t dst_port; /* TCP/UDP destination port number or equivalent */
- u_int32_t tcp_flags; /* TCP flags */
- u_int32_t tos; /* IP type of service */
+ uint32_t protocol; /* IP Protocol type (for example, TCP = 6, UDP = 17) */
+ SFLIPv4 src_ip; /* Source IP Address */
+ SFLIPv4 dst_ip; /* Destination IP Address */
+ uint32_t src_port; /* TCP/UDP source port number or equivalent */
+ uint32_t dst_port; /* TCP/UDP destination port number or equivalent */
+ uint32_t tcp_flags; /* TCP flags */
+ uint32_t tos; /* IP type of service */
} INMSampled_ipv4;
/* Packet IP version 6 data */
typedef struct _INMSampled_ipv6 {
- u_int32_t length; /* The length of the IP packet
+ uint32_t length; /* The length of the IP packet
excluding lower layer encapsulations */
- u_int32_t protocol; /* IP Protocol type (for example, TCP = 6, UDP = 17) */
- struct in6_addr src_ip; /* Source IP Address */
- struct in6_addr dst_ip; /* Destination IP Address */
- u_int32_t src_port; /* TCP/UDP source port number or equivalent */
- u_int32_t dst_port; /* TCP/UDP destination port number or equivalent */
- u_int32_t tcp_flags; /* TCP flags */
- u_int32_t tos; /* IP type of service */
+ uint32_t protocol; /* IP Protocol type (for example, TCP = 6, UDP = 17) */
+ SFLIPv6 src_ip; /* Source IP Address */
+ SFLIPv6 dst_ip; /* Destination IP Address */
+ uint32_t src_port; /* TCP/UDP source port number or equivalent */
+ uint32_t dst_port; /* TCP/UDP destination port number or equivalent */
+ uint32_t tcp_flags; /* TCP flags */
+ uint32_t tos; /* IP type of service */
} INMSampled_ipv6;
@@ -136,18 +101,18 @@
/* Extended switch data */
typedef struct _INMExtended_switch {
- u_int32_t src_vlan; /* The 802.1Q VLAN id of incomming frame */
- u_int32_t src_priority; /* The 802.1p priority */
- u_int32_t dst_vlan; /* The 802.1Q VLAN id of outgoing frame */
- u_int32_t dst_priority; /* The 802.1p priority */
+ uint32_t src_vlan; /* The 802.1Q VLAN id of incomming frame */
+ uint32_t src_priority; /* The 802.1p priority */
+ uint32_t dst_vlan; /* The 802.1Q VLAN id of outgoing frame */
+ uint32_t dst_priority; /* The 802.1p priority */
} INMExtended_switch;
/* Extended router data */
typedef struct _INMExtended_router {
INMAddress nexthop; /* IP address of next hop router */
- u_int32_t src_mask; /* Source address prefix mask bits */
- u_int32_t dst_mask; /* Destination address prefix mask bits */
+ uint32_t src_mask; /* Source address prefix mask bits */
+ uint32_t dst_mask; /* Destination address prefix mask bits */
} INMExtended_router;
/* Extended gateway data */
@@ -158,11 +123,11 @@
};
typedef struct _INMExtended_as_path_segment {
- u_int32_t type; /* enum INMExtended_as_path_segment_type */
- u_int32_t length; /* number of AS numbers in set/sequence */
+ uint32_t type; /* enum INMExtended_as_path_segment_type */
+ uint32_t length; /* number of AS numbers in set/sequence */
union {
- u_int32_t *set;
- u_int32_t *seq;
+ uint32_t *set;
+ uint32_t *seq;
} as;
} INMExtended_as_path_segment;
@@ -170,31 +135,31 @@
Here is the old version first... */
typedef struct _INMExtended_gateway_v2 {
- u_int32_t as; /* AS number for this gateway */
- u_int32_t src_as; /* AS number of source (origin) */
- u_int32_t src_peer_as; /* AS number of source peer */
- u_int32_t dst_as_path_length; /* number of AS numbers in path */
- u_int32_t *dst_as_path;
+ uint32_t as; /* AS number for this gateway */
+ uint32_t src_as; /* AS number of source (origin) */
+ uint32_t src_peer_as; /* AS number of source peer */
+ uint32_t dst_as_path_length; /* number of AS numbers in path */
+ uint32_t *dst_as_path;
} INMExtended_gateway_v2;
/* now here is the new version... */
typedef struct _INMExtended_gateway_v4 {
- u_int32_t as; /* AS number for this gateway */
- u_int32_t src_as; /* AS number of source (origin) */
- u_int32_t src_peer_as; /* AS number of source peer */
- u_int32_t dst_as_path_segments; /* number of segments in path */
+ uint32_t as; /* AS number for this gateway */
+ uint32_t src_as; /* AS number of source (origin) */
+ uint32_t src_peer_as; /* AS number of source peer */
+ uint32_t dst_as_path_segments; /* number of segments in path */
INMExtended_as_path_segment *dst_as_path; /* list of seqs or sets */
- u_int32_t communities_length; /* number of communities */
- u_int32_t *communities; /* set of communities */
- u_int32_t localpref; /* LocalPref associated with this route */
+ uint32_t communities_length; /* number of communities */
+ uint32_t *communities; /* set of communities */
+ uint32_t localpref; /* LocalPref associated with this route */
} INMExtended_gateway_v4;
/* Extended user data */
typedef struct _INMExtended_user {
- u_int32_t src_user_len;
+ uint32_t src_user_len;
char *src_user;
- u_int32_t dst_user_len;
+ uint32_t dst_user_len;
char *dst_user;
} INMExtended_user;
enum INMExtended_url_direction {
@@ -203,8 +168,8 @@
};
typedef struct _INMExtended_url {
- u_int32_t direction; /* enum INMExtended_url_direction */
- u_int32_t url_len;
+ uint32_t direction; /* enum INMExtended_url_direction */
+ uint32_t url_len;
char *url;
} INMExtended_url;
@@ -221,18 +186,18 @@
/* Format of a single sample */
typedef struct _INMFlow_sample {
- u_int32_t sequence_number; /* Incremented with each flow sample
+ uint32_t sequence_number; /* Incremented with each flow sample
generated */
- u_int32_t source_id; /* fsSourceId */
- u_int32_t sampling_rate; /* fsPacketSamplingRate */
- u_int32_t sample_pool; /* Total number of packets that could have been
+ uint32_t source_id; /* fsSourceId */
+ uint32_t sampling_rate; /* fsPacketSamplingRate */
+ uint32_t sample_pool; /* Total number of packets that could have been
sampled (i.e. packets skipped by sampling
process + total number of samples) */
- u_int32_t drops; /* Number of times a packet was dropped due to
+ uint32_t drops; /* Number of times a packet was dropped due to
lack of resources */
- u_int32_t input; /* SNMP ifIndex of input interface.
+ uint32_t input; /* SNMP ifIndex of input interface.
0 if interface is not known. */
- u_int32_t output; /* SNMP ifIndex of output interface,
+ uint32_t output; /* SNMP ifIndex of output interface,
0 if interface is not known.
Set most significant bit to indicate
multiple destination interfaces
@@ -247,7 +212,7 @@
0x80000000 indicates a packet sent to
an unknown number of
interfaces greater than 1.*/
- u_int32_t packet_data_tag; /* enum INMPacket_information_type */
+ uint32_t packet_data_tag; /* enum INMPacket_information_type */
INMPacket_data_type packet_data; /* Information about sampled packet */
/* in the sFlow packet spec the next field is the number of extended objects
@@ -274,46 +239,46 @@
/* Generic interface counters - see RFC 1573, 2233 */
typedef struct _INMIf_counters {
- u_int32_t ifIndex;
- u_int32_t ifType;
- u_int64_t ifSpeed;
- u_int32_t ifDirection; /* Derived from MAU MIB (RFC 2239)
+ uint32_t ifIndex;
+ uint32_t ifType;
+ uint64_t ifSpeed;
+ uint32_t ifDirection; /* Derived from MAU MIB (RFC 2239)
0 = unknown, 1 = full-duplex,
2 = half-duplex, 3 = in, 4 = out */
- u_int32_t ifStatus; /* bit field with the following bits assigned:
+ uint32_t ifStatus; /* bit field with the following bits assigned:
bit 0 = ifAdminStatus (0 = down, 1 = up)
bit 1 = ifOperStatus (0 = down, 1 = up) */
- u_int64_t ifInOctets;
- u_int32_t ifInUcastPkts;
- u_int32_t ifInMulticastPkts;
- u_int32_t ifInBroadcastPkts;
- u_int32_t ifInDiscards;
- u_int32_t ifInErrors;
- u_int32_t ifInUnknownProtos;
- u_int64_t ifOutOctets;
- u_int32_t ifOutUcastPkts;
- u_int32_t ifOutMulticastPkts;
- u_int32_t ifOutBroadcastPkts;
- u_int32_t ifOutDiscards;
- u_int32_t ifOutErrors;
- u_int32_t ifPromiscuousMode;
+ uint64_t ifInOctets;
+ uint32_t ifInUcastPkts;
+ uint32_t ifInMulticastPkts;
+ uint32_t ifInBroadcastPkts;
+ uint32_t ifInDiscards;
+ uint32_t ifInErrors;
+ uint32_t ifInUnknownProtos;
+ uint64_t ifOutOctets;
+ uint32_t ifOutUcastPkts;
+ uint32_t ifOutMulticastPkts;
+ uint32_t ifOutBroadcastPkts;
+ uint32_t ifOutDiscards;
+ uint32_t ifOutErrors;
+ uint32_t ifPromiscuousMode;
} INMIf_counters;
/* Ethernet interface counters - see RFC 2358 */
typedef struct _INMEthernet_specific_counters {
- u_int32_t dot3StatsAlignmentErrors;
- u_int32_t dot3StatsFCSErrors;
- u_int32_t dot3StatsSingleCollisionFrames;
- u_int32_t dot3StatsMultipleCollisionFrames;
- u_int32_t dot3StatsSQETestErrors;
- u_int32_t dot3StatsDeferredTransmissions;
- u_int32_t dot3StatsLateCollisions;
- u_int32_t dot3StatsExcessiveCollisions;
- u_int32_t dot3StatsInternalMacTransmitErrors;
- u_int32_t dot3StatsCarrierSenseErrors;
- u_int32_t dot3StatsFrameTooLongs;
- u_int32_t dot3StatsInternalMacReceiveErrors;
- u_int32_t dot3StatsSymbolErrors;
+ uint32_t dot3StatsAlignmentErrors;
+ uint32_t dot3StatsFCSErrors;
+ uint32_t dot3StatsSingleCollisionFrames;
+ uint32_t dot3StatsMultipleCollisionFrames;
+ uint32_t dot3StatsSQETestErrors;
+ uint32_t dot3StatsDeferredTransmissions;
+ uint32_t dot3StatsLateCollisions;
+ uint32_t dot3StatsExcessiveCollisions;
+ uint32_t dot3StatsInternalMacTransmitErrors;
+ uint32_t dot3StatsCarrierSenseErrors;
+ uint32_t dot3StatsFrameTooLongs;
+ uint32_t dot3StatsInternalMacReceiveErrors;
+ uint32_t dot3StatsSymbolErrors;
} INMEthernet_specific_counters;
typedef struct _INMEthernet_counters {
@@ -329,24 +294,24 @@
/* Token ring counters - see RFC 1748 */
typedef struct _INMTokenring_specific_counters {
- u_int32_t dot5StatsLineErrors;
- u_int32_t dot5StatsBurstErrors;
- u_int32_t dot5StatsACErrors;
- u_int32_t dot5StatsAbortTransErrors;
- u_int32_t dot5StatsInternalErrors;
- u_int32_t dot5StatsLostFrameErrors;
- u_int32_t dot5StatsReceiveCongestions;
- u_int32_t dot5StatsFrameCopiedErrors;
- u_int32_t dot5StatsTokenErrors;
- u_int32_t dot5StatsSoftErrors;
- u_int32_t dot5StatsHardErrors;
- u_int32_t dot5StatsSignalLoss;
- u_int32_t dot5StatsTransmitBeacons;
- u_int32_t dot5StatsRecoverys;
- u_int32_t dot5StatsLobeWires;
- u_int32_t dot5StatsRemoves;
- u_int32_t dot5StatsSingles;
- u_int32_t dot5StatsFreqErrors;
+ uint32_t dot5StatsLineErrors;
+ uint32_t dot5StatsBurstErrors;
+ uint32_t dot5StatsACErrors;
+ uint32_t dot5StatsAbortTransErrors;
+ uint32_t dot5StatsInternalErrors;
+ uint32_t dot5StatsLostFrameErrors;
+ uint32_t dot5StatsReceiveCongestions;
+ uint32_t dot5StatsFrameCopiedErrors;
+ uint32_t dot5StatsTokenErrors;
+ uint32_t dot5StatsSoftErrors;
+ uint32_t dot5StatsHardErrors;
+ uint32_t dot5StatsSignalLoss;
+ uint32_t dot5StatsTransmitBeacons;
+ uint32_t dot5StatsRecoverys;
+ uint32_t dot5StatsLobeWires;
+ uint32_t dot5StatsRemoves;
+ uint32_t dot5StatsSingles;
+ uint32_t dot5StatsFreqErrors;
} INMTokenring_specific_counters;
typedef struct _INMTokenring_counters {
@@ -357,20 +322,20 @@
/* 100 BaseVG interface counters - see RFC 2020 */
typedef struct _INMVg_specific_counters {
- u_int32_t dot12InHighPriorityFrames;
- u_int64_t dot12InHighPriorityOctets;
- u_int32_t dot12InNormPriorityFrames;
- u_int64_t dot12InNormPriorityOctets;
- u_int32_t dot12InIPMErrors;
- u_int32_t dot12InOversizeFrameErrors;
- u_int32_t dot12InDataErrors;
- u_int32_t dot12InNullAddressedFrames;
- u_int32_t dot12OutHighPriorityFrames;
- u_int64_t dot12OutHighPriorityOctets;
- u_int32_t dot12TransitionIntoTrainings;
- u_int64_t dot12HCInHighPriorityOctets;
- u_int64_t dot12HCInNormPriorityOctets;
- u_int64_t dot12HCOutHighPriorityOctets;
+ uint32_t dot12InHighPriorityFrames;
+ uint64_t dot12InHighPriorityOctets;
+ uint32_t dot12InNormPriorityFrames;
+ uint64_t dot12InNormPriorityOctets;
+ uint32_t dot12InIPMErrors;
+ uint32_t dot12InOversizeFrameErrors;
+ uint32_t dot12InDataErrors;
+ uint32_t dot12InNullAddressedFrames;
+ uint32_t dot12OutHighPriorityFrames;
+ uint64_t dot12OutHighPriorityOctets;
+ uint32_t dot12TransitionIntoTrainings;
+ uint64_t dot12HCInHighPriorityOctets;
+ uint64_t dot12HCInNormPriorityOctets;
+ uint64_t dot12HCOutHighPriorityOctets;
} INMVg_specific_counters;
typedef struct _INMVg_counters {
@@ -385,12 +350,12 @@
} INMWan_counters;
typedef struct _INMVlan_counters {
- u_int32_t vlan_id;
- u_int64_t octets;
- u_int32_t ucastPkts;
- u_int32_t multicastPkts;
- u_int32_t broadcastPkts;
- u_int32_t discards;
+ uint32_t vlan_id;
+ uint64_t octets;
+ uint32_t ucastPkts;
+ uint32_t multicastPkts;
+ uint32_t broadcastPkts;
+ uint32_t discards;
} INMVlan_counters;
/* Counters data */
@@ -416,15 +381,15 @@
} INMCounters_type;
typedef struct _INMCounters_sample_hdr {
- u_int32_t sequence_number; /* Incremented with each counters sample
+ uint32_t sequence_number; /* Incremented with each counters sample
generated by this source_id */
- u_int32_t source_id; /* fsSourceId */
- u_int32_t sampling_interval; /* fsCounterSamplingInterval */
+ uint32_t source_id; /* fsSourceId */
+ uint32_t sampling_interval; /* fsCounterSamplingInterval */
} INMCounters_sample_hdr;
typedef struct _INMCounters_sample {
INMCounters_sample_hdr hdr;
- u_int32_t counters_type_tag; /* Enum INMCounters_version */
+ uint32_t counters_type_tag; /* Enum INMCounters_version */
INMCounters_type counters; /* Counter set for this interface type */
} INMCounters_sample;
@@ -448,14 +413,14 @@
};
typedef struct _INMSample_datagram_hdr {
- u_int32_t datagram_version; /* (enum INMDatagram_version) = VERSION4 */
+ uint32_t datagram_version; /* (enum INMDatagram_version) = VERSION4 */
INMAddress agent_address; /* IP address of sampling agent */
- u_int32_t sequence_number; /* Incremented with each sample datagram
+ uint32_t sequence_number; /* Incremented with each sample datagram
generated */
- u_int32_t uptime; /* Current time (in milliseconds since device
+ uint32_t uptime; /* Current time (in milliseconds since device
last booted). Should be set as close to
datagram transmission time as possible.*/
- u_int32_t num_samples; /* Number of flow and counters samples to follow */
+ uint32_t num_samples; /* Number of flow and counters samples to follow */
} INMSample_datagram_hdr;
#define INM_MAX_DATAGRAM_SIZE 1500
|