sagan-1.1.2/0000755000175000017500000000000012771276547011570 5ustar champchampsagan-1.1.2/Makefile.am0000644000175000017500000000226012770372750013614 0ustar champchampAUTOMAKE_OPIONS=foreign no-dependencies SUBDIRS = src INCLUDES = @INCLUDES@ # Install BFD include file, and others that it needs. #install-data-local: # @$(NORMAL_INSTALL) # $(mkinstalldirs) $(sysconfdir) # $(INSTALL_DATA)sagan.conf $(sysconfdir)/sagan.conf install-data-local: test -z "$(DESTDIR)$(sysconfdir)" || /bin/mkdir -p "$(DESTDIR)$(sysconfdir)" test -f "$(DESTDIR)$(sysconfdir)/sagan.conf" || $(INSTALL_DATA) etc/sagan.conf "$(DESTDIR)$(sysconfdir)/sagan.conf" test -z "$(DESTDIR)$(sbindir)" || /bin/mkdir -p "$(DESTDIR)$(sbindir)" $(INSTALL) -d "$(DESTDIR)$(mandir)/man8" $(INSTALL) -m 644 etc/sagan.8 "$(DESTDIR)$(mandir)/man8" $(INSTALL) -m 755 src/sagan "$(DESTDIR)$(sbindir)/sagan" $(INSTALL) -d "$(DESTDIR)/var/log/sagan" $(INSTALL) -d "$(DESTDIR)/var/run/sagan" @echo "" @echo "------------------------------------------------------------------------------" @echo "Sagan has been installed! You still need to do a few more things before your" @echo "up and running. For more information, see:" @echo "https://wiki.quadrantsec.com/twiki/bin/view/Main/SaganInstall" @echo "------------------------------------------------------------------------------" @echo "" sagan-1.1.2/TODO0000644000175000017500000000012712770372750012250 0ustar champchamp For the latest TODO list, see: https://wiki.quadrantsec.com/bin/view/Main/SaganTODO sagan-1.1.2/install-sh0000755000175000017500000003325512770373007013570 0ustar champchamp#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # 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. # # 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. # # 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 # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false 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: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -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. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; 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 if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? 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 "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # 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: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # 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 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $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 $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 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. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: sagan-1.1.2/README0000644000175000017500000000240512770372750012441 0ustar champchamp Welcome to the README file -------------------------- What is Sagan? Sagan is an open source (GNU/GPLv2) high performance, real-time log analysis & correlation engine. It is written in C and uses a multi-threaded architecture to deliver high performance log & event analysis. The Sagan structure and Sagan rules work similarly to the Sourcefire "Snort" IDS engine. This was intentionally done to maintain compatibility with rule management software (oinkmaster/pulledpork/etc) and allows Sagan to correlate log events with your Snort IDS/IPS system. Since Sagan can write to Snort IDS/IPS databases via unified2/barnyard2, it is compatible with all Snort "consoles". For example, Sagan is compatible with Snorby [http://www.snorby.org], Sguil [http://sguil.sourceforge.net], BASE, and the Prelude IDS framework! (to name a few). Sagan supports many different output formats, log normalization (via liblognorm), GeoIP detection, script execution on event and automatic firewall support via "Snortsam" (see http://www.snortsam.net). Sagan uses the GNU "artisic style". For more information, please visit the Sagan web site: http://sagan.quadrantsec.com. If you're looking for Sagan rules on Github, they are located at: https://github.com/beave/sagan-rules sagan-1.1.2/FAQ0000644000175000017500000000004212770372750012106 0ustar champchampSee http://sagan.quadrantsec.com sagan-1.1.2/Makefile.in0000644000175000017500000006325412770373007013633 0ustar champchamp# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in COPYING TODO compile config.guess \ config.sub install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/ax_ext.m4 \ $(top_srcdir)/m4/ax_gcc_x86_avx_xgetbv.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ 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@ ENDIAN = @ENDIAN@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBESTR_CFLAGS = @LIBESTR_CFLAGS@ LIBESTR_LIBS = @LIBESTR_LIBS@ LIBFASTJSON_CFLAGS = @LIBFASTJSON_CFLAGS@ LIBFASTJSON_LIBS = @LIBFASTJSON_LIBS@ LIBLOGNORM_CFLAGS = @LIBLOGNORM_CFLAGS@ LIBLOGNORM_LIBS = @LIBLOGNORM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIMD_FLAGS = @SIMD_FLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPIONS = foreign no-dependencies SUBDIRS = src INCLUDES = @INCLUDES@ all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .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: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ 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 || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+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 $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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 case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(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 \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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 \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @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 check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am 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 html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -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: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-am uninstall uninstall-am # Install BFD include file, and others that it needs. #install-data-local: # @$(NORMAL_INSTALL) # $(mkinstalldirs) $(sysconfdir) # $(INSTALL_DATA)sagan.conf $(sysconfdir)/sagan.conf install-data-local: test -z "$(DESTDIR)$(sysconfdir)" || /bin/mkdir -p "$(DESTDIR)$(sysconfdir)" test -f "$(DESTDIR)$(sysconfdir)/sagan.conf" || $(INSTALL_DATA) etc/sagan.conf "$(DESTDIR)$(sysconfdir)/sagan.conf" test -z "$(DESTDIR)$(sbindir)" || /bin/mkdir -p "$(DESTDIR)$(sbindir)" $(INSTALL) -d "$(DESTDIR)$(mandir)/man8" $(INSTALL) -m 644 etc/sagan.8 "$(DESTDIR)$(mandir)/man8" $(INSTALL) -m 755 src/sagan "$(DESTDIR)$(sbindir)/sagan" $(INSTALL) -d "$(DESTDIR)/var/log/sagan" $(INSTALL) -d "$(DESTDIR)/var/run/sagan" @echo "" @echo "------------------------------------------------------------------------------" @echo "Sagan has been installed! You still need to do a few more things before your" @echo "up and running. For more information, see:" @echo "https://wiki.quadrantsec.com/twiki/bin/view/Main/SaganInstall" @echo "------------------------------------------------------------------------------" @echo "" # 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. .NOEXPORT: sagan-1.1.2/config.guess0000755000175000017500000012355012770373007014102 0ustar champchamp#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-03-23' # 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 # the Free Software Foundation; either version 3 of the License, 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap '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. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$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 ; 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 ; 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) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-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. # # 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 ;; sh5el) machine=sh5le-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_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 -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # 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 ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 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 ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *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. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; 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 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition 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 ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp 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 echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 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 ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 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 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) 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) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} 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 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $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 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax 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 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF 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 ;; *:AIX:*:[4567]) 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 IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 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]) 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 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 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 if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (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 -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 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 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 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 ;; 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 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-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 i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 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/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #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-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 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.[02]*:*) 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 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi 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 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|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|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/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 ;; 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 i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 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 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv 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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { 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; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' 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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 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 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 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 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its 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 ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: sagan-1.1.2/missing0000755000175000017500000001533012770373007013155 0ustar champchamp#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: sagan-1.1.2/ChangeLog0000644000175000017500000001141612771276302013332 0ustar champchamp09/23/2016 - Sagan 1.1.2. released. * Added "srcport" for "threshold" and "after". * Fixes around "dstport" for threshold" and "after" * Fixed display of source/destination IP addresses in tools/sagan-peek.c * Change "artistic" style from "GNU" to "Linux". This allows better formatting of source code on smaller screens. * New pthread mutex to address corruptions of mmap / files. * tools/sagan-peek.c now has command line option to specify mmap file location. Various other improvements. * Better error checking in src/processors/sagan-track-clients.c * New MD5, SHA1 and SHA256 in src/parsers/parse-hash.c * Minor Bluedot lookup fixes. * Fixes for "after" and "threshold" when dealing with "usernames". (Username tracking). * Added "file" option for sagan.conf to reference a file to load. For example, "var MYVAR file:/path/to/my/values.txt". For more information, see https://github.com/beave/sagan/issues/75 08/17/2016 - Sagan 1.1.1 released. * Added meta_offset, meta_depth, meta_within and meta_distince Champ Clark (cclark@quadrantsec.com) * Major changes/restructuring to sagan-meta-content.c - Adam Hall (ahall@quadrantse.com) * Fix major memory issue when loading large sets of rules. Related to meta_content! (Champ Clark) * Minor build fix when liblognorm is disabled - Champ Clark * Minor stdbool.h issue & added PKG_PROG_PKG_CONFIG to configure.ac * Remove old unneeded liblognorm headers. Champ Clark * memset replacement of strlcpy, minor clean up, minor bug fixes. (Adam & Champ) 07/06/2016 - Sagan 1.1.0 released. The Basics: ----------- * Sagan now "remembers" where it left off between restarts/reboots/etc. * You can now create rules that focus on certain IP address or IP address ranges (ie - $EXTERNAL_NET/$HOME_NET). * Sagan can treat "old" Bluedot IP reputation threat Intel differently than "new" threat intel. * We added "qdee.pl", a SDEE poll routine to the "extra" directory. * A lot of bugs were fixed The Details: ------------ * Moved all "threshold", "after", "flowbits", and "client tracking" to mmap files. This means that Sagan "remembers" between restarts where it "left off"! * Introduced "tools/sagan-peek.c" which allows you to exmaine Sagan mmap files. Useful in debugging or just "seeing" what Sagan is "tracking". * $EXTERNAL_NET and $HOME_NET now function as expected. Previous versions of Sagan did not have any concept of $EXTERNAL_NET/$HOME_NET and were ignored. Adam Hall @ Quadrant made Sagan "aware" of "traffic flow". Values in a rule for source/destination are tested _after_ normalization. * Added "mdate" (modification date) and "cdate" (creation data) to Bluedot. This allows Sagan to not trigger "aged" Bluedot Threat Intel. For example, do _not_ alert if an IP address is seen and the Intel is over X hours/days/months/years old. * Threholding based on 'dstport' merged, thanks to Bruno Coudoin. See: https://github.com/beave/sagan/commit/44d6752acf27d61bcd57e35f930b0f6e11dadbc7 * Added parsing for IPTables "SPT" and "DPT"t port for iptables, thanks to Bruno Coudoin. https://github.com/beave/sagan/commit/9de9cffd224a44f93c80eca62e6ead617a4b97a6 * Added "qdee" to the "extra" directory. This allows Sagan to parse older style Cisco IDS output. This polls using the SDEE protocol. See https://github.com/beave/sagan/commit/61c4a7dd611161697785c889630dd3c8333ec8b5 * Removed support for libjsonc (json-c) and moved to libfastjson. The Bugs Fixed: --------------- * Correct issue for when Sagan cannot open a file (-F/--file) due to permissions. * Removed unused "SigArgs" array. * Clean exit when Sagan cannot load Maxmind GeoIP2 data file. * Change "normalize: {type}" to "normalize;". All normalization rules now come from one file. This keeps Sagan in line with liblognorm development. * Sagan now "warns" the user if old style "normalize" is encountered. See: https://github.com/beave/sagan/commit/ba3de9e43bc8623b361e34ce06a2e7808e045f88 and https://github.com/rsyslog/liblognorm/issues/206 * Fix json_object_object_get_e) compile time warnings. See: https://github.com/beave/sagan/commit/e9bdea5b7fa5b25c1d7e740a4c856c70a1046d1d * Minor ARM CPU fixes. * Various "meta_content" fixes. When using "meta_content" with large amounts of search data would sometimes cause failures. * Major bug fixes involving "client tracking". Thanks to Adam Hall @ Quadrant Information Security! * Sagan now attempts to create the FIFO if it is not detected. Thanks to Cabrol Perales. * A lot of smaller bug fixes. See: https://github.com/beave/sagan/commits/master 11/19/2015 - Sagan 1.0.1 released. * Add unified2 "extra data" field to store the orignal syslog source. * Added threshold by "username". * Minor code clean up. 10/23/2015 - Sagan 1.0.0 released. sagan-1.1.2/extra/0000755000175000017500000000000012770372750012703 5ustar champchampsagan-1.1.2/extra/README0000644000175000017500000000122112770372750013557 0ustar champchampThese are "extra" resources that can be used with Sagan. sagan-gtk - Displays a GTK/X11 "popup" window of a Sagan alert. [External plugin for Sagan] sagan-notify - Uses the libnotify X11/GTK function to create a temporary "popup" message. [External Plugin for Sagan] ossec-sagan.pl - This utility takes a series of OSSEC rules, and generates a series of compatible SAGAN rules. This was written by Michael Iverson. [OSSEC to Sagan conversion utility] RPM - Example RPM spec and system files to build Sagan RPM package for CentOS 7 rsyslog - Configuration to send rsyslog data to Sagan. Place this file in /etc/rsyslog.d sagan-1.1.2/extra/qdee/0000755000175000017500000000000012770372750013621 5ustar champchampsagan-1.1.2/extra/qdee/qdee.pl0000755000175000017500000002617012770372750015105 0ustar champchamp#!/usr/bin/perl -w # # Copyright (C) 2009-2016 Quadrant Information Security # Copyright (C) 2009-2016 Champ Clark III # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. You may not use, modify or # distribute this program under any other version of the GNU General # Public License. # # 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. ############################################################################## # qdee - (Pronounced - "Q Dee"). This program collects IDS/IPS (and syslog!) # events from a Cisco device using the SDEE protocol. Events sucked off the # Cisco device are then sent to a syslog. Sagan can then use it's rules to # detect the events # # Written By Champ Clark III (cclark@quadrantsec.com) # Largely based off of "ids_sdee" (unknown author) ############################################################################## use WWW::Curl::Easy; use XML::Simple; use Data::Dumper; use Sys::Syslog qw(:standard :extended :macros); use strict; # Cisco IPS username/password # my $username="USERNAME"; my $password="PASSWORD"; my $cisco_ip="10.1.1.11"; my $url="https://$cisco_ip/cgi-bin/sdee-server"; my $user_agent="Sagan_QDEE/1.0"; my $cookiesfile = "/tmp/qdee.$$.cookies"; my $debug=0; ############################################################################## # Syslog settings ############################################################################## my $syslog_remote="127.0.0.1"; my $syslog_port=514; my $syslog_program="qdee"; my $xml; my $headers; my $myheaders; my $useragent; my $data; my $j=0; my $msgvalue; my $body; $SIG{'INT'} = 'catch_signal'; $SIG{'ABRT'} = 'catch_signal'; $SIG{'QUIT'} = 'catch_signal'; $SIG{'TERM'} = 'catch_siganl'; $xml = new XML::Simple; print "[*] Getting subscription\n"; our $subscriptionId = openSubscription(); print "[*] Subscription ID: $subscriptionId.\n"; print "[*] Collecting events from $cisco_ip.\n"; my $curl = WWW::Curl::Easy->new(); while (1) { my $uri = "?sessionCookies&subscriptionId=$subscriptionId&maxNbrOfEvents=60&timeout=2"; my $body=""; my $msg=""; open($myheaders, ">", \$headers); my $code = $curl->setopt(CURLOPT_USERAGENT, $useragent); $code = $curl->setopt(CURLOPT_COOKIEJAR, $cookiesfile); $code = $curl->setopt(CURLOPT_COOKIEFILE, $cookiesfile); $code = $curl->setopt(CURLOPT_FOLLOWLOCATION, 1); $code = $curl->setopt(CURLOPT_MAXREDIRS, 10); $code = $curl->setopt(CURLOPT_URL, "$url$uri"); $code = $curl->setopt(CURLOPT_SSL_VERIFYPEER, 0); $code = $curl->setopt(CURLOPT_USERPWD, "$username:$password"); $code = $curl->setopt(CURLOPT_WRITEHEADER, $myheaders ); $code = $curl->setopt(CURLOPT_FILE, \$body); $code = $curl->setopt(CURLOPT_WRITEFUNCTION, \&chunk ); $code = $curl->setopt(CURLOPT_CONNECTTIMEOUT, 0); $curl->perform(); close($myheaders); my $err = $curl->errbuf; if ($err) { print "[E] $err\n"; exit(1); } if ($debug) { print "[D] BODY: $body\n"; } $data = $xml->XMLin($body); if ($debug) { print "[D] DUMPER: " . Dumper($data); } ############################################################################## # Syslog/Health/Other data ############################################################################## if ( $data->{'env:Body'}{'sd:events'}{'evStatus'} ) { if ( ref($data->{'env:Body'}{'sd:events'}{'evStatus'}) eq "ARRAY" ) { if ( $debug ) { print "[D] Syslog data is in a ARRAY.\n"; } for my $in (@{ $data->{'env:Body'}{'sd:events'}{'evStatus'}} ) { # Make sure data is in the array then send it. if ($data->{'env:Body'}{'sd:events'}{'evStatus'}[$j]) { $msgvalue = getEventType($data->{'env:Body'}{'sd:events'}{'evStatus'}[$j]); } $j++; } } else { if ( $debug ) { print "[D] Syslog data is in a HASH.\n"; } $msgvalue = getEventType($data->{'env:Body'}{'sd:events'}{'evStatus'}); } } ############################################################################## # IDS/IPS data ############################################################################## if ( $data->{'env:Body'}{'sd:events'}{'sd:evIdsAlert'} ) { if ( ref($data->{'env:Body'}{'sd:events'}{'sd:evIdsAlert'}) eq "ARRAY" ) { if ( $debug ) { print "[D] IDS/IPS data is in a ARRAY\n"; } for my $in (@{ $data->{'env:Body'}{'sd:events'}{'sd:evIdsAlert'}} ) { # Make sure data is in the array then send it. if ($data->{'env:Body'}{'sd:events'}{'sd:evIdsAlert'}[$j]) { $msgvalue = getEventType($data->{'env:Body'}{'sd:events'}{'sd:evIdsAlert'}[$j]); } $j++; } } else { if ( $debug ) { print "[D] IDS/IPS data is in a HASH\n"; } $msgvalue = getEventType($data->{'env:Body'}{'sd:events'}{'sd:evIdsAlert'}); } } if ($msgvalue) { setlogsock( { type => "udp", port => $syslog_port, host => $syslog_remote } ); openlog($syslog_program, 'ndelay', 'user'); syslog('info', $msgvalue); closelog(); $msgvalue=""; } } ############################################################################## # getEventType - Determines if an event is health, syslog, IDS/IPS, etc. # It then formats a message to stuff into syslog ############################################################################## sub getEventType { my $data = shift; my $msgreturn = ""; # Health if ( $data->{'healthAndSecurity'} ) { print "[*] Got Health/Status event.\n"; $msgreturn = "Health_Status: $data->{'healthAndSecurity'}{'warning'}{'metricStatus'}{'status'} , Health Warning: $data->{'healthAndSecurity'}{'warning'}{'metricStatus'}{'name'} , Timezone: $data->{'time'}{'timeZone'}, Time_Content: $data->{'time'}{'content'} , Time_Offset: $data->{'time'}{'offset'} , Originator_appInstanceId: $data->{'originator'}{'appInstanceId'} , Originator_appName: $data->{'originator'}{'appName'} , Originator_hostID: $data->{'originator'}{'hostId'} , EventID: $data->{'eventId'} , Vendor: $data->{'vendor'}"; return($msgreturn); } # Syslog if ( $data->{'syslogMessage'} ) { print "[*] Got Syslog event.\n"; $msgreturn = "Syslog_Message: \"$data->{'syslogMessage'}{'description'}\" , Timezone: $data->{'time'}{'timeZone'} , Time_Content: $data->{'time'}{'content'} , Time_Offset: $data->{'time'}{'offset'}"; return($msgreturn); } # IDS/IPS if ( $data->{'sd:signature'}{'id'} ) { print "[*] Got IPS/IDS event.\n"; $msgreturn = "Signature_ID: $data->{'sd:signature'}{'id'} , IDS_Event_Description: \"$data->{'sd:signature'}{'description'}\" , Source: $data->{'sd:participants'}{'sd:attacker'}{'sd:addr'}{'content'}:$data->{'sd:participants'}{'sd:attacker'}{'sd:port'} Destination: $data->{'sd:participants'}{'sd:target'}{'sd:addr'}{'content'}:$data->{'sd:participants'}{'sd:target'}{'sd:port'} , Protocol: $data->{'cid:protocol'} , Severity: $data->{'severity'} , CID_Created: $data->{'sd:signature'}{'cid:created'}, CID_Type: $data->{'sd:signature'}{'cid:type'} , CID_Version: $data->{'sd:signature'}{'cid:version'} , Event_ID: $data->{'eventId'} , Vendor: $data->{'vendor'}"; return($msgreturn); } } ############################################################################## # openSubscription - Open and retrieves a subscription ID from the Cisco IPS # device ############################################################################## sub openSubscription { my $curl = WWW::Curl::Easy->new(); my $myheaders; my $body = ""; my $headers = ""; my $uri = "?action=open&sessionCookies"; open($myheaders, ">", \$headers); my $code = $curl->setopt(CURLOPT_USERAGENT, $useragent); $code = $curl->setopt(CURLOPT_COOKIEJAR, $cookiesfile); $code = $curl->setopt(CURLOPT_COOKIEFILE, $cookiesfile); $code = $curl->setopt(CURLOPT_FOLLOWLOCATION, 1); $code = $curl->setopt(CURLOPT_MAXREDIRS, 10); $code = $curl->setopt(CURLOPT_URL, "$url$uri"); $code = $curl->setopt(CURLOPT_SSL_VERIFYPEER, 0); $code = $curl->setopt(CURLOPT_USERPWD, "$username:$password"); $code = $curl->setopt(CURLOPT_WRITEHEADER, $myheaders ); $code = $curl->setopt(CURLOPT_FILE, \$body); $code = $curl->setopt(CURLOPT_WRITEFUNCTION, \&chunk ); $curl->perform(); close($myheaders); my $err = $curl->errbuf; if ($err) { print "ERROR $err\n"; } if ($debug) { print "[D] $body\n"; } if ($body =~ /errLimitExceeded/) { print "[E] Max subscription connections reached!\n"; print "[E] SSH into the device and run 'show stat sdee'. Then run:\n"; print "[E] links \"https://$cisco_ip/cgi-bin/sdee-server?action=close&subscriptionId={subscriptionid}\"\n"; exit(1); } $data = $xml->XMLin($body); return($data->{'env:Body'}{'sd:subscriptionId'}); } ############################################################################## # chunk - Make data into "chunks" (append data) ############################################################################## sub chunk { my ($data,$pointer)=@_; ${$pointer}.=$data; return length($data) } ############################################################################## # catch_signal - Intercepts the signal (control-C, etc) and closes the # subscription with the Cisco device ############################################################################## sub catch_signal { print "[*] Got signal! Unsubscribing \'$subscriptionId\' from $cisco_ip.\n"; my $uri = "?action=close&subscriptionId=$subscriptionId"; my $curl = WWW::Curl::Easy->new(); open($myheaders, ">", \$headers); my $code = $curl->setopt(CURLOPT_USERAGENT, $useragent); $code = $curl->setopt(CURLOPT_COOKIEJAR, $cookiesfile); $code = $curl->setopt(CURLOPT_COOKIEFILE, $cookiesfile); $code = $curl->setopt(CURLOPT_FOLLOWLOCATION, 1); $code = $curl->setopt(CURLOPT_MAXREDIRS, 10); $code = $curl->setopt(CURLOPT_URL, "$url$uri"); $code = $curl->setopt(CURLOPT_SSL_VERIFYPEER, 0); $code = $curl->setopt(CURLOPT_USERPWD, "$username:$password"); $code = $curl->setopt(CURLOPT_WRITEHEADER, $myheaders ); $code = $curl->setopt(CURLOPT_FILE, \$body); $code = $curl->setopt(CURLOPT_WRITEFUNCTION, \&chunk ); $curl->perform(); sleep(1); close($myheaders); my $err = $curl->errbuf; if ($err) { print "[E] $err\n"; exit(1); } if ($body =~ /env:Fault/) { print "[E] Fault while unsubscribing! You might need to manually unsubscribe using the\n"; print "[E] following command:\n"; print "[E] links \"https://$cisco_ip/cgi-bin/sdee-server?action=close&subscriptionId=$subscriptionId\"\n"; print "[E] Exiting!\n"; exit(1); } sleep(1); print "[*] Successfully unsubscibing and exiting.\n"; exit(0); } sagan-1.1.2/extra/qdee/README.md0000644000175000017500000000053312770372750015101 0ustar champchampqdee - (Pronounced - "Q Dee"). This program collects IDS/IPS (and syslog!) events from a Cisco device using the SDEE protocol. Events sucked off the Cisco device are then sent to a syslog. Sagan can then use it's rules to detect the events Written By Champ Clark III (cclark@quadrantsec.com) Largely based off of "ids_sdee" (unknown author) sagan-1.1.2/extra/rc.d-freebsd/0000755000175000017500000000000012770372750015141 5ustar champchampsagan-1.1.2/extra/rc.d-freebsd/sagan0000644000175000017500000000166312770372750016163 0ustar champchamp#!/bin/sh # PROVIDE: sagan # REQUIRE: DAEMON # BEFORE: LOGIN # KEYWORD: shutdown # Add the following lines to /etc/rc.conf to enable sagan: # sagan_enable (bool): Set to YES to enable sagan # Default: NO # sagan_flags (str): Extra flags passed to sagan # Default: -D # sagan_user (str): Run Sagan as this user # Default: sagan # sagan_conf (str): sagan configuration file # Default: /usr/local/etc/sagan/sagan.conf . /etc/rc.subr name="sagan" rcvar=sagan_enable extra_commands=reload command="/usr/local/sbin/sagan" load_rc_config $name [ -z "$sagan_enable" ] && sagan_enable="NO" [ -z "$sagan_conf" ] && sagan_conf="/usr/local/etc/sagan.conf" [ -z "$sagan_user" ] && sagan_user="sagan" [ -z "$sagan_flags" ] && sagan_flags="-D -u $sagan_user" [ -n "$sagan_conf" ] && sagan_flags="$sagan_flags -f $sagan_conf" pidfile="/var/run/sagan/sagan.pid" run_rc_command "$1" sagan-1.1.2/extra/sagan-gtk/0000755000175000017500000000000012770372750014557 5ustar champchampsagan-1.1.2/extra/sagan-gtk/sagan-gtk.c0000644000175000017500000000427612770372750016610 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-gtk.c * This program is called via the Sagan configuration option 'output external:' * option. Using GTK, this creates a "popup" window when a Sagan event * is triggered. */ #include #include #include #define MAX_BUF 10240 static void destroy( GtkWidget *, gpointer ); int main() { GtkWidget *window; GtkWidget *label; char input[MAX_BUF]="\0"; char messageit[MAX_BUF]="\0"; while (fgets(input, MAX_BUF-1, stdin)) { strncat(messageit, input, MAX_BUF-1-strlen(messageit)); } messageit[MAX_BUF-1] = '\0'; /* Avoid overflow and null terminates */ gtk_init(NULL,NULL); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); label = gtk_label_new(NULL); g_signal_connect (window, "destroy", G_CALLBACK (destroy), NULL); gtk_window_set_title(GTK_WINDOW(window), "Sagan Alert Message"); gtk_label_set_markup(GTK_LABEL(label), messageit ); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); gtk_container_add(GTK_CONTAINER(window), label); gtk_widget_show(label); gtk_window_set_default_size(GTK_WINDOW(window), 300, 100); gtk_widget_show_all(window); gtk_main(); return 0; } static void destroy( GtkWidget *widget, gpointer data ) { gtk_main_quit (); } sagan-1.1.2/extra/sagan-gtk/Makefile0000644000175000017500000000045212770372750016220 0ustar champchampCC = gcc PROGRAM = sagan-gtk PROGRAM_FILES = sagan-gtk.c CFLAGS += -g LDFLAGS += -g LIBS += GTKFLAGS := $(shell pkg-config --cflags --libs gtk+-2.0 gthread-2.0) all: $(PROGRAM) %: %.c $(CC) $(PROGRAM_FILES) $(CFLAGS) $(LDFLAGS) $(GTKFLAGS) -o $(PROGRAM) $(LIBS) clean: @rm -rf $(PROGRAM) sagan-1.1.2/extra/pulledpork/0000755000175000017500000000000012770372750015064 5ustar champchampsagan-1.1.2/extra/pulledpork/fetchcarl.sh0000644000175000017500000001217212770372750017356 0ustar champchamp#!/usr/bin/env bash <&2 "Sagan rulebase ($1) not found."; exit 1; fi if [ ! $(ls -l $1/*.rulebase | grep -v total | wc -l) -gt 0 ]; then echo >&2 "Sagan rulebase contents not found. Aborting."; exit 1; fi } # find or set up a working git environment git_sagan_check() { D_GIT_CLONE_PATH=$TMP_DIR/sagan_rules test -d "$D_GIT_CLONE_PATH" \ && cd "$D_GIT_CLONE_PATH" \ && git status > /dev/null 2>&1 # folder exists? go there. is a good git clone? if [ $? -ne 0 ]; then # not a git repo, create it? echo "the folder ($D_GIT_CLONE_PATH) you specified does not exist or doesn't contain a git repo.. fetching" mkdir -p -v "$D_GIT_CLONE_PATH" # only if it doesn't exist if [ -z "$B_VERBOSE" ]; then git clone --quiet "$SAGAN_REPO_URL" "$D_GIT_CLONE_PATH" else git clone "$SAGAN_REPO_URL" "$D_GIT_CLONE_PATH" fi else if [ -z "$B_VERBOSE" ]; then git checkout --quiet master git pull --quiet else git checkout master git pull fi fi # Validate the pull validate_rulebase "$D_GIT_CLONE_PATH" if [ -n "$B_VERBOSE" ]; then echo "Finished pulling sagan rules." fi } validate_system() { if [ ! -f $SAGAN_CONF ]; then echo >&2 "Sagan configuration is not found. Aborting."; exit 1; fi A_REQUIRED_COMMANDS=( git awk ) for i in "${A_REQUIRED_COMMANDS[@]}" do command -v $i >/dev/null 2>&1 || { echo >&2 "I require $i but it's not installed. Aborting."; exit 1; } done D_CONFIG_DIR=`awk '/(var RULE_PATH )(.*)/ {print $3}' $SAGAN_CONF` if [ ! -d "$D_CONFIG_DIR" ]; then echo >&2 "Sagan configuration directory ($D_CONFIG_DIR) not found. Aborting."; exit 1; fi if [ ! -w "$D_CONFIG_DIR/." ]; then echo >&2 "Sagan configuration directory ($D_CONFIG_DIR) not writable. Aborting."; exit 1; fi if [ ! -w "$TMP_DIR/." ]; then echo >&2 "tmp directory ($TMP_DIR) not writable. Aborting."; exit 1; fi } copy_rulebase() { cp -f $D_GIT_CLONE_PATH/*.rulebase $D_CONFIG_DIR validate_rulebase "$D_CONFIG_DIR" } copy_configs() { cp -f $D_GIT_CLONE_PATH/*.config $D_CONFIG_DIR validate_rulebase "$D_CONFIG_DIR" } ### PERFORM ### for arg do delim="" case "$arg" in --help) args="${args}-h ";; --verbose) args="${args}-v ";; --file) args="${args}-f ";; --url) args="${args}-u ";; # pass through anything else *) [[ "${arg:0:1}" == "-" ]] || delim="\"" args="${args}${delim}${arg}${delim} ";; esac done # reset the translated args eval set -- $args # now we can process with getopt while getopts "f:u:hv" opt; do case $opt in f) SAGAN_CONF=$OPTARG ;; u) SAGAN_REPO_URL=$OPTARG ;; v) B_VERBOSE=1 ;; h) usage exit ;; * ) usage exit 1 esac done validate_system git_sagan_check copy_rulebase copy_configs if [ -n "$B_VERBOSE" ]; then echo -e "Sagan rulebase and config update complete. \n (Note: Sagan *.rules were not updated. Use pulledpork for this process.)" fi exit 0;sagan-1.1.2/extra/pulledpork/pulledpork.sagan.conf0000644000175000017500000000110112770372750021175 0ustar champchamp# Pulled Pork Configuration for Sagan # pulledpork.pl -d -T -vv -c pulledpork.conf rule_url=http://sagan.softwink.com/rules/|sagan-rules-current.tar.gz|open ignore=deleted.rules,experimental.rules,local.rules temp_path=/tmp rule_path=/usr/local/etc/sagan-rules/sagan.rules local_rules=/usr/local/etc/sagan-rules/local.rules sid_msg=/usr/local/etc/sagan-rules/sagan-sid-msg.map sid_changelog=/var/log/sid_changes.log snort_path=/usr/local/sbin/sagan config_path=/usr/local/etc/sagan.conf disablesid=/usr/local/etc/pulledpork/disablesid.conf distro=FreeBSD-8.1 version=0.6.0sagan-1.1.2/extra/sagan-notify/0000755000175000017500000000000012770372750015302 5ustar champchampsagan-1.1.2/extra/sagan-notify/sagan-notify.c0000644000175000017500000000354212770372750020051 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-notify.c * This program is called via the Sagan configuration option 'output external:' * option. Using libnotify, this creates a "popup" window when a Sagan event * is triggered. */ #include #include #include #define MAX_BUF 10240 int main() { char input[MAX_BUF]="\0"; char messageit[MAX_BUF]="\0"; char *title="Sagan Alert"; while (fgets(input, MAX_BUF-1, stdin)) { strncat(messageit, input, MAX_BUF-1-strlen(messageit)); } messageit[MAX_BUF-1] = '\0'; /* Avoid overflow and null terminates */ NotifyNotification *n; notify_init("Sagan"); n = notify_notification_new (title,messageit, NULL, NULL); notify_notification_set_timeout(n, 1000); if (!notify_notification_show (n, NULL)) { g_error("Failed to send notification.\n"); return 1; } g_object_unref(G_OBJECT(n)); return 0; } sagan-1.1.2/extra/sagan-notify/Makefile0000644000175000017500000000046012770372750016742 0ustar champchampCC = gcc PROGRAM = sagan-notify PROGRAM_FILES = sagan-notify.c CFLAGS += -g LDFLAGS += -g LIBS += -lnotify GTKFLAGS := $(shell pkg-config --cflags gtk+-2.0 glib-2.0) all: $(PROGRAM) %: %.c $(CC) $(PROGRAM_FILES) $(CFLAGS) $(LDFLAGS) $(GTKFLAGS) -o $(PROGRAM) $(LIBS) clean: @rm -rf $(PROGRAM) sagan-1.1.2/extra/build-test/0000755000175000017500000000000012770372750014757 5ustar champchampsagan-1.1.2/extra/build-test/build-test.sh0000755000175000017500000000637112770372750017401 0ustar champchamp#!/bin/bash # Simple shell script that compiles Sagan with multiple flags. This helps # hunt down compile time bugs. # # - Public release (06/28/2015) # 07/05/2016 - Champ Clark - Replaced jsonc -> libfastjson # Champ Clark III # --disable-snortsam Disable Snortsam support. # --disable-syslog Disable syslog support. # --disable-lognorm Disable Lognorm (liblognorm) support. # --disable-libfastjson Disable libfastjson. # --disable-libpcap Disable libpcap (plog) support. # --disable-libdnet Disable libdnet (unified2) support. # --enable-bluedot Enable Quadrant\'s "Bluedot" lookups. # --enable-esmtp Enable libesmtp support. # --enable-geoip2 Enable Maxmind GeoIP2 support. # --enable-system-strstr Enable system strstr. STANDARD="--disable-bluedot --disable-esmtp --disable-geoip2 --disable-system-strstr --enable-snortsam --enable-syslog --enable-lognorm --enable-libpcap --enable-libdnet" ALLFLAGS="--enable-bluedot --enable-esmtp --enable-geoip2 --enable-system-strstr --enable-snortsam --enable-syslog --enable-lognorm --enable-libpcap --enable-libdnet --enable-libfastjson" NOFLAG="--disable-snortsam --disable-syslog --disable-lognorm --disable-libpcap --disable-libdnet --disable-bluedot --disable-esmtp --disable-geoip2 --disable-system-strstr --disable-system-strstr --disable-libfastjson" LOG="output.log" #autoreconf -vfi echo "**** STANDARD BUILD | NO FLAGS ****" echo "**** STANDARD BUILD | NO FLAGS ****" >> $LOG make clean CFLAGS=-Wall ./configure if [ "$?" != "0" ] then echo "./configure failed!"; exit fi make 2>> $LOG if [ "$?" != "0" ] then echo "Error on standard build!"; exit fi echo "**** ALL FLAGS ****" echo "**** ALL FLAGS ****" >> $LOG make clean CFLAGS=-Wall ./configure $ALLFLAGS if [ "$?" != "0" ] then echo "./configure failed!"; exit fi make 2>> $LOG if [ "$?" != "0" ] then echo "Error on standard build!"; exit fi echo "**** NO FLAGS ****" echo "**** NO FLAGS ****" >> $LOG make clean CFLAGS=-Wall ./configure $NOFLAG if [ "$?" != "0" ] then echo "./configure failed!"; exit fi make 2>> $LOG if [ "$?" != "0" ] then echo "Error on standard build!"; exit fi for I in $STANDARD do make clean echo "**** FLAGS $I *****" echo "**** FLAGS $I *****" >> $LOG CFLAGS=-Wall ./configure $I if [ "$?" != "0" ] then echo "./configure failed!"; exit fi make 2>> $LOG if [ "$?" != "0" ] then echo "Error on with $I"; exit fi done for I in $ALLFLAGS do make clean echo "**** FLAGS $I *****" echo "**** FLAGS $I *****" >> $LOG CFLAGS=-Wall ./configure $I if [ "$?" != "0" ] then echo "./configure failed!"; exit fi make 2>> $LOG if [ "$?" != "0" ] then echo "Error on with $I"; exit fi done for I in $NOFLAGS do make clean echo "**** FLAGS $I *****" echo "**** FLAGS $I *****" >> $LOG CFLAGS=-Wall ./configure $I if [ "$?" != "0" ] then echo "./configure failed!"; exit fi make 2>> $LOG if [ "$?" != "0" ] then echo "Error on with $I"; exit fi done sagan-1.1.2/extra/barnyard2/0000755000175000017500000000000012770372750014567 5ustar champchampsagan-1.1.2/extra/barnyard2/barnyard2.snorby.conf0000644000175000017500000000125512770372750020640 0ustar champchamp#------------------------------------------------------------- # Barnyard2 configuration file #------------------------------------------------------------- # Use flag settings "-D -f sagan.u2 -d /var/log/sagan -c /usr/local/etc/barnyard2.snorby.conf" config reference_file: /usr/local/etc/sagan-rules/reference.config config classification_file: /usr/local/etc/sagan-rules/classification.config config sid_file: /usr/local/etc/sagan-rules/sagan-sid-msg.map config hostname: sagan config interface: misc config waldo_file: /var/log/sagan/barnyard2.waldo input unified2 output database: log, mysql, user=snorby password=s3cr3tsauce dbname=snorby host=snorby sagan-1.1.2/extra/barnyard2/barnyard2.cli.conf0000644000175000017500000000020012770372750020060 0ustar champchamp# this is not hard, only unified2 is supported ;) input unified2 # Step 3: setup the output plugins output alert_fast: stdout sagan-1.1.2/extra/rsyslog/0000755000175000017500000000000012770372750014405 5ustar champchampsagan-1.1.2/extra/rsyslog/sagan.conf0000644000175000017500000000051312770372750016344 0ustar champchamp# Template and fifo for sending rsyslog data to sagan # This file can go in /etc/rsyslog.d/ $template sagan,"%fromhost-ip%|%syslogfacility-text%|%syslogpriority-text%|%syslogseverity-text%|%syslogtag%|%timegenerated:1:10:date-rfc3339%|%timegenerated:12:19:date-rfc3339%|%programname%|%msg%\n" *.* |/var/run/sagan.fifo;sagan sagan-1.1.2/extra/external-test/0000755000175000017500000000000012770372750015502 5ustar champchampsagan-1.1.2/extra/external-test/external-program0000755000175000017500000000123312770372750020716 0ustar champchamp#!/usr/bin/perl ############################################################################## # This is a exmaple program to test the "external" output format with. This # routine simply writes our a lot file of what it has received. # # Champ Clark III # 08/05/2015 ############################################################################## my $filename = "/tmp/myprogram.$$"; $SIG{'INT'} = \&signal_handler; $SIG{'TERM'} = \&signal_handler; $SIG{'HUP'} = \&signal_handler; open(MYFILE, ">> $filename") || die "Cannot open $filename!\n"; while (<>) { print MYFILE $_; } close(MYFILE); exit(0); sub signal_handler { close(MYFILE); exit(0); } sagan-1.1.2/extra/RPM/0000755000175000017500000000000012770372750013341 5ustar champchampsagan-1.1.2/extra/RPM/sagan.logrotate0000644000175000017500000000035712770372750016361 0ustar champchamp/var/log/sagan/alert /var/log/sagan/sagan.log /var/log/sagan/sagan.stats { compress delaycompress missingok notifempty sharedscripts postrotate /sbin/service sagan reload 2>/dev/null || true endscript } sagan-1.1.2/extra/RPM/README0000644000175000017500000000076112770372750014225 0ustar champchampExample RPM spec and system files for CentOS 7. To prepare source tarballs from the Git repository execute the following commands: 1. For the Sagan cd ~/rpmbuild/SOURCES git clone https://github.com/beave/sagan.git sagan-1.0.0RC5 tar --exclude='.git*' -czf sagan-1.0.0RC5.tar.gz sagan-1.0.0RC5 2. For the Sagan Rules cd ~/rpmbuild/SOURCES git clone https://github.com/beave/sagan-rules.git tar --exclude='.git*' -czf "sagan-rules-`git -C sagan-rules rev-parse --short HEAD`.tar.gz" sagan-rules sagan-1.1.2/extra/RPM/sagan-setup.libexec0000644000175000017500000000070612770372750017130 0ustar champchamp#!/bin/sh config="$1" if [ ! -f "$config" ]; then echo "config file '$config' does not exist" exit 1 fi while read a b c; do if [ "$a" = "var" -a "$b" = "FIFO" ]; then fifo="$c" fi done < "$config" if [ -z "$fifo" ]; then echo "var FIFO is not defined" exit 1 fi if [ ! -p "$fifo" ]; then if ! mkfifo "$fifo" 2>/dev/null; then echo "can't create fifo '$fifo'" exit 1 fi fi chmod 0750 "$fifo" sagan-1.1.2/extra/RPM/sagan.service0000644000175000017500000000054112770372750016014 0ustar champchamp[Unit] Description=Sagan daemon Documentation=man:sagan(8) Before=rsyslog.service syslog-ng.service [Service] Environment=CONFIG=/etc/sagan/sagan.conf ExecStartPre=/usr/libexec/sagan/sagan-setup $CONFIG ExecStart=/usr/sbin/sagan -f $CONFIG ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure StandardOutput=null [Install] WantedBy=multi-user.target sagan-1.1.2/extra/RPM/sagan-sagan.conf.patch0000644000175000017500000002474612770372750017503 0ustar champchampdiff -ur sagan-1.0.0RC5.orig/etc/sagan.conf sagan-1.0.0RC5/etc/sagan.conf --- sagan-1.0.0RC5.orig/etc/sagan.conf 2015-04-30 08:39:26.000000000 +0300 +++ sagan-1.0.0RC5/etc/sagan.conf 2015-04-30 11:35:46.429266091 +0300 @@ -15,13 +15,13 @@ # # [Required] -var FIFO /var/run/sagan.fifo +var FIFO /var/log/sagan/sagan.fifo # This variable contains the path of the Sagan rule sets. It is required. # # [Required] -var RULE_PATH /usr/local/etc/sagan-rules +var RULE_PATH /etc/sagan/sagan-rules # Where Sagan should store it's lock file. # @@ -132,7 +132,7 @@ # you don't want to burn CPU in analyzing them. ############################################################################## -; ignore_list: /usr/local/etc/sagan-ignore-list.txt +; ignore_list: /etc/sagan/sagan-ignore-list.txt ############################################################################## # Maxmind GeoIP support: Sagan will need the --enable-geoip flag for this @@ -150,8 +150,8 @@ # ############################################################################## -; country_database: /usr/local/share/GeoIP/GeoIP.dat -; var HOME_COUNTRY [US, CA] +country_database: /usr/share/GeoIP/GeoIP.dat +var HOME_COUNTRY [US, CA] ############################################################################## # The "WINDOWS_DOMAINS" variable. This is used by some Windows rules to @@ -205,7 +205,7 @@ # of performance or generating graphs with RRDTool. ############################################################################## -; processor perfmonitor: time=600 file=/var/log/sagan/stats/sagan.stats +; processor perfmonitor: time=600 file=/var/log/sagan/sagan.stats ############################################################################## # Websense Threatseeker processor - This is the Sagan Websense processor. @@ -223,7 +223,7 @@ # ############################################################################## -; processor websense: device_id=SAGAN_SIEM max_cache=300000 cache_timeout=1 catagories=/usr/local/etc/sagan-rules/websense-catagories.conf auth=XXXXXXXXXXXX url=http://rp.cloud.threatseeker.com/urlinfo/cat?url= +; processor websense: device_id=SAGAN_SIEM max_cache=300000 cache_timeout=1 catagories=/etc/sagan/sagan-rules/websense-catagories.conf auth=XXXXXXXXXXXX url=http://rp.cloud.threatseeker.com/urlinfo/cat?url= # Define the Websense Catagory to trigger on via rules! @@ -240,7 +240,7 @@ # by a comma ############################################################################## -; processor blacklist: /usr/local/etc/sagan-rules/blacklist.txt +; processor blacklist: /etc/sagan/sagan-rules/blacklist.txt ############################################################################## # The Bro Intellegence framework @@ -440,15 +440,15 @@ # at run time, they are loaded 'as needed' by the Sagan rule sets. These # get triggered by the 'normalize:' flag within a Sagan rule. -normalize: cisco, $RULE_PATH/cisco-normalize.rulebase -normalize: openssh, $RULE_PATH/openssh-normalize.rulebase -normalize: smtp, $RULE_PATH/smtp-normalize.rulebase -normalize: dns, $RULE_PATH/dns-normalize.rulebase -normalize: imap, $RULE_PATH/imap-normalize.rulebase -normalize: su, $RULE_PATH/su-normalize.rulebase -normalize: vmware, $RULE_PATH/vmware-normalize.rulebase -normalize: linux-kernel, $RULE_PATH/linux-kernel-normalize.rulebase -normalize: windows, $RULE_PATH/windows-normalize.rulebase +#normalize: cisco, $RULE_PATH/cisco-normalize.rulebase +#normalize: openssh, $RULE_PATH/openssh-normalize.rulebase +#normalize: smtp, $RULE_PATH/smtp-normalize.rulebase +#normalize: dns, $RULE_PATH/dns-normalize.rulebase +#normalize: imap, $RULE_PATH/imap-normalize.rulebase +#normalize: su, $RULE_PATH/su-normalize.rulebase +#normalize: vmware, $RULE_PATH/vmware-normalize.rulebase +#normalize: linux-kernel, $RULE_PATH/linux-kernel-normalize.rulebase +#normalize: windows, $RULE_PATH/windows-normalize.rulebase ############################################################################# # GeoIP Sagan rule sets @@ -498,96 +498,96 @@ # # It is _UNLIKELY_ you want to have _ALL_ rules enabled! -include $RULE_PATH/adtran.rules -include $RULE_PATH/apache.rules -include $RULE_PATH/apc-emu.rules -include $RULE_PATH/arp.rules -include $RULE_PATH/artillery.rules -include $RULE_PATH/asterisk.rules -include $RULE_PATH/attack.rules -include $RULE_PATH/bash.rules -include $RULE_PATH/bind.rules -include $RULE_PATH/bonding.rules -include $RULE_PATH/bro-ids.rules -include $RULE_PATH/cacti-thold.rules -include $RULE_PATH/cisco-acs.rules -include $RULE_PATH/cisco-cucm.rules -include $RULE_PATH/cisco-ios.rules -include $RULE_PATH/cisco-malware.rules -include $RULE_PATH/cisco-pixasa.rules -include $RULE_PATH/cisco-prime.rules -include $RULE_PATH/cisco-sdee.rules -include $RULE_PATH/cisco-wlc.rules -include $RULE_PATH/citrix.rules -include $RULE_PATH/courier.rules -include $RULE_PATH/deleted.rules -include $RULE_PATH/digitalpersona.rules -include $RULE_PATH/dovecot.rules -include $RULE_PATH/fatpipe.rules -include $RULE_PATH/fortinet-malware.rules -include $RULE_PATH/fortinet.rules -include $RULE_PATH/ftpd.rules -include $RULE_PATH/grsec.rules -include $RULE_PATH/honeyd.rules -include $RULE_PATH/hordeimp.rules -include $RULE_PATH/hostapd.rules -include $RULE_PATH/huawei.rules -include $RULE_PATH/imapd.rules -include $RULE_PATH/ipop3d.rules -include $RULE_PATH/juniper.rules -include $RULE_PATH/kismet.rules -include $RULE_PATH/knockd.rules -include $RULE_PATH/linux-kernel.rules -include $RULE_PATH/milter.rules -include $RULE_PATH/mongodb.rules -include $RULE_PATH/mysql.rules -include $RULE_PATH/nfcapd-malware.rules -include $RULE_PATH/nfcapd.rules -include $RULE_PATH/nginx.rules -include $RULE_PATH/ntp.rules -include $RULE_PATH/openssh.rules -include $RULE_PATH/openvpn.rules -include $RULE_PATH/oracle.rules -include $RULE_PATH/ossec-mi.rules -include $RULE_PATH/ossec.rules -include $RULE_PATH/php.rules -include $RULE_PATH/postfix.rules -include $RULE_PATH/postgresql.rules -include $RULE_PATH/pptp.rules -include $RULE_PATH/procurve.rules -include $RULE_PATH/proftpd.rules -include $RULE_PATH/proxy-malware.rules -include $RULE_PATH/pure-ftpd.rules -include $RULE_PATH/racoon.rules -include $RULE_PATH/riverbed.rules -include $RULE_PATH/roundcube.rules -include $RULE_PATH/rsync.rules -include $RULE_PATH/samba.rules -include $RULE_PATH/sendmail.rules -include $RULE_PATH/snort.rules -include $RULE_PATH/solaris.rules -include $RULE_PATH/sonicwall.rules -include $RULE_PATH/squid.rules -include $RULE_PATH/ssh-tectia-server.rules -include $RULE_PATH/su.rules -include $RULE_PATH/symantec-ems.rules -include $RULE_PATH/syslog.rules -include $RULE_PATH/tcp.rules -include $RULE_PATH/telnet.rules -include $RULE_PATH/tripwire.rules -include $RULE_PATH/vmpop3d.rules -include $RULE_PATH/vmware.rules -include $RULE_PATH/vpopmail.rules -include $RULE_PATH/vsftpd.rules -include $RULE_PATH/web-attack.rules -include $RULE_PATH/weblabrinth.rules -include $RULE_PATH/windows-applocker.rules -include $RULE_PATH/windows-auth.rules -include $RULE_PATH/windows-emet.rules -include $RULE_PATH/windows-malware.rules -include $RULE_PATH/windows-misc.rules -include $RULE_PATH/windows-mssql.rules -include $RULE_PATH/windows.rules -include $RULE_PATH/wordpress.rules -include $RULE_PATH/xinetd.rules -include $RULE_PATH/zeus.rules +#include $RULE_PATH/adtran.rules +#include $RULE_PATH/apache.rules +#include $RULE_PATH/apc-emu.rules +#include $RULE_PATH/arp.rules +#include $RULE_PATH/artillery.rules +#include $RULE_PATH/asterisk.rules +#include $RULE_PATH/attack.rules +#include $RULE_PATH/bash.rules +#include $RULE_PATH/bind.rules +#include $RULE_PATH/bonding.rules +#include $RULE_PATH/bro-ids.rules +#include $RULE_PATH/cacti-thold.rules +#include $RULE_PATH/cisco-acs.rules +#include $RULE_PATH/cisco-cucm.rules +#include $RULE_PATH/cisco-ios.rules +#include $RULE_PATH/cisco-malware.rules +#include $RULE_PATH/cisco-pixasa.rules +#include $RULE_PATH/cisco-prime.rules +#include $RULE_PATH/cisco-sdee.rules +#include $RULE_PATH/cisco-wlc.rules +#include $RULE_PATH/citrix.rules +#include $RULE_PATH/courier.rules +#include $RULE_PATH/deleted.rules +#include $RULE_PATH/digitalpersona.rules +#include $RULE_PATH/dovecot.rules +#include $RULE_PATH/fatpipe.rules +#include $RULE_PATH/fortinet-malware.rules +#include $RULE_PATH/fortinet.rules +#include $RULE_PATH/ftpd.rules +#include $RULE_PATH/grsec.rules +#include $RULE_PATH/honeyd.rules +#include $RULE_PATH/hordeimp.rules +#include $RULE_PATH/hostapd.rules +#include $RULE_PATH/huawei.rules +#include $RULE_PATH/imapd.rules +#include $RULE_PATH/ipop3d.rules +#include $RULE_PATH/juniper.rules +#include $RULE_PATH/kismet.rules +#include $RULE_PATH/knockd.rules +#include $RULE_PATH/linux-kernel.rules +#include $RULE_PATH/milter.rules +#include $RULE_PATH/mongodb.rules +#include $RULE_PATH/mysql.rules +#include $RULE_PATH/nfcapd-malware.rules +#include $RULE_PATH/nfcapd.rules +#include $RULE_PATH/nginx.rules +#include $RULE_PATH/ntp.rules +#include $RULE_PATH/openssh.rules +#include $RULE_PATH/openvpn.rules +#include $RULE_PATH/oracle.rules +#include $RULE_PATH/ossec-mi.rules +#include $RULE_PATH/ossec.rules +#include $RULE_PATH/php.rules +#include $RULE_PATH/postfix.rules +#include $RULE_PATH/postgresql.rules +#include $RULE_PATH/pptp.rules +#include $RULE_PATH/procurve.rules +#include $RULE_PATH/proftpd.rules +#include $RULE_PATH/proxy-malware.rules +#include $RULE_PATH/pure-ftpd.rules +#include $RULE_PATH/racoon.rules +#include $RULE_PATH/riverbed.rules +#include $RULE_PATH/roundcube.rules +#include $RULE_PATH/rsync.rules +#include $RULE_PATH/samba.rules +#include $RULE_PATH/sendmail.rules +#include $RULE_PATH/snort.rules +#include $RULE_PATH/solaris.rules +#include $RULE_PATH/sonicwall.rules +#include $RULE_PATH/squid.rules +#include $RULE_PATH/ssh-tectia-server.rules +#include $RULE_PATH/su.rules +#include $RULE_PATH/symantec-ems.rules +#include $RULE_PATH/syslog.rules +#include $RULE_PATH/tcp.rules +#include $RULE_PATH/telnet.rules +#include $RULE_PATH/tripwire.rules +#include $RULE_PATH/vmpop3d.rules +#include $RULE_PATH/vmware.rules +#include $RULE_PATH/vpopmail.rules +#include $RULE_PATH/vsftpd.rules +#include $RULE_PATH/web-attack.rules +#include $RULE_PATH/weblabrinth.rules +#include $RULE_PATH/windows-applocker.rules +#include $RULE_PATH/windows-auth.rules +#include $RULE_PATH/windows-emet.rules +#include $RULE_PATH/windows-malware.rules +#include $RULE_PATH/windows-misc.rules +#include $RULE_PATH/windows-mssql.rules +#include $RULE_PATH/windows.rules +#include $RULE_PATH/wordpress.rules +#include $RULE_PATH/xinetd.rules +#include $RULE_PATH/zeus.rules sagan-1.1.2/extra/RPM/sagan.spec0000644000175000017500000000764612770372750015323 0ustar champchamp%define sagan_user sagan %define sagan_group sagan %define sagan_rules 4146f4f Name: sagan Version: 1.0.0RC5 Release: 1%{?dist} Summary: High performance, real-time log analysis & correlation engine Group: Applications/System License: GPLv2 URL: http://sagan.quadrantsec.com/ Source0: http://sagan.quadrantsec.com/download/%{name}-%{version}.tar.gz Source1: %{name}-rules-%{sagan_rules}.tar.gz Source2: %{name}.logrotate Source3: %{name}.service Source4: %{name}.tmpfiles Source5: %{name}-setup.libexec Patch0: %{name}-sagan.conf.patch BuildRequires: GeoIP-devel BuildRequires: json-c-devel BuildRequires: libdnet-devel BuildRequires: libesmtp-devel BuildRequires: liblognorm1-devel >= 1.0.0 BuildRequires: pcre-devel Requires: %{name}-rules %systemd_requires %description Sagan is an open source (GNU/GPLv2) multi-threaded, high performance, real-time log analysis & correlation engine developed by Quadrant Information Security that runs on Unix operating systems. It is written in C and uses a multi-threaded architecture to deliver high performance log & event analysis. Sagan's structure and rules work similarly to the Sourcefire Snort IDS/IPS engine. This allows Sagan to be compatible with Snort rule management software and give Sagan the ability to correlate with Snort IDS/IPS data. Sagan can record events to the Snort unified2 output format which makes Sagan compatible with user interfaces such as Snorby, Sguil, BASE and proprietary consoles. Sagan supports different output formats for reporting and analysis, log normalization, script execution on event detection, automatic firewall support via Snortsam, GeoIP detection/alerting, multi-line log support, and time sensitive alerting. %package rules Release: 1.git%{sagan_rules}%{?dist} Summary: Sagan engine rule sets Group: Applications/System BuildArch: noarch %description rules This package contains the Sagan engine rule sets. You probably won't find these useful unless you're actually using Sagan. %prep %setup -q %patch -P0 -p1 %build %configure \ --sysconfdir=%{_sysconfdir}/%{name} \ --enable-esmtp \ --enable-geoip \ --enable-libdnet \ --enable-lognorm \ --enable-snortsam make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} rm -rf %{buildroot}%{_bindir} tar -xzf %{S:1} -C %{buildroot}%{_sysconfdir}/%{name} install -D -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install -D -m 0644 %{S:3} %{buildroot}%{_unitdir}/%{name}.service install -D -m 0644 %{S:4} %{buildroot}%{_tmpfilesdir}/%{name}.conf install -D -m 0755 %{S:5} %{buildroot}%{_libexecdir}/%{name}/%{name}-setup %pre getent group %{sagan_group} >/dev/null || \ groupadd -r %{sagan_group} getent passwd %{sagan_user} >/dev/null || \ useradd -c "Sagan daemon" -d %{_localstatedir}/run/%{name} \ -g %{sagan_group} -M -r -s /sbin/nologin %{sagan_user} %post %tmpfiles_create %{name}.conf %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %defattr(0644, root, root, 0755) %doc AUTHORS ChangeLog COPYING FAQ INSTALL NEWS README TODO %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %attr(0640, root, %{sagan_group}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %attr(0750, root, %{sagan_group}) %dir %{_sysconfdir}/%{name} %attr(0750, %{sagan_user}, %{sagan_group}) %dir %{_localstatedir}/log/%{name} %attr(0750, %{sagan_user}, %{sagan_group}) %dir %{_localstatedir}/run/%{name} %dir %{_libexecdir}/%{name} %attr(0755, root, root) %{_libexecdir}/%{name}/%{name}-setup %attr(0755, root, root) %{_sbindir}/%{name} %{_mandir}/man8/sagan.8.gz %{_tmpfilesdir}/%{name}.conf %{_unitdir}/%{name}.service %files rules %defattr(0644, root, root, 0755) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-rules %changelog * Fri May 8 2015 Aleksey Chudov - 1.0.0RC5 - Build sagan-rules subpackage * Fri Apr 17 2015 Aleksey Chudov - 1.0.0RC5 - Initial spec sagan-1.1.2/extra/RPM/sagan.tmpfiles0000644000175000017500000000004412770372750016175 0ustar champchampd /var/run/sagan 0750 sagan sagan - sagan-1.1.2/extra/conversion/0000755000175000017500000000000012770372750015070 5ustar champchampsagan-1.1.2/extra/conversion/ossec-sagan.pl0000644000175000017500000002172412770372750017636 0ustar champchamp#!/usr/bin/perl ## ossec-sagan.pl -- ## This utility takes a series of OSSEC rules, and generates a series of compatible SAGAN rules. ## Originally developed by Michael Iverson. ## ## Copyright (c) 2009-2011, Quadrant Information Security ## All rights reserved. ## ## Please submit any custom rules or ideas sagan-sigs@quadrantsec.com mailing list ## ##************************************************************* ## Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ## following conditions are met: ## ## * Redistributions of source code must retain the above copyright notice, this list of conditions and the following ## disclaimer. ## * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the ## following disclaimer in the documentation and/or other materials provided with the distribution. ## * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, ## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ## DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ## SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ## WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ## USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## ##************************************************************* ## ## History: ## v0.1 2010-12-27 - Initial version ## # Does not like the format of the XML groupnames when used as hash keys, so use strict is out. #use strict; #use warnings; #use diagnostics; use XML::Simple; # used to manage config file in XML format #use Data::Dumper; # For debugging of data structures ## Define default configuration settings. ## These can be overridden by command line options. ## # Input file my $inputFile = ""; # temporary file my $tempFile = "/tmp/ossec-rules.tmp"; # This defined the default OSSEC alert level. # Rules with levels <= this number are commented out by default. my $commentLevel = "4"; ## Open temporary file, and write a header to it. ## open my $TEMPFILE, ">", "$tempFile" or die "$tempFile Error: Can't open temporary file: $!\n"; print $TEMPFILE "\n"; ## Read command line parameters, and process xml files passed to the ## my $p; while ($p = shift) { # if we specify a comment level if (($p eq "-c") || ($p eq '--comment')) { $commentLevel = shift; } elsif (($p eq '-h') || ($p eq '--help')) { # Print usage instructions die q{Usage: ossec-sagan.pl [OPTION] [FILES] Summary: Convert the supplied list of OSSEC xml rule files into a monolithic block of SAGAN rules. Converted rules are written to stdout. Options: -c n or --config n Comment out alerts with OSSEC levels less than or equal to n. (default is 4) -h or --help Print help message. Note: Options must appear BEFORE file arguments. } } else { # Assume that the parameter is an OSSEC xml rule file # we'll read in each one, and process out unnecessary tags that might get us in trouble. # output will be written to the temporary file. $inputFile = $p; # Check the input file for obvious issues. # die "$inputFile Error: Input file does not exist.\n" if (!(-e $inputFile)); die "$inputFile Error: Input file is not the correct type.\n" if (!(-f $inputFile)); die "$inputFile Error: Input file is not readable.\n" if (!(-r $inputFile)); # die "$inputFile Error: Output directory does not exist.\n" # if (!(-d $outFolder)); # Open up our input file. # open my $INFILE, "<", "$inputFile" or die "$inputFile Error: Can't open input file: $!\n"; # read through file, only matching relevant lines while (<$INFILE>) { # We need to add the filename to the group name, since XML:Simple can't handle # duplicate hash keys s/)/); } close $INFILE; } } ## Close temporary file, but write trailer to it first. ## print $TEMPFILE "\n"; close $TEMPFILE; ## Read in preprocessed XML rules from temporary file ## my $xmltree = XML::Simple->new(); my $cfg = $xmltree->XMLin($tempFile,ForceArray => ['description','rule']); # debug data structure #print Dumper($cfg); ## Print header ## print q{## ## OSSEC SAGAN RULES (autogenerated) ## ## Sagan is: ## Copyright (c) 2009-2010, Quadrant Information Security. ## All rights reserved. ## ## Please submit any custom rules or ideas to sagan-submit@quadrantsec.com or the sagan-sigs mailing list ## ##************************************************************* ## Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ## following conditions are met: ## ## * Redistributions of source code must retain the above copyright notice, this list of conditions and the following ## disclaimer. ## * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the ## following disclaimer in the documentation and/or other materials provided with the distribution. ## * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived ## from this software without specific prior written permission. ## ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, ## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ## DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ## SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ## WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ## USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## ##************************************************************* ## These rules were autogenerated from ossec rules using the ossec-sagan.pl script. ## OSSEC and its supplied rules are: ## ## Copyright (C) 2009 Trend Micro Inc. ## All rights reserved. ## ## This program is a free software; you can redistribute it ## and/or modify it under the terms of the GNU General Public ## License (version 2) as published by the FSF - Free Software ## Foundation. ## ## License details: http://www.ossec.net/en/licensing.html ## }; ## For each group... foreach my $group ( keys %{$cfg->{'group'}} ) { # Strip the annoying comma from the group name. my $tmpgrp = $group; $tmpgrp =~ s/,$//; # Keep groups neatly separated in output file print "\n\n## Rule group: $tmpgrp\n##\n"; # debug data structure. #print Dumper($cfg->{'group'}->{$group}); # For each rule within the group... foreach my $rule ( keys %{$cfg->{'group'}->{$group}->{'rule'}} ) { # Sample SAGAN Rule # alert syslog $EXTERNAL_NET any -> $HOME_NET any (msg: "[OSSEC] Alert Level 5"; content: "Alert Level: 5;"; classtype: system-event; program: ossec; sid: 6000001; rev:1;) # Assign the alert level to a local variable, as we will use it a lot. my $level = $cfg->{'group'}->{$group}->{'rule'}->{$rule}->{'level'}; # check if the level is beneath the comment threshold. If it is, comment it out # We'll print the level number in the comment to make it easy to remove comments later. print "#(Level $level) " if ($level <= $commentLevel); # print beginning of the rule, including description (ossec can have multiple description lines) print "alert syslog \$EXTERNAL_NET any -> \$HOME_NET any (msg: \"[OSSEC] Level $level - "; foreach my $desc (@{$cfg->{'group'}->{$group}->{'rule'}->{$rule}->{'description'}}) { print "$desc"; } # print group name print " ($tmpgrp)\"; "; # classify rule based on OSSEC priority level print "content: \"Rule: $rule \"; classtype: "; if ($level == 0) { print "tcp-connection; "; } elsif ($level < 5) { print "not-suspicious; "; } elsif ($level < 10) { print "system-event; "; } else { print "exploit-attempt; "; } # embed the ossec id in the sid of the rule printf "program: ossec; sid: 6%06s; rev:1;)\n", $rule; } } sagan-1.1.2/etc/0000755000175000017500000000000012770372750012333 5ustar champchampsagan-1.1.2/etc/sagan.conf0000644000175000017500000007011512770372750014277 0ustar champchamp# ,-._,-. Sagan configuration file [http://sagan.quadrantsec.com] # \/)"(\/ Champ Clark III & The Quadrant InfoSec Team: http://quadrantsec.com # (_o_) Copyright (C) 2009-2014 Quadrant Information Security., et al. # / \/) # (|| ||) # oo-oo ############################################################################## # Standard _required_ Sagan options! ############################################################################## # Sagan reads log entries via a FIFO (First in/First Out). This variable # lets Sagan know where that FIFO is located. # # [Required] var FIFO /var/run/sagan.fifo # This variable contains the path of the Sagan rule sets. It is required. # # [Required] var RULE_PATH /usr/local/etc/sagan-rules # Where Sagan should store it's lock file. # # [Optional] var LOCKFILE /var/run/sagan/sagan.pid # Where Sagan should store alerts, in a text/alert format. # # [Optional] var ALERTLOG /var/log/sagan/alert # This is the path where Sagan related files are stored. For example, # Unified2 output files would be stored under this path. # # [Optional] var SAGANLOGPATH /var/log/sagan # This section defines commonly used ports and protocols. Rules call these # variable values. This way, you can change the port for the protocol here # rather than changing it in the rule set. var SSH_PORT 22 var HTTP_PORT 80 var HTTPS_PORT 443 var TELNET_PORT 23 var DNS_PORT 53 var SNMP_PORT 161 var POP3_PORT 110 var IMAP_PORT 143 var SMTP_PORT 25 var MYSQL_PORT 3306 var MSSQL_PORT 1433 var NTP_PORT 123 var OPENVPN_PORT 1194 var PPTP_PORT 1723 var FTP_PORT 21 var RSYNC_PORT 873 var SQUID_PORT 3128 # This is the IP address _of_ the Sagan system. These options are used # if Sagan is unable to determine a TCP/IP network address and/or port. # # [Required] sagan_host 192.168.0.1 sagan_port 514 # If logging to a Snort database and a rule specifies the # protocol a "any", this is the protocol we default to. This is only # needed if you are # logging to a Snort database. # # Defaults to 17 [UDP], which is what normal 'syslog' traffic is. If you # want TCP to be the desired effect, change this option to "6". # # [Optional] ; sagan_proto 17 # Disable DNS warnings. Sagan will warn every time it has to do a DNS lookup # when attempting to normalize a log entry. You typically don't want to # do DNS lookups with log analysis. More information can be found at: # https://wiki.quadrantsec.com/bin/view/Main/SaganDNS. If it's not possible # to gather the true TCP/IP address information, you can supress these # warnings here. ; disable_dns_warnings # README FIRST! - It is very LIKELY you do NOT want to enable this feature. # If the syslog system is feeding you "hostnames" rather than source IP # addresses, Sagan can do a DNS lookup of the source host. Sagan will cache # this information, but there will be a preformance hit. Make _sure_ # your DNS system settings are correct! ; syslog_src_lookup # This sets the max capacity of the pipe (FIFO). The option is in bytes, but # must be must be between your systems page size and the limit defined in your # /proc/sys/fs/pipe-max-size. If you attempt to set a capacity below the page # size, it will be automatically rounded up. As of Linux 2.6.35, the default # pipe capacity is 65536 bytes with a maximum of 1048576 bytes. # # A larger capacity pipe means there is more room for the logging daemon to # stuff data into which can positively affect Sagan performance. Typical valid # values are 65536, 131072, 262144, 524288, and 1048576. Sagan defaults to # 1048576. ; sagan_fifo_size 1048576 ############################################################################## # Shared memory resources ############################################################################## # Sagan creates "memory mapped" files to keep track of flowbits, thresholds, # and afters. This allows Sagan to share information with other Sagan # processes. For example, if one Sagan instance is monitoring "Linux" logs # and another is monitoring "Windows" logs, Sagan can communicate between # the two Sagan processes using these memory mapped files. A "flowbit" that # is "set" by the "Linux" process accessable and "known" to the Windows # instance. # # This also allows Sagan to "remember" threshold, flowbit and after data # between Sagan restarts (including system reboots!). # # The storage is pre-allocated when the memory mapped files are created. # The values can be increased at any time. The default is 10000 elements # per array. # Location for memory mapped files. Defaults to /var/run/sagan ; ipc_directory /var/run/sagan # Flowbit memory map file. ; flowbits 10000 # Thresholding memory map files. ; threshold_by_src 10000 ; threshold_by_dst 10000 ; threshold_by_username 10000 # After memory map files. ; after_by_src 10000 ; after_by_dst 10000 ; after_by_username 10000 # Track clients memory map file. ; track_clients 10000 ############################################################################## # Maximum processor threads. ############################################################################## # Maximum number of "processor" threads. Processor threads are what do the # analysis of the log lines. Default = 50. # [optional] ; max_processor_threads 100 ############################################################################## # The "ignore list" is a list of strings, terms, etc that Sagan will # ignore if received. If these terms are found, then rule parsing and # processors or bypassed and the message is dropped. This is useful for # when you have log messages repeating without any useful information and # you don't want to burn CPU in analyzing them. ############################################################################## ; ignore_list: /usr/local/etc/sagan-ignore-list.txt ############################################################################## # Maxmind GeoIP2 support: Sagan will need the --enable-geoip2 flag for this # support. This allows Sagan to catagorize events by their country code. # For example; a rule can be created to track "authentication successes" # and associate the country the successful login came from. If the successful # login is from outside your country code, an alarm can be generated. # # This can only be used with maxmind GeoIP2 databases. Legacy "GeoIP" # databases will not function!a # # Free and paid databases can be foudn at: # # https://www.maxmind.com/en/geoip2-country-database (For free/pay databases) # http://dev.maxmind.com/geoip/geoip2/geolite2/ (free database) # # Country codes (ISO3166) can be found at: # http://dev.maxmind.com/geoip/legacy/codes/iso3166/ # # For more information about this feature, see: # # https://quadrantsec.com/about/blog/detecting_adversary_with_sagan_geoip/ # ############################################################################## ; country_database: /usr/local/share/GeoIP2/GeoLite2-Country.mmdb ; var HOME_COUNTRY [US, CA] ############################################################################## # Credit card prefix - The variable "CREDIT_CARD_PREFIXES" is used by some # rules to determine if a valid credit card has been passed. This is used # in conjuction with some PoS (Point of Sales) rule sets. For example, the # fipaypin.rules. ############################################################################## # The current credit card prefixes are United States centric. You may want # to consider altering them for your usage. More information on credit card # prefixes can be found at: # # https://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29 # # Current enabled values: # ----------------------- # Visa 4 # American Express 34, 37 # Diners Club Carte Blanche 300-305 # Diners Club enRoute 2014, 2149 # Diners Club International 309, 36 ,38, 39 # Diners Club United States & Canada 54, 55 # Discover Card (shortened) 6011, 622126-622925, 644-649, 65 # InstaPaymet 636, 637, 638, 639 # Mastercard (shortened) 2221-2720, 51-55 ; var CREDIT_CARD_PREFIXES [4,34,37,300,301,302,303,304,305,2014,2149,309,36,38,39,54,55,6011,6221,6222,6223,6224,6225,6226,6227,6228,6229,644,645,646,647,648,649,65,636,637,638,639,22,23,24,25,26,27,51,52,53,53,55] ############################################################################## # RFC1918 prefixes. Typically used with "meta_content" to determine if an # IP addresses are RFC1918 or not. ############################################################################## ; var RFC1918 [10.,192.168.,172.16.,172.17.,172.18.,172.19.,172.20.,172.21.,172.22.,172.23.,172.24.,172.25.,172.26.,172.27.,172.28.,172.29.,172.30.,172.31.] ############################################################################## # The "WINDOWS_DOMAINS" variable. This is used by some Windows rules to # determine if a log message contains, or does not contain, a valid DOMAIN # for your organization. This can be used with rule options like # meta_content. # # You can also load a list dynamically using the # # var WINDOWS_DOMAINS file:/etc/example_file.txt # # For more information abou this feature, see: # # https://quadrantsec.com/about/blog/detecting_pass_the_hash_attacks_with_sagan_in_real_time/ # ############################################################################## ; var WINDOWS_DOMAINS [MYCOMPANYDOMAIN, EXAMPLEDOMAIN, ANOTHER_DOMAIN] ############################################################################## # Define variables used by the "aetas" rule sets. These are time based # rules. For example, if a rule has: # # alert_time: days $SAGAN_DAYS, hours $SAGAN_HOURS; # # The signature will only fire between on $SAGAN_DAYS and $SAGAN_HOURS. # This is used to monitor logs for events that shouldn't normally happen # "after hours". For example, administrator logins at "odd" times. # # Days - 0 = Sunday # 6 = Saturday # # See https://wiki.quadrantsec.com/twiki/bin/view/Main/SaganRuleReference # for more details ############################################################################## ; var SAGAN_HOURS 0700-1800 ; var SAGAN_DAYS 12345 ############################################################################## # Microsoft "Sysinternals" PSExec MD5 sums. ############################################################################## # psexec_v1.98, v2.00, v2.10, v2.11, v2.11 (2016) var PSEXEC_MD5 [CD23B7C9E0EDEF184930BC8E0CA2264F0608BCB3,9A46E577206D306D9D2B2AB2F72689E4F5F38FB1,2EDEEFB431663F20A36A63C853108E083F4DA895,B5C62D79EDA4F7E4B60A9CAA5736A3FDC2F1B27E,A7F7A0F74C8B48F1699858B3B6C11EDA] ############################################################################## # "sagan-track-clients" (Processor) - This processor keeps track of the # systems reporting to Sagan. If Sagan stops receiving logs from a client # for X number of minutes (client_timeout), a alert is created. When the # system comes "back online", another alert is created. # # client_timeout = Alert after this many minutes if no logs are received. ############################################################################## ; processor sagan-track-clients: client_timeout=1440 ############################################################################## # Perfmonitor processor - This processor writes statistical information # every X seconds (user defined) to a CSV file. Good for keeping track # of performance or generating graphs with RRDTool. Cannot be loaded via # SIGHUP. This must be enabled at run time. ############################################################################## ; processor perfmonitor: time=600 file=/var/log/sagan/stats/sagan.stats ############################################################################## # Blacklist processor - This processor reads in a list of hosts/networks that # are considered "bad". For example, you might pull down a list like # http://feeds.dshield.org/block.txt. This list can then be loaded into # Sagan and _any_ log that contains an IP address from this list will # generate an alert. The list uses a IP/CIDR format (for example: # 192.168.1.0/24). You can then create rules that will "look" for these # blacklisted addresses. You can supply multiple files by delimiting them # by a comma ############################################################################## ; processor blacklist: /usr/local/etc/sagan-rules/blacklist.txt ############################################################################## # Bluedot processor - This processor extracts information from logs (URLs, # file hashes, IP addresses) and queries the Quadrant Information Security # "Bluedot" Threat Intellegence database. This is a closed database at this # time. Please contact Quadrant Information Security at +1-800-538-9357 or # info@quadrantsec.com for more information. # # device_id = Identification of the sensor making query. # max_cache = Number of items, per type (url, hash, filename, ip) to cache # in memory. # catagories = Bluedot "catagories". # url = URL with API key to query the Quadrant Bluedot database ############################################################################## ; processor bluedot: device_id=SAGAN max_cache=300000 cache_timeout=120 catagories=/usr/local/etc/sagan-rules/bluedot-catagories.conf url=http://bluedot.quadrantsec.com/q.php?qipapikey=APIKEY # Bluedot "catagories" to monitor for. ; var BLUEDOT_NETWORK [Malicious] ############################################################################## # The Bro Intellegence framework ############################################################################## # This processor allows Sagan to use data from the "Bro Intellegence # Framework". Supply the Bro Intel files to the processor. Delimit via # comma. # # For more information about the Bro Intellegence Framework, # see: # # https://quadrantsec.com/about/blog/using_sagan_with_bro_intelligence_feeds/ # http://blog.bro.org/2014/01/intelligence-data-and-bro_4980.html # https://www.bro.org/sphinx-git/frameworks/intel.html # # A great source for aggregate source of Bro Intellegence data, see: # # https://intel.criticalstack.com/ # # More information about this Sagan processor can be found at at: # # https://wiki.quadrantsec.com/twiki/bin/view/Main/SaganRuleReference#bro_intel_src_ipaddr_dst_ipaddr # # ; processor bro-intel: /opt/critical-stack/frameworks/intel/master-public.bro.dat ############################################################################## # External program/system calls configurations specifics ############################################################################## # This option calls an external program when an event is triggered by a rule. # Sagan basically makes a thread and calls the execl() system call. # Data is supplied to the program being called via standard in (stdin). ; output external: /home/sagan/myprogram ############################################################################## # libesmtp (SMTP/E-mail) specific configuration options ############################################################################## # If you'd like Sagan to e-mail triggered events to you, then you'll want # to configure the below. # If min_email_priority is set, then Sagan will _only_ e-mail events equal to # or less than this priority event. If left commented our or set to 0, # Sagan will e-mail _all_ events. This option does _not_ over ride rules # with the "email:" option set! ; min_email_priority 5 # This is where alerts will be sent if a rule _does not_ have a "email:" # option. If a rule does have "email:" option, then the rules e-mail address # will over ride this option. If this option is not set, then only # rules with the "email:" option will be sent. ; send-to sagan-alerts@example.com # Subject to prepend to the e-mail. By default, it is "[Sagan]". ; email_subject "[Sagan Sensor Testing]" # Server information. This tells Sagan "who" to send e-mail as and where # the SMTP server to relay is. This must be set if the "send-to" option # set, or you have rules with the "email:" option! # ; output email: smtpserver=192.168.0.1:25 from=sagan-alert@example.com ############################################################################## # Unified2 output plug in ############################################################################## # This lets Sagan log the Snort's 'Unified2' output format. This allows # events generated by Sagan to be read and queued for external programs # like Barnyard2 (http://www.securixlive.com/barnyard2/). Barnyard2 can # the record events in various formats (alert_fast, log_ascii, # log_tcpdump, Sguil, MySQL, PostgreSQL, ODBC, MS-SQL and Oracle). ; output unified2: filename sagan.u2, limit 128 ############################################################################## # Sagan syslog "Sniffier" mode. (PLOG). Promiscuous syslog injector ############################################################################## # This lets Sagan "listen" on a network interface via pcap/bpf and "suck" # up UDP syslog messages. When it "finds" a syslog message within a packet, # it injects it into /dev/log. Basically, it 'sniffs' syslog messages and # injects them to your syslog daemon (for archival purposes) and Sagan # (for analysis). Good for environments you can't reconfigure syslog # services. Cannot be loaded viaSIGHUP. This must be enabled at run time. # # For more information, see src/sagan-plog.c. # Network interface to "sniff" traffic on. ; plog_interface eth0 # Syslog "port" to listen on... ; plog_filter "port 514" # Where to inject "found" messages to. ; plog_logdev /dev/log # If Sagan is listening/sniffing on a span/mirror port, you'll want to # have Sagan put the device in "promiscuous mode". Uncomment to enable # that here. # ; plog_promiscuous ############################################################################# # Sagan "Snortsam" configuration. ############################################################################# # # This allows Sagan to send block information Snortsam agents. If a rule # has the fwsam: option in it, the offending IP address can be # firewall/blocked. For example, if a rule is triggered with the fwsam: # option, Sagan can instruct a firewall (iptables/ebtable/pf/iwpf/Cisco/ # Checkpoint/etc) to firewall off the source or destination. # # In order for Sagan to send a blocking request to the SnortSam agent, # that agent has to be listed, including the port it listens on, # and the encryption key it is using. The statement for that is: # # output alert_fwsam: {SnortSam Station}:{port}/{password} # # {SnortSam Station}: IP address or host name of the host where SnortSam is running. # {port}: The port the remote SnortSam agent listens on. # {password}: The password, or key, used for encryption of the # communication to the remote agent. # # At the very least, the IP address or host name of the host running SnortSam # needs to be specified. If the port is omitted, it defaults to TCP port 898. # If the password is omitted, it defaults to a preset password. # (In which case it needs to be omitted on the SnortSam agent as well) # # More than one host can be specified, but has to be done on the same line. # Just separate them with one or more spaces. # # Examples: # # output alert_fwsam: firewall/idspassword # output alert_fwsam: fw1.domain.tld:898/mykey # output alert_fwsam: 192.168.0.1/borderfw 192.168.1.254/wanfw ; output alert_fwsam: 127.0.0.1/mypassword ############################################################################# # Sagan syslog output ############################################################################# # This allows Sagan to send alerts to syslog. The syslog output format used # is exactly the same of Snorts. This means that your SIEMs Snort log # parsers should work with Sagan. # # output syslog: {facility} {priority} {syslog options} # # Facilities: LOG_AUTH, LOG_AUTHPRIV, LOG_CRON, LOG_DAEMON, LOG_FTP, # LOG_INSTALL, LOG_KERN, LOG_LPR, LOG_MAIL, LOG_NETINFO, LOG_RAS, # LOG_REMOTEAUTH, LOG_NEWS, LOG_SYSLOG, LOG_USER, LOG_UUCP, LOG_LOCAL0, # LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6, # LOG_LOCAL7. # # Priorities: LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, # LOG_NOTICE, LOG_INFO, LOG_DEBUG. # # Syslog options: LOG_CONS, LOG_NDELAY, LOG_PERROR, LOG_PID, LOG_NOWAIT. # # Default: LOG_AUTH LOG_ALERT LOG_PID # # For more information, see: # # https://quadrantsec.com/about/blog/sagan_output_to_other_siems/ ; output syslog: LOG_AUTH LOG_ALERT ############################################################################## # Sagan rule sets! Arrgh Villains! Sagan neither takes nor gives mercy! ############################################################################## # This should be enabled! "classifications.config" allows correlation between # a short name (for example, "attempted-admin") and a priority level # (for example, "1"). "reference.config" gives your various places to learn # more information pertaining to an alert. include $RULE_PATH/classification.config include $RULE_PATH/reference.config include $RULE_PATH/gen-msg.map include $RULE_PATH/protocol.map ############################################################################# # Sagan normalization 'rule base'. (liblognorm) ############################################################################# # Master normalization file for liblognorm. normalize_file: $RULE_PATH/normalization.rulebase ############################################################################# # GeoIP Sagan rule sets ############################################################################# # These rules rely on GeoIP information in order to function. This means that # Sagan needs to be compiled with Maxmind GeoIP support. Otherwise these # rules will not function. #include $RULE_PATH/cisco-geoip.rules #include $RULE_PATH/fatpipe-geoip.rules #include $RULE_PATH/fortinet-geoip.rules #include $RULE_PATH/imapd-geoip.rules #include $RULE_PATH/juniper-geoip.rules #include $RULE_PATH/openssh-geoip.rules #include $RULE_PATH/proftpd-geoip.rules #include $RULE_PATH/riverbed-geoip.rules #include $RULE_PATH/snort-geoip.rules #include $RULE_PATH/ssh-tectia-server-geoip.rules #include $RULE_PATH/windows-geoip.rules #include $RULE_PATH/citrix-geoip.rules #include $RULE_PATH/courier-geoip.rules #include $RULE_PATH/riverbed-geoip.rules #include $RULE_PATH/vmware-geoip.rules #include $RULE_PATH/vsftpd-geoip.rules #include $RULE_PATH/windows-owa-geoip.rules ############################################################################# # Aetas Sagan rule sets ############################################################################# # These rules are "time sensitive". The rules detect what would be # normal events at abnormal times. For example, a Windows RDP sessions # at 3:00 AM might be considered suspicious. #include $RULE_PATH/cisco-aetas.rules #include $RULE_PATH/fatpipe-aetas.rules #include $RULE_PATH/fortinet-aetas.rules #include $RULE_PATH/juniper-aetas.rules #include $RULE_PATH/openssh-aetas.rules #include $RULE_PATH/proftpd-aetas.rules #include $RULE_PATH/riverbed-aetas.rules #include $RULE_PATH/ssh-tectia-server-aetas.rules #include $RULE_PATH/windows-aetas.rules ############################################################################# # Correlated rules ############################################################################# # These are rules that depend on flowbit and more than one event to occur # before they are triggered. You can think of these as "if A, B and C # events happen, let's sound the alarm!". #include $RULE_PATH/cisco-correlated.rules #include $RULE_PATH/citrix-correlated.rules #include $RULE_PATH/courier-correlated.rules #include $RULE_PATH/fatpipe-correlated.rules #include $RULE_PATH/fortinet-correlated.rules #include $RULE_PATH/imapd-correlated.rules #include $RULE_PATH/openssh-correlated.rules #include $RULE_PATH/ssh-tectia-server-correlated.rules #include $RULE_PATH/vmware-correlated.rules #include $RULE_PATH/vsftpd-correlated.rules #include $RULE_PATH/windows-correlated.rules #include $RULE_PATH/windows-owa-correlated.rules ############################################################################# # Standard Sagan rule sets ############################################################################# # These are the specific rule sets of events which are of interest and require # notification. Tailor these to your specific needs and check from time to # time for new rule sets that might be of benefit. # # It is _UNLIKELY_ you want to have _ALL_ rules enabled! include $RULE_PATH/adtran.rules include $RULE_PATH/apache.rules include $RULE_PATH/apc-emu.rules include $RULE_PATH/arp.rules include $RULE_PATH/artillery.rules include $RULE_PATH/asterisk.rules include $RULE_PATH/attack.rules include $RULE_PATH/bash.rules include $RULE_PATH/bind.rules include $RULE_PATH/blacklist.rules include $RULE_PATH/bluedot.rules include $RULE_PATH/bonding.rules include $RULE_PATH/bro-ids.rules include $RULE_PATH/bro-intel.rules include $RULE_PATH/cacti-thold.rules include $RULE_PATH/cisco-acs.rules include $RULE_PATH/cisco-blacklist.rules include $RULE_PATH/cisco-brointel.rules include $RULE_PATH/cisco-cucm.rules include $RULE_PATH/cisco-ios.rules include $RULE_PATH/cisco-malware.rules include $RULE_PATH/cisco-pixasa.rules include $RULE_PATH/cisco-prime.rules include $RULE_PATH/cisco-sdee.rules include $RULE_PATH/cisco-wlc.rules include $RULE_PATH/citrix-blacklist.rules include $RULE_PATH/citrix-bluedot.rules include $RULE_PATH/citrix-brointel.rules include $RULE_PATH/citrix.rules include $RULE_PATH/courier.rules include $RULE_PATH/cylance.rules include $RULE_PATH/deleted.rules include $RULE_PATH/digitalpersona.rules include $RULE_PATH/dovecot.rules include $RULE_PATH/fatpipe.rules include $RULE_PATH/fortinet-malware.rules include $RULE_PATH/fortinet.rules include $RULE_PATH/ftpd.rules include $RULE_PATH/grsec.rules include $RULE_PATH/honeyd.rules include $RULE_PATH/hordeimp.rules include $RULE_PATH/hostapd.rules include $RULE_PATH/huawei.rules include $RULE_PATH/imapd.rules include $RULE_PATH/ipop3d.rules include $RULE_PATH/juniper.rules include $RULE_PATH/kismet.rules include $RULE_PATH/knockd.rules include $RULE_PATH/linux-kernel.rules include $RULE_PATH/milter.rules include $RULE_PATH/mongodb.rules include $RULE_PATH/mysql.rules include $RULE_PATH/nexpose.rules include $RULE_PATH/nfcapd-malware.rules include $RULE_PATH/nfcapd.rules include $RULE_PATH/nginx.rules include $RULE_PATH/ntp.rules include $RULE_PATH/openssh.rules include $RULE_PATH/openvpn.rules include $RULE_PATH/oracle.rules include $RULE_PATH/ossec-mi.rules include $RULE_PATH/ossec.rules include $RULE_PATH/php.rules include $RULE_PATH/postfix.rules include $RULE_PATH/postgresql.rules include $RULE_PATH/pptp.rules include $RULE_PATH/procurve.rules include $RULE_PATH/proftpd.rules include $RULE_PATH/proxy-malware.rules include $RULE_PATH/pure-ftpd.rules include $RULE_PATH/racoon.rules include $RULE_PATH/riverbed.rules include $RULE_PATH/roundcube.rules include $RULE_PATH/rsync.rules include $RULE_PATH/samba.rules include $RULE_PATH/sendmail.rules include $RULE_PATH/snort.rules include $RULE_PATH/solaris.rules include $RULE_PATH/sonicwall.rules include $RULE_PATH/squid.rules include $RULE_PATH/ssh-tectia-server.rules include $RULE_PATH/su.rules include $RULE_PATH/symantec-ems.rules include $RULE_PATH/syslog.rules include $RULE_PATH/tcp.rules include $RULE_PATH/telnet.rules include $RULE_PATH/tripwire.rules include $RULE_PATH/vmpop3d.rules include $RULE_PATH/vmware.rules include $RULE_PATH/vpopmail.rules include $RULE_PATH/vsftpd.rules include $RULE_PATH/web-attack.rules include $RULE_PATH/weblabrinth.rules include $RULE_PATH/windows-applocker.rules include $RULE_PATH/windows-auth.rules include $RULE_PATH/windows-blacklist.rules include $RULE_PATH/windows-bluedot.rules include $RULE_PATH/windows-brointel.rules include $RULE_PATH/windows-emet.rules include $RULE_PATH/windows-malware.rules include $RULE_PATH/windows-misc.rules include $RULE_PATH/windows-mssql.rules include $RULE_PATH/windows-owa-blacklist.rules include $RULE_PATH/windows-owa-bluedot.rules include $RULE_PATH/windows-owa-brointel.rules include $RULE_PATH/windows-owa.rules include $RULE_PATH/windows.rules include $RULE_PATH/wordpress.rules include $RULE_PATH/xinetd.rules include $RULE_PATH/zeus.rules sagan-1.1.2/etc/sagan.80000644000175000017500000000502012770372750013512 0ustar champchamp.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH SAGAN 8 "April 15, 2012" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME sagan \- Real-time System & Event Log Monitoring System .SH SYNOPSIS .B sagan .RI [ options ] .br .SH DESCRIPTION This manual page documents briefly the .B sagan command. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBsagan\fP is a multi-threaded, real time system- and event-log monitoring system, but with a twist. Sagan uses a "Snort" like rule set for detecting malicious events happening on your network and/or computer systems. .br If Sagan detects a potentially bad event, that event can be stored to a Snort database (MySQL/PostgreSQL), send it to a SIEM tool like Prelude, or send an email. .br Sagan is meant to be used in a "centralized" logging environment, but will work fine as part of a standalone Host IDS system for workstations. .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .B \-h, \-\-help Show summary of options. .TP .B \-d, \-\-debug [option] Enable debugging. Options are syslog, load, fwsam, sql, smtp, normalize and plog .TP .B \-D, \-\-daemon Make process a daemon (fork to the background) .TP .B \-u, \-\-user [username] Run as user (defaults to 'sagan') .TP .B \-c, \-\-chroot [directory] Chroots the Sagan process to the specified directory .TP .B \-f, \-\-config [file] Sagan configuration file to load .TP .B \-F, \-\-file [file] Sagan FIFO over ride. This forces Sagan to read from a FILE rather than a FIFO. The FILE needs to be in the Sagan format! .TP .B \-l, \-\-log [file] Set log file locaton and name. .SH AUTHOR Sagan was written by Champ Clark III .PP This manual page was written by Pierre Chifflier , for the Debian project (and may be used by others). sagan-1.1.2/config.sub0000755000175000017500000010577512770373007013556 0ustar champchamp#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-09-11' # 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 # the Free Software Foundation; either version 3 of the License, 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # 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* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -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 | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) 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 ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; 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 ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) 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 ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | 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 | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; 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 ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; 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 ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -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|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: sagan-1.1.2/config.h.in0000644000175000017500000002400612770373006013600 0ustar champchamp/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Sagan configuration file */ #undef CONFIG_FILE_PATH /* Define to 1 if you have the `access' function. */ #undef HAVE_ACCESS /* Support Altivec instructions */ #undef HAVE_ALTIVEC /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Support AVX (Advanced Vector Extensions) instructions */ #undef HAVE_AVX /* Define to 1 if you have the `connect' function. */ #undef HAVE_CONNECT /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the header file. */ #undef HAVE_DNET_H /* Define to 1 if you have the header file. */ #undef HAVE_DUMBNET_H /* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* F_GETPIPE_SZ is supported */ #undef HAVE_GETPIPE_SZ /* Define to 1 if you have the `htons' function. */ #undef HAVE_HTONS /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `curl' library (-lcurl). */ #undef HAVE_LIBCURL /* Define to 1 if you have the `dnet' library (-ldnet). */ #undef HAVE_LIBDNET /* Define to 1 if you have the `dumbnet' library (-ldumbnet). */ #undef HAVE_LIBDUMBNET /* Define to 1 if you have the `esmtp' library (-lesmtp). */ #undef HAVE_LIBESMTP /* Define to 1 if you have the `estr' library (-lestr). */ #undef HAVE_LIBESTR /* Define to 1 if you have the `lognorm' library (-llognorm). */ #undef HAVE_LIBLOGNORM /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `maxminddb' library (-lmaxminddb). */ #undef HAVE_LIBMAXMINDDB /* Define to 1 if you have the `pcap' library (-lpcap). */ #undef HAVE_LIBPCAP /* Define to 1 if you have the `pcre' library (-lpcre). */ #undef HAVE_LIBPCRE /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mmap' function. */ #undef HAVE_MMAP /* Support mmx instructions */ #undef HAVE_MMX /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_PCRE_H /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `recv' function. */ #undef HAVE_RECV /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `send' function. */ #undef HAVE_SEND /* F_SETPIPE_SZ is supported */ #undef HAVE_SETPIPE_SZ /* Define to 1 if you have the `shm_open' function. */ #undef HAVE_SHM_OPEN /* Define to 1 if you have the `sizeof' function. */ #undef HAVE_SIZEOF /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Support SSE (Streaming SIMD Extensions) instructions */ #undef HAVE_SSE /* Support SSE2 (Streaming SIMD Extensions 2) instructions */ #undef HAVE_SSE2 /* Support SSE3 (Streaming SIMD Extensions 3) instructions */ #undef HAVE_SSE3 /* Support SSSE4.1 (Streaming SIMD Extensions 4.1) instructions */ #undef HAVE_SSE4_1 /* Support SSSE4.2 (Streaming SIMD Extensions 4.2) instructions */ #undef HAVE_SSE4_2 /* Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions */ #undef HAVE_SSSE3 /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcmp' function. */ #undef HAVE_STRCMP /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* 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 header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcat' function. */ #undef HAVE_STRLCAT /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strlen' function. */ #undef HAVE_STRLEN /* Define to 1 if you have the `strncat' function. */ #undef HAVE_STRNCAT /* Define to 1 if you have the `strspn' function. */ #undef HAVE_STRSPN /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAP_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if you have the `write' function. */ #undef HAVE_WRITE /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* With Bluedot */ #undef WITH_BLUEDOT /* With Snortsam */ #undef WITH_SNORTSAM /* With Syslog */ #undef WITH_SYSLOG /* With system strstr */ #undef WITH_SYSSTRSTR /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `int' if does not define. */ #undef pid_t /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork sagan-1.1.2/autom4te.cache/0000755000175000017500000000000012770373007014360 5ustar champchampsagan-1.1.2/autom4te.cache/output.20000644000175000017500000113567212770373007016022 0ustar champchamp@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.69. @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @%:@ @%:@ @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="src" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBLOGNORM_LIBS LIBLOGNORM_CFLAGS LIBESTR_LIBS LIBESTR_CFLAGS LIBFASTJSON_LIBS LIBFASTJSON_CFLAGS am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS SIMD_FLAGS LIB@&t@OBJS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM VERSION ENDIAN MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_snortsam enable_bluedot enable_esmtp enable_geoip2 enable_syslog enable_system_strstr with_esmtp_includes with_esmtp_libraries with_geoip2_includes with_geoip2_libraries enable_lognorm with_lognorm_includes with_lognorm_libraries enable_libfastjson with_libfastjson_includes with_libfastjson_c_libraries enable_libpcap with_libpcap_includes with_libpcap_libraries enable_libdnet with_libdnet_includes with_libdnet_libraries enable_dependency_tracking enable_silent_rules ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR CCAS CCASFLAGS LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS LIBESTR_CFLAGS LIBESTR_LIBS LIBLOGNORM_CFLAGS LIBLOGNORM_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @<:@@S|@ac_default_prefix@:>@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX @<:@PREFIX@:>@ By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-snortsam Disable Snortsam support. --enable-bluedot Enable Quadrant\'s "Bluedot" lookups. --enable-esmtp Enable libesmtp support. --enable-geoip2 Enable Maxmind GeoIP2 support. --disable-syslog Disable syslog support. --enable-system-strstr Enable system strstr. --disable-lognorm Disable Lognorm (liblognorm) support. --disable-libfastjson Disable libfastjson support. --disable-libpcap Disable libpcap (plog) support. --disable-libdnet Disable libdnet (unified2) support. --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-esmtp-includes=DIR libesmtp include directory --with-esmtp-libraries=DIR libesmtp library directory --with-geoip2-includes=DIR Maxmind GeoIP2 include directory --with-geoip2-libraries=DIR Maxmind GeoIP2 library directory --with-lognorm-includes=DIR liblognorm include directory --with-lognorm-libraries=DIR liblognorm library directory --with-libfastjson-includes=DIR libfastjson include directory --with-libfastjson-libraries=DIR libfastjson library directory --with-libpcap-includes=DIR libpcap include directory --with-libpcap-libraries=DIR libpcap library directory --with-libdnet-includes=DIR libdnet include directory --with-libdnet-libraries=DIR libdnet library directory Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) LIBFASTJSON_CFLAGS C compiler flags for LIBFASTJSON, overriding pkg-config LIBFASTJSON_LIBS linker flags for LIBFASTJSON, overriding pkg-config LIBESTR_CFLAGS C compiler flags for LIBESTR, overriding pkg-config LIBESTR_LIBS linker flags for LIBESTR, overriding pkg-config LIBLOGNORM_CFLAGS C compiler flags for LIBLOGNORM, overriding pkg-config LIBLOGNORM_LIBS linker flags for LIBLOGNORM, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile @%:@ ac_fn_c_try_cpp LINENO @%:@ ---------------------- @%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_cpp @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using @%:@ the include files in INCLUDES and setting the cache variable VAR @%:@ accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_mongrel @%:@ ac_fn_c_try_run LINENO @%:@ ---------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes @%:@ that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_run @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists and can be compiled using the include files in @%:@ INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_compile @%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES @%:@ -------------------------------------------- @%:@ Tries to find the compile-time value of EXPR in a program that includes @%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be @%:@ computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) < 0)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in @%:@(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } @%:@include @%:@include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link @%:@ ac_fn_c_check_func LINENO FUNC VAR @%:@ ---------------------------------- @%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_func @%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES @%:@ ------------------------------------------- @%:@ Tests whether TYPE exists after having included INCLUDES, setting cache @%:@ variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in @%:@(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "@%:@define _POSIX_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "@%:@define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "@%:@define __EXTENSIONS__ 1" >>confdefs.h $as_echo "@%:@define _ALL_SOURCE 1" >>confdefs.h $as_echo "@%:@define _GNU_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "@%:@define _TANDEM_SOURCE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } @%:@ Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE #VERSION=`cat $srcdir/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'` VERSION=`cat src/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) ENDIAN=big ;; #( no) ENDIAN=little ;; #( universal) $as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac @%:@ Check whether --enable-snortsam was given. if test "${enable_snortsam+set}" = set; then : enableval=$enable_snortsam; SNORTSAM="$enableval" else SNORTSAM="yes" fi @%:@ Check whether --enable-bluedot was given. if test "${enable_bluedot+set}" = set; then : enableval=$enable_bluedot; BLUEDOT="$enableval" else BLUEDOT="no" fi @%:@ Check whether --enable-esmtp was given. if test "${enable_esmtp+set}" = set; then : enableval=$enable_esmtp; ESMTP="$enableval" else ESMTP="no" fi @%:@ Check whether --enable-geoip2 was given. if test "${enable_geoip2+set}" = set; then : enableval=$enable_geoip2; GEOIP2="$enableval" else GEOIP2="no" fi @%:@ Check whether --enable-syslog was given. if test "${enable_syslog+set}" = set; then : enableval=$enable_syslog; SYSLOG="$enableval" else SYSLOG="yes" fi @%:@ Check whether --enable-system-strstr was given. if test "${enable_system_strstr+set}" = set; then : enableval=$enable_system_strstr; SYSSTRSTR="$enableval" else SYSSTRSTR="no" fi @%:@ Check whether --with-esmtp_includes was given. if test "${with_esmtp_includes+set}" = set; then : withval=$with_esmtp_includes; with_esmtp_includes="$withval" else with_esmtp_includes="no" fi @%:@ Check whether --with-esmtp_libraries was given. if test "${with_esmtp_libraries+set}" = set; then : withval=$with_esmtp_libraries; with_esmtp_libraries="$withval" else with_esmtp_libraries="no" fi if test "x$with_esmtp_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_esmtp_includes}" fi if test "x$with_esmtp_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_esmtp_libraries}" fi @%:@ Check whether --with-geoip2_includes was given. if test "${with_geoip2_includes+set}" = set; then : withval=$with_geoip2_includes; with_geoip2_includes="$withval" else with_geoip2_includes="no" fi @%:@ Check whether --with-geoip2_libraries was given. if test "${with_geoip2_libraries+set}" = set; then : withval=$with_geoip2_libraries; with_geoip2_libraries="$withval" else with_geoip2_libraries="no" fi if test "x$with_geoip2_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_geoip2_includes}" fi if test "x$with_geoip2_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_geoip2_libraries}" fi @%:@ Check whether --enable-lognorm was given. if test "${enable_lognorm+set}" = set; then : enableval=$enable_lognorm; LOGNORM="$enableval" else LOGNORM="yes" fi @%:@ Check whether --with-lognorm_includes was given. if test "${with_lognorm_includes+set}" = set; then : withval=$with_lognorm_includes; with_lognorm_includes="$withval" else with_lognorm_includes="no" fi @%:@ Check whether --with-lognorm_libraries was given. if test "${with_lognorm_libraries+set}" = set; then : withval=$with_lognorm_libraries; with_lognorm_libraries="$withval" else with_lognorm_libraries="no" fi if test "x$with_lognorm_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_lognorm_includes}" fi if test "x$with_lognorm_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_lognorm_libraries}" fi # -- @%:@ Check whether --enable-libfastjson was given. if test "${enable_libfastjson+set}" = set; then : enableval=$enable_libfastjson; FASTJSON="$enableval" else FASTJSON="yes" fi @%:@ Check whether --with-libfastjson_includes was given. if test "${with_libfastjson_includes+set}" = set; then : withval=$with_libfastjson_includes; with_libfastjson_includes="$withval" else with_libfastjson_includes="no" fi @%:@ Check whether --with-libfastjson_c_libraries was given. if test "${with_libfastjson_c_libraries+set}" = set; then : withval=$with_libfastjson_c_libraries; with_libfastjson_libraries="$withval" else with_libfastjson_libraries="no" fi if test "x$with_libfastjson_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libfastjson_includes}" fi if test "x$with_libfastjson_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libfastjson_libraries}" fi # -- @%:@ Check whether --enable-libpcap was given. if test "${enable_libpcap+set}" = set; then : enableval=$enable_libpcap; LIBPCAP="$enableval" else LIBPCAP="no" fi @%:@ Check whether --with-libpcap_includes was given. if test "${with_libpcap_includes+set}" = set; then : withval=$with_libpcap_includes; with_libpcap_includes="$withval" else with_libpcap_includes="no" fi @%:@ Check whether --with-libpcap_libraries was given. if test "${with_libpcap_libraries+set}" = set; then : withval=$with_libpcap_libraries; with_libpcap_libraries="$withval" else with_libpcap_libraries="no" fi if test "x$with_libpcap_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libpcap_includes}" fi if test "x$with_libpcap_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libpcap_libraries}" fi @%:@ Check whether --enable-libdnet was given. if test "${enable_libdnet+set}" = set; then : enableval=$enable_libdnet; LIBDNET="$enableval" else LIBDNET="yes" fi @%:@ Check whether --with-libdnet_includes was given. if test "${with_libdnet_includes+set}" = set; then : withval=$with_libdnet_includes; with_libdnet_includes="$withval" else with_libdnet_includes="no" fi @%:@ Check whether --with-libdnet_libraries was given. if test "${with_libdnet_libraries+set}" = set; then : withval=$with_libdnet_libraries; with_libdnet_libraries="$withval" else with_libdnet_libraries="no" fi if test "x$with_libdnet_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libdnet_includes}" fi if test "x$with_libdnet_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libdnet_libraries}" fi am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in @%:@(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } 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. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf @%:@ Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi @%:@ Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi 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=sagan VERSION=${VERSION} cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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 cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers config.h" # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "@%:@define HAVE_SYS_WAIT_H 1" >>confdefs.h fi for ac_header in stdio.h stdlib.h sys/types.h unistd.h stdint.h inttypes.h pthread.h ctype.h errno.h fcntl.h sys/stat.h string.h getopt.h time.h pcre.h stdarg.h limits.h stdbool.h arpa/inet.h netinet/in.h sys/time.h sys/socket.h sys/mmap.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 $as_echo "$ac_cv_sizeof_size_t" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF # F_SETPIPE_SZ in fcntl.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_SETPIPE_SZ in fcntl.h" >&5 $as_echo_n "checking for F_SETPIPE_SZ in fcntl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GNU_SOURCE #include #ifdef F_SETPIPE_SZ yes_have_f_setpipe_sz #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes_have_f_setpipe_sz" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "@%:@define HAVE_SETPIPE_SZ /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: F_SETPIPE_SZ not found, cannot alter FIFO" >&5 $as_echo "$as_me: F_SETPIPE_SZ not found, cannot alter FIFO" >&6;} fi rm -f conftest* # F_GETPIPE_SZ in fcntl.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_GETPIPE_SZ in fcntl.h" >&5 $as_echo_n "checking for F_GETPIPE_SZ in fcntl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GNU_SOURCE #include #ifdef F_GETPIPE_SZ yes_have_f_getpipe_sz #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes_have_f_getpipe_sz" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "@%:@define HAVE_GETPIPE_SZ /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: F_GETPIPE_SZ not found, cannot alter FIFO" >&5 $as_echo "$as_me: F_GETPIPE_SZ not found, cannot alter FIFO" >&6;} fi rm -f conftest* # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "@%:@define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "@%:@define TIME_WITH_SYS_TIME 1" >>confdefs.h fi # Checks for library functions. if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "@%:@define HAVE_MALLOC 1" >>confdefs.h else $as_echo "@%:@define HAVE_MALLOC 0" >>confdefs.h case " $LIB@&t@OBJS " in *" malloc.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS malloc.$ac_objext" ;; esac $as_echo "@%:@define malloc rpl_malloc" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$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 _ACEOF cat >>confdefs.h <<_ACEOF @%:@define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF @%:@define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF @%:@define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIB@&t@OBJS " in *" lstat.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIB@&t@OBJS " in *" stat.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF @%:@define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF @%:@define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STRFTIME 1 _ACEOF else # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strftime (); int main () { return strftime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_strftime=yes else ac_cv_lib_intl_strftime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "@%:@define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi fi done ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "@%:@define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "@%:@define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "@%:@define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "@%:@define HAVE_REALLOC 1" >>confdefs.h else $as_echo "@%:@define HAVE_REALLOC 0" >>confdefs.h case " $LIB@&t@OBJS " in *" realloc.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS realloc.$ac_objext" ;; esac $as_echo "@%:@define realloc rpl_realloc" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "@%:@define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid output" >&5 $as_echo_n "checking for x86 cpuid output... " >&6; } if ${ax_cv_gcc_x86_cpuid_+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = , eax, ebx, ecx, edx; FILE *f; __asm__("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-AVX xgetbv output" >&5 $as_echo_n "checking for x86-AVX xgetbv output... " >&6; } if ${ax_cv_gcc_x86_avx_xgetbv_+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_avx_xgetbv_=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = , eax, edx; FILE *f; /* Opcodes for xgetbv */ __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (eax), "=d" (edx) : "c" (op)); f = fopen("conftest_xgetbv", "w"); if (!f) return 1; fprintf(f, "%x:%x\n", eax, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_avx_xgetbv_=`cat conftest_xgetbv`; rm -f conftest_xgetbv else ax_cv_gcc_x86_avx_xgetbv_=unknown; rm -f conftest_xgetbv fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_avx_xgetbv_" >&5 $as_echo "$ax_cv_gcc_x86_avx_xgetbv_" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu case $host_cpu in powerpc*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether altivec is supported" >&5 $as_echo_n "checking whether altivec is supported... " >&6; } if ${ax_cv_have_altivec_ext+:} false; then : $as_echo_n "(cached) " >&6 else if test `/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.optional.altivec` != 0; then if test `/usr/sbin/sysctl -n hw.optional.altivec` = 1; then ax_cv_have_altivec_ext=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_altivec_ext" >&5 $as_echo "$ax_cv_have_altivec_ext" >&6; } if test "$ax_cv_have_altivec_ext" = yes; then $as_echo "@%:@define HAVE_ALTIVEC /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -faltivec" >&5 $as_echo_n "checking whether C compiler accepts -faltivec... " >&6; } if ${ax_cv_check_cflags___faltivec+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -faltivec" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___faltivec=yes else ax_cv_check_cflags___faltivec=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___faltivec" >&5 $as_echo "$ax_cv_check_cflags___faltivec" >&6; } if test x"$ax_cv_check_cflags___faltivec" = xyes; then : SIMD_FLAGS="$SIMD_FLAGS -faltivec" else : fi fi ;; i[3456]86*|x86_64*|amd64*) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0x00000001 output" >&5 $as_echo_n "checking for x86 cpuid 0x00000001 output... " >&6; } if ${ax_cv_gcc_x86_cpuid_0x00000001+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_0x00000001=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 0x00000001, eax, ebx, ecx, edx; FILE *f; __asm__("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_0x00000001=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_0x00000001=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0x00000001" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_0x00000001" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ecx=0 edx=0 if test "$ax_cv_gcc_x86_cpuid_0x00000001" != "unknown"; then ecx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 3` edx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 4` fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmx is supported" >&5 $as_echo_n "checking whether mmx is supported... " >&6; } if ${ax_cv_have_mmx_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_mmx_ext=no if test "$((0x$edx>>23&0x01))" = 1; then ax_cv_have_mmx_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_mmx_ext" >&5 $as_echo "$ax_cv_have_mmx_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse is supported" >&5 $as_echo_n "checking whether sse is supported... " >&6; } if ${ax_cv_have_sse_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse_ext=no if test "$((0x$edx>>25&0x01))" = 1; then ax_cv_have_sse_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse_ext" >&5 $as_echo "$ax_cv_have_sse_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse2 is supported" >&5 $as_echo_n "checking whether sse2 is supported... " >&6; } if ${ax_cv_have_sse2_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse2_ext=no if test "$((0x$edx>>26&0x01))" = 1; then ax_cv_have_sse2_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse2_ext" >&5 $as_echo "$ax_cv_have_sse2_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse3 is supported" >&5 $as_echo_n "checking whether sse3 is supported... " >&6; } if ${ax_cv_have_sse3_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse3_ext=no if test "$((0x$ecx&0x01))" = 1; then ax_cv_have_sse3_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse3_ext" >&5 $as_echo "$ax_cv_have_sse3_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ssse3 is supported" >&5 $as_echo_n "checking whether ssse3 is supported... " >&6; } if ${ax_cv_have_ssse3_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_ssse3_ext=no if test "$((0x$ecx>>9&0x01))" = 1; then ax_cv_have_ssse3_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_ssse3_ext" >&5 $as_echo "$ax_cv_have_ssse3_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse4.1 is supported" >&5 $as_echo_n "checking whether sse4.1 is supported... " >&6; } if ${ax_cv_have_sse41_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse41_ext=no if test "$((0x$ecx>>19&0x01))" = 1; then ax_cv_have_sse41_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse41_ext" >&5 $as_echo "$ax_cv_have_sse41_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse4.2 is supported" >&5 $as_echo_n "checking whether sse4.2 is supported... " >&6; } if ${ax_cv_have_sse42_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse42_ext=no if test "$((0x$ecx>>20&0x01))" = 1; then ax_cv_have_sse42_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse42_ext" >&5 $as_echo "$ax_cv_have_sse42_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether avx is supported by processor" >&5 $as_echo_n "checking whether avx is supported by processor... " >&6; } if ${ax_cv_have_avx_cpu_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_avx_cpu_ext=no if test "$((0x$ecx>>28&0x01))" = 1; then ax_cv_have_avx_cpu_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_avx_cpu_ext" >&5 $as_echo "$ax_cv_have_avx_cpu_ext" >&6; } if test x"$ax_cv_have_avx_cpu_ext" = x"yes"; then 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-AVX xgetbv 0x00000000 output" >&5 $as_echo_n "checking for x86-AVX xgetbv 0x00000000 output... " >&6; } if ${ax_cv_gcc_x86_avx_xgetbv_0x00000000+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_avx_xgetbv_0x00000000=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 0x00000000, eax, edx; FILE *f; /* Opcodes for xgetbv */ __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (eax), "=d" (edx) : "c" (op)); f = fopen("conftest_xgetbv", "w"); if (!f) return 1; fprintf(f, "%x:%x\n", eax, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_avx_xgetbv_0x00000000=`cat conftest_xgetbv`; rm -f conftest_xgetbv else ax_cv_gcc_x86_avx_xgetbv_0x00000000=unknown; rm -f conftest_xgetbv fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_avx_xgetbv_0x00000000" >&5 $as_echo "$ax_cv_gcc_x86_avx_xgetbv_0x00000000" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu xgetbv_eax="0" if test x"$ax_cv_gcc_x86_avx_xgetbv_0x00000000" != x"unknown"; then xgetbv_eax=`echo $ax_cv_gcc_x86_avx_xgetbv_0x00000000 | cut -d ":" -f 1` fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether avx is supported by operating system" >&5 $as_echo_n "checking whether avx is supported by operating system... " >&6; } if ${ax_cv_have_avx_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_avx_ext=no if test "$((0x$ecx>>27&0x01))" = 1; then if test "$((0x$xgetbv_eax&0x6))" = 6; then ax_cv_have_avx_ext=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_avx_ext" >&5 $as_echo "$ax_cv_have_avx_ext" >&6; } if test x"$ax_cv_have_avx_ext" = x"no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports AVX, but your operating system doesn't" >&5 $as_echo "$as_me: WARNING: Your processor supports AVX, but your operating system doesn't" >&2;} fi fi if test "$ax_cv_have_mmx_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mmmx" >&5 $as_echo_n "checking whether C compiler accepts -mmmx... " >&6; } if ${ax_cv_check_cflags___mmmx+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -mmmx" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___mmmx=yes else ax_cv_check_cflags___mmmx=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mmmx" >&5 $as_echo "$ax_cv_check_cflags___mmmx" >&6; } if test x"$ax_cv_check_cflags___mmmx" = xyes; then : ax_cv_support_mmx_ext=yes else : fi if test x"$ax_cv_support_mmx_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mmmx" $as_echo "@%:@define HAVE_MMX /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports mmx instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports mmx instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse" >&5 $as_echo_n "checking whether C compiler accepts -msse... " >&6; } if ${ax_cv_check_cflags___msse+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse=yes else ax_cv_check_cflags___msse=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse" >&5 $as_echo "$ax_cv_check_cflags___msse" >&6; } if test x"$ax_cv_check_cflags___msse" = xyes; then : ax_cv_support_sse_ext=yes else : fi if test x"$ax_cv_support_sse_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse" $as_echo "@%:@define HAVE_SSE /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse2_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse2" >&5 $as_echo_n "checking whether C compiler accepts -msse2... " >&6; } if ${ax_cv_check_cflags___msse2+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse2=yes else ax_cv_check_cflags___msse2=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse2" >&5 $as_echo "$ax_cv_check_cflags___msse2" >&6; } if test x"$ax_cv_check_cflags___msse2" = xyes; then : ax_cv_support_sse2_ext=yes else : fi if test x"$ax_cv_support_sse2_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse2" $as_echo "@%:@define HAVE_SSE2 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse2 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse2 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse3_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse3" >&5 $as_echo_n "checking whether C compiler accepts -msse3... " >&6; } if ${ax_cv_check_cflags___msse3+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse3=yes else ax_cv_check_cflags___msse3=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse3" >&5 $as_echo "$ax_cv_check_cflags___msse3" >&6; } if test x"$ax_cv_check_cflags___msse3" = xyes; then : ax_cv_support_sse3_ext=yes else : fi if test x"$ax_cv_support_sse3_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse3" $as_echo "@%:@define HAVE_SSE3 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse3 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse3 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_ssse3_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mssse3" >&5 $as_echo_n "checking whether C compiler accepts -mssse3... " >&6; } if ${ax_cv_check_cflags___mssse3+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -mssse3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___mssse3=yes else ax_cv_check_cflags___mssse3=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mssse3" >&5 $as_echo "$ax_cv_check_cflags___mssse3" >&6; } if test x"$ax_cv_check_cflags___mssse3" = xyes; then : ax_cv_support_ssse3_ext=yes else : fi if test x"$ax_cv_support_ssse3_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mssse3" $as_echo "@%:@define HAVE_SSSE3 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports ssse3 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports ssse3 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse41_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse4.1" >&5 $as_echo_n "checking whether C compiler accepts -msse4.1... " >&6; } if ${ax_cv_check_cflags___msse4_1+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse4.1" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse4_1=yes else ax_cv_check_cflags___msse4_1=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse4_1" >&5 $as_echo "$ax_cv_check_cflags___msse4_1" >&6; } if test x"$ax_cv_check_cflags___msse4_1" = xyes; then : ax_cv_support_sse41_ext=yes else : fi if test x"$ax_cv_support_sse41_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse4.1" $as_echo "@%:@define HAVE_SSE4_1 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse4.1 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse4.1 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse42_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse4.2" >&5 $as_echo_n "checking whether C compiler accepts -msse4.2... " >&6; } if ${ax_cv_check_cflags___msse4_2+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse4.2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse4_2=yes else ax_cv_check_cflags___msse4_2=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse4_2" >&5 $as_echo "$ax_cv_check_cflags___msse4_2" >&6; } if test x"$ax_cv_check_cflags___msse4_2" = xyes; then : ax_cv_support_sse42_ext=yes else : fi if test x"$ax_cv_support_sse42_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse4.2" $as_echo "@%:@define HAVE_SSE4_2 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse4.2 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse4.2 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_avx_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mavx" >&5 $as_echo_n "checking whether C compiler accepts -mavx... " >&6; } if ${ax_cv_check_cflags___mavx+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -mavx" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___mavx=yes else ax_cv_check_cflags___mavx=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mavx" >&5 $as_echo "$ax_cv_check_cflags___mavx" >&6; } if test x"$ax_cv_check_cflags___mavx" = xyes; then : ax_cv_support_avx_ext=yes else : fi if test x"$ax_cv_support_avx_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mavx" $as_echo "@%:@define HAVE_AVX /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports avx instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports avx instructions but not your compiler, can you try another compiler?" >&2;} fi fi ;; esac # By default we simply use the C compiler to build assembly code. test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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_CCAS_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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_CCAS_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CCAS_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then am__fastdepCCAS_TRUE= am__fastdepCCAS_FALSE='#' else am__fastdepCCAS_TRUE='#' am__fastdepCCAS_FALSE= fi for ac_func in select strstr strchr strcmp strlen sizeof write snprintf strncat strlcat strlcpy getopt_long gethostbyname socket htons connect send recv dup2 strspn strdup memset access ftruncate strerror mmap shm_open do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcre" >&5 $as_echo_n "checking for main in -lpcre... " >&6; } if ${ac_cv_lib_pcre_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcre $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcre_main=yes else ac_cv_lib_pcre_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_main" >&5 $as_echo "$ac_cv_lib_pcre_main" >&6; } if test "x$ac_cv_lib_pcre_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBPCRE 1 _ACEOF LIBS="-lpcre $LIBS" else as_fn_error $? "Sagan needs PCRE installed. Please see http://www.pcre.org." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5 $as_echo_n "checking for main in -lpthread... " >&6; } if ${ac_cv_lib_pthread_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_main=yes else ac_cv_lib_pthread_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5 $as_echo "$ac_cv_lib_pthread_main" >&6; } if test "x$ac_cv_lib_pthread_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" else as_fn_error $? "Sagan needs pthreads!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 $as_echo_n "checking for main in -lm... " >&6; } if ${ac_cv_lib_m_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_main=yes else ac_cv_lib_m_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 $as_echo "$ac_cv_lib_m_main" >&6; } if test "x$ac_cv_lib_m_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else as_fn_error $? "Sagan needs libm!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrt" >&5 $as_echo_n "checking for main in -lrt... " >&6; } if ${ac_cv_lib_rt_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_main=yes else ac_cv_lib_rt_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_main" >&5 $as_echo "$ac_cv_lib_rt_main" >&6; } if test "x$ac_cv_lib_rt_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" else as_fn_error $? "Sagan needs librt!" "$LINENO" 5 fi if test "$SYSSTRSTR" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using build in strstr()..." >&5 $as_echo "using build in strstr()..." >&6; } $as_echo "@%:@define WITH_SYSSTRSTR 1" >>confdefs.h fi if test "$SYSLOG" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Syslog support is enabled -------" >&5 $as_echo "------- Syslog support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : fi $as_echo "@%:@define WITH_SYSLOG 1" >>confdefs.h fi if test "$GEOIP2" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Maxmind GeoIP2 support is enabled -------" >&5 $as_echo "------- Maxmind GeoIP2 support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "maxminddb.h" "ac_cv_header_maxminddb_h" "$ac_includes_default" if test "x$ac_cv_header_maxminddb_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmaxminddb" >&5 $as_echo_n "checking for main in -lmaxminddb... " >&6; } if ${ac_cv_lib_maxminddb_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmaxminddb $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_maxminddb_main=yes else ac_cv_lib_maxminddb_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_maxminddb_main" >&5 $as_echo "$ac_cv_lib_maxminddb_main" >&6; } if test "x$ac_cv_lib_maxminddb_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBMAXMINDDB 1 _ACEOF LIBS="-lmaxminddb $LIBS" else as_fn_error $? "The Maxmind GeoIP2 library cannot be found. If you're not interested in GeoIP2 support use the --disable-geoip2 flag." "$LINENO" 5 fi fi if test "$ESMTP" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libesmtp support is enabled -------" >&5 $as_echo "------- libesmtp support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "libesmtp.h" "ac_cv_header_libesmtp_h" "$ac_includes_default" if test "x$ac_cv_header_libesmtp_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lesmtp" >&5 $as_echo_n "checking for main in -lesmtp... " >&6; } if ${ac_cv_lib_esmtp_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lesmtp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_esmtp_main=yes else ac_cv_lib_esmtp_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_esmtp_main" >&5 $as_echo "$ac_cv_lib_esmtp_main" >&6; } if test "x$ac_cv_lib_esmtp_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBESMTP 1 _ACEOF LIBS="-lesmtp $LIBS" else as_fn_error $? "The libesmtp library cannot be found. If you're not interested in libesmtp support use the --disable-esmtp flag." "$LINENO" 5 fi fi if test "$FASTJSON" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libfastjson support is enabled -------" >&5 $as_echo "------- libfastjson support is enabled -------" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi if test "$LOGNORM" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- liblognorm support is enabled -------" >&5 $as_echo "------- liblognorm support is enabled -------" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBESTR" >&5 $as_echo_n "checking for LIBESTR... " >&6; } if test -n "$LIBESTR_CFLAGS"; then pkg_cv_LIBESTR_CFLAGS="$LIBESTR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libestr >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libestr >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBESTR_CFLAGS=`$PKG_CONFIG --cflags "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBESTR_LIBS"; then pkg_cv_LIBESTR_LIBS="$LIBESTR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libestr >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libestr >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBESTR_LIBS=`$PKG_CONFIG --libs "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBESTR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libestr >= 0.0.0" 2>&1` else LIBESTR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libestr >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBESTR_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libestr >= 0.0.0) were not met: $LIBESTR_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBESTR_CFLAGS and LIBESTR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBESTR_CFLAGS and LIBESTR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBESTR_CFLAGS=$pkg_cv_LIBESTR_CFLAGS LIBESTR_LIBS=$pkg_cv_LIBESTR_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLOGNORM" >&5 $as_echo_n "checking for LIBLOGNORM... " >&6; } if test -n "$LIBLOGNORM_CFLAGS"; then pkg_cv_LIBLOGNORM_CFLAGS="$LIBLOGNORM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lognorm >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lognorm >= 1.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBLOGNORM_CFLAGS=`$PKG_CONFIG --cflags "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBLOGNORM_LIBS"; then pkg_cv_LIBLOGNORM_LIBS="$LIBLOGNORM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lognorm >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lognorm >= 1.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBLOGNORM_LIBS=`$PKG_CONFIG --libs "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBLOGNORM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lognorm >= 1.0.0" 2>&1` else LIBLOGNORM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lognorm >= 1.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBLOGNORM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (lognorm >= 1.0.0) were not met: $LIBLOGNORM_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBLOGNORM_CFLAGS and LIBLOGNORM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBLOGNORM_CFLAGS and LIBLOGNORM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBLOGNORM_CFLAGS=$pkg_cv_LIBLOGNORM_CFLAGS LIBLOGNORM_LIBS=$pkg_cv_LIBLOGNORM_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi ac_fn_c_check_header_mongrel "$LINENO" "liblognorm.h" "ac_cv_header_liblognorm_h" "$ac_includes_default" if test "x$ac_cv_header_liblognorm_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "libestr.h" "ac_cv_header_libestr_h" "$ac_includes_default" if test "x$ac_cv_header_libestr_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lestr" >&5 $as_echo_n "checking for main in -lestr... " >&6; } if ${ac_cv_lib_estr_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lestr $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_estr_main=yes else ac_cv_lib_estr_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_estr_main" >&5 $as_echo "$ac_cv_lib_estr_main" >&6; } if test "x$ac_cv_lib_estr_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBESTR 1 _ACEOF LIBS="-lestr $LIBS" else as_fn_error $? "The libestr library cannot be found. This library is important for the correlation aspects of Sagan! Please see https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature use the --disable-lognorm flag. " "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llognorm" >&5 $as_echo_n "checking for main in -llognorm... " >&6; } if ${ac_cv_lib_lognorm_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llognorm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lognorm_main=yes else ac_cv_lib_lognorm_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lognorm_main" >&5 $as_echo "$ac_cv_lib_lognorm_main" >&6; } if test "x$ac_cv_lib_lognorm_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBLOGNORM 1 _ACEOF LIBS="-llognorm $LIBS" else as_fn_error $? "The liblognorm library cannot be found. This library is important for the correlation aspects of Sagan! Please see https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature use the --disable-lognorm flag. " "$LINENO" 5 fi fi if test "$LIBPCAP" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libpcap support is enabled -------" >&5 $as_echo "------- libpcap support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "pcap.h" "ac_cv_header_pcap_h" "$ac_includes_default" if test "x$ac_cv_header_pcap_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default" if test "x$ac_cv_header_net_if_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "net/if_arp.h" "ac_cv_header_net_if_arp_h" "$ac_includes_default" if test "x$ac_cv_header_net_if_arp_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_systm_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_ip_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/udp.h" "ac_cv_header_netinet_udp_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_udp_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5 $as_echo_n "checking for main in -lpcap... " >&6; } if ${ac_cv_lib_pcap_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcap_main=yes else ac_cv_lib_pcap_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_main" >&5 $as_echo "$ac_cv_lib_pcap_main" >&6; } if test "x$ac_cv_lib_pcap_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBPCAP 1 _ACEOF LIBS="-lpcap $LIBS" else as_fn_error $? "The libpcap library cannot be found. This library is used to run Sagan in a syslog 'sniffer' mode. Please see https://wiki.quadrantsec.com/bin/view/Main/PLog. To disable this feature use the --disable-libpcap flag. " "$LINENO" 5 fi fi if test "$LIBDNET" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libdnet support is enabled -------" >&5 $as_echo "------- libdnet support is enabled -------" >&6; } for ac_header in dnet.h do : ac_fn_c_check_header_mongrel "$LINENO" "dnet.h" "ac_cv_header_dnet_h" "$ac_includes_default" if test "x$ac_cv_header_dnet_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_DNET_H 1 _ACEOF else DNET_H="no" fi done for ac_header in dumbnet.h do : ac_fn_c_check_header_mongrel "$LINENO" "dumbnet.h" "ac_cv_header_dumbnet_h" "$ac_includes_default" if test "x$ac_cv_header_dumbnet_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_DUMBNET_H 1 _ACEOF else DUMBNET_H="no" fi done if test "x$DNET_H" = "xno" -a "x$DUMBNET_H" = "xno"; then echo echo "The libdnet headers cannot be found. This library is used for Sagan's" echo "Unified2 output support. Please see:" echo "https://wiki.quadrantsec.com/bin/view/Main/Unified2Output" echo "To disable this feature use the --disable-libdnet flag." exit fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eth_set in -ldnet" >&5 $as_echo_n "checking for eth_set in -ldnet... " >&6; } if ${ac_cv_lib_dnet_eth_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char eth_set (); int main () { return eth_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_eth_set=yes else ac_cv_lib_dnet_eth_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_eth_set" >&5 $as_echo "$ac_cv_lib_dnet_eth_set" >&6; } if test "x$ac_cv_lib_dnet_eth_set" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBDNET 1 _ACEOF LIBS="-ldnet $LIBS" else DNET="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eth_set in -ldumbnet" >&5 $as_echo_n "checking for eth_set in -ldumbnet... " >&6; } if ${ac_cv_lib_dumbnet_eth_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldumbnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char eth_set (); int main () { return eth_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dumbnet_eth_set=yes else ac_cv_lib_dumbnet_eth_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dumbnet_eth_set" >&5 $as_echo "$ac_cv_lib_dumbnet_eth_set" >&6; } if test "x$ac_cv_lib_dumbnet_eth_set" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBDUMBNET 1 _ACEOF LIBS="-ldumbnet $LIBS" else DUMBNET="no" fi if test "x$DNET" = "xno" -a "x$DUMBNET" = "xno"; then echo echo "The libdnet headers cannot be found. This library is used for Sagan's" echo "Unified2 output support. Please see:" echo "https://wiki.quadrantsec.com/bin/view/Main/Unified2Output" echo "To disable this feature use the --disable-libdnet flag." exit fi fi if test "$BLUEDOT" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Quadrant \"Bluedot\" is enabled -------" >&5 $as_echo "------- Quadrant \"Bluedot\" is enabled -------" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5 $as_echo_n "checking for main in -lcurl... " >&6; } if ${ac_cv_lib_curl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curl_main=yes else ac_cv_lib_curl_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_main" >&5 $as_echo "$ac_cv_lib_curl_main" >&6; } if test "x$ac_cv_lib_curl_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBCURL 1 _ACEOF LIBS="-lcurl $LIBS" else as_fn_error $? "The libcurl library cannot be found. This library is used for Sagan's / \"Bluedot\" support. Please see https://quadrantsec.com for more information. To disable this feature use the --disable-bluedot flag. " "$LINENO" 5 fi $as_echo "@%:@define WITH_BLUEDOT 1" >>confdefs.h ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" if test "x$ac_cv_header_curl_curl_h" = xyes; then : fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi if test "$SNORTSAM" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Snortsam support is enabled -------" >&5 $as_echo "------- Snortsam support is enabled -------" >&6; } $as_echo "@%:@define WITH_SNORTSAM 1" >>confdefs.h fi test "x$prefix" = x. || test "x$prefix" = xNONE && prefix=/usr/local cat >>confdefs.h <<_ACEOF @%:@define CONFIG_FILE_PATH "`eval echo "${sysconfdir}/sagan.conf"`" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "sagan" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "Sagan $VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "cclark@quadrantsec.com" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "sagan" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$VERSION" _ACEOF ac_config_files="$ac_config_files Makefile src/Makefile" # AC_OUTPUT(Makefile) cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: ,-._,-. Sagan has been configured!" >&5 $as_echo " ,-._,-. Sagan has been configured!" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: \/)\"(\/ " >&5 $as_echo " \/)\"(\/ " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: (_o_) Champ Clark III & The Quadrant InfoSec Team [quadrantsec.com]" >&5 $as_echo " (_o_) Champ Clark III & The Quadrant InfoSec Team [quadrantsec.com]" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: / \/) Copyright (C) 2009-2016 Quadrant Information Security, et al." >&5 $as_echo " / \/) Copyright (C) 2009-2016 Quadrant Information Security, et al." >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: (|| ||) " >&5 $as_echo " (|| ||) " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: oo-oo " >&5 $as_echo " oo-oo " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } sagan-1.1.2/autom4te.cache/requests0000644000175000017500000003030412770373007016156 0ustar champchamp# This file was generated by Autom4te Sun Aug 31 17:43:43 UTC 2014. # It contains the lists of macros which have been traced. # It can be safely removed. @request = ( bless( [ '0', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', '-', '/usr/share/aclocal-1.14/internal/ac-config-macro-dirs.m4', '/usr/share/aclocal/pkg.m4', '/usr/share/aclocal-1.14/amversion.m4', '/usr/share/aclocal-1.14/as.m4', '/usr/share/aclocal-1.14/auxdir.m4', '/usr/share/aclocal-1.14/cond.m4', '/usr/share/aclocal-1.14/depend.m4', '/usr/share/aclocal-1.14/depout.m4', '/usr/share/aclocal-1.14/init.m4', '/usr/share/aclocal-1.14/install-sh.m4', '/usr/share/aclocal-1.14/lead-dot.m4', '/usr/share/aclocal-1.14/maintainer.m4', '/usr/share/aclocal-1.14/make.m4', '/usr/share/aclocal-1.14/missing.m4', '/usr/share/aclocal-1.14/options.m4', '/usr/share/aclocal-1.14/prog-cc-c-o.m4', '/usr/share/aclocal-1.14/runlog.m4', '/usr/share/aclocal-1.14/sanity.m4', '/usr/share/aclocal-1.14/silent.m4', '/usr/share/aclocal-1.14/strip.m4', '/usr/share/aclocal-1.14/substnot.m4', '/usr/share/aclocal-1.14/tar.m4', 'configure.ac' ], { 'AC_DEFUN' => 1, 'AC_CONFIG_MACRO_DIR' => 1, '_AC_AM_CONFIG_HEADER_HOOK' => 1, 'AM_SET_LEADING_DOT' => 1, 'PKG_PROG_PKG_CONFIG' => 1, 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, 'AM_PROG_INSTALL_SH' => 1, 'AM_RUN_LOG' => 1, 'AM_PROG_CC_C_O' => 1, 'PKG_CHECK_VAR' => 1, '_AM_IF_OPTION' => 1, 'PKG_CHECK_MODULES' => 1, 'AM_AUX_DIR_EXPAND' => 1, '_m4_warn' => 1, 'PKG_INSTALLDIR' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AM_MISSING_PROG' => 1, '_AM_SET_OPTIONS' => 1, 'm4_include' => 1, 'AM_SUBST_NOTMAKE' => 1, 'AM_DEP_TRACK' => 1, '_AM_DEPENDENCIES' => 1, '_AM_PROG_TAR' => 1, 'AM_MAINTAINER_MODE' => 1, 'AM_MAKE_INCLUDE' => 1, '_AM_SUBST_NOTMAKE' => 1, 'AM_PROG_INSTALL_STRIP' => 1, 'AM_SANITY_CHECK' => 1, '_AM_MANGLE_OPTION' => 1, 'AM_PROG_AS' => 1, 'PKG_NOARCH_INSTALLDIR' => 1, 'AC_DEFUN_ONCE' => 1, 'm4_pattern_allow' => 1, 'AM_CONDITIONAL' => 1, '_AM_SET_OPTION' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AM_SET_DEPDIR' => 1, '_AM_AUTOCONF_VERSION' => 1, 'AC_CONFIG_MACRO_DIR_TRACE' => 1, '_AM_PROG_CC_C_O' => 1, 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AU_DEFUN' => 1, 'PKG_CHECK_EXISTS' => 1, '_PKG_SHORT_ERRORS_SUPPORTED' => 1, 'include' => 1, 'AM_SILENT_RULES' => 1, 'm4_pattern_forbid' => 1, '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, '_AM_CONFIG_MACRO_DIRS' => 1, 'AM_MISSING_HAS_RUN' => 1 } ], 'Autom4te::Request' ), bless( [ '1', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', '-', '/usr/share/aclocal-1.14/internal/ac-config-macro-dirs.m4', '/usr/share/aclocal/pkg.m4', '/usr/share/aclocal-1.14/amversion.m4', '/usr/share/aclocal-1.14/as.m4', '/usr/share/aclocal-1.14/auxdir.m4', '/usr/share/aclocal-1.14/cond.m4', '/usr/share/aclocal-1.14/depend.m4', '/usr/share/aclocal-1.14/depout.m4', '/usr/share/aclocal-1.14/init.m4', '/usr/share/aclocal-1.14/install-sh.m4', '/usr/share/aclocal-1.14/lead-dot.m4', '/usr/share/aclocal-1.14/maintainer.m4', '/usr/share/aclocal-1.14/make.m4', '/usr/share/aclocal-1.14/missing.m4', '/usr/share/aclocal-1.14/options.m4', '/usr/share/aclocal-1.14/prog-cc-c-o.m4', '/usr/share/aclocal-1.14/runlog.m4', '/usr/share/aclocal-1.14/sanity.m4', '/usr/share/aclocal-1.14/silent.m4', '/usr/share/aclocal-1.14/strip.m4', '/usr/share/aclocal-1.14/substnot.m4', '/usr/share/aclocal-1.14/tar.m4', 'm4/ax_check_compile_flag.m4', 'm4/ax_ext.m4', 'm4/ax_gcc_x86_avx_xgetbv.m4', 'm4/ax_gcc_x86_cpuid.m4', 'configure.ac' ], { 'AX_EXT' => 1, 'AX_GCC_X86_CPUID' => 1, '_AM_SUBST_NOTMAKE' => 1, 'AM_SANITY_CHECK' => 1, 'AM_PROG_INSTALL_STRIP' => 1, 'AX_CHECK_COMPILE_FLAG' => 1, '_AM_MANGLE_OPTION' => 1, 'AM_MISSING_PROG' => 1, 'm4_include' => 1, '_AM_SET_OPTIONS' => 1, 'AM_SUBST_NOTMAKE' => 1, 'AM_MAKE_INCLUDE' => 1, '_AM_DEPENDENCIES' => 1, '_AM_PROG_TAR' => 1, 'AM_DEP_TRACK' => 1, 'AM_MAINTAINER_MODE' => 1, 'AM_AUX_DIR_EXPAND' => 1, '_m4_warn' => 1, 'PKG_CHECK_MODULES' => 1, '_AM_IF_OPTION' => 1, 'PKG_INSTALLDIR' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_CONFIG_MACRO_DIR' => 1, 'AC_DEFUN' => 1, 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, 'PKG_PROG_PKG_CONFIG' => 1, 'AM_SET_LEADING_DOT' => 1, '_AC_AM_CONFIG_HEADER_HOOK' => 1, 'AM_RUN_LOG' => 1, 'AM_PROG_INSTALL_SH' => 1, 'PKG_CHECK_VAR' => 1, 'AM_PROG_CC_C_O' => 1, 'm4_pattern_forbid' => 1, 'AM_SILENT_RULES' => 1, '_PKG_SHORT_ERRORS_SUPPORTED' => 1, 'include' => 1, 'AM_MISSING_HAS_RUN' => 1, '_AM_CONFIG_MACRO_DIRS' => 1, '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, '_AM_PROG_CC_C_O' => 1, 'PKG_CHECK_EXISTS' => 1, 'AU_DEFUN' => 1, 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AM_SET_DEPDIR' => 1, '_AM_AUTOCONF_VERSION' => 1, 'AC_CONFIG_MACRO_DIR_TRACE' => 1, 'AM_PROG_AS' => 1, 'PKG_NOARCH_INSTALLDIR' => 1, 'AC_DEFUN_ONCE' => 1, '_AM_SET_OPTION' => 1, 'm4_pattern_allow' => 1, 'AM_CONDITIONAL' => 1, 'AX_GCC_X86_AVX_XGETBV' => 1, 'AM_AUTOMAKE_VERSION' => 1 } ], 'Autom4te::Request' ), bless( [ '2', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', 'aclocal.m4', 'configure.ac' ], { 'AM_PROG_F77_C_O' => 1, 'AM_PROG_AR' => 1, 'AM_XGETTEXT_OPTION' => 1, 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, 'AC_REQUIRE_AUX_FILE' => 1, 'AM_PROG_CXX_C_O' => 1, 'AM_PATH_GUILE' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AM_POT_TOOLS' => 1, '_AM_COND_ELSE' => 1, 'm4_pattern_allow' => 1, 'AM_CONDITIONAL' => 1, 'AM_PROG_LIBTOOL' => 1, 'LT_INIT' => 1, 'AM_PROG_MOC' => 1, 'AC_FC_FREEFORM' => 1, 'AC_CONFIG_LINKS' => 1, 'AC_CANONICAL_BUILD' => 1, 'AM_SILENT_RULES' => 1, 'm4_pattern_forbid' => 1, 'include' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AM_PROG_FC_C_O' => 1, 'LT_CONFIG_LTDL_DIR' => 1, '_LT_AC_TAGCONFIG' => 1, 'AC_LIBSOURCE' => 1, '_AM_MAKEFILE_INCLUDE' => 1, 'sinclude' => 1, 'AC_CONFIG_FILES' => 1, 'AM_MAKEFILE_INCLUDE' => 1, '_AM_COND_IF' => 1, 'AC_SUBST_TRACE' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_CONFIG_HEADERS' => 1, '_m4_warn' => 1, 'AM_PROG_CC_C_O' => 1, 'AC_CANONICAL_TARGET' => 1, '_AM_COND_ENDIF' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AH_OUTPUT' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_FC_PP_DEFINE' => 1, 'AC_PROG_LIBTOOL' => 1, 'AC_INIT' => 1, 'AM_NLS' => 1, 'AC_FC_PP_SRCEXT' => 1, '_AM_SUBST_NOTMAKE' => 1, 'AC_CANONICAL_HOST' => 1, 'AM_MAINTAINER_MODE' => 1, 'AC_SUBST' => 1, 'm4_include' => 1, 'AM_EXTRA_RECURSIVE_TARGETS' => 1, 'LT_SUPPORTED_TAG' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'm4_sinclude' => 1, 'AC_FC_SRCEXT' => 1, 'AM_PROG_MKDIR_P' => 1 } ], 'Autom4te::Request' ) ); sagan-1.1.2/autom4te.cache/output.10000644000175000017500000113567212770373003016015 0ustar champchamp@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.69. @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @%:@ @%:@ @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="src" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBLOGNORM_LIBS LIBLOGNORM_CFLAGS LIBESTR_LIBS LIBESTR_CFLAGS LIBFASTJSON_LIBS LIBFASTJSON_CFLAGS am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS SIMD_FLAGS LIB@&t@OBJS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM VERSION ENDIAN MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_snortsam enable_bluedot enable_esmtp enable_geoip2 enable_syslog enable_system_strstr with_esmtp_includes with_esmtp_libraries with_geoip2_includes with_geoip2_libraries enable_lognorm with_lognorm_includes with_lognorm_libraries enable_libfastjson with_libfastjson_includes with_libfastjson_c_libraries enable_libpcap with_libpcap_includes with_libpcap_libraries enable_libdnet with_libdnet_includes with_libdnet_libraries enable_dependency_tracking enable_silent_rules ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR CCAS CCASFLAGS LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS LIBESTR_CFLAGS LIBESTR_LIBS LIBLOGNORM_CFLAGS LIBLOGNORM_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @<:@@S|@ac_default_prefix@:>@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX @<:@PREFIX@:>@ By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-snortsam Disable Snortsam support. --enable-bluedot Enable Quadrant\'s "Bluedot" lookups. --enable-esmtp Enable libesmtp support. --enable-geoip2 Enable Maxmind GeoIP2 support. --disable-syslog Disable syslog support. --enable-system-strstr Enable system strstr. --disable-lognorm Disable Lognorm (liblognorm) support. --disable-libfastjson Disable libfastjson support. --disable-libpcap Disable libpcap (plog) support. --disable-libdnet Disable libdnet (unified2) support. --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-esmtp-includes=DIR libesmtp include directory --with-esmtp-libraries=DIR libesmtp library directory --with-geoip2-includes=DIR Maxmind GeoIP2 include directory --with-geoip2-libraries=DIR Maxmind GeoIP2 library directory --with-lognorm-includes=DIR liblognorm include directory --with-lognorm-libraries=DIR liblognorm library directory --with-libfastjson-includes=DIR libfastjson include directory --with-libfastjson-libraries=DIR libfastjson library directory --with-libpcap-includes=DIR libpcap include directory --with-libpcap-libraries=DIR libpcap library directory --with-libdnet-includes=DIR libdnet include directory --with-libdnet-libraries=DIR libdnet library directory Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) LIBFASTJSON_CFLAGS C compiler flags for LIBFASTJSON, overriding pkg-config LIBFASTJSON_LIBS linker flags for LIBFASTJSON, overriding pkg-config LIBESTR_CFLAGS C compiler flags for LIBESTR, overriding pkg-config LIBESTR_LIBS linker flags for LIBESTR, overriding pkg-config LIBLOGNORM_CFLAGS C compiler flags for LIBLOGNORM, overriding pkg-config LIBLOGNORM_LIBS linker flags for LIBLOGNORM, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile @%:@ ac_fn_c_try_cpp LINENO @%:@ ---------------------- @%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_cpp @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using @%:@ the include files in INCLUDES and setting the cache variable VAR @%:@ accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_mongrel @%:@ ac_fn_c_try_run LINENO @%:@ ---------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes @%:@ that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_run @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists and can be compiled using the include files in @%:@ INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_compile @%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES @%:@ -------------------------------------------- @%:@ Tries to find the compile-time value of EXPR in a program that includes @%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be @%:@ computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) < 0)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in @%:@(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } @%:@include @%:@include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link @%:@ ac_fn_c_check_func LINENO FUNC VAR @%:@ ---------------------------------- @%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_func @%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES @%:@ ------------------------------------------- @%:@ Tests whether TYPE exists after having included INCLUDES, setting cache @%:@ variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in @%:@(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "@%:@define _POSIX_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "@%:@define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "@%:@define __EXTENSIONS__ 1" >>confdefs.h $as_echo "@%:@define _ALL_SOURCE 1" >>confdefs.h $as_echo "@%:@define _GNU_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "@%:@define _TANDEM_SOURCE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } @%:@ Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE #VERSION=`cat $srcdir/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'` VERSION=`cat src/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) ENDIAN=big ;; #( no) ENDIAN=little ;; #( universal) $as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac @%:@ Check whether --enable-snortsam was given. if test "${enable_snortsam+set}" = set; then : enableval=$enable_snortsam; SNORTSAM="$enableval" else SNORTSAM="yes" fi @%:@ Check whether --enable-bluedot was given. if test "${enable_bluedot+set}" = set; then : enableval=$enable_bluedot; BLUEDOT="$enableval" else BLUEDOT="no" fi @%:@ Check whether --enable-esmtp was given. if test "${enable_esmtp+set}" = set; then : enableval=$enable_esmtp; ESMTP="$enableval" else ESMTP="no" fi @%:@ Check whether --enable-geoip2 was given. if test "${enable_geoip2+set}" = set; then : enableval=$enable_geoip2; GEOIP2="$enableval" else GEOIP2="no" fi @%:@ Check whether --enable-syslog was given. if test "${enable_syslog+set}" = set; then : enableval=$enable_syslog; SYSLOG="$enableval" else SYSLOG="yes" fi @%:@ Check whether --enable-system-strstr was given. if test "${enable_system_strstr+set}" = set; then : enableval=$enable_system_strstr; SYSSTRSTR="$enableval" else SYSSTRSTR="no" fi @%:@ Check whether --with-esmtp_includes was given. if test "${with_esmtp_includes+set}" = set; then : withval=$with_esmtp_includes; with_esmtp_includes="$withval" else with_esmtp_includes="no" fi @%:@ Check whether --with-esmtp_libraries was given. if test "${with_esmtp_libraries+set}" = set; then : withval=$with_esmtp_libraries; with_esmtp_libraries="$withval" else with_esmtp_libraries="no" fi if test "x$with_esmtp_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_esmtp_includes}" fi if test "x$with_esmtp_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_esmtp_libraries}" fi @%:@ Check whether --with-geoip2_includes was given. if test "${with_geoip2_includes+set}" = set; then : withval=$with_geoip2_includes; with_geoip2_includes="$withval" else with_geoip2_includes="no" fi @%:@ Check whether --with-geoip2_libraries was given. if test "${with_geoip2_libraries+set}" = set; then : withval=$with_geoip2_libraries; with_geoip2_libraries="$withval" else with_geoip2_libraries="no" fi if test "x$with_geoip2_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_geoip2_includes}" fi if test "x$with_geoip2_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_geoip2_libraries}" fi @%:@ Check whether --enable-lognorm was given. if test "${enable_lognorm+set}" = set; then : enableval=$enable_lognorm; LOGNORM="$enableval" else LOGNORM="yes" fi @%:@ Check whether --with-lognorm_includes was given. if test "${with_lognorm_includes+set}" = set; then : withval=$with_lognorm_includes; with_lognorm_includes="$withval" else with_lognorm_includes="no" fi @%:@ Check whether --with-lognorm_libraries was given. if test "${with_lognorm_libraries+set}" = set; then : withval=$with_lognorm_libraries; with_lognorm_libraries="$withval" else with_lognorm_libraries="no" fi if test "x$with_lognorm_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_lognorm_includes}" fi if test "x$with_lognorm_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_lognorm_libraries}" fi # -- @%:@ Check whether --enable-libfastjson was given. if test "${enable_libfastjson+set}" = set; then : enableval=$enable_libfastjson; FASTJSON="$enableval" else FASTJSON="yes" fi @%:@ Check whether --with-libfastjson_includes was given. if test "${with_libfastjson_includes+set}" = set; then : withval=$with_libfastjson_includes; with_libfastjson_includes="$withval" else with_libfastjson_includes="no" fi @%:@ Check whether --with-libfastjson_c_libraries was given. if test "${with_libfastjson_c_libraries+set}" = set; then : withval=$with_libfastjson_c_libraries; with_libfastjson_libraries="$withval" else with_libfastjson_libraries="no" fi if test "x$with_libfastjson_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libfastjson_includes}" fi if test "x$with_libfastjson_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libfastjson_libraries}" fi # -- @%:@ Check whether --enable-libpcap was given. if test "${enable_libpcap+set}" = set; then : enableval=$enable_libpcap; LIBPCAP="$enableval" else LIBPCAP="no" fi @%:@ Check whether --with-libpcap_includes was given. if test "${with_libpcap_includes+set}" = set; then : withval=$with_libpcap_includes; with_libpcap_includes="$withval" else with_libpcap_includes="no" fi @%:@ Check whether --with-libpcap_libraries was given. if test "${with_libpcap_libraries+set}" = set; then : withval=$with_libpcap_libraries; with_libpcap_libraries="$withval" else with_libpcap_libraries="no" fi if test "x$with_libpcap_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libpcap_includes}" fi if test "x$with_libpcap_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libpcap_libraries}" fi @%:@ Check whether --enable-libdnet was given. if test "${enable_libdnet+set}" = set; then : enableval=$enable_libdnet; LIBDNET="$enableval" else LIBDNET="yes" fi @%:@ Check whether --with-libdnet_includes was given. if test "${with_libdnet_includes+set}" = set; then : withval=$with_libdnet_includes; with_libdnet_includes="$withval" else with_libdnet_includes="no" fi @%:@ Check whether --with-libdnet_libraries was given. if test "${with_libdnet_libraries+set}" = set; then : withval=$with_libdnet_libraries; with_libdnet_libraries="$withval" else with_libdnet_libraries="no" fi if test "x$with_libdnet_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libdnet_includes}" fi if test "x$with_libdnet_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libdnet_libraries}" fi am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in @%:@(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } 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. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf @%:@ Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi @%:@ Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi 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=sagan VERSION=${VERSION} cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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 cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers config.h" # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "@%:@define HAVE_SYS_WAIT_H 1" >>confdefs.h fi for ac_header in stdio.h stdlib.h sys/types.h unistd.h stdint.h inttypes.h pthread.h ctype.h errno.h fcntl.h sys/stat.h string.h getopt.h time.h pcre.h stdarg.h limits.h stdbool.h arpa/inet.h netinet/in.h sys/time.h sys/socket.h sys/mmap.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 $as_echo "$ac_cv_sizeof_size_t" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF # F_SETPIPE_SZ in fcntl.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_SETPIPE_SZ in fcntl.h" >&5 $as_echo_n "checking for F_SETPIPE_SZ in fcntl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GNU_SOURCE #include #ifdef F_SETPIPE_SZ yes_have_f_setpipe_sz #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes_have_f_setpipe_sz" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "@%:@define HAVE_SETPIPE_SZ /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: F_SETPIPE_SZ not found, cannot alter FIFO" >&5 $as_echo "$as_me: F_SETPIPE_SZ not found, cannot alter FIFO" >&6;} fi rm -f conftest* # F_GETPIPE_SZ in fcntl.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_GETPIPE_SZ in fcntl.h" >&5 $as_echo_n "checking for F_GETPIPE_SZ in fcntl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GNU_SOURCE #include #ifdef F_GETPIPE_SZ yes_have_f_getpipe_sz #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes_have_f_getpipe_sz" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "@%:@define HAVE_GETPIPE_SZ /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: F_GETPIPE_SZ not found, cannot alter FIFO" >&5 $as_echo "$as_me: F_GETPIPE_SZ not found, cannot alter FIFO" >&6;} fi rm -f conftest* # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "@%:@define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "@%:@define TIME_WITH_SYS_TIME 1" >>confdefs.h fi # Checks for library functions. if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "@%:@define HAVE_MALLOC 1" >>confdefs.h else $as_echo "@%:@define HAVE_MALLOC 0" >>confdefs.h case " $LIB@&t@OBJS " in *" malloc.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS malloc.$ac_objext" ;; esac $as_echo "@%:@define malloc rpl_malloc" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$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 _ACEOF cat >>confdefs.h <<_ACEOF @%:@define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF @%:@define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF @%:@define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIB@&t@OBJS " in *" lstat.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIB@&t@OBJS " in *" stat.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF @%:@define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF @%:@define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STRFTIME 1 _ACEOF else # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strftime (); int main () { return strftime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_strftime=yes else ac_cv_lib_intl_strftime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "@%:@define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi fi done ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "@%:@define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "@%:@define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "@%:@define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "@%:@define HAVE_REALLOC 1" >>confdefs.h else $as_echo "@%:@define HAVE_REALLOC 0" >>confdefs.h case " $LIB@&t@OBJS " in *" realloc.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS realloc.$ac_objext" ;; esac $as_echo "@%:@define realloc rpl_realloc" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "@%:@define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid output" >&5 $as_echo_n "checking for x86 cpuid output... " >&6; } if ${ax_cv_gcc_x86_cpuid_+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = , eax, ebx, ecx, edx; FILE *f; __asm__("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-AVX xgetbv output" >&5 $as_echo_n "checking for x86-AVX xgetbv output... " >&6; } if ${ax_cv_gcc_x86_avx_xgetbv_+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_avx_xgetbv_=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = , eax, edx; FILE *f; /* Opcodes for xgetbv */ __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (eax), "=d" (edx) : "c" (op)); f = fopen("conftest_xgetbv", "w"); if (!f) return 1; fprintf(f, "%x:%x\n", eax, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_avx_xgetbv_=`cat conftest_xgetbv`; rm -f conftest_xgetbv else ax_cv_gcc_x86_avx_xgetbv_=unknown; rm -f conftest_xgetbv fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_avx_xgetbv_" >&5 $as_echo "$ax_cv_gcc_x86_avx_xgetbv_" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu case $host_cpu in powerpc*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether altivec is supported" >&5 $as_echo_n "checking whether altivec is supported... " >&6; } if ${ax_cv_have_altivec_ext+:} false; then : $as_echo_n "(cached) " >&6 else if test `/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.optional.altivec` != 0; then if test `/usr/sbin/sysctl -n hw.optional.altivec` = 1; then ax_cv_have_altivec_ext=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_altivec_ext" >&5 $as_echo "$ax_cv_have_altivec_ext" >&6; } if test "$ax_cv_have_altivec_ext" = yes; then $as_echo "@%:@define HAVE_ALTIVEC /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -faltivec" >&5 $as_echo_n "checking whether C compiler accepts -faltivec... " >&6; } if ${ax_cv_check_cflags___faltivec+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -faltivec" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___faltivec=yes else ax_cv_check_cflags___faltivec=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___faltivec" >&5 $as_echo "$ax_cv_check_cflags___faltivec" >&6; } if test x"$ax_cv_check_cflags___faltivec" = xyes; then : SIMD_FLAGS="$SIMD_FLAGS -faltivec" else : fi fi ;; i[3456]86*|x86_64*|amd64*) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0x00000001 output" >&5 $as_echo_n "checking for x86 cpuid 0x00000001 output... " >&6; } if ${ax_cv_gcc_x86_cpuid_0x00000001+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_0x00000001=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 0x00000001, eax, ebx, ecx, edx; FILE *f; __asm__("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_0x00000001=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_0x00000001=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0x00000001" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_0x00000001" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ecx=0 edx=0 if test "$ax_cv_gcc_x86_cpuid_0x00000001" != "unknown"; then ecx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 3` edx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 4` fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmx is supported" >&5 $as_echo_n "checking whether mmx is supported... " >&6; } if ${ax_cv_have_mmx_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_mmx_ext=no if test "$((0x$edx>>23&0x01))" = 1; then ax_cv_have_mmx_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_mmx_ext" >&5 $as_echo "$ax_cv_have_mmx_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse is supported" >&5 $as_echo_n "checking whether sse is supported... " >&6; } if ${ax_cv_have_sse_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse_ext=no if test "$((0x$edx>>25&0x01))" = 1; then ax_cv_have_sse_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse_ext" >&5 $as_echo "$ax_cv_have_sse_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse2 is supported" >&5 $as_echo_n "checking whether sse2 is supported... " >&6; } if ${ax_cv_have_sse2_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse2_ext=no if test "$((0x$edx>>26&0x01))" = 1; then ax_cv_have_sse2_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse2_ext" >&5 $as_echo "$ax_cv_have_sse2_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse3 is supported" >&5 $as_echo_n "checking whether sse3 is supported... " >&6; } if ${ax_cv_have_sse3_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse3_ext=no if test "$((0x$ecx&0x01))" = 1; then ax_cv_have_sse3_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse3_ext" >&5 $as_echo "$ax_cv_have_sse3_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ssse3 is supported" >&5 $as_echo_n "checking whether ssse3 is supported... " >&6; } if ${ax_cv_have_ssse3_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_ssse3_ext=no if test "$((0x$ecx>>9&0x01))" = 1; then ax_cv_have_ssse3_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_ssse3_ext" >&5 $as_echo "$ax_cv_have_ssse3_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse4.1 is supported" >&5 $as_echo_n "checking whether sse4.1 is supported... " >&6; } if ${ax_cv_have_sse41_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse41_ext=no if test "$((0x$ecx>>19&0x01))" = 1; then ax_cv_have_sse41_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse41_ext" >&5 $as_echo "$ax_cv_have_sse41_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse4.2 is supported" >&5 $as_echo_n "checking whether sse4.2 is supported... " >&6; } if ${ax_cv_have_sse42_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse42_ext=no if test "$((0x$ecx>>20&0x01))" = 1; then ax_cv_have_sse42_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse42_ext" >&5 $as_echo "$ax_cv_have_sse42_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether avx is supported by processor" >&5 $as_echo_n "checking whether avx is supported by processor... " >&6; } if ${ax_cv_have_avx_cpu_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_avx_cpu_ext=no if test "$((0x$ecx>>28&0x01))" = 1; then ax_cv_have_avx_cpu_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_avx_cpu_ext" >&5 $as_echo "$ax_cv_have_avx_cpu_ext" >&6; } if test x"$ax_cv_have_avx_cpu_ext" = x"yes"; then 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-AVX xgetbv 0x00000000 output" >&5 $as_echo_n "checking for x86-AVX xgetbv 0x00000000 output... " >&6; } if ${ax_cv_gcc_x86_avx_xgetbv_0x00000000+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_avx_xgetbv_0x00000000=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 0x00000000, eax, edx; FILE *f; /* Opcodes for xgetbv */ __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (eax), "=d" (edx) : "c" (op)); f = fopen("conftest_xgetbv", "w"); if (!f) return 1; fprintf(f, "%x:%x\n", eax, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_avx_xgetbv_0x00000000=`cat conftest_xgetbv`; rm -f conftest_xgetbv else ax_cv_gcc_x86_avx_xgetbv_0x00000000=unknown; rm -f conftest_xgetbv fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_avx_xgetbv_0x00000000" >&5 $as_echo "$ax_cv_gcc_x86_avx_xgetbv_0x00000000" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu xgetbv_eax="0" if test x"$ax_cv_gcc_x86_avx_xgetbv_0x00000000" != x"unknown"; then xgetbv_eax=`echo $ax_cv_gcc_x86_avx_xgetbv_0x00000000 | cut -d ":" -f 1` fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether avx is supported by operating system" >&5 $as_echo_n "checking whether avx is supported by operating system... " >&6; } if ${ax_cv_have_avx_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_avx_ext=no if test "$((0x$ecx>>27&0x01))" = 1; then if test "$((0x$xgetbv_eax&0x6))" = 6; then ax_cv_have_avx_ext=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_avx_ext" >&5 $as_echo "$ax_cv_have_avx_ext" >&6; } if test x"$ax_cv_have_avx_ext" = x"no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports AVX, but your operating system doesn't" >&5 $as_echo "$as_me: WARNING: Your processor supports AVX, but your operating system doesn't" >&2;} fi fi if test "$ax_cv_have_mmx_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mmmx" >&5 $as_echo_n "checking whether C compiler accepts -mmmx... " >&6; } if ${ax_cv_check_cflags___mmmx+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -mmmx" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___mmmx=yes else ax_cv_check_cflags___mmmx=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mmmx" >&5 $as_echo "$ax_cv_check_cflags___mmmx" >&6; } if test x"$ax_cv_check_cflags___mmmx" = xyes; then : ax_cv_support_mmx_ext=yes else : fi if test x"$ax_cv_support_mmx_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mmmx" $as_echo "@%:@define HAVE_MMX /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports mmx instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports mmx instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse" >&5 $as_echo_n "checking whether C compiler accepts -msse... " >&6; } if ${ax_cv_check_cflags___msse+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse=yes else ax_cv_check_cflags___msse=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse" >&5 $as_echo "$ax_cv_check_cflags___msse" >&6; } if test x"$ax_cv_check_cflags___msse" = xyes; then : ax_cv_support_sse_ext=yes else : fi if test x"$ax_cv_support_sse_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse" $as_echo "@%:@define HAVE_SSE /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse2_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse2" >&5 $as_echo_n "checking whether C compiler accepts -msse2... " >&6; } if ${ax_cv_check_cflags___msse2+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse2=yes else ax_cv_check_cflags___msse2=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse2" >&5 $as_echo "$ax_cv_check_cflags___msse2" >&6; } if test x"$ax_cv_check_cflags___msse2" = xyes; then : ax_cv_support_sse2_ext=yes else : fi if test x"$ax_cv_support_sse2_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse2" $as_echo "@%:@define HAVE_SSE2 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse2 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse2 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse3_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse3" >&5 $as_echo_n "checking whether C compiler accepts -msse3... " >&6; } if ${ax_cv_check_cflags___msse3+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse3=yes else ax_cv_check_cflags___msse3=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse3" >&5 $as_echo "$ax_cv_check_cflags___msse3" >&6; } if test x"$ax_cv_check_cflags___msse3" = xyes; then : ax_cv_support_sse3_ext=yes else : fi if test x"$ax_cv_support_sse3_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse3" $as_echo "@%:@define HAVE_SSE3 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse3 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse3 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_ssse3_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mssse3" >&5 $as_echo_n "checking whether C compiler accepts -mssse3... " >&6; } if ${ax_cv_check_cflags___mssse3+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -mssse3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___mssse3=yes else ax_cv_check_cflags___mssse3=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mssse3" >&5 $as_echo "$ax_cv_check_cflags___mssse3" >&6; } if test x"$ax_cv_check_cflags___mssse3" = xyes; then : ax_cv_support_ssse3_ext=yes else : fi if test x"$ax_cv_support_ssse3_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mssse3" $as_echo "@%:@define HAVE_SSSE3 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports ssse3 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports ssse3 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse41_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse4.1" >&5 $as_echo_n "checking whether C compiler accepts -msse4.1... " >&6; } if ${ax_cv_check_cflags___msse4_1+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse4.1" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse4_1=yes else ax_cv_check_cflags___msse4_1=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse4_1" >&5 $as_echo "$ax_cv_check_cflags___msse4_1" >&6; } if test x"$ax_cv_check_cflags___msse4_1" = xyes; then : ax_cv_support_sse41_ext=yes else : fi if test x"$ax_cv_support_sse41_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse4.1" $as_echo "@%:@define HAVE_SSE4_1 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse4.1 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse4.1 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse42_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse4.2" >&5 $as_echo_n "checking whether C compiler accepts -msse4.2... " >&6; } if ${ax_cv_check_cflags___msse4_2+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse4.2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse4_2=yes else ax_cv_check_cflags___msse4_2=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse4_2" >&5 $as_echo "$ax_cv_check_cflags___msse4_2" >&6; } if test x"$ax_cv_check_cflags___msse4_2" = xyes; then : ax_cv_support_sse42_ext=yes else : fi if test x"$ax_cv_support_sse42_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse4.2" $as_echo "@%:@define HAVE_SSE4_2 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse4.2 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse4.2 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_avx_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mavx" >&5 $as_echo_n "checking whether C compiler accepts -mavx... " >&6; } if ${ax_cv_check_cflags___mavx+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -mavx" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___mavx=yes else ax_cv_check_cflags___mavx=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mavx" >&5 $as_echo "$ax_cv_check_cflags___mavx" >&6; } if test x"$ax_cv_check_cflags___mavx" = xyes; then : ax_cv_support_avx_ext=yes else : fi if test x"$ax_cv_support_avx_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mavx" $as_echo "@%:@define HAVE_AVX /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports avx instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports avx instructions but not your compiler, can you try another compiler?" >&2;} fi fi ;; esac # By default we simply use the C compiler to build assembly code. test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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_CCAS_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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_CCAS_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CCAS_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then am__fastdepCCAS_TRUE= am__fastdepCCAS_FALSE='#' else am__fastdepCCAS_TRUE='#' am__fastdepCCAS_FALSE= fi for ac_func in select strstr strchr strcmp strlen sizeof write snprintf strncat strlcat strlcpy getopt_long gethostbyname socket htons connect send recv dup2 strspn strdup memset access ftruncate strerror mmap shm_open do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcre" >&5 $as_echo_n "checking for main in -lpcre... " >&6; } if ${ac_cv_lib_pcre_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcre $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcre_main=yes else ac_cv_lib_pcre_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_main" >&5 $as_echo "$ac_cv_lib_pcre_main" >&6; } if test "x$ac_cv_lib_pcre_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBPCRE 1 _ACEOF LIBS="-lpcre $LIBS" else as_fn_error $? "Sagan needs PCRE installed. Please see http://www.pcre.org." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5 $as_echo_n "checking for main in -lpthread... " >&6; } if ${ac_cv_lib_pthread_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_main=yes else ac_cv_lib_pthread_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5 $as_echo "$ac_cv_lib_pthread_main" >&6; } if test "x$ac_cv_lib_pthread_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" else as_fn_error $? "Sagan needs pthreads!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 $as_echo_n "checking for main in -lm... " >&6; } if ${ac_cv_lib_m_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_main=yes else ac_cv_lib_m_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 $as_echo "$ac_cv_lib_m_main" >&6; } if test "x$ac_cv_lib_m_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else as_fn_error $? "Sagan needs libm!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrt" >&5 $as_echo_n "checking for main in -lrt... " >&6; } if ${ac_cv_lib_rt_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_main=yes else ac_cv_lib_rt_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_main" >&5 $as_echo "$ac_cv_lib_rt_main" >&6; } if test "x$ac_cv_lib_rt_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" else as_fn_error $? "Sagan needs librt!" "$LINENO" 5 fi if test "$SYSSTRSTR" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using build in strstr()..." >&5 $as_echo "using build in strstr()..." >&6; } $as_echo "@%:@define WITH_SYSSTRSTR 1" >>confdefs.h fi if test "$SYSLOG" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Syslog support is enabled -------" >&5 $as_echo "------- Syslog support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : fi $as_echo "@%:@define WITH_SYSLOG 1" >>confdefs.h fi if test "$GEOIP2" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Maxmind GeoIP2 support is enabled -------" >&5 $as_echo "------- Maxmind GeoIP2 support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "maxminddb.h" "ac_cv_header_maxminddb_h" "$ac_includes_default" if test "x$ac_cv_header_maxminddb_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmaxminddb" >&5 $as_echo_n "checking for main in -lmaxminddb... " >&6; } if ${ac_cv_lib_maxminddb_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmaxminddb $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_maxminddb_main=yes else ac_cv_lib_maxminddb_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_maxminddb_main" >&5 $as_echo "$ac_cv_lib_maxminddb_main" >&6; } if test "x$ac_cv_lib_maxminddb_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBMAXMINDDB 1 _ACEOF LIBS="-lmaxminddb $LIBS" else as_fn_error $? "The Maxmind GeoIP2 library cannot be found. If you're not interested in GeoIP2 support use the --disable-geoip2 flag." "$LINENO" 5 fi fi if test "$ESMTP" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libesmtp support is enabled -------" >&5 $as_echo "------- libesmtp support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "libesmtp.h" "ac_cv_header_libesmtp_h" "$ac_includes_default" if test "x$ac_cv_header_libesmtp_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lesmtp" >&5 $as_echo_n "checking for main in -lesmtp... " >&6; } if ${ac_cv_lib_esmtp_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lesmtp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_esmtp_main=yes else ac_cv_lib_esmtp_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_esmtp_main" >&5 $as_echo "$ac_cv_lib_esmtp_main" >&6; } if test "x$ac_cv_lib_esmtp_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBESMTP 1 _ACEOF LIBS="-lesmtp $LIBS" else as_fn_error $? "The libesmtp library cannot be found. If you're not interested in libesmtp support use the --disable-esmtp flag." "$LINENO" 5 fi fi if test "$FASTJSON" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libfastjson support is enabled -------" >&5 $as_echo "------- libfastjson support is enabled -------" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi if test "$LOGNORM" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- liblognorm support is enabled -------" >&5 $as_echo "------- liblognorm support is enabled -------" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBESTR" >&5 $as_echo_n "checking for LIBESTR... " >&6; } if test -n "$LIBESTR_CFLAGS"; then pkg_cv_LIBESTR_CFLAGS="$LIBESTR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libestr >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libestr >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBESTR_CFLAGS=`$PKG_CONFIG --cflags "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBESTR_LIBS"; then pkg_cv_LIBESTR_LIBS="$LIBESTR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libestr >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libestr >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBESTR_LIBS=`$PKG_CONFIG --libs "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBESTR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libestr >= 0.0.0" 2>&1` else LIBESTR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libestr >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBESTR_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libestr >= 0.0.0) were not met: $LIBESTR_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBESTR_CFLAGS and LIBESTR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBESTR_CFLAGS and LIBESTR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBESTR_CFLAGS=$pkg_cv_LIBESTR_CFLAGS LIBESTR_LIBS=$pkg_cv_LIBESTR_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLOGNORM" >&5 $as_echo_n "checking for LIBLOGNORM... " >&6; } if test -n "$LIBLOGNORM_CFLAGS"; then pkg_cv_LIBLOGNORM_CFLAGS="$LIBLOGNORM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lognorm >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lognorm >= 1.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBLOGNORM_CFLAGS=`$PKG_CONFIG --cflags "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBLOGNORM_LIBS"; then pkg_cv_LIBLOGNORM_LIBS="$LIBLOGNORM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lognorm >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lognorm >= 1.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBLOGNORM_LIBS=`$PKG_CONFIG --libs "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBLOGNORM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lognorm >= 1.0.0" 2>&1` else LIBLOGNORM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lognorm >= 1.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBLOGNORM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (lognorm >= 1.0.0) were not met: $LIBLOGNORM_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBLOGNORM_CFLAGS and LIBLOGNORM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBLOGNORM_CFLAGS and LIBLOGNORM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBLOGNORM_CFLAGS=$pkg_cv_LIBLOGNORM_CFLAGS LIBLOGNORM_LIBS=$pkg_cv_LIBLOGNORM_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi ac_fn_c_check_header_mongrel "$LINENO" "liblognorm.h" "ac_cv_header_liblognorm_h" "$ac_includes_default" if test "x$ac_cv_header_liblognorm_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "libestr.h" "ac_cv_header_libestr_h" "$ac_includes_default" if test "x$ac_cv_header_libestr_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lestr" >&5 $as_echo_n "checking for main in -lestr... " >&6; } if ${ac_cv_lib_estr_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lestr $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_estr_main=yes else ac_cv_lib_estr_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_estr_main" >&5 $as_echo "$ac_cv_lib_estr_main" >&6; } if test "x$ac_cv_lib_estr_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBESTR 1 _ACEOF LIBS="-lestr $LIBS" else as_fn_error $? "The libestr library cannot be found. This library is important for the correlation aspects of Sagan! Please see https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature use the --disable-lognorm flag. " "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llognorm" >&5 $as_echo_n "checking for main in -llognorm... " >&6; } if ${ac_cv_lib_lognorm_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llognorm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lognorm_main=yes else ac_cv_lib_lognorm_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lognorm_main" >&5 $as_echo "$ac_cv_lib_lognorm_main" >&6; } if test "x$ac_cv_lib_lognorm_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBLOGNORM 1 _ACEOF LIBS="-llognorm $LIBS" else as_fn_error $? "The liblognorm library cannot be found. This library is important for the correlation aspects of Sagan! Please see https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature use the --disable-lognorm flag. " "$LINENO" 5 fi fi if test "$LIBPCAP" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libpcap support is enabled -------" >&5 $as_echo "------- libpcap support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "pcap.h" "ac_cv_header_pcap_h" "$ac_includes_default" if test "x$ac_cv_header_pcap_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default" if test "x$ac_cv_header_net_if_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "net/if_arp.h" "ac_cv_header_net_if_arp_h" "$ac_includes_default" if test "x$ac_cv_header_net_if_arp_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_systm_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_ip_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/udp.h" "ac_cv_header_netinet_udp_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_udp_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5 $as_echo_n "checking for main in -lpcap... " >&6; } if ${ac_cv_lib_pcap_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcap_main=yes else ac_cv_lib_pcap_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_main" >&5 $as_echo "$ac_cv_lib_pcap_main" >&6; } if test "x$ac_cv_lib_pcap_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBPCAP 1 _ACEOF LIBS="-lpcap $LIBS" else as_fn_error $? "The libpcap library cannot be found. This library is used to run Sagan in a syslog 'sniffer' mode. Please see https://wiki.quadrantsec.com/bin/view/Main/PLog. To disable this feature use the --disable-libpcap flag. " "$LINENO" 5 fi fi if test "$LIBDNET" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libdnet support is enabled -------" >&5 $as_echo "------- libdnet support is enabled -------" >&6; } for ac_header in dnet.h do : ac_fn_c_check_header_mongrel "$LINENO" "dnet.h" "ac_cv_header_dnet_h" "$ac_includes_default" if test "x$ac_cv_header_dnet_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_DNET_H 1 _ACEOF else DNET_H="no" fi done for ac_header in dumbnet.h do : ac_fn_c_check_header_mongrel "$LINENO" "dumbnet.h" "ac_cv_header_dumbnet_h" "$ac_includes_default" if test "x$ac_cv_header_dumbnet_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_DUMBNET_H 1 _ACEOF else DUMBNET_H="no" fi done if test "x$DNET_H" = "xno" -a "x$DUMBNET_H" = "xno"; then echo echo "The libdnet headers cannot be found. This library is used for Sagan's" echo "Unified2 output support. Please see:" echo "https://wiki.quadrantsec.com/bin/view/Main/Unified2Output" echo "To disable this feature use the --disable-libdnet flag." exit fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eth_set in -ldnet" >&5 $as_echo_n "checking for eth_set in -ldnet... " >&6; } if ${ac_cv_lib_dnet_eth_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char eth_set (); int main () { return eth_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_eth_set=yes else ac_cv_lib_dnet_eth_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_eth_set" >&5 $as_echo "$ac_cv_lib_dnet_eth_set" >&6; } if test "x$ac_cv_lib_dnet_eth_set" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBDNET 1 _ACEOF LIBS="-ldnet $LIBS" else DNET="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eth_set in -ldumbnet" >&5 $as_echo_n "checking for eth_set in -ldumbnet... " >&6; } if ${ac_cv_lib_dumbnet_eth_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldumbnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char eth_set (); int main () { return eth_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dumbnet_eth_set=yes else ac_cv_lib_dumbnet_eth_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dumbnet_eth_set" >&5 $as_echo "$ac_cv_lib_dumbnet_eth_set" >&6; } if test "x$ac_cv_lib_dumbnet_eth_set" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBDUMBNET 1 _ACEOF LIBS="-ldumbnet $LIBS" else DUMBNET="no" fi if test "x$DNET" = "xno" -a "x$DUMBNET" = "xno"; then echo echo "The libdnet headers cannot be found. This library is used for Sagan's" echo "Unified2 output support. Please see:" echo "https://wiki.quadrantsec.com/bin/view/Main/Unified2Output" echo "To disable this feature use the --disable-libdnet flag." exit fi fi if test "$BLUEDOT" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Quadrant \"Bluedot\" is enabled -------" >&5 $as_echo "------- Quadrant \"Bluedot\" is enabled -------" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5 $as_echo_n "checking for main in -lcurl... " >&6; } if ${ac_cv_lib_curl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curl_main=yes else ac_cv_lib_curl_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_main" >&5 $as_echo "$ac_cv_lib_curl_main" >&6; } if test "x$ac_cv_lib_curl_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBCURL 1 _ACEOF LIBS="-lcurl $LIBS" else as_fn_error $? "The libcurl library cannot be found. This library is used for Sagan's / \"Bluedot\" support. Please see https://quadrantsec.com for more information. To disable this feature use the --disable-bluedot flag. " "$LINENO" 5 fi $as_echo "@%:@define WITH_BLUEDOT 1" >>confdefs.h ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" if test "x$ac_cv_header_curl_curl_h" = xyes; then : fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi if test "$SNORTSAM" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Snortsam support is enabled -------" >&5 $as_echo "------- Snortsam support is enabled -------" >&6; } $as_echo "@%:@define WITH_SNORTSAM 1" >>confdefs.h fi test "x$prefix" = x. || test "x$prefix" = xNONE && prefix=/usr/local cat >>confdefs.h <<_ACEOF @%:@define CONFIG_FILE_PATH "`eval echo "${sysconfdir}/sagan.conf"`" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "sagan" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "Sagan $VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "cclark@quadrantsec.com" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "sagan" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$VERSION" _ACEOF ac_config_files="$ac_config_files Makefile src/Makefile" # AC_OUTPUT(Makefile) cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: ,-._,-. Sagan has been configured!" >&5 $as_echo " ,-._,-. Sagan has been configured!" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: \/)\"(\/ " >&5 $as_echo " \/)\"(\/ " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: (_o_) Champ Clark III & The Quadrant InfoSec Team [quadrantsec.com]" >&5 $as_echo " (_o_) Champ Clark III & The Quadrant InfoSec Team [quadrantsec.com]" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: / \/) Copyright (C) 2009-2016 Quadrant Information Security, et al." >&5 $as_echo " / \/) Copyright (C) 2009-2016 Quadrant Information Security, et al." >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: (|| ||) " >&5 $as_echo " (|| ||) " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: oo-oo " >&5 $as_echo " oo-oo " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } sagan-1.1.2/autom4te.cache/traces.10000644000175000017500000021057412770373003015730 0ustar champchampm4trace:/usr/share/aclocal/pkg.m4:27: -1- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ]) m4trace:/usr/share/aclocal/pkg.m4:60: -1- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) m4trace:/usr/share/aclocal/pkg.m4:86: -1- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ]) m4trace:/usr/share/aclocal/pkg.m4:106: -1- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ]) m4trace:/usr/share/aclocal/pkg.m4:169: -1- AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) m4trace:/usr/share/aclocal/pkg.m4:189: -1- AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) m4trace:/usr/share/aclocal/pkg.m4:206: -1- AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ]) m4trace:/usr/share/aclocal-1.14/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) m4trace:/usr/share/aclocal-1.14/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) m4trace:/usr/share/aclocal-1.14/as.m4:11: -1- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. AC_REQUIRE([AC_PROG_CC]) test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl ]) m4trace:/usr/share/aclocal-1.14/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) m4trace:/usr/share/aclocal-1.14/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl 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])]) m4trace:/usr/share/aclocal-1.14/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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 am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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 cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none 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]) ]) m4trace:/usr/share/aclocal-1.14/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) m4trace:/usr/share/aclocal-1.14/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) m4trace:/usr/share/aclocal-1.14/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ]) m4trace:/usr/share/aclocal-1.14/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) m4trace:/usr/share/aclocal-1.14/init.m4:29: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])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]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi ]) m4trace:/usr/share/aclocal-1.14/init.m4:183: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) m4trace:/usr/share/aclocal-1.14/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) m4trace:/usr/share/aclocal-1.14/lead-dot.m4:10: -1- 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])]) m4trace:/usr/share/aclocal-1.14/maintainer.m4:16: -1- AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ]) m4trace:/usr/share/aclocal-1.14/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .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]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) m4trace:/usr/share/aclocal-1.14/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) m4trace:/usr/share/aclocal-1.14/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) m4trace:/usr/share/aclocal-1.14/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) m4trace:/usr/share/aclocal-1.14/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) m4trace:/usr/share/aclocal-1.14/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) m4trace:/usr/share/aclocal-1.14/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) m4trace:/usr/share/aclocal-1.14/prog-cc-c-o.m4:12: -1- AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) m4trace:/usr/share/aclocal-1.14/prog-cc-c-o.m4:47: -1- AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) m4trace:/usr/share/aclocal-1.14/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) m4trace:/usr/share/aclocal-1.14/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) m4trace:/usr/share/aclocal-1.14/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) m4trace:/usr/share/aclocal-1.14/strip.m4:17: -1- 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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) m4trace:/usr/share/aclocal-1.14/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) m4trace:/usr/share/aclocal-1.14/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) m4trace:/usr/share/aclocal-1.14/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} 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 /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]) ]) m4trace:m4/ax_check_compile_flag.m4:58: -1- AC_DEFUN([AX_CHECK_COMPILE_FLAG], [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], [m4_default([$2], :)], [m4_default([$3], :)]) AS_VAR_POPDEF([CACHEVAR])dnl ]) m4trace:m4/ax_ext.m4:36: -1- AC_DEFUN([AX_EXT], [ AC_REQUIRE([AC_CANONICAL_HOST]) case $host_cpu in powerpc*) AC_CACHE_CHECK([whether altivec is supported], [ax_cv_have_altivec_ext], [ if test `/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.optional.altivec` != 0; then if test `/usr/sbin/sysctl -n hw.optional.altivec` = 1; then ax_cv_have_altivec_ext=yes fi fi ]) if test "$ax_cv_have_altivec_ext" = yes; then AC_DEFINE(HAVE_ALTIVEC,,[Support Altivec instructions]) AX_CHECK_COMPILE_FLAG(-faltivec, SIMD_FLAGS="$SIMD_FLAGS -faltivec", []) fi ;; i[[3456]]86*|x86_64*|amd64*) AC_REQUIRE([AX_GCC_X86_CPUID]) AC_REQUIRE([AX_GCC_X86_AVX_XGETBV]) AX_GCC_X86_CPUID(0x00000001) ecx=0 edx=0 if test "$ax_cv_gcc_x86_cpuid_0x00000001" != "unknown"; then ecx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 3` edx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 4` fi AC_CACHE_CHECK([whether mmx is supported], [ax_cv_have_mmx_ext], [ ax_cv_have_mmx_ext=no if test "$((0x$edx>>23&0x01))" = 1; then ax_cv_have_mmx_ext=yes fi ]) AC_CACHE_CHECK([whether sse is supported], [ax_cv_have_sse_ext], [ ax_cv_have_sse_ext=no if test "$((0x$edx>>25&0x01))" = 1; then ax_cv_have_sse_ext=yes fi ]) AC_CACHE_CHECK([whether sse2 is supported], [ax_cv_have_sse2_ext], [ ax_cv_have_sse2_ext=no if test "$((0x$edx>>26&0x01))" = 1; then ax_cv_have_sse2_ext=yes fi ]) AC_CACHE_CHECK([whether sse3 is supported], [ax_cv_have_sse3_ext], [ ax_cv_have_sse3_ext=no if test "$((0x$ecx&0x01))" = 1; then ax_cv_have_sse3_ext=yes fi ]) AC_CACHE_CHECK([whether ssse3 is supported], [ax_cv_have_ssse3_ext], [ ax_cv_have_ssse3_ext=no if test "$((0x$ecx>>9&0x01))" = 1; then ax_cv_have_ssse3_ext=yes fi ]) AC_CACHE_CHECK([whether sse4.1 is supported], [ax_cv_have_sse41_ext], [ ax_cv_have_sse41_ext=no if test "$((0x$ecx>>19&0x01))" = 1; then ax_cv_have_sse41_ext=yes fi ]) AC_CACHE_CHECK([whether sse4.2 is supported], [ax_cv_have_sse42_ext], [ ax_cv_have_sse42_ext=no if test "$((0x$ecx>>20&0x01))" = 1; then ax_cv_have_sse42_ext=yes fi ]) AC_CACHE_CHECK([whether avx is supported by processor], [ax_cv_have_avx_cpu_ext], [ ax_cv_have_avx_cpu_ext=no if test "$((0x$ecx>>28&0x01))" = 1; then ax_cv_have_avx_cpu_ext=yes fi ]) if test x"$ax_cv_have_avx_cpu_ext" = x"yes"; then AX_GCC_X86_AVX_XGETBV(0x00000000) xgetbv_eax="0" if test x"$ax_cv_gcc_x86_avx_xgetbv_0x00000000" != x"unknown"; then xgetbv_eax=`echo $ax_cv_gcc_x86_avx_xgetbv_0x00000000 | cut -d ":" -f 1` fi AC_CACHE_CHECK([whether avx is supported by operating system], [ax_cv_have_avx_ext], [ ax_cv_have_avx_ext=no if test "$((0x$ecx>>27&0x01))" = 1; then if test "$((0x$xgetbv_eax&0x6))" = 6; then ax_cv_have_avx_ext=yes fi fi ]) if test x"$ax_cv_have_avx_ext" = x"no"; then AC_MSG_WARN([Your processor supports AVX, but your operating system doesn't]) fi fi if test "$ax_cv_have_mmx_ext" = yes; then AX_CHECK_COMPILE_FLAG(-mmmx, ax_cv_support_mmx_ext=yes, []) if test x"$ax_cv_support_mmx_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mmmx" AC_DEFINE(HAVE_MMX,,[Support mmx instructions]) else AC_MSG_WARN([Your processor supports mmx instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_sse_ext" = yes; then AX_CHECK_COMPILE_FLAG(-msse, ax_cv_support_sse_ext=yes, []) if test x"$ax_cv_support_sse_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse" AC_DEFINE(HAVE_SSE,,[Support SSE (Streaming SIMD Extensions) instructions]) else AC_MSG_WARN([Your processor supports sse instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_sse2_ext" = yes; then AX_CHECK_COMPILE_FLAG(-msse2, ax_cv_support_sse2_ext=yes, []) if test x"$ax_cv_support_sse2_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse2" AC_DEFINE(HAVE_SSE2,,[Support SSE2 (Streaming SIMD Extensions 2) instructions]) else AC_MSG_WARN([Your processor supports sse2 instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_sse3_ext" = yes; then AX_CHECK_COMPILE_FLAG(-msse3, ax_cv_support_sse3_ext=yes, []) if test x"$ax_cv_support_sse3_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse3" AC_DEFINE(HAVE_SSE3,,[Support SSE3 (Streaming SIMD Extensions 3) instructions]) else AC_MSG_WARN([Your processor supports sse3 instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_ssse3_ext" = yes; then AX_CHECK_COMPILE_FLAG(-mssse3, ax_cv_support_ssse3_ext=yes, []) if test x"$ax_cv_support_ssse3_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mssse3" AC_DEFINE(HAVE_SSSE3,,[Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions]) else AC_MSG_WARN([Your processor supports ssse3 instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_sse41_ext" = yes; then AX_CHECK_COMPILE_FLAG(-msse4.1, ax_cv_support_sse41_ext=yes, []) if test x"$ax_cv_support_sse41_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse4.1" AC_DEFINE(HAVE_SSE4_1,,[Support SSSE4.1 (Streaming SIMD Extensions 4.1) instructions]) else AC_MSG_WARN([Your processor supports sse4.1 instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_sse42_ext" = yes; then AX_CHECK_COMPILE_FLAG(-msse4.2, ax_cv_support_sse42_ext=yes, []) if test x"$ax_cv_support_sse42_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse4.2" AC_DEFINE(HAVE_SSE4_2,,[Support SSSE4.2 (Streaming SIMD Extensions 4.2) instructions]) else AC_MSG_WARN([Your processor supports sse4.2 instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_avx_ext" = yes; then AX_CHECK_COMPILE_FLAG(-mavx, ax_cv_support_avx_ext=yes, []) if test x"$ax_cv_support_avx_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mavx" AC_DEFINE(HAVE_AVX,,[Support AVX (Advanced Vector Extensions) instructions]) else AC_MSG_WARN([Your processor supports avx instructions but not your compiler, can you try another compiler?]) fi fi ;; esac AC_SUBST(SIMD_FLAGS) ]) m4trace:m4/ax_gcc_x86_avx_xgetbv.m4:59: -1- AC_DEFUN([AX_GCC_X86_AVX_XGETBV], [AC_REQUIRE([AC_PROG_CC]) AC_LANG_PUSH([C]) AC_CACHE_CHECK(for x86-AVX xgetbv $1 output, ax_cv_gcc_x86_avx_xgetbv_$1, [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], [ int op = $1, eax, edx; FILE *f; /* Opcodes for xgetbv */ __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (eax), "=d" (edx) : "c" (op)); f = fopen("conftest_xgetbv", "w"); if (!f) return 1; fprintf(f, "%x:%x\n", eax, edx); fclose(f); return 0; ])], [ax_cv_gcc_x86_avx_xgetbv_$1=`cat conftest_xgetbv`; rm -f conftest_xgetbv], [ax_cv_gcc_x86_avx_xgetbv_$1=unknown; rm -f conftest_xgetbv], [ax_cv_gcc_x86_avx_xgetbv_$1=unknown])]) AC_LANG_POP([C]) ]) m4trace:m4/ax_gcc_x86_cpuid.m4:58: -1- AC_DEFUN([AX_GCC_X86_CPUID], [AC_REQUIRE([AC_PROG_CC]) AC_LANG_PUSH([C]) AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1, [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], [ int op = $1, eax, ebx, ecx, edx; FILE *f; __asm__("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ])], [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid], [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid], [ax_cv_gcc_x86_cpuid_$1=unknown])]) AC_LANG_POP([C]) ]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:4: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:4: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^prefix$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^bindir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^datadir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^includedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^docdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^infodir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^psdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^libdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^localedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^mandir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:6: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:1857: AC_CANONICAL_SYSTEM is expanded from... configure.ac:6: the top level]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build_os$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host_os$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target_cpu$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target_vendor$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target_os$]) m4trace:configure.ac:7: -1- _m4_warn([obsolete], [The macro `AC_GNU_SOURCE' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:314: AC_GNU_SOURCE is expanded from... configure.ac:7: the top level]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.ac:7: -1- _AM_PROG_CC_C_O m4trace:configure.ac:7: -1- AM_AUX_DIR_EXPAND m4trace:configure.ac:7: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^GREP$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_POSIX_SOURCE$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_POSIX_1_SOURCE$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_MINIX$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^__EXTENSIONS__$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_ALL_SOURCE$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_GNU_SOURCE$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_POSIX_PTHREAD_SEMANTICS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_TANDEM_SOURCE$]) m4trace:configure.ac:8: -1- _AM_CONFIG_MACRO_DIRS([m4]) m4trace:configure.ac:10: -1- AM_MAINTAINER_MODE([disable]) m4trace:configure.ac:10: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) m4trace:configure.ac:10: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) m4trace:configure.ac:10: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) m4trace:configure.ac:10: -1- m4_pattern_allow([^MAINT$]) m4trace:configure.ac:17: -2- m4_pattern_allow([^ENDIAN$]) m4trace:configure.ac:17: -2- m4_pattern_allow([^ENDIAN$]) m4trace:configure.ac:17: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) m4trace:configure.ac:179: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:180: -1- AM_INIT_AUTOMAKE([sagan], [${VERSION}]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:180: -1- AM_SET_CURRENT_AUTOMAKE_VERSION m4trace:configure.ac:180: -1- AM_AUTOMAKE_VERSION([1.14.1]) m4trace:configure.ac:180: -1- _AM_AUTOCONF_VERSION([2.69]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.ac:180: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.ac:180: -1- _m4_warn([obsolete], [AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.], [/usr/share/aclocal-1.14/init.m4:29: AM_INIT_AUTOMAKE is expanded from... configure.ac:180: the top level]) m4trace:configure.ac:180: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:180: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])]) m4trace:configure.ac:180: -2- _AM_MANGLE_OPTION([no-define]) m4trace:configure.ac:180: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:180: -1- AM_SANITY_CHECK m4trace:configure.ac:180: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) m4trace:configure.ac:180: -1- AM_MISSING_HAS_RUN m4trace:configure.ac:180: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.ac:180: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.ac:180: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.ac:180: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.ac:180: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) m4trace:configure.ac:180: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.ac:180: -1- AM_PROG_INSTALL_SH m4trace:configure.ac:180: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.ac:180: -1- AM_PROG_INSTALL_STRIP m4trace:configure.ac:180: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^MKDIR_P$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AWK$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:180: -1- AM_SET_LEADING_DOT m4trace:configure.ac:180: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.ac:180: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) m4trace:configure.ac:180: -2- _AM_MANGLE_OPTION([tar-ustar]) m4trace:configure.ac:180: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) m4trace:configure.ac:180: -2- _AM_MANGLE_OPTION([tar-pax]) m4trace:configure.ac:180: -1- _AM_PROG_TAR([v7]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.ac:180: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) m4trace:configure.ac:180: -2- _AM_MANGLE_OPTION([no-dependencies]) m4trace:configure.ac:180: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.ac:180: -1- AM_SET_DEPDIR m4trace:configure.ac:180: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.ac:180: -1- AM_OUTPUT_DEPENDENCY_COMMANDS m4trace:configure.ac:180: -1- AM_MAKE_INCLUDE m4trace:configure.ac:180: -1- m4_pattern_allow([^am__include$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.ac:180: -1- AM_DEP_TRACK m4trace:configure.ac:180: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__nodep$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__nodep]) m4trace:configure.ac:180: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.ac:180: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:180: -1- AM_SILENT_RULES m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_V$]) m4trace:configure.ac:180: -1- AM_SUBST_NOTMAKE([AM_V]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AM_V]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_DEFAULT_V$]) m4trace:configure.ac:180: -1- AM_SUBST_NOTMAKE([AM_DEFAULT_V]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_BACKSLASH$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:184: -1- _AM_PROG_CC_C_O m4trace:configure.ac:184: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) m4trace:configure.ac:186: -1- _m4_warn([obsolete], [The macro `AC_LANG_C' is obsolete. You should run autoupdate.], [../../lib/autoconf/c.m4:72: AC_LANG_C is expanded from... configure.ac:186: the top level]) m4trace:configure.ac:187: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:189: -1- PKG_PROG_PKG_CONFIG m4trace:configure.ac:189: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG_PATH$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG_LIBDIR$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:192: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:193: -1- m4_pattern_allow([^HAVE_SYS_WAIT_H$]) m4trace:configure.ac:197: -1- m4_pattern_allow([^SIZEOF_SIZE_T$]) m4trace:configure.ac:202: -1- m4_pattern_allow([^HAVE_SETPIPE_SZ$]) m4trace:configure.ac:218: -1- m4_pattern_allow([^HAVE_GETPIPE_SZ$]) m4trace:configure.ac:233: -1- m4_pattern_allow([^const$]) m4trace:configure.ac:234: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_MALLOC$]) m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_MALLOC$]) m4trace:configure.ac:238: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:238: -1- m4_pattern_allow([^malloc$]) m4trace:configure.ac:239: -1- m4_pattern_allow([^SELECT_TYPE_ARG1$]) m4trace:configure.ac:239: -1- m4_pattern_allow([^SELECT_TYPE_ARG234$]) m4trace:configure.ac:239: -1- m4_pattern_allow([^SELECT_TYPE_ARG5$]) m4trace:configure.ac:240: -1- m4_pattern_allow([^LSTAT_FOLLOWS_SLASHED_SYMLINK$]) m4trace:configure.ac:240: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:240: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:240: -1- m4_pattern_allow([^HAVE_STAT_EMPTY_STRING_BUG$]) m4trace:configure.ac:241: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. You should run autoupdate.], [../../lib/autoconf/types.m4:746: AC_TYPE_SIGNAL is expanded from... configure.ac:241: the top level]) m4trace:configure.ac:241: -1- m4_pattern_allow([^RETSIGTYPE$]) m4trace:configure.ac:242: -1- m4_pattern_allow([^HAVE_STRFTIME$]) m4trace:configure.ac:242: -1- m4_pattern_allow([^HAVE_STRFTIME$]) m4trace:configure.ac:243: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.ac:243: -1- m4_pattern_allow([^HAVE_VFORK_H$]) m4trace:configure.ac:243: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) m4trace:configure.ac:243: -1- m4_pattern_allow([^vfork$]) m4trace:configure.ac:243: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) m4trace:configure.ac:244: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) m4trace:configure.ac:244: -1- m4_pattern_allow([^HAVE_REALLOC$]) m4trace:configure.ac:244: -1- m4_pattern_allow([^HAVE_REALLOC$]) m4trace:configure.ac:244: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:244: -1- m4_pattern_allow([^realloc$]) m4trace:configure.ac:245: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.ac:246: -1- m4_pattern_allow([^size_t$]) m4trace:configure.ac:247: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) m4trace:configure.ac:249: -1- AX_EXT m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_ALTIVEC$]) m4trace:configure.ac:249: -1- AX_CHECK_COMPILE_FLAG([-faltivec], [SIMD_FLAGS="$SIMD_FLAGS -faltivec"], []) m4trace:configure.ac:249: -1- AX_GCC_X86_CPUID m4trace:configure.ac:249: -1- AX_GCC_X86_AVX_XGETBV m4trace:configure.ac:249: -1- AX_GCC_X86_CPUID([0x00000001]) m4trace:configure.ac:249: -1- AX_GCC_X86_AVX_XGETBV([0x00000000]) m4trace:configure.ac:249: -1- AX_CHECK_COMPILE_FLAG([-mmmx], [ax_cv_support_mmx_ext=yes], []) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_MMX$]) m4trace:configure.ac:249: -1- AX_CHECK_COMPILE_FLAG([-msse], [ax_cv_support_sse_ext=yes], []) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSE$]) m4trace:configure.ac:249: -1- AX_CHECK_COMPILE_FLAG([-msse2], [ax_cv_support_sse2_ext=yes], []) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSE2$]) m4trace:configure.ac:249: -1- AX_CHECK_COMPILE_FLAG([-msse3], [ax_cv_support_sse3_ext=yes], []) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSE3$]) m4trace:configure.ac:249: -1- AX_CHECK_COMPILE_FLAG([-mssse3], [ax_cv_support_ssse3_ext=yes], []) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSSE3$]) m4trace:configure.ac:249: -1- AX_CHECK_COMPILE_FLAG([-msse4.1], [ax_cv_support_sse41_ext=yes], []) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSE4_1$]) m4trace:configure.ac:249: -1- AX_CHECK_COMPILE_FLAG([-msse4.2], [ax_cv_support_sse42_ext=yes], []) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSE4_2$]) m4trace:configure.ac:249: -1- AX_CHECK_COMPILE_FLAG([-mavx], [ax_cv_support_avx_ext=yes], []) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_AVX$]) m4trace:configure.ac:249: -1- m4_pattern_allow([^SIMD_FLAGS$]) m4trace:configure.ac:250: -1- AM_PROG_AS m4trace:configure.ac:250: -1- m4_pattern_allow([^CCAS$]) m4trace:configure.ac:250: -1- m4_pattern_allow([^CCASFLAGS$]) m4trace:configure.ac:250: -1- _AM_IF_OPTION([no-dependencies], [], [_AM_DEPENDENCIES([CCAS])]) m4trace:configure.ac:250: -2- _AM_MANGLE_OPTION([no-dependencies]) m4trace:configure.ac:250: -1- _AM_DEPENDENCIES([CCAS]) m4trace:configure.ac:250: -1- m4_pattern_allow([^CCASDEPMODE$]) m4trace:configure.ac:250: -1- AM_CONDITIONAL([am__fastdepCCAS], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:250: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$]) m4trace:configure.ac:250: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$]) m4trace:configure.ac:250: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE]) m4trace:configure.ac:250: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE]) m4trace:configure.ac:254: -1- m4_pattern_allow([^HAVE_LIBPCRE$]) m4trace:configure.ac:255: -1- m4_pattern_allow([^HAVE_LIBPTHREAD$]) m4trace:configure.ac:256: -1- m4_pattern_allow([^HAVE_LIBM$]) m4trace:configure.ac:257: -1- m4_pattern_allow([^HAVE_LIBRT$]) m4trace:configure.ac:261: -1- m4_pattern_allow([^WITH_SYSSTRSTR$]) m4trace:configure.ac:267: -1- m4_pattern_allow([^WITH_SYSLOG$]) m4trace:configure.ac:273: -1- m4_pattern_allow([^HAVE_LIBMAXMINDDB$]) m4trace:configure.ac:280: -1- m4_pattern_allow([^HAVE_LIBESMTP$]) m4trace:configure.ac:287: -1- PKG_CHECK_MODULES([LIBFASTJSON], [libfastjson >= 0.0.0]) m4trace:configure.ac:287: -1- m4_pattern_allow([^LIBFASTJSON_CFLAGS$]) m4trace:configure.ac:287: -1- m4_pattern_allow([^LIBFASTJSON_LIBS$]) m4trace:configure.ac:287: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_CFLAGS=`$PKG_CONFIG --[]cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:287: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_LIBS=`$PKG_CONFIG --[]libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:287: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:292: -1- PKG_CHECK_MODULES([LIBESTR], [libestr >= 0.0.0]) m4trace:configure.ac:292: -1- m4_pattern_allow([^LIBESTR_CFLAGS$]) m4trace:configure.ac:292: -1- m4_pattern_allow([^LIBESTR_LIBS$]) m4trace:configure.ac:292: -1- PKG_CHECK_EXISTS([libestr >= 0.0.0], [pkg_cv_[]LIBESTR_CFLAGS=`$PKG_CONFIG --[]cflags "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:292: -1- PKG_CHECK_EXISTS([libestr >= 0.0.0], [pkg_cv_[]LIBESTR_LIBS=`$PKG_CONFIG --[]libs "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:292: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:293: -1- PKG_CHECK_MODULES([LIBLOGNORM], [lognorm >= 1.0.0]) m4trace:configure.ac:293: -1- m4_pattern_allow([^LIBLOGNORM_CFLAGS$]) m4trace:configure.ac:293: -1- m4_pattern_allow([^LIBLOGNORM_LIBS$]) m4trace:configure.ac:293: -1- PKG_CHECK_EXISTS([lognorm >= 1.0.0], [pkg_cv_[]LIBLOGNORM_CFLAGS=`$PKG_CONFIG --[]cflags "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:293: -1- PKG_CHECK_EXISTS([lognorm >= 1.0.0], [pkg_cv_[]LIBLOGNORM_LIBS=`$PKG_CONFIG --[]libs "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:293: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:294: -1- PKG_CHECK_MODULES([LIBFASTJSON], [libfastjson >= 0.0.0]) m4trace:configure.ac:294: -1- m4_pattern_allow([^LIBFASTJSON_CFLAGS$]) m4trace:configure.ac:294: -1- m4_pattern_allow([^LIBFASTJSON_LIBS$]) m4trace:configure.ac:294: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_CFLAGS=`$PKG_CONFIG --[]cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:294: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_LIBS=`$PKG_CONFIG --[]libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:294: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:297: -1- m4_pattern_allow([^HAVE_LIBESTR$]) m4trace:configure.ac:301: -1- m4_pattern_allow([^HAVE_LIBLOGNORM$]) m4trace:configure.ac:316: -1- m4_pattern_allow([^HAVE_LIBPCAP$]) m4trace:configure.ac:325: -1- m4_pattern_allow([^HAVE_DNET_H$]) m4trace:configure.ac:326: -1- m4_pattern_allow([^HAVE_DUMBNET_H$]) m4trace:configure.ac:337: -1- m4_pattern_allow([^HAVE_LIBDNET$]) m4trace:configure.ac:338: -1- m4_pattern_allow([^HAVE_LIBDUMBNET$]) m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_LIBCURL$]) m4trace:configure.ac:357: -1- m4_pattern_allow([^WITH_BLUEDOT$]) m4trace:configure.ac:359: -1- PKG_CHECK_MODULES([LIBFASTJSON], [libfastjson >= 0.0.0]) m4trace:configure.ac:359: -1- m4_pattern_allow([^LIBFASTJSON_CFLAGS$]) m4trace:configure.ac:359: -1- m4_pattern_allow([^LIBFASTJSON_LIBS$]) m4trace:configure.ac:359: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_CFLAGS=`$PKG_CONFIG --[]cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:359: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_LIBS=`$PKG_CONFIG --[]libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:359: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:364: -1- m4_pattern_allow([^WITH_SNORTSAM$]) m4trace:configure.ac:368: -1- m4_pattern_allow([^CONFIG_FILE_PATH$]) m4trace:configure.ac:370: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:371: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:372: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:373: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:374: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:382: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:382: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:382: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) m4trace:configure.ac:382: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) m4trace:configure.ac:382: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) m4trace:configure.ac:382: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) m4trace:configure.ac:382: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) m4trace:configure.ac:382: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) m4trace:configure.ac:382: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS sagan-1.1.2/autom4te.cache/traces.20000644000175000017500000017332512770373007015737 0ustar champchampm4trace:aclocal.m4:1421: -1- m4_include([m4/ax_check_compile_flag.m4]) m4trace:aclocal.m4:1422: -1- m4_include([m4/ax_ext.m4]) m4trace:aclocal.m4:1423: -1- m4_include([m4/ax_gcc_x86_avx_xgetbv.m4]) m4trace:aclocal.m4:1424: -1- m4_include([m4/ax_gcc_x86_cpuid.m4]) m4trace:configure.ac:4: -1- AC_INIT m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:4: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:4: -1- AC_SUBST([SHELL]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([SHELL]) m4trace:configure.ac:4: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.ac:4: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_NAME]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_STRING]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PACKAGE_URL]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:4: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([exec_prefix]) m4trace:configure.ac:4: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.ac:4: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([prefix]) m4trace:configure.ac:4: -1- m4_pattern_allow([^prefix$]) m4trace:configure.ac:4: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([program_transform_name]) m4trace:configure.ac:4: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.ac:4: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([bindir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^bindir$]) m4trace:configure.ac:4: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([sbindir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.ac:4: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([libexecdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.ac:4: -1- AC_SUBST([datarootdir], ['${prefix}/share']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([datarootdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.ac:4: -1- AC_SUBST([datadir], ['${datarootdir}']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([datadir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^datadir$]) m4trace:configure.ac:4: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([sysconfdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.ac:4: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([sharedstatedir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.ac:4: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([localstatedir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.ac:4: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([includedir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^includedir$]) m4trace:configure.ac:4: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([oldincludedir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.ac:4: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], ['${datarootdir}/doc/${PACKAGE_TARNAME}'], ['${datarootdir}/doc/${PACKAGE}'])]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([docdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^docdir$]) m4trace:configure.ac:4: -1- AC_SUBST([infodir], ['${datarootdir}/info']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([infodir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^infodir$]) m4trace:configure.ac:4: -1- AC_SUBST([htmldir], ['${docdir}']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([htmldir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.ac:4: -1- AC_SUBST([dvidir], ['${docdir}']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([dvidir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.ac:4: -1- AC_SUBST([pdfdir], ['${docdir}']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([pdfdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.ac:4: -1- AC_SUBST([psdir], ['${docdir}']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([psdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^psdir$]) m4trace:configure.ac:4: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([libdir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^libdir$]) m4trace:configure.ac:4: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([localedir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^localedir$]) m4trace:configure.ac:4: -1- AC_SUBST([mandir], ['${datarootdir}/man']) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([mandir]) m4trace:configure.ac:4: -1- m4_pattern_allow([^mandir$]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ @%:@undef PACKAGE_NAME]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ @%:@undef PACKAGE_TARNAME]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ @%:@undef PACKAGE_VERSION]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ @%:@undef PACKAGE_STRING]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ @%:@undef PACKAGE_BUGREPORT]) m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ @%:@undef PACKAGE_URL]) m4trace:configure.ac:4: -1- AC_SUBST([DEFS]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([DEFS]) m4trace:configure.ac:4: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.ac:4: -1- AC_SUBST([ECHO_C]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([ECHO_C]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.ac:4: -1- AC_SUBST([ECHO_N]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([ECHO_N]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.ac:4: -1- AC_SUBST([ECHO_T]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([ECHO_T]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.ac:4: -1- AC_SUBST([LIBS]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:4: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:4: -1- AC_SUBST([build_alias]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([build_alias]) m4trace:configure.ac:4: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.ac:4: -1- AC_SUBST([host_alias]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([host_alias]) m4trace:configure.ac:4: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.ac:4: -1- AC_SUBST([target_alias]) m4trace:configure.ac:4: -1- AC_SUBST_TRACE([target_alias]) m4trace:configure.ac:4: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:6: -1- AC_CANONICAL_SYSTEM m4trace:configure.ac:6: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:1857: AC_CANONICAL_SYSTEM is expanded from... configure.ac:6: the top level]) m4trace:configure.ac:6: -1- AC_CANONICAL_TARGET m4trace:configure.ac:6: -1- AC_CANONICAL_HOST m4trace:configure.ac:6: -1- AC_CANONICAL_BUILD m4trace:configure.ac:6: -1- AC_REQUIRE_AUX_FILE([config.sub]) m4trace:configure.ac:6: -1- AC_REQUIRE_AUX_FILE([config.guess]) m4trace:configure.ac:6: -1- AC_SUBST([build], [$ac_cv_build]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([build]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build$]) m4trace:configure.ac:6: -1- AC_SUBST([build_cpu], [$[1]]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([build_cpu]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.ac:6: -1- AC_SUBST([build_vendor], [$[2]]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([build_vendor]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.ac:6: -1- AC_SUBST([build_os]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([build_os]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build_os$]) m4trace:configure.ac:6: -1- AC_SUBST([host], [$ac_cv_host]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([host]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host$]) m4trace:configure.ac:6: -1- AC_SUBST([host_cpu], [$[1]]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([host_cpu]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.ac:6: -1- AC_SUBST([host_vendor], [$[2]]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([host_vendor]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.ac:6: -1- AC_SUBST([host_os]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([host_os]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host_os$]) m4trace:configure.ac:6: -1- AC_SUBST([target], [$ac_cv_target]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([target]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target$]) m4trace:configure.ac:6: -1- AC_SUBST([target_cpu], [$[1]]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([target_cpu]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target_cpu$]) m4trace:configure.ac:6: -1- AC_SUBST([target_vendor], [$[2]]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([target_vendor]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target_vendor$]) m4trace:configure.ac:6: -1- AC_SUBST([target_os]) m4trace:configure.ac:6: -1- AC_SUBST_TRACE([target_os]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target_os$]) m4trace:configure.ac:7: -1- _m4_warn([obsolete], [The macro `AC_GNU_SOURCE' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:314: AC_GNU_SOURCE is expanded from... configure.ac:7: the top level]) m4trace:configure.ac:7: -1- AC_SUBST([CC]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- AC_SUBST([CFLAGS]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([CFLAGS]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:7: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.ac:7: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:7: -1- AC_SUBST([LIBS]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:7: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:7: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:7: -1- AC_SUBST([CC]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- AC_SUBST([CC]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- AC_SUBST([CC]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- AC_SUBST([CC]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([ac_ct_CC]) m4trace:configure.ac:7: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:7: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([EXEEXT]) m4trace:configure.ac:7: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:7: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([OBJEXT]) m4trace:configure.ac:7: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.ac:7: -1- AC_REQUIRE_AUX_FILE([compile]) m4trace:configure.ac:7: -1- AC_SUBST([CPP]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:7: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:7: -1- AC_SUBST([CPP]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:7: -1- AC_SUBST([GREP]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([GREP]) m4trace:configure.ac:7: -1- m4_pattern_allow([^GREP$]) m4trace:configure.ac:7: -1- AC_SUBST([EGREP]) m4trace:configure.ac:7: -1- AC_SUBST_TRACE([EGREP]) m4trace:configure.ac:7: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.ac:7: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:7: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ @%:@undef STDC_HEADERS]) m4trace:configure.ac:7: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TYPES_H]) m4trace:configure.ac:7: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_STAT_H]) m4trace:configure.ac:7: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) m4trace:configure.ac:7: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) m4trace:configure.ac:7: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_MEMORY_H]) m4trace:configure.ac:7: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRINGS_H]) m4trace:configure.ac:7: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_INTTYPES_H]) m4trace:configure.ac:7: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDINT_H]) m4trace:configure.ac:7: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_SOURCE]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_POSIX_SOURCE$]) m4trace:configure.ac:7: -1- AH_OUTPUT([_POSIX_SOURCE], [/* Define to 1 if you need to in order for `stat\' and other things to work. */ @%:@undef _POSIX_SOURCE]) m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_1_SOURCE]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_POSIX_1_SOURCE$]) m4trace:configure.ac:7: -1- AH_OUTPUT([_POSIX_1_SOURCE], [/* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ @%:@undef _POSIX_1_SOURCE]) m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([_MINIX]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_MINIX$]) m4trace:configure.ac:7: -1- AH_OUTPUT([_MINIX], [/* Define to 1 if on MINIX. */ @%:@undef _MINIX]) m4trace:configure.ac:7: -1- AH_OUTPUT([USE_SYSTEM_EXTENSIONS], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([__EXTENSIONS__]) m4trace:configure.ac:7: -1- m4_pattern_allow([^__EXTENSIONS__$]) m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([_ALL_SOURCE]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_ALL_SOURCE$]) m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([_GNU_SOURCE]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_GNU_SOURCE$]) m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_PTHREAD_SEMANTICS]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_POSIX_PTHREAD_SEMANTICS$]) m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([_TANDEM_SOURCE]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_TANDEM_SOURCE$]) m4trace:configure.ac:10: -1- AM_MAINTAINER_MODE([disable]) m4trace:configure.ac:10: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) m4trace:configure.ac:10: -1- AC_SUBST([MAINTAINER_MODE_TRUE]) m4trace:configure.ac:10: -1- AC_SUBST_TRACE([MAINTAINER_MODE_TRUE]) m4trace:configure.ac:10: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) m4trace:configure.ac:10: -1- AC_SUBST([MAINTAINER_MODE_FALSE]) m4trace:configure.ac:10: -1- AC_SUBST_TRACE([MAINTAINER_MODE_FALSE]) m4trace:configure.ac:10: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) m4trace:configure.ac:10: -1- AC_SUBST([MAINT]) m4trace:configure.ac:10: -1- AC_SUBST_TRACE([MAINT]) m4trace:configure.ac:10: -1- m4_pattern_allow([^MAINT$]) m4trace:configure.ac:17: -2- AC_SUBST([ENDIAN], [big]) m4trace:configure.ac:17: -2- AC_SUBST_TRACE([ENDIAN]) m4trace:configure.ac:17: -2- m4_pattern_allow([^ENDIAN$]) m4trace:configure.ac:17: -2- AC_SUBST([ENDIAN], [little]) m4trace:configure.ac:17: -2- AC_SUBST_TRACE([ENDIAN]) m4trace:configure.ac:17: -2- m4_pattern_allow([^ENDIAN$]) m4trace:configure.ac:17: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif]) m4trace:configure.ac:17: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD]) m4trace:configure.ac:17: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) m4trace:configure.ac:17: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */ @%:@undef AC_APPLE_UNIVERSAL_BUILD]) m4trace:configure.ac:179: -1- AC_SUBST([VERSION]) m4trace:configure.ac:179: -1- AC_SUBST_TRACE([VERSION]) m4trace:configure.ac:179: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:180: -1- AM_INIT_AUTOMAKE([sagan], [${VERSION}]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:180: -1- AM_AUTOMAKE_VERSION([1.14.1]) m4trace:configure.ac:180: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.ac:180: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:180: -1- AC_SUBST([INSTALL_SCRIPT]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.ac:180: -1- AC_SUBST([INSTALL_DATA]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([INSTALL_DATA]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.ac:180: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([am__isrc]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.ac:180: -1- AC_SUBST([CYGPATH_W]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([CYGPATH_W]) m4trace:configure.ac:180: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.ac:180: -1- _m4_warn([obsolete], [AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.], [aclocal.m4:672: AM_INIT_AUTOMAKE is expanded from... configure.ac:180: the top level]) m4trace:configure.ac:180: -1- AC_SUBST([PACKAGE], [sagan]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([PACKAGE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:180: -1- AC_SUBST([VERSION], [${VERSION}]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([VERSION]) m4trace:configure.ac:180: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:180: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:180: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ @%:@undef PACKAGE]) m4trace:configure.ac:180: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) m4trace:configure.ac:180: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:180: -1- AH_OUTPUT([VERSION], [/* Version number of package */ @%:@undef VERSION]) m4trace:configure.ac:180: -1- AC_REQUIRE_AUX_FILE([missing]) m4trace:configure.ac:180: -1- AC_SUBST([ACLOCAL]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([ACLOCAL]) m4trace:configure.ac:180: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.ac:180: -1- AC_SUBST([AUTOCONF]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AUTOCONF]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.ac:180: -1- AC_SUBST([AUTOMAKE]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AUTOMAKE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.ac:180: -1- AC_SUBST([AUTOHEADER]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AUTOHEADER]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.ac:180: -1- AC_SUBST([MAKEINFO]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([MAKEINFO]) m4trace:configure.ac:180: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.ac:180: -1- AC_SUBST([install_sh]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([install_sh]) m4trace:configure.ac:180: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.ac:180: -1- AC_SUBST([STRIP]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([STRIP]) m4trace:configure.ac:180: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:180: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.ac:180: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.ac:180: -1- AC_SUBST([MKDIR_P]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([MKDIR_P]) m4trace:configure.ac:180: -1- m4_pattern_allow([^MKDIR_P$]) m4trace:configure.ac:180: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)']) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([mkdir_p]) m4trace:configure.ac:180: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.ac:180: -1- AC_SUBST([AWK]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AWK]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AWK$]) m4trace:configure.ac:180: -1- AC_SUBST([SET_MAKE]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([SET_MAKE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:180: -1- AC_SUBST([am__leading_dot]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([am__leading_dot]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.ac:180: -1- AC_SUBST([AMTAR], ['$${TAR-tar}']) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AMTAR]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.ac:180: -1- AC_SUBST([am__tar]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([am__tar]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.ac:180: -1- AC_SUBST([am__untar]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([am__untar]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.ac:180: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([DEPDIR]) m4trace:configure.ac:180: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.ac:180: -1- AC_SUBST([am__include]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([am__include]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__include$]) m4trace:configure.ac:180: -1- AC_SUBST([am__quote]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([am__quote]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.ac:180: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.ac:180: -1- AC_SUBST([AMDEP_TRUE]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AMDEP_TRUE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.ac:180: -1- AC_SUBST([AMDEP_FALSE]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AMDEP_FALSE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.ac:180: -1- AC_SUBST([AMDEPBACKSLASH]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AMDEPBACKSLASH]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.ac:180: -1- AC_SUBST([am__nodep]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([am__nodep]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__nodep$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__nodep]) m4trace:configure.ac:180: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([CCDEPMODE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.ac:180: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:180: -1- AC_SUBST([am__fastdepCC_TRUE]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.ac:180: -1- AC_SUBST([am__fastdepCC_FALSE]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:180: -1- AM_SILENT_RULES m4trace:configure.ac:180: -1- AC_SUBST([AM_V]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AM_V]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_V$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AM_V]) m4trace:configure.ac:180: -1- AC_SUBST([AM_DEFAULT_V]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AM_DEFAULT_V]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_DEFAULT_V$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) m4trace:configure.ac:180: -1- AC_SUBST([AM_DEFAULT_VERBOSITY]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) m4trace:configure.ac:180: -1- AC_SUBST([AM_BACKSLASH]) m4trace:configure.ac:180: -1- AC_SUBST_TRACE([AM_BACKSLASH]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_BACKSLASH$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) m4trace:configure.ac:181: -1- AC_CONFIG_HEADERS([config.h]) m4trace:configure.ac:184: -1- AC_SUBST([CC]) m4trace:configure.ac:184: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- AC_SUBST([CFLAGS]) m4trace:configure.ac:184: -1- AC_SUBST_TRACE([CFLAGS]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:184: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:184: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.ac:184: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:184: -1- AC_SUBST([LIBS]) m4trace:configure.ac:184: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:184: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:184: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:184: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:184: -1- AC_SUBST([CC]) m4trace:configure.ac:184: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- AC_SUBST([CC]) m4trace:configure.ac:184: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- AC_SUBST([CC]) m4trace:configure.ac:184: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- AC_SUBST([CC]) m4trace:configure.ac:184: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:184: -1- AC_SUBST_TRACE([ac_ct_CC]) m4trace:configure.ac:184: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:184: -1- AC_REQUIRE_AUX_FILE([compile]) m4trace:configure.ac:186: -1- _m4_warn([obsolete], [The macro `AC_LANG_C' is obsolete. You should run autoupdate.], [../../lib/autoconf/c.m4:72: AC_LANG_C is expanded from... configure.ac:186: the top level]) m4trace:configure.ac:187: -1- AC_SUBST([SET_MAKE]) m4trace:configure.ac:187: -1- AC_SUBST_TRACE([SET_MAKE]) m4trace:configure.ac:187: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:189: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) m4trace:configure.ac:189: -1- AC_SUBST([PKG_CONFIG]) m4trace:configure.ac:189: -1- AC_SUBST_TRACE([PKG_CONFIG]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:189: -1- AC_SUBST([PKG_CONFIG_PATH]) m4trace:configure.ac:189: -1- AC_SUBST_TRACE([PKG_CONFIG_PATH]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG_PATH$]) m4trace:configure.ac:189: -1- AC_SUBST([PKG_CONFIG_LIBDIR]) m4trace:configure.ac:189: -1- AC_SUBST_TRACE([PKG_CONFIG_LIBDIR]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG_LIBDIR$]) m4trace:configure.ac:189: -1- AC_SUBST([PKG_CONFIG]) m4trace:configure.ac:189: -1- AC_SUBST_TRACE([PKG_CONFIG]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:192: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.ac:192: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:192: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ @%:@undef STDC_HEADERS]) m4trace:configure.ac:193: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_WAIT_H]) m4trace:configure.ac:193: -1- m4_pattern_allow([^HAVE_SYS_WAIT_H$]) m4trace:configure.ac:193: -1- AH_OUTPUT([HAVE_SYS_WAIT_H], [/* Define to 1 if you have that is POSIX.1 compatible. */ @%:@undef HAVE_SYS_WAIT_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_STDIO_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDIO_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TYPES_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDINT_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_INTTYPES_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_PTHREAD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_PTHREAD_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_CTYPE_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_CTYPE_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_ERRNO_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_ERRNO_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_FCNTL_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_STAT_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_GETOPT_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_TIME_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_TIME_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_PCRE_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_PCRE_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_STDARG_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDARG_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_LIMITS_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_LIMITS_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDBOOL_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_ARPA_INET_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_NETINET_IN_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TIME_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SOCKET_H]) m4trace:configure.ac:195: -1- AH_OUTPUT([HAVE_SYS_MMAP_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_MMAP_H]) m4trace:configure.ac:197: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SIZE_T]) m4trace:configure.ac:197: -1- m4_pattern_allow([^SIZEOF_SIZE_T$]) m4trace:configure.ac:197: -1- AH_OUTPUT([SIZEOF_SIZE_T], [/* The size of `size_t\', as computed by sizeof. */ @%:@undef SIZEOF_SIZE_T]) m4trace:configure.ac:202: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SETPIPE_SZ]) m4trace:configure.ac:202: -1- m4_pattern_allow([^HAVE_SETPIPE_SZ$]) m4trace:configure.ac:202: -1- AH_OUTPUT([HAVE_SETPIPE_SZ], [/* F_SETPIPE_SZ is supported */ @%:@undef HAVE_SETPIPE_SZ]) m4trace:configure.ac:218: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETPIPE_SZ]) m4trace:configure.ac:218: -1- m4_pattern_allow([^HAVE_GETPIPE_SZ$]) m4trace:configure.ac:218: -1- AH_OUTPUT([HAVE_GETPIPE_SZ], [/* F_GETPIPE_SZ is supported */ @%:@undef HAVE_GETPIPE_SZ]) m4trace:configure.ac:233: -1- AC_DEFINE_TRACE_LITERAL([const]) m4trace:configure.ac:233: -1- m4_pattern_allow([^const$]) m4trace:configure.ac:233: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ @%:@undef const]) m4trace:configure.ac:234: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) m4trace:configure.ac:234: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) m4trace:configure.ac:234: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ @%:@undef TIME_WITH_SYS_TIME]) m4trace:configure.ac:238: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) m4trace:configure.ac:238: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H]) m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) m4trace:configure.ac:238: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_MALLOC$]) m4trace:configure.ac:238: -1- AH_OUTPUT([HAVE_MALLOC], [/* Define to 1 if your system has a GNU libc compatible `malloc\' function, and to 0 otherwise. */ @%:@undef HAVE_MALLOC]) m4trace:configure.ac:238: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_MALLOC$]) m4trace:configure.ac:238: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS malloc.$ac_objext"]) m4trace:configure.ac:238: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.ac:238: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:238: -1- AC_LIBSOURCE([malloc.c]) m4trace:configure.ac:238: -1- AC_DEFINE_TRACE_LITERAL([malloc]) m4trace:configure.ac:238: -1- m4_pattern_allow([^malloc$]) m4trace:configure.ac:238: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */ @%:@undef malloc]) m4trace:configure.ac:239: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SELECT_H]) m4trace:configure.ac:239: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SOCKET_H]) m4trace:configure.ac:239: -1- AC_DEFINE_TRACE_LITERAL([SELECT_TYPE_ARG1]) m4trace:configure.ac:239: -1- m4_pattern_allow([^SELECT_TYPE_ARG1$]) m4trace:configure.ac:239: -1- AH_OUTPUT([SELECT_TYPE_ARG1], [/* Define to the type of arg 1 for `select\'. */ @%:@undef SELECT_TYPE_ARG1]) m4trace:configure.ac:239: -1- AC_DEFINE_TRACE_LITERAL([SELECT_TYPE_ARG234]) m4trace:configure.ac:239: -1- m4_pattern_allow([^SELECT_TYPE_ARG234$]) m4trace:configure.ac:239: -1- AH_OUTPUT([SELECT_TYPE_ARG234], [/* Define to the type of args 2, 3 and 4 for `select\'. */ @%:@undef SELECT_TYPE_ARG234]) m4trace:configure.ac:239: -1- AC_DEFINE_TRACE_LITERAL([SELECT_TYPE_ARG5]) m4trace:configure.ac:239: -1- m4_pattern_allow([^SELECT_TYPE_ARG5$]) m4trace:configure.ac:239: -1- AH_OUTPUT([SELECT_TYPE_ARG5], [/* Define to the type of arg 5 for `select\'. */ @%:@undef SELECT_TYPE_ARG5]) m4trace:configure.ac:240: -1- AC_DEFINE_TRACE_LITERAL([LSTAT_FOLLOWS_SLASHED_SYMLINK]) m4trace:configure.ac:240: -1- m4_pattern_allow([^LSTAT_FOLLOWS_SLASHED_SYMLINK$]) m4trace:configure.ac:240: -1- AH_OUTPUT([LSTAT_FOLLOWS_SLASHED_SYMLINK], [/* Define to 1 if `lstat\' dereferences a symlink specified with a trailing slash. */ @%:@undef LSTAT_FOLLOWS_SLASHED_SYMLINK]) m4trace:configure.ac:240: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS lstat.$ac_objext"]) m4trace:configure.ac:240: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.ac:240: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:240: -1- AC_LIBSOURCE([lstat.c]) m4trace:configure.ac:240: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS stat.$ac_objext"]) m4trace:configure.ac:240: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.ac:240: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:240: -1- AC_LIBSOURCE([stat.c]) m4trace:configure.ac:240: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STAT_EMPTY_STRING_BUG]) m4trace:configure.ac:240: -1- m4_pattern_allow([^HAVE_STAT_EMPTY_STRING_BUG$]) m4trace:configure.ac:240: -1- AH_OUTPUT([HAVE_STAT_EMPTY_STRING_BUG], [/* Define to 1 if `stat\' has the bug that it succeeds when given the zero-length file name argument. */ @%:@undef HAVE_STAT_EMPTY_STRING_BUG]) m4trace:configure.ac:241: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. You should run autoupdate.], [../../lib/autoconf/types.m4:746: AC_TYPE_SIGNAL is expanded from... configure.ac:241: the top level]) m4trace:configure.ac:241: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) m4trace:configure.ac:241: -1- m4_pattern_allow([^RETSIGTYPE$]) m4trace:configure.ac:241: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ @%:@undef RETSIGTYPE]) m4trace:configure.ac:242: -1- AH_OUTPUT([HAVE_STRFTIME], [/* Define to 1 if you have the `strftime\' function. */ @%:@undef HAVE_STRFTIME]) m4trace:configure.ac:242: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME]) m4trace:configure.ac:242: -1- m4_pattern_allow([^HAVE_STRFTIME$]) m4trace:configure.ac:242: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME]) m4trace:configure.ac:242: -1- m4_pattern_allow([^HAVE_STRFTIME$]) m4trace:configure.ac:243: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) m4trace:configure.ac:243: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.ac:243: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ @%:@undef pid_t]) m4trace:configure.ac:243: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_VFORK_H]) m4trace:configure.ac:243: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VFORK_H]) m4trace:configure.ac:243: -1- m4_pattern_allow([^HAVE_VFORK_H$]) m4trace:configure.ac:243: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */ @%:@undef HAVE_FORK]) m4trace:configure.ac:243: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */ @%:@undef HAVE_VFORK]) m4trace:configure.ac:243: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK]) m4trace:configure.ac:243: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) m4trace:configure.ac:243: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */ @%:@undef HAVE_WORKING_VFORK]) m4trace:configure.ac:243: -1- AC_DEFINE_TRACE_LITERAL([vfork]) m4trace:configure.ac:243: -1- m4_pattern_allow([^vfork$]) m4trace:configure.ac:243: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */ @%:@undef vfork]) m4trace:configure.ac:243: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK]) m4trace:configure.ac:243: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) m4trace:configure.ac:243: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */ @%:@undef HAVE_WORKING_FORK]) m4trace:configure.ac:244: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) m4trace:configure.ac:244: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H]) m4trace:configure.ac:244: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) m4trace:configure.ac:244: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) m4trace:configure.ac:244: -1- m4_pattern_allow([^HAVE_REALLOC$]) m4trace:configure.ac:244: -1- AH_OUTPUT([HAVE_REALLOC], [/* Define to 1 if your system has a GNU libc compatible `realloc\' function, and to 0 otherwise. */ @%:@undef HAVE_REALLOC]) m4trace:configure.ac:244: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) m4trace:configure.ac:244: -1- m4_pattern_allow([^HAVE_REALLOC$]) m4trace:configure.ac:244: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS realloc.$ac_objext"]) m4trace:configure.ac:244: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.ac:244: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:244: -1- AC_LIBSOURCE([realloc.c]) m4trace:configure.ac:244: -1- AC_DEFINE_TRACE_LITERAL([realloc]) m4trace:configure.ac:244: -1- m4_pattern_allow([^realloc$]) m4trace:configure.ac:244: -1- AH_OUTPUT([realloc], [/* Define to rpl_realloc if the replacement function should be used. */ @%:@undef realloc]) m4trace:configure.ac:245: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) m4trace:configure.ac:245: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.ac:245: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ @%:@undef pid_t]) m4trace:configure.ac:246: -1- AC_DEFINE_TRACE_LITERAL([size_t]) m4trace:configure.ac:246: -1- m4_pattern_allow([^size_t$]) m4trace:configure.ac:246: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ @%:@undef size_t]) m4trace:configure.ac:247: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME]) m4trace:configure.ac:247: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) m4trace:configure.ac:247: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your declares `struct tm\'. */ @%:@undef TM_IN_SYS_TIME]) m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALTIVEC]) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_ALTIVEC$]) m4trace:configure.ac:249: -1- AH_OUTPUT([HAVE_ALTIVEC], [/* Support Altivec instructions */ @%:@undef HAVE_ALTIVEC]) m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MMX]) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_MMX$]) m4trace:configure.ac:249: -1- AH_OUTPUT([HAVE_MMX], [/* Support mmx instructions */ @%:@undef HAVE_MMX]) m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSE]) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSE$]) m4trace:configure.ac:249: -1- AH_OUTPUT([HAVE_SSE], [/* Support SSE (Streaming SIMD Extensions) instructions */ @%:@undef HAVE_SSE]) m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSE2]) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSE2$]) m4trace:configure.ac:249: -1- AH_OUTPUT([HAVE_SSE2], [/* Support SSE2 (Streaming SIMD Extensions 2) instructions */ @%:@undef HAVE_SSE2]) m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSE3]) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSE3$]) m4trace:configure.ac:249: -1- AH_OUTPUT([HAVE_SSE3], [/* Support SSE3 (Streaming SIMD Extensions 3) instructions */ @%:@undef HAVE_SSE3]) m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSSE3]) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSSE3$]) m4trace:configure.ac:249: -1- AH_OUTPUT([HAVE_SSSE3], [/* Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions */ @%:@undef HAVE_SSSE3]) m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSE4_1]) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSE4_1$]) m4trace:configure.ac:249: -1- AH_OUTPUT([HAVE_SSE4_1], [/* Support SSSE4.1 (Streaming SIMD Extensions 4.1) instructions */ @%:@undef HAVE_SSE4_1]) m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSE4_2]) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_SSE4_2$]) m4trace:configure.ac:249: -1- AH_OUTPUT([HAVE_SSE4_2], [/* Support SSSE4.2 (Streaming SIMD Extensions 4.2) instructions */ @%:@undef HAVE_SSE4_2]) m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AVX]) m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_AVX$]) m4trace:configure.ac:249: -1- AH_OUTPUT([HAVE_AVX], [/* Support AVX (Advanced Vector Extensions) instructions */ @%:@undef HAVE_AVX]) m4trace:configure.ac:249: -1- AC_SUBST([SIMD_FLAGS]) m4trace:configure.ac:249: -1- AC_SUBST_TRACE([SIMD_FLAGS]) m4trace:configure.ac:249: -1- m4_pattern_allow([^SIMD_FLAGS$]) m4trace:configure.ac:250: -1- AC_SUBST([CCAS]) m4trace:configure.ac:250: -1- AC_SUBST_TRACE([CCAS]) m4trace:configure.ac:250: -1- m4_pattern_allow([^CCAS$]) m4trace:configure.ac:250: -1- AC_SUBST([CCASFLAGS]) m4trace:configure.ac:250: -1- AC_SUBST_TRACE([CCASFLAGS]) m4trace:configure.ac:250: -1- m4_pattern_allow([^CCASFLAGS$]) m4trace:configure.ac:250: -1- AC_SUBST([CCASDEPMODE], [depmode=$am_cv_CCAS_dependencies_compiler_type]) m4trace:configure.ac:250: -1- AC_SUBST_TRACE([CCASDEPMODE]) m4trace:configure.ac:250: -1- m4_pattern_allow([^CCASDEPMODE$]) m4trace:configure.ac:250: -1- AM_CONDITIONAL([am__fastdepCCAS], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:250: -1- AC_SUBST([am__fastdepCCAS_TRUE]) m4trace:configure.ac:250: -1- AC_SUBST_TRACE([am__fastdepCCAS_TRUE]) m4trace:configure.ac:250: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$]) m4trace:configure.ac:250: -1- AC_SUBST([am__fastdepCCAS_FALSE]) m4trace:configure.ac:250: -1- AC_SUBST_TRACE([am__fastdepCCAS_FALSE]) m4trace:configure.ac:250: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$]) m4trace:configure.ac:250: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE]) m4trace:configure.ac:250: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_SELECT], [/* Define to 1 if you have the `select\' function. */ @%:@undef HAVE_SELECT]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */ @%:@undef HAVE_STRSTR]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */ @%:@undef HAVE_STRCHR]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_STRCMP], [/* Define to 1 if you have the `strcmp\' function. */ @%:@undef HAVE_STRCMP]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_STRLEN], [/* Define to 1 if you have the `strlen\' function. */ @%:@undef HAVE_STRLEN]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_SIZEOF], [/* Define to 1 if you have the `sizeof\' function. */ @%:@undef HAVE_SIZEOF]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_WRITE], [/* Define to 1 if you have the `write\' function. */ @%:@undef HAVE_WRITE]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the `snprintf\' function. */ @%:@undef HAVE_SNPRINTF]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_STRNCAT], [/* Define to 1 if you have the `strncat\' function. */ @%:@undef HAVE_STRNCAT]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_STRLCAT], [/* Define to 1 if you have the `strlcat\' function. */ @%:@undef HAVE_STRLCAT]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_STRLCPY], [/* Define to 1 if you have the `strlcpy\' function. */ @%:@undef HAVE_STRLCPY]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_GETOPT_LONG], [/* Define to 1 if you have the `getopt_long\' function. */ @%:@undef HAVE_GETOPT_LONG]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME], [/* Define to 1 if you have the `gethostbyname\' function. */ @%:@undef HAVE_GETHOSTBYNAME]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */ @%:@undef HAVE_SOCKET]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_HTONS], [/* Define to 1 if you have the `htons\' function. */ @%:@undef HAVE_HTONS]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_CONNECT], [/* Define to 1 if you have the `connect\' function. */ @%:@undef HAVE_CONNECT]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_SEND], [/* Define to 1 if you have the `send\' function. */ @%:@undef HAVE_SEND]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_RECV], [/* Define to 1 if you have the `recv\' function. */ @%:@undef HAVE_RECV]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_DUP2], [/* Define to 1 if you have the `dup2\' function. */ @%:@undef HAVE_DUP2]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_STRSPN], [/* Define to 1 if you have the `strspn\' function. */ @%:@undef HAVE_STRSPN]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_STRDUP], [/* Define to 1 if you have the `strdup\' function. */ @%:@undef HAVE_STRDUP]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ @%:@undef HAVE_MEMSET]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_ACCESS], [/* Define to 1 if you have the `access\' function. */ @%:@undef HAVE_ACCESS]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_FTRUNCATE], [/* Define to 1 if you have the `ftruncate\' function. */ @%:@undef HAVE_FTRUNCATE]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ @%:@undef HAVE_STRERROR]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have the `mmap\' function. */ @%:@undef HAVE_MMAP]) m4trace:configure.ac:252: -1- AH_OUTPUT([HAVE_SHM_OPEN], [/* Define to 1 if you have the `shm_open\' function. */ @%:@undef HAVE_SHM_OPEN]) m4trace:configure.ac:254: -1- AH_OUTPUT([HAVE_LIBPCRE], [/* Define to 1 if you have the `pcre\' library (-lpcre). */ @%:@undef HAVE_LIBPCRE]) m4trace:configure.ac:254: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPCRE]) m4trace:configure.ac:254: -1- m4_pattern_allow([^HAVE_LIBPCRE$]) m4trace:configure.ac:255: -1- AH_OUTPUT([HAVE_LIBPTHREAD], [/* Define to 1 if you have the `pthread\' library (-lpthread). */ @%:@undef HAVE_LIBPTHREAD]) m4trace:configure.ac:255: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPTHREAD]) m4trace:configure.ac:255: -1- m4_pattern_allow([^HAVE_LIBPTHREAD$]) m4trace:configure.ac:256: -1- AH_OUTPUT([HAVE_LIBM], [/* Define to 1 if you have the `m\' library (-lm). */ @%:@undef HAVE_LIBM]) m4trace:configure.ac:256: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBM]) m4trace:configure.ac:256: -1- m4_pattern_allow([^HAVE_LIBM$]) m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_LIBRT], [/* Define to 1 if you have the `rt\' library (-lrt). */ @%:@undef HAVE_LIBRT]) m4trace:configure.ac:257: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRT]) m4trace:configure.ac:257: -1- m4_pattern_allow([^HAVE_LIBRT$]) m4trace:configure.ac:261: -1- AC_DEFINE_TRACE_LITERAL([WITH_SYSSTRSTR]) m4trace:configure.ac:261: -1- m4_pattern_allow([^WITH_SYSSTRSTR$]) m4trace:configure.ac:261: -1- AH_OUTPUT([WITH_SYSSTRSTR], [/* With system strstr */ @%:@undef WITH_SYSSTRSTR]) m4trace:configure.ac:267: -1- AC_DEFINE_TRACE_LITERAL([WITH_SYSLOG]) m4trace:configure.ac:267: -1- m4_pattern_allow([^WITH_SYSLOG$]) m4trace:configure.ac:267: -1- AH_OUTPUT([WITH_SYSLOG], [/* With Syslog */ @%:@undef WITH_SYSLOG]) m4trace:configure.ac:273: -1- AH_OUTPUT([HAVE_LIBMAXMINDDB], [/* Define to 1 if you have the `maxminddb\' library (-lmaxminddb). */ @%:@undef HAVE_LIBMAXMINDDB]) m4trace:configure.ac:273: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBMAXMINDDB]) m4trace:configure.ac:273: -1- m4_pattern_allow([^HAVE_LIBMAXMINDDB$]) m4trace:configure.ac:280: -1- AH_OUTPUT([HAVE_LIBESMTP], [/* Define to 1 if you have the `esmtp\' library (-lesmtp). */ @%:@undef HAVE_LIBESMTP]) m4trace:configure.ac:280: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBESMTP]) m4trace:configure.ac:280: -1- m4_pattern_allow([^HAVE_LIBESMTP$]) m4trace:configure.ac:287: -1- AC_SUBST([LIBFASTJSON_CFLAGS]) m4trace:configure.ac:287: -1- AC_SUBST_TRACE([LIBFASTJSON_CFLAGS]) m4trace:configure.ac:287: -1- m4_pattern_allow([^LIBFASTJSON_CFLAGS$]) m4trace:configure.ac:287: -1- AC_SUBST([LIBFASTJSON_LIBS]) m4trace:configure.ac:287: -1- AC_SUBST_TRACE([LIBFASTJSON_LIBS]) m4trace:configure.ac:287: -1- m4_pattern_allow([^LIBFASTJSON_LIBS$]) m4trace:configure.ac:292: -1- AC_SUBST([LIBESTR_CFLAGS]) m4trace:configure.ac:292: -1- AC_SUBST_TRACE([LIBESTR_CFLAGS]) m4trace:configure.ac:292: -1- m4_pattern_allow([^LIBESTR_CFLAGS$]) m4trace:configure.ac:292: -1- AC_SUBST([LIBESTR_LIBS]) m4trace:configure.ac:292: -1- AC_SUBST_TRACE([LIBESTR_LIBS]) m4trace:configure.ac:292: -1- m4_pattern_allow([^LIBESTR_LIBS$]) m4trace:configure.ac:293: -1- AC_SUBST([LIBLOGNORM_CFLAGS]) m4trace:configure.ac:293: -1- AC_SUBST_TRACE([LIBLOGNORM_CFLAGS]) m4trace:configure.ac:293: -1- m4_pattern_allow([^LIBLOGNORM_CFLAGS$]) m4trace:configure.ac:293: -1- AC_SUBST([LIBLOGNORM_LIBS]) m4trace:configure.ac:293: -1- AC_SUBST_TRACE([LIBLOGNORM_LIBS]) m4trace:configure.ac:293: -1- m4_pattern_allow([^LIBLOGNORM_LIBS$]) m4trace:configure.ac:294: -1- AC_SUBST([LIBFASTJSON_CFLAGS]) m4trace:configure.ac:294: -1- AC_SUBST_TRACE([LIBFASTJSON_CFLAGS]) m4trace:configure.ac:294: -1- m4_pattern_allow([^LIBFASTJSON_CFLAGS$]) m4trace:configure.ac:294: -1- AC_SUBST([LIBFASTJSON_LIBS]) m4trace:configure.ac:294: -1- AC_SUBST_TRACE([LIBFASTJSON_LIBS]) m4trace:configure.ac:294: -1- m4_pattern_allow([^LIBFASTJSON_LIBS$]) m4trace:configure.ac:297: -1- AH_OUTPUT([HAVE_LIBESTR], [/* Define to 1 if you have the `estr\' library (-lestr). */ @%:@undef HAVE_LIBESTR]) m4trace:configure.ac:297: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBESTR]) m4trace:configure.ac:297: -1- m4_pattern_allow([^HAVE_LIBESTR$]) m4trace:configure.ac:301: -1- AH_OUTPUT([HAVE_LIBLOGNORM], [/* Define to 1 if you have the `lognorm\' library (-llognorm). */ @%:@undef HAVE_LIBLOGNORM]) m4trace:configure.ac:301: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBLOGNORM]) m4trace:configure.ac:301: -1- m4_pattern_allow([^HAVE_LIBLOGNORM$]) m4trace:configure.ac:316: -1- AH_OUTPUT([HAVE_LIBPCAP], [/* Define to 1 if you have the `pcap\' library (-lpcap). */ @%:@undef HAVE_LIBPCAP]) m4trace:configure.ac:316: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPCAP]) m4trace:configure.ac:316: -1- m4_pattern_allow([^HAVE_LIBPCAP$]) m4trace:configure.ac:325: -1- AH_OUTPUT([HAVE_DNET_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_DNET_H]) m4trace:configure.ac:325: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DNET_H]) m4trace:configure.ac:325: -1- m4_pattern_allow([^HAVE_DNET_H$]) m4trace:configure.ac:326: -1- AH_OUTPUT([HAVE_DUMBNET_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_DUMBNET_H]) m4trace:configure.ac:326: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DUMBNET_H]) m4trace:configure.ac:326: -1- m4_pattern_allow([^HAVE_DUMBNET_H$]) m4trace:configure.ac:337: -1- AH_OUTPUT([HAVE_LIBDNET], [/* Define to 1 if you have the `dnet\' library (-ldnet). */ @%:@undef HAVE_LIBDNET]) m4trace:configure.ac:337: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDNET]) m4trace:configure.ac:337: -1- m4_pattern_allow([^HAVE_LIBDNET$]) m4trace:configure.ac:338: -1- AH_OUTPUT([HAVE_LIBDUMBNET], [/* Define to 1 if you have the `dumbnet\' library (-ldumbnet). */ @%:@undef HAVE_LIBDUMBNET]) m4trace:configure.ac:338: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDUMBNET]) m4trace:configure.ac:338: -1- m4_pattern_allow([^HAVE_LIBDUMBNET$]) m4trace:configure.ac:353: -1- AH_OUTPUT([HAVE_LIBCURL], [/* Define to 1 if you have the `curl\' library (-lcurl). */ @%:@undef HAVE_LIBCURL]) m4trace:configure.ac:353: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBCURL]) m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_LIBCURL$]) m4trace:configure.ac:357: -1- AC_DEFINE_TRACE_LITERAL([WITH_BLUEDOT]) m4trace:configure.ac:357: -1- m4_pattern_allow([^WITH_BLUEDOT$]) m4trace:configure.ac:357: -1- AH_OUTPUT([WITH_BLUEDOT], [/* With Bluedot */ @%:@undef WITH_BLUEDOT]) m4trace:configure.ac:359: -1- AC_SUBST([LIBFASTJSON_CFLAGS]) m4trace:configure.ac:359: -1- AC_SUBST_TRACE([LIBFASTJSON_CFLAGS]) m4trace:configure.ac:359: -1- m4_pattern_allow([^LIBFASTJSON_CFLAGS$]) m4trace:configure.ac:359: -1- AC_SUBST([LIBFASTJSON_LIBS]) m4trace:configure.ac:359: -1- AC_SUBST_TRACE([LIBFASTJSON_LIBS]) m4trace:configure.ac:359: -1- m4_pattern_allow([^LIBFASTJSON_LIBS$]) m4trace:configure.ac:364: -1- AC_DEFINE_TRACE_LITERAL([WITH_SNORTSAM]) m4trace:configure.ac:364: -1- m4_pattern_allow([^WITH_SNORTSAM$]) m4trace:configure.ac:364: -1- AH_OUTPUT([WITH_SNORTSAM], [/* With Snortsam */ @%:@undef WITH_SNORTSAM]) m4trace:configure.ac:368: -1- AC_DEFINE_TRACE_LITERAL([CONFIG_FILE_PATH]) m4trace:configure.ac:368: -1- m4_pattern_allow([^CONFIG_FILE_PATH$]) m4trace:configure.ac:368: -1- AH_OUTPUT([CONFIG_FILE_PATH], [/* Sagan configuration file */ @%:@undef CONFIG_FILE_PATH]) m4trace:configure.ac:370: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.ac:370: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:371: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.ac:371: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:372: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.ac:372: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:373: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.ac:373: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:374: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.ac:374: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:376: -1- AC_CONFIG_FILES([ \ Makefile \ src/Makefile]) m4trace:configure.ac:382: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.ac:382: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:382: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([LTLIBOBJS]) m4trace:configure.ac:382: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:382: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) m4trace:configure.ac:382: -1- AC_SUBST([am__EXEEXT_TRUE]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) m4trace:configure.ac:382: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) m4trace:configure.ac:382: -1- AC_SUBST([am__EXEEXT_FALSE]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) m4trace:configure.ac:382: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) m4trace:configure.ac:382: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) m4trace:configure.ac:382: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([top_builddir]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([top_build_prefix]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([srcdir]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([abs_srcdir]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([top_srcdir]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([abs_top_srcdir]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([builddir]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([abs_builddir]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([abs_top_builddir]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([INSTALL]) m4trace:configure.ac:382: -1- AC_SUBST_TRACE([MKDIR_P]) sagan-1.1.2/autom4te.cache/traces.00000644000175000017500000016256712770373003015737 0ustar champchampm4trace:/usr/share/aclocal/pkg.m4:27: -1- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ]) m4trace:/usr/share/aclocal/pkg.m4:60: -1- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) m4trace:/usr/share/aclocal/pkg.m4:86: -1- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ]) m4trace:/usr/share/aclocal/pkg.m4:106: -1- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ]) m4trace:/usr/share/aclocal/pkg.m4:169: -1- AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) m4trace:/usr/share/aclocal/pkg.m4:189: -1- AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) m4trace:/usr/share/aclocal/pkg.m4:206: -1- AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ]) m4trace:/usr/share/aclocal-1.14/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) m4trace:/usr/share/aclocal-1.14/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) m4trace:/usr/share/aclocal-1.14/as.m4:11: -1- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. AC_REQUIRE([AC_PROG_CC]) test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl ]) m4trace:/usr/share/aclocal-1.14/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) m4trace:/usr/share/aclocal-1.14/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl 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])]) m4trace:/usr/share/aclocal-1.14/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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 am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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 cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none 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]) ]) m4trace:/usr/share/aclocal-1.14/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) m4trace:/usr/share/aclocal-1.14/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) m4trace:/usr/share/aclocal-1.14/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ]) m4trace:/usr/share/aclocal-1.14/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) m4trace:/usr/share/aclocal-1.14/init.m4:29: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])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]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi ]) m4trace:/usr/share/aclocal-1.14/init.m4:183: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) m4trace:/usr/share/aclocal-1.14/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) m4trace:/usr/share/aclocal-1.14/lead-dot.m4:10: -1- 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])]) m4trace:/usr/share/aclocal-1.14/maintainer.m4:16: -1- AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ]) m4trace:/usr/share/aclocal-1.14/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .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]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) m4trace:/usr/share/aclocal-1.14/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) m4trace:/usr/share/aclocal-1.14/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) m4trace:/usr/share/aclocal-1.14/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) m4trace:/usr/share/aclocal-1.14/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) m4trace:/usr/share/aclocal-1.14/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) m4trace:/usr/share/aclocal-1.14/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) m4trace:/usr/share/aclocal-1.14/prog-cc-c-o.m4:12: -1- AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) m4trace:/usr/share/aclocal-1.14/prog-cc-c-o.m4:47: -1- AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) m4trace:/usr/share/aclocal-1.14/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) m4trace:/usr/share/aclocal-1.14/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) m4trace:/usr/share/aclocal-1.14/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) m4trace:/usr/share/aclocal-1.14/strip.m4:17: -1- 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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) m4trace:/usr/share/aclocal-1.14/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) m4trace:/usr/share/aclocal-1.14/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) m4trace:/usr/share/aclocal-1.14/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} 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 /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]) ]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:4: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:4: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^prefix$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^bindir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^datadir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^includedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^docdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^infodir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^psdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^libdir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^localedir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^mandir$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.ac:4: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:6: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:1857: AC_CANONICAL_SYSTEM is expanded from... configure.ac:6: the top level]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^build_os$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^host_os$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target_cpu$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target_vendor$]) m4trace:configure.ac:6: -1- m4_pattern_allow([^target_os$]) m4trace:configure.ac:7: -1- _m4_warn([obsolete], [The macro `AC_GNU_SOURCE' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:314: AC_GNU_SOURCE is expanded from... configure.ac:7: the top level]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.ac:7: -1- _AM_PROG_CC_C_O m4trace:configure.ac:7: -1- AM_AUX_DIR_EXPAND m4trace:configure.ac:7: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^GREP$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_POSIX_SOURCE$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_POSIX_1_SOURCE$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_MINIX$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^__EXTENSIONS__$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_ALL_SOURCE$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_GNU_SOURCE$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_POSIX_PTHREAD_SEMANTICS$]) m4trace:configure.ac:7: -1- m4_pattern_allow([^_TANDEM_SOURCE$]) m4trace:configure.ac:8: -1- _AM_CONFIG_MACRO_DIRS([m4]) m4trace:configure.ac:10: -1- AM_MAINTAINER_MODE([disable]) m4trace:configure.ac:10: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) m4trace:configure.ac:10: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$]) m4trace:configure.ac:10: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$]) m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE]) m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE]) m4trace:configure.ac:10: -1- m4_pattern_allow([^MAINT$]) m4trace:configure.ac:17: -2- m4_pattern_allow([^ENDIAN$]) m4trace:configure.ac:17: -2- m4_pattern_allow([^ENDIAN$]) m4trace:configure.ac:17: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) m4trace:configure.ac:179: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:180: -1- AM_INIT_AUTOMAKE([sagan], [${VERSION}]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:180: -1- AM_SET_CURRENT_AUTOMAKE_VERSION m4trace:configure.ac:180: -1- AM_AUTOMAKE_VERSION([1.14.1]) m4trace:configure.ac:180: -1- _AM_AUTOCONF_VERSION([2.69]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.ac:180: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.ac:180: -1- _m4_warn([obsolete], [AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.], [/usr/share/aclocal-1.14/init.m4:29: AM_INIT_AUTOMAKE is expanded from... configure.ac:180: the top level]) m4trace:configure.ac:180: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:180: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])]) m4trace:configure.ac:180: -2- _AM_MANGLE_OPTION([no-define]) m4trace:configure.ac:180: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:180: -1- AM_SANITY_CHECK m4trace:configure.ac:180: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) m4trace:configure.ac:180: -1- AM_MISSING_HAS_RUN m4trace:configure.ac:180: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.ac:180: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.ac:180: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.ac:180: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.ac:180: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) m4trace:configure.ac:180: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.ac:180: -1- AM_PROG_INSTALL_SH m4trace:configure.ac:180: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.ac:180: -1- AM_PROG_INSTALL_STRIP m4trace:configure.ac:180: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^MKDIR_P$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AWK$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:180: -1- AM_SET_LEADING_DOT m4trace:configure.ac:180: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.ac:180: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) m4trace:configure.ac:180: -2- _AM_MANGLE_OPTION([tar-ustar]) m4trace:configure.ac:180: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) m4trace:configure.ac:180: -2- _AM_MANGLE_OPTION([tar-pax]) m4trace:configure.ac:180: -1- _AM_PROG_TAR([v7]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.ac:180: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) m4trace:configure.ac:180: -2- _AM_MANGLE_OPTION([no-dependencies]) m4trace:configure.ac:180: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.ac:180: -1- AM_SET_DEPDIR m4trace:configure.ac:180: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.ac:180: -1- AM_OUTPUT_DEPENDENCY_COMMANDS m4trace:configure.ac:180: -1- AM_MAKE_INCLUDE m4trace:configure.ac:180: -1- m4_pattern_allow([^am__include$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.ac:180: -1- AM_DEP_TRACK m4trace:configure.ac:180: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__nodep$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__nodep]) m4trace:configure.ac:180: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.ac:180: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:180: -1- AM_SILENT_RULES m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_V$]) m4trace:configure.ac:180: -1- AM_SUBST_NOTMAKE([AM_V]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AM_V]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_DEFAULT_V$]) m4trace:configure.ac:180: -1- AM_SUBST_NOTMAKE([AM_DEFAULT_V]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^AM_BACKSLASH$]) m4trace:configure.ac:180: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:184: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:184: -1- _AM_PROG_CC_C_O m4trace:configure.ac:184: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) m4trace:configure.ac:186: -1- _m4_warn([obsolete], [The macro `AC_LANG_C' is obsolete. You should run autoupdate.], [../../lib/autoconf/c.m4:72: AC_LANG_C is expanded from... configure.ac:186: the top level]) m4trace:configure.ac:187: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:189: -1- PKG_PROG_PKG_CONFIG m4trace:configure.ac:189: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG_PATH$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG_LIBDIR$]) m4trace:configure.ac:189: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:192: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:193: -1- m4_pattern_allow([^HAVE_SYS_WAIT_H$]) m4trace:configure.ac:197: -1- m4_pattern_allow([^SIZEOF_SIZE_T$]) m4trace:configure.ac:202: -1- m4_pattern_allow([^HAVE_SETPIPE_SZ$]) m4trace:configure.ac:218: -1- m4_pattern_allow([^HAVE_GETPIPE_SZ$]) m4trace:configure.ac:233: -1- m4_pattern_allow([^const$]) m4trace:configure.ac:234: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_MALLOC$]) m4trace:configure.ac:238: -1- m4_pattern_allow([^HAVE_MALLOC$]) m4trace:configure.ac:238: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:238: -1- m4_pattern_allow([^malloc$]) m4trace:configure.ac:239: -1- m4_pattern_allow([^SELECT_TYPE_ARG1$]) m4trace:configure.ac:239: -1- m4_pattern_allow([^SELECT_TYPE_ARG234$]) m4trace:configure.ac:239: -1- m4_pattern_allow([^SELECT_TYPE_ARG5$]) m4trace:configure.ac:240: -1- m4_pattern_allow([^LSTAT_FOLLOWS_SLASHED_SYMLINK$]) m4trace:configure.ac:240: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:240: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:240: -1- m4_pattern_allow([^HAVE_STAT_EMPTY_STRING_BUG$]) m4trace:configure.ac:241: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. You should run autoupdate.], [../../lib/autoconf/types.m4:746: AC_TYPE_SIGNAL is expanded from... configure.ac:241: the top level]) m4trace:configure.ac:241: -1- m4_pattern_allow([^RETSIGTYPE$]) m4trace:configure.ac:242: -1- m4_pattern_allow([^HAVE_STRFTIME$]) m4trace:configure.ac:242: -1- m4_pattern_allow([^HAVE_STRFTIME$]) m4trace:configure.ac:243: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.ac:243: -1- m4_pattern_allow([^HAVE_VFORK_H$]) m4trace:configure.ac:243: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) m4trace:configure.ac:243: -1- m4_pattern_allow([^vfork$]) m4trace:configure.ac:243: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) m4trace:configure.ac:244: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) m4trace:configure.ac:244: -1- m4_pattern_allow([^HAVE_REALLOC$]) m4trace:configure.ac:244: -1- m4_pattern_allow([^HAVE_REALLOC$]) m4trace:configure.ac:244: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:244: -1- m4_pattern_allow([^realloc$]) m4trace:configure.ac:245: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.ac:246: -1- m4_pattern_allow([^size_t$]) m4trace:configure.ac:247: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) m4trace:configure.ac:250: -1- AM_PROG_AS m4trace:configure.ac:250: -1- m4_pattern_allow([^CCAS$]) m4trace:configure.ac:250: -1- m4_pattern_allow([^CCASFLAGS$]) m4trace:configure.ac:250: -1- _AM_IF_OPTION([no-dependencies], [], [_AM_DEPENDENCIES([CCAS])]) m4trace:configure.ac:250: -2- _AM_MANGLE_OPTION([no-dependencies]) m4trace:configure.ac:250: -1- _AM_DEPENDENCIES([CCAS]) m4trace:configure.ac:250: -1- m4_pattern_allow([^CCASDEPMODE$]) m4trace:configure.ac:250: -1- AM_CONDITIONAL([am__fastdepCCAS], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:250: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$]) m4trace:configure.ac:250: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$]) m4trace:configure.ac:250: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE]) m4trace:configure.ac:250: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE]) m4trace:configure.ac:254: -1- m4_pattern_allow([^HAVE_LIBPCRE$]) m4trace:configure.ac:255: -1- m4_pattern_allow([^HAVE_LIBPTHREAD$]) m4trace:configure.ac:256: -1- m4_pattern_allow([^HAVE_LIBM$]) m4trace:configure.ac:257: -1- m4_pattern_allow([^HAVE_LIBRT$]) m4trace:configure.ac:261: -1- m4_pattern_allow([^WITH_SYSSTRSTR$]) m4trace:configure.ac:267: -1- m4_pattern_allow([^WITH_SYSLOG$]) m4trace:configure.ac:273: -1- m4_pattern_allow([^HAVE_LIBMAXMINDDB$]) m4trace:configure.ac:280: -1- m4_pattern_allow([^HAVE_LIBESMTP$]) m4trace:configure.ac:287: -1- PKG_CHECK_MODULES([LIBFASTJSON], [libfastjson >= 0.0.0]) m4trace:configure.ac:287: -1- m4_pattern_allow([^LIBFASTJSON_CFLAGS$]) m4trace:configure.ac:287: -1- m4_pattern_allow([^LIBFASTJSON_LIBS$]) m4trace:configure.ac:287: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_CFLAGS=`$PKG_CONFIG --[]cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:287: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_LIBS=`$PKG_CONFIG --[]libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:287: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:292: -1- PKG_CHECK_MODULES([LIBESTR], [libestr >= 0.0.0]) m4trace:configure.ac:292: -1- m4_pattern_allow([^LIBESTR_CFLAGS$]) m4trace:configure.ac:292: -1- m4_pattern_allow([^LIBESTR_LIBS$]) m4trace:configure.ac:292: -1- PKG_CHECK_EXISTS([libestr >= 0.0.0], [pkg_cv_[]LIBESTR_CFLAGS=`$PKG_CONFIG --[]cflags "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:292: -1- PKG_CHECK_EXISTS([libestr >= 0.0.0], [pkg_cv_[]LIBESTR_LIBS=`$PKG_CONFIG --[]libs "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:292: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:293: -1- PKG_CHECK_MODULES([LIBLOGNORM], [lognorm >= 1.0.0]) m4trace:configure.ac:293: -1- m4_pattern_allow([^LIBLOGNORM_CFLAGS$]) m4trace:configure.ac:293: -1- m4_pattern_allow([^LIBLOGNORM_LIBS$]) m4trace:configure.ac:293: -1- PKG_CHECK_EXISTS([lognorm >= 1.0.0], [pkg_cv_[]LIBLOGNORM_CFLAGS=`$PKG_CONFIG --[]cflags "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:293: -1- PKG_CHECK_EXISTS([lognorm >= 1.0.0], [pkg_cv_[]LIBLOGNORM_LIBS=`$PKG_CONFIG --[]libs "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:293: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:294: -1- PKG_CHECK_MODULES([LIBFASTJSON], [libfastjson >= 0.0.0]) m4trace:configure.ac:294: -1- m4_pattern_allow([^LIBFASTJSON_CFLAGS$]) m4trace:configure.ac:294: -1- m4_pattern_allow([^LIBFASTJSON_LIBS$]) m4trace:configure.ac:294: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_CFLAGS=`$PKG_CONFIG --[]cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:294: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_LIBS=`$PKG_CONFIG --[]libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:294: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:297: -1- m4_pattern_allow([^HAVE_LIBESTR$]) m4trace:configure.ac:301: -1- m4_pattern_allow([^HAVE_LIBLOGNORM$]) m4trace:configure.ac:316: -1- m4_pattern_allow([^HAVE_LIBPCAP$]) m4trace:configure.ac:325: -1- m4_pattern_allow([^HAVE_DNET_H$]) m4trace:configure.ac:326: -1- m4_pattern_allow([^HAVE_DUMBNET_H$]) m4trace:configure.ac:337: -1- m4_pattern_allow([^HAVE_LIBDNET$]) m4trace:configure.ac:338: -1- m4_pattern_allow([^HAVE_LIBDUMBNET$]) m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_LIBCURL$]) m4trace:configure.ac:357: -1- m4_pattern_allow([^WITH_BLUEDOT$]) m4trace:configure.ac:359: -1- PKG_CHECK_MODULES([LIBFASTJSON], [libfastjson >= 0.0.0]) m4trace:configure.ac:359: -1- m4_pattern_allow([^LIBFASTJSON_CFLAGS$]) m4trace:configure.ac:359: -1- m4_pattern_allow([^LIBFASTJSON_LIBS$]) m4trace:configure.ac:359: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_CFLAGS=`$PKG_CONFIG --[]cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:359: -1- PKG_CHECK_EXISTS([libfastjson >= 0.0.0], [pkg_cv_[]LIBFASTJSON_LIBS=`$PKG_CONFIG --[]libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) m4trace:configure.ac:359: -1- _PKG_SHORT_ERRORS_SUPPORTED m4trace:configure.ac:364: -1- m4_pattern_allow([^WITH_SNORTSAM$]) m4trace:configure.ac:368: -1- m4_pattern_allow([^CONFIG_FILE_PATH$]) m4trace:configure.ac:370: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:371: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:372: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:373: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:374: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:382: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:382: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:382: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) m4trace:configure.ac:382: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) m4trace:configure.ac:382: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) m4trace:configure.ac:382: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) m4trace:configure.ac:382: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) m4trace:configure.ac:382: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) m4trace:configure.ac:382: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS sagan-1.1.2/autom4te.cache/output.00000644000175000017500000105562412770373003016012 0ustar champchamp@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.69. @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @%:@ @%:@ @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="src" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBLOGNORM_LIBS LIBLOGNORM_CFLAGS LIBESTR_LIBS LIBESTR_CFLAGS LIBFASTJSON_LIBS LIBFASTJSON_CFLAGS am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS LIB@&t@OBJS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM VERSION ENDIAN MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_snortsam enable_bluedot enable_esmtp enable_geoip2 enable_syslog enable_system_strstr with_esmtp_includes with_esmtp_libraries with_geoip2_includes with_geoip2_libraries enable_lognorm with_lognorm_includes with_lognorm_libraries enable_libfastjson with_libfastjson_includes with_libfastjson_c_libraries enable_libpcap with_libpcap_includes with_libpcap_libraries enable_libdnet with_libdnet_includes with_libdnet_libraries enable_dependency_tracking enable_silent_rules ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR CCAS CCASFLAGS LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS LIBESTR_CFLAGS LIBESTR_LIBS LIBLOGNORM_CFLAGS LIBLOGNORM_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @<:@@S|@ac_default_prefix@:>@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX @<:@PREFIX@:>@ By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-snortsam Disable Snortsam support. --enable-bluedot Enable Quadrant\'s "Bluedot" lookups. --enable-esmtp Enable libesmtp support. --enable-geoip2 Enable Maxmind GeoIP2 support. --disable-syslog Disable syslog support. --enable-system-strstr Enable system strstr. --disable-lognorm Disable Lognorm (liblognorm) support. --disable-libfastjson Disable libfastjson support. --disable-libpcap Disable libpcap (plog) support. --disable-libdnet Disable libdnet (unified2) support. --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-esmtp-includes=DIR libesmtp include directory --with-esmtp-libraries=DIR libesmtp library directory --with-geoip2-includes=DIR Maxmind GeoIP2 include directory --with-geoip2-libraries=DIR Maxmind GeoIP2 library directory --with-lognorm-includes=DIR liblognorm include directory --with-lognorm-libraries=DIR liblognorm library directory --with-libfastjson-includes=DIR libfastjson include directory --with-libfastjson-libraries=DIR libfastjson library directory --with-libpcap-includes=DIR libpcap include directory --with-libpcap-libraries=DIR libpcap library directory --with-libdnet-includes=DIR libdnet include directory --with-libdnet-libraries=DIR libdnet library directory Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) LIBFASTJSON_CFLAGS C compiler flags for LIBFASTJSON, overriding pkg-config LIBFASTJSON_LIBS linker flags for LIBFASTJSON, overriding pkg-config LIBESTR_CFLAGS C compiler flags for LIBESTR, overriding pkg-config LIBESTR_LIBS linker flags for LIBESTR, overriding pkg-config LIBLOGNORM_CFLAGS C compiler flags for LIBLOGNORM, overriding pkg-config LIBLOGNORM_LIBS linker flags for LIBLOGNORM, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile @%:@ ac_fn_c_try_cpp LINENO @%:@ ---------------------- @%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_cpp @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using @%:@ the include files in INCLUDES and setting the cache variable VAR @%:@ accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_mongrel @%:@ ac_fn_c_try_run LINENO @%:@ ---------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes @%:@ that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_run @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists and can be compiled using the include files in @%:@ INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_compile @%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES @%:@ -------------------------------------------- @%:@ Tries to find the compile-time value of EXPR in a program that includes @%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be @%:@ computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) < 0)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in @%:@(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } @%:@include @%:@include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link @%:@ ac_fn_c_check_func LINENO FUNC VAR @%:@ ---------------------------------- @%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_func @%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES @%:@ ------------------------------------------- @%:@ Tests whether TYPE exists after having included INCLUDES, setting cache @%:@ variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in @%:@(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "@%:@define _POSIX_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "@%:@define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "@%:@define __EXTENSIONS__ 1" >>confdefs.h $as_echo "@%:@define _ALL_SOURCE 1" >>confdefs.h $as_echo "@%:@define _GNU_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "@%:@define _TANDEM_SOURCE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } @%:@ Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE #VERSION=`cat $srcdir/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'` VERSION=`cat src/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) ENDIAN=big ;; #( no) ENDIAN=little ;; #( universal) $as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac @%:@ Check whether --enable-snortsam was given. if test "${enable_snortsam+set}" = set; then : enableval=$enable_snortsam; SNORTSAM="$enableval" else SNORTSAM="yes" fi @%:@ Check whether --enable-bluedot was given. if test "${enable_bluedot+set}" = set; then : enableval=$enable_bluedot; BLUEDOT="$enableval" else BLUEDOT="no" fi @%:@ Check whether --enable-esmtp was given. if test "${enable_esmtp+set}" = set; then : enableval=$enable_esmtp; ESMTP="$enableval" else ESMTP="no" fi @%:@ Check whether --enable-geoip2 was given. if test "${enable_geoip2+set}" = set; then : enableval=$enable_geoip2; GEOIP2="$enableval" else GEOIP2="no" fi @%:@ Check whether --enable-syslog was given. if test "${enable_syslog+set}" = set; then : enableval=$enable_syslog; SYSLOG="$enableval" else SYSLOG="yes" fi @%:@ Check whether --enable-system-strstr was given. if test "${enable_system_strstr+set}" = set; then : enableval=$enable_system_strstr; SYSSTRSTR="$enableval" else SYSSTRSTR="no" fi @%:@ Check whether --with-esmtp_includes was given. if test "${with_esmtp_includes+set}" = set; then : withval=$with_esmtp_includes; with_esmtp_includes="$withval" else with_esmtp_includes="no" fi @%:@ Check whether --with-esmtp_libraries was given. if test "${with_esmtp_libraries+set}" = set; then : withval=$with_esmtp_libraries; with_esmtp_libraries="$withval" else with_esmtp_libraries="no" fi if test "x$with_esmtp_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_esmtp_includes}" fi if test "x$with_esmtp_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_esmtp_libraries}" fi @%:@ Check whether --with-geoip2_includes was given. if test "${with_geoip2_includes+set}" = set; then : withval=$with_geoip2_includes; with_geoip2_includes="$withval" else with_geoip2_includes="no" fi @%:@ Check whether --with-geoip2_libraries was given. if test "${with_geoip2_libraries+set}" = set; then : withval=$with_geoip2_libraries; with_geoip2_libraries="$withval" else with_geoip2_libraries="no" fi if test "x$with_geoip2_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_geoip2_includes}" fi if test "x$with_geoip2_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_geoip2_libraries}" fi @%:@ Check whether --enable-lognorm was given. if test "${enable_lognorm+set}" = set; then : enableval=$enable_lognorm; LOGNORM="$enableval" else LOGNORM="yes" fi @%:@ Check whether --with-lognorm_includes was given. if test "${with_lognorm_includes+set}" = set; then : withval=$with_lognorm_includes; with_lognorm_includes="$withval" else with_lognorm_includes="no" fi @%:@ Check whether --with-lognorm_libraries was given. if test "${with_lognorm_libraries+set}" = set; then : withval=$with_lognorm_libraries; with_lognorm_libraries="$withval" else with_lognorm_libraries="no" fi if test "x$with_lognorm_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_lognorm_includes}" fi if test "x$with_lognorm_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_lognorm_libraries}" fi # -- @%:@ Check whether --enable-libfastjson was given. if test "${enable_libfastjson+set}" = set; then : enableval=$enable_libfastjson; FASTJSON="$enableval" else FASTJSON="yes" fi @%:@ Check whether --with-libfastjson_includes was given. if test "${with_libfastjson_includes+set}" = set; then : withval=$with_libfastjson_includes; with_libfastjson_includes="$withval" else with_libfastjson_includes="no" fi @%:@ Check whether --with-libfastjson_c_libraries was given. if test "${with_libfastjson_c_libraries+set}" = set; then : withval=$with_libfastjson_c_libraries; with_libfastjson_libraries="$withval" else with_libfastjson_libraries="no" fi if test "x$with_libfastjson_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libfastjson_includes}" fi if test "x$with_libfastjson_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libfastjson_libraries}" fi # -- @%:@ Check whether --enable-libpcap was given. if test "${enable_libpcap+set}" = set; then : enableval=$enable_libpcap; LIBPCAP="$enableval" else LIBPCAP="no" fi @%:@ Check whether --with-libpcap_includes was given. if test "${with_libpcap_includes+set}" = set; then : withval=$with_libpcap_includes; with_libpcap_includes="$withval" else with_libpcap_includes="no" fi @%:@ Check whether --with-libpcap_libraries was given. if test "${with_libpcap_libraries+set}" = set; then : withval=$with_libpcap_libraries; with_libpcap_libraries="$withval" else with_libpcap_libraries="no" fi if test "x$with_libpcap_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libpcap_includes}" fi if test "x$with_libpcap_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libpcap_libraries}" fi @%:@ Check whether --enable-libdnet was given. if test "${enable_libdnet+set}" = set; then : enableval=$enable_libdnet; LIBDNET="$enableval" else LIBDNET="yes" fi @%:@ Check whether --with-libdnet_includes was given. if test "${with_libdnet_includes+set}" = set; then : withval=$with_libdnet_includes; with_libdnet_includes="$withval" else with_libdnet_includes="no" fi @%:@ Check whether --with-libdnet_libraries was given. if test "${with_libdnet_libraries+set}" = set; then : withval=$with_libdnet_libraries; with_libdnet_libraries="$withval" else with_libdnet_libraries="no" fi if test "x$with_libdnet_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libdnet_includes}" fi if test "x$with_libdnet_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libdnet_libraries}" fi am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in @%:@(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } 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. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf @%:@ Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi @%:@ Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi 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=sagan VERSION=${VERSION} cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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 cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers config.h" # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "@%:@define HAVE_SYS_WAIT_H 1" >>confdefs.h fi for ac_header in stdio.h stdlib.h sys/types.h unistd.h stdint.h inttypes.h pthread.h ctype.h errno.h fcntl.h sys/stat.h string.h getopt.h time.h pcre.h stdarg.h limits.h stdbool.h arpa/inet.h netinet/in.h sys/time.h sys/socket.h sys/mmap.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 $as_echo "$ac_cv_sizeof_size_t" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF # F_SETPIPE_SZ in fcntl.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_SETPIPE_SZ in fcntl.h" >&5 $as_echo_n "checking for F_SETPIPE_SZ in fcntl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GNU_SOURCE #include #ifdef F_SETPIPE_SZ yes_have_f_setpipe_sz #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes_have_f_setpipe_sz" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "@%:@define HAVE_SETPIPE_SZ /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: F_SETPIPE_SZ not found, cannot alter FIFO" >&5 $as_echo "$as_me: F_SETPIPE_SZ not found, cannot alter FIFO" >&6;} fi rm -f conftest* # F_GETPIPE_SZ in fcntl.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_GETPIPE_SZ in fcntl.h" >&5 $as_echo_n "checking for F_GETPIPE_SZ in fcntl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GNU_SOURCE #include #ifdef F_GETPIPE_SZ yes_have_f_getpipe_sz #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes_have_f_getpipe_sz" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "@%:@define HAVE_GETPIPE_SZ /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: F_GETPIPE_SZ not found, cannot alter FIFO" >&5 $as_echo "$as_me: F_GETPIPE_SZ not found, cannot alter FIFO" >&6;} fi rm -f conftest* # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "@%:@define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "@%:@define TIME_WITH_SYS_TIME 1" >>confdefs.h fi # Checks for library functions. if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "@%:@define HAVE_MALLOC 1" >>confdefs.h else $as_echo "@%:@define HAVE_MALLOC 0" >>confdefs.h case " $LIB@&t@OBJS " in *" malloc.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS malloc.$ac_objext" ;; esac $as_echo "@%:@define malloc rpl_malloc" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$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 _ACEOF cat >>confdefs.h <<_ACEOF @%:@define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF @%:@define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF @%:@define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIB@&t@OBJS " in *" lstat.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIB@&t@OBJS " in *" stat.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF @%:@define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF @%:@define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STRFTIME 1 _ACEOF else # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strftime (); int main () { return strftime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_strftime=yes else ac_cv_lib_intl_strftime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "@%:@define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi fi done ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "@%:@define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "@%:@define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "@%:@define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "@%:@define HAVE_REALLOC 1" >>confdefs.h else $as_echo "@%:@define HAVE_REALLOC 0" >>confdefs.h case " $LIB@&t@OBJS " in *" realloc.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS realloc.$ac_objext" ;; esac $as_echo "@%:@define realloc rpl_realloc" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "@%:@define TM_IN_SYS_TIME 1" >>confdefs.h fi AX_EXT # By default we simply use the C compiler to build assembly code. test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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_CCAS_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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_CCAS_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CCAS_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then am__fastdepCCAS_TRUE= am__fastdepCCAS_FALSE='#' else am__fastdepCCAS_TRUE='#' am__fastdepCCAS_FALSE= fi for ac_func in select strstr strchr strcmp strlen sizeof write snprintf strncat strlcat strlcpy getopt_long gethostbyname socket htons connect send recv dup2 strspn strdup memset access ftruncate strerror mmap shm_open do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcre" >&5 $as_echo_n "checking for main in -lpcre... " >&6; } if ${ac_cv_lib_pcre_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcre $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcre_main=yes else ac_cv_lib_pcre_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_main" >&5 $as_echo "$ac_cv_lib_pcre_main" >&6; } if test "x$ac_cv_lib_pcre_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBPCRE 1 _ACEOF LIBS="-lpcre $LIBS" else as_fn_error $? "Sagan needs PCRE installed. Please see http://www.pcre.org." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5 $as_echo_n "checking for main in -lpthread... " >&6; } if ${ac_cv_lib_pthread_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_main=yes else ac_cv_lib_pthread_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5 $as_echo "$ac_cv_lib_pthread_main" >&6; } if test "x$ac_cv_lib_pthread_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" else as_fn_error $? "Sagan needs pthreads!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 $as_echo_n "checking for main in -lm... " >&6; } if ${ac_cv_lib_m_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_main=yes else ac_cv_lib_m_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 $as_echo "$ac_cv_lib_m_main" >&6; } if test "x$ac_cv_lib_m_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else as_fn_error $? "Sagan needs libm!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrt" >&5 $as_echo_n "checking for main in -lrt... " >&6; } if ${ac_cv_lib_rt_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_main=yes else ac_cv_lib_rt_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_main" >&5 $as_echo "$ac_cv_lib_rt_main" >&6; } if test "x$ac_cv_lib_rt_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" else as_fn_error $? "Sagan needs librt!" "$LINENO" 5 fi if test "$SYSSTRSTR" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using build in strstr()..." >&5 $as_echo "using build in strstr()..." >&6; } $as_echo "@%:@define WITH_SYSSTRSTR 1" >>confdefs.h fi if test "$SYSLOG" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Syslog support is enabled -------" >&5 $as_echo "------- Syslog support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : fi $as_echo "@%:@define WITH_SYSLOG 1" >>confdefs.h fi if test "$GEOIP2" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Maxmind GeoIP2 support is enabled -------" >&5 $as_echo "------- Maxmind GeoIP2 support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "maxminddb.h" "ac_cv_header_maxminddb_h" "$ac_includes_default" if test "x$ac_cv_header_maxminddb_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmaxminddb" >&5 $as_echo_n "checking for main in -lmaxminddb... " >&6; } if ${ac_cv_lib_maxminddb_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmaxminddb $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_maxminddb_main=yes else ac_cv_lib_maxminddb_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_maxminddb_main" >&5 $as_echo "$ac_cv_lib_maxminddb_main" >&6; } if test "x$ac_cv_lib_maxminddb_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBMAXMINDDB 1 _ACEOF LIBS="-lmaxminddb $LIBS" else as_fn_error $? "The Maxmind GeoIP2 library cannot be found. If you're not interested in GeoIP2 support use the --disable-geoip2 flag." "$LINENO" 5 fi fi if test "$ESMTP" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libesmtp support is enabled -------" >&5 $as_echo "------- libesmtp support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "libesmtp.h" "ac_cv_header_libesmtp_h" "$ac_includes_default" if test "x$ac_cv_header_libesmtp_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lesmtp" >&5 $as_echo_n "checking for main in -lesmtp... " >&6; } if ${ac_cv_lib_esmtp_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lesmtp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_esmtp_main=yes else ac_cv_lib_esmtp_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_esmtp_main" >&5 $as_echo "$ac_cv_lib_esmtp_main" >&6; } if test "x$ac_cv_lib_esmtp_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBESMTP 1 _ACEOF LIBS="-lesmtp $LIBS" else as_fn_error $? "The libesmtp library cannot be found. If you're not interested in libesmtp support use the --disable-esmtp flag." "$LINENO" 5 fi fi if test "$FASTJSON" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libfastjson support is enabled -------" >&5 $as_echo "------- libfastjson support is enabled -------" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi if test "$LOGNORM" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- liblognorm support is enabled -------" >&5 $as_echo "------- liblognorm support is enabled -------" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBESTR" >&5 $as_echo_n "checking for LIBESTR... " >&6; } if test -n "$LIBESTR_CFLAGS"; then pkg_cv_LIBESTR_CFLAGS="$LIBESTR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libestr >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libestr >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBESTR_CFLAGS=`$PKG_CONFIG --cflags "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBESTR_LIBS"; then pkg_cv_LIBESTR_LIBS="$LIBESTR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libestr >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libestr >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBESTR_LIBS=`$PKG_CONFIG --libs "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBESTR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libestr >= 0.0.0" 2>&1` else LIBESTR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libestr >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBESTR_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libestr >= 0.0.0) were not met: $LIBESTR_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBESTR_CFLAGS and LIBESTR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBESTR_CFLAGS and LIBESTR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBESTR_CFLAGS=$pkg_cv_LIBESTR_CFLAGS LIBESTR_LIBS=$pkg_cv_LIBESTR_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLOGNORM" >&5 $as_echo_n "checking for LIBLOGNORM... " >&6; } if test -n "$LIBLOGNORM_CFLAGS"; then pkg_cv_LIBLOGNORM_CFLAGS="$LIBLOGNORM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lognorm >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lognorm >= 1.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBLOGNORM_CFLAGS=`$PKG_CONFIG --cflags "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBLOGNORM_LIBS"; then pkg_cv_LIBLOGNORM_LIBS="$LIBLOGNORM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lognorm >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lognorm >= 1.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBLOGNORM_LIBS=`$PKG_CONFIG --libs "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBLOGNORM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lognorm >= 1.0.0" 2>&1` else LIBLOGNORM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lognorm >= 1.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBLOGNORM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (lognorm >= 1.0.0) were not met: $LIBLOGNORM_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBLOGNORM_CFLAGS and LIBLOGNORM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBLOGNORM_CFLAGS and LIBLOGNORM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBLOGNORM_CFLAGS=$pkg_cv_LIBLOGNORM_CFLAGS LIBLOGNORM_LIBS=$pkg_cv_LIBLOGNORM_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi ac_fn_c_check_header_mongrel "$LINENO" "liblognorm.h" "ac_cv_header_liblognorm_h" "$ac_includes_default" if test "x$ac_cv_header_liblognorm_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "libestr.h" "ac_cv_header_libestr_h" "$ac_includes_default" if test "x$ac_cv_header_libestr_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lestr" >&5 $as_echo_n "checking for main in -lestr... " >&6; } if ${ac_cv_lib_estr_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lestr $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_estr_main=yes else ac_cv_lib_estr_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_estr_main" >&5 $as_echo "$ac_cv_lib_estr_main" >&6; } if test "x$ac_cv_lib_estr_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBESTR 1 _ACEOF LIBS="-lestr $LIBS" else as_fn_error $? "The libestr library cannot be found. This library is important for the correlation aspects of Sagan! Please see https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature use the --disable-lognorm flag. " "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llognorm" >&5 $as_echo_n "checking for main in -llognorm... " >&6; } if ${ac_cv_lib_lognorm_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llognorm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lognorm_main=yes else ac_cv_lib_lognorm_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lognorm_main" >&5 $as_echo "$ac_cv_lib_lognorm_main" >&6; } if test "x$ac_cv_lib_lognorm_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBLOGNORM 1 _ACEOF LIBS="-llognorm $LIBS" else as_fn_error $? "The liblognorm library cannot be found. This library is important for the correlation aspects of Sagan! Please see https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature use the --disable-lognorm flag. " "$LINENO" 5 fi fi if test "$LIBPCAP" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libpcap support is enabled -------" >&5 $as_echo "------- libpcap support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "pcap.h" "ac_cv_header_pcap_h" "$ac_includes_default" if test "x$ac_cv_header_pcap_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default" if test "x$ac_cv_header_net_if_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "net/if_arp.h" "ac_cv_header_net_if_arp_h" "$ac_includes_default" if test "x$ac_cv_header_net_if_arp_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_systm_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_ip_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/udp.h" "ac_cv_header_netinet_udp_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_udp_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5 $as_echo_n "checking for main in -lpcap... " >&6; } if ${ac_cv_lib_pcap_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcap_main=yes else ac_cv_lib_pcap_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_main" >&5 $as_echo "$ac_cv_lib_pcap_main" >&6; } if test "x$ac_cv_lib_pcap_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBPCAP 1 _ACEOF LIBS="-lpcap $LIBS" else as_fn_error $? "The libpcap library cannot be found. This library is used to run Sagan in a syslog 'sniffer' mode. Please see https://wiki.quadrantsec.com/bin/view/Main/PLog. To disable this feature use the --disable-libpcap flag. " "$LINENO" 5 fi fi if test "$LIBDNET" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libdnet support is enabled -------" >&5 $as_echo "------- libdnet support is enabled -------" >&6; } for ac_header in dnet.h do : ac_fn_c_check_header_mongrel "$LINENO" "dnet.h" "ac_cv_header_dnet_h" "$ac_includes_default" if test "x$ac_cv_header_dnet_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_DNET_H 1 _ACEOF else DNET_H="no" fi done for ac_header in dumbnet.h do : ac_fn_c_check_header_mongrel "$LINENO" "dumbnet.h" "ac_cv_header_dumbnet_h" "$ac_includes_default" if test "x$ac_cv_header_dumbnet_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_DUMBNET_H 1 _ACEOF else DUMBNET_H="no" fi done if test "x$DNET_H" = "xno" -a "x$DUMBNET_H" = "xno"; then echo echo "The libdnet headers cannot be found. This library is used for Sagan's" echo "Unified2 output support. Please see:" echo "https://wiki.quadrantsec.com/bin/view/Main/Unified2Output" echo "To disable this feature use the --disable-libdnet flag." exit fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eth_set in -ldnet" >&5 $as_echo_n "checking for eth_set in -ldnet... " >&6; } if ${ac_cv_lib_dnet_eth_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char eth_set (); int main () { return eth_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_eth_set=yes else ac_cv_lib_dnet_eth_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_eth_set" >&5 $as_echo "$ac_cv_lib_dnet_eth_set" >&6; } if test "x$ac_cv_lib_dnet_eth_set" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBDNET 1 _ACEOF LIBS="-ldnet $LIBS" else DNET="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eth_set in -ldumbnet" >&5 $as_echo_n "checking for eth_set in -ldumbnet... " >&6; } if ${ac_cv_lib_dumbnet_eth_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldumbnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char eth_set (); int main () { return eth_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dumbnet_eth_set=yes else ac_cv_lib_dumbnet_eth_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dumbnet_eth_set" >&5 $as_echo "$ac_cv_lib_dumbnet_eth_set" >&6; } if test "x$ac_cv_lib_dumbnet_eth_set" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBDUMBNET 1 _ACEOF LIBS="-ldumbnet $LIBS" else DUMBNET="no" fi if test "x$DNET" = "xno" -a "x$DUMBNET" = "xno"; then echo echo "The libdnet headers cannot be found. This library is used for Sagan's" echo "Unified2 output support. Please see:" echo "https://wiki.quadrantsec.com/bin/view/Main/Unified2Output" echo "To disable this feature use the --disable-libdnet flag." exit fi fi if test "$BLUEDOT" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Quadrant \"Bluedot\" is enabled -------" >&5 $as_echo "------- Quadrant \"Bluedot\" is enabled -------" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5 $as_echo_n "checking for main in -lcurl... " >&6; } if ${ac_cv_lib_curl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curl_main=yes else ac_cv_lib_curl_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_main" >&5 $as_echo "$ac_cv_lib_curl_main" >&6; } if test "x$ac_cv_lib_curl_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBCURL 1 _ACEOF LIBS="-lcurl $LIBS" else as_fn_error $? "The libcurl library cannot be found. This library is used for Sagan's / \"Bluedot\" support. Please see https://quadrantsec.com for more information. To disable this feature use the --disable-bluedot flag. " "$LINENO" 5 fi $as_echo "@%:@define WITH_BLUEDOT 1" >>confdefs.h ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" if test "x$ac_cv_header_curl_curl_h" = xyes; then : fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi if test "$SNORTSAM" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Snortsam support is enabled -------" >&5 $as_echo "------- Snortsam support is enabled -------" >&6; } $as_echo "@%:@define WITH_SNORTSAM 1" >>confdefs.h fi test "x$prefix" = x. || test "x$prefix" = xNONE && prefix=/usr/local cat >>confdefs.h <<_ACEOF @%:@define CONFIG_FILE_PATH "`eval echo "${sysconfdir}/sagan.conf"`" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "sagan" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "Sagan $VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "cclark@quadrantsec.com" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "sagan" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$VERSION" _ACEOF ac_config_files="$ac_config_files Makefile src/Makefile" # AC_OUTPUT(Makefile) cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: ,-._,-. Sagan has been configured!" >&5 $as_echo " ,-._,-. Sagan has been configured!" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: \/)\"(\/ " >&5 $as_echo " \/)\"(\/ " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: (_o_) Champ Clark III & The Quadrant InfoSec Team [quadrantsec.com]" >&5 $as_echo " (_o_) Champ Clark III & The Quadrant InfoSec Team [quadrantsec.com]" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: / \/) Copyright (C) 2009-2016 Quadrant Information Security, et al." >&5 $as_echo " / \/) Copyright (C) 2009-2016 Quadrant Information Security, et al." >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: (|| ||) " >&5 $as_echo " (|| ||) " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: oo-oo " >&5 $as_echo " oo-oo " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } sagan-1.1.2/configure.ac0000644000175000017500000003050612770372750014052 0ustar champchamp# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_INIT AC_CONFIG_SRCDIR([src]) AC_CANONICAL_SYSTEM AC_GNU_SOURCE AC_CONFIG_MACRO_DIRS([m4]) AM_MAINTAINER_MODE([disable]) #VERSION=`cat $srcdir/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'` VERSION=`cat src/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'` AC_C_BIGENDIAN(AC_SUBST([ENDIAN],[big]),AC_SUBST([ENDIAN],[little])) AC_ARG_ENABLE(snortsam, [ --disable-snortsam Disable Snortsam support.], [ SNORTSAM="$enableval"], [ SNORTSAM="yes" ] ) AC_ARG_ENABLE(bluedot, [ --enable-bluedot Enable Quadrant\'s "Bluedot" lookups.], [ BLUEDOT="$enableval"], [ BLUEDOT="no" ] ) AC_ARG_ENABLE(esmtp, [ --enable-esmtp Enable libesmtp support.], [ ESMTP="$enableval"], [ ESMTP="no" ] ) AC_ARG_ENABLE(geoip2, [ --enable-geoip2 Enable Maxmind GeoIP2 support.], [ GEOIP2="$enableval"], [ GEOIP2="no" ] ) AC_ARG_ENABLE(syslog, [ --disable-syslog Disable syslog support.], [ SYSLOG="$enableval"], [ SYSLOG="yes" ] ) AC_ARG_ENABLE(system-strstr, [ --enable-system-strstr Enable system strstr.], [ SYSSTRSTR="$enableval"], [ SYSSTRSTR="no" ] ) AC_ARG_WITH(esmtp_includes, [ --with-esmtp-includes=DIR libesmtp include directory], [with_esmtp_includes="$withval"],[with_esmtp_includes="no"]) AC_ARG_WITH(esmtp_libraries, [ --with-esmtp-libraries=DIR libesmtp library directory], [with_esmtp_libraries="$withval"],[with_esmtp_libraries="no"]) if test "x$with_esmtp_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_esmtp_includes}" fi if test "x$with_esmtp_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_esmtp_libraries}" fi AC_ARG_WITH(geoip2_includes, [ --with-geoip2-includes=DIR Maxmind GeoIP2 include directory], [with_geoip2_includes="$withval"],[with_geoip2_includes="no"]) AC_ARG_WITH(geoip2_libraries, [ --with-geoip2-libraries=DIR Maxmind GeoIP2 library directory], [with_geoip2_libraries="$withval"],[with_geoip2_libraries="no"]) if test "x$with_geoip2_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_geoip2_includes}" fi if test "x$with_geoip2_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_geoip2_libraries}" fi AC_ARG_ENABLE(lognorm, [ --disable-lognorm Disable Lognorm (liblognorm) support.], [ LOGNORM="$enableval"], [ LOGNORM="yes" ] ) AC_ARG_WITH(lognorm_includes, [ --with-lognorm-includes=DIR liblognorm include directory], [with_lognorm_includes="$withval"],[with_lognorm_includes="no"]) AC_ARG_WITH(lognorm_libraries, [ --with-lognorm-libraries=DIR liblognorm library directory], [with_lognorm_libraries="$withval"],[with_lognorm_libraries="no"]) if test "x$with_lognorm_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_lognorm_includes}" fi if test "x$with_lognorm_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_lognorm_libraries}" fi # -- AC_ARG_ENABLE(libfastjson, [ --disable-libfastjson Disable libfastjson support.], [ FASTJSON="$enableval"], [ FASTJSON="yes" ] ) AC_ARG_WITH(libfastjson_includes, [ --with-libfastjson-includes=DIR libfastjson include directory], [with_libfastjson_includes="$withval"],[with_libfastjson_includes="no"]) AC_ARG_WITH(libfastjson_c_libraries, [ --with-libfastjson-libraries=DIR libfastjson library directory], [with_libfastjson_libraries="$withval"],[with_libfastjson_libraries="no"]) if test "x$with_libfastjson_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libfastjson_includes}" fi if test "x$with_libfastjson_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libfastjson_libraries}" fi # -- AC_ARG_ENABLE(libpcap, [ --disable-libpcap Disable libpcap (plog) support.], [ LIBPCAP="$enableval"], [ LIBPCAP="no" ] ) AC_ARG_WITH(libpcap_includes, [ --with-libpcap-includes=DIR libpcap include directory], [with_libpcap_includes="$withval"],[with_libpcap_includes="no"]) AC_ARG_WITH(libpcap_libraries, [ --with-libpcap-libraries=DIR libpcap library directory], [with_libpcap_libraries="$withval"],[with_libpcap_libraries="no"]) if test "x$with_libpcap_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libpcap_includes}" fi if test "x$with_libpcap_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libpcap_libraries}" fi AC_ARG_ENABLE(libdnet, [ --disable-libdnet Disable libdnet (unified2) support.], [ LIBDNET="$enableval"], [ LIBDNET="yes" ] ) AC_ARG_WITH(libdnet_includes, [ --with-libdnet-includes=DIR libdnet include directory], [with_libdnet_includes="$withval"],[with_libdnet_includes="no"]) AC_ARG_WITH(libdnet_libraries, [ --with-libdnet-libraries=DIR libdnet library directory], [with_libdnet_libraries="$withval"],[with_libdnet_libraries="no"]) if test "x$with_libdnet_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libdnet_includes}" fi if test "x$with_libdnet_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libdnet_libraries}" fi AC_SUBST(VERSION) AM_INIT_AUTOMAKE(sagan, ${VERSION}) AC_CONFIG_HEADER(config.h) # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_LANG_C AC_PROG_MAKE_SET PKG_PROG_PKG_CONFIG # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([stdio.h stdlib.h sys/types.h unistd.h stdint.h inttypes.h pthread.h ctype.h errno.h fcntl.h sys/stat.h string.h getopt.h time.h pcre.h stdarg.h limits.h stdbool.h arpa/inet.h netinet/in.h sys/time.h sys/socket.h sys/mmap.h]) AC_CHECK_SIZEOF([size_t]) # F_SETPIPE_SZ in fcntl.h AC_MSG_CHECKING([for F_SETPIPE_SZ in fcntl.h]) AC_EGREP_CPP([yes_have_f_setpipe_sz], [ #define _GNU_SOURCE #include #ifdef F_SETPIPE_SZ yes_have_f_setpipe_sz #endif ], [ AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_SETPIPE_SZ], [], [F_SETPIPE_SZ is supported]) ], [ AC_MSG_RESULT([no]) AC_MSG_NOTICE([F_SETPIPE_SZ not found, cannot alter FIFO]) ]) # F_GETPIPE_SZ in fcntl.h AC_MSG_CHECKING([for F_GETPIPE_SZ in fcntl.h]) AC_EGREP_CPP([yes_have_f_getpipe_sz], [ #define _GNU_SOURCE #include #ifdef F_GETPIPE_SZ yes_have_f_getpipe_sz #endif ], [ AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_GETPIPE_SZ], [], [F_GETPIPE_SZ is supported]) ], [ AC_MSG_RESULT([no]) AC_MSG_NOTICE([F_GETPIPE_SZ not found, cannot alter FIFO]) ]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_HEADER_TIME # Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES AC_FUNC_STAT AC_TYPE_SIGNAL AC_FUNC_STRFTIME AC_FUNC_FORK AC_FUNC_REALLOC AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM AX_EXT AM_PROG_AS AC_CHECK_FUNCS([select strstr strchr strcmp strlen sizeof write snprintf strncat strlcat strlcpy getopt_long gethostbyname socket htons connect send recv dup2 strspn strdup memset access ftruncate strerror mmap shm_open]) AC_CHECK_LIB(pcre, main,,AC_MSG_ERROR(Sagan needs PCRE installed. Please see http://www.pcre.org.)) AC_CHECK_LIB(pthread, main,,AC_MSG_ERROR(Sagan needs pthreads!)) AC_CHECK_LIB(m, main,,AC_MSG_ERROR(Sagan needs libm!)) AC_CHECK_LIB(rt, main,,AC_MSG_ERROR(Sagan needs librt!)) if test "$SYSSTRSTR" = "yes"; then AC_MSG_RESULT([using build in strstr()...]) AC_DEFINE(WITH_SYSSTRSTR, 1, With system strstr) fi if test "$SYSLOG" = "yes"; then AC_MSG_RESULT([------- Syslog support is enabled -------]) AC_CHECK_HEADER([syslog.h]) AC_DEFINE(WITH_SYSLOG, 1, With Syslog) fi if test "$GEOIP2" = "yes"; then AC_MSG_RESULT([------- Maxmind GeoIP2 support is enabled -------]) AC_CHECK_HEADER([maxminddb.h]) AC_CHECK_LIB(maxminddb, main,,AC_MSG_ERROR(The Maxmind GeoIP2 library cannot be found. If you're not interested in GeoIP2 support use the --disable-geoip2 flag.)) fi if test "$ESMTP" = "yes"; then AC_MSG_RESULT([------- libesmtp support is enabled -------]) AC_CHECK_HEADER([libesmtp.h]) AC_CHECK_LIB(esmtp, main,,AC_MSG_ERROR(The libesmtp library cannot be found. If you're not interested in libesmtp support use the --disable-esmtp flag.)) fi if test "$FASTJSON" = "yes"; then AC_MSG_RESULT([------- libfastjson support is enabled -------]) PKG_CHECK_MODULES(LIBFASTJSON, libfastjson >= 0.0.0) fi if test "$LOGNORM" = "yes"; then AC_MSG_RESULT([------- liblognorm support is enabled -------]) PKG_CHECK_MODULES(LIBESTR, libestr >= 0.0.0) PKG_CHECK_MODULES(LIBLOGNORM, lognorm >= 1.0.0) PKG_CHECK_MODULES(LIBFASTJSON, libfastjson >= 0.0.0) AC_CHECK_HEADER([liblognorm.h]) AC_CHECK_HEADER([libestr.h]) AC_CHECK_LIB(estr, main,,AC_MSG_ERROR(The libestr library cannot be found. This library is important for the correlation aspects of Sagan! Please see https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature use the --disable-lognorm flag. )) AC_CHECK_LIB(lognorm, main,,AC_MSG_ERROR(The liblognorm library cannot be found. This library is important for the correlation aspects of Sagan! Please see https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature use the --disable-lognorm flag. )) fi if test "$LIBPCAP" = "yes"; then AC_MSG_RESULT([------- libpcap support is enabled -------]) AC_CHECK_HEADER([pcap.h]) AC_CHECK_HEADER([net/if.h]) AC_CHECK_HEADER([net/if_arp.h]) AC_CHECK_HEADER([netinet/in_systm.h]) AC_CHECK_HEADER([netinet/if_ether.h]) AC_CHECK_HEADER([netinet/ip.h]) AC_CHECK_HEADER([netinet/udp.h]) AC_CHECK_LIB(pcap, main,,AC_MSG_ERROR(The libpcap library cannot be found. This library is used to run Sagan in a syslog 'sniffer' mode. Please see https://wiki.quadrantsec.com/bin/view/Main/PLog. To disable this feature use the --disable-libpcap flag. )) fi if test "$LIBDNET" = "yes"; then AC_MSG_RESULT([------- libdnet support is enabled -------]) AC_CHECK_HEADERS(dnet.h,,DNET_H="no") AC_CHECK_HEADERS(dumbnet.h,,DUMBNET_H="no") if test "x$DNET_H" = "xno" -a "x$DUMBNET_H" = "xno"; then echo echo "The libdnet headers cannot be found. This library is used for Sagan's" echo "Unified2 output support. Please see:" echo "https://wiki.quadrantsec.com/bin/view/Main/Unified2Output" echo "To disable this feature use the --disable-libdnet flag." exit fi AC_CHECK_LIB(dnet, eth_set,,[DNET="no"]) AC_CHECK_LIB(dumbnet, eth_set,,[DUMBNET="no"]) if test "x$DNET" = "xno" -a "x$DUMBNET" = "xno"; then echo echo "The libdnet headers cannot be found. This library is used for Sagan's" echo "Unified2 output support. Please see:" echo "https://wiki.quadrantsec.com/bin/view/Main/Unified2Output" echo "To disable this feature use the --disable-libdnet flag." exit fi fi if test "$BLUEDOT" = "yes"; then AC_MSG_RESULT([------- Quadrant "Bluedot" is enabled -------]) AC_CHECK_LIB(curl, main,,AC_MSG_ERROR(The libcurl library cannot be found. This library is used for Sagan's / "Bluedot" support. Please see https://quadrantsec.com for more information. To disable this feature use the --disable-bluedot flag. )) AC_DEFINE(WITH_BLUEDOT, 1, With Bluedot) AC_CHECK_HEADER([curl/curl.h]) PKG_CHECK_MODULES(LIBFASTJSON, libfastjson >= 0.0.0) fi if test "$SNORTSAM" = "yes"; then AC_MSG_RESULT([------- Snortsam support is enabled -------]) AC_DEFINE(WITH_SNORTSAM, 1, With Snortsam) fi test "x$prefix" = x. || test "x$prefix" = xNONE && prefix=/usr/local AC_DEFINE_UNQUOTED(CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/sagan.conf"`", [Sagan configuration file]) AC_DEFINE_UNQUOTED(PACKAGE_NAME, "sagan" ) AC_DEFINE_UNQUOTED(PACKAGE_STRING, "Sagan $VERSION") AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "cclark@quadrantsec.com" ) AC_DEFINE_UNQUOTED(PACKAGE_TARNAME, "sagan" ) AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$VERSION" ) AC_CONFIG_FILES([ \ Makefile \ src/Makefile]) # AC_OUTPUT(Makefile) AC_OUTPUT AC_MSG_RESULT([]) AC_MSG_RESULT([ ,-._,-. Sagan has been configured!]) AC_MSG_RESULT([ \/)"(\/ ]) AC_MSG_RESULT([ (_o_) Champ Clark III & The Quadrant InfoSec Team [[quadrantsec.com]]]) AC_MSG_RESULT([ / \/) Copyright (C) 2009-2016 Quadrant Information Security, et al.]) AC_MSG_RESULT([ (|| ||) ]) AC_MSG_RESULT([ oo-oo ]) AC_MSG_RESULT([]) sagan-1.1.2/config.h.in~0000644000175000017500000002400612770372750014003 0ustar champchamp/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Sagan configuration file */ #undef CONFIG_FILE_PATH /* Define to 1 if you have the `access' function. */ #undef HAVE_ACCESS /* Support Altivec instructions */ #undef HAVE_ALTIVEC /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Support AVX (Advanced Vector Extensions) instructions */ #undef HAVE_AVX /* Define to 1 if you have the `connect' function. */ #undef HAVE_CONNECT /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the header file. */ #undef HAVE_DNET_H /* Define to 1 if you have the header file. */ #undef HAVE_DUMBNET_H /* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* F_GETPIPE_SZ is supported */ #undef HAVE_GETPIPE_SZ /* Define to 1 if you have the `htons' function. */ #undef HAVE_HTONS /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `curl' library (-lcurl). */ #undef HAVE_LIBCURL /* Define to 1 if you have the `dnet' library (-ldnet). */ #undef HAVE_LIBDNET /* Define to 1 if you have the `dumbnet' library (-ldumbnet). */ #undef HAVE_LIBDUMBNET /* Define to 1 if you have the `esmtp' library (-lesmtp). */ #undef HAVE_LIBESMTP /* Define to 1 if you have the `estr' library (-lestr). */ #undef HAVE_LIBESTR /* Define to 1 if you have the `lognorm' library (-llognorm). */ #undef HAVE_LIBLOGNORM /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `maxminddb' library (-lmaxminddb). */ #undef HAVE_LIBMAXMINDDB /* Define to 1 if you have the `pcap' library (-lpcap). */ #undef HAVE_LIBPCAP /* Define to 1 if you have the `pcre' library (-lpcre). */ #undef HAVE_LIBPCRE /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mmap' function. */ #undef HAVE_MMAP /* Support mmx instructions */ #undef HAVE_MMX /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_PCRE_H /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `recv' function. */ #undef HAVE_RECV /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `send' function. */ #undef HAVE_SEND /* F_SETPIPE_SZ is supported */ #undef HAVE_SETPIPE_SZ /* Define to 1 if you have the `shm_open' function. */ #undef HAVE_SHM_OPEN /* Define to 1 if you have the `sizeof' function. */ #undef HAVE_SIZEOF /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Support SSE (Streaming SIMD Extensions) instructions */ #undef HAVE_SSE /* Support SSE2 (Streaming SIMD Extensions 2) instructions */ #undef HAVE_SSE2 /* Support SSE3 (Streaming SIMD Extensions 3) instructions */ #undef HAVE_SSE3 /* Support SSSE4.1 (Streaming SIMD Extensions 4.1) instructions */ #undef HAVE_SSE4_1 /* Support SSSE4.2 (Streaming SIMD Extensions 4.2) instructions */ #undef HAVE_SSE4_2 /* Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions */ #undef HAVE_SSSE3 /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcmp' function. */ #undef HAVE_STRCMP /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* 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 header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcat' function. */ #undef HAVE_STRLCAT /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strlen' function. */ #undef HAVE_STRLEN /* Define to 1 if you have the `strncat' function. */ #undef HAVE_STRNCAT /* Define to 1 if you have the `strspn' function. */ #undef HAVE_STRSPN /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAP_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if you have the `write' function. */ #undef HAVE_WRITE /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* With Bluedot */ #undef WITH_BLUEDOT /* With Snortsam */ #undef WITH_SNORTSAM /* With Syslog */ #undef WITH_SYSLOG /* With system strstr */ #undef WITH_SYSSTRSTR /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `int' if does not define. */ #undef pid_t /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork sagan-1.1.2/compile0000755000175000017500000001624512770373007013142 0ustar champchamp#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: sagan-1.1.2/AUTHORS0000644000175000017500000000021112770372750012622 0ustar champchampPrimary code development was done by Champ Clark III (champ@quadrantsec.com). For more contributors, please see: src/sagan-credits.c sagan-1.1.2/src/0000755000175000017500000000000012770373020012336 5ustar champchampsagan-1.1.2/src/Makefile.am0000644000175000017500000001021212770372750014377 0ustar champchampAUTOMAKE_OPIONS=foreign no-dependencies bin_PROGRAMS = sagan sagan_CPPFLAGS = -I$(top_srcdir) $(LIBFASTJSON_CFLAGS) $(LIBESTR_CFLAGS) sagan_LDADD = $(LIBFASTJSON_LIBS) $(LIBLOGNORM_LIBS) $(LIBESTR_LIBS) sagan_SOURCES = sagan.c \ sagan-classifications.c \ sagan-config.c \ sagan-lockfile.c \ sagan-references.c \ sagan-rules.c \ sagan-signal.c \ sagan-key.c \ sagan-stats.c \ sagan-strlcat.c \ sagan-strlcpy.c \ sagan-usage.c \ sagan-util.c \ sagan-plog.c \ sagan-output.c \ sagan-processor.c \ sagan-gen-msg.c \ sagan-liblognorm.c \ sagan-ignore-list.c \ sagan-send-alert.c \ sagan-credits.c \ sagan-protocol-map.c \ sagan-geoip2.c \ sagan-meta-content.c \ sagan-flowbit.c \ sagan-check-flow.c\ sagan-aetas.c \ sagan-ipc.c \ parsers/parse-ip.c \ parsers/parse-port.c \ parsers/parse-proto.c \ parsers/parse-hash.c \ parsers/sagan-strstr/sagan-strstr-hook.c \ parsers/sagan-strstr/strstr_sse2.S \ parsers/sagan-strstr/strstr_sse4_2.S \ output-plugins/sagan-alert.c \ output-plugins/sagan-esmtp.c \ output-plugins/sagan-external.c \ output-plugins/sagan-unified2.c \ output-plugins/sagan-twofish.c \ output-plugins/sagan-snortsam.c \ output-plugins/sagan-syslog.c \ processors/sagan-engine.c \ processors/sagan-track-clients.c \ processors/sagan-report-clients.c \ processors/sagan-bluedot.c \ processors/sagan-blacklist.c \ processors/sagan-perfmon.c \ processors/sagan-bro-intel.c install-data-local: sagan-1.1.2/src/sagan-usage.h0000644000175000017500000000200212770372750014705 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_Usage( void ); sagan-1.1.2/src/sagan-gen-msg.c0000644000175000017500000000731212770372750015142 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-gen-msg.c * * Reads in the sagan-gen-msg.map. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-gen-msg.h" struct _SaganCounters *counters; struct _Sagan_Processor_Generator *generator; struct _SaganConfig *config; struct _SaganDebug *debug; void Load_Gen_Map( const char *genmap ) { FILE *genmapfile; char genbuf[1024]; char *saveptr=NULL; char *gen1=NULL; char *gen2=NULL; char *gen3=NULL; Sagan_Log(S_NORMAL, "Loading gen-msg.map file. [%s]", genmap); counters->genmapcount=0; if (( genmapfile = fopen(genmap, "r" )) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open generator file (%s)", __FILE__, __LINE__, genmap); } while(fgets(genbuf, 1024, genmapfile) != NULL) { /* Skip comments and blank linkes */ if (genbuf[0] == '#' || genbuf[0] == 10 || genbuf[0] == ';' || genbuf[0] == 32) { continue; } else { /* Allocate memory for references, not comments */ generator = (_Sagan_Processor_Generator *) realloc(generator, (counters->genmapcount+1) * sizeof(_Sagan_Processor_Generator)); if ( generator == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for generator. Abort!", __FILE__, __LINE__); } } gen1 = Remove_Return(strtok_r(genbuf, "|", &saveptr)); gen2 = Remove_Return(strtok_r(NULL, "|", &saveptr)); gen3 = Remove_Return(strtok_r(NULL, "|", &saveptr)); if ( gen1 == NULL || gen2 == NULL || gen3 == NULL ) { Sagan_Log(S_ERROR, "%s is incorrect or not correctly formated", genmap); } generator[counters->genmapcount].generatorid=atoi(gen1); generator[counters->genmapcount].alertid=atoi(gen2); strlcpy(generator[counters->genmapcount].generator_msg, Remove_Return(gen3), sizeof(generator[counters->genmapcount].generator_msg)); counters->genmapcount++; } fclose(genmapfile); Sagan_Log(S_NORMAL, "%d generators loaded.", counters->genmapcount); } /****************************************************************************/ /* Sagan_Generator_Lookup - Looks up the "generator" ID (see the */ /* "gen-msg.map") of a processor */ /****************************************************************************/ char *Sagan_Generator_Lookup(int processor_id, int alert_id) { int z=0; char *msg=NULL; for (z=0; zgenmapcount; z++) { if ( generator[z].generatorid == processor_id && generator[z].alertid == alert_id) { msg=generator[z].generator_msg; } } return(msg); } sagan-1.1.2/src/sagan-strlcat.c0000644000175000017500000000373212770372750015263 0ustar champchamp/* sagan-strlcat * * Provided by the OpenBSD team. This is here for systems that do not * support the strlcat call. * */ /* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */ /* * Copyright (c) 1998 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifndef HAVE_STRLCAT #include #include /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters * will be copied. Always NUL terminates (unless siz <= strlen(dst)). * Returns strlen(src) + MIN(siz, strlen(initial dst)). * If retval >= siz, truncation occurred. */ size_t strlcat(char *dst, const char *src, size_t siz) { char *d = dst; const char *s = src; size_t n = siz; size_t dlen; /* Find the end of dst and adjust bytes left but don't go past end */ while (n-- != 0 && *d != '\0') d++; dlen = d - dst; n = siz - dlen; if (n == 0) return(dlen + strlen(s)); while (*s != '\0') { if (n != 1) { *d++ = *s; n--; } s++; } *d = '\0'; return(dlen + (s - src)); /* count does not include NUL */ } #endif sagan-1.1.2/src/sagan-rules.h0000644000175000017500000001466312770372750014753 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef WITH_BLUEDOT #define BLUEDOT_MAX_CAT 10 #endif typedef struct arr_flow_1 arr_flow_1; struct arr_flow_1 { uint32_t lo; uint32_t hi; }; typedef struct arr_flow_2 arr_flow_2; struct arr_flow_2 { uint32_t lo; uint32_t hi; }; typedef struct meta_content_conversion meta_content_conversion; struct meta_content_conversion { char meta_content_converted[MAX_META_CONTENT][256]; int meta_counter; }; typedef struct _Rule_Struct _Rule_Struct; struct _Rule_Struct { unsigned s_size_rule; char s_msg[256]; pcre *re_pcre[MAX_PCRE]; pcre_extra *pcre_extra[MAX_PCRE]; char s_content[MAX_CONTENT][256]; char s_reference[MAX_REFERENCE][256]; char s_classtype[32]; char s_sid[32]; char s_rev[5]; int s_pri; char s_program[256]; char s_facility[50]; char s_syspri[25]; char s_level[25]; char s_tag[10]; char email[255]; sbool email_flag; /* Check Flow */ struct arr_flow_1 flow_1[MAX_CHECK_FLOWS]; struct arr_flow_2 flow_2[MAX_CHECK_FLOWS]; struct meta_content_conversion meta_content_containers[MAX_META_CONTENT]; int direction; sbool flow_1_var; sbool flow_2_var; sbool has_flow; int flow_1_type[MAX_CHECK_FLOWS]; int flow_2_type[MAX_CHECK_FLOWS]; int flow_1_counter; int flow_2_counter; sbool s_nocase[MAX_CONTENT]; int s_offset[MAX_CONTENT]; int s_depth[MAX_CONTENT]; int s_distance[MAX_CONTENT]; int s_within[MAX_CONTENT]; sbool meta_nocase[MAX_META_CONTENT]; int meta_offset[MAX_META_CONTENT]; int meta_depth[MAX_META_CONTENT]; int meta_distance[MAX_META_CONTENT]; int meta_within[MAX_META_CONTENT]; int pcre_count; int content_count; int meta_content_count; int meta_content_converted_count; int flowbit_count; /* Number of flowbits in memory */ int flowbit_condition_count; /* Number of isset/isnot within a rule */ int flowbit_set_count; /* Number of set/unset within a rule */ int ref_count; int dst_port; int src_port; int ip_proto; sbool s_find_port; sbool s_find_proto; sbool s_find_proto_program; sbool s_find_src_ip; int s_find_src_pos; sbool s_find_dst_ip; int s_find_dst_pos; int s_find_hash_type; sbool flowbit_flag; /* Does the rule contain a flowbit? */ sbool flowbit_noalert; /* Do we want to suppress "alerts" from flowbits in ALL output plugins? */ sbool flowbit_nounified2; /* Do we want to suppress "unified2" from flowbits in unified2 output */ int flowbit_type[MAX_FLOWBITS]; /* 1 == set, 2 == unset, 3 == isset, 4 == isnotset */ int flowbit_direction[MAX_FLOWBITS]; /* 0 == none, 1 == both, 2 == by_src, 3 == by_dst */ int flowbit_memory_position[MAX_FLOWBITS]; /* "Where" in the flowbit struct flowbit is */ int flowbit_timeout[MAX_FLOWBITS]; /* How long a flowbit is to stay alive (seconds) */ char flowbit_name[MAX_FLOWBITS][64]; /* Name of the flowbit */ sbool normalize; sbool content_not[MAX_CONTENT]; /* content: ! "something" */ int drop; /* inline DROP for ext. */ int threshold_type; /* 1 = limit, 2 = thresh */ int threshold_method; /* 1 == src, 2 == dst, 3 == username, 4 == srcport, 5 == dstport */ int threshold_count; int threshold_seconds; int after_method; /* 1 == src, 2 == dst, 3 == username, 4 == dstport */ int after_count; int after_seconds; int fwsam_src_or_dst; /* 1 == src, 2 == dst */ unsigned long fwsam_seconds; sbool meta_content_flag; sbool meta_content_case[MAX_META_CONTENT]; sbool meta_content_not[MAX_META_CONTENT]; char meta_content[MAX_META_CONTENT][CONFBUF]; char meta_content_help[MAX_META_CONTENT][CONFBUF]; sbool alert_time_flag; unsigned char alert_days; sbool aetas_next_day; int aetas_start; int aetas_end; int alert_end_hour; int alert_end_minute; sbool external_flag; char external_program[MAXPATH]; /* Bro Intel */ sbool brointel_flag; sbool brointel_ipaddr_src; sbool brointel_ipaddr_dst; sbool brointel_ipaddr_both; sbool brointel_ipaddr_all; sbool brointel_domain; sbool brointel_file_hash; sbool brointel_url; sbool brointel_software; sbool brointel_email; sbool brointel_user_name; sbool brointel_file_name; sbool brointel_cert_hash; /* Blacklist */ sbool blacklist_flag; sbool blacklist_ipaddr_src; sbool blacklist_ipaddr_dst; sbool blacklist_ipaddr_both; sbool blacklist_ipaddr_all; #ifdef WITH_BLUEDOT int bluedot_ipaddr_type; /* 1 == src, 2 == dst, 3 == both, 4 == all */ int bluedot_ip_cats[BLUEDOT_MAX_CAT]; int bluedot_ip_cat_count; uintmax_t bluedot_mdate_effective_period; uintmax_t bluedot_cdate_effective_period; int bluedot_hash_cats[BLUEDOT_MAX_CAT]; int bluedot_hash_cat_count; int bluedot_url_cats[BLUEDOT_MAX_CAT]; int bluedot_url_cat_count; int bluedot_filename_cats[BLUEDOT_MAX_CAT]; int bluedot_filename_cat_count; sbool bluedot_file_hash; sbool bluedot_url; sbool bluedot_filename; #endif #ifdef HAVE_LIBMAXMINDDB sbool geoip2_flag; int geoip2_type; /* 1 == isnot, 2 == is */ char geoip2_country_codes[256]; int geoip2_src_or_dst; /* 1 == src, 2 == dst */ #endif }; void Load_Rules ( const char * ); sagan-1.1.2/src/Makefile.in0000644000175000017500000036745012770373007014427 0ustar champchamp# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = sagan$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/ax_ext.m4 \ $(top_srcdir)/m4/ax_gcc_x86_avx_xgetbv.m4 \ $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_sagan_OBJECTS = sagan-sagan.$(OBJEXT) \ sagan-sagan-classifications.$(OBJEXT) \ sagan-sagan-config.$(OBJEXT) sagan-sagan-lockfile.$(OBJEXT) \ sagan-sagan-references.$(OBJEXT) sagan-sagan-rules.$(OBJEXT) \ sagan-sagan-signal.$(OBJEXT) sagan-sagan-key.$(OBJEXT) \ sagan-sagan-stats.$(OBJEXT) sagan-sagan-strlcat.$(OBJEXT) \ sagan-sagan-strlcpy.$(OBJEXT) sagan-sagan-usage.$(OBJEXT) \ sagan-sagan-util.$(OBJEXT) sagan-sagan-plog.$(OBJEXT) \ sagan-sagan-output.$(OBJEXT) sagan-sagan-processor.$(OBJEXT) \ sagan-sagan-gen-msg.$(OBJEXT) sagan-sagan-liblognorm.$(OBJEXT) \ sagan-sagan-ignore-list.$(OBJEXT) \ sagan-sagan-send-alert.$(OBJEXT) sagan-sagan-credits.$(OBJEXT) \ sagan-sagan-protocol-map.$(OBJEXT) \ sagan-sagan-geoip2.$(OBJEXT) \ sagan-sagan-meta-content.$(OBJEXT) \ sagan-sagan-flowbit.$(OBJEXT) sagan-sagan-check-flow.$(OBJEXT) \ sagan-sagan-aetas.$(OBJEXT) sagan-sagan-ipc.$(OBJEXT) \ sagan-parse-ip.$(OBJEXT) sagan-parse-port.$(OBJEXT) \ sagan-parse-proto.$(OBJEXT) sagan-parse-hash.$(OBJEXT) \ sagan-sagan-strstr-hook.$(OBJEXT) sagan-strstr_sse2.$(OBJEXT) \ sagan-strstr_sse4_2.$(OBJEXT) sagan-sagan-alert.$(OBJEXT) \ sagan-sagan-esmtp.$(OBJEXT) sagan-sagan-external.$(OBJEXT) \ sagan-sagan-unified2.$(OBJEXT) sagan-sagan-twofish.$(OBJEXT) \ sagan-sagan-snortsam.$(OBJEXT) sagan-sagan-syslog.$(OBJEXT) \ sagan-sagan-engine.$(OBJEXT) \ sagan-sagan-track-clients.$(OBJEXT) \ sagan-sagan-report-clients.$(OBJEXT) \ sagan-sagan-bluedot.$(OBJEXT) sagan-sagan-blacklist.$(OBJEXT) \ sagan-sagan-perfmon.$(OBJEXT) sagan-sagan-bro-intel.$(OBJEXT) sagan_OBJECTS = $(am_sagan_OBJECTS) am__DEPENDENCIES_1 = sagan_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) am__v_CPPAS_0 = @echo " CPPAS " $@; am__v_CPPAS_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(sagan_SOURCES) DIST_SOURCES = $(sagan_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ 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@ ENDIAN = @ENDIAN@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBESTR_CFLAGS = @LIBESTR_CFLAGS@ LIBESTR_LIBS = @LIBESTR_LIBS@ LIBFASTJSON_CFLAGS = @LIBFASTJSON_CFLAGS@ LIBFASTJSON_LIBS = @LIBFASTJSON_LIBS@ LIBLOGNORM_CFLAGS = @LIBLOGNORM_CFLAGS@ LIBLOGNORM_LIBS = @LIBLOGNORM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIMD_FLAGS = @SIMD_FLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ 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@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPIONS = foreign no-dependencies sagan_CPPFLAGS = -I$(top_srcdir) $(LIBFASTJSON_CFLAGS) $(LIBESTR_CFLAGS) sagan_LDADD = $(LIBFASTJSON_LIBS) $(LIBLOGNORM_LIBS) $(LIBESTR_LIBS) sagan_SOURCES = sagan.c \ sagan-classifications.c \ sagan-config.c \ sagan-lockfile.c \ sagan-references.c \ sagan-rules.c \ sagan-signal.c \ sagan-key.c \ sagan-stats.c \ sagan-strlcat.c \ sagan-strlcpy.c \ sagan-usage.c \ sagan-util.c \ sagan-plog.c \ sagan-output.c \ sagan-processor.c \ sagan-gen-msg.c \ sagan-liblognorm.c \ sagan-ignore-list.c \ sagan-send-alert.c \ sagan-credits.c \ sagan-protocol-map.c \ sagan-geoip2.c \ sagan-meta-content.c \ sagan-flowbit.c \ sagan-check-flow.c\ sagan-aetas.c \ sagan-ipc.c \ parsers/parse-ip.c \ parsers/parse-port.c \ parsers/parse-proto.c \ parsers/parse-hash.c \ parsers/sagan-strstr/sagan-strstr-hook.c \ parsers/sagan-strstr/strstr_sse2.S \ parsers/sagan-strstr/strstr_sse4_2.S \ output-plugins/sagan-alert.c \ output-plugins/sagan-esmtp.c \ output-plugins/sagan-external.c \ output-plugins/sagan-unified2.c \ output-plugins/sagan-twofish.c \ output-plugins/sagan-snortsam.c \ output-plugins/sagan-syslog.c \ processors/sagan-engine.c \ processors/sagan-track-clients.c \ processors/sagan-report-clients.c \ processors/sagan-bluedot.c \ processors/sagan-blacklist.c \ processors/sagan-perfmon.c \ processors/sagan-bro-intel.c all: all-am .SUFFIXES: .SUFFIXES: .S .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) sagan$(EXEEXT): $(sagan_OBJECTS) $(sagan_DEPENDENCIES) $(EXTRA_sagan_DEPENDENCIES) @rm -f sagan$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sagan_OBJECTS) $(sagan_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-parse-hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-parse-ip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-parse-port.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-parse-proto.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-aetas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-alert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-blacklist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-bluedot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-bro-intel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-check-flow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-classifications.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-credits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-engine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-esmtp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-external.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-flowbit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-gen-msg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-geoip2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-ignore-list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-ipc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-key.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-liblognorm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-lockfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-meta-content.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-perfmon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-plog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-processor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-protocol-map.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-references.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-report-clients.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-rules.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-send-alert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-signal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-snortsam.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-stats.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-strlcat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-strlcpy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-strstr-hook.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-syslog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-track-clients.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-twofish.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-unified2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-usage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-sagan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-strstr_sse2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sagan-strstr_sse4_2.Po@am__quote@ .S.o: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< .S.obj: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` sagan-strstr_sse2.o: parsers/sagan-strstr/strstr_sse2.S @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT sagan-strstr_sse2.o -MD -MP -MF $(DEPDIR)/sagan-strstr_sse2.Tpo -c -o sagan-strstr_sse2.o `test -f 'parsers/sagan-strstr/strstr_sse2.S' || echo '$(srcdir)/'`parsers/sagan-strstr/strstr_sse2.S @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-strstr_sse2.Tpo $(DEPDIR)/sagan-strstr_sse2.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='parsers/sagan-strstr/strstr_sse2.S' object='sagan-strstr_sse2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o sagan-strstr_sse2.o `test -f 'parsers/sagan-strstr/strstr_sse2.S' || echo '$(srcdir)/'`parsers/sagan-strstr/strstr_sse2.S sagan-strstr_sse2.obj: parsers/sagan-strstr/strstr_sse2.S @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT sagan-strstr_sse2.obj -MD -MP -MF $(DEPDIR)/sagan-strstr_sse2.Tpo -c -o sagan-strstr_sse2.obj `if test -f 'parsers/sagan-strstr/strstr_sse2.S'; then $(CYGPATH_W) 'parsers/sagan-strstr/strstr_sse2.S'; else $(CYGPATH_W) '$(srcdir)/parsers/sagan-strstr/strstr_sse2.S'; fi` @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-strstr_sse2.Tpo $(DEPDIR)/sagan-strstr_sse2.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='parsers/sagan-strstr/strstr_sse2.S' object='sagan-strstr_sse2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o sagan-strstr_sse2.obj `if test -f 'parsers/sagan-strstr/strstr_sse2.S'; then $(CYGPATH_W) 'parsers/sagan-strstr/strstr_sse2.S'; else $(CYGPATH_W) '$(srcdir)/parsers/sagan-strstr/strstr_sse2.S'; fi` sagan-strstr_sse4_2.o: parsers/sagan-strstr/strstr_sse4_2.S @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT sagan-strstr_sse4_2.o -MD -MP -MF $(DEPDIR)/sagan-strstr_sse4_2.Tpo -c -o sagan-strstr_sse4_2.o `test -f 'parsers/sagan-strstr/strstr_sse4_2.S' || echo '$(srcdir)/'`parsers/sagan-strstr/strstr_sse4_2.S @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-strstr_sse4_2.Tpo $(DEPDIR)/sagan-strstr_sse4_2.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='parsers/sagan-strstr/strstr_sse4_2.S' object='sagan-strstr_sse4_2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o sagan-strstr_sse4_2.o `test -f 'parsers/sagan-strstr/strstr_sse4_2.S' || echo '$(srcdir)/'`parsers/sagan-strstr/strstr_sse4_2.S sagan-strstr_sse4_2.obj: parsers/sagan-strstr/strstr_sse4_2.S @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT sagan-strstr_sse4_2.obj -MD -MP -MF $(DEPDIR)/sagan-strstr_sse4_2.Tpo -c -o sagan-strstr_sse4_2.obj `if test -f 'parsers/sagan-strstr/strstr_sse4_2.S'; then $(CYGPATH_W) 'parsers/sagan-strstr/strstr_sse4_2.S'; else $(CYGPATH_W) '$(srcdir)/parsers/sagan-strstr/strstr_sse4_2.S'; fi` @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-strstr_sse4_2.Tpo $(DEPDIR)/sagan-strstr_sse4_2.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='parsers/sagan-strstr/strstr_sse4_2.S' object='sagan-strstr_sse4_2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o sagan-strstr_sse4_2.obj `if test -f 'parsers/sagan-strstr/strstr_sse4_2.S'; then $(CYGPATH_W) 'parsers/sagan-strstr/strstr_sse4_2.S'; else $(CYGPATH_W) '$(srcdir)/parsers/sagan-strstr/strstr_sse4_2.S'; fi` .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` sagan-sagan.o: sagan.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan.o -MD -MP -MF $(DEPDIR)/sagan-sagan.Tpo -c -o sagan-sagan.o `test -f 'sagan.c' || echo '$(srcdir)/'`sagan.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan.Tpo $(DEPDIR)/sagan-sagan.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan.c' object='sagan-sagan.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan.o `test -f 'sagan.c' || echo '$(srcdir)/'`sagan.c sagan-sagan.obj: sagan.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan.obj -MD -MP -MF $(DEPDIR)/sagan-sagan.Tpo -c -o sagan-sagan.obj `if test -f 'sagan.c'; then $(CYGPATH_W) 'sagan.c'; else $(CYGPATH_W) '$(srcdir)/sagan.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan.Tpo $(DEPDIR)/sagan-sagan.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan.c' object='sagan-sagan.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan.obj `if test -f 'sagan.c'; then $(CYGPATH_W) 'sagan.c'; else $(CYGPATH_W) '$(srcdir)/sagan.c'; fi` sagan-sagan-classifications.o: sagan-classifications.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-classifications.o -MD -MP -MF $(DEPDIR)/sagan-sagan-classifications.Tpo -c -o sagan-sagan-classifications.o `test -f 'sagan-classifications.c' || echo '$(srcdir)/'`sagan-classifications.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-classifications.Tpo $(DEPDIR)/sagan-sagan-classifications.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-classifications.c' object='sagan-sagan-classifications.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-classifications.o `test -f 'sagan-classifications.c' || echo '$(srcdir)/'`sagan-classifications.c sagan-sagan-classifications.obj: sagan-classifications.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-classifications.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-classifications.Tpo -c -o sagan-sagan-classifications.obj `if test -f 'sagan-classifications.c'; then $(CYGPATH_W) 'sagan-classifications.c'; else $(CYGPATH_W) '$(srcdir)/sagan-classifications.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-classifications.Tpo $(DEPDIR)/sagan-sagan-classifications.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-classifications.c' object='sagan-sagan-classifications.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-classifications.obj `if test -f 'sagan-classifications.c'; then $(CYGPATH_W) 'sagan-classifications.c'; else $(CYGPATH_W) '$(srcdir)/sagan-classifications.c'; fi` sagan-sagan-config.o: sagan-config.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-config.o -MD -MP -MF $(DEPDIR)/sagan-sagan-config.Tpo -c -o sagan-sagan-config.o `test -f 'sagan-config.c' || echo '$(srcdir)/'`sagan-config.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-config.Tpo $(DEPDIR)/sagan-sagan-config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-config.c' object='sagan-sagan-config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-config.o `test -f 'sagan-config.c' || echo '$(srcdir)/'`sagan-config.c sagan-sagan-config.obj: sagan-config.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-config.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-config.Tpo -c -o sagan-sagan-config.obj `if test -f 'sagan-config.c'; then $(CYGPATH_W) 'sagan-config.c'; else $(CYGPATH_W) '$(srcdir)/sagan-config.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-config.Tpo $(DEPDIR)/sagan-sagan-config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-config.c' object='sagan-sagan-config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-config.obj `if test -f 'sagan-config.c'; then $(CYGPATH_W) 'sagan-config.c'; else $(CYGPATH_W) '$(srcdir)/sagan-config.c'; fi` sagan-sagan-lockfile.o: sagan-lockfile.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-lockfile.o -MD -MP -MF $(DEPDIR)/sagan-sagan-lockfile.Tpo -c -o sagan-sagan-lockfile.o `test -f 'sagan-lockfile.c' || echo '$(srcdir)/'`sagan-lockfile.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-lockfile.Tpo $(DEPDIR)/sagan-sagan-lockfile.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-lockfile.c' object='sagan-sagan-lockfile.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-lockfile.o `test -f 'sagan-lockfile.c' || echo '$(srcdir)/'`sagan-lockfile.c sagan-sagan-lockfile.obj: sagan-lockfile.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-lockfile.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-lockfile.Tpo -c -o sagan-sagan-lockfile.obj `if test -f 'sagan-lockfile.c'; then $(CYGPATH_W) 'sagan-lockfile.c'; else $(CYGPATH_W) '$(srcdir)/sagan-lockfile.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-lockfile.Tpo $(DEPDIR)/sagan-sagan-lockfile.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-lockfile.c' object='sagan-sagan-lockfile.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-lockfile.obj `if test -f 'sagan-lockfile.c'; then $(CYGPATH_W) 'sagan-lockfile.c'; else $(CYGPATH_W) '$(srcdir)/sagan-lockfile.c'; fi` sagan-sagan-references.o: sagan-references.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-references.o -MD -MP -MF $(DEPDIR)/sagan-sagan-references.Tpo -c -o sagan-sagan-references.o `test -f 'sagan-references.c' || echo '$(srcdir)/'`sagan-references.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-references.Tpo $(DEPDIR)/sagan-sagan-references.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-references.c' object='sagan-sagan-references.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-references.o `test -f 'sagan-references.c' || echo '$(srcdir)/'`sagan-references.c sagan-sagan-references.obj: sagan-references.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-references.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-references.Tpo -c -o sagan-sagan-references.obj `if test -f 'sagan-references.c'; then $(CYGPATH_W) 'sagan-references.c'; else $(CYGPATH_W) '$(srcdir)/sagan-references.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-references.Tpo $(DEPDIR)/sagan-sagan-references.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-references.c' object='sagan-sagan-references.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-references.obj `if test -f 'sagan-references.c'; then $(CYGPATH_W) 'sagan-references.c'; else $(CYGPATH_W) '$(srcdir)/sagan-references.c'; fi` sagan-sagan-rules.o: sagan-rules.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-rules.o -MD -MP -MF $(DEPDIR)/sagan-sagan-rules.Tpo -c -o sagan-sagan-rules.o `test -f 'sagan-rules.c' || echo '$(srcdir)/'`sagan-rules.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-rules.Tpo $(DEPDIR)/sagan-sagan-rules.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-rules.c' object='sagan-sagan-rules.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-rules.o `test -f 'sagan-rules.c' || echo '$(srcdir)/'`sagan-rules.c sagan-sagan-rules.obj: sagan-rules.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-rules.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-rules.Tpo -c -o sagan-sagan-rules.obj `if test -f 'sagan-rules.c'; then $(CYGPATH_W) 'sagan-rules.c'; else $(CYGPATH_W) '$(srcdir)/sagan-rules.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-rules.Tpo $(DEPDIR)/sagan-sagan-rules.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-rules.c' object='sagan-sagan-rules.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-rules.obj `if test -f 'sagan-rules.c'; then $(CYGPATH_W) 'sagan-rules.c'; else $(CYGPATH_W) '$(srcdir)/sagan-rules.c'; fi` sagan-sagan-signal.o: sagan-signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-signal.o -MD -MP -MF $(DEPDIR)/sagan-sagan-signal.Tpo -c -o sagan-sagan-signal.o `test -f 'sagan-signal.c' || echo '$(srcdir)/'`sagan-signal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-signal.Tpo $(DEPDIR)/sagan-sagan-signal.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-signal.c' object='sagan-sagan-signal.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-signal.o `test -f 'sagan-signal.c' || echo '$(srcdir)/'`sagan-signal.c sagan-sagan-signal.obj: sagan-signal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-signal.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-signal.Tpo -c -o sagan-sagan-signal.obj `if test -f 'sagan-signal.c'; then $(CYGPATH_W) 'sagan-signal.c'; else $(CYGPATH_W) '$(srcdir)/sagan-signal.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-signal.Tpo $(DEPDIR)/sagan-sagan-signal.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-signal.c' object='sagan-sagan-signal.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-signal.obj `if test -f 'sagan-signal.c'; then $(CYGPATH_W) 'sagan-signal.c'; else $(CYGPATH_W) '$(srcdir)/sagan-signal.c'; fi` sagan-sagan-key.o: sagan-key.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-key.o -MD -MP -MF $(DEPDIR)/sagan-sagan-key.Tpo -c -o sagan-sagan-key.o `test -f 'sagan-key.c' || echo '$(srcdir)/'`sagan-key.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-key.Tpo $(DEPDIR)/sagan-sagan-key.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-key.c' object='sagan-sagan-key.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-key.o `test -f 'sagan-key.c' || echo '$(srcdir)/'`sagan-key.c sagan-sagan-key.obj: sagan-key.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-key.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-key.Tpo -c -o sagan-sagan-key.obj `if test -f 'sagan-key.c'; then $(CYGPATH_W) 'sagan-key.c'; else $(CYGPATH_W) '$(srcdir)/sagan-key.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-key.Tpo $(DEPDIR)/sagan-sagan-key.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-key.c' object='sagan-sagan-key.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-key.obj `if test -f 'sagan-key.c'; then $(CYGPATH_W) 'sagan-key.c'; else $(CYGPATH_W) '$(srcdir)/sagan-key.c'; fi` sagan-sagan-stats.o: sagan-stats.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-stats.o -MD -MP -MF $(DEPDIR)/sagan-sagan-stats.Tpo -c -o sagan-sagan-stats.o `test -f 'sagan-stats.c' || echo '$(srcdir)/'`sagan-stats.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-stats.Tpo $(DEPDIR)/sagan-sagan-stats.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-stats.c' object='sagan-sagan-stats.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-stats.o `test -f 'sagan-stats.c' || echo '$(srcdir)/'`sagan-stats.c sagan-sagan-stats.obj: sagan-stats.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-stats.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-stats.Tpo -c -o sagan-sagan-stats.obj `if test -f 'sagan-stats.c'; then $(CYGPATH_W) 'sagan-stats.c'; else $(CYGPATH_W) '$(srcdir)/sagan-stats.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-stats.Tpo $(DEPDIR)/sagan-sagan-stats.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-stats.c' object='sagan-sagan-stats.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-stats.obj `if test -f 'sagan-stats.c'; then $(CYGPATH_W) 'sagan-stats.c'; else $(CYGPATH_W) '$(srcdir)/sagan-stats.c'; fi` sagan-sagan-strlcat.o: sagan-strlcat.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-strlcat.o -MD -MP -MF $(DEPDIR)/sagan-sagan-strlcat.Tpo -c -o sagan-sagan-strlcat.o `test -f 'sagan-strlcat.c' || echo '$(srcdir)/'`sagan-strlcat.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-strlcat.Tpo $(DEPDIR)/sagan-sagan-strlcat.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-strlcat.c' object='sagan-sagan-strlcat.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-strlcat.o `test -f 'sagan-strlcat.c' || echo '$(srcdir)/'`sagan-strlcat.c sagan-sagan-strlcat.obj: sagan-strlcat.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-strlcat.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-strlcat.Tpo -c -o sagan-sagan-strlcat.obj `if test -f 'sagan-strlcat.c'; then $(CYGPATH_W) 'sagan-strlcat.c'; else $(CYGPATH_W) '$(srcdir)/sagan-strlcat.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-strlcat.Tpo $(DEPDIR)/sagan-sagan-strlcat.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-strlcat.c' object='sagan-sagan-strlcat.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-strlcat.obj `if test -f 'sagan-strlcat.c'; then $(CYGPATH_W) 'sagan-strlcat.c'; else $(CYGPATH_W) '$(srcdir)/sagan-strlcat.c'; fi` sagan-sagan-strlcpy.o: sagan-strlcpy.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-strlcpy.o -MD -MP -MF $(DEPDIR)/sagan-sagan-strlcpy.Tpo -c -o sagan-sagan-strlcpy.o `test -f 'sagan-strlcpy.c' || echo '$(srcdir)/'`sagan-strlcpy.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-strlcpy.Tpo $(DEPDIR)/sagan-sagan-strlcpy.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-strlcpy.c' object='sagan-sagan-strlcpy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-strlcpy.o `test -f 'sagan-strlcpy.c' || echo '$(srcdir)/'`sagan-strlcpy.c sagan-sagan-strlcpy.obj: sagan-strlcpy.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-strlcpy.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-strlcpy.Tpo -c -o sagan-sagan-strlcpy.obj `if test -f 'sagan-strlcpy.c'; then $(CYGPATH_W) 'sagan-strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/sagan-strlcpy.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-strlcpy.Tpo $(DEPDIR)/sagan-sagan-strlcpy.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-strlcpy.c' object='sagan-sagan-strlcpy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-strlcpy.obj `if test -f 'sagan-strlcpy.c'; then $(CYGPATH_W) 'sagan-strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/sagan-strlcpy.c'; fi` sagan-sagan-usage.o: sagan-usage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-usage.o -MD -MP -MF $(DEPDIR)/sagan-sagan-usage.Tpo -c -o sagan-sagan-usage.o `test -f 'sagan-usage.c' || echo '$(srcdir)/'`sagan-usage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-usage.Tpo $(DEPDIR)/sagan-sagan-usage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-usage.c' object='sagan-sagan-usage.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-usage.o `test -f 'sagan-usage.c' || echo '$(srcdir)/'`sagan-usage.c sagan-sagan-usage.obj: sagan-usage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-usage.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-usage.Tpo -c -o sagan-sagan-usage.obj `if test -f 'sagan-usage.c'; then $(CYGPATH_W) 'sagan-usage.c'; else $(CYGPATH_W) '$(srcdir)/sagan-usage.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-usage.Tpo $(DEPDIR)/sagan-sagan-usage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-usage.c' object='sagan-sagan-usage.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-usage.obj `if test -f 'sagan-usage.c'; then $(CYGPATH_W) 'sagan-usage.c'; else $(CYGPATH_W) '$(srcdir)/sagan-usage.c'; fi` sagan-sagan-util.o: sagan-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-util.o -MD -MP -MF $(DEPDIR)/sagan-sagan-util.Tpo -c -o sagan-sagan-util.o `test -f 'sagan-util.c' || echo '$(srcdir)/'`sagan-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-util.Tpo $(DEPDIR)/sagan-sagan-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-util.c' object='sagan-sagan-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-util.o `test -f 'sagan-util.c' || echo '$(srcdir)/'`sagan-util.c sagan-sagan-util.obj: sagan-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-util.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-util.Tpo -c -o sagan-sagan-util.obj `if test -f 'sagan-util.c'; then $(CYGPATH_W) 'sagan-util.c'; else $(CYGPATH_W) '$(srcdir)/sagan-util.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-util.Tpo $(DEPDIR)/sagan-sagan-util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-util.c' object='sagan-sagan-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-util.obj `if test -f 'sagan-util.c'; then $(CYGPATH_W) 'sagan-util.c'; else $(CYGPATH_W) '$(srcdir)/sagan-util.c'; fi` sagan-sagan-plog.o: sagan-plog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-plog.o -MD -MP -MF $(DEPDIR)/sagan-sagan-plog.Tpo -c -o sagan-sagan-plog.o `test -f 'sagan-plog.c' || echo '$(srcdir)/'`sagan-plog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-plog.Tpo $(DEPDIR)/sagan-sagan-plog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-plog.c' object='sagan-sagan-plog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-plog.o `test -f 'sagan-plog.c' || echo '$(srcdir)/'`sagan-plog.c sagan-sagan-plog.obj: sagan-plog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-plog.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-plog.Tpo -c -o sagan-sagan-plog.obj `if test -f 'sagan-plog.c'; then $(CYGPATH_W) 'sagan-plog.c'; else $(CYGPATH_W) '$(srcdir)/sagan-plog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-plog.Tpo $(DEPDIR)/sagan-sagan-plog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-plog.c' object='sagan-sagan-plog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-plog.obj `if test -f 'sagan-plog.c'; then $(CYGPATH_W) 'sagan-plog.c'; else $(CYGPATH_W) '$(srcdir)/sagan-plog.c'; fi` sagan-sagan-output.o: sagan-output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-output.o -MD -MP -MF $(DEPDIR)/sagan-sagan-output.Tpo -c -o sagan-sagan-output.o `test -f 'sagan-output.c' || echo '$(srcdir)/'`sagan-output.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-output.Tpo $(DEPDIR)/sagan-sagan-output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-output.c' object='sagan-sagan-output.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-output.o `test -f 'sagan-output.c' || echo '$(srcdir)/'`sagan-output.c sagan-sagan-output.obj: sagan-output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-output.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-output.Tpo -c -o sagan-sagan-output.obj `if test -f 'sagan-output.c'; then $(CYGPATH_W) 'sagan-output.c'; else $(CYGPATH_W) '$(srcdir)/sagan-output.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-output.Tpo $(DEPDIR)/sagan-sagan-output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-output.c' object='sagan-sagan-output.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-output.obj `if test -f 'sagan-output.c'; then $(CYGPATH_W) 'sagan-output.c'; else $(CYGPATH_W) '$(srcdir)/sagan-output.c'; fi` sagan-sagan-processor.o: sagan-processor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-processor.o -MD -MP -MF $(DEPDIR)/sagan-sagan-processor.Tpo -c -o sagan-sagan-processor.o `test -f 'sagan-processor.c' || echo '$(srcdir)/'`sagan-processor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-processor.Tpo $(DEPDIR)/sagan-sagan-processor.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-processor.c' object='sagan-sagan-processor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-processor.o `test -f 'sagan-processor.c' || echo '$(srcdir)/'`sagan-processor.c sagan-sagan-processor.obj: sagan-processor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-processor.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-processor.Tpo -c -o sagan-sagan-processor.obj `if test -f 'sagan-processor.c'; then $(CYGPATH_W) 'sagan-processor.c'; else $(CYGPATH_W) '$(srcdir)/sagan-processor.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-processor.Tpo $(DEPDIR)/sagan-sagan-processor.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-processor.c' object='sagan-sagan-processor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-processor.obj `if test -f 'sagan-processor.c'; then $(CYGPATH_W) 'sagan-processor.c'; else $(CYGPATH_W) '$(srcdir)/sagan-processor.c'; fi` sagan-sagan-gen-msg.o: sagan-gen-msg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-gen-msg.o -MD -MP -MF $(DEPDIR)/sagan-sagan-gen-msg.Tpo -c -o sagan-sagan-gen-msg.o `test -f 'sagan-gen-msg.c' || echo '$(srcdir)/'`sagan-gen-msg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-gen-msg.Tpo $(DEPDIR)/sagan-sagan-gen-msg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-gen-msg.c' object='sagan-sagan-gen-msg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-gen-msg.o `test -f 'sagan-gen-msg.c' || echo '$(srcdir)/'`sagan-gen-msg.c sagan-sagan-gen-msg.obj: sagan-gen-msg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-gen-msg.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-gen-msg.Tpo -c -o sagan-sagan-gen-msg.obj `if test -f 'sagan-gen-msg.c'; then $(CYGPATH_W) 'sagan-gen-msg.c'; else $(CYGPATH_W) '$(srcdir)/sagan-gen-msg.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-gen-msg.Tpo $(DEPDIR)/sagan-sagan-gen-msg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-gen-msg.c' object='sagan-sagan-gen-msg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-gen-msg.obj `if test -f 'sagan-gen-msg.c'; then $(CYGPATH_W) 'sagan-gen-msg.c'; else $(CYGPATH_W) '$(srcdir)/sagan-gen-msg.c'; fi` sagan-sagan-liblognorm.o: sagan-liblognorm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-liblognorm.o -MD -MP -MF $(DEPDIR)/sagan-sagan-liblognorm.Tpo -c -o sagan-sagan-liblognorm.o `test -f 'sagan-liblognorm.c' || echo '$(srcdir)/'`sagan-liblognorm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-liblognorm.Tpo $(DEPDIR)/sagan-sagan-liblognorm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-liblognorm.c' object='sagan-sagan-liblognorm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-liblognorm.o `test -f 'sagan-liblognorm.c' || echo '$(srcdir)/'`sagan-liblognorm.c sagan-sagan-liblognorm.obj: sagan-liblognorm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-liblognorm.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-liblognorm.Tpo -c -o sagan-sagan-liblognorm.obj `if test -f 'sagan-liblognorm.c'; then $(CYGPATH_W) 'sagan-liblognorm.c'; else $(CYGPATH_W) '$(srcdir)/sagan-liblognorm.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-liblognorm.Tpo $(DEPDIR)/sagan-sagan-liblognorm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-liblognorm.c' object='sagan-sagan-liblognorm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-liblognorm.obj `if test -f 'sagan-liblognorm.c'; then $(CYGPATH_W) 'sagan-liblognorm.c'; else $(CYGPATH_W) '$(srcdir)/sagan-liblognorm.c'; fi` sagan-sagan-ignore-list.o: sagan-ignore-list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-ignore-list.o -MD -MP -MF $(DEPDIR)/sagan-sagan-ignore-list.Tpo -c -o sagan-sagan-ignore-list.o `test -f 'sagan-ignore-list.c' || echo '$(srcdir)/'`sagan-ignore-list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-ignore-list.Tpo $(DEPDIR)/sagan-sagan-ignore-list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-ignore-list.c' object='sagan-sagan-ignore-list.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-ignore-list.o `test -f 'sagan-ignore-list.c' || echo '$(srcdir)/'`sagan-ignore-list.c sagan-sagan-ignore-list.obj: sagan-ignore-list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-ignore-list.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-ignore-list.Tpo -c -o sagan-sagan-ignore-list.obj `if test -f 'sagan-ignore-list.c'; then $(CYGPATH_W) 'sagan-ignore-list.c'; else $(CYGPATH_W) '$(srcdir)/sagan-ignore-list.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-ignore-list.Tpo $(DEPDIR)/sagan-sagan-ignore-list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-ignore-list.c' object='sagan-sagan-ignore-list.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-ignore-list.obj `if test -f 'sagan-ignore-list.c'; then $(CYGPATH_W) 'sagan-ignore-list.c'; else $(CYGPATH_W) '$(srcdir)/sagan-ignore-list.c'; fi` sagan-sagan-send-alert.o: sagan-send-alert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-send-alert.o -MD -MP -MF $(DEPDIR)/sagan-sagan-send-alert.Tpo -c -o sagan-sagan-send-alert.o `test -f 'sagan-send-alert.c' || echo '$(srcdir)/'`sagan-send-alert.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-send-alert.Tpo $(DEPDIR)/sagan-sagan-send-alert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-send-alert.c' object='sagan-sagan-send-alert.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-send-alert.o `test -f 'sagan-send-alert.c' || echo '$(srcdir)/'`sagan-send-alert.c sagan-sagan-send-alert.obj: sagan-send-alert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-send-alert.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-send-alert.Tpo -c -o sagan-sagan-send-alert.obj `if test -f 'sagan-send-alert.c'; then $(CYGPATH_W) 'sagan-send-alert.c'; else $(CYGPATH_W) '$(srcdir)/sagan-send-alert.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-send-alert.Tpo $(DEPDIR)/sagan-sagan-send-alert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-send-alert.c' object='sagan-sagan-send-alert.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-send-alert.obj `if test -f 'sagan-send-alert.c'; then $(CYGPATH_W) 'sagan-send-alert.c'; else $(CYGPATH_W) '$(srcdir)/sagan-send-alert.c'; fi` sagan-sagan-credits.o: sagan-credits.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-credits.o -MD -MP -MF $(DEPDIR)/sagan-sagan-credits.Tpo -c -o sagan-sagan-credits.o `test -f 'sagan-credits.c' || echo '$(srcdir)/'`sagan-credits.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-credits.Tpo $(DEPDIR)/sagan-sagan-credits.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-credits.c' object='sagan-sagan-credits.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-credits.o `test -f 'sagan-credits.c' || echo '$(srcdir)/'`sagan-credits.c sagan-sagan-credits.obj: sagan-credits.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-credits.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-credits.Tpo -c -o sagan-sagan-credits.obj `if test -f 'sagan-credits.c'; then $(CYGPATH_W) 'sagan-credits.c'; else $(CYGPATH_W) '$(srcdir)/sagan-credits.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-credits.Tpo $(DEPDIR)/sagan-sagan-credits.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-credits.c' object='sagan-sagan-credits.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-credits.obj `if test -f 'sagan-credits.c'; then $(CYGPATH_W) 'sagan-credits.c'; else $(CYGPATH_W) '$(srcdir)/sagan-credits.c'; fi` sagan-sagan-protocol-map.o: sagan-protocol-map.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-protocol-map.o -MD -MP -MF $(DEPDIR)/sagan-sagan-protocol-map.Tpo -c -o sagan-sagan-protocol-map.o `test -f 'sagan-protocol-map.c' || echo '$(srcdir)/'`sagan-protocol-map.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-protocol-map.Tpo $(DEPDIR)/sagan-sagan-protocol-map.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-protocol-map.c' object='sagan-sagan-protocol-map.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-protocol-map.o `test -f 'sagan-protocol-map.c' || echo '$(srcdir)/'`sagan-protocol-map.c sagan-sagan-protocol-map.obj: sagan-protocol-map.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-protocol-map.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-protocol-map.Tpo -c -o sagan-sagan-protocol-map.obj `if test -f 'sagan-protocol-map.c'; then $(CYGPATH_W) 'sagan-protocol-map.c'; else $(CYGPATH_W) '$(srcdir)/sagan-protocol-map.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-protocol-map.Tpo $(DEPDIR)/sagan-sagan-protocol-map.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-protocol-map.c' object='sagan-sagan-protocol-map.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-protocol-map.obj `if test -f 'sagan-protocol-map.c'; then $(CYGPATH_W) 'sagan-protocol-map.c'; else $(CYGPATH_W) '$(srcdir)/sagan-protocol-map.c'; fi` sagan-sagan-geoip2.o: sagan-geoip2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-geoip2.o -MD -MP -MF $(DEPDIR)/sagan-sagan-geoip2.Tpo -c -o sagan-sagan-geoip2.o `test -f 'sagan-geoip2.c' || echo '$(srcdir)/'`sagan-geoip2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-geoip2.Tpo $(DEPDIR)/sagan-sagan-geoip2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-geoip2.c' object='sagan-sagan-geoip2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-geoip2.o `test -f 'sagan-geoip2.c' || echo '$(srcdir)/'`sagan-geoip2.c sagan-sagan-geoip2.obj: sagan-geoip2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-geoip2.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-geoip2.Tpo -c -o sagan-sagan-geoip2.obj `if test -f 'sagan-geoip2.c'; then $(CYGPATH_W) 'sagan-geoip2.c'; else $(CYGPATH_W) '$(srcdir)/sagan-geoip2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-geoip2.Tpo $(DEPDIR)/sagan-sagan-geoip2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-geoip2.c' object='sagan-sagan-geoip2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-geoip2.obj `if test -f 'sagan-geoip2.c'; then $(CYGPATH_W) 'sagan-geoip2.c'; else $(CYGPATH_W) '$(srcdir)/sagan-geoip2.c'; fi` sagan-sagan-meta-content.o: sagan-meta-content.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-meta-content.o -MD -MP -MF $(DEPDIR)/sagan-sagan-meta-content.Tpo -c -o sagan-sagan-meta-content.o `test -f 'sagan-meta-content.c' || echo '$(srcdir)/'`sagan-meta-content.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-meta-content.Tpo $(DEPDIR)/sagan-sagan-meta-content.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-meta-content.c' object='sagan-sagan-meta-content.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-meta-content.o `test -f 'sagan-meta-content.c' || echo '$(srcdir)/'`sagan-meta-content.c sagan-sagan-meta-content.obj: sagan-meta-content.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-meta-content.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-meta-content.Tpo -c -o sagan-sagan-meta-content.obj `if test -f 'sagan-meta-content.c'; then $(CYGPATH_W) 'sagan-meta-content.c'; else $(CYGPATH_W) '$(srcdir)/sagan-meta-content.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-meta-content.Tpo $(DEPDIR)/sagan-sagan-meta-content.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-meta-content.c' object='sagan-sagan-meta-content.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-meta-content.obj `if test -f 'sagan-meta-content.c'; then $(CYGPATH_W) 'sagan-meta-content.c'; else $(CYGPATH_W) '$(srcdir)/sagan-meta-content.c'; fi` sagan-sagan-flowbit.o: sagan-flowbit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-flowbit.o -MD -MP -MF $(DEPDIR)/sagan-sagan-flowbit.Tpo -c -o sagan-sagan-flowbit.o `test -f 'sagan-flowbit.c' || echo '$(srcdir)/'`sagan-flowbit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-flowbit.Tpo $(DEPDIR)/sagan-sagan-flowbit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-flowbit.c' object='sagan-sagan-flowbit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-flowbit.o `test -f 'sagan-flowbit.c' || echo '$(srcdir)/'`sagan-flowbit.c sagan-sagan-flowbit.obj: sagan-flowbit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-flowbit.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-flowbit.Tpo -c -o sagan-sagan-flowbit.obj `if test -f 'sagan-flowbit.c'; then $(CYGPATH_W) 'sagan-flowbit.c'; else $(CYGPATH_W) '$(srcdir)/sagan-flowbit.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-flowbit.Tpo $(DEPDIR)/sagan-sagan-flowbit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-flowbit.c' object='sagan-sagan-flowbit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-flowbit.obj `if test -f 'sagan-flowbit.c'; then $(CYGPATH_W) 'sagan-flowbit.c'; else $(CYGPATH_W) '$(srcdir)/sagan-flowbit.c'; fi` sagan-sagan-check-flow.o: sagan-check-flow.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-check-flow.o -MD -MP -MF $(DEPDIR)/sagan-sagan-check-flow.Tpo -c -o sagan-sagan-check-flow.o `test -f 'sagan-check-flow.c' || echo '$(srcdir)/'`sagan-check-flow.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-check-flow.Tpo $(DEPDIR)/sagan-sagan-check-flow.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-check-flow.c' object='sagan-sagan-check-flow.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-check-flow.o `test -f 'sagan-check-flow.c' || echo '$(srcdir)/'`sagan-check-flow.c sagan-sagan-check-flow.obj: sagan-check-flow.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-check-flow.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-check-flow.Tpo -c -o sagan-sagan-check-flow.obj `if test -f 'sagan-check-flow.c'; then $(CYGPATH_W) 'sagan-check-flow.c'; else $(CYGPATH_W) '$(srcdir)/sagan-check-flow.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-check-flow.Tpo $(DEPDIR)/sagan-sagan-check-flow.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-check-flow.c' object='sagan-sagan-check-flow.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-check-flow.obj `if test -f 'sagan-check-flow.c'; then $(CYGPATH_W) 'sagan-check-flow.c'; else $(CYGPATH_W) '$(srcdir)/sagan-check-flow.c'; fi` sagan-sagan-aetas.o: sagan-aetas.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-aetas.o -MD -MP -MF $(DEPDIR)/sagan-sagan-aetas.Tpo -c -o sagan-sagan-aetas.o `test -f 'sagan-aetas.c' || echo '$(srcdir)/'`sagan-aetas.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-aetas.Tpo $(DEPDIR)/sagan-sagan-aetas.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-aetas.c' object='sagan-sagan-aetas.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-aetas.o `test -f 'sagan-aetas.c' || echo '$(srcdir)/'`sagan-aetas.c sagan-sagan-aetas.obj: sagan-aetas.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-aetas.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-aetas.Tpo -c -o sagan-sagan-aetas.obj `if test -f 'sagan-aetas.c'; then $(CYGPATH_W) 'sagan-aetas.c'; else $(CYGPATH_W) '$(srcdir)/sagan-aetas.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-aetas.Tpo $(DEPDIR)/sagan-sagan-aetas.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-aetas.c' object='sagan-sagan-aetas.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-aetas.obj `if test -f 'sagan-aetas.c'; then $(CYGPATH_W) 'sagan-aetas.c'; else $(CYGPATH_W) '$(srcdir)/sagan-aetas.c'; fi` sagan-sagan-ipc.o: sagan-ipc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-ipc.o -MD -MP -MF $(DEPDIR)/sagan-sagan-ipc.Tpo -c -o sagan-sagan-ipc.o `test -f 'sagan-ipc.c' || echo '$(srcdir)/'`sagan-ipc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-ipc.Tpo $(DEPDIR)/sagan-sagan-ipc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-ipc.c' object='sagan-sagan-ipc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-ipc.o `test -f 'sagan-ipc.c' || echo '$(srcdir)/'`sagan-ipc.c sagan-sagan-ipc.obj: sagan-ipc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-ipc.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-ipc.Tpo -c -o sagan-sagan-ipc.obj `if test -f 'sagan-ipc.c'; then $(CYGPATH_W) 'sagan-ipc.c'; else $(CYGPATH_W) '$(srcdir)/sagan-ipc.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-ipc.Tpo $(DEPDIR)/sagan-sagan-ipc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sagan-ipc.c' object='sagan-sagan-ipc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-ipc.obj `if test -f 'sagan-ipc.c'; then $(CYGPATH_W) 'sagan-ipc.c'; else $(CYGPATH_W) '$(srcdir)/sagan-ipc.c'; fi` sagan-parse-ip.o: parsers/parse-ip.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-parse-ip.o -MD -MP -MF $(DEPDIR)/sagan-parse-ip.Tpo -c -o sagan-parse-ip.o `test -f 'parsers/parse-ip.c' || echo '$(srcdir)/'`parsers/parse-ip.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-parse-ip.Tpo $(DEPDIR)/sagan-parse-ip.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsers/parse-ip.c' object='sagan-parse-ip.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-parse-ip.o `test -f 'parsers/parse-ip.c' || echo '$(srcdir)/'`parsers/parse-ip.c sagan-parse-ip.obj: parsers/parse-ip.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-parse-ip.obj -MD -MP -MF $(DEPDIR)/sagan-parse-ip.Tpo -c -o sagan-parse-ip.obj `if test -f 'parsers/parse-ip.c'; then $(CYGPATH_W) 'parsers/parse-ip.c'; else $(CYGPATH_W) '$(srcdir)/parsers/parse-ip.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-parse-ip.Tpo $(DEPDIR)/sagan-parse-ip.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsers/parse-ip.c' object='sagan-parse-ip.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-parse-ip.obj `if test -f 'parsers/parse-ip.c'; then $(CYGPATH_W) 'parsers/parse-ip.c'; else $(CYGPATH_W) '$(srcdir)/parsers/parse-ip.c'; fi` sagan-parse-port.o: parsers/parse-port.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-parse-port.o -MD -MP -MF $(DEPDIR)/sagan-parse-port.Tpo -c -o sagan-parse-port.o `test -f 'parsers/parse-port.c' || echo '$(srcdir)/'`parsers/parse-port.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-parse-port.Tpo $(DEPDIR)/sagan-parse-port.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsers/parse-port.c' object='sagan-parse-port.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-parse-port.o `test -f 'parsers/parse-port.c' || echo '$(srcdir)/'`parsers/parse-port.c sagan-parse-port.obj: parsers/parse-port.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-parse-port.obj -MD -MP -MF $(DEPDIR)/sagan-parse-port.Tpo -c -o sagan-parse-port.obj `if test -f 'parsers/parse-port.c'; then $(CYGPATH_W) 'parsers/parse-port.c'; else $(CYGPATH_W) '$(srcdir)/parsers/parse-port.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-parse-port.Tpo $(DEPDIR)/sagan-parse-port.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsers/parse-port.c' object='sagan-parse-port.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-parse-port.obj `if test -f 'parsers/parse-port.c'; then $(CYGPATH_W) 'parsers/parse-port.c'; else $(CYGPATH_W) '$(srcdir)/parsers/parse-port.c'; fi` sagan-parse-proto.o: parsers/parse-proto.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-parse-proto.o -MD -MP -MF $(DEPDIR)/sagan-parse-proto.Tpo -c -o sagan-parse-proto.o `test -f 'parsers/parse-proto.c' || echo '$(srcdir)/'`parsers/parse-proto.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-parse-proto.Tpo $(DEPDIR)/sagan-parse-proto.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsers/parse-proto.c' object='sagan-parse-proto.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-parse-proto.o `test -f 'parsers/parse-proto.c' || echo '$(srcdir)/'`parsers/parse-proto.c sagan-parse-proto.obj: parsers/parse-proto.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-parse-proto.obj -MD -MP -MF $(DEPDIR)/sagan-parse-proto.Tpo -c -o sagan-parse-proto.obj `if test -f 'parsers/parse-proto.c'; then $(CYGPATH_W) 'parsers/parse-proto.c'; else $(CYGPATH_W) '$(srcdir)/parsers/parse-proto.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-parse-proto.Tpo $(DEPDIR)/sagan-parse-proto.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsers/parse-proto.c' object='sagan-parse-proto.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-parse-proto.obj `if test -f 'parsers/parse-proto.c'; then $(CYGPATH_W) 'parsers/parse-proto.c'; else $(CYGPATH_W) '$(srcdir)/parsers/parse-proto.c'; fi` sagan-parse-hash.o: parsers/parse-hash.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-parse-hash.o -MD -MP -MF $(DEPDIR)/sagan-parse-hash.Tpo -c -o sagan-parse-hash.o `test -f 'parsers/parse-hash.c' || echo '$(srcdir)/'`parsers/parse-hash.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-parse-hash.Tpo $(DEPDIR)/sagan-parse-hash.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsers/parse-hash.c' object='sagan-parse-hash.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-parse-hash.o `test -f 'parsers/parse-hash.c' || echo '$(srcdir)/'`parsers/parse-hash.c sagan-parse-hash.obj: parsers/parse-hash.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-parse-hash.obj -MD -MP -MF $(DEPDIR)/sagan-parse-hash.Tpo -c -o sagan-parse-hash.obj `if test -f 'parsers/parse-hash.c'; then $(CYGPATH_W) 'parsers/parse-hash.c'; else $(CYGPATH_W) '$(srcdir)/parsers/parse-hash.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-parse-hash.Tpo $(DEPDIR)/sagan-parse-hash.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsers/parse-hash.c' object='sagan-parse-hash.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-parse-hash.obj `if test -f 'parsers/parse-hash.c'; then $(CYGPATH_W) 'parsers/parse-hash.c'; else $(CYGPATH_W) '$(srcdir)/parsers/parse-hash.c'; fi` sagan-sagan-strstr-hook.o: parsers/sagan-strstr/sagan-strstr-hook.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-strstr-hook.o -MD -MP -MF $(DEPDIR)/sagan-sagan-strstr-hook.Tpo -c -o sagan-sagan-strstr-hook.o `test -f 'parsers/sagan-strstr/sagan-strstr-hook.c' || echo '$(srcdir)/'`parsers/sagan-strstr/sagan-strstr-hook.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-strstr-hook.Tpo $(DEPDIR)/sagan-sagan-strstr-hook.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsers/sagan-strstr/sagan-strstr-hook.c' object='sagan-sagan-strstr-hook.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-strstr-hook.o `test -f 'parsers/sagan-strstr/sagan-strstr-hook.c' || echo '$(srcdir)/'`parsers/sagan-strstr/sagan-strstr-hook.c sagan-sagan-strstr-hook.obj: parsers/sagan-strstr/sagan-strstr-hook.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-strstr-hook.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-strstr-hook.Tpo -c -o sagan-sagan-strstr-hook.obj `if test -f 'parsers/sagan-strstr/sagan-strstr-hook.c'; then $(CYGPATH_W) 'parsers/sagan-strstr/sagan-strstr-hook.c'; else $(CYGPATH_W) '$(srcdir)/parsers/sagan-strstr/sagan-strstr-hook.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-strstr-hook.Tpo $(DEPDIR)/sagan-sagan-strstr-hook.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parsers/sagan-strstr/sagan-strstr-hook.c' object='sagan-sagan-strstr-hook.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-strstr-hook.obj `if test -f 'parsers/sagan-strstr/sagan-strstr-hook.c'; then $(CYGPATH_W) 'parsers/sagan-strstr/sagan-strstr-hook.c'; else $(CYGPATH_W) '$(srcdir)/parsers/sagan-strstr/sagan-strstr-hook.c'; fi` sagan-sagan-alert.o: output-plugins/sagan-alert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-alert.o -MD -MP -MF $(DEPDIR)/sagan-sagan-alert.Tpo -c -o sagan-sagan-alert.o `test -f 'output-plugins/sagan-alert.c' || echo '$(srcdir)/'`output-plugins/sagan-alert.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-alert.Tpo $(DEPDIR)/sagan-sagan-alert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-alert.c' object='sagan-sagan-alert.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-alert.o `test -f 'output-plugins/sagan-alert.c' || echo '$(srcdir)/'`output-plugins/sagan-alert.c sagan-sagan-alert.obj: output-plugins/sagan-alert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-alert.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-alert.Tpo -c -o sagan-sagan-alert.obj `if test -f 'output-plugins/sagan-alert.c'; then $(CYGPATH_W) 'output-plugins/sagan-alert.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-alert.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-alert.Tpo $(DEPDIR)/sagan-sagan-alert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-alert.c' object='sagan-sagan-alert.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-alert.obj `if test -f 'output-plugins/sagan-alert.c'; then $(CYGPATH_W) 'output-plugins/sagan-alert.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-alert.c'; fi` sagan-sagan-esmtp.o: output-plugins/sagan-esmtp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-esmtp.o -MD -MP -MF $(DEPDIR)/sagan-sagan-esmtp.Tpo -c -o sagan-sagan-esmtp.o `test -f 'output-plugins/sagan-esmtp.c' || echo '$(srcdir)/'`output-plugins/sagan-esmtp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-esmtp.Tpo $(DEPDIR)/sagan-sagan-esmtp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-esmtp.c' object='sagan-sagan-esmtp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-esmtp.o `test -f 'output-plugins/sagan-esmtp.c' || echo '$(srcdir)/'`output-plugins/sagan-esmtp.c sagan-sagan-esmtp.obj: output-plugins/sagan-esmtp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-esmtp.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-esmtp.Tpo -c -o sagan-sagan-esmtp.obj `if test -f 'output-plugins/sagan-esmtp.c'; then $(CYGPATH_W) 'output-plugins/sagan-esmtp.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-esmtp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-esmtp.Tpo $(DEPDIR)/sagan-sagan-esmtp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-esmtp.c' object='sagan-sagan-esmtp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-esmtp.obj `if test -f 'output-plugins/sagan-esmtp.c'; then $(CYGPATH_W) 'output-plugins/sagan-esmtp.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-esmtp.c'; fi` sagan-sagan-external.o: output-plugins/sagan-external.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-external.o -MD -MP -MF $(DEPDIR)/sagan-sagan-external.Tpo -c -o sagan-sagan-external.o `test -f 'output-plugins/sagan-external.c' || echo '$(srcdir)/'`output-plugins/sagan-external.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-external.Tpo $(DEPDIR)/sagan-sagan-external.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-external.c' object='sagan-sagan-external.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-external.o `test -f 'output-plugins/sagan-external.c' || echo '$(srcdir)/'`output-plugins/sagan-external.c sagan-sagan-external.obj: output-plugins/sagan-external.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-external.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-external.Tpo -c -o sagan-sagan-external.obj `if test -f 'output-plugins/sagan-external.c'; then $(CYGPATH_W) 'output-plugins/sagan-external.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-external.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-external.Tpo $(DEPDIR)/sagan-sagan-external.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-external.c' object='sagan-sagan-external.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-external.obj `if test -f 'output-plugins/sagan-external.c'; then $(CYGPATH_W) 'output-plugins/sagan-external.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-external.c'; fi` sagan-sagan-unified2.o: output-plugins/sagan-unified2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-unified2.o -MD -MP -MF $(DEPDIR)/sagan-sagan-unified2.Tpo -c -o sagan-sagan-unified2.o `test -f 'output-plugins/sagan-unified2.c' || echo '$(srcdir)/'`output-plugins/sagan-unified2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-unified2.Tpo $(DEPDIR)/sagan-sagan-unified2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-unified2.c' object='sagan-sagan-unified2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-unified2.o `test -f 'output-plugins/sagan-unified2.c' || echo '$(srcdir)/'`output-plugins/sagan-unified2.c sagan-sagan-unified2.obj: output-plugins/sagan-unified2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-unified2.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-unified2.Tpo -c -o sagan-sagan-unified2.obj `if test -f 'output-plugins/sagan-unified2.c'; then $(CYGPATH_W) 'output-plugins/sagan-unified2.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-unified2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-unified2.Tpo $(DEPDIR)/sagan-sagan-unified2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-unified2.c' object='sagan-sagan-unified2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-unified2.obj `if test -f 'output-plugins/sagan-unified2.c'; then $(CYGPATH_W) 'output-plugins/sagan-unified2.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-unified2.c'; fi` sagan-sagan-twofish.o: output-plugins/sagan-twofish.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-twofish.o -MD -MP -MF $(DEPDIR)/sagan-sagan-twofish.Tpo -c -o sagan-sagan-twofish.o `test -f 'output-plugins/sagan-twofish.c' || echo '$(srcdir)/'`output-plugins/sagan-twofish.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-twofish.Tpo $(DEPDIR)/sagan-sagan-twofish.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-twofish.c' object='sagan-sagan-twofish.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-twofish.o `test -f 'output-plugins/sagan-twofish.c' || echo '$(srcdir)/'`output-plugins/sagan-twofish.c sagan-sagan-twofish.obj: output-plugins/sagan-twofish.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-twofish.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-twofish.Tpo -c -o sagan-sagan-twofish.obj `if test -f 'output-plugins/sagan-twofish.c'; then $(CYGPATH_W) 'output-plugins/sagan-twofish.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-twofish.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-twofish.Tpo $(DEPDIR)/sagan-sagan-twofish.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-twofish.c' object='sagan-sagan-twofish.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-twofish.obj `if test -f 'output-plugins/sagan-twofish.c'; then $(CYGPATH_W) 'output-plugins/sagan-twofish.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-twofish.c'; fi` sagan-sagan-snortsam.o: output-plugins/sagan-snortsam.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-snortsam.o -MD -MP -MF $(DEPDIR)/sagan-sagan-snortsam.Tpo -c -o sagan-sagan-snortsam.o `test -f 'output-plugins/sagan-snortsam.c' || echo '$(srcdir)/'`output-plugins/sagan-snortsam.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-snortsam.Tpo $(DEPDIR)/sagan-sagan-snortsam.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-snortsam.c' object='sagan-sagan-snortsam.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-snortsam.o `test -f 'output-plugins/sagan-snortsam.c' || echo '$(srcdir)/'`output-plugins/sagan-snortsam.c sagan-sagan-snortsam.obj: output-plugins/sagan-snortsam.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-snortsam.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-snortsam.Tpo -c -o sagan-sagan-snortsam.obj `if test -f 'output-plugins/sagan-snortsam.c'; then $(CYGPATH_W) 'output-plugins/sagan-snortsam.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-snortsam.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-snortsam.Tpo $(DEPDIR)/sagan-sagan-snortsam.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-snortsam.c' object='sagan-sagan-snortsam.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-snortsam.obj `if test -f 'output-plugins/sagan-snortsam.c'; then $(CYGPATH_W) 'output-plugins/sagan-snortsam.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-snortsam.c'; fi` sagan-sagan-syslog.o: output-plugins/sagan-syslog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-syslog.o -MD -MP -MF $(DEPDIR)/sagan-sagan-syslog.Tpo -c -o sagan-sagan-syslog.o `test -f 'output-plugins/sagan-syslog.c' || echo '$(srcdir)/'`output-plugins/sagan-syslog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-syslog.Tpo $(DEPDIR)/sagan-sagan-syslog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-syslog.c' object='sagan-sagan-syslog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-syslog.o `test -f 'output-plugins/sagan-syslog.c' || echo '$(srcdir)/'`output-plugins/sagan-syslog.c sagan-sagan-syslog.obj: output-plugins/sagan-syslog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-syslog.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-syslog.Tpo -c -o sagan-sagan-syslog.obj `if test -f 'output-plugins/sagan-syslog.c'; then $(CYGPATH_W) 'output-plugins/sagan-syslog.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-syslog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-syslog.Tpo $(DEPDIR)/sagan-sagan-syslog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='output-plugins/sagan-syslog.c' object='sagan-sagan-syslog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-syslog.obj `if test -f 'output-plugins/sagan-syslog.c'; then $(CYGPATH_W) 'output-plugins/sagan-syslog.c'; else $(CYGPATH_W) '$(srcdir)/output-plugins/sagan-syslog.c'; fi` sagan-sagan-engine.o: processors/sagan-engine.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-engine.o -MD -MP -MF $(DEPDIR)/sagan-sagan-engine.Tpo -c -o sagan-sagan-engine.o `test -f 'processors/sagan-engine.c' || echo '$(srcdir)/'`processors/sagan-engine.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-engine.Tpo $(DEPDIR)/sagan-sagan-engine.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-engine.c' object='sagan-sagan-engine.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-engine.o `test -f 'processors/sagan-engine.c' || echo '$(srcdir)/'`processors/sagan-engine.c sagan-sagan-engine.obj: processors/sagan-engine.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-engine.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-engine.Tpo -c -o sagan-sagan-engine.obj `if test -f 'processors/sagan-engine.c'; then $(CYGPATH_W) 'processors/sagan-engine.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-engine.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-engine.Tpo $(DEPDIR)/sagan-sagan-engine.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-engine.c' object='sagan-sagan-engine.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-engine.obj `if test -f 'processors/sagan-engine.c'; then $(CYGPATH_W) 'processors/sagan-engine.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-engine.c'; fi` sagan-sagan-track-clients.o: processors/sagan-track-clients.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-track-clients.o -MD -MP -MF $(DEPDIR)/sagan-sagan-track-clients.Tpo -c -o sagan-sagan-track-clients.o `test -f 'processors/sagan-track-clients.c' || echo '$(srcdir)/'`processors/sagan-track-clients.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-track-clients.Tpo $(DEPDIR)/sagan-sagan-track-clients.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-track-clients.c' object='sagan-sagan-track-clients.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-track-clients.o `test -f 'processors/sagan-track-clients.c' || echo '$(srcdir)/'`processors/sagan-track-clients.c sagan-sagan-track-clients.obj: processors/sagan-track-clients.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-track-clients.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-track-clients.Tpo -c -o sagan-sagan-track-clients.obj `if test -f 'processors/sagan-track-clients.c'; then $(CYGPATH_W) 'processors/sagan-track-clients.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-track-clients.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-track-clients.Tpo $(DEPDIR)/sagan-sagan-track-clients.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-track-clients.c' object='sagan-sagan-track-clients.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-track-clients.obj `if test -f 'processors/sagan-track-clients.c'; then $(CYGPATH_W) 'processors/sagan-track-clients.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-track-clients.c'; fi` sagan-sagan-report-clients.o: processors/sagan-report-clients.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-report-clients.o -MD -MP -MF $(DEPDIR)/sagan-sagan-report-clients.Tpo -c -o sagan-sagan-report-clients.o `test -f 'processors/sagan-report-clients.c' || echo '$(srcdir)/'`processors/sagan-report-clients.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-report-clients.Tpo $(DEPDIR)/sagan-sagan-report-clients.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-report-clients.c' object='sagan-sagan-report-clients.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-report-clients.o `test -f 'processors/sagan-report-clients.c' || echo '$(srcdir)/'`processors/sagan-report-clients.c sagan-sagan-report-clients.obj: processors/sagan-report-clients.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-report-clients.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-report-clients.Tpo -c -o sagan-sagan-report-clients.obj `if test -f 'processors/sagan-report-clients.c'; then $(CYGPATH_W) 'processors/sagan-report-clients.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-report-clients.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-report-clients.Tpo $(DEPDIR)/sagan-sagan-report-clients.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-report-clients.c' object='sagan-sagan-report-clients.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-report-clients.obj `if test -f 'processors/sagan-report-clients.c'; then $(CYGPATH_W) 'processors/sagan-report-clients.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-report-clients.c'; fi` sagan-sagan-bluedot.o: processors/sagan-bluedot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-bluedot.o -MD -MP -MF $(DEPDIR)/sagan-sagan-bluedot.Tpo -c -o sagan-sagan-bluedot.o `test -f 'processors/sagan-bluedot.c' || echo '$(srcdir)/'`processors/sagan-bluedot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-bluedot.Tpo $(DEPDIR)/sagan-sagan-bluedot.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-bluedot.c' object='sagan-sagan-bluedot.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-bluedot.o `test -f 'processors/sagan-bluedot.c' || echo '$(srcdir)/'`processors/sagan-bluedot.c sagan-sagan-bluedot.obj: processors/sagan-bluedot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-bluedot.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-bluedot.Tpo -c -o sagan-sagan-bluedot.obj `if test -f 'processors/sagan-bluedot.c'; then $(CYGPATH_W) 'processors/sagan-bluedot.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-bluedot.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-bluedot.Tpo $(DEPDIR)/sagan-sagan-bluedot.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-bluedot.c' object='sagan-sagan-bluedot.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-bluedot.obj `if test -f 'processors/sagan-bluedot.c'; then $(CYGPATH_W) 'processors/sagan-bluedot.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-bluedot.c'; fi` sagan-sagan-blacklist.o: processors/sagan-blacklist.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-blacklist.o -MD -MP -MF $(DEPDIR)/sagan-sagan-blacklist.Tpo -c -o sagan-sagan-blacklist.o `test -f 'processors/sagan-blacklist.c' || echo '$(srcdir)/'`processors/sagan-blacklist.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-blacklist.Tpo $(DEPDIR)/sagan-sagan-blacklist.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-blacklist.c' object='sagan-sagan-blacklist.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-blacklist.o `test -f 'processors/sagan-blacklist.c' || echo '$(srcdir)/'`processors/sagan-blacklist.c sagan-sagan-blacklist.obj: processors/sagan-blacklist.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-blacklist.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-blacklist.Tpo -c -o sagan-sagan-blacklist.obj `if test -f 'processors/sagan-blacklist.c'; then $(CYGPATH_W) 'processors/sagan-blacklist.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-blacklist.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-blacklist.Tpo $(DEPDIR)/sagan-sagan-blacklist.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-blacklist.c' object='sagan-sagan-blacklist.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-blacklist.obj `if test -f 'processors/sagan-blacklist.c'; then $(CYGPATH_W) 'processors/sagan-blacklist.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-blacklist.c'; fi` sagan-sagan-perfmon.o: processors/sagan-perfmon.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-perfmon.o -MD -MP -MF $(DEPDIR)/sagan-sagan-perfmon.Tpo -c -o sagan-sagan-perfmon.o `test -f 'processors/sagan-perfmon.c' || echo '$(srcdir)/'`processors/sagan-perfmon.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-perfmon.Tpo $(DEPDIR)/sagan-sagan-perfmon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-perfmon.c' object='sagan-sagan-perfmon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-perfmon.o `test -f 'processors/sagan-perfmon.c' || echo '$(srcdir)/'`processors/sagan-perfmon.c sagan-sagan-perfmon.obj: processors/sagan-perfmon.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-perfmon.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-perfmon.Tpo -c -o sagan-sagan-perfmon.obj `if test -f 'processors/sagan-perfmon.c'; then $(CYGPATH_W) 'processors/sagan-perfmon.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-perfmon.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-perfmon.Tpo $(DEPDIR)/sagan-sagan-perfmon.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-perfmon.c' object='sagan-sagan-perfmon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-perfmon.obj `if test -f 'processors/sagan-perfmon.c'; then $(CYGPATH_W) 'processors/sagan-perfmon.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-perfmon.c'; fi` sagan-sagan-bro-intel.o: processors/sagan-bro-intel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-bro-intel.o -MD -MP -MF $(DEPDIR)/sagan-sagan-bro-intel.Tpo -c -o sagan-sagan-bro-intel.o `test -f 'processors/sagan-bro-intel.c' || echo '$(srcdir)/'`processors/sagan-bro-intel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-bro-intel.Tpo $(DEPDIR)/sagan-sagan-bro-intel.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-bro-intel.c' object='sagan-sagan-bro-intel.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-bro-intel.o `test -f 'processors/sagan-bro-intel.c' || echo '$(srcdir)/'`processors/sagan-bro-intel.c sagan-sagan-bro-intel.obj: processors/sagan-bro-intel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sagan-sagan-bro-intel.obj -MD -MP -MF $(DEPDIR)/sagan-sagan-bro-intel.Tpo -c -o sagan-sagan-bro-intel.obj `if test -f 'processors/sagan-bro-intel.c'; then $(CYGPATH_W) 'processors/sagan-bro-intel.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-bro-intel.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sagan-sagan-bro-intel.Tpo $(DEPDIR)/sagan-sagan-bro-intel.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processors/sagan-bro-intel.c' object='sagan-sagan-bro-intel.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sagan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sagan-sagan-bro-intel.obj `if test -f 'processors/sagan-bro-intel.c'; then $(CYGPATH_W) 'processors/sagan-bro-intel.c'; else $(CYGPATH_W) '$(srcdir)/processors/sagan-bro-intel.c'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: 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 uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ 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-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS install-data-local: # 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. .NOEXPORT: sagan-1.1.2/src/sagan-signal.c0000644000175000017500000003222512770372750015063 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-signal.c * * This runs as a thread for signal processing. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include #include "version.h" #include "sagan.h" #include "sagan-defs.h" #include "sagan-flowbit.h" #include "sagan-config.h" #include "sagan-lockfile.h" #include "sagan-signal.h" #include "sagan-stats.h" #include "sagan-gen-msg.h" #include "sagan-classifications.h" #include "processors/sagan-perfmon.h" #include "sagan-rules.h" #include "sagan-ignore-list.h" #include "sagan-check-flow.h" #include "processors/sagan-blacklist.h" #include "processors/sagan-track-clients.h" #include "processors/sagan-bro-intel.h" #ifdef HAVE_LIBLOGNORM #include "sagan-liblognorm.h" #include int liblognorm_count; #endif #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) #include "output-plugins/sagan-unified2.h" sbool sagan_unified2_flag; #endif #ifdef HAVE_LIBMAXMINDDB #include #include "sagan-geoip2.h" #endif struct _SaganCounters *counters; struct _SaganDebug *debug; struct _SaganConfig *config; struct _Rule_Struct *rulestruct; struct _Class_Struct *classstruct; struct _Sagan_Processor_Generator *generator; struct _Sagan_Blacklist *SaganBlacklist; struct _Sagan_Track_Clients *SaganTrackClients; struct _Sagan_IPC_Flowbit *flowbit; struct _Sagan_Ignorelist *SaganIgnorelist; struct _Sagan_BroIntel_Intel_Addr *Sagan_BroIntel_Intel_Addr; struct _Sagan_BroIntel_Intel_Domain *Sagan_BroIntel_Intel_Domain; struct _Sagan_BroIntel_Intel_File_Hash *Sagan_BroIntel_Intel_File_Hash; struct _Sagan_BroIntel_Intel_URL *Sagan_BroIntel_Intel_URL; struct _Sagan_BroIntel_Intel_Software *Sagan_BroIntel_Intel_Software; struct _Sagan_BroIntel_Intel_Email *Sagan_BroIntel_Intel_Email; struct _Sagan_BroIntel_Intel_User_Name *Sagan_BroIntel_Intel_User_Name; struct _Sagan_BroIntel_Intel_File_Name *Sagan_BroIntel_Intel_File_Name; struct _Sagan_BroIntel_Intel_Cert_Hash *Sagan_BroIntel_Intel_Cert_Hash; pthread_mutex_t SaganReloadMutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t SaganReloadCond = PTHREAD_COND_INITIALIZER; void Sig_Handler( void ) { sigset_t signal_set; int sig; sbool orig_perfmon_value = 0; #ifdef HAVE_LIBPCAP sbool orig_plog_value = 0; #endif for(;;) { /* wait for any and all signals */ sigfillset( &signal_set ); sigwait( &signal_set, &sig ); switch( sig ) { /* exit */ case SIGQUIT: case SIGINT: case SIGTERM: case SIGSEGV: case SIGABRT: Sagan_Log(S_NORMAL, "\n\n[Received signal %d. Sagan version %s shutting down]-------\n", sig, VERSION); Sagan_Statistics(); #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) if ( sagan_unified2_flag ) { Unified2CleanExit(); } #endif #ifdef HAVE_LIBMAXMINDDB MMDB_close(&config->geoip2); #endif fflush(config->sagan_alert_stream); fclose(config->sagan_alert_stream); /* Close Sagan alert file */ fflush(config->sagan_log_stream); /* Close the sagan.log */ fclose(config->sagan_log_stream); /* IPC Shared Memory */ Sagan_File_Unlock(config->shm_counters); if ( close(config->shm_counters) != 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Cannot close IPC counters! [%s]", __FILE__, __LINE__, strerror(errno)); } Sagan_File_Unlock(config->shm_flowbit); if ( close(config->shm_flowbit) != 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Cannot close IPC flowbit! [%s]", __FILE__, __LINE__, strerror(errno)); } Sagan_File_Unlock(config->shm_thresh_by_src); if ( close(config->shm_thresh_by_src) != 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Cannot close IPC thresh_by_src! [%s]", __FILE__, __LINE__, strerror(errno)); } Sagan_File_Unlock(config->shm_thresh_by_dst); if ( close(config->shm_thresh_by_dst) != 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Cannot close IPC thresh_by_dst! [%s]", __FILE__, __LINE__, strerror(errno)); } Sagan_File_Unlock(config->shm_thresh_by_username); if ( close(config->shm_thresh_by_username) != 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Cannot close IPC thresh_by_username! [%s]", __FILE__, __LINE__, strerror(errno)); } Sagan_File_Unlock(config->shm_after_by_src); if ( close(config->shm_after_by_src) != 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Cannot close IPC after_by_src! [%s]", __FILE__, __LINE__, strerror(errno)); } Sagan_File_Unlock(config->shm_after_by_dst); if ( close(config->shm_after_by_dst) != 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Cannot close IPC after_by_dst! [%s]", __FILE__, __LINE__, strerror(errno)); } Sagan_File_Unlock(config->shm_after_by_username); if ( close(config->shm_after_by_username) != 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Cannot close IPC after_by_username! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( config->sagan_track_clients_flag ) { Sagan_File_Unlock(config->shm_track_clients); if ( close(config->shm_track_clients) != 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Cannot close IPC _Sagan_Track_Clients! [%s]", __FILE__, __LINE__, strerror(errno)); } } if ( config->perfmonitor_flag ) { Sagan_Perfmonitor_Close(); } Remove_Lock_File(); exit(0); break; case SIGHUP: config->sagan_reload = 1; /* Only this thread can alter this */ pthread_mutex_lock(&SaganReloadMutex); Sagan_Log(S_NORMAL, "[Reloading Sagan version %s.]-------", VERSION); /* * Close and re-open log files. This is for logrotate and such * 04/14/2015 - Champ Clark III (cclark@quadrantsec.com) */ Sagan_Open_Log_File(REOPEN, ALL_LOGS); /******************/ /* Reset counters */ /******************/ counters->refcount=0; counters->classcount=0; counters->rulecount=0; counters->ruletotal=0; counters->genmapcount=0; counters->flowbit_track_count=0; memset(rulestruct, 0, sizeof(_Rule_Struct)); memset(classstruct, 0, sizeof(_Class_Struct)); memset(generator, 0, sizeof(_Sagan_Processor_Generator)); /**********************************/ /* Disabled and reset processors. */ /**********************************/ /* Note: Processors that run as there own thread (perfmon, plog) cannot be * loaded via SIGHUP. They must be loaded at run time. Once they are loaded, * they can be disabled/re-enabled. */ /* Single Threaded processors */ if ( config->perfmonitor_flag == 1 && orig_perfmon_value == 0 ) { Sagan_Perfmonitor_Close(); orig_perfmon_value = 1; } config->perfmonitor_flag = 0; #ifdef HAVE_LIBPCAP if ( config->plog_flag ) { orig_plog_value = 1; } config->plog_flag = 0; #endif /* Multi Threaded processors */ config->blacklist_flag = 0; if ( config->blacklist_flag ) { free(SaganBlacklist); } config->blacklist_flag = 0; if ( config->brointel_flag ) { free(Sagan_BroIntel_Intel_Addr); free(Sagan_BroIntel_Intel_Domain); free(Sagan_BroIntel_Intel_File_Hash); free(Sagan_BroIntel_Intel_URL); free(Sagan_BroIntel_Intel_Software); free(Sagan_BroIntel_Intel_Email); free(Sagan_BroIntel_Intel_User_Name); free(Sagan_BroIntel_Intel_File_Name); free(Sagan_BroIntel_Intel_Cert_Hash); counters->brointel_addr_count = 0; counters->brointel_domain_count = 0; counters->brointel_file_hash_count = 0; counters->brointel_url_count = 0; counters->brointel_software_count = 0; counters->brointel_email_count = 0; counters->brointel_user_name_count = 0; counters->brointel_file_name_count = 0; counters->brointel_cert_hash_count = 0; counters->brointel_dups = 0; } config->brointel_flag = 0; if ( config->sagan_track_clients_flag ) { free(SaganTrackClients); // config->sagan_track_clients_flag = 0; // counters_ipc->track_clients_client_count = 0; // counters_ipc->track_clients_down = 0; // } /* Output formats */ config->sagan_ext_flag = 0; #ifdef WITH_SYSLOG config->sagan_syslog_flag = 0; #endif #ifdef HAVE_LIBESMTP config->sagan_esmtp_flag = 0; #endif #ifdef WITH_SNORTSAM config->sagan_fwsam_flag = 0; #endif /* Non-output / Processors */ if ( config->sagan_droplist_flag ) { config->sagan_droplist_flag = 0; free(SaganIgnorelist); } /************************************************************/ /* Re-load primary configuration (rules/classifictions/etc) */ /************************************************************/ Load_Config(); /* <- RELOAD */ /************************************************************/ /* Re-load primary configuration (rules/classifictions/etc) */ /************************************************************/ if ( config->perfmonitor_flag == 1 ) { if ( orig_perfmon_value == 1 ) { Sagan_Perfmonitor_Open(); } else { Sagan_Log(S_WARN, "** 'perfmonitor' must be loaded at runtime! NOT loading 'perfmonitor'!"); config->perfmonitor_flag = 0; } } #ifdef HAVE_LIBPCAP if ( config->plog_flag == 1 ) { if ( orig_plog_value == 1 ) { config->plog_flag = 1; } else { Sagan_Log(S_WARN, "** 'plog' must be loaded at runtime! NOT loading 'plog'!"); config->plog_flag = 0; } } #endif /* Load Blacklist data */ if ( config->blacklist_flag ) { counters->blacklist_count=0; Sagan_Blacklist_Init(); Sagan_Blacklist_Load(); } if ( config->brointel_flag ) { Sagan_BroIntel_Init(); Sagan_BroIntel_Load_File(); } if ( config->sagan_track_clients_flag ) { Sagan_Log(S_NORMAL, "Reset Sagan Track Client."); } /* Non output / processors */ if ( config->sagan_droplist_flag ) { Load_Ignore_List(); Sagan_Log(S_NORMAL, "Loaded %d ignore/drop list item(s).", counters->droplist_count); } #ifdef HAVE_LIBMAXMINDDB Sagan_Log(S_NORMAL, "Reloading GeoIP2 data."); Sagan_Open_GeoIP2_Database(); #endif pthread_cond_signal(&SaganReloadCond); pthread_mutex_unlock(&SaganReloadMutex); config->sagan_reload = 0; Sagan_Log(S_NORMAL, "Configuration reloaded."); break; /* Signals to ignore */ case 17: /* Child process has exited. */ case 28: /* Terminal 'resize'/alarm. */ break; case SIGUSR1: Sagan_Statistics(); break; default: Sagan_Log(S_NORMAL, "[Received signal %d. Sagan doesn't know how to deal with]", sig); } } } sagan-1.1.2/src/sagan-defs.h0000644000175000017500000001330212770372750014527 0ustar champchamp/* $Id$ */ /* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan.h * * Sagan prototypes and definitions. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #define PCRE_OVECCOUNT 30 /* Various buffers used during configurations loading */ #define CLASSBUF 1024 #define RULEBUF 5128 #define CONFBUF 4096 #define MAXPATH 255 /* Max path for files/directories */ #define MAXHOST 255 /* Max host length */ #define MAXPROGRAM 32 /* Max syslog 'program' length */ #define MAXDATE 25 /* Max syslog 'date' length */ #define MAXTIME 10 /* Max syslog 'time length */ #define MAXFACILITY 25 /* Max syslog 'facility' length */ #define MAXPRIORITY 20 /* Max syslog 'priority' length */ #define MAXTAG 32 /* Max syslog 'tag' length */ #define MAXLEVEL 15 /* Max syslog 'level' length */ #define MAX_PCRE_SIZE 1024 /* Max pcre length in a rule */ #define MAX_FIFO_SIZE 1048576 /* Max pipe/FIFO size in bytes/pages */ #define MAX_THREADS 4096 /* Max system threads */ #define MAX_SYSLOGMSG 10240 /* Max length of a syslog message */ #define MAX_VAR_NAME_SIZE 64 /* Max "var" name size */ #define MAX_VAR_VALUE_SIZE 4096 /* Max "var" value size */ #define MAX_PCRE 10 /* Max PCRE within a rule */ #define MAX_CONTENT 30 /* Max 'content' within a rule */ #define MAX_META_CONTENT 10 /* Max 'meta_content' within a rule */ #define MAX_FLOWBITS 20 /* Max 'flowbits' within a rule */ #define MAX_CHECK_FLOWS 50 /* Max amount of IP addresses to be checked in a flow */ #define MAX_REFERENCE 10 /* Max references within a rule */ #define MAX_PARSE_IP 10 /* Max IP to collect form log line via parse.c */ #define MAXIP 16 /* Max IP length. Change to 64 for future IPv6 support */ #define LOCKFILE "/var/run/sagan/sagan.pid" #define SAGANLOG "/var/log/sagan/sagan.log" #define ALERTLOG "/var/log/sagan/alert" #define SAGANLOGPATH "/var/log/sagan" #define FIFO "/var/run/sagan.fifo" #define RULE_PATH "/usr/local/etc/sagan-rules" #define HOME_NET "any" #define EXTERNAL_NET "any" #define RUNAS "sagan" #define PLOG_INTERFACE "eth0" #define PLOG_FILTER "port 514" #define PLOG_LOGDEV "/dev/log" #define TRACK_TIME 1440 #define S_NORMAL 0 #define S_ERROR 1 #define S_WARN 2 #define S_DEBUG 3 #define DEFAULT_SYSLOG_FACILITY LOG_AUTH #define DEFAULT_SYSLOG_PRIORITY LOG_ALERT #define PARSEIP_RETURN_STRING 0 #define DEFAULT_SMTP_SUBJECT "[Sagan]" /* defaults if the user doesn't define */ #define MAX_OUTPUT_THREADS 50 #define MAX_PROCESSOR_THREADS 50 #define SUNDAY 1 #define MONDAY 2 #define TUESDAY 4 #define WEDNESDAY 8 #define THURSDAY 16 #define FRIDAY 32 #define SATURDAY 64 /* This is for loading/reloading Sagan log files */ #define OPEN 0 #define REOPEN 1 #define SAGAN_LOG 0 #define ALERT_LOG 1 #define ALL_LOGS 100 #define MD5_HASH_SIZE 32 #define SHA1_HASH_SIZE 40 #define SHA256_HASH_SIZE 64 #define MAX_FILENAME_SIZE 256 #define MAX_URL_SIZE 8192 #define MAX_USERNAME_SIZE 512 #define MAX_HOSTNAME_SIZE 255 /* Locations of IPC/Share memory "files" */ #define IPC_DIRECTORY "/var/run/sagan" #define COUNTERS_IPC_FILE "sagan-counters.shared" #define FLOWBIT_IPC_FILE "sagan-flowbits.shared" #define THRESH_BY_SRC_IPC_FILE "sagan-thresh-by-source.shared" #define THRESH_BY_DST_IPC_FILE "sagan-thresh-by-destination.shared" #define THRESH_BY_DSTPORT_IPC_FILE "sagan-thresh-by-destination-port.shared" #define THRESH_BY_SRCPORT_IPC_FILE "sagan-thresh-by-source-port.shared" #define THRESH_BY_USERNAME_IPC_FILE "sagan-thresh-by-username.shared" #define AFTER_BY_SRC_IPC_FILE "sagan-after-by-source.shared" #define AFTER_BY_DST_IPC_FILE "sagan-after-by-destination.shared" #define AFTER_BY_SRCPORT_IPC_FILE "sagan-after-by-source-port.shared" #define AFTER_BY_DSTPORT_IPC_FILE "sagan-after-by-destination-port.shared" #define AFTER_BY_USERNAME_IPC_FILE "sagan-after-by-username.shared" #define CLIENT_TRACK_IPC_FILE "sagan-track-clients.shared" /* Default IPC/mmap sizes */ #define DEFAULT_IPC_CLIENT_TRACK_IPC 10000 #define DEFAULT_IPC_AFTER_BY_SRC 1000000 #define DEFAULT_IPC_AFTER_BY_DST 1000000 #define DEFAULT_IPC_AFTER_BY_SRC_PORT 1000000 #define DEFAULT_IPC_AFTER_BY_DST_PORT 1000000 #define DEFAULT_IPC_AFTER_BY_USERNAME 10000 #define DEFAULT_IPC_THRESH_BY_SRC 1000000 #define DEFAULT_IPC_THRESH_BY_DST 1000000 #define DEFAULT_IPC_THRESH_BY_SRC_PORT 1000000 #define DEFAULT_IPC_THRESH_BY_DST_PORT 1000000 #define DEFAULT_IPC_THRESH_BY_USERNAME 10000 #define DEFAULT_IPC_FLOWBITS 10000 #define AFTER_BY_SRC 1 #define AFTER_BY_DST 2 #define AFTER_BY_DSTPORT 3 #define AFTER_BY_USERNAME 4 #define THRESH_BY_SRC 5 #define THRESH_BY_DST 6 #define THRESH_BY_DSTPORT 7 #define THRESH_BY_USERNAME 8 #define FLOWBIT 9 #define THRESH_BY_SRCPORT 10 #define AFTER_BY_SRCPORT 11 #define PARSE_HASH_MD5 1 #define PARSE_HASH_SHA1 2 #define PARSE_HASH_SHA256 3 #define PARSE_HASH_ALL 4 sagan-1.1.2/src/sagan-check-flow.c0000644000175000017500000001262312770372750015630 0ustar champchamp/* ** Copyright (C) 2009-2015 Quadrant Information Security ** Copyright (C) 2009-2015 Adam Hall ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-check-flow.c */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-rules.h" #include "sagan-config.h" struct _Rule_Struct *rulestruct; /********************/ /************************/ /*****************/ /***** flow_type ****/ /******* flow_var *******/ /*** direction ***/ /* 0 = not in group */ /** 0 = any **/ /** 0 = any **/ /* 1 = in group */ /** 1 = var **/ /** 1 = right **/ /* 2 = not match ip */ /************************/ /** 2 = left **/ /* 3 = match ip */ /************************/ /*****************/ /********************/ /************************/ /*****************/ sbool Sagan_Check_Flow( int b, uint32_t ip_src_u32, uint32_t ip_dst_u32) { uint32_t *src; uint32_t *dst; uint32_t ip_src; uint32_t ip_dst; src = &ip_src_u32; dst = &ip_dst_u32; if(rulestruct[b].direction == 0 || rulestruct[b].direction == 1) { ip_src = *src; ip_dst = *dst; } else { ip_src = *dst; ip_dst = *src; } /*flow 1*/ int w=0; int a1=0; int eq1=0; int ne1=0; int eq1_val=0; int ne1_val=0; // char *tmptoken1; // char *saveptrflow1; // char *tmp1; // char tmp_flow_1[512]; int f1; /*flow 2*/ int z=0; int a2=0; int eq2=0; int ne2=0; int eq2_val=0; int ne2_val=0; // char *tmptoken2; // char *saveptrflow2; // char *tmp2; // char tmp_flow_2[512]; int f2; // uint32_t lo; // uint32_t hi; int i; int failed=0; /*Begin flow_1*/ if(rulestruct[b].flow_1_var != 0) { for(i=0; i < rulestruct[b].flow_1_counter + 1; i++) { w++; f1 = rulestruct[b].flow_1_type[w]; if(f1 == 0) { ne1++; if(ip_src > rulestruct[b].flow_1[i].lo && ip_src < rulestruct[b].flow_1[i].hi) { ne1_val++; } } else if(f1 == 1) { eq1++; if(ip_src > rulestruct[b].flow_1[i].lo && ip_src < rulestruct[b].flow_1[i].hi) { eq1_val++; } } else if(f1 == 2) { ne1++; if(ip_src == rulestruct[b].flow_1[i].lo ) { ne1_val++; } } else if(f1 == 3) { eq1++; if(ip_src == rulestruct[b].flow_1[i].lo ) { eq1_val++; } } } } else { a1=1; } /* if ne1, did anything match (meaning failed) */ if(ne1>0) { if(ne1_val > 0) { failed++; } } /* if eq1, did anything not match meaning failed */ if(eq1>0) { if(eq1_val < 1) { failed++; } } /* if either failed, we did not match, no need to check the second flow... we already failed! */ if(a1 != 1) { if(failed > 0) { return 0; } } /*Begin flow_2*/ if(rulestruct[b].flow_2_var != 0) { for(i=0; i < rulestruct[b].flow_2_counter + 1; i++) { z++; f2 = rulestruct[b].flow_2_type[z]; if(f2 == 0) { ne2++; if(ip_dst > rulestruct[b].flow_2[i].lo && ip_dst < rulestruct[b].flow_2[i].hi) { ne2_val++; } } else if(f2 == 1) { eq2++; if(ip_dst > rulestruct[b].flow_2[i].lo && ip_dst < rulestruct[b].flow_2[i].hi) { eq2_val++; } } else if(f2 == 2) { ne2++; if(ip_dst == rulestruct[b].flow_2[i].lo) { ne2_val++; } } else if(f2 == 3) { eq2++; if(ip_dst == rulestruct[b].flow_2[i].lo) { eq2_val++; } } } } else { a2=1; } /* if ne2, did anything match (meaning failed) */ if(ne2>0) { if(ne2_val > 0) { failed++; } } /* if eq2, did anything not match meaning failed */ if(eq2>0) { if(eq2_val < 1) { failed++; } } /* if either failed, we did not match, leave */ if(a2 != 1) { if(failed > 0) { return 0; } } /* If we made it to this point we have a match */ return 1; }/*We are done*/ sagan-1.1.2/src/sagan-credits.c0000644000175000017500000001101612770372750015236 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-credit.c * * Give credit where credit is due * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include "sagan.h" #include "version.h" void Sagan_Credits(void) { fprintf(stderr, "\n--[Sagan version %s | Credits]--------------------------------\n\n", VERSION); fprintf(stderr, "Champ Clark III (cclark@quadrantsec.com)\tLead developer.\n"); fprintf(stderr, "Robert Nunley (rnunley@quadrantsec.com)\t\tRules/Ideas.\n"); fprintf(stderr, "Brian Echeverry (becheverry@quadrantsec.com)\tRules/testing/bug report.\n"); fprintf(stderr, "Marcus Ranum\t\t\t\t\tsagan-plog.c code.\n"); fprintf(stderr, "\"DrForbin\"\t\t\t\t\tPatches/testing/bug fixes.\n"); fprintf(stderr, "Rainer Gerhards\t\t\t\t\tRsyslog/Liblognorm author.\n"); fprintf(stderr, "Bruce M. Wink (bwink@quadrantsec.com)\t\tIdeas.\n"); fprintf(stderr, "Daniel Koopmans\t\t\t\t\tBug reports & testing.\n"); fprintf(stderr, "\"remydb\" (Github)\t\t\t\tBug reports & testing.\n"); fprintf(stderr, "\"CyberTaoFlow\" (Github)\t\t\t\tBug reports & testing.\n"); fprintf(stderr, "\"nix8\" (Github)\t\t\t\t\tBug reports & testing.\n"); fprintf(stderr, "\"pitrpitr\" (Github)\t\t\t\tBug reports & testing.\n"); fprintf(stderr, "\"ebayer\" (Github)\t\t\t\tBug reports & testing.\n"); fprintf(stderr, "\"Juan Manuel (jmcabo - Github)\t\t\tBug reports & testing.\n"); fprintf(stderr, "\"Stas Alekseev\" (salekseev - Github)\t\tSpec file for Redhat/Fedora.\n"); fprintf(stderr, "\"Alice Kaerast\" (kaerast - Github\t\trsyslog example in 'extra'.\n"); fprintf(stderr, "\"DigiAngel\" (Github)\t\t\t\t'content:!' idea.\n"); fprintf(stderr, "Robert Bridge (RobbieAB - Github)\t\t'flowbit' idea.\n"); fprintf(stderr, "Mathieu Parent (sathieu - Github)\t\tOld MySQL port fix.\n"); fprintf(stderr, "Pierre Chifflier (chifflier - Github)\t\tPatches/bug fixes/man page.\n"); fprintf(stderr, "Pierre Chifflier \t\t\t\tDebian/Ubuntu packages.\n"); fprintf(stderr, "\"miverson\" (Github)\t\t\t\tOSSEC converter/bug fixes.\n"); fprintf(stderr, "\"ekse\" (Github)\t\t\t\t\tBug reports & testing.\n"); fprintf(stderr, "\"mtgxx\" (Github)\t\t\t\tBug reports & testing.\n"); fprintf(stderr, "\"powertoaster\" (Github)\t\t\t\tBug reports & testing.\n"); fprintf(stderr, "Pawel Hajdan jr (Gentoo)\t\t\tGentoo ebuild.\n"); fprintf(stderr, "James Lay\t\t\t\t\tRules.\n"); fprintf(stderr, "Brad Doctor\t\t\t\t\tRules.\n"); fprintf(stderr, "Sniffty Dugen\t\t\t\t\tRules.\n"); fprintf(stderr, "Iman Khosravi\t\t\t\t\tRules.\n"); fprintf(stderr, "Jon Schipp\t\t\t\t\tBug reports & testing.\n"); fprintf(stderr, "Aleksey Chudov\t\t\t\t\t\"logrotate\" fix/suggestion.\n"); fprintf(stderr, "DonPiekarz (Github)\t\t\t\tBug reports & fixes.\n"); fprintf(stderr, "rtkkdeng (Github)\t\t\t\tRules fixes.\n"); fprintf(stderr, "Adam Hall (ahall@quadrantsec.com)\t\tAetas & other bug fixes.\n"); fprintf(stderr, "Bruno Coudoin (Github:bdoin)\t\t\tBug fixes.\n"); fprintf(stderr, "Nuno Fernandes (Github)\t\t\t\tBug fixes & rule corrections.\n"); fprintf(stderr, "Alexandre Carrol Perales (Github:acabrol)\tBug fixes & features.\n"); fprintf(stderr, "Bruno Coudoin\t\t\t\t\tBug fixes & features.\n"); fprintf(stderr, "Steve Rawls (srawls@quadrantsec.com)\t\tBug reports & features.\n"); fprintf(stderr, "\"bhennigar\" (Github)\t\t\t\tBug reporting & testing.\n"); fprintf(stderr, "Corey Fisher (cfisher@quadrantsec.com)\t\tCode testing & debugging.\n"); fprintf(stderr, "\"Work-lako\" (Github)\t\t\t\tIdea/patch for sagan-syslog.c.\n"); fprintf(stderr, "\n"); } sagan-1.1.2/src/sagan-send-alert.c0000644000175000017500000000763212770372750015650 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-send-alert.c * * Sends alert information to the correct processor */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include "sagan.h" #include "version.h" #include "sagan-output.h" #include "sagan-gen-msg.h" #include "processors/sagan-engine.h" struct _SaganConfig *config; void Sagan_Send_Alert ( _SaganProcSyslog *SaganProcSyslog_LOCAL, _Sagan_Processor_Info *processor_info, char *ip_src, char *ip_dst, char *normalize_http_uri, char *normalize_http_hostname, int proto, int alertid, int src_port, int dst_port, int pos ) { char tmp[64] = { 0 }; struct _Sagan_Event *SaganProcessorEvent = NULL; SaganProcessorEvent = malloc(sizeof(struct _Sagan_Event)); if ( SaganProcessorEvent == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganProcessorEvent. Abort!", __FILE__, __LINE__); } memset(SaganProcessorEvent, 0, sizeof(_SaganEvent)); if ( processor_info->processor_generator_id != SAGAN_PROCESSOR_GENERATOR_ID ) { SaganProcessorEvent->f_msg = Sagan_Generator_Lookup(processor_info->processor_generator_id, alertid); } else { SaganProcessorEvent->f_msg = processor_info->processor_name; } SaganProcessorEvent->message = SaganProcSyslog_LOCAL->syslog_message; SaganProcessorEvent->program = processor_info->processor_name; SaganProcessorEvent->facility = processor_info->processor_facility; SaganProcessorEvent->priority = processor_info->processor_priority; /* Syslog priority */ SaganProcessorEvent->pri = processor_info->processor_pri; /* Sagan priority */ SaganProcessorEvent->class = processor_info->processor_class; SaganProcessorEvent->tag = processor_info->processor_tag; SaganProcessorEvent->rev = processor_info->processor_rev; SaganProcessorEvent->ip_src = ip_src; SaganProcessorEvent->ip_dst = ip_dst; SaganProcessorEvent->dst_port = dst_port; SaganProcessorEvent->src_port = src_port; SaganProcessorEvent->found = pos; SaganProcessorEvent->normalize_http_uri = normalize_http_uri; SaganProcessorEvent->normalize_http_hostname= normalize_http_hostname; snprintf(tmp, sizeof(tmp)-1, "%d", alertid); SaganProcessorEvent->sid = tmp; SaganProcessorEvent->host = SaganProcSyslog_LOCAL->syslog_host; SaganProcessorEvent->time = SaganProcSyslog_LOCAL->syslog_time; SaganProcessorEvent->date = SaganProcSyslog_LOCAL->syslog_date; SaganProcessorEvent->ip_proto = proto; SaganProcessorEvent->event_time_sec = time(NULL); SaganProcessorEvent->generatorid = processor_info->processor_generator_id; Sagan_Output ( SaganProcessorEvent ); free(SaganProcessorEvent); } sagan-1.1.2/src/sagan-key.h0000644000175000017500000000200212770372750014371 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void key_handler( void ); sagan-1.1.2/src/sagan-signal.h0000644000175000017500000000200312770372750015057 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sig_Handler( void ); sagan-1.1.2/src/sagan-references.c0000644000175000017500000001305312770372750015725 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-references.c * * Loads the references into memory. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "version.h" #include "sagan.h" #include "sagan-defs.h" #include "sagan-references.h" #include "sagan-rules.h" struct _SaganCounters *counters; struct _SaganDebug *debug; struct _SaganConfig *config; struct _Ref_Struct *refstruct; struct _Rule_Struct *rulestruct; void Load_Reference( const char *ruleset ) { FILE *reffile; char refbuf[1024]; char *saveptr=NULL; char *tmptoken=NULL; char *laststring=NULL; int linecount=0; Sagan_Log(S_NORMAL, "Loading references.conf file. [%s]" , ruleset); if (( reffile = fopen(ruleset, "r" )) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open rule file (%s)", __FILE__, __LINE__, ruleset); } while(fgets(refbuf, 1024, reffile) != NULL) { linecount++; /* Skip comments and blank linkes */ if (refbuf[0] == '#' || refbuf[0] == 10 || refbuf[0] == ';' || refbuf[0] == 32) { continue; } else { /* Allocate memory for references, not comments */ refstruct = (_Ref_Struct *) realloc(refstruct, (counters->refcount+1) * sizeof(_Ref_Struct)); if ( refstruct == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for refstruct. Abort!", __FILE__, __LINE__); } } strtok_r(refbuf, ":", &saveptr); tmptoken = strtok_r(NULL, " " , &saveptr); laststring = strtok_r(tmptoken, ",", &saveptr); if ( laststring == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The file %s at line %d is improperly formated. Abort!", __FILE__, __LINE__, ruleset, linecount); } strlcpy(refstruct[counters->refcount].s_refid, laststring, sizeof(refstruct[counters->refcount].s_refid)); laststring = strtok_r(NULL, ",", &saveptr); if ( laststring == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The file %s at line %d is improperly formated. Abort!", __FILE__, __LINE__, ruleset, linecount); } strlcpy(refstruct[counters->refcount].s_refurl, laststring, sizeof(refstruct[counters->refcount].s_refurl)); refstruct[counters->refcount].s_refurl[strlen(refstruct[counters->refcount].s_refurl)-1] = '\0'; if (debug->debugload) { Sagan_Log(S_DEBUG, "[D-%d] Reference: %s|%s", counters->refcount, refstruct[counters->refcount].s_refid, refstruct[counters->refcount].s_refurl); } counters->refcount++; } fclose(reffile); Sagan_Log(S_NORMAL, "%d references loaded.", counters->refcount); } /****************************************************************************/ /* This simple looks up references and returns a string with them formatted */ /* properly. It gets passed the location of the rule in memory (based on */ /* the rulecount. This is used for sagan-alert.c and sagan-esmtp.c */ /****************************************************************************/ // 0 == alert // 1 == parsable. char *Reference_Lookup( int rulemem, int type ) { static __thread char reftmp[1024]; memset(&reftmp, 0, sizeof(reftmp)); int i=0; int b=0; char *tmptok=NULL; char *tmp=NULL; char reftype[25]; char url[255]; char refinfo[512]; char refinfo2[512]; for (i=0; i < rulestruct[rulemem].ref_count + 1 ; i++ ) { strlcpy(refinfo, rulestruct[rulemem].s_reference[i], sizeof(refinfo)); tmp = strtok_r(refinfo, ",", &tmptok); if ( tmp != NULL ) { strlcpy(reftype, tmp, sizeof(reftype)); } else { return(""); } tmp = strtok_r(NULL, ",", &tmptok); if ( tmp != NULL ) { strlcpy(url, tmp, sizeof(url)); } else { return(""); } for ( b=0; b < counters->refcount; b++) { if (!strcmp(refstruct[b].s_refid, reftype)) { if ( type == 0 ) { snprintf(refinfo2, sizeof(refinfo2)-1, "[Xref => %s%s]", refstruct[b].s_refurl, url); } if ( type == 1 ) { snprintf(refinfo2, sizeof(refinfo2)-1, "Reference:%s%s\n", refstruct[b].s_refurl, url); } strlcat(reftmp, refinfo2, sizeof(reftmp)); } } } return(reftmp); } sagan-1.1.2/src/sagan-processor.h0000644000175000017500000000201012770372750015617 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_Processor ( void ); sagan-1.1.2/src/sagan-plog.h0000644000175000017500000000226212770372750014552 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef HAVE_LIBPCAP char plog_interface[50]; char plog_logdev[50]; char plog_filter[256]; sbool plog_flag; int plog_promiscuous; void plog_handler( void ); #endif sagan-1.1.2/src/sagan-ignore-list.c0000644000175000017500000000542112770372750016040 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-ignore-list.c * * Loads the "ignore list" into memory * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-ignore-list.h" #include "sagan-config.h" struct _Sagan_Ignorelist *SaganIgnorelist; struct _SaganCounters *counters; struct _SaganConfig *config; /**************************************************************************** * "ignore" list. ****************************************************************************/ void Load_Ignore_List ( void ) { FILE *droplist; char droplistbuf[1024] = { 0 }; if ( config->sagan_droplist_flag ) { if (( droplist = fopen(config->sagan_droplistfile, "r" )) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] No drop list/ignore list to load (%s)", __FILE__, __LINE__, config->sagan_droplistfile); config->sagan_droplist_flag=0; } while(fgets(droplistbuf, 1024, droplist) != NULL) { /* Skip comments and blank linkes */ if (droplistbuf[0] == '#' || droplistbuf[0] == 10 || droplistbuf[0] == ';' || droplistbuf[0] == 32) { continue; } else { /* Allocate memory for references, not comments */ SaganIgnorelist = (_Sagan_Ignorelist *) realloc(SaganIgnorelist, (counters->droplist_count+1) * sizeof(_Sagan_Ignorelist)); if ( SaganIgnorelist == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for SaganIgnorelist. Abort!", __FILE__, __LINE__); } strlcpy(SaganIgnorelist[counters->droplist_count].ignore_string, Remove_Return(droplistbuf), sizeof(SaganIgnorelist[counters->droplist_count].ignore_string)); counters->droplist_count++; } } } } sagan-1.1.2/src/sagan-protocol-map.c0000644000175000017500000001044512770372750016222 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-gen-msg.c * * Reads in the sagan-gen-msg.map. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-protocol-map.h" struct _SaganCounters *counters; struct _SaganConfig *config; struct _SaganDebug *debug; struct _Sagan_Protocol_Map_Message *map_message; struct _Sagan_Protocol_Map_Program *map_program; void Load_Protocol_Map( const char *map ) { FILE *mapfile; char mapbuf[1024]; char *saveptr=NULL; char *map1=NULL; char *map2=NULL; char *map3=NULL; char *map4=NULL; Sagan_Log(S_NORMAL, "Loading protocol map file. [%s]", map); counters->mapcount=0; if (( mapfile = fopen(map, "r" )) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open protocol map file (%s)", __FILE__, __LINE__, map); } while(fgets(mapbuf, 1024, mapfile) != NULL) { /* Skip comments and blank linkes */ if (mapbuf[0] == '#' || mapbuf[0] == 10 || mapbuf[0] == ';' || mapbuf[0] == 32) { continue; } else { /* Allocate memory for references, not comments */ map1 = Remove_Spaces(Remove_Return(strtok_r(mapbuf, "|", &saveptr))); map2 = Remove_Spaces(Remove_Return(strtok_r(NULL, "|", &saveptr))); map3 = Remove_Spaces(Remove_Return(strtok_r(NULL, "|", &saveptr))); map4 = Remove_Return(strtok_r(NULL, "|", &saveptr)); if ( map1 == NULL || map2 == NULL || map3 == NULL || map4 == NULL) { Sagan_Log(S_ERROR, "%s is incorrect or not correctly formated", map); } if (!strcmp(map1, "message")) { map_message = (_Sagan_Protocol_Map_Message *) realloc(map_message, (counters->mapcount_message+1) * sizeof(_Sagan_Protocol_Map_Message)); if ( map_message == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for map_message. Abort!", __FILE__, __LINE__); } map_message[counters->mapcount_message].proto = atoi(map2); if (!strcmp(map3, "nocase")) map_message[counters->mapcount_message].nocase = 1; strlcpy(map_message[counters->mapcount_message].search, map4, sizeof(map_message[counters->mapcount_message].search)); counters->mapcount_message++; } if (!strcmp(map1, "program")) { map_program = (_Sagan_Protocol_Map_Program *) realloc(map_program, (counters->mapcount_program+1) * sizeof(_Sagan_Protocol_Map_Program)); if ( map_program == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for map_program. Abort!", __FILE__, __LINE__); } map_program[counters->mapcount_program].proto = atoi(map2); if (!strcmp(map3, "nocase")) map_program[counters->mapcount_program].nocase = 1; strlcpy(map_program[counters->mapcount_program].program, map4, sizeof(map_program[counters->mapcount_program].program)); counters->mapcount_program++; } counters->mapcount++; } } fclose(mapfile); Sagan_Log(S_NORMAL, "%d protocols loaded [Message search: %d|Program search: %d]", counters->mapcount, counters->mapcount_message, counters->mapcount_program); } sagan-1.1.2/src/sagan-check-flow.h0000644000175000017500000000206212770372750015631 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif sbool Sagan_Check_Flow( int b, uint32_t ip_src_u32, uint32_t ip_dst_u32); sagan-1.1.2/src/sagan-usage.c0000644000175000017500000000702612770372750014713 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-usage * * Gives the user basic operation of the sagan binary. Also displays * information of compile time options * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include "sagan.h" #include "version.h" void Sagan_Usage(void) { fprintf(stderr, "\n--[Sagan version %s | Help/usage screen]--------------------------------\n\n", VERSION); fprintf(stderr, "-h, --help\t\tHelp (this screen).\n"); fprintf(stderr, "-C, --credits\t\tSagan credits.\n"); fprintf(stderr, "-d, --debug [type]\tTypes: engine, syslog, load, fwsam, external, threads,\n\t\t\tmalformed, limits, flowbit, brointel, ipc"); #ifdef HAVE_LIBESMTP fprintf(stderr, ", smtp"); #endif #ifdef HAVE_LIBLOGNORM fprintf(stderr, ", normalize"); #endif #ifdef HAVE_LIBPCAP fprintf(stderr, ", plog"); #endif #ifdef WITH_BLUEDOT fprintf(stderr, ", bluedot"); #endif #ifdef HAVE_LIBMAXMINDDB fprintf(stderr, ", geoip2"); #endif fprintf(stderr, ".\n"); fprintf(stderr, "-D, --daemon\t\tMake process a daemon (fork to the background).\n"); fprintf(stderr, "-u, --user [username]\tRun as user (defaults to 'sagan').\n"); fprintf(stderr, "-c, --chroot [dir]\tChroot Sagan to specified directory.\n"); fprintf(stderr, "-f, --config [file]\tSagan configuration file to load.\n"); fprintf(stderr, "-F, --file [file]\tFIFO over ride. This reads a file in rather than reading\n"); fprintf(stderr, "\t\t\tfrom a FIFO. The file must be in the Sagan format!\n"); fprintf(stderr, "-l, --log [file]\tsagan.log location [default: %s].\n\n", SAGANLOG ); fprintf(stderr, "-Q, --quiet\t\tRun Sagan in 'quiet' mode (no console output)\n"); #ifdef HAVE_LIBESMTP fprintf(stderr, "* libesmtp (SMTP) support is included.\n"); #endif #ifdef HAVE_LIBLOGNORM fprintf(stderr, "* liblognorm (log normalization) support is included.\n"); #endif #ifdef HAVE_LIBPCAP fprintf(stderr, "* PLOG (syslog sniffer) support is included.\n"); #endif #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) fprintf(stderr, "* libdnet (for unified2) support is included.\n"); #endif #ifdef HAVE_LIBMAXMINDDB fprintf(stderr, "* Maxmind GeoIP2 support is included.\n"); #endif #ifdef WITH_SNORTSAM fprintf(stderr, "* Snortsam support is included.\n"); #endif #ifdef WITH_SYSLOG fprintf(stderr, "* Syslog output is included.\n"); #endif #ifdef WITH_SYSSTRSTR fprintf(stderr, "* Using Sagan's built in 'strstr' function.\n"); #endif #ifdef WITH_BLUEDOT fprintf(stderr, "* Using Quadrant's Bluedot.\n"); #endif fprintf(stderr, "\n* Compiled on %s at %s.\n", __DATE__, __TIME__); } sagan-1.1.2/src/sagan-liblognorm.h0000644000175000017500000000361412770372750015757 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef HAVE_LIBLOGNORM #include "sagan-defs.h" /* liblognorm struct */ typedef struct liblognorm_struct liblognorm_struct; struct liblognorm_struct { char type[50]; char filepath[MAXPATH]; }; typedef struct liblognorm_toload_struct liblognorm_toload_struct; struct liblognorm_toload_struct { char type[50]; char filepath[MAXPATH]; }; typedef struct _SaganNormalizeLiblognorm { char ip_src[MAXIP]; char ip_dst[MAXIP]; char src_host[MAXHOST]; char dst_host[MAXHOST]; int src_port; int dst_port; char username[MAX_USERNAME_SIZE]; char filename[MAX_FILENAME_SIZE]; char hash_md5[MD5_HASH_SIZE+1]; char hash_sha1[SHA1_HASH_SIZE+1]; char hash_sha256[SHA256_HASH_SIZE+1]; char http_uri[MAX_URL_SIZE]; char http_hostname[MAX_HOSTNAME_SIZE]; } _SaganNormalizeLiblognorm; #endif void Sagan_Liblognorm_Load( char * ); void Sagan_Normalize_Liblognorm( char * ); sagan-1.1.2/src/sagan-key.c0000644000175000017500000000301512770372750014371 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-key.c * * This runs as a thread for stdin. This allows users, when running * in the foreground, to hit "enter" to see statistics of sagan. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include "version.h" #include "sagan.h" #include "sagan-defs.h" #include "sagan-key.h" #include "sagan-stats.h" struct _SaganConfig *config; void key_handler( void ) { while(1) { int key; key=getchar(); if ( key != 0 ) { Sagan_Statistics(); } } } sagan-1.1.2/src/sagan-aetas.h0000644000175000017500000000205512770372750014706 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif int Sagan_Check_Time(int); int Sagan_Check_Day(unsigned char, int); sagan-1.1.2/src/processors/0000755000175000017500000000000012770372750014551 5ustar champchampsagan-1.1.2/src/processors/sagan-bro-intel.c0000644000175000017500000006775012770372750017716 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-bro-intel.c * * This allows Sagan to read in Bro Intel files, like those from Critical * Stack (https://intel.brointel.com). * */ /* TODO: needs stats and perfmon! */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-config.h" #include "parsers/parsers.h" #include "processors/sagan-bro-intel.h" #define MAX_BROINTEL_LINE_SIZE 10240 struct _SaganConfig *config; struct _SaganCounters *counters; struct _SaganDebug *debug; struct _Sagan_Processor_Info *processor_info_brointel = NULL; struct _Sagan_BroIntel_Intel_Addr *Sagan_BroIntel_Intel_Addr; struct _Sagan_BroIntel_Intel_Domain *Sagan_BroIntel_Intel_Domain; struct _Sagan_BroIntel_Intel_File_Hash *Sagan_BroIntel_Intel_File_Hash; struct _Sagan_BroIntel_Intel_URL *Sagan_BroIntel_Intel_URL; struct _Sagan_BroIntel_Intel_Software *Sagan_BroIntel_Intel_Software; struct _Sagan_BroIntel_Intel_Email *Sagan_BroIntel_Intel_Email; struct _Sagan_BroIntel_Intel_User_Name *Sagan_BroIntel_Intel_User_Name; struct _Sagan_BroIntel_Intel_File_Name *Sagan_BroIntel_Intel_File_Name; struct _Sagan_BroIntel_Intel_Cert_Hash *Sagan_BroIntel_Intel_Cert_Hash; /***************************************************************************** * Sagan_BroIntel_Init - Sets up globals. Not really used yet. *****************************************************************************/ void Sagan_BroIntel_Init(void) { /* Init memory for processor / storage of Bro Intel data */ Sagan_BroIntel_Intel_Addr = malloc(sizeof(_Sagan_BroIntel_Intel_Addr)); if ( Sagan_BroIntel_Intel_Addr == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for Sagan_BroIntel_Intel_Addr. Abort!", __FILE__, __LINE__); } memset(Sagan_BroIntel_Intel_Addr, 0, sizeof(_Sagan_BroIntel_Intel_Addr)); Sagan_BroIntel_Intel_Domain = malloc(sizeof(_Sagan_BroIntel_Intel_Domain)); if ( Sagan_BroIntel_Intel_Domain == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for Sagan_BroIntel_Intel_Domain. Abort!", __FILE__, __LINE__); } memset(Sagan_BroIntel_Intel_Domain, 0, sizeof(_Sagan_BroIntel_Intel_Domain)); Sagan_BroIntel_Intel_File_Hash = malloc(sizeof(_Sagan_BroIntel_Intel_File_Hash)); if ( Sagan_BroIntel_Intel_File_Hash == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for Sagan_BroIntel_Intel_File_Hash. Abort!", __FILE__, __LINE__); } memset(Sagan_BroIntel_Intel_File_Hash, 0, sizeof(_Sagan_BroIntel_Intel_File_Hash)); Sagan_BroIntel_Intel_URL = malloc(sizeof(_Sagan_BroIntel_Intel_URL)); if ( Sagan_BroIntel_Intel_URL == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for Sagan_BroIntel_Intel_URL. Abort!", __FILE__, __LINE__); } memset(Sagan_BroIntel_Intel_URL, 0, sizeof(_Sagan_BroIntel_Intel_URL)); Sagan_BroIntel_Intel_Software = malloc(sizeof(_Sagan_BroIntel_Intel_Software)); if ( Sagan_BroIntel_Intel_Software == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for Sagan_BroIntel_Intel_Software. Abort!", __FILE__, __LINE__); } memset(Sagan_BroIntel_Intel_Software, 0, sizeof(_Sagan_BroIntel_Intel_Software)); Sagan_BroIntel_Intel_Email = malloc(sizeof(_Sagan_BroIntel_Intel_Email)); if ( Sagan_BroIntel_Intel_Email == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for Sagan_BroIntel_Intel_Email. Abort!", __FILE__, __LINE__); } memset(Sagan_BroIntel_Intel_Email, 0, sizeof(_Sagan_BroIntel_Intel_Email)); Sagan_BroIntel_Intel_User_Name = malloc(sizeof(_Sagan_BroIntel_Intel_User_Name)); if ( Sagan_BroIntel_Intel_User_Name == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for Sagan_BroIntel_Intel_User_Name. Abort!", __FILE__, __LINE__); } memset(Sagan_BroIntel_Intel_User_Name, 0, sizeof(_Sagan_BroIntel_Intel_User_Name)); Sagan_BroIntel_Intel_File_Name = malloc(sizeof(_Sagan_BroIntel_Intel_File_Name)); if ( Sagan_BroIntel_Intel_File_Name == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for Sagan_BroIntel_Intel_File_Name. Abort!", __FILE__, __LINE__); } memset(Sagan_BroIntel_Intel_File_Name, 0, sizeof(_Sagan_BroIntel_Intel_File_Name)); Sagan_BroIntel_Intel_Cert_Hash = malloc(sizeof(_Sagan_BroIntel_Intel_Cert_Hash)); if ( Sagan_BroIntel_Intel_Cert_Hash == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for Sagan_BroIntel_Intel_Cert_Hash. Abort!", __FILE__, __LINE__); } } /***************************************************************************** * Sagan_BroIntel_Load_File - Loads BroIntel data and splits it up * into different arrays. * ***************************************************************************/ void Sagan_BroIntel_Load_File ( void ) { FILE *brointel_file; char *value; char *type; char *description; sbool found_flag; sbool found_flag_array; char *tok = NULL; ; char *ptmp = NULL; int line_count; int i; uint32_t u32_ip; char *brointel_filename = NULL; char brointelbuf[MAX_BROINTEL_LINE_SIZE] = { 0 }; counters->brointel_dups = 0; brointel_filename = strtok_r(config->brointel_files, ",", &ptmp); while ( brointel_filename != NULL ) { Sagan_Log(S_NORMAL, "Bro Intel Processor Loading File: %s.", brointel_filename); if (( brointel_file = fopen(brointel_filename, "r")) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Could not load Bro Intel file! (%s - %s)", __FILE__, __LINE__, brointel_filename, strerror(errno)); } while(fgets(brointelbuf, MAX_BROINTEL_LINE_SIZE, brointel_file) != NULL) { /* Skip comments and blank linkes */ if (brointelbuf[0] == '#' || brointelbuf[0] == 10 || brointelbuf[0] == ';' || brointelbuf[0] == 32 ) { line_count++; continue; } else { Remove_Return(brointelbuf); value = strtok_r(brointelbuf, "\t", &tok); type = strtok_r(NULL, "\t", &tok); description = strtok_r(NULL, "\t", &tok); if ( value == NULL || type == NULL || description == NULL ) { Sagan_Log(S_WARN, "[%s, line %d] Got invalid line at %d in %s", __FILE__, __LINE__, line_count, brointel_filename); } found_flag = 0; if (!strcmp(type, "Intel::ADDR")) { u32_ip = IP2Bit(value); found_flag = 1; /* Used to short circuit other 'type' lookups */ found_flag_array = 0; /* Used to short circuit/warn when dups are found. This way we don't waste memory/CPU */ /* Check for duplicates. */ for (i=0; i < counters->brointel_addr_count; i++) { if ( u32_ip == Sagan_BroIntel_Intel_Addr[i].u32_ip ) { Sagan_Log(S_WARN, "[%s, line %d] Got duplicate Intel::ADDR address %s in %s on line %d.", __FILE__, __LINE__, value, brointel_filename, line_count + 1); counters->brointel_dups++; found_flag_array = 1; } } if ( found_flag_array == 0 ) { Sagan_BroIntel_Intel_Addr = (_Sagan_BroIntel_Intel_Addr *) realloc(Sagan_BroIntel_Intel_Addr, (counters->brointel_addr_count+1) * sizeof(_Sagan_BroIntel_Intel_Addr)); if ( Sagan_BroIntel_Intel_Addr == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for Sagan_BroIntel_Intel_Addr. Abort!", __FILE__, __LINE__); } Sagan_BroIntel_Intel_Addr[counters->brointel_addr_count].u32_ip = IP2Bit(value); counters->brointel_addr_count++; } } if (!strcmp(type, "Intel::DOMAIN") && found_flag == 0) { To_LowerC(value); found_flag = 1; found_flag_array = 0; for (i=0; i < counters-> brointel_domain_count; i++) { if (!strcmp(Sagan_BroIntel_Intel_Domain[i].domain, value)) { Sagan_Log(S_WARN, "[%s, line %d] Got duplicate Intel::DOMAIN '%s' in %s on line %d.", __FILE__, __LINE__, value, brointel_filename, line_count + 1); counters->brointel_dups++; found_flag_array = 1; } } if ( found_flag_array == 0 ) { Sagan_BroIntel_Intel_Domain = (_Sagan_BroIntel_Intel_Domain *) realloc(Sagan_BroIntel_Intel_Domain, (counters->brointel_domain_count+1) * sizeof(_Sagan_BroIntel_Intel_Domain)); if ( Sagan_BroIntel_Intel_Domain == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for Sagan_BroIntel_Intel_Domain. Abort!", __FILE__, __LINE__); } strlcpy(Sagan_BroIntel_Intel_Domain[counters->brointel_domain_count].domain, value, sizeof(Sagan_BroIntel_Intel_Domain[counters->brointel_domain_count].domain)); counters->brointel_domain_count++; } } if (!strcmp(type, "Intel::FILE_HASH") && found_flag == 0) { To_LowerC(value); found_flag = 1; found_flag_array = 0; for (i=0; i < counters->brointel_file_hash_count; i++) { if (!strcmp(Sagan_BroIntel_Intel_File_Hash[i].hash, value)) { Sagan_Log(S_WARN, "[%s, line %d] Got duplicate Intel::FILE_HASH '%s' in %s on line %d.", __FILE__, __LINE__, value, brointel_filename, line_count + 1); counters->brointel_dups++; found_flag_array = 1; } } if ( found_flag_array == 0 ) { Sagan_BroIntel_Intel_File_Hash = (_Sagan_BroIntel_Intel_File_Hash *) realloc(Sagan_BroIntel_Intel_File_Hash, (counters->brointel_file_hash_count+1) * sizeof(_Sagan_BroIntel_Intel_File_Hash)); if ( Sagan_BroIntel_Intel_File_Hash == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for Sagan_BroIntel_Intel_File_Hash. Abort!", __FILE__, __LINE__); } strlcpy(Sagan_BroIntel_Intel_File_Hash[counters->brointel_file_hash_count].hash, value, sizeof(Sagan_BroIntel_Intel_File_Hash[counters->brointel_file_hash_count].hash)); counters->brointel_file_hash_count++; } } if (!strcmp(type, "Intel::URL") && found_flag == 0) { To_LowerC(value); found_flag = 1; found_flag_array = 0; for (i=0; i < counters->brointel_url_count; i++) { if (!strcmp(Sagan_BroIntel_Intel_URL[i].url, value)) { Sagan_Log(S_WARN, "[%s, line %d] Got duplicate Intel::URL '%s' in %s on line %d.", __FILE__, __LINE__, value, brointel_filename, line_count + 1); counters->brointel_dups++; found_flag_array = 1; } } if ( found_flag_array == 0 ) { Sagan_BroIntel_Intel_URL = (_Sagan_BroIntel_Intel_URL *) realloc(Sagan_BroIntel_Intel_URL, (counters->brointel_url_count+1) * sizeof(_Sagan_BroIntel_Intel_URL)); if ( Sagan_BroIntel_Intel_URL == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for Sagan_BroIntel_Intel_URL. Abort!", __FILE__, __LINE__); } strlcpy(Sagan_BroIntel_Intel_URL[counters->brointel_url_count].url, value, sizeof(Sagan_BroIntel_Intel_URL[counters->brointel_url_count].url)); counters->brointel_url_count++; } } if (!strcmp(type, "Intel::SOFTWARE") && found_flag == 0) { To_LowerC(value); found_flag = 1; found_flag_array = 0; for (i=0; i < counters->brointel_software_count++; i++) { if (!strcmp(Sagan_BroIntel_Intel_Software[i].software, value)) { Sagan_Log(S_WARN, "[%s, line %d] Got duplicate Intel::SOFTWARE '%s' in %s on line %d.", __FILE__, __LINE__, value, brointel_filename, line_count + 1); counters->brointel_dups++; found_flag_array = 1; } } if ( found_flag_array == 0 ) { Sagan_BroIntel_Intel_Software = (_Sagan_BroIntel_Intel_Software *) realloc(Sagan_BroIntel_Intel_Software, (counters->brointel_software_count+1) * sizeof(_Sagan_BroIntel_Intel_Software)); if ( Sagan_BroIntel_Intel_Software == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for Sagan_BroIntel_Intel_Software. Abort!", __FILE__, __LINE__); } strlcpy(Sagan_BroIntel_Intel_Software[counters->brointel_software_count].software, value, sizeof(Sagan_BroIntel_Intel_Software[counters->brointel_software_count].software)); counters->brointel_software_count++; } } if (!strcmp(type, "Intel::EMAIL") && found_flag == 0) { To_LowerC(value); found_flag_array = 0; for (i=0; i < counters->brointel_email_count; i++) { if (!strcmp(Sagan_BroIntel_Intel_Email[i].email, value)) { Sagan_Log(S_WARN, "[%s, line %d] Got duplicate Intel::EMAIL '%s' in %s on line %d.", __FILE__, __LINE__, value, brointel_filename, line_count + 1); counters->brointel_dups++; found_flag_array = 1; } } if ( found_flag_array == 0 ) { Sagan_BroIntel_Intel_Email = (_Sagan_BroIntel_Intel_Email *) realloc(Sagan_BroIntel_Intel_Email, (counters->brointel_email_count+1) * sizeof(_Sagan_BroIntel_Intel_Email)); if ( Sagan_BroIntel_Intel_Email == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for Sagan_BroIntel_Intel_Email. Abort!", __FILE__, __LINE__); } strlcpy(Sagan_BroIntel_Intel_Email[counters->brointel_email_count].email, value, sizeof(Sagan_BroIntel_Intel_Email[counters->brointel_email_count].email)); counters->brointel_email_count++; found_flag = 1; } } if (!strcmp(type, "Intel::USER_NAME") && found_flag == 0) { To_LowerC(value); found_flag = 1; found_flag_array = 0; for (i=0; i < counters->brointel_user_name_count; i++) { if (!strcmp(Sagan_BroIntel_Intel_User_Name[i].username, value)) { Sagan_Log(S_WARN, "[%s, line %d] Got duplicate Intel::USER_NAME '%s' in %s on line %.", __FILE__, __LINE__, value, brointel_filename, line_count + 1); counters->brointel_dups++; found_flag_array = 1; } } if ( found_flag_array == 0 ) { Sagan_BroIntel_Intel_User_Name = (_Sagan_BroIntel_Intel_User_Name *) realloc(Sagan_BroIntel_Intel_User_Name, (counters->brointel_user_name_count+1) * sizeof(_Sagan_BroIntel_Intel_User_Name)); if ( Sagan_BroIntel_Intel_User_Name == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for Sagan_BroIntel_Intel_User_Name. Abort!", __FILE__, __LINE__); } strlcpy(Sagan_BroIntel_Intel_User_Name[counters->brointel_user_name_count].username, value, sizeof(Sagan_BroIntel_Intel_User_Name[counters->brointel_user_name_count].username)); counters->brointel_user_name_count++; } } if (!strcmp(type, "Intel::FILE_NAME") && found_flag == 0) { To_LowerC(value); found_flag = 1; found_flag_array = 0; for (i=0; i < counters->brointel_file_name_count; i++) { if (!strcmp(Sagan_BroIntel_Intel_File_Name[i].file_name, value)) { Sagan_Log(S_WARN, "[%s, line %d] Got duplicate Intel::FILE_NAME '%s' in %s on line %d.", __FILE__, __LINE__, value, brointel_filename, line_count + 1); counters->brointel_dups++; found_flag_array = 1; } } if ( found_flag_array == 0 ) { Sagan_BroIntel_Intel_File_Name = (_Sagan_BroIntel_Intel_File_Name *) realloc(Sagan_BroIntel_Intel_File_Name, (counters->brointel_file_name_count+1) * sizeof(_Sagan_BroIntel_Intel_File_Name)); if ( Sagan_BroIntel_Intel_File_Name == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for Sagan_BroIntel_Intel_File_Name. Abort!", __FILE__, __LINE__); } strlcpy(Sagan_BroIntel_Intel_File_Name[counters->brointel_file_name_count].file_name, value, sizeof(Sagan_BroIntel_Intel_File_Name[counters->brointel_file_name_count].file_name)); counters->brointel_file_name_count++; } } if (!strcmp(type, "Intel::CERT_HASH") && found_flag == 0) { To_LowerC(value); found_flag = 1; found_flag_array = 0; for (i=0; i < counters->brointel_cert_hash_count; i++) { if (!strcmp(Sagan_BroIntel_Intel_Cert_Hash[i].cert_hash, value)) { Sagan_Log(S_WARN, "[%s, line %d] Got duplicate Intel::CERT_HASH '%s' in %s on line %d.", __FILE__, __LINE__, value, brointel_filename, line_count + 1); counters->brointel_dups++; found_flag_array = 1; } } if ( found_flag_array == 0 ) { Sagan_BroIntel_Intel_Cert_Hash = (_Sagan_BroIntel_Intel_Cert_Hash *) realloc(Sagan_BroIntel_Intel_Cert_Hash, (counters->brointel_cert_hash_count+1) * sizeof(_Sagan_BroIntel_Intel_Cert_Hash)); if ( Sagan_BroIntel_Intel_Cert_Hash == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for Sagan_BroIntel_Intel_Cert_Hash. Abort!", __FILE__, __LINE__); } strlcpy(Sagan_BroIntel_Intel_Cert_Hash[counters->brointel_cert_hash_count].cert_hash, value, sizeof(Sagan_BroIntel_Intel_Cert_Hash[counters->brointel_cert_hash_count].cert_hash)); counters->brointel_cert_hash_count++; } } } line_count++; } fclose(brointel_file); brointel_filename = strtok_r(NULL, ",", &ptmp); line_count = 0; } } /***************************************************************************** * Sagan_BroIntel_IPADDR - Search array for blacklisted IP addresses *****************************************************************************/ sbool Sagan_BroIntel_IPADDR ( uint32_t ip ) { int i; /* If RFC1918, we can short circuit here */ if ( is_rfc1918(ip)) { if ( debug->debugbrointel ) { Sagan_Log(S_DEBUG, "[%s, line %d] %u is RFC1918, link local or invalid.", __FILE__, __LINE__, ip); } return(false); } /* Search array for for the IP address */ for ( i = 0; i < counters->brointel_addr_count; i++) { if ( Sagan_BroIntel_Intel_Addr[i].u32_ip == ip ) { if ( debug->debugbrointel ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found IP %u.", __FILE__, __LINE__, ip); } return(true); } } return(false); } /***************************************************************************** * Sagan_BroIntel_IPADDR_All - Search and tests _all_ IP addresses within * a syslog_message (reguardless of lognorm/parse ip)! *****************************************************************************/ sbool Sagan_BroIntel_IPADDR_All ( char *syslog_message ) { int i; int b; uint32_t ip; char *results = NULL; for (i = 1; i < MAX_PARSE_IP; i++) { results = Sagan_Parse_IP(syslog_message, i); /* Failed to find next IP, short circuit the process */ if (!strcmp(results, "0")) { return(false); } ip = IP2Bit(results); for ( b = 0; b < counters->brointel_addr_count; b++ ) { if ( Sagan_BroIntel_Intel_Addr[b].u32_ip == ip ) { return(true); } } } return(false); } /***************************************************************************** * Sagan_BroIntel_DOMAIN - Search DOMAIN array *****************************************************************************/ sbool Sagan_BroIntel_DOMAIN ( char *syslog_message ) { int i; for ( i = 0; i < counters->brointel_domain_count; i++) { if ( Sagan_stristr(syslog_message, Sagan_BroIntel_Intel_Domain[i].domain, false) ) { if ( debug->debugbrointel ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found domain %s.", __FILE__, __LINE__, Sagan_BroIntel_Intel_Domain[i].domain); } return(true); } } return(false); } /***************************************************************************** * Sagan_BroIntel_FILE_HASH - Search FILE_HASH array *****************************************************************************/ sbool Sagan_BroIntel_FILE_HASH ( char *syslog_message ) { int i; for ( i = 0; i < counters->brointel_file_hash_count; i++) { if ( Sagan_stristr(syslog_message, Sagan_BroIntel_Intel_File_Hash[i].hash, false) ) { if ( debug->debugbrointel ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found file hash %s.", __FILE__, __LINE__, Sagan_BroIntel_Intel_File_Hash[i].hash); } return(true); } } return(false); } /***************************************************************************** * Sagan_BroIntel_URL - Search URL array *****************************************************************************/ sbool Sagan_BroIntel_URL ( char *syslog_message ) { int i; for ( i = 0; i < counters->brointel_url_count; i++) { if ( Sagan_stristr(syslog_message, Sagan_BroIntel_Intel_URL[i].url, false) ) { if ( debug->debugbrointel ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found URL \"%s\".", __FILE__, __LINE__, Sagan_BroIntel_Intel_URL[i].url); } return(true); } } return(false); } /***************************************************************************** * Sagan_BroIntel_SOFTWARE - Search SOFTWARE array ****************************************************************************/ sbool Sagan_BroIntel_SOFTWARE ( char *syslog_message ) { int i; for ( i = 0; i < counters->brointel_software_count; i++) { if ( Sagan_stristr(syslog_message, Sagan_BroIntel_Intel_Software[i].software, false) ) { if ( debug->debugbrointel ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found software \"%s\".", __FILE__, __LINE__, Sagan_BroIntel_Intel_Software[i].software); } return(true); } } return(false); } /***************************************************************************** * Sagan_BroIntel_EMAIL - Search EMAIL array *****************************************************************************/ sbool Sagan_BroIntel_EMAIL ( char *syslog_message ) { int i; for ( i = 0; i < counters->brointel_email_count; i++) { if ( Sagan_stristr(syslog_message, Sagan_BroIntel_Intel_Email[i].email, false) ) { if ( debug->debugbrointel ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found e-mail address \"%s\".", __FILE__, __LINE__, Sagan_BroIntel_Intel_Email[i].email); } return(true); } } return(false); } /***************************************************************************** * Sagan_BroIntel_USER_NAME - Search USER_NAME array ****************************************************************************/ sbool Sagan_BroIntel_USER_NAME ( char *syslog_message ) { int i; for ( i = 0; i < counters->brointel_user_name_count; i++) { if ( Sagan_stristr(syslog_message, Sagan_BroIntel_Intel_User_Name[i].username, false) ) { if ( debug->debugbrointel ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found the username \"%s\".", __FILE__, __LINE__, Sagan_BroIntel_Intel_User_Name[i].username); } return(true); } } return(false); } /**************************************************************************** * Sagan_BroIntel_FILE_NAME - Search FILE_NAME array ****************************************************************************/ sbool Sagan_BroIntel_FILE_NAME ( char *syslog_message ) { int i; for ( i = 0; i < counters->brointel_file_name_count; i++) { if ( Sagan_stristr(syslog_message, Sagan_BroIntel_Intel_File_Name[i].file_name, false) ) { if ( debug->debugbrointel ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found the file name \"%s\".", __FILE__, __LINE__, Sagan_BroIntel_Intel_File_Name[i].file_name); } return(true); } } return(false); } /*************************************************************************** * Sagan_BroIntel_CERT_HASH - Search CERT_HASH array ***************************************************************************/ sbool Sagan_BroIntel_CERT_HASH ( char *syslog_message ) { int i; for ( i = 0; i < counters->brointel_cert_hash_count; i++) { if ( Sagan_stristr(syslog_message, Sagan_BroIntel_Intel_Cert_Hash[i].cert_hash, false) ) { if ( debug->debugbrointel ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found the CERT_HASH \"%s\".", __FILE__, __LINE__, Sagan_BroIntel_Intel_Cert_Hash[i].cert_hash); } return(true); } } return(false); } sagan-1.1.2/src/processors/sagan-track-clients.c0000644000175000017500000000743112770372750020554 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Adam Hall ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-track-clients.c * * Simple pre-processors that keeps track of reporting syslog clients/agents. * This is based off the IP address the clients, not based on normalization. * If a client/agent hasn't sent a syslog/event message in X minutes, then * generate an alert. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-track-clients.h" #include "sagan-config.h" struct _Sagan_Track_Clients_IPC *SaganTrackClients_ipc; struct _Sagan_IPC_Counters *counters_ipc; struct _SaganConfig *config; /**************************************************************************** * Sagan_Track_Clients - Main routine to "tracks" via IPC/memory IPs that * are reporting or not. ****************************************************************************/ int Sagan_Track_Clients ( uint32_t host_u32 ) { char utime_tmp[20] = { 0 }; time_t t; struct tm *now; int i; uintmax_t utime_u64; t = time(NULL); now=localtime(&t); strftime(utime_tmp, sizeof(utime_tmp), "%s", now); utime_u64 = atol(utime_tmp); int expired_time = config->pp_sagan_track_clients * 60; if ( host_u32 == 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Received invalid IP to track.", __FILE__, __LINE__); return(false); } /*************************/ /** Record Clients Here **/ /*************************/ for (i=0; itrack_clients_client_count; i++) { if ( SaganTrackClients_ipc[i].host_u32 == host_u32 ) { Sagan_File_Lock(config->shm_track_clients); SaganTrackClients_ipc[i].utime = utime_u64; SaganTrackClients_ipc[i].expire = expired_time; Sagan_File_Unlock(config->shm_track_clients); return(true); } } if ( counters_ipc->track_clients_client_count < config->max_track_clients ) { Sagan_File_Lock(config->shm_track_clients); SaganTrackClients_ipc[counters_ipc->track_clients_client_count].host_u32 = host_u32; SaganTrackClients_ipc[counters_ipc->track_clients_client_count].utime = utime_u64; SaganTrackClients_ipc[counters_ipc->track_clients_client_count].status = 0; SaganTrackClients_ipc[counters_ipc->track_clients_client_count].expire = expired_time; Sagan_File_Unlock(config->shm_track_clients); Sagan_File_Lock(config->shm_counters); counters_ipc->track_clients_client_count++; Sagan_File_Unlock(config->shm_counters); return(false); } else { Sagan_Log(S_WARN, "[%s, line %d] Client tracking has reached it's max! (%d). Increase 'track_clients' in your configuration!", __FILE__, __LINE__, config->max_track_clients); } return(true); } /* CLose sagan_track_clients */ sagan-1.1.2/src/processors/sagan-blacklist.h0000644000175000017500000000227112770372750017763 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ void Sagan_Blacklist_Load ( void ); void Sagan_Blacklist_Init( void ); sbool Sagan_Blacklist_IPADDR( uint32_t ); sbool Sagan_Blacklist_IPADDR_All ( char * ); typedef struct _Sagan_Blacklist _Sagan_Blacklist; struct _Sagan_Blacklist { uint32_t u32_lower; uint32_t u32_higher; }; sagan-1.1.2/src/processors/sagan-engine.c0000644000175000017500000031553612770372750017266 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-engine.c * * Threaded ngine that looks for events & patterns * based on * 'snort like' rule sets. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include "sagan.h" #include "sagan-aetas.h" #include "sagan-meta-content.h" #include "sagan-send-alert.h" #include "sagan-flowbit.h" #include "sagan-rules.h" #include "sagan-config.h" #include "sagan-ipc.h" #include "sagan-check-flow.h" #include "parsers/parsers.h" #include "processors/sagan-engine.h" #include "processors/sagan-bro-intel.h" #include "processors/sagan-blacklist.h" #ifdef WITH_BLUEDOT #include "processors/sagan-bluedot.h" #endif #ifdef HAVE_LIBLOGNORM #include "sagan-liblognorm.h" struct _SaganNormalizeLiblognorm *SaganNormalizeLiblognorm; pthread_mutex_t Lognorm_Mutex; #endif #ifdef HAVE_LIBMAXMINDDB #include #endif struct _SaganCounters *counters; struct _Rule_Struct *rulestruct; struct _SaganDebug *debug; struct _SaganConfig *config; struct _Sagan_IPC_Counters *counters_ipc; pthread_mutex_t CounterMutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t After_By_Src_Mutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t After_By_Dst_Mutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t After_By_Src_Port_Mutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t After_By_Dst_Port_Mutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t After_By_Username_Mutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t Thresh_By_Src_Mutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t Thresh_By_Dst_Mutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t Thresh_By_Src_Port_Mutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t Thresh_By_Dst_Port_Mutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t Thresh_By_Username_Mutex=PTHREAD_MUTEX_INITIALIZER; struct thresh_by_src_ipc *threshbysrc_ipc; struct thresh_by_dst_ipc *threshbydst_ipc; struct thresh_by_srcport_ipc *threshbysrcport_ipc; struct thresh_by_dstport_ipc *threshbydstport_ipc; struct thresh_by_username_ipc *threshbyusername_ipc; struct after_by_src_ipc *afterbysrc_ipc; struct after_by_dst_ipc *afterbydst_ipc; struct after_by_srcport_ipc *afterbysrcport_ipc; struct after_by_dstport_ipc *afterbydstport_ipc; struct after_by_username_ipc *afterbyusername_ipc; void Sagan_Engine_Init ( void ) { #ifdef HAVE_LIBLOGNORM SaganNormalizeLiblognorm = malloc(sizeof(struct _SaganNormalizeLiblognorm)); if ( SaganNormalizeLiblognorm == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganNormalizeLiblognorm. Abort!", __FILE__, __LINE__); } memset(SaganNormalizeLiblognorm, 0, sizeof(_SaganNormalizeLiblognorm)); #endif } int Sagan_Engine ( _SaganProcSyslog *SaganProcSyslog_LOCAL ) { struct _Sagan_Processor_Info *processor_info_engine = NULL; processor_info_engine = malloc(sizeof(struct _Sagan_Processor_Info)); if ( processor_info_engine == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for processor_info_engine. Abort!", __FILE__, __LINE__); } memset(processor_info_engine, 0, sizeof(_Sagan_Processor_Info)); int processor_info_engine_src_port = 0; int processor_info_engine_dst_port = 0; int processor_info_engine_proto = 0; int processor_info_engine_alertid = 0; sbool after_log_flag=0; sbool after_flag=0; int threadid=0; int i=0; int b=0; int z=0; int match=0; int sagan_match=0; /* Used to determine if all has "matched" (content, pcre, meta_content, etc) */ int rc=0; int ovector[PCRE_OVECCOUNT]; int alter_num; int meta_alter_num; sbool geoip2_isset = 0; sbool flowbit_return = 0; sbool alert_time_trigger = 0; sbool check_flow_return = 1; /* 1 = match, 0 = no match */ char *ptmp; char *tok2; /* We don't tie these to HAVE_LIBMAXMINDDB because we might have other * methods to extract the informaton */ char normalize_username[MAX_USERNAME_SIZE] = { 0 }; char normalize_md5_hash[MD5_HASH_SIZE+1] = { 0 }; char normalize_sha1_hash[SHA1_HASH_SIZE+1] = { 0 }; char normalize_sha256_hash[SHA256_HASH_SIZE+1] = { 0 }; char normalize_filename[MAX_FILENAME_SIZE] = { 0 }; char normalize_http_uri[MAX_URL_SIZE] = { 0 }; char normalize_http_hostname[MAX_HOSTNAME_SIZE] = { 0 }; int normalize_src_port; int normalize_dst_port; char ip_src[MAXIP]; sbool ip_src_flag = 0; uint32_t ip_src_u32; uint32_t ip_srcport_u32; char ip_dst[MAXIP]; sbool ip_dst_flag = 0; uint32_t ip_dst_u32; uint32_t ip_dstport_u32; char tmpbuf[128]; char s_msg[1024]; char alter_content[MAX_SYSLOGMSG]; char meta_alter_content[MAX_SYSLOGMSG]; time_t t; struct tm *now; char timet[20]; uintmax_t thresh_oldtime; uintmax_t after_oldtime; sbool thresh_flag=0; sbool thresh_log_flag=0; int proto = config->sagan_proto; /* Set proto to default */ sbool brointel_results = 0; sbool blacklist_results = 0; #ifdef HAVE_LIBMAXMINDDB int geoip2_return = 0; #endif #ifdef WITH_BLUEDOT unsigned char bluedot_results = 0; sbool bluedot_ip_flag = 0; sbool bluedot_hash_flag = 0; sbool bluedot_url_flag = 0; sbool bluedot_filename_flag = 0; #endif /* This needs to be included, even if liblognorm isn't in use */ sbool liblognorm_status = 0; /* Search for matches */ /* First we search for 'program' and such. This way, we don't waste CPU * time with pcre/content. */ for(b=0; b < counters->rulecount; b++) { match = 0; if ( strcmp(rulestruct[b].s_program, "" )) { strlcpy(tmpbuf, rulestruct[b].s_program, sizeof(tmpbuf)); ptmp = strtok_r(tmpbuf, "|", &tok2); match=1; while ( ptmp != NULL ) { if ( Sagan_Wildcard(ptmp, SaganProcSyslog_LOCAL->syslog_program) == 1 ) { match = 0; } ptmp = strtok_r(NULL, "|", &tok2); } } if ( strcmp(rulestruct[b].s_facility, "" )) { strlcpy(tmpbuf, rulestruct[b].s_facility, sizeof(tmpbuf)); ptmp = strtok_r(tmpbuf, "|", &tok2); match=1; while ( ptmp != NULL ) { if (!strcmp(ptmp, SaganProcSyslog_LOCAL->syslog_facility)) { match=0; } ptmp = strtok_r(NULL, "|", &tok2); } } if ( strcmp(rulestruct[b].s_syspri, "" )) { strlcpy(tmpbuf, rulestruct[b].s_syspri, sizeof(tmpbuf)); ptmp = strtok_r(tmpbuf, "|", &tok2); match=1; while ( ptmp != NULL ) { if (!strcmp(ptmp, SaganProcSyslog_LOCAL->syslog_priority)) { match=0; } ptmp = strtok_r(NULL, "|", &tok2); } } if ( strcmp(rulestruct[b].s_level, "" )) { strlcpy(tmpbuf, rulestruct[b].s_level, sizeof(tmpbuf)); ptmp = strtok_r(tmpbuf, "|", &tok2); match=1; while ( ptmp != NULL ) { if (!strcmp(ptmp, SaganProcSyslog_LOCAL->syslog_level)) { match=0; } ptmp = strtok_r(NULL, "|", &tok2); } } if ( strcmp(rulestruct[b].s_tag, "" )) { strlcpy(tmpbuf, rulestruct[b].s_tag, sizeof(tmpbuf)); ptmp = strtok_r(tmpbuf, "|", &tok2); match=1; while ( ptmp != NULL ) { if (!strcmp(ptmp, SaganProcSyslog_LOCAL->syslog_tag)) { match=0; } ptmp = strtok_r(NULL, "|", &tok2); } } /* If there has been a match above, or NULL on all, then we continue with * PCRE/content search */ /* Search via strstr (content:) */ if ( match == 0 ) { if ( rulestruct[b].content_count != 0 ) { for(z=0; zsyslog_message) > rulestruct[b].s_offset[z] ) { alter_num = strlen(SaganProcSyslog_LOCAL->syslog_message) - rulestruct[b].s_offset[z]; strlcpy(alter_content, SaganProcSyslog_LOCAL->syslog_message + (strlen(SaganProcSyslog_LOCAL->syslog_message) - alter_num), alter_num + 1); } else { alter_content[0] = '\0'; /* The offset is larger than the message. Set content too NULL */ } } else { strlcpy(alter_content, SaganProcSyslog_LOCAL->syslog_message, sizeof(alter_content)); } /* Content: DEPTH */ if ( rulestruct[b].s_depth[z] != 0 ) { /* We do +2 to account for alter_count[0] and whitespace at the begin of syslog message */ strlcpy(alter_content, alter_content, rulestruct[b].s_depth[z] + 2); } /* Content: DISTANCE */ if ( rulestruct[b].s_distance[z] != 0 ) { alter_num = strlen(SaganProcSyslog_LOCAL->syslog_message) - ( rulestruct[b].s_depth[z-1] + rulestruct[b].s_distance[z] + 1); strlcpy(alter_content, SaganProcSyslog_LOCAL->syslog_message + (strlen(SaganProcSyslog_LOCAL->syslog_message) - alter_num), alter_num + 1); /* Content: WITHIN */ if ( rulestruct[b].s_within[z] != 0 ) { strlcpy(alter_content, alter_content, rulestruct[b].s_within[z] + 1); } } /* If case insensitive */ if ( rulestruct[b].s_nocase[z] == 1 ) { if (rulestruct[b].content_not[z] != 1 && Sagan_stristr(alter_content, rulestruct[b].s_content[z], false)) { sagan_match++; } else { /* for content: ! */ if ( rulestruct[b].content_not[z] == 1 && !Sagan_stristr(alter_content, rulestruct[b].s_content[z], false)) sagan_match++; } } else { /* If case sensitive */ if ( rulestruct[b].content_not[z] != 1 && Sagan_strstr(alter_content, rulestruct[b].s_content[z] )) { sagan_match++; } else { /* for content: ! */ if ( rulestruct[b].content_not[z] == 1 && !Sagan_strstr(alter_content, rulestruct[b].s_content[z])) sagan_match++; } } } } /* Search via PCRE */ /* Note: We verify each "step" has succeeded before function execution. For example, * if there is a "content", but that has failed, there is no point in doing the * pcre or meta_content. */ if ( rulestruct[b].pcre_count != 0 && sagan_match == rulestruct[b].content_count ) { for(z=0; zsyslog_message, (int)strlen(SaganProcSyslog_LOCAL->syslog_message), 0, 0, ovector, PCRE_OVECCOUNT); if ( rc > 0 ) { sagan_match++; } } /* End of pcre if */ } /* Search via meta_content */ if ( rulestruct[b].meta_content_count != 0 && sagan_match == rulestruct[b].content_count + rulestruct[b].pcre_count ) { for (z=0; zsyslog_message) > rulestruct[b].meta_offset[z] ) { meta_alter_num = strlen(SaganProcSyslog_LOCAL->syslog_message) - rulestruct[b].meta_offset[z]; strlcpy(meta_alter_content, SaganProcSyslog_LOCAL->syslog_message + (strlen(SaganProcSyslog_LOCAL->syslog_message) - meta_alter_num), meta_alter_num + 1); } else { meta_alter_content[0] = '\0'; /* The offset is larger than the message. Set meta_content too NULL */ } } else { strlcpy(meta_alter_content, SaganProcSyslog_LOCAL->syslog_message, sizeof(meta_alter_content)); } /* Meta_content: DEPTH */ if ( rulestruct[b].meta_depth[z] != 0 ) { /* We do +2 to account for alter_count[0] and whitespace at the begin of syslog message */ strlcpy(meta_alter_content, meta_alter_content, rulestruct[b].meta_depth[z] + 2); } /* Meta_content: DISTANCE */ if ( rulestruct[b].meta_distance[z] != 0 ) { meta_alter_num = strlen(SaganProcSyslog_LOCAL->syslog_message) - ( rulestruct[b].meta_depth[z-1] + rulestruct[b].meta_distance[z] + 1 ); strlcpy(meta_alter_content, SaganProcSyslog_LOCAL->syslog_message + (strlen(SaganProcSyslog_LOCAL->syslog_message) - meta_alter_num), meta_alter_num + 1); /* Meta_ontent: WITHIN */ if ( rulestruct[b].meta_within[z] != 0 ) { strlcpy(meta_alter_content, meta_alter_content, rulestruct[b].meta_within[z] + 1); } } rc = Sagan_Meta_Content_Search(meta_alter_content, b, z); if ( rc == 1 ) { sagan_match++; } } } } /* End of content: & pcre */ /* if you got match */ if ( sagan_match == rulestruct[b].pcre_count + rulestruct[b].content_count + rulestruct[b].meta_content_count ) { if ( match == 0 ) { ip_src_flag = 0; ip_dst_flag = 0; normalize_dst_port=0; normalize_src_port=0; normalize_md5_hash[0] = '\0'; normalize_sha1_hash[0] = '\0'; normalize_sha256_hash[0] = '\0'; normalize_filename[0] = '\0'; normalize_http_uri[0] = '\0'; normalize_http_hostname[0] = '\0'; normalize_username[0] = '\0'; #ifdef HAVE_LIBLOGNORM if ( rulestruct[b].normalize == 1 ) { pthread_mutex_lock(&Lognorm_Mutex); liblognorm_status = 0; Sagan_Normalize_Liblognorm(SaganProcSyslog_LOCAL->syslog_message); if (SaganNormalizeLiblognorm->ip_src[0] != '0') { strlcpy(ip_src, SaganNormalizeLiblognorm->ip_src, sizeof(ip_src)); ip_src_flag = 1; liblognorm_status = 1; } if (SaganNormalizeLiblognorm->ip_dst[0] != '0' ) { strlcpy(ip_dst, SaganNormalizeLiblognorm->ip_dst, sizeof(ip_dst)); ip_dst_flag = 1; liblognorm_status = 1; } if ( SaganNormalizeLiblognorm->src_port != 0 ) { normalize_src_port = SaganNormalizeLiblognorm->src_port; liblognorm_status = 1; } if ( SaganNormalizeLiblognorm->dst_port != 0 ) { normalize_dst_port = SaganNormalizeLiblognorm->dst_port; liblognorm_status = 1; } if ( SaganNormalizeLiblognorm->username[0] != '\0' ) { strlcpy(normalize_username, SaganNormalizeLiblognorm->username, sizeof(normalize_username)); liblognorm_status = 1; } if ( SaganNormalizeLiblognorm->http_uri[0] != '\0' ) { strlcpy(normalize_http_uri, SaganNormalizeLiblognorm->http_uri, sizeof(normalize_http_uri)); liblognorm_status = 1; } if ( SaganNormalizeLiblognorm->filename[0] != '\0' ) { strlcpy(normalize_filename, SaganNormalizeLiblognorm->filename, sizeof(normalize_filename)); liblognorm_status = 1; } if ( SaganNormalizeLiblognorm->hash_sha256[0] != '\0' ) { strlcpy(normalize_sha256_hash, SaganNormalizeLiblognorm->hash_sha256, sizeof(normalize_sha256_hash)); liblognorm_status = 1; } if ( SaganNormalizeLiblognorm->hash_sha1[0] != '\0' ) { strlcpy(normalize_sha1_hash, SaganNormalizeLiblognorm->hash_sha1, sizeof(normalize_sha1_hash)); liblognorm_status = 1; } if ( SaganNormalizeLiblognorm->hash_md5[0] != '\0' ) { strlcpy(normalize_md5_hash, SaganNormalizeLiblognorm->hash_md5, sizeof(normalize_md5_hash)); liblognorm_status = 1; } pthread_mutex_unlock(&Lognorm_Mutex); } #endif /* Normalization should always over ride parse_src_ip/parse_dst_ip/parse_port, * _unless_ liblognorm fails and both are in a rule */ if ( rulestruct[b].normalize == 0 || (rulestruct[b].normalize == 1 && liblognorm_status == 0 ) ) { /* parse_src_ip: {position} */ if ( rulestruct[b].s_find_src_ip == 1 ) { strlcpy(ip_src, Sagan_Parse_IP(SaganProcSyslog_LOCAL->syslog_message, rulestruct[b].s_find_src_pos), sizeof(ip_src)); ip_src_flag = 1; } /* parse_dst_ip: {postion} */ if ( rulestruct[b].s_find_dst_ip == 1 ) { strlcpy(ip_dst, Sagan_Parse_IP(SaganProcSyslog_LOCAL->syslog_message, rulestruct[b].s_find_dst_pos), sizeof(ip_dst)); ip_dst_flag = 1; } /* parse_port */ if ( rulestruct[b].s_find_port == 1 ) { normalize_src_port = Sagan_Parse_Src_Port(SaganProcSyslog_LOCAL->syslog_message); normalize_dst_port = Sagan_Parse_Dst_Port(SaganProcSyslog_LOCAL->syslog_message); } else { normalize_src_port = config->sagan_port; } /* parse_hash: md5 */ if ( rulestruct[b].s_find_hash_type == PARSE_HASH_MD5 ) { strlcpy(normalize_md5_hash, Sagan_Parse_Hash(SaganProcSyslog_LOCAL->syslog_message, PARSE_HASH_MD5), sizeof(normalize_md5_hash)); } else if ( rulestruct[b].s_find_hash_type == PARSE_HASH_SHA1 ) { strlcpy(normalize_sha1_hash, Sagan_Parse_Hash(SaganProcSyslog_LOCAL->syslog_message, PARSE_HASH_SHA1), sizeof(normalize_sha1_hash)); } else if ( rulestruct[b].s_find_hash_type == PARSE_HASH_SHA256 ) { strlcpy(normalize_sha256_hash, Sagan_Parse_Hash(SaganProcSyslog_LOCAL->syslog_message, PARSE_HASH_SHA256), sizeof(normalize_sha256_hash)); printf("-> %s\n", normalize_sha256_hash); } /* DEBUG else if ( rulestruct[b].s_find_hash_type == PARSE_HASH_ALL ) { strlcpy(normalize_sha256_hash, Sagan_Parse_Hash(SaganProcSyslog_LOCAL->syslog_message, PARSE_HASH_SHA256), sizeof(normalize_sha256_hash)); } */ } /* If the rule calls for proto searching, we do it now */ proto = 0; if ( rulestruct[b].s_find_proto_program == 1 ) { proto = Sagan_Parse_Proto_Program(SaganProcSyslog_LOCAL->syslog_program); } if ( rulestruct[b].s_find_proto == 1 && proto == 0 ) { proto = Sagan_Parse_Proto(SaganProcSyslog_LOCAL->syslog_message); } /* If proto is not searched or has failed, default to whatever the rule told us to use */ if ( proto == 0 ) { proto = rulestruct[b].ip_proto; } if ( ip_src_flag == 0 || ip_src[0] == '0' ) { strlcpy(ip_src, SaganProcSyslog_LOCAL->syslog_host, sizeof(ip_src)); } if ( ip_dst_flag == 0 || ip_dst[0] == '0' ) { strlcpy(ip_dst, SaganProcSyslog_LOCAL->syslog_host, sizeof(ip_dst)); } if ( normalize_src_port == 0 ) { normalize_src_port=config->sagan_port; } if ( normalize_dst_port == 0 ) { normalize_dst_port=rulestruct[b].dst_port; } if ( proto == 0 ) { proto = config->sagan_proto; /* Rule didn't specify proto, use sagan default! */ } /* If the "source" is 127.0.0.1 that is not useful. Replace with config->sagan_host * (defined by user in sagan.conf */ if ( !strcmp(ip_src, "127.0.0.1") || !strcmp(ip_src, "::1") ) { strlcpy(ip_src, config->sagan_host, sizeof(ip_src)); } if ( !strcmp(ip_dst, "127.0.0.1") || !strcmp(ip_dst, "::1" ) ) { strlcpy(ip_dst, config->sagan_host, sizeof(ip_dst)); } ip_src_u32 = IP2Bit(ip_src); ip_dst_u32 = IP2Bit(ip_dst); ip_dstport_u32 = normalize_dst_port; ip_srcport_u32 = normalize_src_port; strlcpy(s_msg, rulestruct[b].s_msg, sizeof(s_msg)); /* Check for flow of rule - has_flow is set as rule loading. It 1, then the rule has some sort of flow. It 0, rule is set any/any */ if ( rulestruct[b].has_flow == 1 ) { check_flow_return = Sagan_Check_Flow( b, ip_src_u32, ip_dst_u32); if(check_flow_return == 0) { counters->follow_flow_drop++; } counters->follow_flow_total++; } /**************************************************************************** * Flowbit ****************************************************************************/ if ( rulestruct[b].flowbit_flag && rulestruct[b].flowbit_condition_count ) { flowbit_return = Sagan_Flowbit_Condition(b, ip_src, ip_dst); } /**************************************************************************** * Country code ****************************************************************************/ #ifdef HAVE_LIBMAXMINDDB if ( rulestruct[b].geoip2_flag ) { if ( rulestruct[b].geoip2_src_or_dst == 1 ) { geoip2_return = Sagan_GeoIP2_Lookup_Country(ip_src, b); } else { geoip2_return = Sagan_GeoIP2_Lookup_Country(ip_dst, b); } if ( geoip2_return != 2 ) { /* If country IS NOT {my value} return 1 */ if ( rulestruct[b].geoip2_type == 1 ) { /* isnot */ if ( geoip2_return == 1 ) { geoip2_isset = 0; } else { geoip2_isset = 1; counters->geoip2_hit++; } } /* If country IS {my value} return 1 */ if ( rulestruct[b].geoip2_type == 2 ) { /* is */ if ( geoip2_return == 1 ) { geoip2_isset = 1; counters->geoip2_hit++; } else { geoip2_isset = 0; } } } } #endif /**************************************************************************** * Time based alerting ****************************************************************************/ if ( rulestruct[b].alert_time_flag ) { alert_time_trigger = 0; if ( Sagan_Check_Time(b) ) { alert_time_trigger = 1; } } /**************************************************************************** * Blacklist ****************************************************************************/ if ( rulestruct[b].blacklist_flag ) { blacklist_results = 0; if ( rulestruct[b].blacklist_ipaddr_src ) { blacklist_results = Sagan_Blacklist_IPADDR( ip_src_u32 ); } if ( blacklist_results == 0 && rulestruct[b].blacklist_ipaddr_dst ) { blacklist_results = Sagan_Blacklist_IPADDR( ip_dst_u32 ); } if ( blacklist_results == 0 && rulestruct[b].blacklist_ipaddr_all ) { blacklist_results = Sagan_Blacklist_IPADDR_All(SaganProcSyslog_LOCAL->syslog_message); } if ( blacklist_results == 0 && rulestruct[b].blacklist_ipaddr_both ) { if ( Sagan_Blacklist_IPADDR( ip_src_u32 ) || Sagan_Blacklist_IPADDR( ip_dst_u32 ) ) { blacklist_results = 1; } } } #ifdef WITH_BLUEDOT if ( config->bluedot_flag ) { if ( rulestruct[b].bluedot_ipaddr_type ) { bluedot_results = 0; /* 1 == src, 2 == dst, 3 == both, 4 == all */ if ( rulestruct[b].bluedot_ipaddr_type == 1 ) { bluedot_results = Sagan_Bluedot_Lookup(ip_src, BLUEDOT_LOOKUP_IP, b); bluedot_ip_flag = Sagan_Bluedot_Cat_Compare( bluedot_results, b, BLUEDOT_LOOKUP_IP); } if ( rulestruct[b].bluedot_ipaddr_type == 2 ) { bluedot_results = Sagan_Bluedot_Lookup(ip_dst, BLUEDOT_LOOKUP_IP, b); bluedot_ip_flag = Sagan_Bluedot_Cat_Compare( bluedot_results, b, BLUEDOT_LOOKUP_IP); } if ( rulestruct[b].bluedot_ipaddr_type == 3 ) { bluedot_results = Sagan_Bluedot_Lookup(ip_src, BLUEDOT_LOOKUP_IP, b); bluedot_ip_flag = Sagan_Bluedot_Cat_Compare( bluedot_results, b, BLUEDOT_LOOKUP_IP); /* If the source isn't found, then check the dst */ if ( bluedot_ip_flag != 0 ) { bluedot_results = Sagan_Bluedot_Lookup(ip_dst, BLUEDOT_LOOKUP_IP, b); bluedot_ip_flag = Sagan_Bluedot_Cat_Compare( bluedot_results, b, BLUEDOT_LOOKUP_IP); } } if ( rulestruct[b].bluedot_ipaddr_type == 4 ) { bluedot_ip_flag = Sagan_Bluedot_IP_Lookup_All(SaganProcSyslog_LOCAL->syslog_message, b); } } if ( rulestruct[b].bluedot_file_hash && normalize_md5_hash[0] != '\0' ) { bluedot_results = Sagan_Bluedot_Lookup( normalize_md5_hash, BLUEDOT_LOOKUP_HASH, b); bluedot_hash_flag = Sagan_Bluedot_Cat_Compare( bluedot_results, b, BLUEDOT_LOOKUP_HASH); } if ( rulestruct[b].bluedot_url && normalize_http_uri != '\0' ) { bluedot_results = Sagan_Bluedot_Lookup( normalize_http_uri, BLUEDOT_LOOKUP_URL, b); bluedot_url_flag = Sagan_Bluedot_Cat_Compare( bluedot_results, b, BLUEDOT_LOOKUP_URL); } if ( rulestruct[b].bluedot_filename && normalize_filename[0] != '\0' ) { bluedot_results = Sagan_Bluedot_Lookup( normalize_filename, BLUEDOT_LOOKUP_FILENAME, b); bluedot_filename_flag = Sagan_Bluedot_Cat_Compare( bluedot_results, b, BLUEDOT_LOOKUP_FILENAME); } /* Do cleanup at the end in case any "hits" above refresh the cache. This why we don't * "delete" an entry only to re-add it! */ Sagan_Bluedot_Check_Cache_Time(); } #endif /**************************************************************************** * Bro Intel ****************************************************************************/ if ( rulestruct[b].brointel_flag ) { brointel_results = 0; if ( rulestruct[b].brointel_ipaddr_src ) { brointel_results = Sagan_BroIntel_IPADDR( ip_src_u32 ); } if ( brointel_results == 0 && rulestruct[b].brointel_ipaddr_dst ) { brointel_results = Sagan_BroIntel_IPADDR( ip_dst_u32 ); } if ( brointel_results == 0 && rulestruct[b].brointel_ipaddr_all ) { brointel_results = Sagan_BroIntel_IPADDR_All ( SaganProcSyslog_LOCAL->syslog_message ); } if ( brointel_results == 0 && rulestruct[b].brointel_ipaddr_both ) { if ( Sagan_BroIntel_IPADDR( ip_src_u32 ) || Sagan_BroIntel_IPADDR( ip_dst_u32 ) ) { brointel_results = 1; } } if ( brointel_results == 0 && rulestruct[b].brointel_domain ) { brointel_results = Sagan_BroIntel_DOMAIN(SaganProcSyslog_LOCAL->syslog_message); } if ( brointel_results == 0 && rulestruct[b].brointel_file_hash ) { brointel_results = Sagan_BroIntel_FILE_HASH(SaganProcSyslog_LOCAL->syslog_message); } if ( brointel_results == 0 && rulestruct[b].brointel_url ) { brointel_results = Sagan_BroIntel_URL(SaganProcSyslog_LOCAL->syslog_message); } if ( brointel_results == 0 && rulestruct[b].brointel_software ) { brointel_results = Sagan_BroIntel_SOFTWARE(SaganProcSyslog_LOCAL->syslog_message); } if ( brointel_results == 0 && rulestruct[b].brointel_user_name ) { brointel_results = Sagan_BroIntel_USER_NAME(SaganProcSyslog_LOCAL->syslog_message); } if ( brointel_results == 0 && rulestruct[b].brointel_file_name ) { brointel_results = Sagan_BroIntel_FILE_NAME(SaganProcSyslog_LOCAL->syslog_message); } if ( brointel_results == 0 && rulestruct[b].brointel_cert_hash ) { brointel_results = Sagan_BroIntel_CERT_HASH(SaganProcSyslog_LOCAL->syslog_message); } } /****************************************************************************/ /* Populate the SaganEvent array with the information needed. This info */ /* will be passed to the threads. No need to populate it _if_ we're in a */ /* threshold state. */ /****************************************************************************/ if ( check_flow_return == 1 ) { if ( rulestruct[b].flowbit_flag == 0 || ( rulestruct[b].flowbit_flag && rulestruct[b].flowbit_set_count && rulestruct[b].flowbit_condition_count == 0 ) || ( rulestruct[b].flowbit_flag && rulestruct[b].flowbit_set_count && rulestruct[b].flowbit_condition_count && flowbit_return ) || ( rulestruct[b].flowbit_flag && rulestruct[b].flowbit_set_count == 0 && rulestruct[b].flowbit_condition_count && flowbit_return )) { if ( rulestruct[b].alert_time_flag == 0 || alert_time_trigger == 1 ) { #ifdef HAVE_LIBMAXMINDDB if ( rulestruct[b].geoip2_flag == 0 || geoip2_isset == 1 ) { #endif if ( rulestruct[b].blacklist_flag == 0 || blacklist_results == 1 ) { if ( rulestruct[b].brointel_flag == 0 || brointel_results == 1) { #ifdef WITH_BLUEDOT if ( config->bluedot_flag == 0 || rulestruct[b].bluedot_file_hash == 0 || ( rulestruct[b].bluedot_file_hash == 1 && bluedot_hash_flag == 1 )) { if ( config->bluedot_flag == 0 || rulestruct[b].bluedot_filename == 0 || ( rulestruct[b].bluedot_filename == 1 && bluedot_filename_flag == 1 )) { if ( config->bluedot_flag == 0 || rulestruct[b].bluedot_url == 0 || ( rulestruct[b].bluedot_url == 1 && bluedot_url_flag == 1 )) { if ( config->bluedot_flag == 0 || rulestruct[b].bluedot_ipaddr_type == 0 || ( rulestruct[b].bluedot_ipaddr_type != 0 && bluedot_ip_flag == 1 )) { #endif after_log_flag=0; /*********************************************************/ /* After - Similar to thresholding, but the opposite */ /* direction - ie - alert _after_ X number of events */ /*********************************************************/ if ( rulestruct[b].after_method != 0 ) { after_log_flag=1; t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); /* After by source IP address */ if ( rulestruct[b].after_method == AFTER_BY_SRC ) { after_flag = 0; for (i = 0; i < counters_ipc->after_count_by_src; i++ ) { if ( afterbysrc_ipc[i].ipsrc == ip_src_u32 && !strcmp(afterbysrc_ipc[i].sid, rulestruct[b].s_sid )) { after_flag=1; Sagan_File_Lock(config->shm_after_by_src); pthread_mutex_lock(&After_By_Src_Mutex); afterbysrc_ipc[i].count++; after_oldtime = atol(timet) - afterbysrc_ipc[i].utime; afterbysrc_ipc[i].utime = atol(timet); if ( after_oldtime > rulestruct[b].after_seconds ) { afterbysrc_ipc[i].count=1; afterbysrc_ipc[i].utime = atol(timet); after_log_flag=1; } pthread_mutex_unlock(&After_By_Src_Mutex); Sagan_File_Unlock(config->shm_after_by_src); if ( rulestruct[b].after_count < afterbysrc_ipc[i].count ) { after_log_flag = 0; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "After SID %s by source IP address. [%s]", afterbysrc_ipc[i].sid, ip_src); } pthread_mutex_lock(&CounterMutex); counters->after_total++; pthread_mutex_unlock(&CounterMutex); } } } } /* If not found, add it to the array */ if ( after_flag == 0 ) { if ( Sagan_Clean_IPC_Object(AFTER_BY_SRC) == 0 ) { Sagan_File_Lock(config->shm_after_by_src); pthread_mutex_lock(&After_By_Src_Mutex); afterbysrc_ipc[counters_ipc->after_count_by_src].ipsrc = ip_src_u32; strlcpy(afterbysrc_ipc[counters_ipc->after_count_by_src].sid, rulestruct[b].s_sid, sizeof(afterbysrc_ipc[counters_ipc->after_count_by_src].sid)); afterbysrc_ipc[counters_ipc->after_count_by_src].count = 1; afterbysrc_ipc[counters_ipc->after_count_by_src].utime = atol(timet); afterbysrc_ipc[counters_ipc->after_count_by_src].expire = rulestruct[b].after_seconds; Sagan_File_Unlock(config->shm_after_by_src); Sagan_File_Lock(config->shm_counters); counters_ipc->after_count_by_src++; pthread_mutex_unlock(&After_By_Src_Mutex); Sagan_File_Unlock(config->shm_counters); } } /* After by source IP port */ if ( rulestruct[b].after_method == 4 ) { after_flag = 0; /* Check array for matching src / sid */ for (i = 0; i < counters_ipc->after_count_by_srcport; i++ ) { if ( afterbysrcport_ipc[i].ipsrcport == ip_srcport_u32 && !strcmp(afterbysrcport_ipc[i].sid, rulestruct[b].s_sid )) { after_flag=1; Sagan_File_Lock(config->shm_after_by_srcport); pthread_mutex_lock(&After_By_Src_Port_Mutex); afterbysrcport_ipc[i].count++; after_oldtime = atol(timet) - afterbysrcport_ipc[i].utime; afterbysrcport_ipc[i].utime = atol(timet); if ( after_oldtime > rulestruct[b].after_seconds ) { afterbysrcport_ipc[i].count=1; afterbysrcport_ipc[i].utime = atol(timet); after_log_flag=1; } pthread_mutex_unlock(&After_By_Src_Port_Mutex); Sagan_File_Unlock(config->shm_after_by_srcport); if ( rulestruct[b].after_count < afterbysrcport_ipc[i].count ) { after_log_flag = 0; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "After SID %s by source IP port. [%d]", afterbysrcport_ipc[i].sid, ip_srcport_u32); } pthread_mutex_lock(&CounterMutex); counters->after_total++; pthread_mutex_unlock(&CounterMutex); } } } /* If not found, add it to the array */ if ( after_flag == 0 ) { if ( Sagan_Clean_IPC_Object(AFTER_BY_SRCPORT) == 0 ) { Sagan_File_Lock(config->shm_after_by_srcport); pthread_mutex_lock(&After_By_Src_Port_Mutex); afterbysrcport_ipc[counters_ipc->after_count_by_srcport].ipsrcport = ip_srcport_u32; strlcpy(afterbysrcport_ipc[counters_ipc->after_count_by_srcport].sid, rulestruct[b].s_sid, sizeof(afterbysrcport_ipc[counters_ipc->after_count_by_srcport].sid)); afterbysrcport_ipc[counters_ipc->after_count_by_srcport].count = 1; afterbysrcport_ipc[counters_ipc->after_count_by_srcport].utime = atol(timet); afterbysrcport_ipc[counters_ipc->after_count_by_srcport].expire = rulestruct[b].after_seconds; Sagan_File_Unlock(config->shm_after_by_srcport); Sagan_File_Lock(config->shm_counters); counters_ipc->after_count_by_srcport++; pthread_mutex_unlock(&After_By_Src_Port_Mutex); Sagan_File_Unlock(config->shm_counters); } } } /* After by destination IP address */ if ( rulestruct[b].after_method == 2 ) { after_flag = 0; /* Check array for matching src / sid */ for (i = 0; i < counters_ipc->after_count_by_dst; i++ ) { if ( afterbydst_ipc[i].ipdst == ip_dst_u32 && !strcmp(afterbydst_ipc[i].sid, rulestruct[b].s_sid )) { after_flag=1; Sagan_File_Lock(config->shm_after_by_dst); pthread_mutex_lock(&After_By_Dst_Mutex); afterbydst_ipc[i].count++; after_oldtime = atol(timet) - afterbydst_ipc[i].utime; afterbydst_ipc[i].utime = atol(timet); if ( after_oldtime > rulestruct[b].after_seconds ) { afterbydst_ipc[i].count=1; afterbydst_ipc[i].utime = atol(timet); after_log_flag=1; } pthread_mutex_unlock(&After_By_Dst_Mutex); Sagan_File_Unlock(config->shm_after_by_dst); if ( rulestruct[b].after_count < afterbydst_ipc[i].count ) { after_log_flag = 0; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "After SID %s by destination IP address. [%s]", afterbydst_ipc[i].sid, ip_dst); } pthread_mutex_lock(&CounterMutex); counters->after_total++; pthread_mutex_unlock(&CounterMutex); } } } /* If not found, add it to the array */ if ( after_flag == 0 ) { if ( Sagan_Clean_IPC_Object(AFTER_BY_DST) == 0 ) { Sagan_File_Lock(config->shm_after_by_dst); pthread_mutex_lock(&After_By_Dst_Mutex); afterbydst_ipc[counters_ipc->after_count_by_dst].ipdst = ip_dst_u32; strlcpy(afterbydst_ipc[counters_ipc->after_count_by_dst].sid, rulestruct[b].s_sid, sizeof(afterbydst_ipc[counters_ipc->after_count_by_dst].sid)); afterbydst_ipc[counters_ipc->after_count_by_dst].count = 1; afterbydst_ipc[counters_ipc->after_count_by_dst].utime = atol(timet); afterbydst_ipc[counters_ipc->after_count_by_dst].expire = rulestruct[b].after_seconds; Sagan_File_Unlock(config->shm_after_by_dst); Sagan_File_Lock(config->shm_counters); counters_ipc->after_count_by_dst++; pthread_mutex_unlock(&After_By_Dst_Mutex); Sagan_File_Unlock(config->shm_counters); } } } /* After by source IP port */ if ( rulestruct[b].after_method == 4 ) { after_flag = 0; /* Check array for matching src / sid */ for (i = 0; i < counters_ipc->after_count_by_srcport; i++ ) { if ( afterbysrcport_ipc[i].ipsrcport == ip_srcport_u32 && !strcmp(afterbysrcport_ipc[i].sid, rulestruct[b].s_sid )) { after_flag=1; Sagan_File_Lock(config->shm_after_by_srcport); pthread_mutex_lock(&After_By_Src_Port_Mutex); afterbysrcport_ipc[i].count++; after_oldtime = atol(timet) - afterbysrcport_ipc[i].utime; afterbysrcport_ipc[i].utime = atol(timet); if ( after_oldtime > rulestruct[b].after_seconds ) { afterbysrcport_ipc[i].count=1; afterbysrcport_ipc[i].utime = atol(timet); after_log_flag=1; } pthread_mutex_unlock(&After_By_Src_Port_Mutex); Sagan_File_Unlock(config->shm_after_by_srcport); if ( rulestruct[b].after_count < afterbysrcport_ipc[i].count ) { after_log_flag = 0; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "After SID %s by source IP port. [%d]", afterbysrcport_ipc[i].sid, ip_dstport_u32); } pthread_mutex_lock(&CounterMutex); counters->after_total++; pthread_mutex_unlock(&CounterMutex); } } } /* If not found, add it to the array */ if ( after_flag == 0 ) { if ( Sagan_Clean_IPC_Object(AFTER_BY_SRCPORT) == 0 ) { Sagan_File_Lock(config->shm_after_by_srcport); pthread_mutex_lock(&After_By_Src_Port_Mutex); afterbysrcport_ipc[counters_ipc->after_count_by_srcport].ipsrcport = ip_srcport_u32; strlcpy(afterbysrcport_ipc[counters_ipc->after_count_by_srcport].sid, rulestruct[b].s_sid, sizeof(afterbysrcport_ipc[counters_ipc->after_count_by_srcport].sid)); afterbysrcport_ipc[counters_ipc->after_count_by_srcport].count = 1; afterbysrcport_ipc[counters_ipc->after_count_by_srcport].utime = atol(timet); afterbysrcport_ipc[counters_ipc->after_count_by_srcport].expire = rulestruct[b].after_seconds; Sagan_File_Unlock(config->shm_after_by_srcport); Sagan_File_Lock(config->shm_counters); counters_ipc->after_count_by_srcport++; pthread_mutex_unlock(&After_By_Src_Port_Mutex); Sagan_File_Unlock(config->shm_counters); } } } /* After by destination IP port */ if ( rulestruct[b].after_method == 5 ) { after_flag = 0; /* Check array for matching src / sid */ for (i = 0; i < counters_ipc->after_count_by_dstport; i++ ) { if ( afterbydstport_ipc[i].ipdstport == ip_dstport_u32 && !strcmp(afterbydstport_ipc[i].sid, rulestruct[b].s_sid )) { after_flag=1; Sagan_File_Lock(config->shm_after_by_dstport); pthread_mutex_lock(&After_By_Dst_Port_Mutex); afterbydstport_ipc[i].count++; after_oldtime = atol(timet) - afterbydstport_ipc[i].utime; afterbydstport_ipc[i].utime = atol(timet); if ( after_oldtime > rulestruct[b].after_seconds ) { afterbydstport_ipc[i].count=1; afterbydstport_ipc[i].utime = atol(timet); after_log_flag=1; } pthread_mutex_unlock(&After_By_Dst_Port_Mutex); Sagan_File_Unlock(config->shm_after_by_dstport); if ( rulestruct[b].after_count < afterbydstport_ipc[i].count ) { after_log_flag = 0; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "After SID %s by destination IP port. [%d]", afterbydstport_ipc[i].sid, ip_dstport_u32); } pthread_mutex_lock(&CounterMutex); counters->after_total++; pthread_mutex_unlock(&CounterMutex); } } } /* If not found, add it to the array */ if ( after_flag == 0 ) { if ( Sagan_Clean_IPC_Object(AFTER_BY_DSTPORT) == 0 ) { Sagan_File_Lock(config->shm_after_by_dstport); pthread_mutex_lock(&After_By_Dst_Port_Mutex); afterbydstport_ipc[counters_ipc->after_count_by_dstport].ipdstport = ip_dstport_u32; strlcpy(afterbydstport_ipc[counters_ipc->after_count_by_dstport].sid, rulestruct[b].s_sid, sizeof(afterbydstport_ipc[counters_ipc->after_count_by_dstport].sid)); afterbydstport_ipc[counters_ipc->after_count_by_dstport].count = 1; afterbydstport_ipc[counters_ipc->after_count_by_dstport].utime = atol(timet); afterbydstport_ipc[counters_ipc->after_count_by_dstport].expire = rulestruct[b].after_seconds; Sagan_File_Unlock(config->shm_after_by_dstport); Sagan_File_Lock(config->shm_counters); counters_ipc->after_count_by_dstport++; pthread_mutex_unlock(&After_By_Dst_Port_Mutex); Sagan_File_Unlock(config->shm_counters); } } } /* After by username */ if ( rulestruct[b].after_method == 3 && normalize_username[0] != '\0' ) { after_flag = 0; /* Check array for matching username / sid */ for (i = 0; i < counters_ipc->after_count_by_username; i++ ) { if ( !strcmp(afterbyusername_ipc[i].username, normalize_username) && !strcmp(afterbyusername_ipc[i].sid, rulestruct[b].s_sid )) { after_flag = 1; Sagan_File_Lock(config->shm_after_by_username); pthread_mutex_lock(&After_By_Username_Mutex); afterbyusername_ipc[i].count++; after_oldtime = atol(timet) - afterbyusername_ipc[i].utime; afterbyusername_ipc[i].utime = atol(timet); if ( after_oldtime > rulestruct[b].after_seconds ) { afterbyusername_ipc[i].count=1; afterbyusername_ipc[i].utime = atol(timet); after_log_flag=1; } pthread_mutex_unlock(&After_By_Username_Mutex); Sagan_File_Unlock(config->shm_after_by_username); if ( rulestruct[b].after_count < afterbyusername_ipc[i].count ) { after_log_flag = 0; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "After SID %s by_username. [%s]", afterbydst_ipc[i].sid, normalize_username); } pthread_mutex_lock(&CounterMutex); counters->after_total++; pthread_mutex_unlock(&CounterMutex); } } } /* If not found, add to the username array */ if ( after_flag == 0 ) { if ( Sagan_Clean_IPC_Object(AFTER_BY_DST) == 0 ) { Sagan_File_Lock(config->shm_after_by_username); pthread_mutex_lock(&After_By_Username_Mutex); strlcpy(afterbyusername_ipc[counters_ipc->after_count_by_username].username, normalize_username, sizeof(afterbyusername_ipc[counters_ipc->after_count_by_username].username)); strlcpy(afterbyusername_ipc[counters_ipc->after_count_by_username].sid, rulestruct[b].s_sid, sizeof(afterbyusername_ipc[counters_ipc->after_count_by_username].sid)); afterbyusername_ipc[counters_ipc->after_count_by_username].count = 1; afterbyusername_ipc[counters_ipc->after_count_by_username].utime = atol(timet); afterbyusername_ipc[counters_ipc->after_count_by_username].expire = rulestruct[b].after_seconds; Sagan_File_Unlock(config->shm_after_by_username); Sagan_File_Lock(config->shm_counters); counters_ipc->after_count_by_username++; pthread_mutex_unlock(&After_By_Username_Mutex); Sagan_File_Unlock(config->shm_counters); } } } } /* End of After */ thresh_log_flag = 0; /*********************************************************/ /* Thresh holding */ /*********************************************************/ if ( rulestruct[b].threshold_type != 0 && after_log_flag == 0) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); /* Thresholding by source IP address */ if ( rulestruct[b].threshold_method == 1 ) { thresh_flag = 0; /* Check array for matching src / sid */ for (i = 0; i < counters_ipc->thresh_count_by_src; i++ ) { if ( threshbysrc_ipc[i].ipsrc == ip_src_u32 && !strcmp(threshbysrc_ipc[i].sid, rulestruct[b].s_sid )) { thresh_flag=1; Sagan_File_Lock(config->shm_thresh_by_src); pthread_mutex_lock(&Thresh_By_Src_Mutex); threshbysrc_ipc[i].count++; thresh_oldtime = atol(timet) - threshbysrc_ipc[i].utime; threshbysrc_ipc[i].utime = atol(timet); if ( thresh_oldtime > rulestruct[b].threshold_seconds ) { threshbysrc_ipc[i].count=1; threshbysrc_ipc[i].utime = atol(timet); thresh_log_flag=0; } pthread_mutex_unlock(&Thresh_By_Src_Mutex); Sagan_File_Unlock(config->shm_thresh_by_src); if ( rulestruct[b].threshold_count < threshbysrc_ipc[i].count ) { thresh_log_flag = 1; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "Threshold SID %s by source IP address. [%s]", threshbysrc_ipc[i].sid, ip_src); } pthread_mutex_lock(&CounterMutex); counters->threshold_total++; pthread_mutex_unlock(&CounterMutex); } } } /* If not found, add it to the array */ if ( thresh_flag == 0 ) { if ( Sagan_Clean_IPC_Object(THRESH_BY_SRC) == 0 ) { Sagan_File_Lock(config->shm_thresh_by_src); pthread_mutex_lock(&Thresh_By_Src_Mutex); threshbysrc_ipc[counters_ipc->thresh_count_by_src].ipsrc = ip_src_u32; strlcpy(threshbysrc_ipc[counters_ipc->thresh_count_by_src].sid, rulestruct[b].s_sid, sizeof(threshbysrc_ipc[counters_ipc->thresh_count_by_src].sid)); threshbysrc_ipc[counters_ipc->thresh_count_by_src].count = 1; threshbysrc_ipc[counters_ipc->thresh_count_by_src].utime = atol(timet); threshbysrc_ipc[counters_ipc->thresh_count_by_src].expire = rulestruct[b].threshold_seconds; Sagan_File_Unlock(config->shm_thresh_by_src); Sagan_File_Lock(config->shm_counters); counters_ipc->thresh_count_by_src++; pthread_mutex_unlock(&Thresh_By_Src_Mutex); Sagan_File_Unlock(config->shm_counters); } } } /* Thresholding by destination IP address */ if ( rulestruct[b].threshold_method == 2 ) { thresh_flag = 0; /* Check array for matching src / sid */ for (i = 0; i < counters_ipc->thresh_count_by_dst; i++ ) { if ( threshbydst_ipc[i].ipdst == ip_dst_u32 && !strcmp(threshbydst_ipc[i].sid, rulestruct[b].s_sid )) { thresh_flag=1; Sagan_File_Lock(config->shm_thresh_by_dst); pthread_mutex_lock(&Thresh_By_Dst_Mutex); threshbydst_ipc[i].count++; thresh_oldtime = atol(timet) - threshbydst_ipc[i].utime; threshbydst_ipc[i].utime = atol(timet); if ( thresh_oldtime > rulestruct[b].threshold_seconds ) { threshbydst_ipc[i].count=1; threshbydst_ipc[i].utime = atol(timet); thresh_log_flag=0; } pthread_mutex_unlock(&Thresh_By_Src_Mutex); Sagan_File_Unlock(config->shm_thresh_by_dst); if ( rulestruct[b].threshold_count < threshbydst_ipc[i].count ) { thresh_log_flag = 1; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "Threshold SID %s by destination IP address. [%s]", threshbydst_ipc[i].sid, ip_dst); } pthread_mutex_lock(&CounterMutex);; counters->threshold_total++; pthread_mutex_unlock(&CounterMutex); } } } /* If not found, add it to the array */ if ( thresh_flag == 0 ) { if ( Sagan_Clean_IPC_Object(THRESH_BY_DST) == 0 ) { Sagan_File_Lock(config->shm_thresh_by_dst); pthread_mutex_lock(&Thresh_By_Src_Mutex); threshbydst_ipc[counters_ipc->thresh_count_by_dst].ipdst = ip_dst_u32; strlcpy(threshbydst_ipc[counters_ipc->thresh_count_by_dst].sid, rulestruct[b].s_sid, sizeof(threshbydst_ipc[counters_ipc->thresh_count_by_dst].sid)); threshbydst_ipc[counters_ipc->thresh_count_by_dst].count = 1; threshbydst_ipc[counters_ipc->thresh_count_by_dst].utime = atol(timet); threshbydst_ipc[counters_ipc->thresh_count_by_dst].expire = rulestruct[b].threshold_seconds; Sagan_File_Unlock(config->shm_thresh_by_dst); Sagan_File_Lock(config->shm_counters); counters_ipc->thresh_count_by_dst++; pthread_mutex_unlock(&Thresh_By_Src_Mutex); Sagan_File_Unlock(config->shm_counters); } } } /* Thresholding by source IP port */ if ( rulestruct[b].threshold_method == 4 ) { thresh_flag = 0; /* Check array for matching src / sid */ for (i = 0; i < counters_ipc->thresh_count_by_srcport; i++ ) { if ( threshbysrcport_ipc[i].ipsrcport == ip_srcport_u32 && !strcmp(threshbysrcport_ipc[i].sid, rulestruct[b].s_sid )) { thresh_flag=1; Sagan_File_Lock(config->shm_thresh_by_srcport); pthread_mutex_lock(&Thresh_By_Src_Port_Mutex); threshbysrcport_ipc[i].count++; thresh_oldtime = atol(timet) - threshbysrcport_ipc[i].utime; threshbysrcport_ipc[i].utime = atol(timet); if ( thresh_oldtime > rulestruct[b].threshold_seconds ) { threshbysrcport_ipc[i].count=1; threshbysrcport_ipc[i].utime = atol(timet); thresh_log_flag=0; } pthread_mutex_unlock(&Thresh_By_Src_Port_Mutex); Sagan_File_Unlock(config->shm_thresh_by_srcport); if ( rulestruct[b].threshold_count < threshbysrcport_ipc[i].count ) { thresh_log_flag = 1; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "Threshold SID %s by source IP port. [%s]", threshbydstport_ipc[i].sid, ip_dstport_u32); } pthread_mutex_lock(&CounterMutex);; counters->threshold_total++; pthread_mutex_unlock(&CounterMutex); } } } /* If not found, add it to the array */ if ( thresh_flag == 0 ) { if ( Sagan_Clean_IPC_Object(THRESH_BY_SRCPORT) == 0 ) { Sagan_File_Lock(config->shm_thresh_by_srcport); pthread_mutex_lock(&Thresh_By_Src_Port_Mutex); threshbysrcport_ipc[counters_ipc->thresh_count_by_srcport].ipsrcport = ip_srcport_u32; strlcpy(threshbysrcport_ipc[counters_ipc->thresh_count_by_srcport].sid, rulestruct[b].s_sid, sizeof(threshbysrcport_ipc[counters_ipc->thresh_count_by_srcport].sid)); threshbysrcport_ipc[counters_ipc->thresh_count_by_srcport].count = 1; threshbysrcport_ipc[counters_ipc->thresh_count_by_srcport].utime = atol(timet); threshbysrcport_ipc[counters_ipc->thresh_count_by_srcport].expire = rulestruct[b].threshold_seconds; Sagan_File_Unlock(config->shm_thresh_by_srcport); Sagan_File_Lock(config->shm_counters); counters_ipc->thresh_count_by_srcport++; pthread_mutex_unlock(&Thresh_By_Src_Port_Mutex); Sagan_File_Unlock(config->shm_counters); } } } /* Thresholding by destination IP port */ if ( rulestruct[b].threshold_method == 5 ) { thresh_flag = 0; /* Check array for matching src / sid */ for (i = 0; i < counters_ipc->thresh_count_by_dstport; i++ ) { if ( threshbydstport_ipc[i].ipdstport == ip_dstport_u32 && !strcmp(threshbydstport_ipc[i].sid, rulestruct[b].s_sid )) { thresh_flag=1; Sagan_File_Lock(config->shm_thresh_by_dstport); pthread_mutex_lock(&Thresh_By_Dst_Port_Mutex); threshbydstport_ipc[i].count++; thresh_oldtime = atol(timet) - threshbydstport_ipc[i].utime; threshbydstport_ipc[i].utime = atol(timet); if ( thresh_oldtime > rulestruct[b].threshold_seconds ) { threshbydstport_ipc[i].count=1; threshbydstport_ipc[i].utime = atol(timet); thresh_log_flag=0; } pthread_mutex_unlock(&Thresh_By_Dst_Port_Mutex); Sagan_File_Unlock(config->shm_thresh_by_dstport); if ( rulestruct[b].threshold_count < threshbydstport_ipc[i].count ) { thresh_log_flag = 1; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "Threshold SID %s by destination IP PORT. [%s]", threshbydstport_ipc[i].sid, ip_dstport_u32); } pthread_mutex_lock(&CounterMutex);; counters->threshold_total++; pthread_mutex_unlock(&CounterMutex); } } } /* If not found, add it to the array */ if ( thresh_flag == 0 ) { if ( Sagan_Clean_IPC_Object(THRESH_BY_DSTPORT) == 0 ) { Sagan_File_Lock(config->shm_thresh_by_dstport); pthread_mutex_lock(&Thresh_By_Dst_Port_Mutex); threshbydstport_ipc[counters_ipc->thresh_count_by_dstport].ipdstport = ip_dstport_u32; strlcpy(threshbydstport_ipc[counters_ipc->thresh_count_by_dstport].sid, rulestruct[b].s_sid, sizeof(threshbydstport_ipc[counters_ipc->thresh_count_by_dstport].sid)); threshbydstport_ipc[counters_ipc->thresh_count_by_dstport].count = 1; threshbydstport_ipc[counters_ipc->thresh_count_by_dstport].utime = atol(timet); threshbydstport_ipc[counters_ipc->thresh_count_by_dstport].expire = rulestruct[b].threshold_seconds; Sagan_File_Unlock(config->shm_thresh_by_dstport); Sagan_File_Lock(config->shm_counters); counters_ipc->thresh_count_by_dstport++; pthread_mutex_unlock(&Thresh_By_Dst_Port_Mutex); Sagan_File_Unlock(config->shm_counters); } } } if ( rulestruct[b].threshold_method == 3 && normalize_username[0] != '\0' ) { thresh_flag = 0; /* Check array fror matching username / sid */ for (i = 0; i < counters_ipc->thresh_count_by_username; i++) { if ( !strcmp(threshbyusername_ipc[i].username, normalize_username) && !strcmp(threshbyusername_ipc[i].sid, rulestruct[b].s_sid )) { thresh_flag=1; Sagan_File_Lock(config->shm_thresh_by_username); pthread_mutex_lock(&Thresh_By_Username_Mutex); threshbyusername_ipc[i].count++; thresh_oldtime = atol(timet) - threshbyusername_ipc[i].utime; threshbyusername_ipc[i].utime = atol(timet); if ( thresh_oldtime > rulestruct[b].threshold_seconds ) { threshbyusername_ipc[i].count=1; threshbyusername_ipc[i].utime = atol(timet); thresh_log_flag=0; } pthread_mutex_unlock(&Thresh_By_Username_Mutex); Sagan_File_Unlock(config->shm_thresh_by_username); if ( rulestruct[b].threshold_count < threshbyusername_ipc[i].count ) { thresh_log_flag = 1; if ( debug->debuglimits ) { Sagan_Log(S_NORMAL, "Threshold SID %s by_username. [%s]", threshbyusername_ipc[i].sid, normalize_username); } pthread_mutex_lock(&CounterMutex);; counters->threshold_total++; pthread_mutex_unlock(&CounterMutex); } } } /* Username not found, add it to array */ if ( thresh_flag == 0 ) { Sagan_File_Lock(config->shm_thresh_by_username); pthread_mutex_lock(&Thresh_By_Username_Mutex); strlcpy(threshbyusername_ipc[counters_ipc->thresh_count_by_username].username, normalize_username, sizeof(threshbyusername_ipc[counters_ipc->thresh_count_by_username].username)); strlcpy(threshbyusername_ipc[counters_ipc->thresh_count_by_username].sid, rulestruct[b].s_sid, sizeof(threshbyusername_ipc[counters_ipc->thresh_count_by_username].sid)); threshbyusername_ipc[counters_ipc->thresh_count_by_username].count = 1; threshbyusername_ipc[counters_ipc->thresh_count_by_username].utime = atol(timet); threshbyusername_ipc[counters_ipc->thresh_count_by_username].expire = rulestruct[b].threshold_seconds; Sagan_File_Unlock(config->shm_thresh_by_username); // if ( config->max_threshold_by_username < counters_ipc->thresh_count_by_username ) { // Sagan_Log(S_WARN, "[%s, line %d] Max 'threshold_by_username' of %d has been reached! Consider increasing 'threshold_by_username'!", __FILE__, __LINE__, config->max_threshold_by_username ); // pthread_mutex_unlock(&Thresh_By_Username_Mutex); // } else { Sagan_File_Lock(config->shm_counters); counters_ipc->thresh_count_by_username++; pthread_mutex_unlock(&Thresh_By_Username_Mutex); Sagan_File_Unlock(config->shm_counters); // } } } } /* End of thresholding */ pthread_mutex_lock(&CounterMutex); counters->saganfound++; pthread_mutex_unlock(&CounterMutex); /* Check for thesholding & "after" */ if ( thresh_log_flag == 0 && after_log_flag == 0 ) { if ( debug->debugengine ) { Sagan_Log(S_DEBUG, "[%s, line %d] **[Trigger]*********************************", __FILE__, __LINE__); Sagan_Log(S_DEBUG, "[%s, line %d] Program: %s | Facility: %s | Priority: %s | Level: %s | Tag: %s", __FILE__, __LINE__, SaganProcSyslog_LOCAL->syslog_program, SaganProcSyslog_LOCAL->syslog_facility, SaganProcSyslog_LOCAL->syslog_priority, SaganProcSyslog_LOCAL->syslog_level, SaganProcSyslog_LOCAL->syslog_tag); Sagan_Log(S_DEBUG, "[%s, line %d] Threshold flag: %d | After flag: %d | Flowbit Flag: %d | Flowbit status: %d", __FILE__, __LINE__, thresh_log_flag, after_log_flag, rulestruct[b].flowbit_flag, flowbit_return); Sagan_Log(S_DEBUG, "[%s, line %d] Triggering Message: %s", __FILE__, __LINE__, SaganProcSyslog_LOCAL->syslog_message); } if ( rulestruct[b].flowbit_flag && rulestruct[b].flowbit_set_count ) Sagan_Flowbit_Set(b, ip_src, ip_dst); threadid++; if ( threadid >= MAX_THREADS ) { threadid=0; } /* We can't use the pointers from our syslog data. If two (or more) event's * fire at the same time, the two alerts will have corrupted information * (due to threading). So we populate the SaganEvent[threadid] with the * var[msgslot] information. - Champ Clark 02/02/2011 */ /* The above is wrong. Need to use static __thread - Champ Clark 12/21/2015 */ processor_info_engine->processor_name = s_msg; processor_info_engine->processor_generator_id = SAGAN_PROCESSOR_GENERATOR_ID; processor_info_engine->processor_facility = SaganProcSyslog_LOCAL->syslog_facility; processor_info_engine->processor_priority = SaganProcSyslog_LOCAL->syslog_level; processor_info_engine->processor_pri = rulestruct[b].s_pri; processor_info_engine->processor_class = rulestruct[b].s_classtype; processor_info_engine->processor_tag = SaganProcSyslog_LOCAL->syslog_tag; processor_info_engine->processor_rev = rulestruct[b].s_rev; processor_info_engine_dst_port = normalize_dst_port; processor_info_engine_src_port = normalize_src_port; processor_info_engine_proto = proto; processor_info_engine_alertid = atoi(rulestruct[b].s_sid); if ( rulestruct[b].flowbit_flag == 0 || rulestruct[b].flowbit_noalert == 0 ) { Sagan_Send_Alert(SaganProcSyslog_LOCAL, processor_info_engine, ip_src, ip_dst, normalize_http_uri, normalize_http_hostname, processor_info_engine_proto, processor_info_engine_alertid, processor_info_engine_src_port, processor_info_engine_dst_port, b ); } } /* Threshold / After */ #ifdef WITH_BLUEDOT } /* Bluedot */ } } } #endif } /* Bro Intel */ } /* Blacklist */ #ifdef HAVE_LIBMAXMINDDB } /* GeoIP2 */ #endif } /* Time based alerts */ } /* Flowbit */ } /* Check Rule Flow */ } /* End of match */ } /* End of pcre match */ #ifdef HAVE_LIBMAXMINDDB geoip2_isset = 0; #endif match=0; /* Reset match! */ sagan_match=0; /* Reset pcre/meta_content/content match! */ rc=0; /* Return code */ flowbit_return=0; /* Flowbit reset */ check_flow_return=1; /* Rule flow direction reset */ } /* End for for loop */ free(processor_info_engine); return(0); } sagan-1.1.2/src/processors/sagan-report-clients.c0000644000175000017500000002523312770372750020763 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Adam Hall ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-report-clients.c * * Simple pre-processors that keeps track of reporting syslog clients/agents. * This is based off the IP address the clients, not based on normalization. * If a client/agent hasn't sent a syslog/event message in X minutes, then * generate an alert. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-send-alert.h" #include "sagan-track-clients.h" #include "sagan-report-clients.h" #include "sagan-config.h" struct _Sagan_Track_Clients_IPC *SaganTrackClients_ipc; struct _Sagan_IPC_Counters *counters_ipc; struct _SaganConfig *config; struct _Sagan_Processor_Info *processor_info_track_client = NULL; struct _Sagan_Proc_Syslog *SaganProcSyslog; /**************************************************************************** * Sagan_Track_Clients_Init - Initialize shared memory object for the * tracking client processor to use ****************************************************************************/ void Sagan_Track_Clients_Init ( void ) { processor_info_track_client = malloc(sizeof(struct _Sagan_Processor_Info)); if ( processor_info_track_client == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for processor_info_track_client. Abort!", __FILE__, __LINE__); } memset(processor_info_track_client, 0, sizeof(_Sagan_Processor_Info)); processor_info_track_client->processor_name = PROCESSOR_NAME; processor_info_track_client->processor_generator_id = PROCESSOR_GENERATOR_ID; processor_info_track_client->processor_name = PROCESSOR_NAME; processor_info_track_client->processor_facility = PROCESSOR_FACILITY; processor_info_track_client->processor_priority = PROCESSOR_PRIORITY; processor_info_track_client->processor_pri = PROCESSOR_PRI; processor_info_track_client->processor_class = PROCESSOR_CLASS; processor_info_track_client->processor_tag = PROCESSOR_TAG; processor_info_track_client->processor_rev = PROCESSOR_REV; } /**************************************************************************** * Sagan_Report_Clients - Main routine to "report" via IPC/memory IPs that * are reporting or not. ****************************************************************************/ void Sagan_Report_Clients ( void ) { for(;;) { struct _Sagan_Proc_Syslog *SaganProcSyslog_LOCAL = NULL; int alertid; int i; char *tmp_ip = NULL; char utime_tmp[20] = { 0 }; time_t t; struct tm *now; uintmax_t utime_u64; t = time(NULL); now=localtime(&t); strftime(utime_tmp, sizeof(utime_tmp), "%s", now); utime_u64 = atol(utime_tmp); int expired_time = config->pp_sagan_track_clients * 60; /* We populate this later for output plugins */ SaganProcSyslog_LOCAL = malloc(sizeof(struct _Sagan_Proc_Syslog)); if ( SaganProcSyslog_LOCAL == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganProcSyslog_LOCAL. Abort!", __FILE__, __LINE__); } /*********************************/ /* Look through "known" system */ for (i=0; itrack_clients_client_count; i++) { /* Check if host is in a down state */ if ( SaganTrackClients_ipc[i].status == 1 ) { /* If host was done, verify host last seen time is still not an expired time */ if ( ( utime_u64 - SaganTrackClients_ipc[i].utime ) < expired_time ) { /* Update status and seen time */ Sagan_File_Lock(config->shm_track_clients); SaganTrackClients_ipc[i].status = 0; Sagan_File_Unlock(config->shm_track_clients); /* Update counters */ Sagan_File_Lock(config->shm_counters); counters_ipc->track_clients_down--; Sagan_File_Unlock(config->shm_counters); tmp_ip = Bit2IP(SaganTrackClients_ipc[i].host_u32); Sagan_Log(S_WARN, "[Processor: %s] Logs are being received from %s again.", PROCESSOR_NAME, tmp_ip ); /* Populate SaganProcSyslog_LOCAL for output plugins */ strlcpy(SaganProcSyslog_LOCAL->syslog_host, tmp_ip, sizeof(SaganProcSyslog_LOCAL->syslog_host)); strlcpy(SaganProcSyslog_LOCAL->syslog_facility, PROCESSOR_FACILITY, sizeof(SaganProcSyslog_LOCAL->syslog_facility)); strlcpy(SaganProcSyslog_LOCAL->syslog_priority, PROCESSOR_PRIORITY, sizeof(SaganProcSyslog_LOCAL->syslog_priority)); strlcpy(SaganProcSyslog_LOCAL->syslog_level, "info", sizeof(SaganProcSyslog_LOCAL->syslog_level)); strlcpy(SaganProcSyslog_LOCAL->syslog_tag, "00", sizeof(SaganProcSyslog_LOCAL->syslog_tag)); strlcpy(SaganProcSyslog_LOCAL->syslog_program, PROCESSOR_NAME, sizeof(SaganProcSyslog_LOCAL->syslog_program)); snprintf(SaganProcSyslog_LOCAL->syslog_date, sizeof(SaganProcSyslog_LOCAL->syslog_date), "%s", Sagan_Return_Date(utime_u64)); snprintf(SaganProcSyslog_LOCAL->syslog_time, sizeof(SaganProcSyslog_LOCAL->syslog_time), "%s", Sagan_Return_Time(utime_u64)); snprintf(SaganProcSyslog_LOCAL->syslog_message, sizeof(SaganProcSyslog_LOCAL->syslog_message)-1, "The IP address %s was previously not sending logs. The system appears to be sending logs again at %s", tmp_ip, ctime(&SaganTrackClients_ipc[i].utime) ); alertid=101; /* See gen-msg.map */ /* Send alert to output plugins */ Sagan_Send_Alert(SaganProcSyslog_LOCAL, processor_info_track_client, SaganProcSyslog_LOCAL->syslog_host, config->sagan_host, "\0", "\0", config->sagan_proto, alertid, config->sagan_port, config->sagan_port, 0); } /* End last seen check time */ } else { /**** Check if last seen time of host has exceeded track time meaning it's down! ****/ if ( ( utime_u64 - SaganTrackClients_ipc[i].utime ) >= expired_time ) { /* Update status and utime */ Sagan_File_Lock(config->shm_track_clients); SaganTrackClients_ipc[i].status = 1; Sagan_File_Unlock(config->shm_track_clients); /* Update counters */ Sagan_File_Lock(config->shm_counters); counters_ipc->track_clients_down++; Sagan_File_Unlock(config->shm_counters); tmp_ip = Bit2IP(SaganTrackClients_ipc[i].host_u32); Sagan_Log(S_WARN, "[Processor: %s] Logs have not been seen from %s for %d minute(s).", PROCESSOR_NAME, tmp_ip, config->pp_sagan_track_clients); /* Populate SaganProcSyslog_LOCAL for output plugins */ strlcpy(SaganProcSyslog_LOCAL->syslog_host, tmp_ip, sizeof(SaganProcSyslog_LOCAL->syslog_host)); strlcpy(SaganProcSyslog_LOCAL->syslog_facility, PROCESSOR_FACILITY, sizeof(SaganProcSyslog_LOCAL->syslog_facility)); strlcpy(SaganProcSyslog_LOCAL->syslog_priority, PROCESSOR_PRIORITY, sizeof(SaganProcSyslog_LOCAL->syslog_priority)); strlcpy(SaganProcSyslog_LOCAL->syslog_level, "info", sizeof(SaganProcSyslog_LOCAL->syslog_level)); strlcpy(SaganProcSyslog_LOCAL->syslog_tag, "00", sizeof(SaganProcSyslog_LOCAL->syslog_tag)); strlcpy(SaganProcSyslog_LOCAL->syslog_program, PROCESSOR_NAME, sizeof(SaganProcSyslog_LOCAL->syslog_program)); snprintf(SaganProcSyslog_LOCAL->syslog_date, sizeof(SaganProcSyslog_LOCAL->syslog_date), "%s", Sagan_Return_Date(utime_u64)); snprintf(SaganProcSyslog_LOCAL->syslog_time, sizeof(SaganProcSyslog_LOCAL->syslog_time), "%s", Sagan_Return_Time(utime_u64)); snprintf(SaganProcSyslog_LOCAL->syslog_message, sizeof(SaganProcSyslog_LOCAL->syslog_message)-1, "Sagan has not recieved any logs from the IP address %s in over %d minute(s). Last log was seen at %s. This could be an indication that the system is down.", tmp_ip, config->pp_sagan_track_clients, ctime(&SaganTrackClients_ipc[i].utime) ); alertid=100; /* See gen-msg.map */ /* Send alert to output plugins */ Sagan_Send_Alert(SaganProcSyslog_LOCAL, processor_info_track_client, SaganProcSyslog_LOCAL->syslog_host, config->sagan_host, "\0", "\0", config->sagan_proto, alertid, config->sagan_port, config->sagan_port, 0); } /* End of existing utime check */ } /* End of else */ } /* End for 'for' loop */ free(SaganProcSyslog_LOCAL); sleep(60); } /* End Ifinite Loop */ } /* End Sagan_report_clients */ sagan-1.1.2/src/processors/sagan-perfmon.h0000644000175000017500000000201412770372750017454 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ void Sagan_Perfmonitor_Handler( void ); void Sagan_Perfmonitor_Open( void ); void Sagan_Perfmonitor_Close( void ); sagan-1.1.2/src/processors/sagan-bluedot.h0000644000175000017500000000670412770372750017456 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-bluedot.h * * Does real time lookups of IP addresses from the Quadrant reputation * database. This means you have to have authentication! * */ #ifdef WITH_BLUEDOT #define BLUEDOT_PROCESSOR_USER_AGENT "User-Agent: Sagan-SIEM" /* Extensions on URL passed depending on what type of query we want to do */ #define BLUEDOT_IP_LOOKUP_URL "&qip=" #define BLUEDOT_HASH_LOOKUP_URL "&qhash=" #define BLUEDOT_FILENAME_LOOKUP_URL "&qfilename=" #define BLUEDOT_URL_LOOKUP_URL "&qurl=" #define BLUEDOT_LOOKUP_IP 1 #define BLUEDOT_LOOKUP_HASH 2 #define BLUEDOT_LOOKUP_URL 3 #define BLUEDOT_LOOKUP_FILENAME 4 int Sagan_Bluedot_Cat_Compare ( unsigned char, int, unsigned char ); int Sagan_Bluedot ( _SaganProcSyslog *, int ); unsigned char Sagan_Bluedot_Lookup(char *, unsigned char, int); /* what to lookup, lookup type */ int Sagan_Bluedot_IP_Lookup_All(char *, int); void Sagan_Bluedot_Clean_Cache ( void ); void Sagan_Bluedot_Init(void); void Sagan_Bluedot_Load_Cat(void); void Sagan_Verify_Categories( char *, int , const char *, int, unsigned char ); void Sagan_Bluedot_Check_Cache_Time (void); int Sagan_Bluedot_Clean_Queue ( char *, unsigned char ); typedef struct _Sagan_Bluedot_Cat_List _Sagan_Bluedot_Cat_List; struct _Sagan_Bluedot_Cat_List { int cat_number; char cat[50]; }; typedef struct _Sagan_Bluedot_IP_Cache _Sagan_Bluedot_IP_Cache; struct _Sagan_Bluedot_IP_Cache { uint32_t host; uintmax_t mdate_utime; uintmax_t cdate_utime; uintmax_t cache_utime; int alertid; }; typedef struct _Sagan_Bluedot_Hash_Cache _Sagan_Bluedot_Hash_Cache; struct _Sagan_Bluedot_Hash_Cache { char hash[MD5_HASH_SIZE+1]; uintmax_t cache_utime; int alertid; }; typedef struct _Sagan_Bluedot_URL_Cache _Sagan_Bluedot_URL_Cache; struct _Sagan_Bluedot_URL_Cache { char url[8192]; uintmax_t cache_utime; int alertid; }; typedef struct _Sagan_Bluedot_Filename_Cache _Sagan_Bluedot_Filename_Cache; struct _Sagan_Bluedot_Filename_Cache { char filename[256]; uintmax_t cache_utime; int alertid; }; typedef struct _Sagan_Bluedot_IP_Queue _Sagan_Bluedot_IP_Queue; struct _Sagan_Bluedot_IP_Queue { uint32_t host; }; typedef struct _Sagan_Bluedot_Hash_Queue _Sagan_Bluedot_Hash_Queue; struct _Sagan_Bluedot_Hash_Queue { char hash[MD5_HASH_SIZE+1]; }; typedef struct _Sagan_Bluedot_URL_Queue _Sagan_Bluedot_URL_Queue; struct _Sagan_Bluedot_URL_Queue { char url[8192]; }; typedef struct _Sagan_Bluedot_Filename_Queue _Sagan_Bluedot_Filename_Queue; struct _Sagan_Bluedot_Filename_Queue { char filename[256]; }; #endif sagan-1.1.2/src/processors/sagan-engine.h0000644000175000017500000000242612770372750017262 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #define SAGAN_PROCESSOR_NAME "Sagan_Engine" #define SAGAN_PROCESSOR_FACILITY "daemon" #define SAGAN_PROCESSOR_PRIORITY "warning" #define SAGAN_PROCESSOR_PRI 1 #define SAGAN_PROCESSOR_CLASS "Sagan_Engine" #define SAGAN_PROCESSOR_REV "1" #define SAGAN_PROCESSOR_TAG NULL #define SAGAN_PROCESSOR_GENERATOR_ID 1 int Sagan_Engine ( _SaganProcSyslog * ); void Sagan_Engine_Init ( void ); sagan-1.1.2/src/processors/sagan-track-clients.h0000644000175000017500000000263012770372750020555 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Adam Hall ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-track-clients.h * * Simple pre-processors that keeps track of reporting syslog clients/agents. * This is based off the IP address the clients, not based on normalization. * If a client/agent hasn't sent a syslog/event message in X minutes, then * generate an alert. * */ typedef struct _Sagan_Track_Clients_IPC _Sagan_Track_Clients_IPC; struct _Sagan_Track_Clients_IPC { uint32_t host_u32; long utime; int expire; sbool status; }; int Sagan_Track_Clients ( uint32_t host_u32 ); sagan-1.1.2/src/processors/sagan-bluedot.c0000644000175000017500000014675412770372750017463 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-bluedot.c * * Does real time lookups of IP addresses from the Quadrant reputation * database. This means you have to have authentication! * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef WITH_BLUEDOT #include #include #include #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-config.h" #include "sagan-rules.h" #include "sagan-bluedot.h" #include "parsers/parsers.h" struct _SaganCounters *counters; struct _SaganConfig *config; struct _SaganDebug *debug; struct _Sagan_Bluedot_IP_Cache *SaganBluedotIPCache; struct _Sagan_Bluedot_Hash_Cache *SaganBluedotHashCache; struct _Sagan_Bluedot_URL_Cache *SaganBluedotURLCache; struct _Sagan_Bluedot_Filename_Cache *SaganBluedotFilenameCache; struct _Sagan_Bluedot_Cat_List *SaganBluedotCatList; struct _Sagan_Bluedot_IP_Queue *SaganBluedotIPQueue; struct _Sagan_Bluedot_Hash_Queue *SaganBluedotHashQueue; struct _Sagan_Bluedot_URL_Queue *SaganBluedotURLQueue; struct _Sagan_Bluedot_Filename_Queue *SaganBluedotFilenameQueue; struct _Rule_Struct *rulestruct; pthread_mutex_t SaganProcBluedotWorkMutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t SaganProcBluedotIPWorkMutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t SaganProcBluedotHashWorkMutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t SaganProcBluedotURLWorkMutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t SaganProcBluedotFilenameWorkMutex=PTHREAD_MUTEX_INITIALIZER; sbool bluedot_cache_clean_lock=0; int bluedot_ip_queue=0; int bluedot_hash_queue=0; int bluedot_url_queue=0; int bluedot_filename_queue=0; /**************************************************************************** * Sagan_Bluedot_Init() - init's some global variables and other items * that need to be done only once. - Champ Clark 05/15/2013 ****************************************************************************/ void Sagan_Bluedot_Init(void) { char timet[20] = { 0 }; time_t t; struct tm *now = NULL; t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); /* Bluedot IP Cache */ SaganBluedotIPCache = malloc(config->bluedot_max_cache * sizeof(struct _Sagan_Bluedot_IP_Cache)); if ( SaganBluedotIPCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganBluedotIPCache. Abort!", __FILE__, __LINE__); } memset(SaganBluedotIPCache, 0, sizeof(_Sagan_Bluedot_IP_Cache)); /* Bluedot Hash Cache */ SaganBluedotHashCache = malloc(config->bluedot_max_cache * sizeof(struct _Sagan_Bluedot_Hash_Cache)); if ( SaganBluedotHashCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganBluedotHashCache. Abort!", __FILE__, __LINE__); } memset(SaganBluedotHashCache, 0, sizeof(_Sagan_Bluedot_Hash_Cache)); /* Bluedot URL Cache */ SaganBluedotURLCache = malloc(config->bluedot_max_cache * sizeof(struct _Sagan_Bluedot_URL_Cache)); if ( SaganBluedotURLCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganBluedotURLCache. Abort!", __FILE__, __LINE__); } memset(SaganBluedotURLCache, 0, sizeof(_Sagan_Bluedot_URL_Cache)); /* Bluedot Filename Cache */ SaganBluedotFilenameCache = malloc(config->bluedot_max_cache * sizeof(struct _Sagan_Bluedot_Filename_Cache)); if ( SaganBluedotFilenameCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganBluedotFilenameCache. Abort!", __FILE__, __LINE__); } memset(SaganBluedotFilenameCache, 0, sizeof(_Sagan_Bluedot_Filename_Cache)); /* Bluedot Catlist */ SaganBluedotCatList = malloc(sizeof(_Sagan_Bluedot_Cat_List)); if ( SaganBluedotCatList == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganBluedotCatList. Abort!", __FILE__, __LINE__); } memset(SaganBluedotCatList, 0, sizeof(_Sagan_Bluedot_Cat_List)); /* Bluedot IP Queue */ SaganBluedotIPQueue = malloc(sizeof(_Sagan_Bluedot_IP_Queue)); if ( SaganBluedotIPQueue == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganBluedotIPQueue. Abort!", __FILE__, __LINE__); } memset(SaganBluedotIPQueue, 0, sizeof(_Sagan_Bluedot_IP_Queue)); /* Bluedot Hash Queue */ SaganBluedotHashQueue = malloc(sizeof(_Sagan_Bluedot_Hash_Queue)); if ( SaganBluedotHashQueue == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganBluedotHashQueue. Abort!", __FILE__, __LINE__); } memset(SaganBluedotHashQueue, 0, sizeof(_Sagan_Bluedot_Hash_Queue)); /* Bluedot Filename Queue */ SaganBluedotFilenameQueue = malloc(sizeof(_Sagan_Bluedot_Filename_Queue)); if ( SaganBluedotFilenameQueue == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganBluedotFilenameQueue. Abort!", __FILE__, __LINE__); } memset(SaganBluedotHashQueue, 0, sizeof(_Sagan_Bluedot_Hash_Queue)); /* Bluedot URL Queue */ SaganBluedotURLQueue = malloc(sizeof(_Sagan_Bluedot_URL_Queue)); if ( SaganBluedotURLQueue == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganBluedotFilenameQueue. Abort!", __FILE__, __LINE__); } config->bluedot_last_time = atol(timet); } /**************************************************************************** * Sagan_Bluedot_Clean_Queue - Clean's the "queue" of the type of lookup * that happened. This is called after a successful lookup. We do this to * prevent multiple lookups (at the same time!) of the same item! This * happens a lot with IP address looks ****************************************************************************/ int Sagan_Bluedot_Clean_Queue ( char *data, unsigned char type ) { uint32_t ip_u32; int i=0; int tmp_bluedot_queue_count=0; /* Remove IP address from lookup queue */ if ( type == BLUEDOT_LOOKUP_IP ) { ip_u32 = IP2Bit(data); /* Convert "data" to u32 int. */ struct _Sagan_Bluedot_IP_Queue *TmpSaganBluedotIPQueue; TmpSaganBluedotIPQueue = malloc(sizeof(_Sagan_Bluedot_IP_Queue)); if ( TmpSaganBluedotIPQueue == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for TmpSaganBluedotIPQueue. Abort!", __FILE__, __LINE__); } memset(TmpSaganBluedotIPQueue, 0, sizeof(_Sagan_Bluedot_IP_Queue)); for (i=0; ibluedot_cat, "r" )) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] No Bluedot categories list to load (%s)!", __FILE__, __LINE__, config->bluedot_cat); } while(fgets(buf, 1024, bluedot_cat_file) != NULL) { /* Skip comments and blank linkes */ if (buf[0] == '#' || buf[0] == 10 || buf[0] == ';' || buf[0] == 32) { continue; } else { /* Allocate memory for references, not comments */ SaganBluedotCatList = (_Sagan_Bluedot_Cat_List *) realloc(SaganBluedotCatList, (counters->bluedot_cat_count+1) * sizeof(_Sagan_Bluedot_Cat_List)); if ( SaganBluedotCatList == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for SaganBluedotCatList. Abort!", __FILE__, __LINE__); } /* Normalize the list for later use. Better to do this here than when processing rules */ bluedot_tok1 = Remove_Return(strtok_r(buf, "|", &saveptr)); if ( bluedot_tok1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Bluedot categories file appears to be malformed.", __FILE__, __LINE__); } Remove_Spaces(bluedot_tok1); SaganBluedotCatList[counters->bluedot_cat_count].cat_number = atoi(bluedot_tok1); bluedot_tok2 = Remove_Return(strtok_r(NULL, "|", &saveptr)); if ( bluedot_tok2 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Bluedot categories file appears to be malformed.", __FILE__, __LINE__); } Remove_Return(bluedot_tok2); Remove_Spaces(bluedot_tok2); To_LowerC(bluedot_tok2); strlcpy(SaganBluedotCatList[counters->bluedot_cat_count].cat, bluedot_tok2, sizeof(SaganBluedotCatList[counters->bluedot_cat_count].cat)); counters->bluedot_cat_count++; } } } /**************************************************************************** * write_callback_func() - Callback for data received via libcurl ****************************************************************************/ size_t static write_callback_func(void *buffer, size_t size, size_t nmemb, void *userp) { char **response_ptr = (char**)userp; *response_ptr = strndup(buffer, (size_t)(size *nmemb)); /* Return the string */ } /**************************************************************************** * Sagan_Bluedot_Clean_Cache() - Cleans cache. Remove old, stale entries * to make room for new, fresh entries :) ****************************************************************************/ void Sagan_Bluedot_Check_Cache_Time (void) { time_t t; struct tm *now = NULL; char timet[20] = { 0 }; t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); if (atol(timet) > config->bluedot_last_time + config->bluedot_timeout) { Sagan_Log(S_NORMAL, "Bluedot cache timeout reached %d minutes. Cleaning up.", config->bluedot_timeout / 60); if ( bluedot_cache_clean_lock == 0 ) { Sagan_Bluedot_Clean_Cache(); } } if ( counters->bluedot_ip_cache_count >= config->bluedot_max_cache ) { Sagan_Log(S_NORMAL, "[%s, line %d] Out of cache space! Considering increasing cache size!", __FILE__, __LINE__); } } /**************************************************************************** * Sagan_Bluedot_Clean_Cache - Cleans old Bluedot entries over the * specified "cache_timeout". ****************************************************************************/ void Sagan_Bluedot_Clean_Cache ( void ) { int i; int timeout_count=0; int deleted_count=0; char timet[20] = { 0 }; time_t t; struct tm *now=NULL; t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); struct _Sagan_Bluedot_IP_Cache *TmpSaganBluedotIPCache = NULL; struct _Sagan_Bluedot_Hash_Cache *TmpSaganBluedotHashCache = NULL; struct _Sagan_Bluedot_URL_Cache *TmpSaganBluedotURLCache = NULL; struct _Sagan_Bluedot_Filename_Cache *TmpSaganBluedotFilenameCache = NULL; if ( bluedot_cache_clean_lock == 0 ) { /* So no two threads try to "clean up" */ pthread_mutex_lock(&SaganProcBluedotWorkMutex); bluedot_cache_clean_lock = 1; if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] Sagan/Bluedot cache clean time has been reached.", __FILE__, __LINE__); Sagan_Log(S_DEBUG, "[%s, line %d] ----------------------------------------------------------------------", __FILE__, __LINE__); } config->bluedot_last_time = atol(timet); for (i=0; ibluedot_ip_cache_count; i++) { if ( atol(timet) - SaganBluedotIPCache[i].cache_utime > config->bluedot_timeout ) { if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] == Deleting IP address from cache -> %u", __FILE__, __LINE__, SaganBluedotIPCache[i].host); } } else { TmpSaganBluedotIPCache = (_Sagan_Bluedot_IP_Cache *) realloc(TmpSaganBluedotIPCache, (timeout_count+1) * sizeof(_Sagan_Bluedot_IP_Cache)); if ( TmpSaganBluedotIPCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for TmpSaganBluedotIPCache. Abort!", __FILE__, __LINE__); } TmpSaganBluedotIPCache[timeout_count].host = SaganBluedotIPCache[i].host; TmpSaganBluedotIPCache[timeout_count].cache_utime = SaganBluedotIPCache[i].cache_utime; TmpSaganBluedotIPCache[timeout_count].cache_utime = SaganBluedotIPCache[i].mdate_utime; TmpSaganBluedotIPCache[timeout_count].cache_utime = SaganBluedotIPCache[i].cdate_utime; TmpSaganBluedotIPCache[timeout_count].alertid = SaganBluedotIPCache[i].alertid; timeout_count++; } } for (i=0; ibluedot_ip_cache_count - (uintmax_t)timeout_count; counters->bluedot_ip_cache_count = (uintmax_t)timeout_count; Sagan_Log(S_NORMAL, "[%s, line %d] Deleted %d IP addresses from Bluedot cache.",__FILE__, __LINE__, deleted_count); /* Clean hash cache */ timeout_count = 0; for (i=0; ibluedot_hash_cache_count; i++) { if ( atol(timet) - SaganBluedotHashCache[i].cache_utime > config->bluedot_timeout ) { if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] == Deleting hash from cache -> %s", __FILE__, __LINE__, SaganBluedotHashCache[i].hash); } } else { TmpSaganBluedotHashCache = (_Sagan_Bluedot_Hash_Cache *) realloc(TmpSaganBluedotHashCache, (timeout_count+1) * sizeof(_Sagan_Bluedot_Hash_Cache)); if ( TmpSaganBluedotHashCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for TmpSaganBluedotHashCache. Abort!", __FILE__, __LINE__); } strlcpy(TmpSaganBluedotHashCache[timeout_count].hash, SaganBluedotHashCache[i].hash, sizeof(TmpSaganBluedotHashCache[timeout_count].hash)); TmpSaganBluedotHashCache[timeout_count].cache_utime = SaganBluedotHashCache[i].cache_utime; /* store utime */ TmpSaganBluedotHashCache[timeout_count].alertid = SaganBluedotHashCache[i].alertid; timeout_count++; } } for (i=0; ibluedot_hash_cache_count - (uintmax_t)timeout_count; counters->bluedot_hash_cache_count = (uintmax_t)timeout_count; Sagan_Log(S_NORMAL, "[%s, line %d] Deleted %d hashes from Bluedot cache.",__FILE__, __LINE__, deleted_count); /* Clean URL cache */ timeout_count = 0; for (i=0; ibluedot_url_cache_count; i++) { if ( atol(timet) - SaganBluedotURLCache[i].cache_utime > config->bluedot_timeout ) { if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] == Deleting URL from cache -> %s", __FILE__, __LINE__, SaganBluedotURLCache[i].url); } } else { TmpSaganBluedotURLCache = (_Sagan_Bluedot_URL_Cache *) realloc(TmpSaganBluedotURLCache, (timeout_count+1) * sizeof(_Sagan_Bluedot_URL_Cache)); if ( TmpSaganBluedotURLCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for TmpSaganBluedotURLCache. Abort!", __FILE__, __LINE__); } strlcpy(TmpSaganBluedotURLCache[timeout_count].url, SaganBluedotURLCache[i].url, sizeof(TmpSaganBluedotURLCache[timeout_count].url)); TmpSaganBluedotURLCache[timeout_count].cache_utime = SaganBluedotURLCache[i].cache_utime; TmpSaganBluedotURLCache[timeout_count].alertid = SaganBluedotURLCache[i].alertid; timeout_count++; } } for (i=0; ibluedot_url_cache_count - (uintmax_t)timeout_count; counters->bluedot_url_cache_count = (uintmax_t)timeout_count; Sagan_Log(S_NORMAL, "[%s, line %d] Deleted %d URLs from Bluedot cache.",__FILE__, __LINE__, deleted_count); /* Clean Filename cache */ timeout_count = 0; for (i=0; ibluedot_filename_cache_count; i++) { if ( atol(timet) - SaganBluedotFilenameCache[i].cache_utime > config->bluedot_timeout ) { if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] == Deleting Filename from cache -> %s", __FILE__, __LINE__, SaganBluedotFilenameCache[i].filename); } } else { TmpSaganBluedotFilenameCache = (_Sagan_Bluedot_Filename_Cache *) realloc(TmpSaganBluedotFilenameCache, (timeout_count+1) * sizeof(_Sagan_Bluedot_Filename_Cache)); if ( TmpSaganBluedotFilenameCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for TmpSaganBluedotFilenameCache. Abort!", __FILE__, __LINE__); } strlcpy(TmpSaganBluedotFilenameCache[timeout_count].filename, SaganBluedotFilenameCache[i].filename, sizeof(TmpSaganBluedotFilenameCache[timeout_count].filename)); TmpSaganBluedotFilenameCache[timeout_count].cache_utime = SaganBluedotFilenameCache[i].cache_utime; TmpSaganBluedotFilenameCache[timeout_count].alertid = SaganBluedotFilenameCache[i].alertid; timeout_count++; } } for (i=0; ibluedot_filename_cache_count - (uintmax_t)timeout_count; counters->bluedot_filename_cache_count = (uintmax_t)timeout_count; Sagan_Log(S_NORMAL, "[%s, line %d] Deleted %d filenames from Bluedot cache.",__FILE__, __LINE__, deleted_count); bluedot_cache_clean_lock = 0; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); } free(TmpSaganBluedotIPCache); free(TmpSaganBluedotHashCache); free(TmpSaganBluedotURLCache); free(TmpSaganBluedotFilenameCache); } /*************************************************************************** * Sagan_Bluedot_IP_Lookup - This does the actual Bluedot lookup. It returns * the bluedot_alertid value (0 if not found) ***************************************************************************/ /* type * * 1 == IP * 2 == Hash * 3 == URL * 4 == Filename */ unsigned char Sagan_Bluedot_Lookup(char *data, unsigned char type, int rule_position) { char tmpurl[1024] = { 0 }; char tmpdeviceid[64] = { 0 }; CURL *curl; CURLcode res; struct curl_slist *headers = NULL; char *response=NULL; struct json_object *json_in = NULL; json_object *string_obj; const char *cat=NULL; const char *cdate_utime=NULL; const char *mdate_utime=NULL; uintmax_t cdate_utime_u32; uintmax_t mdate_utime_u32; char cattmp[64] = { 0 }; char *saveptr=NULL; signed char bluedot_alertid = 0; /* -128 to 127 */ int i; char tmp[64] = { 0 }; const char ptrtmp; char timet[20] = { 0 }; time_t t; struct tm *now=NULL; uintmax_t ip = 0; t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); /************************************************************************/ /* Lookup types */ /************************************************************************/ /* IP Address Lookup */ if ( type == BLUEDOT_LOOKUP_IP ) { ip = IP2Bit(data); if ( is_rfc1918(ip) ) { if ( debug->debugbluedot ) { Sagan_Log(S_DEBUG, "[%s, line %d] %s is RFC1918, link local or invalid.", __FILE__, __LINE__, data); } return(false); } for (i=0; ibluedot_ip_cache_count; i++) { if ( ip == SaganBluedotIPCache[i].host) { if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] Pulled %s (u32 IP: %u / cdate: %d / mdate: %d) from Bluedot cache with category of \"%d\".", __FILE__, __LINE__, data, SaganBluedotIPCache[i].host, SaganBluedotIPCache[i].cdate_utime, SaganBluedotIPCache[i].mdate_utime, SaganBluedotIPCache[i].alertid); } bluedot_alertid = SaganBluedotIPCache[i].alertid; if ( bluedot_alertid != 0 && rulestruct[rule_position].bluedot_mdate_effective_period != 0 ) { if ( ( atol(timet) - SaganBluedotIPCache[i].mdate_utime ) > rulestruct[rule_position].bluedot_mdate_effective_period ) { if ( debug->debugbluedot ) { Sagan_Log(S_DEBUG, "[%s, line %d] From Bluedot Cache - qmdate for %s is over %d seconds. Not alerting.", __FILE__, __LINE__, data, rulestruct[rule_position].bluedot_mdate_effective_period); } pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_mdate_cache++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); bluedot_alertid = 0; } } else if ( bluedot_alertid != 0 && rulestruct[rule_position].bluedot_cdate_effective_period != 0 ) { if ( ( atol(timet) - SaganBluedotIPCache[i].cdate_utime ) > rulestruct[rule_position].bluedot_cdate_effective_period ) { if ( debug->debugbluedot ) { Sagan_Log(S_DEBUG, "[%s, line %d] qcdate for %s is over %d seconds. Not alerting.", __FILE__, __LINE__, data, rulestruct[rule_position].bluedot_cdate_effective_period); } pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_cdate_cache++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); bluedot_alertid = 0; } } pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_ip_cache_hit++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); return(bluedot_alertid); } } /* Check Bluedot IP Queue, make sure we aren't looking up something that is already being looked up */ for (i=0; i < bluedot_ip_queue; i++) { if ( ip == SaganBluedotIPQueue[i].host ) { if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] %s (%u) is already being looked up. Skipping....", __FILE__, __LINE__, data, SaganBluedotIPQueue[i].host); } return(false); } } /* If not in Bluedot IP queue, add it */ pthread_mutex_lock(&SaganProcBluedotIPWorkMutex); SaganBluedotIPQueue = (_Sagan_Bluedot_IP_Queue *) realloc(SaganBluedotIPQueue, (bluedot_ip_queue+1) * sizeof(_Sagan_Bluedot_IP_Queue)); if ( SaganBluedotIPQueue == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for SaganBluedotIPQueue. Abort!", __FILE__, __LINE__); } SaganBluedotIPQueue[bluedot_ip_queue].host = ip; bluedot_ip_queue++; pthread_mutex_unlock(&SaganProcBluedotIPWorkMutex); if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] Going to query IP %s (%u) from Bluedot.", __FILE__, __LINE__, data, ip); } snprintf(tmpurl, sizeof(tmpurl), "%s%s%s", config->bluedot_url, BLUEDOT_IP_LOOKUP_URL, data); } /* BLUEDOT_LOOKUP_IP */ if ( type == BLUEDOT_LOOKUP_HASH ) { for (i=0; ibluedot_hash_cache_count; i++) { if (!strcmp(data, SaganBluedotHashCache[i].hash)) { if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] Pulled file hash '%s' from Bluedot hash cache with category of \"%d\".", __FILE__, __LINE__, data, SaganBluedotHashCache[i].alertid); } pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_hash_cache_hit++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); return(SaganBluedotHashCache[i].alertid); } } snprintf(tmpurl, sizeof(tmpurl), "%s%s%s", config->bluedot_url, BLUEDOT_HASH_LOOKUP_URL, data); } if ( type == BLUEDOT_LOOKUP_URL ) { for (i=0; ibluedot_url_cache_count; i++) { if (!strcmp(data, SaganBluedotURLCache[i].url)) { if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] Pulled file URL '%s' from Bluedot URL cache with category of \"%d\".", __FILE__, __LINE__, data, SaganBluedotURLCache[i].alertid); } pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_url_cache_hit++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); return(SaganBluedotURLCache[i].alertid); } } snprintf(tmpurl, sizeof(tmpurl), "%s%s%s", config->bluedot_url, BLUEDOT_URL_LOOKUP_URL, data); } if ( type == BLUEDOT_LOOKUP_FILENAME ) { for (i=0; ibluedot_filename_cache_count; i++) { if (!strcmp(data, SaganBluedotFilenameCache[i].filename)) { if (debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] Pulled file filename '%s' from Bluedot filename cache with category of \"%d\".", __FILE__, __LINE__, data, SaganBluedotFilenameCache[i].alertid); } pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_filename_cache_hit++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); return(SaganBluedotFilenameCache[i].alertid); } } snprintf(tmpurl, sizeof(tmpurl), "%s%s%s", config->bluedot_url, BLUEDOT_FILENAME_LOOKUP_URL, data); } snprintf(tmpdeviceid, sizeof(tmpdeviceid), "X-BLUEDOT-DEVICEID: %s", config->bluedot_device_id); curl = curl_easy_init(); if (curl) { curl_easy_setopt(curl, CURLOPT_URL, tmpurl); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback_func); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); /* WIll send SIGALRM if not set */ headers = curl_slist_append (headers, BLUEDOT_PROCESSOR_USER_AGENT); headers = curl_slist_append (headers, tmpdeviceid); // headers = curl_slist_append (headers, "X-Bluedot-Verbose: 1"); /* For more verbose output */ curl_easy_setopt(curl, CURLOPT_HTTPHEADER , headers ); res = curl_easy_perform(curl); } curl_easy_cleanup(curl); if ( response == NULL ) { Sagan_Log(S_WARN, "[%s, line %d] Bluedot returned a empty \"response\".", __FILE__, __LINE__); pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_error_count++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); Sagan_Bluedot_Clean_Queue(data, type); return(false); } json_in = json_tokener_parse(response); if ( type == BLUEDOT_LOOKUP_IP ) { json_object_object_get_ex(json_in, "qipcode", &string_obj); cat = json_object_get_string(string_obj); json_object_object_get_ex(json_in, "qcdate", &string_obj); cdate_utime = json_object_get_string(string_obj); if ( cdate_utime != NULL ) { snprintf(tmp, sizeof(tmp), "%s", cdate_utime); strtok_r(tmp, "\"", &saveptr); cdate_utime_u32 = atol(strtok_r(NULL, "\"", &saveptr)); } else { Sagan_Log(S_WARN, "Bluedot return a bad qcdate."); } json_object_object_get_ex(json_in, "qmdate", &string_obj); mdate_utime = json_object_get_string(string_obj); if ( mdate_utime != NULL ) { snprintf(tmp, sizeof(tmp), "%s", mdate_utime); strtok_r(tmp, "\"", &saveptr); mdate_utime_u32 = atol(strtok_r(NULL, "\"", &saveptr)); } else { Sagan_Log(S_WARN, "Bluedot return a bad qmdate."); } } else if ( type == BLUEDOT_LOOKUP_HASH ) { json_object_object_get_ex(json_in, "qhashcode", &string_obj); cat = json_object_get_string(string_obj); } else if ( type == BLUEDOT_LOOKUP_URL ) { json_object_object_get_ex(json_in, "qurlcode", &string_obj); cat = json_object_get_string(string_obj); } else if ( type == BLUEDOT_LOOKUP_FILENAME ) { json_object_object_get_ex(json_in, "qfilenamecode", &string_obj); cat = json_object_get_string(string_obj); } if ( cat == NULL ) { Sagan_Log(S_WARN, "Bluedot return a qipcode category."); pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_error_count++; // DEBUG <- Total error count pthread_mutex_unlock(&SaganProcBluedotWorkMutex); Sagan_Bluedot_Clean_Queue(data, type); return(false); } /* strtok_r() doesn't like const char *cat */ snprintf(cattmp, sizeof(cattmp), "%s", cat); strtok_r(cattmp, "\"", &saveptr); bluedot_alertid = atoi(strtok_r(NULL, "\"", &saveptr)); if ( debug->debugbluedot) { Sagan_Log(S_DEBUG, "[%s, line %d] Bluedot return category \"%d\" [cdate: %d / mdate: %d] for %s.", __FILE__, __LINE__, bluedot_alertid, cdate_utime_u32, mdate_utime_u32, data); } if ( bluedot_alertid == -1 ) { Sagan_Log(S_WARN, "Bluedot reports an invalid API key. Lookup aborted!"); counters->bluedot_error_count++; return(false); } /************************************************************************/ /* Add entries to cache */ /************************************************************************/ /* IP Address lookup */ if ( type == BLUEDOT_LOOKUP_IP ) { pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_ip_total++; SaganBluedotIPCache = (_Sagan_Bluedot_IP_Cache *) realloc(SaganBluedotIPCache, (counters->bluedot_ip_cache_count+1) * sizeof(_Sagan_Bluedot_IP_Cache)); if ( SaganBluedotIPCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for SaganBluedotIPCache. Abort!", __FILE__, __LINE__); } /* Store data into cache */ SaganBluedotIPCache[counters->bluedot_ip_cache_count].host = ip; SaganBluedotIPCache[counters->bluedot_ip_cache_count].cache_utime = atol(timet); /* store utime */ SaganBluedotIPCache[counters->bluedot_ip_cache_count].cdate_utime = cdate_utime_u32; SaganBluedotIPCache[counters->bluedot_ip_cache_count].mdate_utime = mdate_utime_u32; SaganBluedotIPCache[counters->bluedot_ip_cache_count].alertid = bluedot_alertid; counters->bluedot_ip_cache_count++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); if ( bluedot_alertid != 0 && rulestruct[rule_position].bluedot_mdate_effective_period != 0 ) { if ( ( atol(timet) - mdate_utime_u32 ) > rulestruct[rule_position].bluedot_mdate_effective_period ) { if ( debug->debugbluedot ) { Sagan_Log(S_DEBUG, "[%s, line %d] qmdate for %s is over %d seconds. Not alerting.", __FILE__, __LINE__, data, rulestruct[rule_position].bluedot_mdate_effective_period); } pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_mdate++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); bluedot_alertid = 0; } } else if ( bluedot_alertid != 0 && rulestruct[rule_position].bluedot_cdate_effective_period != 0 ) { if ( ( atol(timet) - cdate_utime_u32 ) > rulestruct[rule_position].bluedot_cdate_effective_period ) { if ( debug->debugbluedot ) { Sagan_Log(S_DEBUG, "[%s, line %d] qcdate for %s is over %d seconds. Not alerting.", __FILE__, __LINE__, data, rulestruct[rule_position].bluedot_cdate_effective_period); } pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_cdate++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); bluedot_alertid = 0; } } } /* File hash lookup */ else if ( type == BLUEDOT_LOOKUP_HASH ) { pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_hash_total++; SaganBluedotHashCache = (_Sagan_Bluedot_Hash_Cache *) realloc(SaganBluedotHashCache, (counters->bluedot_hash_cache_count+1) * sizeof(_Sagan_Bluedot_Hash_Cache)); if ( SaganBluedotHashCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for SaganBluedotHashCache. Abort!", __FILE__, __LINE__); } strlcpy(SaganBluedotHashCache[counters->bluedot_hash_cache_count].hash, data, sizeof(SaganBluedotHashCache[counters->bluedot_hash_cache_count].hash)); SaganBluedotHashCache[counters->bluedot_hash_cache_count].cache_utime = atol(timet); /* store utime */ SaganBluedotHashCache[counters->bluedot_hash_cache_count].alertid = bluedot_alertid; counters->bluedot_hash_cache_count++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); } /* URL lookup */ else if ( type == BLUEDOT_LOOKUP_URL ) { pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_url_total++; SaganBluedotURLCache = (_Sagan_Bluedot_URL_Cache *) realloc(SaganBluedotURLCache, (counters->bluedot_url_cache_count+1) * sizeof(_Sagan_Bluedot_URL_Cache)); if ( SaganBluedotURLCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for SaganBluedotURLCache. Abort!", __FILE__, __LINE__); } strlcpy(SaganBluedotURLCache[counters->bluedot_url_cache_count].url, data, sizeof(SaganBluedotURLCache[counters->bluedot_url_cache_count].url)); SaganBluedotURLCache[counters->bluedot_url_cache_count].cache_utime = atol(timet); /* store utime */ SaganBluedotURLCache[counters->bluedot_url_cache_count].alertid = bluedot_alertid; counters->bluedot_url_cache_count++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); } /* Filename Lookup */ else if ( type == BLUEDOT_LOOKUP_FILENAME ) { pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_filename_total++; SaganBluedotFilenameCache = (_Sagan_Bluedot_Filename_Cache *) realloc(SaganBluedotFilenameCache, (counters->bluedot_filename_cache_count+1) * sizeof(_Sagan_Bluedot_Filename_Cache)); if ( SaganBluedotFilenameCache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for SaganBluedotFilenameCache. Abort!", __FILE__, __LINE__); } strlcpy(SaganBluedotFilenameCache[counters->bluedot_filename_cache_count].filename, data, sizeof(SaganBluedotFilenameCache[counters->bluedot_filename_cache_count].filename)); SaganBluedotFilenameCache[counters->bluedot_filename_cache_count].cache_utime = atol(timet); SaganBluedotFilenameCache[counters->bluedot_filename_cache_count].alertid = bluedot_alertid; counters->bluedot_filename_cache_count++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); } Sagan_Bluedot_Clean_Queue(data, type); /* Remove item for "queue" */ json_object_put(json_in); /* Clear json_in as we're done with it */ return(bluedot_alertid); } /*************************************************************************** * Sagan_Bluedot_Cat_Compare - Takes the Bluedot query results and * compares to what the rule is looking for ***************************************************************************/ int Sagan_Bluedot_Cat_Compare ( unsigned char bluedot_results, int rule_position, unsigned char type ) { int i; if ( type == BLUEDOT_LOOKUP_IP ) { for ( i = 0; i < rulestruct[rule_position].bluedot_ip_cat_count; i++ ) { if ( bluedot_results == rulestruct[rule_position].bluedot_ip_cats[i] ) { pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_ip_positive_hit++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); return(true); } } return(false); } if ( type == BLUEDOT_LOOKUP_HASH ) { for ( i = 0; i < rulestruct[rule_position].bluedot_hash_cat_count; i++ ) { if ( bluedot_results == rulestruct[rule_position].bluedot_hash_cats[i] ) { pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_hash_positive_hit++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); return(true); } } return(false); } if ( type == BLUEDOT_LOOKUP_URL ) { for ( i = 0; i < rulestruct[rule_position].bluedot_url_cat_count; i++ ) { if ( bluedot_results == rulestruct[rule_position].bluedot_url_cats[i] ) { pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_url_positive_hit++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); return(true); } } return(false); } if ( type == BLUEDOT_LOOKUP_FILENAME ) { for ( i = 0; i < rulestruct[rule_position].bluedot_filename_cat_count; i++ ) { if ( bluedot_results == rulestruct[rule_position].bluedot_filename_cats[i] ) { pthread_mutex_lock(&SaganProcBluedotWorkMutex); counters->bluedot_filename_positive_hit++; pthread_mutex_unlock(&SaganProcBluedotWorkMutex); return(true); } } return(false); } return(false); } /*************************************************************************** * Sagan_Bluedot_Lookup_All - Find _all_ IPv4 addresses in a syslog * message and preforms a Bluedot query. ***************************************************************************/ int Sagan_Bluedot_IP_Lookup_All ( char *syslog_message, int rule_position ) { int i; char results[64]; unsigned char bluedot_results; sbool bluedot_flag; for ( i = 1; i < MAX_PARSE_IP; i++ ) { strlcpy(results, Sagan_Parse_IP(syslog_message, i), sizeof(results)); /* Failed to find next IP, short circuit the process */ if ( results[0] == '0' ) { return(false); } bluedot_results = Sagan_Bluedot_Lookup(results, BLUEDOT_LOOKUP_IP, rule_position); bluedot_flag = Sagan_Bluedot_Cat_Compare( bluedot_results, rule_position, BLUEDOT_LOOKUP_IP ); if ( bluedot_flag == 1 ) { return(true); } } return(false); } void Sagan_Verify_Categories( char *categories, int rule_number, const char *ruleset, int linecount, unsigned char type ) { char tmp2[64]; char *tmptoken; char *saveptrrule; int i; sbool found; tmptoken = strtok_r(categories, "," , &saveptrrule); while ( tmptoken != NULL ) { strlcpy(tmp2, tmptoken, sizeof(tmp2)); Remove_Spaces(tmptoken); To_LowerC(tmptoken); found = 0; for ( i = 0; i < counters->bluedot_cat_count; i++ ) { if (!strcmp(SaganBluedotCatList[i].cat, tmptoken)) { found = 1; if ( type == BLUEDOT_LOOKUP_IP ) { if ( rulestruct[rule_number].bluedot_ip_cat_count <= BLUEDOT_MAX_CAT ) { rulestruct[rule_number].bluedot_ip_cats[rulestruct[rule_number].bluedot_ip_cat_count] = SaganBluedotCatList[i].cat_number; rulestruct[rule_number].bluedot_ip_cat_count++; } else { Sagan_Log(S_WARN, "[%s, line %d] To many Bluedot IP catagories detected in %s at line %d", __FILE__, __LINE__, ruleset, linecount); } } if ( type == BLUEDOT_LOOKUP_HASH ) { if ( rulestruct[rule_number].bluedot_hash_cat_count <= BLUEDOT_MAX_CAT ) { rulestruct[rule_number].bluedot_hash_cats[rulestruct[rule_number].bluedot_hash_cat_count] = SaganBluedotCatList[i].cat_number; rulestruct[rule_number].bluedot_hash_cat_count++; } else { Sagan_Log(S_WARN, "[%s, line %d] To many Bluedot hash catagories detected in %s at line %d", __FILE__, __LINE__, ruleset, linecount); } } if ( type == BLUEDOT_LOOKUP_URL ) { if ( rulestruct[rule_number].bluedot_url_cat_count <= BLUEDOT_MAX_CAT ) { rulestruct[rule_number].bluedot_url_cats[rulestruct[rule_number].bluedot_url_cat_count] = SaganBluedotCatList[i].cat_number; rulestruct[rule_number].bluedot_url_cat_count++; } else { Sagan_Log(S_WARN, "[%s, line %d] To many Bluedot URL catagories detected in %s at line %d", __FILE__, __LINE__, ruleset, linecount); } } } } if ( found == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Unknown Bluedot category '%s' found in %s at line %d. Abort!", __FILE__, __LINE__, tmp2, ruleset, linecount); } tmptoken = strtok_r(NULL, "," , &saveptrrule); } } #endif sagan-1.1.2/src/processors/sagan-report-clients.h0000644000175000017500000000277612770372750020777 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Adam Hall ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-report-clients.h * * Simple pre-processors that keeps track of reporting syslog clients/agents. * This is based off the IP address the clients, not based on normalization. * If a client/agent hasn't sent a syslog/event message in X minutes, then * generate an alert. * */ #define PROCESSOR_NAME "Sagan_Track_Clients" #define PROCESSOR_FACILITY "daemon" #define PROCESSOR_PRIORITY "warning" #define PROCESSOR_PRI 1 #define PROCESSOR_CLASS "None" #define PROCESSOR_REV "0" #define PROCESSOR_TAG NULL #define PROCESSOR_GENERATOR_ID 100 void Sagan_Track_Clients_Init ( void ); void Sagan_Report_Clients ( void ); sagan-1.1.2/src/processors/sagan-blacklist.c0000644000175000017500000002144312770372750017760 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-blacklist.c * * This searches log lines for IP addresses/networks that are loaded * from a "blacklist" file. For example, you might search log lines for * known bad IP/Networks. This processor uses the CIDR format: * 192.168.1.1/32 (single ip) or 192.168.1.0./24. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-blacklist.h" #include "sagan-config.h" #include "parsers/parsers.h" struct _SaganCounters *counters; struct _SaganConfig *config; struct _SaganDebug *debug; struct _Sagan_Blacklist *SaganBlacklist; pthread_mutex_t SaganProcBlacklistWorkMutex=PTHREAD_MUTEX_INITIALIZER; /**************************************************************************** * Sagan_Blacklist_Init - Init any global memory structures we might need ****************************************************************************/ void Sagan_Blacklist_Init ( void ) { counters->blacklist_count=0; SaganBlacklist = malloc(sizeof(_Sagan_Blacklist)); if ( SaganBlacklist == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganBlacklist. Abort!", __FILE__, __LINE__); } memset(SaganBlacklist, 0, sizeof(_Sagan_Blacklist)); } /**************************************************************************** * Sagan_Blacklist_Load - Loads 32 bit IP addresses into memory so that they * can be queried later ****************************************************************************/ void Sagan_Blacklist_Load ( void ) { FILE *blacklist; char *tok=NULL; char *tmpmask=NULL; int mask=0; char tmp[1024] = { 0 }; char *iprange=NULL; char blacklistbuf[1024] = { 0 }; char *blacklist_filename = NULL; char *ptmp = NULL; uint32_t u32_lower; uint32_t u32_higher; int line_count; int i; sbool found = 0; pthread_mutex_lock(&SaganProcBlacklistWorkMutex); counters->blacklist_count=0; pthread_mutex_unlock(&SaganProcBlacklistWorkMutex); blacklist_filename = strtok_r(config->blacklist_files, ",", &ptmp); while ( blacklist_filename != NULL ) { Sagan_Log(S_NORMAL, "Blacklist Processor Loading File: %s.", blacklist_filename); if (( blacklist = fopen(blacklist_filename, "r" )) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Could not load blacklist file! (%s - %s)", __FILE__, __LINE__, blacklist_filename, strerror(errno)); } line_count = 0; while(fgets(blacklistbuf, 1024, blacklist) != NULL) { /* Skip comments and blank linkes */ if (blacklistbuf[0] == '#' || blacklistbuf[0] == 10 || blacklistbuf[0] == ';' || blacklistbuf[0] == 32) { line_count++; continue; } else { /* Allocate memory for Blacklists, not comments */ line_count++; SaganBlacklist = (_Sagan_Blacklist *) realloc(SaganBlacklist, (counters->blacklist_count+1) * sizeof(_Sagan_Blacklist)); if ( SaganBlacklist == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for SaganBlacklist. Abort!", __FILE__, __LINE__); } Remove_Return(blacklistbuf); iprange = NULL; tmpmask = NULL; iprange = strtok_r(blacklistbuf, "/", &tok); tmpmask = strtok_r(NULL, "/", &tok); if ( tmpmask == NULL ) { /* If there is no CIDR, then assume it's a /32 */ strlcpy(tmp, iprange, sizeof(tmp)); iprange = tmp; mask = 32; } else { mask = atoi(tmpmask); } /* Should do better error checking? */ found = 0; if ( iprange == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Invalid range in %s at line %d, skipping....", __FILE__, __LINE__, blacklist_filename, line_count); found = 1; } if ( mask == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Invalid mask in %s at line %d, skipping....", __FILE__, __LINE__, blacklist_filename, line_count); found = 1; } /* Record lower and upper range based on the /CIDR. We then use IP2Bit(ipaddr) to determine * if it's within the blacklist range. * * Idea came from "ashitpro" * http://bytes.com/topic/c/answers/765104-determining-whether-given-ip-exist-cidr-ip-range * */ if ( found == 0 ) { u32_lower = IP2Bit(iprange); u32_higher = u32_lower + (pow(2,32-mask)-1); for ( i = 0; i < counters->blacklist_count; i++ ) { if ( SaganBlacklist[i].u32_lower == u32_lower && SaganBlacklist[i].u32_higher == u32_higher ) { Sagan_Log(S_WARN, "[%s, line %d] Got duplicate blacklist address %s/%s in %s on line %d, skipping....", __FILE__, __LINE__, iprange, tmpmask, blacklist_filename, line_count); found = 1; } } } if ( found == 0 ) { SaganBlacklist[counters->blacklist_count].u32_lower = u32_lower; SaganBlacklist[counters->blacklist_count].u32_higher = u32_higher; pthread_mutex_lock(&SaganProcBlacklistWorkMutex); counters->blacklist_count++; pthread_mutex_unlock(&SaganProcBlacklistWorkMutex); } } } fclose(blacklist); blacklist_filename = strtok_r(NULL, ",", &ptmp); } } /*************************************************************************** * Sagan_Blacklist_IPADDR - Looks up the 32 bit IP address in the Blacklist * array. If found, returns TRUE. ***************************************************************************/ sbool Sagan_Blacklist_IPADDR ( uint32_t u32_ipaddr ) { int i; counters->blacklist_lookup_count++; for ( i = 0; i < counters->blacklist_count; i++) { if ( ( u32_ipaddr > SaganBlacklist[i].u32_lower && u32_ipaddr < SaganBlacklist[i].u32_higher ) || ( u32_ipaddr == SaganBlacklist[i].u32_lower ) ) { pthread_mutex_lock(&SaganProcBlacklistWorkMutex); counters->blacklist_hit_count++; pthread_mutex_unlock(&SaganProcBlacklistWorkMutex); return(true); } } return(false); } /*************************************************************************** * Sagan_Blacklist_IPADDR_All - Check all IPv4 addresses against the * blacklist IP's in memory! ***************************************************************************/ sbool Sagan_Blacklist_IPADDR_All ( char *syslog_message ) { int i; int b; uint32_t ip; char *results = NULL; for (i = 1; i < MAX_PARSE_IP; i++) { results = Sagan_Parse_IP(syslog_message, i); /* Failed to find next IP, short circuit the process */ if (!strcmp(results, "0")) { return(false); } ip = IP2Bit(results); counters->blacklist_lookup_count++; for ( b = 0; b < counters->blacklist_count; b++ ) { if ( ( ip > SaganBlacklist[b].u32_lower && ip < SaganBlacklist[b].u32_higher ) || ( ip == SaganBlacklist[b].u32_lower ) ) { pthread_mutex_lock(&SaganProcBlacklistWorkMutex); counters->blacklist_hit_count++; pthread_mutex_unlock(&SaganProcBlacklistWorkMutex); return(true); } } } return(false); } sagan-1.1.2/src/processors/sagan-perfmon.c0000644000175000017500000003373012770372750017460 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-perfmon.c * * This write out statistics to a CSV type file so often (user defined). If * enabled, this thread never exits * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-config.h" #include "sagan-lockfile.h" struct _SaganConfig *config; struct _SaganCounters *counters; struct _Sagan_IPC_Counters *counters_ipc; /***************************************************************************** * Sagan_Perfmonitor_Handler - This becomes the thread to write out * preformance monitoring data. *****************************************************************************/ void Sagan_Perfmonitor_Handler( void ) { unsigned long total=0; unsigned long seconds=0; char curtime_utime[64] = { 0 }; time_t t; struct tm *now; t = time(NULL); now=localtime(&t); strftime(curtime_utime, sizeof(curtime_utime), "%s", now); uintmax_t last_sagantotal = 0; uintmax_t last_saganfound = 0; uintmax_t last_alert_total = 0; uintmax_t last_after_total = 0; uintmax_t last_threshold_total = 0; uintmax_t last_sagan_processor_drop = 0; uintmax_t last_ignore_count = 0; #ifdef HAVE_LIBMAXMINDDB uintmax_t last_geoip2_lookup = 0; uintmax_t last_geoip2_hit = 0; uintmax_t last_geoip2_miss = 0; #endif #ifdef WITH_BLUEDOT uintmax_t last_bluedot_ip_cache_hit = 0; uintmax_t last_bluedot_ip_positive_hit = 0; uintmax_t last_bluedot_hash_cache_hit = 0; uintmax_t last_bluedot_hash_positive_hit = 0; uintmax_t last_bluedot_url_cache_hit = 0; uintmax_t last_bluedot_url_positive_hit = 0; uintmax_t last_bluedot_filename_cache_hit = 0; uintmax_t last_bluedot_filename_positive_hit = 0; uintmax_t last_bluedot_error_count = 0; unsigned long bluedot_ip_total; unsigned long bluedot_url_total; unsigned long bluedot_hash_total; unsigned long bluedot_filename_total; #endif #ifdef HAVE_LIBESMTP uintmax_t last_esmtp_count_success = 0; uintmax_t last_esmtp_count_failed = 0; #endif uintmax_t last_blacklist_hit_count = 0; uintmax_t last_sagan_output_drop = 0; uintmax_t last_dns_miss_count = 0; while (1) { sleep(config->perfmonitor_time); t = time(NULL); now=localtime(&t); strftime(curtime_utime, sizeof(curtime_utime), "%s", now); seconds = atol(curtime_utime) - atol(config->sagan_startutime); if ( config->perfmonitor_flag ) { fprintf(config->perfmonitor_file_stream, "%s,", curtime_utime), fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->sagantotal - last_sagantotal); last_sagantotal = counters->sagantotal; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->saganfound - last_saganfound); last_saganfound = counters->saganfound; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->alert_total - last_alert_total); last_alert_total = counters->alert_total; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->after_total - last_after_total); last_after_total = counters->after_total; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->threshold_total - last_threshold_total); last_threshold_total = counters->threshold_total; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->sagan_processor_drop - last_sagan_processor_drop); last_sagan_processor_drop = counters->sagan_processor_drop; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->ignore_count - last_ignore_count); last_ignore_count = counters->ignore_count; total = counters->sagantotal / seconds; fprintf(config->perfmonitor_file_stream, "%lu,", total); #ifdef HAVE_LIBMAXMINDDB fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->geoip2_lookup - last_geoip2_lookup); last_geoip2_lookup = counters->geoip2_lookup; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->geoip2_hit - last_geoip2_hit); last_geoip2_hit = counters->geoip2_hit; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->geoip2_miss - last_geoip2_miss); last_geoip2_miss = counters->geoip2_miss; #endif #ifndef HAVE_LIBMAXMINDDB fprintf(config->perfmonitor_file_stream, "0,0,0,"); #endif /* DEBUG: IS THE BELOW RIGHT? TWO counters->sagan_processor_drop REFERENCES */ fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->sagan_processor_drop - last_sagan_processor_drop); last_sagan_processor_drop = counters->sagan_processor_drop; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->blacklist_hit_count - last_blacklist_hit_count); last_blacklist_hit_count = counters->blacklist_hit_count; /* DEBUG: CONSTANT? */ // fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters_ipc->track_clients_client_count); // fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters_ipc->track_clients_down); fprintf(config->perfmonitor_file_stream, "%d,", counters_ipc->track_clients_client_count); fprintf(config->perfmonitor_file_stream, "%d,", counters_ipc->track_clients_down); fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->sagan_output_drop - last_sagan_output_drop); last_sagan_output_drop = counters->sagan_output_drop; #ifdef HAVE_LIBESMTP if ( config->sagan_esmtp_flag ) { fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->esmtp_count_success - last_esmtp_count_success); last_esmtp_count_success = counters->esmtp_count_success; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->esmtp_count_failed - last_esmtp_count_failed); last_esmtp_count_failed = counters->esmtp_count_failed; } else { fprintf(config->perfmonitor_file_stream, "0,0,"); } #endif #ifndef HAVE_LIBESMTP fprintf(config->perfmonitor_file_stream, "0,0,"); #endif fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->dns_cache_count); fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->dns_miss_count - last_dns_miss_count); last_dns_miss_count = counters->dns_miss_count; #ifdef WITH_BLUEDOT if ( config->bluedot_flag ) { /* IP Reputation */ fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_ip_cache_count); fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_ip_cache_hit - last_bluedot_ip_cache_hit); last_bluedot_ip_cache_hit = counters->bluedot_ip_cache_count; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_ip_positive_hit - last_bluedot_ip_positive_hit); last_bluedot_ip_positive_hit = counters->bluedot_ip_positive_hit; bluedot_ip_total = counters->bluedot_ip_total / seconds; fprintf(config->perfmonitor_file_stream, "%lu,", bluedot_ip_total); /* Hash */ fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_hash_cache_count); fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_hash_cache_hit - last_bluedot_hash_cache_hit); last_bluedot_ip_cache_hit = counters->bluedot_ip_cache_count; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_hash_positive_hit - last_bluedot_hash_positive_hit); last_bluedot_hash_positive_hit = counters->bluedot_hash_positive_hit; bluedot_hash_total = counters->bluedot_hash_total / seconds; fprintf(config->perfmonitor_file_stream, "%lu,", total); /* URL */ fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_url_cache_count); fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_url_cache_hit - last_bluedot_url_cache_hit); last_bluedot_ip_cache_hit = counters->bluedot_ip_cache_count; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_url_positive_hit - last_bluedot_url_positive_hit); last_bluedot_url_positive_hit = counters->bluedot_url_positive_hit; bluedot_url_total = counters->bluedot_url_total / seconds; fprintf(config->perfmonitor_file_stream, "%lu,", bluedot_url_total); /* Filename */ fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_filename_cache_count); fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_filename_cache_hit - last_bluedot_filename_cache_hit); last_bluedot_ip_cache_hit = counters->bluedot_ip_cache_count; fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_filename_positive_hit - last_bluedot_filename_positive_hit); last_bluedot_filename_positive_hit = counters->bluedot_filename_positive_hit; bluedot_filename_total = counters->bluedot_filename_total / seconds; fprintf(config->perfmonitor_file_stream, "%lu,", bluedot_filename_total); /* Last comma here! */ /* Error count */ fprintf(config->perfmonitor_file_stream, "%" PRIu64 ",", counters->bluedot_error_count - last_bluedot_error_count); last_bluedot_error_count = counters->bluedot_error_count; fprintf(config->perfmonitor_file_stream, "%lu", bluedot_ip_total + bluedot_hash_total + bluedot_url_total + bluedot_filename_total); } else { fprintf(config->perfmonitor_file_stream, "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); } #endif #ifndef WITH_BLUEDOT fprintf(config->perfmonitor_file_stream, "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); #endif fprintf(config->perfmonitor_file_stream, "\n"); fflush(config->perfmonitor_file_stream); } } } /***************************************************************************** * Sagan_Perfmonitor_Close - Closes performance monitoring file. *****************************************************************************/ void Sagan_Perfmonitor_Close(void) { char curtime[64] = { 0 }; time_t t; struct tm *now; t = time(NULL); now=localtime(&t); strftime(curtime, sizeof(curtime), "%m/%d/%Y %H:%M:%S", now); fprintf(config->perfmonitor_file_stream, "################################ Perfmon end: pid=%d at=%s ###################################\n", getpid(), curtime); fflush(config->perfmonitor_file_stream); fclose(config->perfmonitor_file_stream); } /***************************************************************************** * Sagan_Perfmonitor_Open - Open's performance monitoring file. *****************************************************************************/ void Sagan_Perfmonitor_Open(void) { char curtime[64] = { 0 }; time_t t; struct tm *now; t = time(NULL); now=localtime(&t); strftime(curtime, sizeof(curtime), "%m/%d/%Y %H:%M:%S", now); if (( config->perfmonitor_file_stream = fopen(config->perfmonitor_file_name, "a" )) == NULL ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] Can't open %s - %s!", __FILE__, __LINE__, config->perfmonitor_file_name, strerror(errno)); } fprintf(config->perfmonitor_file_stream, "################################ Perfmon start: pid=%d at=%s ###################################\n", getpid(), curtime); fprintf(config->perfmonitor_file_stream, "# engine.utime,engine.total,engine.sig_match.total,engine.alerts.total,engine.after.total,engine.threshold.total, engine.drop.total,engine.ignored.total,engine.eps,geoip2.lookup.total,geoip2.hits,geoip2.misses,processor.drop.total,processor.blacklist.hits,processor.tracker.total,processor.tracker.down,output.drop.total,processor.esmtp.success,processor.esmtp.failed,dns.total,dns.miss,processor.bluedot_ip_cache_count,processor.bluedot_ip_cache_hit,processor.bluedot_ip_positive_hit,processor.bluedot_ip_qps,processor.bluedot_hash_cache_count,processor.bluedot_hash_cache_hit,processor.bluedot_hash_positive_hit,processor.bluedot_hash_qps,processor.bluedot_url_cache_count,processor.bluedot_url_cache_hit,processor.bluedot_url_positive_hit,processor.bluedot_url_qps,processor.bluedot_filename_cache_count,processor.bluedot_filename_cache_hit,processor.bluedot_filename_positive_hit,processor.bluedot_filename_qps,processor.bluedot_error_count,processor.bluedot_total_qps\n"); fflush(config->perfmonitor_file_stream); } sagan-1.1.2/src/processors/sagan-bro-intel.h0000644000175000017500000000625712770372750017716 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-bro-intel.c * * This allows Sagan to read in Bro Intel files, like those from Critical * Stack (https://intel.criticalstack.com). * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #define BROINTEL_PROCESSOR_NAME "Sagan_BroIntel" #define BROINTEL_PROCESSOR_FACILITY "daemon" #define BROINTEL_PROCESSOR_PRIORITY "warning" #define BROINTEL_PROCESSOR_PRI 1 #define BROINTEL_PROCESSOR_CLASS "BroIntel" #define BROINTEL_PROCESSOR_REV "1" #define BROINTEL_PROCESSOR_TAG NULL #define BROINTEL_PROCESSOR_GENERATOR_ID 1003 typedef struct _Sagan_BroIntel_Intel_Addr _Sagan_BroIntel_Intel_Addr; struct _Sagan_BroIntel_Intel_Addr { uint32_t u32_ip; }; typedef struct _Sagan_BroIntel_Intel_Domain _Sagan_BroIntel_Intel_Domain; struct _Sagan_BroIntel_Intel_Domain { char domain[255]; }; typedef struct _Sagan_BroIntel_Intel_File_Hash _Sagan_BroIntel_Intel_File_Hash; struct _Sagan_BroIntel_Intel_File_Hash { char hash[64]; }; typedef struct _Sagan_BroIntel_Intel_URL _Sagan_BroIntel_Intel_URL; struct _Sagan_BroIntel_Intel_URL { char url[10240]; }; typedef struct _Sagan_BroIntel_Intel_Software _Sagan_BroIntel_Intel_Software; struct _Sagan_BroIntel_Intel_Software { char software[128]; }; typedef struct _Sagan_BroIntel_Intel_Email _Sagan_BroIntel_Intel_Email; struct _Sagan_BroIntel_Intel_Email { char email[128]; }; typedef struct _Sagan_BroIntel_Intel_User_Name _Sagan_BroIntel_Intel_User_Name; struct _Sagan_BroIntel_Intel_User_Name { char username[64]; }; typedef struct _Sagan_BroIntel_Intel_File_Name _Sagan_BroIntel_Intel_File_Name; struct _Sagan_BroIntel_Intel_File_Name { char file_name[128]; }; typedef struct _Sagan_BroIntel_Intel_Cert_Hash _Sagan_BroIntel_Intel_Cert_Hash; struct _Sagan_BroIntel_Intel_Cert_Hash { char cert_hash[64]; }; void Sagan_BroIntel_Init(void); void Sagan_BroIntel_Load_File(void); sbool Sagan_BroIntel_IPADDR ( uint32_t ); sbool Sagan_BroIntel_IPADDR_All ( char * ); sbool Sagan_BroIntel_DOMAIN ( char * ); sbool Sagan_BroIntel_FILE_HASH ( char * ); sbool Sagan_BroIntel_URL ( char * ); sbool Sagan_BroIntel_SOFTWARE( char * ); sbool Sagan_BroIntel_EMAIL( char * ); sbool Sagan_BroIntel_USER_NAME ( char * ); sbool Sagan_BroIntel_FILE_NAME ( char * ); sbool Sagan_BroIntel_CERT_HASH ( char * ); sagan-1.1.2/src/sagan-send-alert.h0000644000175000017500000000215112770372750015644 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_Send_Alert ( _SaganProcSyslog *, _Sagan_Processor_Info *, char *, char *, char *, char *, int, int, int, int, int ); sagan-1.1.2/src/sagan-rules.c0000644000175000017500000024012112770372750014734 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-rules.c * * Loads and parses the rule files into memory * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include "version.h" #include "sagan.h" #include "sagan-defs.h" #include "sagan-flowbit.h" #include "sagan-lockfile.h" #include "sagan-classifications.h" #include "sagan-rules.h" #include "sagan-config.h" #include "parsers/parsers.h" #ifdef WITH_BLUEDOT #include "processors/sagan-bluedot.h" #endif struct _SaganCounters *counters; struct _SaganDebug *debug; struct _SaganConfig *config; #ifdef WITH_BLUEDOT struct _Sagan_Bluedot_Cat_List *SaganBluedotCatList; char *bluedot_time = NULL; char *bluedot_type = NULL; uintmax_t bluedot_time_u32 = 0; #endif #ifdef HAVE_LIBLOGNORM #include "sagan-liblognorm.h" struct liblognorm_struct *liblognormstruct; struct liblognorm_toload_struct *liblognormtoloadstruct; int liblognorm_count; #endif struct _Rule_Struct *rulestruct; struct _Class_Struct *classstruct; struct _Sagan_Flowbit *flowbit; void Load_Rules( const char *ruleset ) { struct stat filecheck; sbool found = 0; const char *error; int erroffset; FILE *rulesfile; char *rulestring; char *netstring; char *nettmp = NULL; char tolower_tmp[512]; char *tokenrule; char *tokennet; char *rulesplit; char *arg; char *saveptrnet; char *saveptrrule1; char *saveptrrule2; char *saveptrrule3=NULL; char *saveptrflow; char *saveptrrange; char *tmptoken; char *not; char *savenot=NULL; char *tok_tmp; char *tmptok_tmp; char *ptmp=NULL; char *tok = NULL; uintmax_t fwsam_time_tmp; char netstr[512]; char rulestr[RULEBUF]; char rulebuf[RULEBUF]; char pcrerule[MAX_PCRE_SIZE]; char tmp3[MAX_CHECK_FLOWS * 21]; char tmp2[RULEBUF]; char tmp[2]; char final_content[512]; char *flow_a; char *flow_b; char *flow_range; char alert_time_tmp[10]; char alert_tmp_minute[3]; char alert_tmp_hour[3]; char alert_time_all[5]; int linecount=0; int netcount=0; int ref_count=0; int content_count=0; int meta_content_count=0; int meta_content_converted_count=0; int pcre_count=0; int flowbit_count; int flow_1_count=0; int flow_2_count=0; sbool pcreflag=0; int pcreoptions=0; int i=0; int d; int rc=0; int forward=0; int reverse=0; /* Rule vars */ int ip_proto=0; int dst_port=0; int src_port=0; if (( rulesfile = fopen(ruleset, "r" )) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open rule file (%s - %s)", __FILE__, __LINE__, ruleset, strerror(errno)); } Sagan_Log(S_NORMAL, "Loading %s rule file", ruleset); while (fgets(rulebuf, sizeof(rulebuf), rulesfile) != NULL ) { int f1=0; /* Need for flow_direction, must reset every rule, not every group */ int f2=0; /* Need for flow_direction, must reset every rule, not every group */ linecount++; if (rulebuf[0] == '#' || rulebuf[0] == 10 || rulebuf[0] == ';' || rulebuf[0] == 32) { continue; } else { /* Allocate memory for rules, but not comments */ rulestruct = (_Rule_Struct *) realloc(rulestruct, (counters->rulecount+1) * sizeof(_Rule_Struct)); if ( rulestruct == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for rulestruct. Abort!", __FILE__, __LINE__); } } Remove_Return(rulebuf); /****************************************/ /* Some really basic rule sanity checks */ /****************************************/ if (!strchr(rulebuf, ';') || !strchr(rulebuf, ':') || !strchr(rulebuf, '(') || !strchr(rulebuf, ')')) { Sagan_Log(S_ERROR, "[%s, line %d] %s on line %d appears to be incorrect.", __FILE__, __LINE__, ruleset, linecount); } if (!Sagan_strstr(rulebuf, "sid:")) { Sagan_Log(S_ERROR, "[%s, line %d] %s on line %d appears to not have a 'sid'", __FILE__, __LINE__, ruleset, linecount); } if (!Sagan_strstr(rulebuf, "rev:")) { Sagan_Log(S_ERROR, "[%s, line %d] %s on line %d appears to not have a 'rev'", __FILE__, __LINE__, ruleset, linecount); } if (!Sagan_strstr(rulebuf, "msg:")) { Sagan_Log(S_ERROR, "[%s, line %d] %s on line %d appears to not have a 'msg'", __FILE__, __LINE__, ruleset, linecount); } rc=0; if (!Sagan_strstr(rulebuf, "alert")) { rc++; } if (!Sagan_strstr(rulebuf, "drop")) { rc++; } if ( rc == 2 ) { Sagan_Log(S_ERROR, "[%s, line %d] %s on line %d appears to not have a 'alert' or 'drop'", __FILE__, __LINE__, ruleset, linecount); } rc=0; if (!Sagan_strstr(rulebuf, "tcp")) { rc++; } if (!Sagan_strstr(rulebuf, "udp")) { rc++; } if (!Sagan_strstr(rulebuf, "icmp")) { rc++; } if (!Sagan_strstr(rulebuf, "syslog")) { rc++; } if ( rc == 4 ) { Sagan_Log(S_ERROR, "[%s, line %d] %s on line %d appears to not have a protocol type (tcp/udp/icmp/syslog)", __FILE__, __LINE__, ruleset, linecount); } /* Parse forward for the first '(' */ for (i=0; i0; i--) { if ( rulebuf[i] == ')' ) { reverse=i; break; } } /* Get rule structure, minus the ( ) */ for (i=forward+1; irulecount].drop = 1; } else { rulestruct[counters->rulecount].drop = 0; } } /* Protocol */ if ( netcount == 1 ) { ip_proto = config->sagan_proto; if (!strcmp(tokennet, "icmp" )) { ip_proto = 1; } if (!strcmp(tokennet, "tcp" )) { ip_proto = 6; } if (!strcmp(tokennet, "udp" )) { ip_proto = 17; } } rulestruct[counters->rulecount].ip_proto = ip_proto; /* First flow */ if ( netcount == 2 ) { flow_a = Remove_Spaces(Sagan_Var_To_Value(tokennet)); if (!strcmp(flow_a, "any") || !strcmp(flow_a, Remove_Spaces(tokennet))) { rulestruct[counters->rulecount].flow_1_var = 0; /* 0 = any */ } else { strlcpy(tmp3, flow_a, sizeof(tmp3)); for(tmptoken = strtok_r(tmp3, ",", &saveptrflow); tmptoken; tmptoken = strtok_r(NULL, ",", &saveptrflow)) { if(!Is_IP(Strip_Chars(tmptoken, "not!"))) { Sagan_Log(S_WARN,"[%s, line %d] Value is not a valid IP '%s'", __FILE__, __LINE__, tmptoken); } f1++; if(strchr(tmptoken, '/')) { if( !strncmp(tmptoken, "!", 1) || !strncmp("not", tmptoken, 3)) { flow_range = Netaddr_To_Range(Strip_Chars(tmptoken, "not!")); if(strchr(flow_range, '-')) { rulestruct[counters->rulecount].flow_1[flow_1_count].lo = atol(strtok_r(flow_range, "-", &saveptrrange)); rulestruct[counters->rulecount].flow_1[flow_1_count].hi = atol(strtok_r(NULL, "-", &saveptrrange)); rulestruct[counters->rulecount].flow_1_type[f1] = 0; /* 0 = not in group */ } else { rulestruct[counters->rulecount].flow_1[flow_1_count].lo = atol(flow_range); rulestruct[counters->rulecount].flow_1_type[f1] = 2; /* This was a /32, not a range */ } } else { flow_range = Netaddr_To_Range(tmptoken); if(strchr(flow_range, '-')) { rulestruct[counters->rulecount].flow_1[flow_1_count].lo = atol(strtok_r(flow_range, "-", &saveptrrange)); rulestruct[counters->rulecount].flow_1[flow_1_count].hi = atol(strtok_r(NULL, "-", &saveptrrange)); rulestruct[counters->rulecount].flow_1_type[f1] = 1; /* 1 = in group */ } else { rulestruct[counters->rulecount].flow_1[flow_1_count].lo = atol(flow_range); rulestruct[counters->rulecount].flow_1_type[f1] = 3; /* This was a /32, not a range */ } } } else { if( !strncmp(tmptoken, "!", 1) || !strncmp("not", tmptoken, 3)) { rulestruct[counters->rulecount].flow_1_type[f1] = 2; /* 2 = not match ip */ rulestruct[counters->rulecount].flow_1[flow_1_count].lo = IP2Bit(Strip_Chars(tmptoken, "not!")); } else { rulestruct[counters->rulecount].flow_1_type[f1] = 3; /* 3 = match ip */ rulestruct[counters->rulecount].flow_1[flow_1_count].lo = IP2Bit(tmptoken); } } flow_1_count++; if( flow_1_count > 49 ) { Sagan_Log(S_ERROR,"[%s, line %d] You have exceeded the amount of IP's for flow_1 '50'.", __FILE__, __LINE__); } } rulestruct[counters->rulecount].flow_1_var = 1; /* 1 = var */ rulestruct[counters->rulecount].flow_1_counter = flow_1_count; } } /* Source Port */ if ( netcount == 3 ) { src_port = config->sagan_port; /* Set to default */ if (strcmp(nettmp, "any")) { src_port = atoi(nettmp); /* If it's _NOT_ "any", set to default */ } if (Is_Numeric(nettmp)) { src_port = atoi(nettmp); /* If it's a number (see Sagan_Var_To_Value), then set to that */ } if ( src_port == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Invalid source port on line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].src_port = src_port; /* Set for the rule */ } /* Direction */ if ( netcount == 4 ) { if ( !strcmp(tokennet, "->") ) { d = 1; /* 1 = right */ } else if( !strcmp(tokennet, "<>") || !strcmp(tokennet, "any") || !strcmp(tokennet, "<->") ) { d = 0; /* 0 = any */ } else if( !strcmp(tokennet, "<-") ) { d = 2; /* 2 = left */ } else { d = 0; /* 0 = any */ } rulestruct[counters->rulecount].direction = d; } /* Second flow */ if ( netcount == 5 ) { flow_b = Remove_Spaces(Sagan_Var_To_Value(tokennet)); if (!strcmp(flow_b, "any") || !strcmp(flow_b, Remove_Spaces(tokennet))) { rulestruct[counters->rulecount].flow_2_var = 0; /* 0 = any */ } else { strlcpy(tmp3, flow_b, sizeof(tmp3)); for(tmptoken = strtok_r(tmp3, ",", &saveptrflow); tmptoken; tmptoken = strtok_r(NULL, ",", &saveptrflow)) { if(!Is_IP(Strip_Chars(tmptoken, "not!"))) { Sagan_Log(S_WARN,"[%s, line %d] Value is not a valid IP '%s'", __FILE__, __LINE__, tmptoken); } f2++; if(strchr(tmptoken, '/')) { if( !strncmp(tmptoken, "!", 1) || !strncmp("not", tmptoken, 3)) { flow_range = Netaddr_To_Range(Strip_Chars(tmptoken, "not!")); if(strchr(flow_range, '-')) { rulestruct[counters->rulecount].flow_2[flow_2_count].lo = atol(strtok_r(flow_range, "-", &saveptrrange)); rulestruct[counters->rulecount].flow_2[flow_2_count].hi = atol(strtok_r(NULL, "-", &saveptrrange)); rulestruct[counters->rulecount].flow_2_type[f2] = 0; /* 0 = not in group */ } else { rulestruct[counters->rulecount].flow_2[flow_2_count].lo = atol(flow_range); rulestruct[counters->rulecount].flow_2_type[f2] = 2; /* This was a /32, not a range */ } } else { flow_range = Netaddr_To_Range(tmptoken); if(strchr(flow_range, '-')) { rulestruct[counters->rulecount].flow_2[flow_2_count].lo = atol(strtok_r(flow_range, "-", &saveptrrange)); rulestruct[counters->rulecount].flow_2[flow_2_count].hi = atol(strtok_r(NULL, "-", &saveptrrange)); rulestruct[counters->rulecount].flow_2_type[f2] = 1; /* 1 = in group */ } else { rulestruct[counters->rulecount].flow_2[flow_2_count].lo = atol(flow_range); rulestruct[counters->rulecount].flow_2_type[f2] = 3; /* This was a /32, not a range */ } } } else { if( !strncmp(tmptoken, "!", 1) || !strncmp("not", tmptoken, 3)) { rulestruct[counters->rulecount].flow_2_type[f2] = 2; /* 2 = not match ip */ rulestruct[counters->rulecount].flow_2[flow_2_count].lo = IP2Bit(Strip_Chars(tmptoken, "not!")); } else { rulestruct[counters->rulecount].flow_2_type[f2] = 3; /* 3 = match ip */ rulestruct[counters->rulecount].flow_2[flow_2_count].lo = IP2Bit(tmptoken); } } flow_2_count++; if( flow_2_count > 49 ) { Sagan_Log(S_ERROR,"[%s, line %d] You have exceeded the amount of entries for follow_flow_2 '50'.", __FILE__, __LINE__); } } rulestruct[counters->rulecount].flow_2_var = 1; /* 1 = var */ rulestruct[counters->rulecount].flow_2_counter = flow_2_count; } } /* Used later for a single check to determine if a rule has a flow or not - Champ Clark III (06/12/2016) */ if ( rulestruct[counters->rulecount].flow_1_var != 0 || rulestruct[counters->rulecount].flow_2_var != 0 ) { rulestruct[counters->rulecount].has_flow = 1; } /* Destination Port */ if ( netcount == 6 ) { dst_port = config->sagan_port; /* Set to default */ if (strcmp(nettmp, "any")) { dst_port = atoi(nettmp); /* If it's _NOT_ "any", set to default */ } if (Is_Numeric(nettmp)) { dst_port = atoi(nettmp); /* If it's a number (see Sagan_Var_To_Value), then set to that */ } if ( dst_port == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Invalid destination port on line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].dst_port = dst_port; /* Set for the rule */ } tokennet = strtok_r(NULL, " ", &saveptrnet); nettmp = Sagan_Var_To_Value(tokennet); /* Convert $VAR to values per line */ Remove_Spaces(nettmp); netcount++; } /*****************************************************************************/ /* Parse the rule set! */ /*****************************************************************************/ tokenrule = strtok_r(rulestring, ";", &saveptrrule1); while ( tokenrule != NULL ) { rulesplit = strtok_r(tokenrule, ":", &saveptrrule2); Remove_Spaces(rulesplit); /* single flag options. (nocase, find_port, etc) */ /* if (!strcmp(rulesplit, "normalize")) { rulestruct[counters->rulecount].normalize = 1; } */ if (!strcmp(rulesplit, "parse_port")) { strtok_r(NULL, ":", &saveptrrule2); rulestruct[counters->rulecount].s_find_port = 1; } if (!strcmp(rulesplit, "parse_proto")) { strtok_r(NULL, ":", &saveptrrule2); rulestruct[counters->rulecount].s_find_proto = 1; } if (!strcmp(rulesplit, "parse_proto_program")) { strtok_r(NULL, ":", &saveptrrule2); rulestruct[counters->rulecount].s_find_proto_program = 1; } if (!strcmp(rulesplit, "parse_src_ip")) { arg = strtok_r(NULL, ":", &saveptrrule2); rulestruct[counters->rulecount].s_find_src_ip = 1; if ( arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"parse_src_ip\" option appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].s_find_src_pos = atoi(arg); } if (!strcmp(rulesplit, "parse_dst_ip")) { arg = strtok_r(NULL, ":", &saveptrrule2); rulestruct[counters->rulecount].s_find_dst_ip = 1; if ( arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"parse_dst_ip\" option appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].s_find_dst_pos = atoi(arg); } if (!strcmp(rulesplit, "parse_hash")) { arg = strtok_r(NULL, ":", &saveptrrule2); if ( arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"parse_hash\" option appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } Remove_Spaces(arg); if (!strcmp(arg, "md5")) { rulestruct[counters->rulecount].s_find_hash_type = PARSE_HASH_MD5; } else if (!strcmp(arg, "sha1")) { rulestruct[counters->rulecount].s_find_hash_type = PARSE_HASH_SHA1; } else if (!strcmp(arg, "sha256")) { rulestruct[counters->rulecount].s_find_hash_type = PARSE_HASH_SHA256; } else if (!strcmp(arg, "all")) { rulestruct[counters->rulecount].s_find_hash_type = PARSE_HASH_ALL; } if ( rulestruct[counters->rulecount].s_find_hash_type == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"parse_hash\" option appears to be invalid at line %d in %s. Valid values are 'md5', 'sha1' and 'sha256'.", __FILE__, __LINE__, linecount, ruleset); } } /* Non-quoted information (sid, reference, etc) */ if (!strcmp(rulesplit, "flowbits")) { arg = strtok_r(NULL, ":", &saveptrrule2); tmptoken = Remove_Spaces(strtok_r(arg, ",", &saveptrrule2)); if (strcmp(tmptoken, "nounified2") && strcmp(tmptoken, "noalert") && strcmp(tmptoken, "set") && strcmp(tmptoken, "unset") && strcmp(tmptoken, "isset") && strcmp(tmptoken, "isnotset")) { Sagan_Log(S_ERROR, "[%s, line %d] Expected 'nounified2', 'noalert', 'set', 'unset', 'isnotset' or 'isset' but got '%s' at line %d in %s", __FILE__, __LINE__, tmptoken, linecount, ruleset); } if (!strcmp(tmptoken, "noalert")) { rulestruct[counters->rulecount].flowbit_noalert=1; } if (!strcmp(tmptoken, "nounified2")) { rulestruct[counters->rulecount].flowbit_nounified2=1; } /* SET */ if (!strcmp(tmptoken, "set")) { tmptoken = Remove_Spaces(strtok_r(NULL, ",", &saveptrrule2)); if ( tmptoken == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Expected flowbit name at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].flowbit_flag = 1; /* We have flowbit in the rule! */ rulestruct[counters->rulecount].flowbit_set_count++; rulestruct[counters->rulecount].flowbit_type[flowbit_count] = 1; /* set */ strlcpy(rulestruct[counters->rulecount].flowbit_name[flowbit_count], tmptoken, sizeof(rulestruct[counters->rulecount].flowbit_name[flowbit_count])); rulestruct[counters->rulecount].flowbit_timeout[flowbit_count] = atoi(strtok_r(NULL, ",", &saveptrrule2)); if ( rulestruct[counters->rulecount].flowbit_timeout[flowbit_count] == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Expected flowbit valid expire time for \"set\" at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } flowbit_count++; counters->flowbit_total_counter++; } /* UNSET */ if (!strcmp(tmptoken, "unset")) { tmptoken = Remove_Spaces(strtok_r(NULL, ",", &saveptrrule2)); if ( tmptoken == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Expected \"direction\" at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].flowbit_direction[flowbit_count] = Sagan_Flowbit_Type(tmptoken, linecount, ruleset); rulestruct[counters->rulecount].flowbit_flag = 1; /* We have flowbit in the rule! */ rulestruct[counters->rulecount].flowbit_set_count++; rulestruct[counters->rulecount].flowbit_type[flowbit_count] = 2; /* unset */ tmptoken = Remove_Spaces(strtok_r(NULL, ",", &saveptrrule2)); if ( tmptoken == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Expected flowbit name at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].flowbit_name[flowbit_count], tmptoken, sizeof(rulestruct[counters->rulecount].flowbit_name[flowbit_count])); flowbit_count++; } /* ISSET */ if (!strcmp(tmptoken, "isset")) { tmptoken = Remove_Spaces(strtok_r(NULL, ",", &saveptrrule2)); if ( tmptoken == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Expected flowbit name at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].flowbit_direction[flowbit_count] = Sagan_Flowbit_Type(tmptoken, linecount, ruleset); rulestruct[counters->rulecount].flowbit_flag = 1; /* We have flowbit in the rule! */ rulestruct[counters->rulecount].flowbit_type[flowbit_count] = 3; /* isset */ tmptoken = Remove_Spaces(strtok_r(NULL, ",", &saveptrrule2)); if ( tmptoken == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Expected flowbit name at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].flowbit_name[flowbit_count], tmptoken, sizeof(rulestruct[counters->rulecount].flowbit_name[flowbit_count])); /* If we have multiple flowbit conditions (bit1&bit2), * we alter the flowbit_conditon_count to reflect that. * |'s are easy. We just test to see if one of the * flowbits matched or not! */ if (Sagan_strstr(rulestruct[counters->rulecount].flowbit_name[flowbit_count], "&")) { rulestruct[counters->rulecount].flowbit_condition_count = Sagan_Character_Count(rulestruct[counters->rulecount].flowbit_name[flowbit_count], "&") + 1; } else { rulestruct[counters->rulecount].flowbit_condition_count++; } flowbit_count++; } /* ISNOTSET */ if (!strcmp(tmptoken, "isnotset")) { tmptoken = Remove_Spaces(strtok_r(NULL, ",", &saveptrrule2)); if ( tmptoken == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Expected flowbit name at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].flowbit_direction[flowbit_count] = Sagan_Flowbit_Type(tmptoken, linecount, ruleset); rulestruct[counters->rulecount].flowbit_flag = 1; /* We have flowbit in the rule! */ rulestruct[counters->rulecount].flowbit_type[flowbit_count] = 4; /* isnotset */ tmptoken = Remove_Spaces(strtok_r(NULL, ",", &saveptrrule2)); if ( tmptoken == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Expected flowbit name at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].flowbit_name[flowbit_count], tmptoken, sizeof(rulestruct[counters->rulecount].flowbit_name[flowbit_count])); /* If we have multiple flowbit conditions (bit1&bit2), * we alter the flowbit_conditon_count to reflect that. * |'s are easy. We just test to see if one of the * flowbits matched or not! */ if (Sagan_strstr(rulestruct[counters->rulecount].flowbit_name[flowbit_count], "&")) { rulestruct[counters->rulecount].flowbit_condition_count = Sagan_Character_Count(rulestruct[counters->rulecount].flowbit_name[flowbit_count], "&") + 1; } else { rulestruct[counters->rulecount].flowbit_condition_count++; } flowbit_count++; } rulestruct[counters->rulecount].flowbit_count = flowbit_count; } #ifdef HAVE_LIBMAXMINDDB if (!strcmp(rulesplit, "country_code")) { /* Have the requirements for GeoIP2 been loaded (Maxmind DB, etc) */ if (!config->have_geoip2) { Sagan_Log(S_ERROR, "[%s, line %d] Rule %s at line %d has GeoIP2 option, but Sagan configuration lacks GeoIP2!", __FILE__, __LINE__, ruleset, linecount); } arg = strtok_r(NULL, ":", &saveptrrule2); tmptoken = strtok_r(arg, " ", &saveptrrule2); if (strcmp(tmptoken, "track")) { Sagan_Log(S_ERROR, "[%s, line %d] Expected 'track' in 'country_code' option at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } tmptoken = Remove_Spaces(strtok_r(NULL, ",", &saveptrrule2)); if (strcmp(tmptoken, "by_src") && strcmp(tmptoken, "by_dst")) { Sagan_Log(S_ERROR, "[%s, line %d] Expected 'by_src' or 'by_dst' in 'country_code' option at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } if (!strcmp(tmptoken, "by_src")) { rulestruct[counters->rulecount].geoip2_src_or_dst = 1; } if (!strcmp(tmptoken, "by_dst")) { rulestruct[counters->rulecount].geoip2_src_or_dst = 2; } tmptoken = Remove_Spaces(strtok_r(NULL, " ", &saveptrrule2)); if (strcmp(tmptoken, "is") && strcmp(tmptoken, "isnot")) { Sagan_Log(S_ERROR, "[%s, line %d] Expected 'is' or 'isnot' in 'country_code' option at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } if (!strcmp(tmptoken, "isnot")) { rulestruct[counters->rulecount].geoip2_type = 1; } if (!strcmp(tmptoken, "is" )) { rulestruct[counters->rulecount].geoip2_type = 2; } tmptoken = Sagan_Var_To_Value(strtok_r(NULL, ";", &saveptrrule2)); /* Grab country codes */ Remove_Spaces(tmptoken); strlcpy(rulestruct[counters->rulecount].geoip2_country_codes, tmptoken, sizeof(rulestruct[counters->rulecount].geoip2_country_codes)); rulestruct[counters->rulecount].geoip2_flag = 1; } #endif #ifndef HAVE_LIBMAXMINDDB if (!strcmp(rulesplit, "country_code")) { Sagan_Log(S_WARN, "** WARNING: Rule %d of %s has \"country_code:\" tracking but Sagan lacks GeoIP2 support!", linecount, ruleset); Sagan_Log(S_WARN, "** WARNING: Rebuild Sagan with \"--enable-geoip2\" or disable this rule!"); } #endif if (!strcmp(rulesplit, "meta_content")) { if ( meta_content_count > MAX_META_CONTENT ) { Sagan_Log(S_ERROR, "[%s, line %d] There is to many \"meta_content\" types in the rule at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } arg = strtok_r(NULL, ":", &saveptrrule2); tmptoken = strtok_r(arg, ",", &saveptrrule2); if ( tmptoken == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Expected a meta_content 'helper', but none was found at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(tmp2, Between_Quotes(tmptoken), sizeof(tmp2)); strlcpy(rulestruct[counters->rulecount].meta_content_help[meta_content_count], Sagan_Content_Pipe(tmp2, linecount, ruleset), sizeof(rulestruct[counters->rulecount].meta_content_help[meta_content_count])); tmptoken = Sagan_Var_To_Value(strtok_r(NULL, ";", &saveptrrule2)); /* Grab Search data */ if ( tmptoken == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Expected some sort of meta_content, but none was found at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } Remove_Spaces(tmptoken); strlcpy(tmp2, tmptoken, sizeof(tmp2)); ptmp = strtok_r(tmp2, ",", &tok); meta_content_converted_count = 0; while (ptmp != NULL) { strlcpy(rulestruct[counters->rulecount].meta_content_containers[meta_content_count].meta_content_converted[meta_content_converted_count], Sagan_Replace_Sagan(rulestruct[counters->rulecount].meta_content_help[meta_content_count], ptmp), sizeof(rulestruct[counters->rulecount].meta_content_containers[meta_content_count].meta_content_converted[meta_content_converted_count])); meta_content_converted_count++; ptmp = strtok_r(NULL, ",", &tok); } rulestruct[counters->rulecount].meta_content_containers[meta_content_count].meta_counter = meta_content_converted_count; rulestruct[counters->rulecount].meta_content_flag = 1; tmptoken = strtok_r(NULL, ",", &saveptrrule2); not = strtok_r(arg, "\"", &savenot); if (Sagan_strstr(not, "!")) { rulestruct[counters->rulecount].meta_content_not[meta_content_count] = 1; } meta_content_count++; rulestruct[counters->rulecount].meta_content_count=meta_content_count; } /* Like "nocase" for content, but for "meta_nocase". This is a "single option" but works better here */ if (!strcmp(rulesplit, "meta_nocase")) { strtok_r(NULL, ":", &saveptrrule2); rulestruct[counters->rulecount].meta_content_case[meta_content_count-1] = 1; strlcpy(tolower_tmp, To_LowerC(rulestruct[counters->rulecount].meta_content[meta_content_count-1]), sizeof(tolower_tmp)); strlcpy(rulestruct[counters->rulecount].meta_content[meta_content_count-1], tolower_tmp, sizeof(rulestruct[counters->rulecount].meta_content[meta_content_count-1])); } if (!strcmp(rulesplit, "rev" )) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"rev\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].s_rev, Remove_Spaces(arg), sizeof(rulestruct[counters->rulecount].s_rev)); } if (!strcmp(rulesplit, "classtype" )) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"classtype\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].s_classtype, Remove_Spaces(arg), sizeof(rulestruct[counters->rulecount].s_classtype)); found = 0; for(i=0; i < counters->classcount; i++) { if (!strcmp(classstruct[i].s_shortname, rulestruct[counters->rulecount].s_classtype)) { rulestruct[counters->rulecount].s_pri = classstruct[i].s_priority; found = 1; } } if ( found == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] The classtype \"%s\" was not found on line %d in %s! " "Are you attempting loading a rule set before loading the classification.config?", __FILE__, __LINE__, rulestruct[counters->rulecount].s_classtype, linecount, ruleset); } } if (!strcmp(rulesplit, "program" )) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"program\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].s_program, Remove_Spaces(Sagan_Var_To_Value(arg)), sizeof(rulestruct[counters->rulecount].s_program)); } if (!strcmp(rulesplit, "reference" )) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"reference\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].s_reference[ref_count], Remove_Spaces(arg), sizeof(rulestruct[counters->rulecount].s_reference[ref_count])); rulestruct[counters->rulecount].ref_count=ref_count; ref_count++; } if (!strcmp(rulesplit, "sid" )) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"sid\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].s_sid, Remove_Spaces(arg), sizeof(rulestruct[counters->rulecount].s_sid)); } if (!strcmp(rulesplit, "tag" )) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"tag\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].s_tag, Remove_Spaces(arg), sizeof(rulestruct[counters->rulecount].s_tag)); } if (!strcmp(rulesplit, "facility" )) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"facility\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].s_facility, Remove_Spaces(arg), sizeof(rulestruct[counters->rulecount].s_facility)); } if (!strcmp(rulesplit, "level" )) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"level\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].s_level, Remove_Spaces(arg), sizeof(rulestruct[counters->rulecount].s_level)); } if (!strcmp(rulesplit, "pri" )) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"priority\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } Remove_Spaces(arg); rulestruct[counters->rulecount].s_pri = atoi(arg); } #ifdef HAVE_LIBESMTP if (!strcmp(rulesplit, "email" )) { arg = strtok_r(NULL, " ", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"email\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } if (!strcmp(config->sagan_esmtp_server, "" )) { Sagan_Log(S_ERROR, "[%s, line %d] Line %d of %s has the \"email:\" option, but no SMTP server is specified in the %s", __FILE__, __LINE__, linecount, ruleset, config->sagan_config); } strlcpy(rulestruct[counters->rulecount].email, Remove_Spaces(arg), sizeof(rulestruct[counters->rulecount].email)); rulestruct[counters->rulecount].email_flag=1; config->sagan_esmtp_flag=1; } #endif #ifdef HAVE_LIBLOGNORM /* Our Liblognorm friends changed the way it works! We use to load normalization rule base files as they were needed. ln_loadSample no longer accepts multiple calls. This means that _all_ liblognorm rules need to be loaded from one file at one time. This depreciates "normalize: type;" in favor of a simple "normalize"; */ if (!strcmp(rulesplit, "normalize" )) { rulestruct[counters->rulecount].normalize = 1; /* Test for old liblognorm/Sagan usage. If old method is found, produce a warning */ arg = strtok_r(NULL, ":", &saveptrrule2); if (arg != NULL ) { Sagan_Log(S_WARN, "Detected a rule that uses the older \'normalize\' method. Please consider updating \'%s\' at line %d", ruleset, linecount); } } #endif /* Quoted information (content, pcre, msg) */ if (!strcmp(rulesplit, "msg" )) { arg = strtok_r(NULL, ";", &saveptrrule2); strlcpy(tmp2, Between_Quotes(arg), sizeof(tmp2)); if (tmp2[0] == '\0' ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"msg\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } strlcpy(rulestruct[counters->rulecount].s_msg, tmp2, sizeof(rulestruct[counters->rulecount].s_msg)); } if (!strcmp(rulesplit, "content" )) { if ( content_count > MAX_CONTENT ) { Sagan_Log(S_ERROR, "[%s, line %d] There is to many \"content\" types in the rule at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } arg = strtok_r(NULL, ";", &saveptrrule2); strlcpy(tmp2, Between_Quotes(arg), sizeof(tmp2)); if (tmp2[0] == '\0' ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"content\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } /* Convert HEX encoded data */ strlcpy(final_content, Sagan_Content_Pipe(tmp2, linecount, ruleset), sizeof(final_content)); /* For content: ! "something" */ not = strtok_r(arg, "\"", &savenot); if (Sagan_strstr(not, "!")) { rulestruct[counters->rulecount].content_not[content_count] = 1; } strlcpy(rulestruct[counters->rulecount].s_content[content_count], final_content, sizeof(rulestruct[counters->rulecount].s_content[content_count])); final_content[0] = '\0'; content_count++; rulestruct[counters->rulecount].content_count=content_count; } /* Single option, but "nocase" works better here */ if (!strcmp(rulesplit, "nocase")) { strtok_r(NULL, ":", &saveptrrule2); rulestruct[counters->rulecount].s_nocase[content_count - 1] = 1; strlcpy(tolower_tmp, To_LowerC(rulestruct[counters->rulecount].s_content[content_count - 1]), sizeof(tolower_tmp)); strlcpy(rulestruct[counters->rulecount].s_content[content_count-1], tolower_tmp, sizeof(rulestruct[counters->rulecount].s_content[content_count-1])); } if (!strcmp(rulesplit, "offset")) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"offset\" appears to be missing at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].s_offset[content_count - 1] = atoi(arg); } if (!strcmp(rulesplit, "meta_offset")) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"meta_offset\" appears to be missing at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].meta_offset[meta_content_count - 1] = atoi(arg); } if (!strcmp(rulesplit, "depth")) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"depth\" appears to be missing at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].s_depth[content_count - 1] = atoi(arg); } if (!strcmp(rulesplit, "meta_depth")) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"meta_depth\" appears to be missing at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].meta_depth[meta_content_count - 1] = atoi(arg); } if (!strcmp(rulesplit, "distance")) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"distance\" appears to be missing at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].s_distance[content_count - 1] = atoi(arg); } if (!strcmp(rulesplit, "meta_distance")) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"meta_distance\" appears to be missing at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].meta_distance[meta_content_count - 1] = atoi(arg); } if (!strcmp(rulesplit, "within")) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"within\" appears to be missing at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].s_within[content_count - 1] = atoi(arg); } if (!strcmp(rulesplit, "meta_within")) { arg = strtok_r(NULL, ":", &saveptrrule2); if (arg == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The \"meta_within\" appears to be missing at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } rulestruct[counters->rulecount].meta_within[meta_content_count - 1] = atoi(arg); } /* PCRE needs a little extra "work" */ if (!strcmp(rulesplit, "pcre" )) { if ( pcre_count > MAX_PCRE ) { Sagan_Log(S_ERROR, "[%s, line %d] There is to many \"pcre\" types in the rule at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } arg = strtok_r(NULL, ";", &saveptrrule2); strlcpy(tmp2, Between_Quotes(arg), sizeof(tmp2)); if (tmp2[0] == '\0' ) { Sagan_Log(S_ERROR, "The \"pcre\" appears to be incomplete at line %d in %s", __FILE__, __LINE__, linecount, ruleset); } pcreflag=0; memset(pcrerule, 0, sizeof(pcrerule)); for ( i = 1; i < strlen(tmp2); i++) { if ( tmp2[i] == '/' && tmp2[i-1] != '\\' ) { pcreflag++; } if ( pcreflag == 0 ) { snprintf(tmp, sizeof(tmp), "%c", tmp2[i]); strlcat(pcrerule, tmp, sizeof(pcrerule)); } /* are we /past/ and at the args? */ if ( pcreflag == 1 ) { switch(tmp2[i]) { case 'i': if ( pcreflag == 1 ) pcreoptions |= PCRE_CASELESS; break; case 's': if ( pcreflag == 1 ) pcreoptions |= PCRE_DOTALL; break; case 'm': if ( pcreflag == 1 ) pcreoptions |= PCRE_MULTILINE; break; case 'x': if ( pcreflag == 1 ) pcreoptions |= PCRE_EXTENDED; break; case 'A': if ( pcreflag == 1 ) pcreoptions |= PCRE_ANCHORED; break; case 'E': if ( pcreflag == 1 ) pcreoptions |= PCRE_DOLLAR_ENDONLY; break; case 'G': if ( pcreflag == 1 ) pcreoptions |= PCRE_UNGREEDY; break; /* PCRE options that aren't really used? */ /* case 'f': if ( pcreflag == 1 ) pcreoptions |= PCRE_FIRSTLINE; break; case 'C': if ( pcreflag == 1 ) pcreoptions |= PCRE_AUTO_CALLOUT; break; case 'J': if ( pcreflag == 1 ) pcreoptions |= PCRE_DUPNAMES; break; case 'N': if ( pcreflag == 1 ) pcreoptions |= PCRE_NO_AUTO_CAPTURE; break; case 'X': if ( pcreflag == 1 ) pcreoptions |= PCRE_EXTRA; break; case '8': if ( pcreflag == 1 ) pcreoptions |= PCRE_UTF8; break; case '?': if ( pcreflag == 1 ) pcreoptions |= PCRE_NO_UTF8_CHECK; break; */ } } } if ( pcreflag == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Missing last '/' in pcre: %s at line %d", __FILE__, __LINE__, ruleset, linecount); } /* We store the compiled/study results. This saves us some CPU time during searching - Champ Clark III - 02/01/2011 */ rulestruct[counters->rulecount].re_pcre[pcre_count] = pcre_compile( pcrerule, pcreoptions, &error, &erroffset, NULL ); rulestruct[counters->rulecount].pcre_extra[pcre_count] = pcre_study( rulestruct[counters->rulecount].re_pcre[pcre_count], pcreoptions, &error); if ( rulestruct[counters->rulecount].re_pcre[pcre_count] == NULL ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] PCRE failure at %d: %s", __FILE__, __LINE__, erroffset, error); } pcre_count++; rulestruct[counters->rulecount].pcre_count=pcre_count; } /* Snortsam */ /* fwsam: src, 24 hours; */ if (!strcmp(rulesplit, "fwsam" )) { /* Set some defaults - needs better error checking! */ rulestruct[counters->rulecount].fwsam_src_or_dst=1; /* by src */ rulestruct[counters->rulecount].fwsam_seconds = 86400; /* 1 day */ tok_tmp = strtok_r(NULL, ":", &saveptrrule2); tmptoken = strtok_r(tok_tmp, ",", &saveptrrule2); if (Sagan_strstr(tmptoken, "src")) { rulestruct[counters->rulecount].fwsam_src_or_dst=1; } if (Sagan_strstr(tmptoken, "dst")) { rulestruct[counters->rulecount].fwsam_src_or_dst=2; } /* Error checking?!!? */ tmptoken = strtok_r(NULL, ",", &saveptrrule2); tmptok_tmp = strtok_r(tmptoken, " ", &saveptrrule3); fwsam_time_tmp=atol(tmptok_tmp); /* Digit/time */ tmptok_tmp = strtok_r(NULL, " ", &saveptrrule3); /* Type - hour/minute */ rulestruct[counters->rulecount].fwsam_seconds = Sagan_Value_To_Seconds(tmptok_tmp, fwsam_time_tmp); } /* Time based alerting */ if (!strcmp(rulesplit, "alert_time")) { rulestruct[counters->rulecount].alert_time_flag = 1; tok_tmp = strtok_r(NULL, ":", &saveptrrule2); strlcpy(tmp2, Sagan_Var_To_Value(tok_tmp), sizeof(tmp2)); tmptoken = strtok_r(tmp2, ",", &saveptrrule2); while( tmptoken != NULL ) { if (Sagan_strstr(tmptoken, "days")) { tmptok_tmp = strtok_r(tmptoken, " ", &saveptrrule3); tmptok_tmp = strtok_r(NULL, " ", &saveptrrule3); Remove_Spaces(tmptok_tmp); if (strlen(tmptok_tmp) > 7 ) { Sagan_Log(S_ERROR, "[%s, line %d] To many days (%s) in 'alert_time' in %s at line %d.", __FILE__, __LINE__, tmptok_tmp, ruleset, linecount); } strlcpy(alert_time_tmp, tmptok_tmp, sizeof(alert_time_tmp)); for (i=0; irulecount].alert_days ^= SUNDAY; if ( atoi(tmp) == 1 ) rulestruct[counters->rulecount].alert_days ^= MONDAY; if ( atoi(tmp) == 2 ) rulestruct[counters->rulecount].alert_days ^= TUESDAY; if ( atoi(tmp) == 3 ) rulestruct[counters->rulecount].alert_days ^= WEDNESDAY; if ( atoi(tmp) == 4 ) rulestruct[counters->rulecount].alert_days ^= THURSDAY; if ( atoi(tmp) == 5 ) rulestruct[counters->rulecount].alert_days ^= FRIDAY; if ( atoi(tmp) == 6 ) rulestruct[counters->rulecount].alert_days ^= SATURDAY; } } if (Sagan_strstr(tmptoken, "hours")) { tmptok_tmp = strtok_r(tmptoken, " ", &saveptrrule3); tmptok_tmp = strtok_r(NULL, " ", &saveptrrule3); Remove_Spaces(tmptok_tmp); if ( strlen(tmptok_tmp) > 9 || strlen(tmptok_tmp) < 9 ) { Sagan_Log(S_ERROR, "[%s, line %d] Improper 'alert_time' format in %s at line %d.", __FILE__, __LINE__, ruleset, linecount); } snprintf(alert_time_tmp, sizeof(alert_time_tmp), "%s", tmptok_tmp); /* Start hour */ snprintf(alert_tmp_hour, sizeof(alert_tmp_hour), "%c%c", alert_time_tmp[0], alert_time_tmp[1]); if ( atoi(alert_tmp_hour) > 23 ) { Sagan_Log(S_ERROR, "[%s, line %d] Starting 'alert_time' hour cannot be over 23 in %s at line %d.", __FILE__, __LINE__, ruleset, linecount); } snprintf(alert_tmp_minute, sizeof(alert_tmp_minute), "%c%c", alert_time_tmp[2], alert_time_tmp[3]); if ( atoi(alert_tmp_minute) > 59 ) { Sagan_Log(S_ERROR, "[%s, line %d] Starting 'alert_time' minute cannot be over 59 in %s at line %d.", __FILE__, __LINE__, ruleset, linecount); } snprintf(alert_time_all, sizeof(alert_time_all), "%s%s", alert_tmp_hour, alert_tmp_minute); rulestruct[counters->rulecount].aetas_start = atoi(alert_time_all); /* End hour */ snprintf(alert_tmp_hour, sizeof(alert_tmp_hour), "%c%c", alert_time_tmp[5], alert_time_tmp[6]); if ( atoi(alert_tmp_hour) > 23 ) { Sagan_Log(S_ERROR, "[%s, line %d] Ending 'alert_time' hour cannot be over 23 in %s at line %d.", __FILE__, __LINE__, ruleset, linecount); } snprintf(alert_tmp_minute, sizeof(alert_tmp_minute), "%c%c", alert_time_tmp[7], alert_time_tmp[8]); if ( atoi(alert_tmp_minute) > 59 ) { Sagan_Log(S_ERROR, "[%s, line %d] Ending 'alert_time' minute cannot be over 59 in %s at line %d.", __FILE__, __LINE__, ruleset, linecount); } snprintf(alert_time_all, sizeof(alert_time_all), "%s%s", alert_tmp_hour, alert_tmp_minute); rulestruct[counters->rulecount].aetas_end = atoi(alert_time_all); } tmptoken = strtok_r(NULL, ",", &saveptrrule2); } } /* Thresholding */ if (!strcmp(rulesplit, "threshold" )) { tok_tmp = strtok_r(NULL, ":", &saveptrrule2); tmptoken = strtok_r(tok_tmp, ",", &saveptrrule2); while( tmptoken != NULL ) { if (Sagan_strstr(tmptoken, "type")) { if (Sagan_strstr(tmptoken, "limit")) { rulestruct[counters->rulecount].threshold_type = 1; } if (Sagan_strstr(tmptoken, "threshold")) { rulestruct[counters->rulecount].threshold_type = 2; } } if (Sagan_strstr(tmptoken, "track")) { if (Sagan_strstr(tmptoken, "by_src")) { rulestruct[counters->rulecount].threshold_method = 1; } if (Sagan_strstr(tmptoken, "by_dst")) { rulestruct[counters->rulecount].threshold_method = 2; } if (Sagan_strstr(tmptoken, "by_username")) { rulestruct[counters->rulecount].threshold_method = 3; } if (Sagan_strstr(tmptoken, "by_srcport")) { rulestruct[counters->rulecount].threshold_method = 4; } if (Sagan_strstr(tmptoken, "by_dstport")) { rulestruct[counters->rulecount].threshold_method = 5; } } if (Sagan_strstr(tmptoken, "count")) { tmptok_tmp = strtok_r(tmptoken, " ", &saveptrrule3); tmptok_tmp = strtok_r(NULL, " ", &saveptrrule3); rulestruct[counters->rulecount].threshold_count = atoi(tmptok_tmp); } if (Sagan_strstr(tmptoken, "seconds")) { tmptok_tmp = strtok_r(tmptoken, " ", &saveptrrule3); tmptok_tmp = strtok_r(NULL, " ", &saveptrrule3 ); rulestruct[counters->rulecount].threshold_seconds = atoi(tmptok_tmp); } tmptoken = strtok_r(NULL, ",", &saveptrrule2); } } /* "after"; similar to thresholding, but the opposite direction */ if (!strcmp(rulesplit, "after" )) { tok_tmp = strtok_r(NULL, ":", &saveptrrule2); tmptoken = strtok_r(tok_tmp, ",", &saveptrrule2); while( tmptoken != NULL ) { if (Sagan_strstr(tmptoken, "track")) { /* DEBUG/FIXME: This needs to line up with sagan-defs! */ if (Sagan_strstr(tmptoken, "by_src")) { rulestruct[counters->rulecount].after_method = 1; } if (Sagan_strstr(tmptoken, "by_dst")) { rulestruct[counters->rulecount].after_method = 2; } if (Sagan_strstr(tmptoken, "by_username")) { rulestruct[counters->rulecount].after_method = 3; } if (Sagan_strstr(tmptoken, "by_srcport")) { rulestruct[counters->rulecount].after_method = 4; } if (Sagan_strstr(tmptoken, "by_dstport")) { rulestruct[counters->rulecount].after_method = 5; } } if (Sagan_strstr(tmptoken, "count")) { tmptok_tmp = strtok_r(tmptoken, " ", &saveptrrule3); tmptok_tmp = strtok_r(NULL, " ", &saveptrrule3); rulestruct[counters->rulecount].after_count = atoi(tmptok_tmp); } if (Sagan_strstr(tmptoken, "seconds")) { tmptok_tmp = strtok_r(tmptoken, " ", &saveptrrule3); tmptok_tmp = strtok_r(NULL, " ", &saveptrrule3 ); rulestruct[counters->rulecount].after_seconds = atoi(tmptok_tmp); } tmptoken = strtok_r(NULL, ",", &saveptrrule2); } } /* Blacklist */ if (!strcmp(rulesplit, "blacklist")) { tok_tmp = strtok_r(NULL, ":", &saveptrrule2); if ( tok_tmp == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s on line %d appears to be incorrect. \"blacklist:\" options appear incomplete.", __FILE__, __LINE__, ruleset, linecount); } Remove_Spaces(tok_tmp); tmptoken = strtok_r(tok_tmp, "," , &saveptrrule3); while( tmptoken != NULL ) { found = 0; if (!strcmp(tmptoken, "by_src")) { rulestruct[counters->rulecount].blacklist_ipaddr_src = 1; rulestruct[counters->rulecount].blacklist_flag = 1; found = 1; } if (!strcmp(tmptoken, "by_dst")) { rulestruct[counters->rulecount].blacklist_ipaddr_dst = 1; rulestruct[counters->rulecount].blacklist_flag = 1; found = 1; } if (!strcmp(tmptoken, "both")) { rulestruct[counters->rulecount].blacklist_ipaddr_both = 1; rulestruct[counters->rulecount].blacklist_flag = 1; found = 1; } if (!strcmp(tmptoken, "all")) { rulestruct[counters->rulecount].blacklist_ipaddr_all = 1; rulestruct[counters->rulecount].blacklist_flag = 1; found = 1; } tmptoken = strtok_r(NULL, ",", &saveptrrule3); } } /* Bro Intel */ if (!strcmp(rulesplit, "bro-intel")) { tok_tmp = strtok_r(NULL, ":", &saveptrrule2); if ( tok_tmp == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s on line %d appears to be incorrect. \"bro-intel:\" options appear incomplete.", __FILE__, __LINE__, ruleset, linecount); } Remove_Spaces(tok_tmp); tmptoken = strtok_r(tok_tmp, "," , &saveptrrule3); while( tmptoken != NULL ) { found = 0; if (!strcmp(tmptoken, "by_src")) { rulestruct[counters->rulecount].brointel_ipaddr_src = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "by_dst")) { rulestruct[counters->rulecount].brointel_ipaddr_dst = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "both")) { rulestruct[counters->rulecount].brointel_ipaddr_both = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "all")) { rulestruct[counters->rulecount].brointel_ipaddr_all = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "domain")) { rulestruct[counters->rulecount].brointel_domain = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "file_hash")) { rulestruct[counters->rulecount].brointel_file_hash = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "url")) { rulestruct[counters->rulecount].brointel_url = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "software")) { rulestruct[counters->rulecount].brointel_software = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "email")) { rulestruct[counters->rulecount].brointel_email = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "user_name")) { rulestruct[counters->rulecount].brointel_user_name = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "file_name")) { rulestruct[counters->rulecount].brointel_file_name = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if (!strcmp(tmptoken, "cert_hash")) { rulestruct[counters->rulecount].brointel_cert_hash = 1; rulestruct[counters->rulecount].brointel_flag = 1; found = 1; } if ( found == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] %s on line %d has an unknown \"brointel\" option \"%s\".", __FILE__, __LINE__, ruleset, linecount, tmptoken); } tmptoken = strtok_r(NULL, ",", &saveptrrule3); } } if (!strcmp(rulesplit, "external")) { tok_tmp = strtok_r(NULL, ":", &saveptrrule2); if ( tok_tmp == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has 'external' option but not external 'program' is specified!", __FILE__, __LINE__, ruleset, linecount); } Remove_Spaces(tok_tmp); if (stat(tok_tmp, &filecheck) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has 'external' option but external program '%s' does not exist! Abort!", __FILE__, __LINE__, ruleset, linecount, tok_tmp); } if (access(tok_tmp, X_OK) == -1) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has 'external' option but external program '%s' is not executable! Abort!", __FILE__, __LINE__, ruleset, linecount, tok_tmp); } rulestruct[counters->rulecount].external_flag = 1; strlcpy(rulestruct[counters->rulecount].external_program, tok_tmp, sizeof(rulestruct[counters->rulecount].external_program)); } #ifdef WITH_BLUEDOT if (!strcmp(rulesplit, "bluedot")) { if ( config->bluedot_flag == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has 'bluedot' option enabled, but 'processor bluedot' is not configured!", __FILE__, __LINE__, ruleset, linecount); } tmptoken = strtok_r(NULL, ",", &saveptrrule2); if (!Sagan_strstr(tmptoken, "type")) { Sagan_Log(S_ERROR, "[%s, line %d] No Bluedot 'type' found in %s at line %d", __FILE__, __LINE__, ruleset, linecount); } if ( Sagan_strstr(tmptoken, "type" )) { if ( Sagan_strstr(tmptoken, "ip_reputation" )) { tmptoken = strtok_r(NULL, ",", &saveptrrule2); if ( Sagan_strstr(tmptoken, "track" )) { /* 1 == src, 2 == dst, 3 == both, 4 == all */ if ( Sagan_strstr(tmptoken, "by_src" )) { rulestruct[counters->rulecount].bluedot_ipaddr_type = 1; } if ( Sagan_strstr(tmptoken, "by_dst" )) { rulestruct[counters->rulecount].bluedot_ipaddr_type = 2; } if ( Sagan_strstr(tmptoken, "both" )) { rulestruct[counters->rulecount].bluedot_ipaddr_type = 3; } if ( Sagan_strstr(tmptoken, "all" )) { rulestruct[counters->rulecount].bluedot_ipaddr_type = 4; } if ( rulestruct[counters->rulecount].bluedot_ipaddr_type == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] No Bluedot by_src, by_dst, both or all specified in %s at line %d.", __FILE__, __LINE__, ruleset, linecount); } } tmptoken = strtok_r(NULL, ",", &saveptrrule2); if (!Sagan_strstr(tmptoken, "mdate_effective_period" ) && !Sagan_strstr(tmptoken, "cdate_effective_period" ) && !Sagan_strstr(tmptoken, "none" )) { Sagan_Log(S_ERROR, "[%s, line %d] No Bluedot 'mdate_effective_period', 'cdate_effective_period' or 'none' not specified in %s at line %d", __FILE__, __LINE__, ruleset, linecount); } if (!Sagan_strstr(tmptoken, "none")) { tok_tmp = strtok_r(tmptoken, " ", &saveptrrule3); if (Sagan_strstr(tmptoken, "mdate_effective_period" )) { bluedot_time = strtok_r(NULL, " ", &saveptrrule3); if ( bluedot_time == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has no Bluedot numeric time value.", __FILE__, __LINE__, ruleset, linecount); } bluedot_type = strtok_r(NULL, " ", &saveptrrule3); if ( bluedot_type == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has not Bluedot timeframe type (hour, week, month, year, etc) specified.", __FILE__, __LINE__, ruleset, linecount); } Remove_Spaces(bluedot_time); Remove_Spaces(bluedot_type); bluedot_time_u32 = atol(bluedot_time); if ( bluedot_time_u32 == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has no or invalid Bluedot timeframe.", __FILE__, __LINE__, ruleset, linecount); } rulestruct[counters->rulecount].bluedot_mdate_effective_period = Sagan_Value_To_Seconds(bluedot_type, bluedot_time_u32); } else if (Sagan_strstr(tmptoken, "cdate_effective_period" )) { bluedot_time = strtok_r(NULL, " ", &saveptrrule3); if ( bluedot_time == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has no Bluedot numeric time value.", __FILE__, __LINE__, ruleset, linecount); } bluedot_type = strtok_r(NULL, " ", &saveptrrule3); if ( bluedot_type == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has not Bluedot timeframe type (hour, week, month, year, etc) specified.", __FILE__, __LINE__, ruleset, linecount); } Remove_Spaces(bluedot_time); Remove_Spaces(bluedot_type); bluedot_time_u32 = atol(bluedot_time); if ( bluedot_time_u32 == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has no or invalid Bluedot timeframe.", __FILE__, __LINE__, ruleset, linecount); } rulestruct[counters->rulecount].bluedot_cdate_effective_period = Sagan_Value_To_Seconds(bluedot_type, bluedot_time_u32); } } else { rulestruct[counters->rulecount].bluedot_mdate_effective_period = 0; rulestruct[counters->rulecount].bluedot_cdate_effective_period = 0; } tmptoken = strtok_r(NULL, ";", &saveptrrule2); if ( tmptoken == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has no Bluedot categories defined!", __FILE__, __LINE__, ruleset, linecount); } Remove_Spaces(tmptoken); Sagan_Verify_Categories( tmptoken, counters->rulecount, ruleset, linecount, BLUEDOT_LOOKUP_IP); } if ( Sagan_strstr(tmptoken, "file_hash" )) { rulestruct[counters->rulecount].bluedot_file_hash = 1; tmptok_tmp = Sagan_Var_To_Value(strtok_r(NULL, ";", &saveptrrule2)); /* Support var's */ if ( tmptok_tmp == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has no Bluedot categories defined!", __FILE__, __LINE__, ruleset, linecount, tmptok_tmp); } Sagan_Verify_Categories( tmptok_tmp, counters->rulecount, ruleset, linecount, BLUEDOT_LOOKUP_HASH); } if ( Sagan_strstr(tmptoken, "url" )) { rulestruct[counters->rulecount].bluedot_url = 1; tmptok_tmp = Sagan_Var_To_Value(strtok_r(NULL, ";", &saveptrrule2)); /* Support var's */ if ( tmptok_tmp == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has no Bluedot categories defined!", __FILE__, __LINE__, ruleset, linecount, tmptok_tmp); } Sagan_Verify_Categories( tmptok_tmp, counters->rulecount, ruleset, linecount, BLUEDOT_LOOKUP_URL); } if ( Sagan_strstr(tmptoken, "filename" )) { rulestruct[counters->rulecount].bluedot_filename = 1; tmptok_tmp = Sagan_Var_To_Value(strtok_r(NULL, ";", &saveptrrule2)); /* Support var's */ if ( tmptok_tmp == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] %s at line %d has no Bluedot categories defined!", __FILE__, __LINE__, ruleset, linecount, tmptok_tmp); } Sagan_Verify_Categories( tmptok_tmp, counters->rulecount, ruleset, linecount, BLUEDOT_LOOKUP_FILENAME); } /* Error check ( set flag? */ } } #endif #ifndef WITH_BLUEDOT if (!strcmp(rulesplit, "bluedot")) { Sagan_Log(S_ERROR, "%s has Bluedot rules, but support isn't compiled in! Abort!", ruleset); } #endif /* -< Go to next line >- */ tokenrule = strtok_r(NULL, ";", &saveptrrule1); } /* Some new stuff (normalization) stuff needs to be added */ if ( debug->debugload ) { Sagan_Log(S_DEBUG, "---[Rule %s]------------------------------------------------------", rulestruct[counters->rulecount].s_sid); Sagan_Log(S_DEBUG, "= sid: %s", rulestruct[counters->rulecount].s_sid); Sagan_Log(S_DEBUG, "= rev: %s", rulestruct[counters->rulecount].s_rev); Sagan_Log(S_DEBUG, "= msg: %s", rulestruct[counters->rulecount].s_msg); Sagan_Log(S_DEBUG, "= pri: %d", rulestruct[counters->rulecount].s_pri); Sagan_Log(S_DEBUG, "= classtype: %s", rulestruct[counters->rulecount].s_classtype); Sagan_Log(S_DEBUG, "= drop: %d", rulestruct[counters->rulecount].drop); Sagan_Log(S_DEBUG, "= dst_port: %d", rulestruct[counters->rulecount].dst_port); if ( rulestruct[counters->rulecount].s_find_src_ip != 0 ) { Sagan_Log(S_DEBUG, "= parse_src_ip"); } if ( rulestruct[counters->rulecount].s_find_port != 0 ) { Sagan_Log(S_DEBUG, "= parse_port"); } for (i=0; irulecount].s_content[i]); } for (i=0; irulecount].s_reference[i]); } } /* Reset for next rule */ pcre_count=0; content_count=0; meta_content_count=0; meta_content_converted_count=0; flowbit_count=0; netcount=0; ref_count=0; flow_1_count=0; flow_2_count=0; memset(netstr, 0, sizeof(netstr)); memset(rulestr, 0, sizeof(rulestr)); counters->rulecount++; } /* end of while loop */ fclose(rulesfile); } sagan-1.1.2/src/sagan-protocol-map.h0000644000175000017500000000273312770372750016230 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif /* Storage for protocol.map (program search) */ typedef struct _Sagan_Protocol_Map_Program _Sagan_Protocol_Map_Program; struct _Sagan_Protocol_Map_Program { int type; int proto; int nocase; char program[64]; }; /* Storage for protocol.map (message search) */ typedef struct _Sagan_Protocol_Map_Message _Sagan_Protocol_Map_Message; struct _Sagan_Protocol_Map_Message { int type; int proto; int nocase; char search[512]; }; void Load_Protocol_Map( const char * ); sagan-1.1.2/src/parsers/0000755000175000017500000000000012770372750014026 5ustar champchampsagan-1.1.2/src/parsers/parse-proto.c0000644000175000017500000000571712770372750016457 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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 routine search the syslog message and/or program for clues about * what protocol generated an event. For more information, see the * sagan-protocol-map.c and protocol.map files. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include "sagan-defs.h" #include "sagan.h" #include "version.h" #include "parsers/parsers.h" #include "sagan-protocol-map.h" struct _SaganConfig *config; struct _SaganCounters *counters; struct _Sagan_Protocol_Map_Message *map_message; struct _Sagan_Protocol_Map_Program *map_program; /**************************************************************************** * Sagan_Parse_Proto - Searches for simple clues from the message about what * protocl might have generated this event ****************************************************************************/ int Sagan_Parse_Proto( char *msg ) { int i; for (i = 0; i < counters->mapcount_message; i++) { if ( map_message[i].nocase == 1 ) { if (Sagan_stristr(msg, map_message[i].search, true)) { return(map_message[i].proto); } } else { if (Sagan_strstr(msg, map_message[i].search)) { return(map_message[i].proto); } } } return(0); } /**************************************************************************** * Sagan_Parse_Proto_Program - Attempts to determine the protocol that generate * the event by the program that generate it. ****************************************************************************/ int Sagan_Parse_Proto_Program( char *program ) { int i; for (i = 0; i < counters->mapcount_program; i++) { if ( map_program[i].nocase == 1 ) { if (Sagan_stristr(program, map_program[i].program, true)) { return(map_program[i].proto); } } else { if (Sagan_strstr(program, map_program[i].program)) { return(map_program[i].proto); } } } return(0); } sagan-1.1.2/src/parsers/parsers.h0000644000175000017500000000245512770372750015664 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include "parsers/sagan-strstr/sagan-strstr-hook.h" char *Sagan_Parse_IP( char *, int ); int Sagan_Parse_Src_Port( char * ); int Sagan_Parse_Dst_Port( char * ); int Sagan_Parse_Proto( char * ); int Sagan_Parse_Proto_Program( char * ); char *Sagan_Parse_Hash(char *, int ); char *Sagan_Parse_Hash_Cleanup(char *); sagan-1.1.2/src/parsers/parse-port.c0000644000175000017500000001640112770372750016270 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* parse-port.c * * A simple method of finding a port in a syslog message. An example message * might be "Invalid connection from 12.145.241.50 on port 22". This code * would pull the port "22". This is part of the "parse_port_simple" * Sagan rules flag. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "version.h" #include "sagan-config.h" #include "parsers/parsers.h" struct _SaganConfig *config; int Sagan_Parse_Src_Port (char *msg) { int port; char *portstring=NULL; char *saveptr1=NULL; char *saveptr2=NULL; char *str=NULL; char *token=NULL; char *tmpport=NULL; int i; struct sockaddr_in sa; int result; port = config->sagan_port; char tmpmsg[MAX_SYSLOGMSG]; snprintf(tmpmsg, sizeof(tmpmsg), "%s", msg); To_UpperC(tmpmsg); /* See if the word " port" is in the string */ if ( Sagan_strstr(tmpmsg, " PORT ")) { portstring = strtok_r(tmpmsg, " ", &saveptr1); for ( i = 0, str = portstring; ; i++, str == NULL ) { token = strtok_r(NULL, " ", &saveptr1); if ( token == NULL ) break; /* tokenize by " ", grab string after "port". */ if (!strcmp(token, "PORT")) { tmpport = strtok_r(NULL, " ", &saveptr1); if (tmpport == NULL) break; /* if it's a number, set it. If not, default */ if (Is_Numeric(tmpport)) { port=atoi(tmpport); return(port); } else { /* drop last char. Sometimes port ends in port "#." */ tmpport[strlen(tmpport) - 1] = '\0'; if (Is_Numeric(tmpport)) { port=atoi(tmpport); return(port); } } } } } snprintf(tmpmsg, sizeof(tmpmsg), "%s", msg); To_UpperC(tmpmsg); /* See if the word " spt" (source port) is in the string */ /* We accept " spt[any char except space][a port number]" */ if ( Sagan_strstr(tmpmsg, " SPT")) { portstring = strtok_r(tmpmsg, " ", &saveptr1); for ( i = 0, str = portstring; ; i++, str == NULL ) { token = strtok_r(NULL, " ", &saveptr1); if ( token == NULL ) break; /* tokenize by " ", grab string after "spt". */ if (!strncmp(token, "SPT", 3)) { if (token[3] == '\0') break; /* if it's a number, set it. If not, default */ if (Is_Numeric(token + 4)) { port=atoi(token + 4); } } } } snprintf(tmpmsg, sizeof(tmpmsg), "%s", msg); To_UpperC(tmpmsg); if ( Sagan_strstr(tmpmsg, ":")) { portstring = strtok_r(tmpmsg, ":", &saveptr1); token = strtok_r(portstring, " ", &saveptr2); for ( i = 0, str = portstring; ; i++, str == NULL ) { token = strtok_r(NULL, " ", &saveptr2); if ( token == NULL ) break; result = inet_pton(AF_INET, token, &(sa.sin_addr)); /* Found IP, get the port */ if ( result != 0 ) { /* IP:PORT */ portstring = strtok_r(NULL, ":", &saveptr1); if (Is_Numeric(portstring)) { port=atoi(portstring); return(port); } else { /* IP:PORT string or IP::PORT */ token = strtok_r(portstring, " ", &saveptr1); if (Is_Numeric(token)) { port=atoi(portstring); return(port); } } } } } snprintf(tmpmsg, sizeof(tmpmsg), "%s", msg); To_UpperC(tmpmsg); if ( Sagan_strstr(tmpmsg, "#")) { portstring = strtok_r(tmpmsg, "#", &saveptr1); token = strtok_r(portstring, " ", &saveptr2); for ( i = 0, str = portstring; ; i++, str == NULL ) { token = strtok_r(NULL, " ", &saveptr2); if ( token == NULL ) break; result = inet_pton(AF_INET, token, &(sa.sin_addr)); /* Found IP, get the port */ if ( result != 0 ) { /* IP#PORT */ portstring = strtok_r(NULL, "#", &saveptr1); if (Is_Numeric(portstring)) { port=atoi(portstring); return(port); } else { /* IP:PORT string or IP##PORT */ token = strtok_r(portstring, " ", &saveptr1); if (Is_Numeric(token)) { port=atoi(token); return(port); } else { token[strlen(token) - 1] = '\0'; if (Is_Numeric(token)) { port=atoi(token); return(port); } } } } } } return(port); } int Sagan_Parse_Dst_Port (char *msg) { int port; char *portstring=NULL; char *saveptr1=NULL; char *str=NULL; char *token=NULL; int i; port = config->sagan_port; char tmpmsg[MAX_SYSLOGMSG]; snprintf(tmpmsg, sizeof(tmpmsg), "%s", msg); To_UpperC(tmpmsg); /* See if the word " dpt" (destination port) is in the string */ /* We accept " dpt[any char except space][a port number]" */ if ( Sagan_strstr(tmpmsg, " DPT")) { portstring = strtok_r(tmpmsg, " ", &saveptr1); for ( i = 0, str = portstring; ; i++, str == NULL ) { token = strtok_r(NULL, " ", &saveptr1); if ( token == NULL ) break; /* tokenize by " ", grab string after "dpt". */ if (!strncmp(token, "DPT", 3)) { if (token[3] == '\0') break; /* if it's a number, set it. If not, default */ if (Is_Numeric(token + 4)) { port=atoi(token + 4); } } } } return(port); } sagan-1.1.2/src/parsers/parse-ip.c0000644000175000017500000001002512770372750015710 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* parse-ip.c * * Simple method of "finding" the "real" IP address from a syslog message. This * works with OpenSSH and messages of that nature. An example message might be: * "Invalid login from 12.145.241.50". This will pull the 12.145.241.50. This * is part of the "parse_ip" Sagan rules flag. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-config.h" #include "version.h" #include "parsers/parsers.h" struct _SaganConfig *config; char *Sagan_Parse_IP( char *syslogmessage, int pos ) { int result_space, result_nonspace, i, b; int flag=0; int current_pos=0; int notfound=0; char ctmp[2] = { 0 }; static __thread char lastgood[16] = { 0 }; char msg[MAX_SYSLOGMSG] = { 0 }; char tmpmsg[MAX_SYSLOGMSG] = { 0 }; char *retbuf=(char*)malloc(16); char *tok=NULL; char *ptmp=NULL; struct sockaddr_in sa; snprintf(tmpmsg, sizeof(tmpmsg), "%s", syslogmessage); ptmp = strtok_r(tmpmsg, " ", &tok); while (ptmp != NULL ) { if (Sagan_strstr(ptmp, ".")) { result_space = inet_pton(AF_INET, ptmp, &(sa.sin_addr)); /* If we already have a good IP, return it. We can sometimes skips * the next steps */ if ( result_space != 0 && strcmp(ptmp, "127.0.0.1")) { current_pos++; if ( current_pos == pos ) { return(ptmp); } } else { notfound = 1; } /* Start tearing apart the substring */ if ( notfound == 1 ) { for (b=0; b < strlen(ptmp); b++) { for (i = b; i < strlen(ptmp); i++) { snprintf(ctmp, sizeof(ctmp), "%c", ptmp[i]); strlcat(msg, ctmp, sizeof(msg)); result_nonspace = inet_pton(AF_INET, msg, &(sa.sin_addr)); if ( result_nonspace != 0 ) { strlcpy(lastgood, msg, sizeof(lastgood)); flag=1; } if ( flag == 1 && result_nonspace == 0 ) { current_pos++; if ( current_pos == pos ) { if (!strcmp(lastgood, "127.0.0.1")) { return(config->sagan_host); } retbuf = (char*)&lastgood; return(retbuf); } flag = 0; i=i+strlen(lastgood); b=b+strlen(lastgood); break; } } strlcpy(msg, "", sizeof(msg)); } } notfound = 0; } ptmp = strtok_r(NULL, " ", &tok); } return("0"); } sagan-1.1.2/src/parsers/sagan-strstr/0000755000175000017500000000000012770372750016456 5ustar champchampsagan-1.1.2/src/parsers/sagan-strstr/strstr_sse2.S0000644000175000017500000001716112770372750021105 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* strstr_sse2.S * * This "hooks" in the "Sagan_strstr" function for CPUs supporting SSE2. * This code is based on work by Ondra B�lk and the glibc projects. * * His code/original post can be found at: * * http://comments.gmane.org/gmane.comp.lib.glibc.alpha/34531 * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifndef WITH_SYSSTRSTR /* If NOT using system built in strstr */ #ifdef HAVE_SSE2 #ifndef ALIGN # define ALIGN(n) .p2align n #endif .text .globl __strstr_sse2_unaligned .type __strstr_sse2_unaligned, @function __strstr_sse2_unaligned: .LFB0: .cfi_startproc movzbl (%rsi), %eax testb %al, %al je .Lempty movzbl 1(%rsi), %edx testb %dl, %dl je .Lstrchr movd %eax, %xmm1 movd %edx, %xmm2 movq %rdi, %rax andl $4095, %eax punpcklbw %xmm1, %xmm1 cmpq $4031, %rax punpcklbw %xmm2, %xmm2 punpcklwd %xmm1, %xmm1 punpcklwd %xmm2, %xmm2 pshufd $0, %xmm1, %xmm1 pshufd $0, %xmm2, %xmm2 ja .Lcross_page movdqu (%rdi), %xmm3 pxor %xmm5, %xmm5 movdqu 1(%rdi), %xmm4 movdqa %xmm3, %xmm6 pcmpeqb %xmm1, %xmm3 pcmpeqb %xmm2, %xmm4 movdqu 16(%rdi), %xmm0 pcmpeqb %xmm5, %xmm6 pminub %xmm4, %xmm3 movdqa %xmm3, %xmm4 movdqu 17(%rdi), %xmm3 pcmpeqb %xmm0, %xmm5 pcmpeqb %xmm2, %xmm3 por %xmm6, %xmm4 pcmpeqb %xmm1, %xmm0 pminub %xmm3, %xmm0 por %xmm5, %xmm0 pmovmskb %xmm4, %r8d pmovmskb %xmm0, %eax salq $16, %rax orq %rax, %r8 je .Lnext_32_bytes .Lnext_pair_index: bsf %r8, %rax addq %rdi, %rax cmpb $0, (%rax) je .Lzero1 movzbl 2(%rsi), %edx testb %dl, %dl je .Lfound1 cmpb 2(%rax), %dl jne .Lnext_pair xorl %edx, %edx jmp .Lpair_loop_start ALIGN (4) .Lstrchr: movzbl %al, %esi jmp strchr@PLT ALIGN (4) .Lpair_loop: addq $1, %rdx cmpb 2(%rax,%rdx), %cl jne .Lnext_pair .Lpair_loop_start: movzbl 3(%rsi,%rdx), %ecx testb %cl, %cl jne .Lpair_loop .Lfound1: ret .Lzero1: xorl %eax, %eax ret ALIGN (4) .Lnext_pair: leaq -1(%r8), %rax andq %rax, %r8 jne .Lnext_pair_index ALIGN (4) .Lnext_32_bytes: movdqu 32(%rdi), %xmm3 pxor %xmm5, %xmm5 movdqu 33(%rdi), %xmm4 movdqa %xmm3, %xmm6 pcmpeqb %xmm1, %xmm3 pcmpeqb %xmm2, %xmm4 movdqu 48(%rdi), %xmm0 pcmpeqb %xmm5, %xmm6 pminub %xmm4, %xmm3 movdqa %xmm3, %xmm4 movdqu 49(%rdi), %xmm3 pcmpeqb %xmm0, %xmm5 pcmpeqb %xmm2, %xmm3 por %xmm6, %xmm4 pcmpeqb %xmm1, %xmm0 pminub %xmm3, %xmm0 por %xmm5, %xmm0 pmovmskb %xmm4, %eax salq $32, %rax pmovmskb %xmm0, %r8d salq $48, %r8 orq %rax, %r8 je .Lloop_header .Lnext_pair2_index: bsfq %r8, %rax addq %rdi, %rax cmpb $0, (%rax) je .Lzero2 movzbl 2(%rsi), %edx testb %dl, %dl je .Lfound2 cmpb 2(%rax), %dl jne .Lnext_pair2 xorl %edx, %edx jmp .Lpair_loop2_start ALIGN (4) .Lpair_loop2: addq $1, %rdx cmpb 2(%rax,%rdx), %cl jne .Lnext_pair2 .Lpair_loop2_start: movzbl 3(%rsi,%rdx), %ecx testb %cl, %cl jne .Lpair_loop2 .Lfound2: ret .Lzero2: xorl %eax, %eax ret .Lempty: mov %rdi, %rax ret ALIGN (4) .Lnext_pair2: leaq -1(%r8), %rax andq %rax, %r8 jne .Lnext_pair2_index .Lloop_header: movq $-512, %r11 movq %rdi, %r9 pxor %xmm7, %xmm7 andq $-64, %rdi ALIGN (4) .Lloop: movdqa 64(%rdi), %xmm3 movdqu 63(%rdi), %xmm6 movdqa %xmm3, %xmm0 pxor %xmm2, %xmm3 pxor %xmm1, %xmm6 movdqa 80(%rdi), %xmm10 por %xmm3, %xmm6 pminub %xmm10, %xmm0 movdqu 79(%rdi), %xmm3 pxor %xmm2, %xmm10 pxor %xmm1, %xmm3 movdqa 96(%rdi), %xmm9 por %xmm10, %xmm3 pminub %xmm9, %xmm0 pxor %xmm2, %xmm9 movdqa 112(%rdi), %xmm8 addq $64, %rdi pminub %xmm6, %xmm3 movdqu 31(%rdi), %xmm4 pminub %xmm8, %xmm0 pxor %xmm2, %xmm8 pxor %xmm1, %xmm4 por %xmm9, %xmm4 pminub %xmm4, %xmm3 movdqu 47(%rdi), %xmm5 pxor %xmm1, %xmm5 por %xmm8, %xmm5 pminub %xmm5, %xmm3 pminub %xmm3, %xmm0 pcmpeqb %xmm7, %xmm0 pmovmskb %xmm0, %eax testl %eax, %eax je .Lloop pminub (%rdi), %xmm6 pminub 32(%rdi),%xmm4 pminub 48(%rdi),%xmm5 pcmpeqb %xmm7, %xmm6 pcmpeqb %xmm7, %xmm5 pmovmskb %xmm6, %edx movdqa 16(%rdi), %xmm8 pcmpeqb %xmm7, %xmm4 movdqu 15(%rdi), %xmm0 pmovmskb %xmm5, %r8d movdqa %xmm8, %xmm3 pmovmskb %xmm4, %ecx pcmpeqb %xmm1,%xmm0 pcmpeqb %xmm2,%xmm3 salq $32, %rcx pcmpeqb %xmm7,%xmm8 salq $48, %r8 pminub %xmm0,%xmm3 orq %rcx, %rdx por %xmm3,%xmm8 orq %rdx, %r8 pmovmskb %xmm8, %eax salq $16, %rax orq %rax, %r8 .Lnext_pair_index3: bsfq %r8, %rcx addq %rdi, %rcx cmpb $0, (%rcx) je .Lzero xorl %eax, %eax movzbl 2(%rsi), %edx testb %dl, %dl je .Lsuccess3 cmpb 1(%rcx), %dl jne .Lnext_pair3 jmp .Lpair_loop_start3 ALIGN (4) .Lpair_loop3: addq $1, %rax cmpb 1(%rcx,%rax), %dl jne .Lnext_pair3 .Lpair_loop_start3: movzbl 3(%rsi,%rax), %edx testb %dl, %dl jne .Lpair_loop3 .Lsuccess3: lea -1(%rcx), %rax ret ALIGN (4) .Lnext_pair3: addq %rax, %r11 movq %rdi, %rax subq %r9, %rax cmpq %r11, %rax jl .Lswitch_strstr leaq -1(%r8), %rax andq %rax, %r8 jne .Lnext_pair_index3 jmp .Lloop ALIGN (4) .Lswitch_strstr: movq %rdi, %rdi jmp strstr@PLT ALIGN (4) .Lcross_page: movq %rdi, %rax pxor %xmm0, %xmm0 andq $-64, %rax movdqa (%rax), %xmm3 movdqu -1(%rax), %xmm4 movdqa %xmm3, %xmm8 movdqa 16(%rax), %xmm5 pcmpeqb %xmm1, %xmm4 pcmpeqb %xmm0, %xmm8 pcmpeqb %xmm2, %xmm3 movdqa %xmm5, %xmm7 pminub %xmm4, %xmm3 movdqu 15(%rax), %xmm4 pcmpeqb %xmm0, %xmm7 por %xmm3, %xmm8 movdqa %xmm5, %xmm3 movdqa 32(%rax), %xmm5 pcmpeqb %xmm1, %xmm4 pcmpeqb %xmm2, %xmm3 movdqa %xmm5, %xmm6 pmovmskb %xmm8, %ecx pminub %xmm4, %xmm3 movdqu 31(%rax), %xmm4 por %xmm3, %xmm7 movdqa %xmm5, %xmm3 pcmpeqb %xmm0, %xmm6 movdqa 48(%rax), %xmm5 pcmpeqb %xmm1, %xmm4 pmovmskb %xmm7, %r8d pcmpeqb %xmm2, %xmm3 pcmpeqb %xmm5, %xmm0 pminub %xmm4, %xmm3 movdqu 47(%rax), %xmm4 por %xmm3, %xmm6 movdqa %xmm5, %xmm3 salq $16, %r8 pcmpeqb %xmm1, %xmm4 pcmpeqb %xmm2, %xmm3 pmovmskb %xmm6, %r10d pminub %xmm4, %xmm3 por %xmm3, %xmm0 salq $32, %r10 orq %r10, %r8 orq %rcx, %r8 movl %edi, %ecx pmovmskb %xmm0, %edx subl %eax, %ecx salq $48, %rdx orq %rdx, %r8 shrq %cl, %r8 je .Lloop_header .Lnext_pair_index4: bsfq %r8, %rax addq %rdi, %rax cmpb $0, (%rax) je .Lzero cmpq %rax,%rdi je .Lnext_pair4 movzbl 2(%rsi), %edx testb %dl, %dl je .Lfound3 cmpb 1(%rax), %dl jne .Lnext_pair4 xorl %edx, %edx jmp .Lpair_loop_start4 ALIGN (4) .Lpair_loop4: addq $1, %rdx cmpb 1(%rax,%rdx), %cl jne .Lnext_pair4 .Lpair_loop_start4: movzbl 3(%rsi,%rdx), %ecx testb %cl, %cl jne .Lpair_loop4 .Lfound3: subq $1, %rax ret ALIGN (4) .Lnext_pair4: leaq -1(%r8), %rax andq %rax, %r8 jne .Lnext_pair_index4 jmp .Lloop_header ALIGN (4) .Lfound: rep ret ALIGN (4) .Lzero: xorl %eax, %eax ret .cfi_endproc .LFE0: .size __strstr_sse2_unaligned, .-__strstr_sse2_unaligned .ident "Sagan builtin strstr_sse2_unligned function" .section .note.GNU-stack,"",@progbits #endif #endif sagan-1.1.2/src/parsers/sagan-strstr/sagan-strstr-hook.c0000644000175000017500000000647712770372750022226 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-strstr-hook.c * * This "hooks" in the "Sagan_strstr" function for CPUs supporting SSE2. * This code is based on work by Ondra Bílk and the glibc projects. * * His code/original post can be found at: * * http://comments.gmane.org/gmane.comp.lib.glibc.alpha/34531 * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-strstr-hook.h" #ifndef WITH_SYSSTRSTR /* If NOT using system built in strstr */ #if defined(HAVE_SSE2) && SIZEOF_SIZE_T == 8 /* And our CPU supports SSE2 & is the CPU 64 bit */ /* This function takes advantage of CPUs with SSE2 */ char *Sagan_strstr(const char *_x,const char *_y) { char *x= (char*) _x, *y=(char*)_y; char* (*fn)(char *,char *) = function_func[0]; char * p=fn(x,y); return p; } #else /* * Non-SSE2 CPUs get to use the pure C function. This code is based * off Dale Moore mine3a. Information can be found at: * * http://computer-programming-forum.com/47-c-language/69de641587bbb919.htm * */ char *Sagan_strstr(const char *_x, const char *_y) { size_t len = strlen (_y); if (!*_y) return (char *) _x; for (;;) { if (!(_x = strchr (_x, *_y))) return NULL; if (!strncmp (_x, _y, len)) return (char *) _x; _x++; } } #endif /* This works similar to "strcasestr". The "needle" (_y) is assumed to * already be converted to lowercase if "needle_lower" is FALSE. * * 0/FALSE == Don't convert needle * 1/TRUE == Convert needle */ char *Sagan_stristr(const char *_x, const char *_y, sbool needle_lower ) { char *p = NULL; char haystack_string[MAX_SYSLOGMSG] = { 0 }; char needle_string[512] = { 0 }; strlcpy(haystack_string, _x, sizeof(haystack_string)); To_LowerC(haystack_string); strlcpy(needle_string, _y, sizeof(needle_string)); if ( needle_lower ) { To_LowerC(needle_string); } p = Sagan_strstr( haystack_string, needle_string); return p; } #else /**************************************************************************** * To use the system standard strstr() ****************************************************************************/ char *Sagan_strstr(const char *_x, const char *_y) { return (strstr(_x, _y)); } char *Sagan_stristr(const char *_x, const char *_y, sbool needle_lower ) { return (strcasestr(_x, _y)); } #endif sagan-1.1.2/src/parsers/sagan-strstr/strstr_sse4_2.S0000644000175000017500000002753412770372750021335 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* strstr_sse4_2.S * * This "hooks" in the "Sagan_strstr" function for CPUs supporting SSE2. * This code is based on work by Ondra B�lk and the glibc projects. * * His code/original post can be found at: * * http://comments.gmane.org/gmane.comp.lib.glibc.alpha/34531 * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifndef WITH_SYSSTRSTR /* If NOT using system built in strstr */ #ifdef HAVE_SSE2 # sse4_2 __strstr_sse42 black .file "strstr.c" .section .text.sse4.2,"ax",@progbits .p2align 4,,15 .globl __strstr_sse42 .type __strstr_sse42, @function __strstr_sse42: .LFB638: .cfi_startproc movzbl (%rsi), %edx movq %rdi, %r10 testb %dl, %dl je .L118 movzbl (%rdi), %eax testb %al, %al je .L117 cmpb $0, 1(%rdi) je .L123 movq %rdi, %rax andl $4095, %eax cmpl $4080, %eax jg .L124 .L6: movdqu (%r10), %xmm1 .L7: cmpb $0, 1(%rsi) jne .L125 pxor %xmm2, %xmm2 pinsrb $0, (%rsi), %xmm2 .L11: pcmpistri $12, %xmm1, %xmm2 movl $0, %eax movl $0, %r8d movdqa %xmm2, %xmm4 setc %al sets %r8b sete %dl testl %eax, %r8d movl %ecx, %edi movzbl %dl, %edx je .L12 pxor %xmm1, %xmm1 movslq %ecx, %rax movdqa %xmm2, %xmm3 addq %rax, %r10 pcmpeqb %xmm1, %xmm3 pmovmskb %xmm3, %r9d #APP # 222 "strstr.c" 1 bsfl %r9d, %r9d # 0 "" 2 #NO_APP addl %r9d, %edi cmpl $16, %edi jle .L118 movq %r10, %rax andl $4095, %eax cmpl $4080, %eax jg .L126 .L13: movdqu (%r10), %xmm1 .L14: pcmpistri $12, %xmm1, %xmm4 movslq %ecx, %rdi setc %al sets %r8b sete %dl addl %edi, %r9d movzbl %al, %eax cmpl $16, %r9d movzbl %r8b, %r8d movzbl %dl, %edx jg .L12 addq %rdi, %r10 jmp .L118 .p2align 4,,10 .p2align 3 .L12: testl %r8d, %r8d jne .L15 pushq %r15 .cfi_def_cfa_offset 16 .cfi_offset 15, -16 leaq 16(%rsi), %r11 movq %rsi, %rdi xorl %r9d, %r9d pxor %xmm4, %xmm4 pushq %r14 .cfi_def_cfa_offset 24 .cfi_offset 14, -24 movl $3, %r14d pushq %r13 .cfi_def_cfa_offset 32 .cfi_offset 13, -32 movq %rsi, %r13 andl $15, %r13d pushq %r12 .cfi_def_cfa_offset 40 .cfi_offset 12, -40 subq %r13, %rdi movq %r11, %r12 andl $15, %r12d pushq %rbp .cfi_def_cfa_offset 48 .cfi_offset 6, -48 movl %r11d, %ebp andl $4095, %ebp pushq %rbx .cfi_def_cfa_offset 56 .cfi_offset 3, -56 movl %esi, %ebx andl $4095, %ebx movq %rdi, -32(%rsp) movq %r11, %rdi movb %r13b, -10(%rsp) subq %r12, %rdi testl %eax, %eax movb %r12b, -9(%rsp) movq %rdi, -24(%rsp) je .L26 .p2align 4,,10 .p2align 3 .L132: testl %ecx, %ecx jne .L27 testl %edx, %edx jne .L2 cmpl $4080, %ebp leaq 16(%r10), %rax jg .L127 .L28: movdqu (%r11), %xmm2 .L29: movq %r11, %rdx .L30: movq %rax, %rcx andl $4095, %ecx cmpl $4080, %ecx jg .L128 .L31: movdqu (%rax), %xmm3 .L32: pcmpistri $12, %xmm3, %xmm2 sete %r8b movl %ecx, %edi sets %cl movzbl %r8b, %r8d movl %edi, %r15d movzbl %cl, %ecx orl %r8d, %r15d orl %ecx, %r15d jne .L33 .p2align 4,,10 .p2align 3 .L90: addq $16, %rdx addq $16, %rax movq %rdx, %rcx andl $4095, %ecx cmpl $4080, %ecx jg .L129 .L34: movdqu (%rdx), %xmm2 .L35: movq %rax, %rcx andl $4095, %ecx cmpl $4080, %ecx jg .L130 .L36: movdqu (%rax), %xmm3 .L37: pcmpistri $12, %xmm3, %xmm2 sete %r8b sets %dil movl %ecx, %r15d movzbl %r8b, %r8d movzbl %dil, %edi orl %r8d, %r15d orl %edi, %r15d je .L90 movl %edi, %eax movl %ecx, %edi movl %eax, %ecx .L33: testl %edi, %edi sete %al movzbl %al, %edx testl %ecx, %edx jne .L2 testl %r8d, %r8d je .L39 testl %ecx, %ecx je .L5 pcmpeqb %xmm4, %xmm2 pcmpeqb %xmm4, %xmm3 pmovmskb %xmm2, %edx pmovmskb %xmm3, %eax #APP # 350 "strstr.c" 1 bsfl %edx, %edx # 0 "" 2 # 352 "strstr.c" 1 bsfl %eax, %eax # 0 "" 2 #NO_APP cmpl %eax, %edx jge .L5 .L40: cmpl $4080, %ebx jg .L131 .L41: movdqu (%rsi), %xmm2 .L42: testl %r9d, %r9d jne .L43 movdqa %xmm2, %xmm0 movb $16, %r9b movdqa %xmm2, %xmm1 punpcklbw %xmm2, %xmm0 psrldq $1, %xmm1 punpcklbw %xmm0, %xmm0 pshufd $0, %xmm0, %xmm0 pcmpeqb %xmm1, %xmm0 pmovmskb %xmm0, %eax #APP # 144 "strstr.c" 1 bsfl %eax, %edx # 0 "" 2 #NO_APP testl %eax, %eax je .L43 cmpl $32767, %eax movb $1, %r9b je .L43 leal 1(%rdx), %r9d testl %edx, %edx cmove %r14d, %r9d .p2align 4,,10 .p2align 3 .L43: cmpl %edi, %r9d cmovle %r9d, %edi movslq %edi, %rdi addq %rdi, %r10 cmpb $0, (%r10) je .L5 movq %r10, %rax andl $4095, %eax cmpl $4080, %eax jg .L121 .L24: movdqu (%r10), %xmm1 .L25: pcmpistri $12, %xmm1, %xmm2 setc %al sete %dl movzbl %al, %eax movzbl %dl, %edx testl %eax, %eax jne .L132 .L26: testl %edx, %edx jne .L5 addq $16, %r10 movq %r10, %rax andl $4095, %eax cmpl $4080, %eax jle .L24 .L121: movq %r10, %rcx movq %r10, %rax andl $15, %ecx subq %rcx, %rax movdqu (%rax), %xmm0 movdqa %xmm0, %xmm1 pcmpeqb %xmm4, %xmm1 pmovmskb %xmm1, %eax sarl %cl, %eax testl %eax, %eax je .L24 addq ___m128i_shift_right@GOTPCREL(%rip), %rcx movdqu (%rcx), %xmm1 pshufb %xmm1, %xmm0 movdqa %xmm0, %xmm1 jmp .L25 .p2align 4,,10 .p2align 3 .L15: .cfi_def_cfa_offset 8 .cfi_restore 3 .cfi_restore 6 .cfi_restore 12 .cfi_restore 13 .cfi_restore 14 .cfi_restore 15 testl %edx, %edx pxor %xmm2, %xmm2 je .L89 jmp .L22 .p2align 4,,10 .p2align 3 .L113: testl %edx, %edx jne .L22 .L89: movslq %ecx, %rcx addq %rcx, %r10 movq %r10, %rax andl $4095, %eax cmpl $4080, %eax jg .L133 .L17: movdqu (%r10), %xmm1 .L18: pcmpistri $12, %xmm1, %xmm4 movl $0, %edx setc %al sete %dl xorl %esi, %esi testl %ecx, %ecx movzbl %al, %eax sete %sil testl %eax, %esi je .L113 xorl %ecx, %ecx .L19: addq %rcx, %r10 .L118: movq %r10, %rax ret .p2align 4,,10 .p2align 3 .L27: .cfi_def_cfa_offset 56 .cfi_offset 3, -56 .cfi_offset 6, -48 .cfi_offset 12, -40 .cfi_offset 13, -32 .cfi_offset 14, -24 .cfi_offset 15, -16 movslq %ecx, %rax movq %rsi, %rdx addq %r10, %rax movq %rax, %r10 jmp .L30 .p2align 4,,10 .p2align 3 .L39: testb %al, %al je .L40 .L2: popq %rbx .cfi_restore 3 .cfi_def_cfa_offset 48 popq %rbp .cfi_restore 6 .cfi_def_cfa_offset 40 popq %r12 .cfi_restore 12 .cfi_def_cfa_offset 32 popq %r13 .cfi_restore 13 .cfi_def_cfa_offset 24 popq %r14 .cfi_restore 14 .cfi_def_cfa_offset 16 movq %r10, %rax popq %r15 .cfi_restore 15 .cfi_def_cfa_offset 8 ret .L125: movq %rsi, %rax andl $4095, %eax cmpl $4080, %eax jg .L134 .L9: movdqu (%rsi), %xmm2 jmp .L11 .L5: .cfi_def_cfa_offset 56 .cfi_offset 3, -56 .cfi_offset 6, -48 .cfi_offset 12, -40 .cfi_offset 13, -32 .cfi_offset 14, -24 .cfi_offset 15, -16 popq %rbx .cfi_restore 3 .cfi_def_cfa_offset 48 popq %rbp .cfi_restore 6 .cfi_def_cfa_offset 40 popq %r12 .cfi_restore 12 .cfi_def_cfa_offset 32 popq %r13 .cfi_restore 13 .cfi_def_cfa_offset 24 xorl %r10d, %r10d popq %r14 .cfi_restore 14 .cfi_def_cfa_offset 16 movq %r10, %rax popq %r15 .cfi_restore 15 .cfi_def_cfa_offset 8 ret .L22: testl %eax, %eax movslq %ecx, %rcx jne .L19 .L117: xorl %r10d, %r10d jmp .L118 .p2align 4,,10 .p2align 3 .L129: .cfi_def_cfa_offset 56 .cfi_offset 3, -56 .cfi_offset 6, -48 .cfi_offset 12, -40 .cfi_offset 13, -32 .cfi_offset 14, -24 .cfi_offset 15, -16 movq %rdx, %rcx movq %rdx, %rdi andl $15, %ecx subq %rcx, %rdi movdqu (%rdi), %xmm0 movdqa %xmm0, %xmm1 pcmpeqb %xmm4, %xmm1 pmovmskb %xmm1, %edi sarl %cl, %edi testl %edi, %edi je .L34 addq ___m128i_shift_right@GOTPCREL(%rip), %rcx movdqu (%rcx), %xmm1 pshufb %xmm1, %xmm0 movdqa %xmm0, %xmm2 jmp .L35 .L130: movq %rax, %rcx movq %rax, %rdi andl $15, %ecx subq %rcx, %rdi movdqu (%rdi), %xmm0 movdqa %xmm0, %xmm1 pcmpeqb %xmm4, %xmm1 pmovmskb %xmm1, %edi sarl %cl, %edi testl %edi, %edi je .L36 addq ___m128i_shift_right@GOTPCREL(%rip), %rcx movdqu (%rcx), %xmm1 pshufb %xmm1, %xmm0 movdqa %xmm0, %xmm3 jmp .L37 .L126: .cfi_def_cfa_offset 8 .cfi_restore 3 .cfi_restore 6 .cfi_restore 12 .cfi_restore 13 .cfi_restore 14 .cfi_restore 15 movq %r10, %rcx movq %r10, %rax andl $15, %ecx subq %rcx, %rax movdqu (%rax), %xmm3 pcmpeqb %xmm3, %xmm1 pmovmskb %xmm1, %eax sarl %cl, %eax testl %eax, %eax je .L13 addq ___m128i_shift_right@GOTPCREL(%rip), %rcx movdqu (%rcx), %xmm1 pshufb %xmm1, %xmm3 movdqa %xmm3, %xmm1 jmp .L14 .L127: .cfi_def_cfa_offset 56 .cfi_offset 3, -56 .cfi_offset 6, -48 .cfi_offset 12, -40 .cfi_offset 13, -32 .cfi_offset 14, -24 .cfi_offset 15, -16 movq -24(%rsp), %rdx movzbl -9(%rsp), %ecx movdqu (%rdx), %xmm0 movdqa %xmm0, %xmm1 pcmpeqb %xmm4, %xmm1 pmovmskb %xmm1, %edx sarl %cl, %edx testl %edx, %edx je .L28 movq %r12, %rdx addq ___m128i_shift_right@GOTPCREL(%rip), %rdx movdqu (%rdx), %xmm1 pshufb %xmm1, %xmm0 movdqa %xmm0, %xmm2 jmp .L29 .L128: movq %rax, %rcx movq %rax, %rdi andl $15, %ecx subq %rcx, %rdi movdqu (%rdi), %xmm0 movdqa %xmm0, %xmm1 pcmpeqb %xmm4, %xmm1 pmovmskb %xmm1, %edi sarl %cl, %edi testl %edi, %edi je .L31 addq ___m128i_shift_right@GOTPCREL(%rip), %rcx movdqu (%rcx), %xmm1 pshufb %xmm1, %xmm0 movdqa %xmm0, %xmm3 jmp .L32 .L131: movq -32(%rsp), %rax movzbl -10(%rsp), %ecx movdqu (%rax), %xmm0 movdqa %xmm0, %xmm1 pcmpeqb %xmm4, %xmm1 pmovmskb %xmm1, %eax sarl %cl, %eax testl %eax, %eax je .L41 movq %r13, %rax addq ___m128i_shift_right@GOTPCREL(%rip), %rax movdqu (%rax), %xmm1 pshufb %xmm1, %xmm0 movdqa %xmm0, %xmm2 jmp .L42 .L124: .cfi_def_cfa_offset 8 .cfi_restore 3 .cfi_restore 6 .cfi_restore 12 .cfi_restore 13 .cfi_restore 14 .cfi_restore 15 movq %rdi, %rcx movq %rdi, %rax andl $15, %ecx pxor %xmm0, %xmm0 subq %rcx, %rax movdqu (%rax), %xmm1 pcmpeqb %xmm1, %xmm0 pmovmskb %xmm0, %eax sarl %cl, %eax testl %eax, %eax je .L6 addq ___m128i_shift_right@GOTPCREL(%rip), %rcx movdqu (%rcx), %xmm0 pshufb %xmm0, %xmm1 jmp .L7 .L123: cmpb $0, 1(%rsi) jne .L117 cmpb %al, %dl jne .L117 .p2align 4,,5 jmp .L118 .L134: movq %rsi, %rcx movq %rsi, %rax andl $15, %ecx pxor %xmm0, %xmm0 subq %rcx, %rax movdqu (%rax), %xmm2 pcmpeqb %xmm2, %xmm0 pmovmskb %xmm0, %eax sarl %cl, %eax testl %eax, %eax je .L9 addq ___m128i_shift_right@GOTPCREL(%rip), %rcx movdqu (%rcx), %xmm0 pshufb %xmm0, %xmm2 jmp .L11 .L133: movq %r10, %rcx movq %r10, %rax andl $15, %ecx subq %rcx, %rax movdqu (%rax), %xmm1 movdqa %xmm1, %xmm3 pcmpeqb %xmm2, %xmm3 pmovmskb %xmm3, %eax sarl %cl, %eax testl %eax, %eax je .L17 addq ___m128i_shift_right@GOTPCREL(%rip), %rcx movdqu (%rcx), %xmm3 pshufb %xmm3, %xmm1 jmp .L18 .cfi_endproc .LFE638: .size __strstr_sse42, .-__strstr_sse42 .file "varshift.c" .globl ___m128i_shift_right .section .rodata .align 16 .type ___m128i_shift_right, @object .size ___m128i_shift_right, 31 ___m128i_shift_right: .byte 0 .byte 1 .byte 2 .byte 3 .byte 4 .byte 5 .byte 6 .byte 7 .byte 8 .byte 9 .byte 10 .byte 11 .byte 12 .byte 13 .byte 14 .byte 15 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .ident "Sagan builtin __strstr_sse42 function" .section .note.GNU-stack,"",@progbits .ident "Sagan builtin __strstr_sse42 function" .section .note.GNU-stack,"",@progbits #endif #endif sagan-1.1.2/src/parsers/sagan-strstr/sagan-strstr-hook.h0000644000175000017500000000306012770372750022214 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-strstr-hook.c * * This "hooks" in the "Sagan_strstr" function for CPUs supporting SSE2. * This code is based on work by Ondra B�lk and the glibc projects. * * His code/original post can be found at: * * http://comments.gmane.org/gmane.comp.lib.glibc.alpha/34531 * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef HAVE_SSE2 #ifndef WITH_SYSSTRSTR int __strstr_sse2_unaligned(); int __strstr_sse42(); static void* function_func[]= { __strstr_sse2_unaligned, __strstr_sse42, NULL}; #endif #endif char *Sagan_strstr(const char *, const char *); char *Sagan_stristr(const char *, const char *, sbool); sagan-1.1.2/src/parsers/parse-hash.c0000644000175000017500000000626112770372750016232 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* * parse-hash.c */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "version.h" #include "sagan-config.h" #include "parsers/parsers.h" struct _SaganConfig *config; char *Sagan_Parse_Hash(char *syslogmessage, int type) { char tmpmsg[MAX_SYSLOGMSG]; char *ptmp=NULL; char *tok=NULL; char *tmp = NULL; static __thread char ret[SHA256_HASH_SIZE+1]; /* Largest Hash */ snprintf(tmpmsg, sizeof(tmpmsg), "%s", syslogmessage); ptmp = strtok_r(tmpmsg, " ", &tok); while (ptmp != NULL ) { tmp = Sagan_Parse_Hash_Cleanup(ptmp); if ( type == PARSE_HASH_MD5 || type == PARSE_HASH_ALL ) { if ( strlen(tmp) == MD5_HASH_SIZE ) { if ( Sagan_Validate_HEX(tmp) == true ) { return(tmp); } } } else if ( type == PARSE_HASH_SHA1 || type == PARSE_HASH_ALL ) { if ( strlen(tmp) == SHA1_HASH_SIZE ) { if ( Sagan_Validate_HEX(tmp) == true ) { strlcpy(ret, tmp, sizeof(ret)); return(ret); } } } else if ( type == PARSE_HASH_SHA256 || type == PARSE_HASH_ALL ) { if ( strlen(tmp) == SHA256_HASH_SIZE ) { if ( Sagan_Validate_HEX(tmp) == true ) { strlcpy(ret, tmp, sizeof(ret)); return(tmp); } } } ptmp = strtok_r(NULL, " ", &tok); } return("\0"); } char *Sagan_Parse_Hash_Cleanup(char *string) { char tmp[512]; int i; static __thread char in[512] = { 0 }; char tmp2[2]; char *ret = NULL; strlcpy(in, string, sizeof(in)); int len = strlen(in); if ( ( in[strlen(in) - 1] ) == ',' || ( in[strlen(in) - 1] ) == '\'' ) { strlcpy(tmp, in, len-1 ); strlcpy(in, tmp, sizeof(in)); } if ( in[0] == ',' || in[0] == '\'' || in[0] == ':' ) { tmp[0] = '\0'; for(i=1; i < strlen(in); i++) { snprintf(tmp2, sizeof(tmp2), "%c", in[i]); strcat(tmp, tmp2); } strlcpy(in, tmp, sizeof(in)); } return(in); } sagan-1.1.2/src/sagan-references.h0000644000175000017500000000233212770372750015730 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif /* Reference structure */ typedef struct _Ref_Struct _Ref_Struct; struct _Ref_Struct { unsigned s_size_ref; char s_refid[512]; char s_refurl[2048]; }; void Load_Reference ( const char * ); char *Reference_Lookup( int, int ); sagan-1.1.2/src/sagan-meta-content.c0000644000175000017500000000621012770372750016177 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-meta-content.c - This allows content style "searching" that * involve variables. For example, if we wanted to search for "bob", * "frank" and "mary", we'd typically need three content rules. * This allows one rule with the $USER variable for "bob", "frank" and * "mary". * * meta_content: "Username: %sagan%", $USERNAME"; meta_nocase; * * The %sagan% becomes whatever the variable holds. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-meta-content.h" #include "sagan-rules.h" #include "parsers/parsers.h" struct _Rule_Struct *rulestruct; int Sagan_Meta_Content_Search(char *syslog_msg, int rule_position , int meta_content_count) { int z = meta_content_count; int i; /* Normal "meta_content" search */ if ( rulestruct[rule_position].meta_content_not[z] == 0 ) { for ( i=0; i ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan.c * * This is the main "thread" and engine that looks for events & patterns * based on 'snort like' rule sets. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "version.h" #include "sagan-credits.h" #include "sagan-flowbit.h" #include "sagan-processor.h" #include "sagan-config.h" #include "sagan-ignore-list.h" #include "sagan-key.h" #include "sagan-lockfile.h" #include "sagan-signal.h" #include "sagan-usage.h" #include "sagan-stats.h" #include "sagan-ipc.h" #include "parsers/parsers.h" #ifdef HAVE_LIBPCAP #include "sagan-plog.h" #endif #include "processors/sagan-engine.h" #include "processors/sagan-blacklist.h" #include "processors/sagan-track-clients.h" #include "processors/sagan-report-clients.h" #include "processors/sagan-perfmon.h" #include "processors/sagan-bro-intel.h" #ifdef HAVE_LIBLOGNORM #include "sagan-liblognorm.h" #endif #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) #include "output-plugins/sagan-unified2.h" #endif #define OVECCOUNT 30 struct _SaganCounters *counters; struct _Rule_Struct *rulestruct; struct class_struct *classstruct; struct _SaganConfig *config; struct _SaganDebug *debug; struct _Sagan_Flowbit *flowbit; #ifdef WITH_BLUEDOT #include #include "processors/sagan-bluedot.h" #endif struct _Sagan_Proc_Syslog *SaganProcSyslog = NULL; int proc_msgslot=0; pthread_cond_t SaganProcDoWork=PTHREAD_COND_INITIALIZER; pthread_mutex_t SaganProcWorkMutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t SaganMalformedCounter=PTHREAD_MUTEX_INITIALIZER; /* ######################################################################## * Start of main() thread * ######################################################################## */ int main(int argc, char **argv) { const struct option long_options[] = { { "help", no_argument, NULL, 'h' }, { "debug", required_argument, NULL, 'd' }, { "daemon", no_argument, NULL, 'D' }, { "user", required_argument, NULL, 'u' }, { "chroot", required_argument, NULL, 'c' }, { "credits", no_argument, NULL, 'C' }, { "config", required_argument, NULL, 'f' }, { "log", required_argument, NULL, 'l' }, { "file", required_argument, NULL, 'F' }, { "quiet", no_argument, NULL, 'Q' }, {0, 0, 0, 0} }; static const char *short_options = "l:f:u:F:d:c:pDhCQ"; int option_index = 0; /****************************************************************************/ /* libpcap/PLOG (syslog sniffer) local variables */ /****************************************************************************/ #ifdef HAVE_LIBPCAP pthread_t pcap_thread; pthread_attr_t thread_pcap_attr; pthread_attr_init(&thread_pcap_attr); pthread_attr_setdetachstate(&thread_pcap_attr, PTHREAD_CREATE_DETACHED); #endif /****************************************************************************/ /* Perfmonitor local variables */ /****************************************************************************/ pthread_t perfmonitor_thread; pthread_attr_t thread_perfmonitor_attr; pthread_attr_init(&thread_perfmonitor_attr); pthread_attr_setdetachstate(&thread_perfmonitor_attr, PTHREAD_CREATE_DETACHED); /****************************************************************************/ /* Various local variables */ /****************************************************************************/ /* Block all signals, we create a signal handling thread */ sigset_t signal_set; pthread_t sig_thread; sigfillset( &signal_set ); pthread_sigmask( SIG_BLOCK, &signal_set, NULL ); /* Key board handler (displays stats, etc */ pthread_t key_thread; pthread_attr_t key_thread_attr; pthread_attr_init(&key_thread_attr); pthread_attr_setdetachstate(&key_thread_attr, PTHREAD_CREATE_DETACHED); /* client_tracker_report_handler thread */ pthread_t ct_report_thread; pthread_attr_t ct_report_thread_attr; pthread_attr_init(&ct_report_thread_attr); pthread_attr_setdetachstate(&ct_report_thread_attr, PTHREAD_CREATE_DETACHED); struct sockaddr_in sa; char src_dns_lookup[20]; int dns_flag=0; sbool fifoerr=0; char *syslog_host=NULL; char *syslog_facility=NULL; char *syslog_priority=NULL; char *syslog_level=NULL; char *syslog_tag=NULL; char *syslog_date=NULL; char *syslog_time=NULL; char *syslog_program=NULL; char *syslog_msg=NULL; char syslogstring[MAX_SYSLOGMSG]; signed char c; char *tok; int rc=0; int i; time_t t; struct tm *run; sbool debugflag=0; /* Allocate and clear memory for global structs */ /* Allocate memory for global struct _SaganDebug */ debug = malloc(sizeof(_SaganDebug)); if ( debug == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for debug. Abort!", __FILE__, __LINE__); } memset(debug, 0, sizeof(_SaganDebug)); /* Allocate memroy for global struct _SaganConfig */ config = malloc(sizeof(_SaganConfig)); if ( config == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for config. Abort!", __FILE__, __LINE__); } memset(config, 0, sizeof(_SaganConfig)); struct _SaganDNSCache *dnscache; dnscache = malloc(sizeof(_SaganDNSCache)); if ( dnscache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for dnscache. Abort!", __FILE__, __LINE__); } memset(dnscache, 0, sizeof(_SaganDNSCache)); counters = malloc(sizeof(_SaganCounters)); if ( counters == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for counters. Abort!", __FILE__, __LINE__); } memset(counters, 0, sizeof(_SaganCounters)); t = time(NULL); run=localtime(&t); strftime(config->sagan_startutime, sizeof(config->sagan_startutime), "%s", run); strlcpy(config->sagan_config, CONFIG_FILE_PATH, sizeof(config->sagan_config)); config->sagan_fifo[0] = '\0'; /* Set this here. This could be a file via comamnd line or FIFO via configuration file */ /* We set the config->sagan_log_filepath to the system default. It'll be fopen'ed shortly - 06/03/2011 - Champ Clark III */ strlcpy(config->sagan_log_filepath, SAGANLOG, sizeof(config->sagan_log_filepath)); config->sagan_runas = RUNAS; /* "systemd" wants to start Sagan in the foreground, but doesn't know what to * do with stdin/stdout. Hence, CPU goes to 100%. This detects our terminal * type ( >/dev/null quiet = 1; } /* Get command line arg's */ while ((c = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) { switch(c) { if (c == -1) break; case 'h': Sagan_Usage(); exit(0); break; case 'Q': config->quiet = 1; break; case 'C': Sagan_Credits(); exit(0); break; case 'd': if (Sagan_strstr(optarg, "malformed")) { debug->debugmalformed=1; debugflag=1; } if (Sagan_strstr(optarg, "limits")) { debug->debuglimits=1; debugflag=1; } if (Sagan_strstr(optarg, "syslog")) { debug->debugsyslog=1; debugflag=1; } if (Sagan_strstr(optarg, "load")) { debug->debugload=1; debugflag=1; } if (Sagan_strstr(optarg, "fwsam")) { debug->debugfwsam=1; debugflag=1; } if (Sagan_strstr(optarg, "external")) { debug->debugexternal=1; debugflag=1; } if (Sagan_strstr(optarg, "threads")) { debug->debugthreads=1; debugflag=1; } if (Sagan_strstr(optarg, "flowbit")) { debug->debugflowbit=1; debugflag=1; } if (Sagan_strstr(optarg, "engine")) { debug->debugengine=1; debugflag=1; } if (Sagan_strstr(optarg, "brointel")) { debug->debugbrointel=1; debugflag=1; } if (Sagan_strstr(optarg, "ipc")) { debug->debugipc=1; debugflag=1; } #ifdef HAVE_LIBMAXMINDDB if (Sagan_strstr(optarg, "geoip2")) { debug->debuggeoip2=1; debugflag=1; } #endif #ifdef HAVE_LIBLOGNORM if (Sagan_strstr(optarg, "normalize" )) { debug->debugnormalize=1; debugflag=1; } #endif #ifdef HAVE_LIBESMTP if (Sagan_strstr(optarg, "smtp")) { debug->debugesmtp=1; debugflag=1; } #endif #ifdef HAVE_LIBPCAP if (Sagan_strstr(optarg, "plog")) { debug->debugplog=1; debugflag=1; } #endif #ifdef WITH_BLUEDOT if (Sagan_strstr(optarg, "bluedot")) { debug->debugbluedot=1; debugflag=1; } #endif /* If option is unknown */ if ( debugflag == 0 ) { fprintf(stderr, "Unknown debug option %s!\n", optarg); exit(1); } break; case 'D': config->daemonize=1; break; case 'u': config->sagan_runas=optarg; break; case 'c': Sagan_Chroot(optarg); break; case 'F': config->sagan_is_file=1; strlcpy(config->sagan_fifo,optarg,sizeof(config->sagan_fifo) - 1); break; case 'f': strlcpy(config->sagan_config,optarg,sizeof(config->sagan_config) - 1); break; case 'l': strlcpy(config->sagan_log_filepath,optarg,sizeof(config->sagan_log_filepath) - 1); break; default: fprintf(stderr, "Invalid argument! See below for command line switches.\n"); Sagan_Usage(); exit(0); break; } } Sagan_Open_Log_File(OPEN, SAGAN_LOG); Load_Config(); Sagan_Engine_Init(); SaganProcSyslog = malloc(config->max_processor_threads * sizeof(struct _Sagan_Proc_Syslog)); if ( SaganProcSyslog == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganProcSyslog. Abort!", __FILE__, __LINE__); } memset(SaganProcSyslog, 0, sizeof(struct _Sagan_Proc_Syslog)); pthread_t processor_id[config->max_processor_threads]; pthread_attr_t thread_processor_attr; pthread_attr_init(&thread_processor_attr); pthread_attr_setdetachstate(&thread_processor_attr, PTHREAD_CREATE_DETACHED); Sagan_Log(S_NORMAL, "Configuration file %s loaded and %d rules loaded.", config->sagan_config, counters->rulecount); Sagan_Log(S_NORMAL, "Out of %d rules, %d Flowbit(s) are in use.", counters->rulecount, counters->flowbit_total_counter); Sagan_Log(S_NORMAL, "Sagan version %s is firing up!", VERSION); #ifdef HAVE_LIBPCAP /* Spawn a thread to 'sniff' syslog traffic (sagan-plog.c). This redirects syslog traffic to the /dev/log socket. This needs "root" access, so we drop priv's after this thread is started */ if ( config->plog_flag ) { rc = pthread_create( &pcap_thread, NULL, (void *)plog_handler, NULL ); if ( rc != 0 ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] Error creating libpcap handler thread [error: %d].", __FILE__, __LINE__, rc); } sleep(1); /* Sleep to avoid race between main() and plog thread plog thread needs "root" rights before sagan_droppriv(). In some cases main() run sagan_droppriv() before thread can complete - Champ Clark - 07/20/2011 */ } #endif Sagan_Droppriv(); /* Become the Sagan user */ Sagan_Log(S_NORMAL, "---------------------------------------------------------------------------"); Sagan_IPC_Init(); if ( config->perfmonitor_flag ) { Sagan_Perfmonitor_Open(); rc = pthread_create( &perfmonitor_thread, NULL, (void *)Sagan_Perfmonitor_Handler, NULL ); if ( rc != 0 ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] Error creating Perfmonitor thread [error: %d].", __FILE__, __LINE__, rc); } } /* Open sagan alert file */ Sagan_Open_Log_File(OPEN, ALERT_LOG); /**************************************************************************** * Display processor information as we load ****************************************************************************/ /* Sagan_Track_Clients processor ********************************************/ if ( config->sagan_track_clients_flag ) { Sagan_Track_Clients_Init(); /* We run a thread for client_tracker_report */ rc = pthread_create( &ct_report_thread, NULL, (void *)Sagan_Report_Clients, NULL ); if ( rc != 0 ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] Error creating client_tracker_report_client thread. [error: %d]", __FILE__, __LINE__, rc); } if ( config->pp_sagan_track_clients ) { Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, "Client Tracking Processor: %d minute(s)", config->pp_sagan_track_clients); } } /* Sagan Blacklist IP processor *********************************************/ if ( config->blacklist_flag) { Sagan_Blacklist_Init(); Sagan_Blacklist_Load(); } #ifdef WITH_BLUEDOT if ( config->bluedot_flag ) { curl_global_init(CURL_GLOBAL_ALL); Sagan_Bluedot_Init(); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, "Bluedot URL: %s", config->bluedot_url); // Sagan_Log(S_NORMAL, "Bluedot Auth: %s", config->bluedot_auth); Sagan_Log(S_NORMAL, "Bluedot Device ID: %s", config->bluedot_device_id); Sagan_Log(S_NORMAL, "Bluedot Categories File: %s", config->bluedot_cat); Sagan_Log(S_NORMAL, "Bluedot Max Cache: %d", config->bluedot_max_cache); Sagan_Log(S_NORMAL, "Bluedot Cache Timeout: %d minutes.", config->bluedot_timeout / 60); Sagan_Log(S_NORMAL, "Bluedot loaded %d categories.", counters->bluedot_cat_count); } #endif /* Sagan Bro Intel processor *******************************************/ if ( config->brointel_flag ) { Sagan_Log(S_NORMAL, ""); Sagan_BroIntel_Init(); Sagan_BroIntel_Load_File(); Sagan_Log(S_NORMAL, "Bro Intel::ADDR Loaded: %d", counters->brointel_addr_count); Sagan_Log(S_NORMAL, "Bro Intel::DOMAIN Loaded: %d", counters->brointel_domain_count); Sagan_Log(S_NORMAL, "Bro Intel::FILE_HASH Loaded: %d", counters->brointel_file_hash_count); Sagan_Log(S_NORMAL, "Bro Intel::URL Loaded: %d", counters->brointel_url_count); Sagan_Log(S_NORMAL, "Bro Intel::SOFTWARE Loaded: %d", counters->brointel_software_count); Sagan_Log(S_NORMAL, "Bro Intel::EMAIL Loaded: %d", counters->brointel_email_count); Sagan_Log(S_NORMAL, "Bro Intel::USER_NAME Loaded: %d", counters->brointel_user_name_count); Sagan_Log(S_NORMAL, "Bro Intel::FILE_NAME Loaded: %d", counters->brointel_file_name_count); Sagan_Log(S_NORMAL, "Bro Intel::CERT_HASH Loaded: %d", counters->brointel_cert_hash_count); Sagan_Log(S_NORMAL, "Bro Intel Duplicates Detected: %d", counters->brointel_dups); } /*************************************************************************** * Output plugins ***************************************************************************/ #ifdef HAVE_LIBESMTP if ( config->sagan_esmtp_flag ) { Sagan_Log(S_NORMAL, ""); if ( config->min_email_priority ) { Sagan_Log(S_NORMAL, "E-mail on priority %d or higher.", config->min_email_priority); } Sagan_Log(S_NORMAL, "E-Mail will be sent from: %s", config->sagan_esmtp_from); Sagan_Log(S_NORMAL, "SMTP server is set to: %s", config->sagan_esmtp_server); } #endif #ifdef WITH_SNORTSAM if ( config->sagan_fwsam_flag ) { Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, "Snortsam output plug in enabled."); } #endif if ( config->sagan_external_output_flag ) { Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, "External program to be called: %s", config->sagan_extern); } /* Unified2 ****************************************************************/ #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) if ( config->sagan_unified2_flag ) { Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, "Unified2 file: %s", config->unified2_filepath); Sagan_Log(S_NORMAL, "Unified2 limit: %dM", config->unified2_limit / 1024 / 1024 ); Unified2InitFile(); } #endif /*************************************************************************** * Non-Processor/Output option ***************************************************************************/ /* What to "ignore" ********************************************************/ if ( config->sagan_droplist_flag ) { Load_Ignore_List(); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, "Loaded %d ignore/drop list item(s).", counters->droplist_count); } /*************************************************************************** * Continue with normal startup! ***************************************************************************/ Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " ,-._,-. -*> Sagan! <*-"); Sagan_Log(S_NORMAL, " \\/)\"(\\/ Version %s", VERSION); Sagan_Log(S_NORMAL, " (_o_) Champ Clark III & The Quadrant InfoSec Team [quadrantsec.com]"); Sagan_Log(S_NORMAL, " / \\/) Copyright (C) 2009-2016 Quadrant Information Security, et al."); Sagan_Log(S_NORMAL, " (|| ||) Using PCRE version: %s", pcre_version()); Sagan_Log(S_NORMAL, " oo-oo Sagan is processing events....."); Sagan_Log(S_NORMAL, ""); /* Become a daemon if requested */ if ( config->daemonize ) { Sagan_Log(S_NORMAL, "Becoming a daemon!"); pid_t pid = 0; setsid(); pid = fork(); if (pid == 0) {} else { exit(0); } } /* Create the signal handlers thread _after_ the fork() so it can properly * handly signals - Champ Clark III - 06/13/2011 */ rc = pthread_create( &sig_thread, NULL, (void *)Sig_Handler, NULL ); if ( rc != 0 ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] Error creating signal handler thread. [error: %d]", __FILE__, __LINE__, rc); } /* We don't want the key_handler() if we're in daemon mode! */ if (!config->daemonize ) { if (!config->quiet) { rc = pthread_create( &key_thread, NULL, (void *)key_handler, NULL ); if ( rc != 0 ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] Error creating key_handler thread. [error: %d]", __FILE__, __LINE__, rc); } } } /* We do this after forking so init scripts can complete */ /* Check lock file _after_ thread. If you don't it'll retreive the wrong pid * and incorrectly believe there is a stale lock file if --daemon */ checklockfile(); Sagan_Log(S_NORMAL, "Spawning %d Processor Threads.", config->max_processor_threads); for (i = 0; i < config->max_processor_threads; i++) { rc = pthread_create ( &processor_id[i], &thread_processor_attr, (void *)Sagan_Processor, NULL ); if ( rc != 0 ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "Could not pthread_create() for I/O processors [error: %d]", rc); } } Sagan_Log(S_NORMAL, ""); if ( config->sagan_is_file == 0 ) { Sagan_Log(S_NORMAL, "Attempting to open syslog FIFO (%s).", config->sagan_fifo); } else { Sagan_Log(S_NORMAL, "Attempting to open syslog FILE (%s).", config->sagan_fifo); } while(1) { FILE *fd; if (( fd = fopen(config->sagan_fifo, "r" )) == NULL ) { if ( config->sagan_is_file == 0 ) { /* try to create it */ Sagan_Log(S_NORMAL, "Fifo not found, creating it (%s).", config->sagan_fifo); if (mkfifo(config->sagan_fifo, 0700) == -1) { Sagan_Log(S_ERROR, "Could not create FIFO '%s'. Abort!", config->sagan_fifo); } fd = fopen(config->sagan_fifo, "r"); if ( fd == NULL ) { Sagan_Log(S_ERROR, "Error opening %s. Abort!", config->sagan_fifo); } } else { Sagan_Log(S_ERROR, "Could not open file '%s'. Abort!", config->sagan_fifo); } } if ( config->sagan_is_file == 0 ) { Sagan_Log(S_NORMAL, "Successfully opened FIFO (%s).", config->sagan_fifo); #if defined(F_GETPIPE_SZ) && defined(F_SETPIPE_SZ) Sagan_Set_Pipe_Size(fd); #endif } else { Sagan_Log(S_NORMAL, "Successfully opened FILE (%s) and processing events.....", config->sagan_fifo); } while(fd != NULL) { while(fgets(syslogstring, sizeof(syslogstring), fd) != NULL) { /* If the FIFO was in a error state, let user know the FIFO writer has resumed */ if ( fifoerr == 1 ) { Sagan_Log(S_NORMAL, "FIFO writer has restarted. Processing events."); #if defined(F_GETPIPE_SZ) && defined(F_SETPIPE_SZ) Sagan_Set_Pipe_Size(fd); #endif fifoerr=0; } counters->sagantotal++; syslog_host = strtok_r(syslogstring, "|", &tok); /* If we're using DNS (and we shouldn't be!), we start DNS checks and lookups * here. We cache both good and bad lookups to not over load our DNS server(s). * The only way DNS cache can be cleared is to restart Sagan */ if (config->syslog_src_lookup ) { if ( inet_pton(AF_INET, syslog_host, &(sa.sin_addr)) == 0 ) { /* Is inbound a valid IP? */ dns_flag=0; for(i=0; i <= counters->dns_cache_count ; i++) { /* Check cache first */ if (!strcmp( dnscache[i].hostname, syslog_host)) { syslog_host = dnscache[i].src_ip; dns_flag=1; } } /* If entry was not found in cache, look it up */ if ( dns_flag == 0 ) { /* Do a DNS lookup */ strlcpy(src_dns_lookup, DNS_Lookup(syslog_host), sizeof(src_dns_lookup)); /* Invalid lookups get the config->sagan_host value */ if (src_dns_lookup[0] == '0' ) { strlcpy(src_dns_lookup, config->sagan_host, sizeof(src_dns_lookup)); counters->dns_miss_count++; } /* Add entry to DNS Cache */ dnscache = (_SaganDNSCache *) realloc(dnscache, (counters->dns_cache_count+1) * sizeof(_SaganDNSCache)); if ( dnscache == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for dnscache. Abort!", __FILE__, __LINE__); } strlcpy(dnscache[counters->dns_cache_count].hostname, syslog_host, sizeof(dnscache[counters->dns_cache_count].hostname)); strlcpy(dnscache[counters->dns_cache_count].src_ip, src_dns_lookup, sizeof(dnscache[counters->dns_cache_count].src_ip)); counters->dns_cache_count++; syslog_host = src_dns_lookup; } } } else { /* We check to see if values from our FIFO are valid. If we aren't doing DNS related * stuff (above), we start basic check with the syslog_host */ if (syslog_host == NULL || inet_pton(AF_INET, syslog_host, &(sa.sin_addr)) == 0 ) { syslog_host = config->sagan_host; pthread_mutex_lock(&SaganMalformedCounter); counters->malformed_host++; pthread_mutex_unlock(&SaganMalformedCounter); if ( debug->debugmalformed ) { Sagan_Log(S_WARN, "Sagan received a malformed 'host' (replaced with %s)", config->sagan_host); } } } /* We now check the rest of the values */ syslog_facility=strtok_r(NULL, "|", &tok); if ( syslog_facility == NULL ) { syslog_facility = "SAGAN: FACILITY ERROR"; pthread_mutex_lock(&SaganMalformedCounter); counters->malformed_facility++; pthread_mutex_unlock(&SaganMalformedCounter); if ( debug->debugmalformed ) { Sagan_Log(S_WARN, "Sagan received a malformed 'facility'"); } } syslog_priority=strtok_r(NULL, "|", &tok); if ( syslog_priority == NULL ) { syslog_priority = "SAGAN: PRIORITY ERROR"; pthread_mutex_lock(&SaganMalformedCounter); counters->malformed_priority++; pthread_mutex_unlock(&SaganMalformedCounter); if ( debug->debugmalformed ) { Sagan_Log(S_WARN, "Sagan received a malformed 'priority'"); } } syslog_level=strtok_r(NULL, "|", &tok); if ( syslog_level == NULL ) { syslog_level = "SAGAN: LEVEL ERROR"; pthread_mutex_lock(&SaganMalformedCounter); counters->malformed_level++; pthread_mutex_unlock(&SaganMalformedCounter); if ( debug->debugmalformed ) { Sagan_Log(S_WARN, "Sagan received a malformed 'level'"); } } syslog_tag=strtok_r(NULL, "|", &tok); if ( syslog_tag == NULL ) { syslog_tag = "SAGAN: TAG ERROR"; pthread_mutex_lock(&SaganMalformedCounter); counters->malformed_tag++; pthread_mutex_unlock(&SaganMalformedCounter); if ( debug->debugmalformed ) { Sagan_Log(S_WARN, "Sagan received a malformed 'tag'"); } } syslog_date=strtok_r(NULL, "|", &tok); if ( syslog_date == NULL ) { syslog_date = "SAGAN: DATE ERROR"; pthread_mutex_lock(&SaganMalformedCounter); counters->malformed_date++; pthread_mutex_unlock(&SaganMalformedCounter); if ( debug->debugmalformed ) { Sagan_Log(S_WARN, "Sagan received a malformed 'date'"); } } syslog_time=strtok_r(NULL, "|", &tok); if ( syslog_time == NULL ) { syslog_time = "SAGAN: TIME ERROR"; pthread_mutex_lock(&SaganMalformedCounter); counters->malformed_time++; pthread_mutex_unlock(&SaganMalformedCounter); if ( debug->debugmalformed ) { Sagan_Log(S_WARN, "Sagan received a malformed 'time'"); } } syslog_program=strtok_r(NULL, "|", &tok); if ( syslog_program == NULL ) { syslog_program = "SAGAN: PROGRAM ERROR"; pthread_mutex_lock(&SaganMalformedCounter); counters->malformed_program++; pthread_mutex_unlock(&SaganMalformedCounter); if ( debug->debugmalformed ) { Sagan_Log(S_WARN, "Sagan received a malformed 'program'"); } } syslog_msg=strtok_r(NULL, "", &tok); /* In case the message has | in it, we delimit on "" */ if ( syslog_msg == NULL ) { syslog_msg = "SAGAN: MESSAGE ERROR"; pthread_mutex_lock(&SaganMalformedCounter); counters->malformed_message++; pthread_mutex_unlock(&SaganMalformedCounter); if ( debug->debugmalformed ) { Sagan_Log(S_WARN, "Sagan received a malformed 'message' [Syslog Host: %s]", syslog_host); } /* If the message is lost, all is lost. Typically, you don't lose part of the message, * it's more likely to lose all - Champ Clark III 11/17/2011 */ counters->sagan_log_drop++; } /* Strip any \n or \r from the syslog_msg */ if ( strcspn ( syslog_msg, "\n" ) < strlen(syslog_msg) ) { syslog_msg[strcspn ( syslog_msg, "\n" )] = '\0'; } /* if ( config->sagan_track_clients_flag ) { Sagan_Track_Clients( IP2Bit(syslog_host) ); } */ if ( proc_msgslot < config->max_processor_threads ) { pthread_mutex_lock(&SaganProcWorkMutex); strlcpy(SaganProcSyslog[proc_msgslot].syslog_host, syslog_host, sizeof(SaganProcSyslog[proc_msgslot].syslog_host)); strlcpy(SaganProcSyslog[proc_msgslot].syslog_facility, syslog_facility, sizeof(SaganProcSyslog[proc_msgslot].syslog_facility)); strlcpy(SaganProcSyslog[proc_msgslot].syslog_priority, syslog_priority, sizeof(SaganProcSyslog[proc_msgslot].syslog_priority)); strlcpy(SaganProcSyslog[proc_msgslot].syslog_level, syslog_level, sizeof(SaganProcSyslog[proc_msgslot].syslog_level)); strlcpy(SaganProcSyslog[proc_msgslot].syslog_tag, syslog_tag, sizeof(SaganProcSyslog[proc_msgslot].syslog_tag)); strlcpy(SaganProcSyslog[proc_msgslot].syslog_date, syslog_date, sizeof(SaganProcSyslog[proc_msgslot].syslog_date)); strlcpy(SaganProcSyslog[proc_msgslot].syslog_time, syslog_time, sizeof(SaganProcSyslog[proc_msgslot].syslog_time)); strlcpy(SaganProcSyslog[proc_msgslot].syslog_program, syslog_program, sizeof(SaganProcSyslog[proc_msgslot].syslog_program)); strlcpy(SaganProcSyslog[proc_msgslot].syslog_message, syslog_msg, sizeof(SaganProcSyslog[proc_msgslot].syslog_message)); proc_msgslot++; pthread_cond_signal(&SaganProcDoWork); pthread_mutex_unlock(&SaganProcWorkMutex); } else { counters->worker_thread_exhaustion++; counters->sagan_log_drop++; } if (debug->debugthreads) { Sagan_Log(S_DEBUG, "Current \"proc_msgslot\": %d", proc_msgslot); } if (debug->debugsyslog) { Sagan_Log(S_DEBUG, "[%s, line %d] **[RAW Syslog]*********************************", __FILE__, __LINE__); Sagan_Log(S_DEBUG, "[%s, line %d] Host: %s | Program: %s | Facility: %s | Priority: %s | Level: %s | Tag: %s", __FILE__, __LINE__, syslog_host, syslog_program, syslog_facility, syslog_priority, syslog_level, syslog_tag); Sagan_Log(S_DEBUG, "[%s, line %d] Raw message: %s", __FILE__, __LINE__, syslog_msg); } } /* while(fgets) */ /* fgets() has returned a error, likely due to the FIFO writer leaving */ /* DEBUG : set a kill flag and join */ /* RMEOVE LOCK */ if ( fifoerr == 0 ) { if ( config->sagan_is_file != 0 ) { Sagan_Log(S_NORMAL, "EOF reached. Waiting for threads to catch up...."); Sagan_Log(S_NORMAL, ""); while(proc_msgslot != 0) { Sagan_Log(S_NORMAL, "Waiting on %d threads....", proc_msgslot); sleep(1); } fclose(fd); Sagan_Statistics(); Remove_Lock_File(); Sagan_Log(S_NORMAL, "Exiting."); /* DEBUG: Rejoin threads */ exit(0); } else { Sagan_Log(S_WARN, "FIFO writer closed. Waiting for FIFO writer to restart...."); fifoerr=1; /* Set flag so our wile(fgets) knows */ } } sleep(1); /* So we don't eat 100% CPU */ } /* while(fd != NULL) */ fclose(fd); /* ???? */ } /* End of while(1) */ } /* End of main */ sagan-1.1.2/src/sagan-ipc.c0000644000175000017500000020555612770372750014372 0ustar champchamp/* $Id$ */ /* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-ipc.c * * This allows Sagan to share data with other Sagan processes. This is for * Inter-process communications (IPC). * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include #include #include #include #include "version.h" #include "sagan.h" #include "sagan-defs.h" #include "sagan-config.h" #include "sagan-ipc.h" #include "sagan-flowbit.h" #include "processors/sagan-track-clients.h" struct _Sagan_IPC_Counters *counters_ipc; struct _Sagan_IPC_Flowbit *flowbit_ipc; struct _SaganConfig *config; pthread_mutex_t CounterMutex; pthread_mutex_t After_By_Src_Mutex; pthread_mutex_t After_By_Dst_Mutex; pthread_mutex_t After_By_Src_Port_Mutex; pthread_mutex_t After_By_Dst_Port_Mutex; pthread_mutex_t After_By_Username_Mutex; pthread_mutex_t Thresh_By_Src_Mutex; pthread_mutex_t Thresh_By_Dst_Mutex; pthread_mutex_t Thresh_By_Src_Port_Mutex; pthread_mutex_t Thresh_By_Dst_Port_Mutex; pthread_mutex_t Thresh_By_Username_Mutex; pthread_mutex_t Flowbit_Mutex; struct thresh_by_src_ipc *threshbysrc_ipc; struct thresh_by_dst_ipc *threshbydst_ipc; struct thresh_by_dstport_ipc *threshbydstport_ipc; struct thresh_by_srcport_ipc *threshbysrcport_ipc; struct thresh_by_username_ipc *threshbyusername_ipc; struct after_by_src_ipc *afterbysrc_ipc; struct after_by_dst_ipc *afterbydst_ipc; struct after_by_srcport_ipc *afterbysrcport_ipc; struct after_by_dstport_ipc *afterbydstport_ipc; struct after_by_username_ipc *afterbyusername_ipc; struct _Sagan_Track_Clients_IPC *SaganTrackClients_ipc; struct _SaganDebug *debug; /***************************************************************************** * Sagan_Clean_IPC_Object - If the max IPC is hit, we attempt to "clean" out * any stale IPC entries. *****************************************************************************/ sbool Sagan_Clean_IPC_Object( int type ) { time_t t; struct tm *now; int i; int utime = 0; int new_count = 0; int old_count = 0; char timet[20]; if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Cleaning IPC data. Type: %d", __FILE__, __LINE__, type); } /* Afterbysrc_IPC */ if ( type == AFTER_BY_SRC && config->max_after_by_src < counters_ipc->after_count_by_src ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); Sagan_File_Lock(config->shm_after_by_src); pthread_mutex_lock(&After_By_Src_Mutex); struct after_by_src_ipc *temp_afterbysrc_ipc; temp_afterbysrc_ipc = malloc(sizeof(struct after_by_src_ipc) * config->max_after_by_src); memset(temp_afterbysrc_ipc, 0, sizeof(sizeof(struct after_by_src_ipc) * config->max_after_by_src)); old_count = counters_ipc->after_count_by_src; for (i = 0; i < counters_ipc->after_count_by_src; i++) { if ( (utime - afterbysrc_ipc[i].utime) < afterbysrc_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Afterbysrc_IPC : Keeping %u.", __FILE__, __LINE__, afterbysrc_ipc[i].ipsrc); } temp_afterbysrc_ipc[new_count].ipsrc = afterbysrc_ipc[i].ipsrc; temp_afterbysrc_ipc[new_count].count = afterbysrc_ipc[i].count; temp_afterbysrc_ipc[new_count].utime = afterbysrc_ipc[i].utime; temp_afterbysrc_ipc[new_count].expire = afterbysrc_ipc[i].expire; strlcpy(temp_afterbysrc_ipc[new_count].sid, afterbysrc_ipc[i].sid, sizeof(temp_afterbysrc_ipc[new_count].sid)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { afterbysrc_ipc[i].ipsrc = temp_afterbysrc_ipc[i].ipsrc; afterbysrc_ipc[i].count = temp_afterbysrc_ipc[i].count; afterbysrc_ipc[i].utime = temp_afterbysrc_ipc[i].utime; afterbysrc_ipc[i].expire = temp_afterbysrc_ipc[i].expire; strlcpy(afterbysrc_ipc[i].sid, temp_afterbysrc_ipc[i].sid, sizeof(afterbysrc_ipc[i].sid)); } counters_ipc->after_count_by_src = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean after_by_src. Nothing to remove!", __FILE__, __LINE__); free(temp_afterbysrc_ipc); pthread_mutex_unlock(&After_By_Src_Mutex); Sagan_File_Unlock(config->shm_after_by_src); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for after_by_src", __FILE__, __LINE__, new_count, old_count); free(temp_afterbysrc_ipc); pthread_mutex_unlock(&After_By_Src_Mutex); Sagan_File_Unlock(config->shm_after_by_src); return(0); } /* Afterbydst_IPC */ else if ( type == AFTER_BY_DST && config->max_after_by_dst < counters_ipc->after_count_by_dst ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); new_count = 0; old_count = 0; Sagan_File_Lock(config->shm_after_by_dst); pthread_mutex_lock(&After_By_Dst_Mutex); struct after_by_dst_ipc *temp_afterbydst_ipc; temp_afterbydst_ipc = malloc(sizeof(struct after_by_dst_ipc) * config->max_after_by_dst); memset(temp_afterbydst_ipc, 0, sizeof(sizeof(struct after_by_dst_ipc) * config->max_after_by_dst)); old_count = counters_ipc->after_count_by_dst; for (i = 0; i < counters_ipc->after_count_by_dst; i++) { if ( (utime - afterbydst_ipc[i].utime) < afterbydst_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Afterbydst_IPC : Keeping %u.", __FILE__, __LINE__, afterbydst_ipc[i].ipdst); } temp_afterbydst_ipc[new_count].ipdst = afterbydst_ipc[i].ipdst; temp_afterbydst_ipc[new_count].count = afterbydst_ipc[i].count; temp_afterbydst_ipc[new_count].utime = afterbydst_ipc[i].utime; temp_afterbydst_ipc[new_count].expire = afterbydst_ipc[i].expire; strlcpy(temp_afterbydst_ipc[new_count].sid, afterbydst_ipc[i].sid, sizeof(temp_afterbydst_ipc[new_count].sid)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { afterbydst_ipc[i].ipdst = temp_afterbydst_ipc[i].ipdst; afterbydst_ipc[i].count = temp_afterbydst_ipc[i].count; afterbydst_ipc[i].utime = temp_afterbydst_ipc[i].utime; afterbydst_ipc[i].expire = temp_afterbydst_ipc[i].expire; strlcpy(afterbydst_ipc[i].sid, temp_afterbydst_ipc[i].sid, sizeof(afterbydst_ipc[i].sid)); } counters_ipc->after_count_by_dst = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean after_by_dst. Nothing to remove!", __FILE__, __LINE__); free(temp_afterbydst_ipc); pthread_mutex_unlock(&After_By_Dst_Mutex); Sagan_File_Unlock(config->shm_after_by_dst); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for after_by_dst", __FILE__, __LINE__, new_count, old_count); free(temp_afterbydst_ipc); pthread_mutex_unlock(&After_By_Dst_Mutex); Sagan_File_Unlock(config->shm_after_by_dst); return(0); } /* Afterbysrcport_IPC */ else if ( type == AFTER_BY_SRCPORT && config->max_after_by_srcport < counters_ipc->after_count_by_srcport ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); new_count = 0; old_count = 0; Sagan_File_Lock(config->shm_after_by_srcport); pthread_mutex_lock(&After_By_Src_Port_Mutex); struct after_by_srcport_ipc *temp_afterbysrcport_ipc; temp_afterbysrcport_ipc = malloc(sizeof(struct after_by_srcport_ipc) * config->max_after_by_srcport); memset(temp_afterbysrcport_ipc, 0, sizeof(sizeof(struct after_by_srcport_ipc) * config->max_after_by_srcport)); old_count = counters_ipc->after_count_by_srcport; for (i = 0; i < counters_ipc->after_count_by_srcport; i++) { if ( (utime - afterbysrcport_ipc[i].utime) < afterbysrcport_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Afterbysrcport_IPC : Keeping %u.", __FILE__, __LINE__, afterbysrcport_ipc[i].ipsrcport); } temp_afterbysrcport_ipc[new_count].ipsrcport = afterbysrcport_ipc[i].ipsrcport; temp_afterbysrcport_ipc[new_count].count = afterbysrcport_ipc[i].count; temp_afterbysrcport_ipc[new_count].utime = afterbysrcport_ipc[i].utime; temp_afterbysrcport_ipc[new_count].expire = afterbysrcport_ipc[i].expire; strlcpy(temp_afterbysrcport_ipc[new_count].sid, afterbysrcport_ipc[i].sid, sizeof(temp_afterbysrcport_ipc[new_count].sid)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { afterbysrcport_ipc[i].ipsrcport = temp_afterbysrcport_ipc[i].ipsrcport; afterbysrcport_ipc[i].count = temp_afterbysrcport_ipc[i].count; afterbysrcport_ipc[i].utime = temp_afterbysrcport_ipc[i].utime; afterbysrcport_ipc[i].expire = temp_afterbysrcport_ipc[i].expire; strlcpy(afterbysrcport_ipc[i].sid, temp_afterbysrcport_ipc[i].sid, sizeof(afterbysrcport_ipc[i].sid)); } counters_ipc->after_count_by_srcport = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean after_by_srcport. Nothing to remove!", __FILE__, __LINE__); free(temp_afterbysrcport_ipc); pthread_mutex_unlock(&After_By_Src_Port_Mutex); Sagan_File_Unlock(config->shm_after_by_srcport); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for after_by_srcport", __FILE__, __LINE__, new_count, old_count); free(temp_afterbysrcport_ipc); pthread_mutex_unlock(&After_By_Src_Port_Mutex); Sagan_File_Unlock(config->shm_after_by_srcport); return(0); } /* Afterbydstport_IPC */ else if ( type == AFTER_BY_DSTPORT && config->max_after_by_dstport < counters_ipc->after_count_by_dstport ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); new_count = 0; old_count = 0; Sagan_File_Lock(config->shm_after_by_dstport); pthread_mutex_lock(&After_By_Dst_Port_Mutex); struct after_by_dstport_ipc *temp_afterbydstport_ipc; temp_afterbydstport_ipc = malloc(sizeof(struct after_by_dstport_ipc) * config->max_after_by_dstport); memset(temp_afterbydstport_ipc, 0, sizeof(sizeof(struct after_by_dstport_ipc) * config->max_after_by_dstport)); old_count = counters_ipc->after_count_by_dstport; for (i = 0; i < counters_ipc->after_count_by_dstport; i++) { if ( (utime - afterbydstport_ipc[i].utime) < afterbydstport_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Afterbydstport_IPC : Keeping %u.", __FILE__, __LINE__, afterbydstport_ipc[i].ipdstport); } temp_afterbydstport_ipc[new_count].ipdstport = afterbydstport_ipc[i].ipdstport; temp_afterbydstport_ipc[new_count].count = afterbydstport_ipc[i].count; temp_afterbydstport_ipc[new_count].utime = afterbydstport_ipc[i].utime; temp_afterbydstport_ipc[new_count].expire = afterbydstport_ipc[i].expire; strlcpy(temp_afterbydstport_ipc[new_count].sid, afterbydstport_ipc[i].sid, sizeof(temp_afterbydstport_ipc[new_count].sid)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { afterbydstport_ipc[i].ipdstport = temp_afterbydstport_ipc[i].ipdstport; afterbydstport_ipc[i].count = temp_afterbydstport_ipc[i].count; afterbydstport_ipc[i].utime = temp_afterbydstport_ipc[i].utime; afterbydstport_ipc[i].expire = temp_afterbydstport_ipc[i].expire; strlcpy(afterbydstport_ipc[i].sid, temp_afterbydstport_ipc[i].sid, sizeof(afterbydstport_ipc[i].sid)); } counters_ipc->after_count_by_dstport = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean after_by_dstport. Nothing to remove!", __FILE__, __LINE__); free(temp_afterbydstport_ipc); pthread_mutex_unlock(&After_By_Dst_Port_Mutex); Sagan_File_Unlock(config->shm_after_by_dstport); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for after_by_dstport", __FILE__, __LINE__, new_count, old_count); free(temp_afterbydstport_ipc); pthread_mutex_unlock(&After_By_Dst_Port_Mutex); Sagan_File_Unlock(config->shm_after_by_dstport); return(0); } /* AfterbyUsername_IPC */ else if ( type == AFTER_BY_USERNAME && config->max_after_by_username < counters_ipc->after_count_by_username ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); new_count = 0; old_count = 0; Sagan_File_Lock(config->shm_after_by_username); pthread_mutex_lock(&After_By_Username_Mutex); struct after_by_username_ipc *temp_afterbyusername_ipc; temp_afterbyusername_ipc = malloc(sizeof(struct after_by_username_ipc) * config->max_after_by_username); memset(temp_afterbyusername_ipc, 0, sizeof(sizeof(struct after_by_username_ipc) * config->max_after_by_username)); old_count = counters_ipc->after_count_by_username; for (i = 0; i < counters_ipc->after_count_by_username; i++) { if ( (utime - afterbyusername_ipc[i].utime) < afterbyusername_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Afterbyusername_IPC : Keeping '%s'.", __FILE__, __LINE__, afterbyusername_ipc[i].username); } temp_afterbyusername_ipc[new_count].count = afterbyusername_ipc[i].count; temp_afterbyusername_ipc[new_count].utime = afterbyusername_ipc[i].utime; temp_afterbyusername_ipc[new_count].expire = afterbyusername_ipc[i].expire; strlcpy(temp_afterbyusername_ipc[new_count].sid, afterbyusername_ipc[i].sid, sizeof(temp_afterbyusername_ipc[new_count].sid)); strlcpy(temp_afterbyusername_ipc[new_count].username, afterbyusername_ipc[i].username, sizeof(temp_afterbyusername_ipc[new_count].username)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { afterbyusername_ipc[i].count = temp_afterbyusername_ipc[i].count; afterbyusername_ipc[i].utime = temp_afterbyusername_ipc[i].utime; afterbyusername_ipc[i].expire = temp_afterbyusername_ipc[i].expire; strlcpy(afterbyusername_ipc[i].sid, temp_afterbyusername_ipc[i].sid, sizeof(afterbyusername_ipc[i].sid)); strlcpy(afterbyusername_ipc[i].username, temp_afterbyusername_ipc[i].username, sizeof(afterbyusername_ipc[i].username)); } counters_ipc->after_count_by_username = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean after_by_username. Nothing to remove!", __FILE__, __LINE__); free(temp_afterbyusername_ipc); pthread_mutex_unlock(&After_By_Username_Mutex); Sagan_File_Unlock(config->shm_after_by_username); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for after_by_username", __FILE__, __LINE__, new_count, old_count); free(temp_afterbyusername_ipc); pthread_mutex_unlock(&After_By_Username_Mutex); Sagan_File_Unlock(config->shm_after_by_username); return(0); } /* Threshbysrc_IPC */ else if ( type == THRESH_BY_SRC && config->max_threshold_by_src < counters_ipc->thresh_count_by_src ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); new_count = 0; old_count = 0; Sagan_File_Lock(config->shm_thresh_by_src); pthread_mutex_lock(&Thresh_By_Src_Mutex); struct thresh_by_src_ipc *temp_threshbysrc_ipc; temp_threshbysrc_ipc = malloc(sizeof(struct thresh_by_src_ipc) * config->max_threshold_by_src); memset(temp_threshbysrc_ipc, 0, sizeof(sizeof(struct thresh_by_src_ipc) * config->max_threshold_by_src)); old_count = counters_ipc->thresh_count_by_src; for (i = 0; i < counters_ipc->thresh_count_by_src; i++) { if ( (utime - threshbysrc_ipc[i].utime) < threshbysrc_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Threshbysrc_IPC : Keeping %u.", __FILE__, __LINE__, threshbysrc_ipc[i].ipsrc); } temp_threshbysrc_ipc[new_count].ipsrc = threshbysrc_ipc[i].ipsrc; temp_threshbysrc_ipc[new_count].count = threshbysrc_ipc[i].count; temp_threshbysrc_ipc[new_count].utime = threshbysrc_ipc[i].utime; temp_threshbysrc_ipc[new_count].expire = threshbysrc_ipc[i].expire; strlcpy(temp_threshbysrc_ipc[new_count].sid, threshbysrc_ipc[i].sid, sizeof(temp_threshbysrc_ipc[new_count].sid)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { threshbysrc_ipc[i].ipsrc = temp_threshbysrc_ipc[i].ipsrc; threshbysrc_ipc[i].count = temp_threshbysrc_ipc[i].count; threshbysrc_ipc[i].utime = temp_threshbysrc_ipc[i].utime; threshbysrc_ipc[i].expire = temp_threshbysrc_ipc[i].expire; strlcpy(threshbysrc_ipc[i].sid, temp_threshbysrc_ipc[i].sid, sizeof(threshbysrc_ipc[i].sid)); } counters_ipc->thresh_count_by_src = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean thresh_by_src. Nothing to remove!", __FILE__, __LINE__); free(temp_threshbysrc_ipc); pthread_mutex_unlock(&Thresh_By_Src_Mutex); Sagan_File_Unlock(config->shm_thresh_by_src); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for thresh_by_src", __FILE__, __LINE__, new_count, old_count); free(temp_threshbysrc_ipc); pthread_mutex_unlock(&Thresh_By_Src_Mutex); Sagan_File_Unlock(config->shm_thresh_by_src); return(0); } /* Threshbydst_IPC */ else if ( type == THRESH_BY_SRC && config->max_threshold_by_dst < counters_ipc->thresh_count_by_dst ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); new_count = 0; old_count = 0; Sagan_File_Lock(config->shm_thresh_by_dst); pthread_mutex_lock(&Thresh_By_Dst_Mutex); struct thresh_by_dst_ipc *temp_threshbydst_ipc; temp_threshbydst_ipc = malloc(sizeof(struct thresh_by_dst_ipc) * config->max_threshold_by_dst); memset(temp_threshbydst_ipc, 0, sizeof(sizeof(struct thresh_by_dst_ipc) * config->max_threshold_by_dst)); old_count = counters_ipc->thresh_count_by_dst; for (i = 0; i < counters_ipc->thresh_count_by_dst; i++) { if ( (utime - threshbydst_ipc[i].utime) < threshbydst_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Threshbydst_IPC : Keeping %u.", __FILE__, __LINE__, threshbydst_ipc[i].ipdst); } temp_threshbydst_ipc[new_count].ipdst = threshbydst_ipc[i].ipdst; temp_threshbydst_ipc[new_count].count = threshbydst_ipc[i].count; temp_threshbydst_ipc[new_count].utime = threshbydst_ipc[i].utime; temp_threshbydst_ipc[new_count].expire = threshbydst_ipc[i].expire; strlcpy(temp_threshbydst_ipc[new_count].sid, threshbydst_ipc[i].sid, sizeof(temp_threshbydst_ipc[new_count].sid)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { threshbydst_ipc[i].ipdst = temp_threshbydst_ipc[i].ipdst; threshbydst_ipc[i].count = temp_threshbydst_ipc[i].count; threshbydst_ipc[i].utime = temp_threshbydst_ipc[i].utime; threshbydst_ipc[i].expire = temp_threshbydst_ipc[i].expire; strlcpy(threshbydst_ipc[i].sid, temp_threshbydst_ipc[i].sid, sizeof(threshbydst_ipc[i].sid)); } counters_ipc->thresh_count_by_dst = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean thresh_by_dst. Nothing to remove!", __FILE__, __LINE__); free(temp_threshbydst_ipc); pthread_mutex_unlock(&Thresh_By_Dst_Mutex); Sagan_File_Unlock(config->shm_thresh_by_dst); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for thresh_by_dst", __FILE__, __LINE__, new_count, old_count); free(temp_threshbydst_ipc); pthread_mutex_unlock(&Thresh_By_Dst_Mutex); Sagan_File_Unlock(config->shm_thresh_by_dst); return(0); } /* Threshbysrcport_IPC */ else if ( type == THRESH_BY_SRCPORT && config->max_threshold_by_srcport < counters_ipc->thresh_count_by_srcport ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); new_count = 0; old_count = 0; Sagan_File_Lock(config->shm_thresh_by_srcport); pthread_mutex_lock(&Thresh_By_Src_Port_Mutex); struct thresh_by_srcport_ipc *temp_threshbysrcport_ipc; temp_threshbysrcport_ipc = malloc(sizeof(struct thresh_by_srcport_ipc) * config->max_threshold_by_srcport); memset(temp_threshbysrcport_ipc, 0, sizeof(sizeof(struct thresh_by_srcport_ipc) * config->max_threshold_by_srcport)); old_count = counters_ipc->thresh_count_by_srcport; for (i = 0; i < counters_ipc->thresh_count_by_src; i++) { if ( (utime - threshbysrc_ipc[i].utime) < threshbysrc_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Threshbysrcport_IPC : Keeping %u.", __FILE__, __LINE__, threshbysrcport_ipc[i].ipsrcport); } temp_threshbysrcport_ipc[new_count].ipsrcport = threshbysrcport_ipc[i].ipsrcport; temp_threshbysrcport_ipc[new_count].count = threshbysrcport_ipc[i].count; temp_threshbysrcport_ipc[new_count].utime = threshbysrcport_ipc[i].utime; temp_threshbysrcport_ipc[new_count].expire = threshbysrcport_ipc[i].expire; strlcpy(temp_threshbysrcport_ipc[new_count].sid, threshbysrcport_ipc[i].sid, sizeof(temp_threshbysrcport_ipc[new_count].sid)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { threshbysrcport_ipc[i].ipsrcport = temp_threshbysrcport_ipc[i].ipsrcport; threshbysrcport_ipc[i].count = temp_threshbysrcport_ipc[i].count; threshbysrcport_ipc[i].utime = temp_threshbysrcport_ipc[i].utime; threshbysrcport_ipc[i].expire = temp_threshbysrcport_ipc[i].expire; strlcpy(threshbysrcport_ipc[i].sid, temp_threshbysrcport_ipc[i].sid, sizeof(threshbysrcport_ipc[i].sid)); } counters_ipc->thresh_count_by_srcport = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean thresh_by_srcport. Nothing to remove!", __FILE__, __LINE__); free(temp_threshbysrcport_ipc); pthread_mutex_unlock(&Thresh_By_Src_Port_Mutex); Sagan_File_Unlock(config->shm_thresh_by_src); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for thresh_by_srcport", __FILE__, __LINE__, new_count, old_count); free(temp_threshbysrcport_ipc); pthread_mutex_unlock(&Thresh_By_Src_Port_Mutex); Sagan_File_Unlock(config->shm_thresh_by_srcport); return(0); } /* Threshbydstport_IPC */ else if ( type == THRESH_BY_DSTPORT && config->max_threshold_by_dstport < counters_ipc->thresh_count_by_dstport ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); new_count = 0; old_count = 0; Sagan_File_Lock(config->shm_thresh_by_dstport); pthread_mutex_lock(&Thresh_By_Dst_Port_Mutex); struct thresh_by_dstport_ipc *temp_threshbydstport_ipc; temp_threshbydstport_ipc = malloc(sizeof(struct thresh_by_dstport_ipc) * config->max_threshold_by_dstport); memset(temp_threshbydstport_ipc, 0, sizeof(sizeof(struct thresh_by_dstport_ipc) * config->max_threshold_by_dstport)); old_count = counters_ipc->thresh_count_by_dstport; for (i = 0; i < counters_ipc->thresh_count_by_dst; i++) { if ( (utime - threshbydst_ipc[i].utime) < threshbydst_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Threshbydstport_IPC : Keeping %u.", __FILE__, __LINE__, threshbydstport_ipc[i].ipdstport); } temp_threshbydstport_ipc[new_count].ipdstport = threshbydstport_ipc[i].ipdstport; temp_threshbydstport_ipc[new_count].count = threshbydstport_ipc[i].count; temp_threshbydstport_ipc[new_count].utime = threshbydstport_ipc[i].utime; temp_threshbydstport_ipc[new_count].expire = threshbydstport_ipc[i].expire; strlcpy(temp_threshbydstport_ipc[new_count].sid, threshbydstport_ipc[i].sid, sizeof(temp_threshbydstport_ipc[new_count].sid)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { threshbydstport_ipc[i].ipdstport = temp_threshbydstport_ipc[i].ipdstport; threshbydstport_ipc[i].count = temp_threshbydstport_ipc[i].count; threshbydstport_ipc[i].utime = temp_threshbydstport_ipc[i].utime; threshbydstport_ipc[i].expire = temp_threshbydstport_ipc[i].expire; strlcpy(threshbydstport_ipc[i].sid, temp_threshbydstport_ipc[i].sid, sizeof(threshbydstport_ipc[i].sid)); } counters_ipc->thresh_count_by_dstport = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean thresh_by_dstport. Nothing to remove!", __FILE__, __LINE__); free(temp_threshbydstport_ipc); pthread_mutex_unlock(&Thresh_By_Dst_Port_Mutex); Sagan_File_Unlock(config->shm_thresh_by_dst); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for thresh_by_dstport", __FILE__, __LINE__, new_count, old_count); free(temp_threshbydstport_ipc); pthread_mutex_unlock(&Thresh_By_Dst_Port_Mutex); Sagan_File_Unlock(config->shm_thresh_by_dstport); return(0); } /* ThreshbyUsername_IPC */ else if ( type == THRESH_BY_USERNAME && config->max_threshold_by_username < counters_ipc->thresh_count_by_username ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); new_count = 0; old_count = 0; Sagan_File_Lock(config->shm_thresh_by_username); pthread_mutex_lock(&Thresh_By_Username_Mutex); struct thresh_by_username_ipc *temp_threshbyusername_ipc; temp_threshbyusername_ipc = malloc(sizeof(struct thresh_by_username_ipc) * config->max_threshold_by_username); memset(temp_threshbyusername_ipc, 0, sizeof(sizeof(struct thresh_by_username_ipc) * config->max_threshold_by_username)); old_count = counters_ipc->thresh_count_by_username; for (i = 0; i < counters_ipc->thresh_count_by_username; i++) { if ( (utime - threshbyusername_ipc[i].utime) < threshbyusername_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Afterbyusername_IPC : Keeping '%s'.", __FILE__, __LINE__, threshbyusername_ipc[i].username); } temp_threshbyusername_ipc[new_count].count = threshbyusername_ipc[i].count; temp_threshbyusername_ipc[new_count].utime = threshbyusername_ipc[i].utime; temp_threshbyusername_ipc[new_count].expire = threshbyusername_ipc[i].expire; strlcpy(temp_threshbyusername_ipc[new_count].sid, threshbyusername_ipc[i].sid, sizeof(temp_threshbyusername_ipc[new_count].sid)); strlcpy(temp_threshbyusername_ipc[new_count].username, threshbyusername_ipc[i].username, sizeof(temp_threshbyusername_ipc[new_count].username)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { threshbyusername_ipc[i].count = temp_threshbyusername_ipc[i].count; threshbyusername_ipc[i].utime = temp_threshbyusername_ipc[i].utime; threshbyusername_ipc[i].expire = temp_threshbyusername_ipc[i].expire; strlcpy(threshbyusername_ipc[i].sid, temp_threshbyusername_ipc[i].sid, sizeof(threshbyusername_ipc[i].sid)); strlcpy(threshbyusername_ipc[i].username, temp_threshbyusername_ipc[i].username, sizeof(threshbyusername_ipc[i].username)); } counters_ipc->thresh_count_by_username = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean thresh_by_username. Nothing to remove!", __FILE__, __LINE__); free(temp_threshbyusername_ipc); pthread_mutex_unlock(&Thresh_By_Username_Mutex); Sagan_File_Unlock(config->shm_thresh_by_username); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for thresh_by_username", __FILE__, __LINE__, new_count, old_count); free(temp_threshbyusername_ipc); pthread_mutex_unlock(&Thresh_By_Username_Mutex); Sagan_File_Unlock(config->shm_thresh_by_username); return(0); } /* Flowbit_IPC */ else if ( type == FLOWBIT && config->max_flowbits < counters_ipc->flowbit_count ) { t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); utime = atol(timet); new_count = 0; old_count = 0; Sagan_File_Lock(config->shm_flowbit); pthread_mutex_lock(&Flowbit_Mutex); struct _Sagan_IPC_Flowbit *temp_flowbit_ipc; temp_flowbit_ipc = malloc(sizeof(struct _Sagan_IPC_Flowbit) * config->max_flowbits); memset(temp_flowbit_ipc, 0, sizeof(sizeof(struct _Sagan_IPC_Flowbit) * config->max_flowbits)); old_count = counters_ipc->flowbit_count; for (i = 0; i < counters_ipc->flowbit_count; i++) { if ( (utime - flowbit_ipc[i].flowbit_expire) < flowbit_ipc[i].expire ) { if ( debug->debugipc ) { Sagan_Log(S_DEBUG, "[%s, %d line] Flowbot_IPC : Keeping '%s'.", __FILE__, __LINE__, flowbit_ipc[i].ip_src, flowbit_ipc[i].ip_dst); } temp_flowbit_ipc[new_count].flowbit_state = flowbit_ipc[i].flowbit_state; temp_flowbit_ipc[new_count].ip_src = flowbit_ipc[i].ip_src; temp_flowbit_ipc[new_count].ip_dst = flowbit_ipc[i].ip_dst; temp_flowbit_ipc[new_count].flowbit_expire = flowbit_ipc[i].flowbit_expire; temp_flowbit_ipc[new_count].expire = flowbit_ipc[i].expire; strlcpy(temp_flowbit_ipc[new_count].flowbit_name, flowbit_ipc[i].flowbit_name, sizeof(temp_flowbit_ipc[new_count].flowbit_name)); new_count++; } } if ( new_count > 0 ) { for ( i = 0; i < new_count; i++ ) { flowbit_ipc[i].flowbit_state = temp_flowbit_ipc[i].flowbit_state; flowbit_ipc[i].ip_src = temp_flowbit_ipc[i].ip_src; flowbit_ipc[i].ip_dst = temp_flowbit_ipc[i].ip_dst; flowbit_ipc[i].flowbit_expire = temp_flowbit_ipc[i].flowbit_expire; flowbit_ipc[i].expire = temp_flowbit_ipc[i].expire; strlcpy(flowbit_ipc[i].flowbit_name, temp_flowbit_ipc[i].flowbit_name, sizeof(flowbit_ipc[i].flowbit_name)); } counters_ipc->flowbit_count = new_count; } else { Sagan_Log(S_WARN, "[%s, line %d] Could not clean _Sagan_IPC_Flowbit. Nothing to remove!", __FILE__, __LINE__); free(temp_flowbit_ipc); pthread_mutex_unlock(&Flowbit_Mutex); Sagan_File_Unlock(config->shm_flowbit); return(1); } Sagan_Log(S_NORMAL, "[%s, line %d] Kept %d elements out of %d for _Sagan_IPC_Flowbit.", __FILE__, __LINE__, new_count, old_count); free(temp_flowbit_ipc); pthread_mutex_unlock(&Flowbit_Mutex); Sagan_File_Unlock(config->shm_flowbit); return(0); } return(0); } /***************************************************************************** * Sagan_IPC_Check_Object - If "counters" have been reset, we want to * recreate the other objects (hence the unlink). This function tests for * this case *****************************************************************************/ void Sagan_IPC_Check_Object(char *tmp_object_check, sbool new_counters, char *object_name) { struct stat object_check; if ( ( stat(tmp_object_check, &object_check) == 0 ) && new_counters == 1 ) { if ( unlink(tmp_object_check) == -1 ) { Sagan_Log(S_ERROR, "[%s, line %d] Could not unlink %s memory object! [%s]", __FILE__, __LINE__, object_name, strerror(errno)); } Sagan_Log(S_NORMAL, "* Stale %s memory object found & unlinked.", object_name); } } /***************************************************************************** * Sagan_IPC_Init - Create (if needed) or map to an IPC object. *****************************************************************************/ void Sagan_IPC_Init(void) { /* If we have a "new" counters shared memory object, but other "old" data, we need to remove * the "old" data! The counters need to stay in sync with the other data objects! */ sbool new_counters = 0; sbool new_object = 0; int i; char tmp_object_check[255]; /* For convert 32 bit IP to octet */ struct in_addr ip_addr_src; struct in_addr ip_addr_dst; Sagan_Log(S_NORMAL, "Initializing shared memory objects."); Sagan_Log(S_NORMAL, "---------------------------------------------------------------------------"); /* Init counters first. Need to track all other share memory objects */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, COUNTERS_IPC_FILE); if ((config->shm_counters = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ Counters shared object (new)."); new_counters = 1; } else if ((config->shm_counters = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for counters. [%s:%s]", __FILE__, __LINE__, tmp_object_check, strerror(errno)); } else { Sagan_Log(S_NORMAL, "- Counters shared object (reload)"); } if ( ftruncate(config->shm_counters, sizeof(_Sagan_IPC_Counters)) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate counters. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( counters_ipc = mmap(0, sizeof(_Sagan_IPC_Counters), (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_counters, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for counters object! [%s]", __FILE__, __LINE__, strerror(errno)); } /* Flowbit memory object */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, FLOWBIT_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "flowbit"); if ((config->shm_flowbit = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ Flowbit shared object (new)."); new_object=1; } else if ((config->shm_flowbit = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for flowbit (%s:%s)", __FILE__, __LINE__, tmp_object_check, strerror(errno)); } if ( ftruncate(config->shm_flowbit, sizeof(_Sagan_IPC_Flowbit) * config->max_flowbits ) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate flowbit. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( flowbit_ipc = mmap(0, sizeof(_Sagan_IPC_Flowbit) * config->max_flowbits, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_flowbit, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for flowbit object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0) { Sagan_Log(S_NORMAL, "- Flowbit shared object reloaded (%d flowbits loaded / max: %d).", counters_ipc->flowbit_count, config->max_flowbits); } new_object = 0; if ( debug->debugipc && counters_ipc->flowbit_count >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** Flowbits ***"); Sagan_Log(S_DEBUG, "------------------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-2s| %-25s| %-16s| %-16s| %-21s| %s", "S", "Flowbit name", "SRC IP", "DST IP", "Date added/modified", "Expire"); Sagan_Log(S_DEBUG, "------------------------------------------------------------------------------------------------"); for (i= 0; i < counters_ipc->flowbit_count; i++ ) { ip_addr_src.s_addr = htonl(flowbit_ipc[i].ip_src); ip_addr_dst.s_addr = htonl(flowbit_ipc[i].ip_dst); if ( flowbit_ipc[i].flowbit_state == 1 ) { Sagan_Log(S_DEBUG, "%-2d| %-25s| %-16s| %-16s| %-21s| %d", flowbit_ipc[i].flowbit_state, flowbit_ipc[i].flowbit_name, inet_ntoa(ip_addr_src), inet_ntoa(ip_addr_dst), Sagan_u32_Time_To_Human(flowbit_ipc[i].flowbit_expire), flowbit_ipc[i].expire ); } } Sagan_Log(S_DEBUG, ""); } /* Threshold by source */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, THRESH_BY_SRC_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "thresh_by_src"); if ((config->shm_thresh_by_src = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ Thresh_by_src shared object (new)."); new_object=1; } else if ((config->shm_thresh_by_src = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for thresh_by_src (%s:%s)", __FILE__, __LINE__, tmp_object_check, strerror(errno)); } if ( ftruncate(config->shm_thresh_by_src, sizeof(thresh_by_src_ipc) * config->max_threshold_by_src ) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate thresh_by_src. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( threshbysrc_ipc = mmap(0, sizeof(thresh_by_src_ipc) * config->max_threshold_by_src, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_thresh_by_src, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for thresh_by_src object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0) { Sagan_Log(S_NORMAL, "- Thresh_by_src shared object reloaded (%d sources loaded / max: %d).", counters_ipc->thresh_count_by_src, config->max_threshold_by_src); } new_object = 0; if ( debug->debugipc && counters_ipc->thresh_count_by_src >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** Threshold by source ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "SRC IP", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->thresh_count_by_src; i++) { ip_addr_src.s_addr = htonl(threshbysrc_ipc[i].ipsrc); Sagan_Log(S_DEBUG, "%-16s| %-11d| %-21s| %-11s| %d", inet_ntoa(ip_addr_src), threshbysrc_ipc[i].count, Sagan_u32_Time_To_Human(threshbysrc_ipc[i].utime), threshbysrc_ipc[i].sid, threshbysrc_ipc[i].expire); } Sagan_Log(S_DEBUG, ""); } /* Threshold by destination */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, THRESH_BY_DST_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "thresh_by_dst"); if ((config->shm_thresh_by_dst = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ Thresh_by_dst shared object (new)."); new_object=1; } else if ((config->shm_thresh_by_dst = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for thresh_by_dst (%s:%s)", __FILE__, __LINE__, tmp_object_check, strerror(errno)); } if ( ftruncate(config->shm_thresh_by_dst, sizeof(thresh_by_dst_ipc) * config->max_threshold_by_dst) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate thresh_by_dst. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( threshbydst_ipc = mmap(0, sizeof(thresh_by_dst_ipc) * config->max_threshold_by_dst, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_thresh_by_dst, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for thresh_by_dst object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0) { Sagan_Log(S_NORMAL, "- Thresh_by_dst shared object reloaded (%d destinations loaded / max: %d).", counters_ipc->thresh_count_by_dst, config->max_threshold_by_dst); } new_object = 0; if ( debug->debugipc && counters_ipc->thresh_count_by_dst >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** Threshold by destination ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "DST IP", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->thresh_count_by_dst; i++) { ip_addr_dst.s_addr = htonl(threshbydst_ipc[i].ipdst); Sagan_Log(S_DEBUG, "%-16s| %-11d| %-21s| %-11s| %d", inet_ntoa(ip_addr_dst), threshbydst_ipc[i].count, Sagan_u32_Time_To_Human(threshbydst_ipc[i].utime), threshbydst_ipc[i].sid, threshbydst_ipc[i].expire); } Sagan_Log(S_DEBUG, ""); } /* Threshold by source port */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, THRESH_BY_SRCPORT_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "thresh_by_srcport"); if ((config->shm_thresh_by_srcport = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ Thresh_by_srcport shared object (new)."); new_object=1; } else if ((config->shm_thresh_by_srcport = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for thresh_by_srcport (%s)", __FILE__, __LINE__, strerror(errno)); } if ( ftruncate(config->shm_thresh_by_srcport, sizeof(thresh_by_srcport_ipc) * config->max_threshold_by_srcport) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate thresh_by_srcport. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( threshbysrcport_ipc = mmap(0, sizeof(thresh_by_srcport_ipc) * config->max_threshold_by_srcport, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_thresh_by_srcport, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for thresh_by_srcport object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0) { Sagan_Log(S_NORMAL, "- Thresh_by_srcport shared object reloaded (%d source ports loaded / max: %d).", counters_ipc->thresh_count_by_srcport, config->max_threshold_by_srcport); } new_object = 0; if ( debug->debugipc && counters_ipc->thresh_count_by_srcport >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** Threshold by source port ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "SRCPORT IP", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->thresh_count_by_srcport; i++) { uint32_t srcport = htonl(threshbysrcport_ipc[i].ipsrcport); Sagan_Log(S_DEBUG, "%-16d| %-11d| %-21s| %-11s| %d", srcport, threshbysrcport_ipc[i].count, Sagan_u32_Time_To_Human(threshbysrcport_ipc[i].utime), threshbysrcport_ipc[i].sid, threshbysrcport_ipc[i].expire); } Sagan_Log(S_DEBUG, ""); } /* Threshold by destination port */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, THRESH_BY_DSTPORT_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "thresh_by_dstport"); if ((config->shm_thresh_by_dstport = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ Thresh_by_dstport shared object (new)."); new_object=1; } else if ((config->shm_thresh_by_dstport = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for thresh_by_dstport (%s)", __FILE__, __LINE__, strerror(errno)); } if ( ftruncate(config->shm_thresh_by_dstport, sizeof(thresh_by_dstport_ipc) * config->max_threshold_by_dstport) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate thresh_by_dstport. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( threshbydstport_ipc = mmap(0, sizeof(thresh_by_dstport_ipc) * config->max_threshold_by_dstport, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_thresh_by_dstport, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for thresh_by_dstport object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0) { Sagan_Log(S_NORMAL, "- Thresh_by_dstport shared object reloaded (%d destination ports loaded / max: %d).", counters_ipc->thresh_count_by_dstport, config->max_threshold_by_dstport); } new_object = 0; if ( debug->debugipc && counters_ipc->thresh_count_by_dstport >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** Threshold by destination port ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "DSTPORT IP", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->thresh_count_by_dstport; i++) { uint32_t dstport = htonl(threshbydstport_ipc[i].ipdstport); Sagan_Log(S_DEBUG, "%-16d| %-11d| %-21s| %-11s| %d", dstport, threshbydstport_ipc[i].count, Sagan_u32_Time_To_Human(threshbydstport_ipc[i].utime), threshbydstport_ipc[i].sid, threshbydstport_ipc[i].expire); } Sagan_Log(S_DEBUG, ""); } /* Threshold by username */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, THRESH_BY_USERNAME_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "thresh_by_username"); if ((config->shm_thresh_by_username = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ Thresh_by_username shared object (new)."); new_object=1; } else if ((config->shm_thresh_by_username = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for thresh_by_username (%s:%s)", __FILE__, __LINE__, tmp_object_check, strerror(errno)); } if ( ftruncate(config->shm_thresh_by_username, sizeof(thresh_by_username_ipc) * config->max_threshold_by_username ) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate thresh_by_username. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( threshbyusername_ipc = mmap(0, sizeof(thresh_by_username_ipc) * config->max_threshold_by_username, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_thresh_by_username, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for thresh_by_username object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0 ) { Sagan_Log(S_NORMAL, "- Thresh_by_username shared object reloaded (%d usernames loaded / max: %d).", counters_ipc->thresh_count_by_username, config->max_threshold_by_username); } new_object = 0; if ( debug->debugipc && counters_ipc->thresh_count_by_username >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** Threshold by username ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "Username", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->thresh_count_by_username; i++) { Sagan_Log(S_DEBUG, "%-16s| %-11d| %-21s| %-11s| %d", threshbyusername_ipc[i].username, threshbyusername_ipc[i].count, Sagan_u32_Time_To_Human(threshbyusername_ipc[i].utime), threshbyusername_ipc[i].sid, threshbyusername_ipc[i].expire); } } /* After by source */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, AFTER_BY_SRC_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "after_by_src"); if ((config->shm_after_by_src = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ After_by_src shared object (new)."); new_object=1; } else if ((config->shm_after_by_src = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for after_by_src (%s:%s)", __FILE__, __LINE__, tmp_object_check, strerror(errno)); } if ( ftruncate(config->shm_after_by_src, sizeof(after_by_src_ipc) * config->max_after_by_src ) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate after_by_src. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( afterbysrc_ipc = mmap(0, sizeof(after_by_src_ipc) * config->max_after_by_src, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_after_by_src, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for after_by_src object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0 ) { Sagan_Log(S_NORMAL, "- After_by_src shared object reloaded (%d sources loaded / max: %d).", counters_ipc->after_count_by_src, config->max_after_by_src); } new_object = 0; if ( debug->debugipc && counters_ipc->after_count_by_src >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** After by source ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "SRC IP", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->after_count_by_src; i++ ) { ip_addr_src.s_addr = htonl(afterbysrc_ipc[i].ipsrc); Sagan_Log(S_DEBUG, "%-16s| %-11d| %-21s| %-11s| %d", inet_ntoa(ip_addr_src), afterbysrc_ipc[i].count, Sagan_u32_Time_To_Human(afterbysrc_ipc[i].utime), afterbysrc_ipc[i].sid, afterbysrc_ipc[i].expire); } Sagan_Log(S_DEBUG, ""); } /* After by destination */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, AFTER_BY_DST_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "after_by_dst"); if ((config->shm_after_by_dst = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ After_by_dst shared object (new)."); new_object=1; } else if ((config->shm_after_by_dst = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for after_by_dst (%s:%s)", __FILE__, __LINE__, tmp_object_check, strerror(errno)); } if ( ftruncate(config->shm_after_by_dst, sizeof(after_by_dst_ipc) * config->max_after_by_dst) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate after_by_dst. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( afterbydst_ipc = mmap(0, sizeof(after_by_dst_ipc) * config->max_after_by_dst, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_after_by_dst, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for after_by_src object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0 ) { Sagan_Log(S_NORMAL, "- After_by_dst shared object reloaded (%d destinations loaded / max: %d).", counters_ipc->after_count_by_dst, config->max_after_by_dst); } new_object = 0; if ( debug->debugipc && counters_ipc->after_count_by_dst >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** After by destination ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "DST IP", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->after_count_by_dst; i++) { ip_addr_dst.s_addr = htonl(afterbydst_ipc[i].ipdst); Sagan_Log(S_DEBUG, "%-16s| %-11d| %-21s| %-11s| %d", inet_ntoa(ip_addr_dst), afterbydst_ipc[i].count, Sagan_u32_Time_To_Human(afterbydst_ipc[i].utime), afterbydst_ipc[i].sid, afterbydst_ipc[i].expire); } Sagan_Log(S_DEBUG, ""); } /* After by source port */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, AFTER_BY_SRCPORT_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "after_by_srcport"); if ((config->shm_after_by_srcport = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ After_by_srcport shared object (new)."); new_object=1; } else if ((config->shm_after_by_srcport = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for after_by_srcport (%s)", __FILE__, __LINE__, strerror(errno)); } if ( ftruncate(config->shm_after_by_srcport, sizeof(after_by_srcport_ipc) * config->max_after_by_srcport) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate after_by_srcport. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( afterbysrcport_ipc = mmap(0, sizeof(after_by_srcport_ipc) * config->max_after_by_srcport, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_after_by_srcport, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for after_by_src object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0 ) { Sagan_Log(S_NORMAL, "- After_by_srcport shared object reloaded (%d source ports loaded / max: %d).", counters_ipc->after_count_by_srcport, config->max_after_by_srcport); } new_object = 0; if ( debug->debugipc && counters_ipc->after_count_by_srcport >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** After by source port ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "SRCPORT", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->after_count_by_srcport; i++) { uint32_t srcport = htonl(afterbysrcport_ipc[i].ipsrcport); Sagan_Log(S_DEBUG, "%-16d| %-11d| %-21s| %-11s| %d", srcport, afterbysrcport_ipc[i].count, Sagan_u32_Time_To_Human(afterbysrcport_ipc[i].utime), afterbysrcport_ipc[i].sid, afterbysrcport_ipc[i].expire); } Sagan_Log(S_DEBUG, ""); } /* After by destination port */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, AFTER_BY_DSTPORT_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "after_by_dstport"); if ((config->shm_after_by_dstport = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ After_by_dstport shared object (new)."); new_object=1; } else if ((config->shm_after_by_dstport = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for after_by_dstport (%s)", __FILE__, __LINE__, strerror(errno)); } if ( ftruncate(config->shm_after_by_dstport, sizeof(after_by_dstport_ipc) * config->max_after_by_dstport) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate after_by_dstport. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( afterbydstport_ipc = mmap(0, sizeof(after_by_dstport_ipc) * config->max_after_by_dstport, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_after_by_dstport, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for after_by_src object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0 ) { Sagan_Log(S_NORMAL, "- After_by_dstport shared object reloaded (%d destinations ports loaded / max: %d).", counters_ipc->after_count_by_dstport, config->max_after_by_dstport); } new_object = 0; if ( debug->debugipc && counters_ipc->after_count_by_dstport >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** After by destination port ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "DSTPORT", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->after_count_by_dstport; i++) { uint32_t dstport = htonl(afterbydstport_ipc[i].ipdstport); Sagan_Log(S_DEBUG, "%-16d| %-11d| %-21s| %-11s| %d", dstport, afterbydstport_ipc[i].count, Sagan_u32_Time_To_Human(afterbydstport_ipc[i].utime), afterbydstport_ipc[i].sid, afterbydstport_ipc[i].expire); } Sagan_Log(S_DEBUG, ""); } /* After by username */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, AFTER_BY_USERNAME_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "after_by_username"); if ((config->shm_after_by_username = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ After_by_username shared object (new)."); new_object=1; } else if ((config->shm_after_by_username = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for after_by_username (%s:%s)", __FILE__, __LINE__, tmp_object_check, strerror(errno)); } if ( ftruncate(config->shm_after_by_username, sizeof(after_by_username_ipc) * config->max_after_by_username ) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate after_by_username. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( afterbyusername_ipc = mmap(0, sizeof(after_by_username_ipc) * config->max_after_by_username, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_after_by_username, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for after_by_src object! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0 ) { Sagan_Log(S_NORMAL, "- After_by_username shared object reloaded (%d usernames loaded / max: %d).", counters_ipc->after_count_by_username, config->max_after_by_username); } new_object = 0; if ( debug->debugipc && counters_ipc->after_count_by_username >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** After by username ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "Username", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->after_count_by_username; i++) { Sagan_Log(S_DEBUG, "%-16s| %-11d| %-21s| %-11s| %d", afterbyusername_ipc[i].username, afterbyusername_ipc[i].count, Sagan_u32_Time_To_Human(afterbyusername_ipc[i].utime), afterbyusername_ipc[i].sid, afterbyusername_ipc[i].expire); } Sagan_Log(S_DEBUG, ""); } /* Client tracking */ if ( config->sagan_track_clients_flag ) { snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", config->ipc_directory, CLIENT_TRACK_IPC_FILE); Sagan_IPC_Check_Object(tmp_object_check, new_counters, "_Sagan_Track_Clients_IPC"); if ((config->shm_track_clients = open(tmp_object_check, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE))) > 0 ) { Sagan_Log(S_NORMAL, "+ Sagan_track_clients shared object (new)."); new_object=1; /* Reset any track_clients_client_count's to 0! */ Sagan_File_Lock(config->shm_counters); counters_ipc->track_clients_client_count = 0; counters_ipc->track_clients_down = 0; Sagan_File_Unlock(config->shm_counters); } else if ((config->shm_track_clients = open(tmp_object_check, (O_CREAT | O_RDWR), (S_IREAD | S_IWRITE))) < 1 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open() for Sagan_track_clients (%s:%s)", __FILE__, __LINE__, tmp_object_check, strerror(errno)); } if ( ftruncate(config->shm_track_clients, sizeof(_Sagan_Track_Clients_IPC) * config->max_track_clients ) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to ftruncate _Sagan_Track_Clients_IPC. [%s]", __FILE__, __LINE__, strerror(errno)); } if (( SaganTrackClients_ipc = mmap(0, sizeof(_Sagan_Track_Clients_IPC) * config->max_track_clients, (PROT_READ | PROT_WRITE), MAP_SHARED, config->shm_track_clients, 0)) == MAP_FAILED ) { Sagan_Log(S_ERROR, "[%s, line %d] Error allocating memory for _Sagan_Track_Clients_IPC! [%s]", __FILE__, __LINE__, strerror(errno)); } if ( new_object == 0 ) { Sagan_Log(S_NORMAL, "- Sagan_track_clients shared object reloaded (%d clients loaded / max: %d).", counters_ipc->track_clients_client_count, config->max_track_clients); } new_object = 0; /* if ( debug->debugipc && counters_ipc->track_client_count >= 1 ) { Sagan_Log(S_DEBUG, ""); Sagan_Log(S_DEBUG, "*** After by username ***"); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); Sagan_Log(S_DEBUG, "%-16s| %-11s| %-21s| %-11s| %s", "Username", "Counter","Date added/modified", "SID", "Expire" ); Sagan_Log(S_DEBUG, "--------------------------------------------------------------------------------------"); for ( i = 0; i < counters_ipc->after_count_by_username; i++) { Sagan_Log(S_DEBUG, "%-16s| %-11d| %-21s| %-11s| %d", afterbyusername_ipc[i].username, afterbyusername_ipc[i].count, Sagan_u32_Time_To_Human(afterbyusername_ipc[i].utime), afterbyusername_ipc[i].sid, afterbyusername_ipc[i].expire); } Sagan_Log(S_DEBUG, ""); } */ } } sagan-1.1.2/src/sagan-stats.h0000644000175000017500000000200712770372750014744 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_Statistics( void ); sagan-1.1.2/src/sagan-ignore-list.h0000644000175000017500000000217312770372750016046 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif typedef struct _Sagan_Ignorelist _Sagan_Ignorelist; struct _Sagan_Ignorelist { char ignore_string[256]; }; void Load_Ignore_List ( void ); sagan-1.1.2/src/sagan-geoip2.h0000644000175000017500000000222612770372750014776 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-geoip.h * * Sagan GeoIP prototypes */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef HAVE_LIBMAXMINDDB void Sagan_Open_GeoIP2_Database( void ); int Sagan_GeoIP2_Lookup_Country( char *, int ); #endif sagan-1.1.2/src/sagan-geoip2.c0000644000175000017500000001326612770372750014777 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-geoip2.c * * Functions that handle GeoIP2 lookup's via the Maxmind database. For more * information, please see: * * https://www.maxmind.com/en/geoip2-country-database (For free/pay databases) * http://dev.maxmind.com/geoip/geoip2/geolite2/ (free database) * * You _must_ use the GeoIP2 database and not the legacy GeoIP databases! * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef HAVE_LIBMAXMINDDB #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-rules.h" #include "sagan-geoip2.h" #include "sagan-config.h" #define GEOIP_FOUND_NOT_USER_DEFINED 0 /* GeoIP2 was found for IP, but wasn't listed in user defined countries */ #define GEOIP_FOUND_WAS_USER_DEFINED 1 /* GeoIP2 was found AND was in user defined countries */ #define GEOIP_NOT_FOUND 2 /* GeoIP data was not located */ struct _SaganConfig *config; struct _Rule_Struct *rulestruct; struct _SaganDebug *debug; struct _SaganCounters *counters; pthread_mutex_t SaganGeoIP2Mutex=PTHREAD_MUTEX_INITIALIZER; void Sagan_Open_GeoIP2_Database( void ) { int status; /* * The GeoIP library gives a really vague error when it cannot load * the GeoIP database. We give the user more information here so * that they might fix the issue. This also serves as a test when * Sagan is reloading (SIGHUP) - Champ Clark III (04/20/2015) */ status = access(config->geoip2_country_file, R_OK); if ( status != 0 ) { Sagan_Log(S_WARN, "Cannot open '%s' [%s]!", config->geoip2_country_file, strerror(errno)); Sagan_Log(S_WARN, "Make sure the GeoIP database '%s' is readable by '%s'.", config->geoip2_country_file, config->sagan_runas); Sagan_Log(S_ERROR, "Sagan is NOT loading the GeoIP database data! Abort!"); } status = MMDB_open(config->geoip2_country_file, MMDB_MODE_MMAP, &config->geoip2); if ( status != 0 ) { Sagan_Log(S_ERROR, "Error loading Maxmind GeoIP2 data (%s). Are you trying to load an older, non-GeoIP2 database?", config->geoip2_country_file); } } /***************************************************************************** * Sagan_GeoIP2_Lookup_Country - Looks up the country and determines if * it is in/out of HOME_COUNTRY ****************************************************************************/ int Sagan_GeoIP2_Lookup_Country( char *ipaddr, int rule_position ) { int gai_error; int mmdb_error; int res; char *ptmp = NULL; char *tok = NULL; char country[2]; char tmp[1024]; if (is_rfc1918(IP2Bit(ipaddr))) { if (debug->debuggeoip2) { Sagan_Log(S_DEBUG, "IP address %s is RFC1918, skipping GeoIP2 lookup.", ipaddr); } return(GEOIP_NOT_FOUND); } MMDB_lookup_result_s result = MMDB_lookup_string(&config->geoip2, ipaddr, &gai_error, &mmdb_error); MMDB_entry_data_s entry_data; res = MMDB_get_value(&result.entry, &entry_data, "country", "iso_code", NULL); if (res != MMDB_SUCCESS) { pthread_mutex_lock(&SaganGeoIP2Mutex); counters->geoip2_miss++; pthread_mutex_unlock(&SaganGeoIP2Mutex); Sagan_Log(S_WARN, "Country code MMDB_get_value failure (%s) for %s.", MMDB_strerror(res), ipaddr); return(GEOIP_NOT_FOUND); } if (!entry_data.has_data || entry_data.type != MMDB_DATA_TYPE_UTF8_STRING) { pthread_mutex_lock(&SaganGeoIP2Mutex); counters->geoip2_miss++; pthread_mutex_unlock(&SaganGeoIP2Mutex); if ( debug->debuggeoip2 ) { Sagan_Log(S_DEBUG, "Country code for %s not found in GeoIP2 DB", ipaddr); } return(GEOIP_NOT_FOUND); } strlcpy(country, entry_data.utf8_string, 3); strlcpy(tmp, rulestruct[rule_position].geoip2_country_codes, sizeof(tmp)); if (debug->debuggeoip2) { Sagan_Log(S_DEBUG, "GeoIP Lookup IP : %s", ipaddr); Sagan_Log(S_DEBUG, "Country Codes : %s", rulestruct[rule_position].geoip2_country_codes); Sagan_Log(S_DEBUG, "Found in GeoIP DB: %s", country); } ptmp = strtok_r(tmp, ",", &tok); while (ptmp != NULL ) { if (debug->debuggeoip2) { Sagan_Log(S_DEBUG, "GeoIP2 rule string parsing %s|%s", ptmp, country); } if (!strcmp(ptmp, country)) { if (debug->debuggeoip2) { Sagan_Log(S_DEBUG, "GeoIP Status: Found in user defined values [%s].", country); } return(GEOIP_FOUND_WAS_USER_DEFINED); /* GeoIP was found / there was a hit */ } ptmp = strtok_r(NULL, ",", &tok); } if (debug->debuggeoip2) Sagan_Log(S_DEBUG, "GeoIP Status: Not found in user defined values."); return(GEOIP_FOUND_NOT_USER_DEFINED); } #endif sagan-1.1.2/src/sagan-credits.h0000644000175000017500000000201012770372750015235 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_Credits( void ); sagan-1.1.2/src/output-plugins/0000755000175000017500000000000012770372750015366 5ustar champchampsagan-1.1.2/src/output-plugins/sagan-alert.h0000644000175000017500000000202012770372750017727 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_Alert_File( _SaganEvent *); sagan-1.1.2/src/output-plugins/sagan-alert.c0000644000175000017500000000441712770372750017736 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-alert.c * * Provides logging functionality in a 'snort like' format. Usually in * the /var/log/sagan directory named 'alert' * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include "sagan.h" #include "sagan-alert.h" #include "sagan-references.h" #include "sagan-config.h" struct _Rule_Struct *rulestruct; struct _SaganConfig *config; struct _SaganCounters *counters; void Sagan_Alert_File( _SaganEvent *Event ) { char *tmpref = NULL; counters->alert_total++; fprintf(config->sagan_alert_stream, "\n[**] [%lu:%s] %s [**]\n", Event->generatorid, Event->sid, Event->f_msg); fprintf(config->sagan_alert_stream, "[Classification: %s] [Priority: %d] [%s]\n", Event->class, Event->pri, Event->host ); fprintf(config->sagan_alert_stream, "%s %s %s:%d -> %s:%d %s %s\n", Event->date, Event->time, Event->ip_src, Event->src_port, Event->ip_dst, Event->dst_port, Event->facility, Event->priority); fprintf(config->sagan_alert_stream, "Message: %s\n", Event->message); if ( Event->found != 0 ) { tmpref = Reference_Lookup( Event->found, 0 ); if (strcmp(tmpref, "" )) { fprintf(config->sagan_alert_stream, "%s\n", Reference_Lookup( Event->found, 0 )); } } fflush(config->sagan_alert_stream); } sagan-1.1.2/src/output-plugins/sagan-snortsam.h0000644000175000017500000004355212770372750020505 0ustar champchamp/* $Id: snortsam.h,v 2.41 2009/10/16 22:19:36 fknobbe Exp $ * * * Copyright (c) 2001-2009 Frank Knobbe * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * Header file for SnortSam.c * */ #ifndef __SNORTSAM_H__ #define __SNORTSAM_H__ #ifdef _DEBUG #define FWSAMDEBUG #endif #ifdef DEBUG #define FWSAMDEBUG #endif /* room for platform defines, if any necessary */ #ifndef SOLARIS /* Addtl Solaris defines */ #if defined(SUN) || defined(SunOS) || defined(SPARC) #define SOLARIS #endif #endif #include #include #include #include #include #include #include #include #include #ifdef WIN32 /* ------------------ Windows platform specific stuff ----------------------- */ #include "win32_service.h" #include /* included to provide compatibility with plugins not written under Windows (although I'm mainly developing under FreeBSD now...)*/ #define SIGKILL 9 /* kill (cannot be caught or ignored) */ #define SIGQUIT 3 /* quit */ #define SIGHUP 1 /* hangup */ #define SIGUSR1 30 /* user defined signal 1 */ #define SIGUSR2 31 /* user defined signal 2 */ #define SIGPIPE 13 /* write on a pipe with no one to read it */ #define strncasecmp strnicmp #define strcasecmp stricmp #define snprintf _snprintf #define vsnprintf _vsnprintf #define bzero(x, y) memset((x), 0, (y)) #define execv _execv #define getpid _getpid #define index strchr #define bcopy(x, y, z) memcpy((void *)x, (const void *)y, (size_t) z) #define mkdir(x, y) _mkdir(x) #define read _read #define write _write #define lseek _lseek #ifndef ssize_t typedef size_t ssize_t; #endif #ifndef pid_t typedef int pid_t; #endif #ifndef pthread_mutex_t typedef HANDLE pthread_mutex_t; #endif #ifndef pthread_t typedef HANDLE pthread_t; #endif #ifndef u_long typedef unsigned long u_long; #endif #ifndef u_int32_t typedef unsigned long u_int32_t; #endif #ifndef u_word typedef unsigned short u_word; #endif #ifndef u_int16_t typedef unsigned short u_int16_t; #endif #ifndef u_char typedef unsigned char u_char; #endif #ifndef u_int8_t typedef unsigned char u_int8_t; #endif #else /* ------------------ Other platform specific stuff ----------------------- */ #include #include #include #include #include #include #include #ifdef SOLARIS #include #ifndef _uint_defined #include typedef uint32_t u_int32_t; typedef uint16_t u_int16_t; typedef uint8_t u_int8_t; #define _uint_defined #endif /* _uint_defined */ #endif #define stricmp strcasecmp #define strnicmp strncasecmp /* PLUGIN WRITER: Please use the following for socket stuff */ typedef int SOCKET; #define ioctlsocket ioctl #define closesocket close #endif /* ------------------ End platform specific stuff ----------------------- */ #include "sagan-twofish.h" /* compatibilty stuff */ #ifndef INVALID_SOCKET #define INVALID_SOCKET -1 #endif #ifndef INADDR_NONE #define INADDR_NONE -1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE !FALSE #endif #ifndef bool #define bool int #endif /* Use only if necessary */ /* #ifndef _TIME_T_DEFINED typedef long time_t; #define _TIME_T_DEFINED #endif */ #ifdef ENABLE_OPSEC #define _MYLIBCSTUFF /* Resolves a conflict between libc.lib and msvcrt.lib under Windows */ #endif #ifndef _MYLIBCSTUFF #define myisdigit(x) isdigit(x) #define myisspace(x) isspace(x) #define mytolower(x) tolower(x) #endif /* defines */ #define safecopy(dst,src) _safecp(dst,sizeof(dst),src) #define FWSAMHISTORYVERSION "SSSF01" /* Magic is probably better word. Records filetype and version in header of state file. */ #define BLOCKQUEUESIZE 20000 /* Create a blocking queue with this many blocking requests. It's set a bit high to accomodate the rollback field */ #define QUEUE_RETRYTIME 3000 /* If the queue is full, wait three seconds and check again for a free slot for a blocking request */ #define STRBUFSIZE 1024 #define FILEBUFSIZE 512 #define FWSAM_DEFAULTPORT 898 /* Default port if user does not specify one in snort.conf */ /* (Was unused last time I checked...) */ #define FWSAM_PACKETVERSION 14 #define FWSAM_PACKETVERSION_PERSISTENT_CONN 15 #define FWSAM_STATUS_CHECKIN 1 /* snort to fw */ #define FWSAM_STATUS_CHECKOUT 2 #define FWSAM_STATUS_BLOCK 3 #define FWSAM_STATUS_UNBLOCK 9 #define FWSAM_STATUS_OK 4 /* fw to snort */ #define FWSAM_STATUS_ERROR 5 #define FWSAM_STATUS_NEWKEY 6 #define FWSAM_STATUS_RESYNC 7 #define FWSAM_STATUS_HOLD 8 #define FWSAM_LOG_NONE 0 #define FWSAM_LOG_SHORTLOG 1 #define FWSAM_LOG_SHORTALERT 2 #define FWSAM_LOG_LONGLOG 3 #define FWSAM_LOG_LONGALERT 4 #define FWSAM_LOG (FWSAM_LOG_SHORTLOG|FWSAM_LOG_SHORTALERT|FWSAM_LOG_LONGLOG|FWSAM_LOG_LONGALERT) #define FWSAM_WHO_DST 8 #define FWSAM_WHO_SRC 16 #define FWSAM_WHO (FWSAM_WHO_DST|FWSAM_WHO_SRC) #define FWSAM_HOW_IN 32 #define FWSAM_HOW_OUT 64 #define FWSAM_HOW_INOUT (FWSAM_HOW_IN|FWSAM_HOW_OUT) #define FWSAM_HOW_THIS 128 #define FWSAM_HOW (FWSAM_HOW_IN|FWSAM_HOW_OUT|FWSAM_HOW_THIS) /* Plugin status */ #define ACTIVE 2 #define INACTIVE 1 #define DISABLED 0 /* Checkpoint SAM packet offsets */ #define CP_DATALEN 27 /* byte */ #define CP_IPADDR 40 /* long */ #define CP_ACTION 47 /* byte */ #define CP_DURATION 48 /* long */ #define CP_LOGTYPE 55 /* byte */ #define CP_MODSTR 60 /* string */ /* Variable Definitions */ typedef struct _blockinfo { /* Block info structure */ unsigned long sig_id; /* Snort Signature ID (for logging/presentation) */ unsigned long blockip; /* IP to be blocked */ unsigned long peerip; /* Peer IP (if connection) */ time_t duration; /* Duration of block */ time_t blocktime; /* Time when block started */ unsigned short port; /* Port (if connection) */ unsigned short proto; /* Protocol (if connection) */ unsigned short mode; /* Blocking mode (src, dst, connection) */ short block; /* block or unblock flag --- this flag is dynamically changed */ } BLOCKINFO; typedef struct _oldblockinfo { /* Block info structure */ unsigned long blockip; /* IP to be blocked */ unsigned long peerip; /* Peer IP (if connection) */ time_t duration; /* Duration of block */ time_t blocktime; /* Time when block started */ unsigned short port; /* Port (if connection) */ unsigned short proto; /* Protocol (if connection) */ unsigned short mode; /* Blocking mode (src, dst, connection) */ short block; /* block or unblock flag --- this flag is dynamically changed */ } OLDBLOCKINFO; typedef struct _blockqueue { /* queue for blocking requests */ BLOCKINFO blockinfo; /* COPY of block request (not just pointer) */ volatile unsigned long processing; /* how many plugins are processing this request */ unsigned long originator; /* Orignating IP address so that forwarder can skip sending a request back to another Snortsam if it received it from there. */ int forceunblock; /* Unblocking can be forced even if plugin does expiration itself. */ int extension; /* On devices that don't time-out, skip the repeated block. On devices that time-out themselves, block again. */ int reload; /* Set TRUE on a queue entry caused by a USR1 reload. */ } BLOCKQUEUE; typedef struct _datalist { /* List of plugin devices/parameters */ void *data; /* Pointer to list data */ volatile unsigned long readpointer; /* Pointer to queue request */ volatile int busy; /* Busy/Free flag */ struct _datalist *next; /* Pointer to next element */ } DATALIST; typedef struct _threadtable { /* This table is allocated with room for all possible threads. It keeps track of: */ volatile pthread_t threadid; /* a) the Thread ID so that getout() can cancel all running threads before exit (handle under Windows), */ volatile unsigned long winthreadid; /* Also, the Windows thread ID. Under Windows, this is the ID, above is the handle. */ unsigned long plugin; /* b) the plugin parameter for a thread, */ DATALIST *datap; /* c) the data pointer parameter for a thread. */ } THREADTABLE; typedef struct _snortsensor { /* structure for a snort sensor */ struct _snortsensor *next; struct in_addr snortip; /* IP address of sensor */ BLOCKINFO *rbfield; /* an array of block structs for rollback */ TWOFISH *snortfish; /* the TwoFish of the sensor */ time_t *rbmeterfield; /* array of times, for threshold metering */ time_t lastcontact; /* last contact not used yet */ time_t lastkeytime; /* Last time keys got negotiated */ time_t sleepstart; /* */ unsigned long actrb; /* pointer to the next empty slot to note blocking info */ unsigned long actrbmeter; /* pointer to the next emtpy meter slot */ int persistentsocket; /* Flag for permanent connection */ int toberemoved; /* Flag to schedule sensor for removal. */ unsigned short myseqno; /* the SnortSam packet sequence number */ unsigned short snortseqno; /* and the one from the snort box */ SOCKET snortsocket; /* the socket of that sensor */ unsigned char snortkeymod[4]; /* snortbox key modifier (random, supplied at check-in) */ unsigned char mykeymod[4]; /* SnortSam key modifier (random, returned at check-in) */ unsigned char currentkey[TwoFish_KEY_LENGTH+2]; /* the current key (intial key kept in accept list) */ unsigned char packetversion; /* The packet version the sensor uses. */ } SENSORLIST; typedef struct _FWsampacket { /* 2 blocks (3rd block is header from TwoFish) */ unsigned short endiancheck; /* 0 */ unsigned char srcip[4]; /* 2 */ unsigned char dstip[4]; /* 6 */ unsigned char duration[4]; /* 10 */ unsigned char snortseqno[2]; /* 14 */ unsigned char fwseqno[2]; /* 16 */ unsigned char srcport[2]; /* 18 */ unsigned char dstport[2]; /* 20 */ unsigned char protocol[2]; /* 22 */ unsigned char fwmode; /* 24 */ unsigned char version; /* 25 */ unsigned char status; /* 26 */ unsigned char sig_id[4]; /* 27 */ unsigned char fluff; /* 31 */ } FWsamPacket; /* 32 bytes in size */ typedef struct _Old13FWsampacket { /* about 2 blocks (3rd block is header from TwoFish) */ unsigned short endiancheck; /* 0 */ unsigned char srcip[4]; /* 2 */ unsigned char dstip[4]; /* 6 */ unsigned char duration[4]; /* 10 */ unsigned char snortseqno[2]; /* 14 */ unsigned char fwseqno[2]; /* 16 */ unsigned char srcport[2]; /* 18 */ unsigned char dstport[2]; /* 20 */ unsigned char protocol[2]; /* 22 */ unsigned char fwmode; /* 24 */ unsigned char version; /* 25 */ unsigned char status; /* 26 */ } Old13FWsamPacket; /* 27 */ typedef struct _dontblocklist { /* list of IP's/nets never to be blocked */ struct _dontblocklist *next; struct in_addr ip; unsigned long mask; int block; } DONTBLOCKLIST; typedef struct _onlyblocklist { /* list of IP's/nets never to be blocked */ struct _onlyblocklist *next; struct in_addr ip; unsigned long mask; int block; } ONLYBLOCKLIST; typedef struct _overridelist { /* list of IP's/nets where block duration is overridden */ struct _overridelist *next; struct in_addr ip; unsigned long mask; time_t newduration; } OVERRIDELIST; typedef struct _limitlist { /* list of IP's/nets where block duration is limited */ struct _limitlist *next; struct in_addr ip; unsigned long mask; time_t limit; int upper; } LIMITLIST; typedef struct _acceptlist { /* list of authorized snort sensors (with their initial key) */ struct _acceptlist *next; struct in_addr ip; unsigned long mask; unsigned char initialkey[TwoFish_KEY_LENGTH+2]; } ACCEPTLIST; typedef struct _sidfilterlist { /* list of accepted or denied SIDs from listed sensor/network */ struct _sidfilterlist *next; struct in_addr ip; unsigned long mask; unsigned long *sidarray; unsigned long sidcount; int typedenied; } SIDFILTERLIST; typedef struct _fwdata { struct in_addr ip; } FWDATA; typedef struct _blockhistory { struct _blockhistory *next; BLOCKINFO blockinfo; } BLOCKHISTORY; /* Global Vars */ #if !defined( __SNORTSAM_C__) && !defined(__SAMTOOL_C__) extern unsigned long netmask[2][33]; extern unsigned short netmaskbigendian; extern char myhostname[STRBUFSIZE+2]; #endif /* Functions */ #define getnetmask(x) (netmask[netmaskbigendian][(((unsigned int)atoi(x))>32?32:(unsigned int)atoi(x))]) #ifdef _MYLIBCSTUFF char mytolower(char c); int myisspace(unsigned char c); int myisdigit(char c); #endif void _safecp(char *dst,unsigned long max,char *src); void *safemalloc(unsigned long,char *,char *); void waitms(unsigned int); void showerror(void); void getout(int ret); char *inettoa(unsigned long ip); void logmessage(unsigned int level,char *logmsg,char *module,unsigned long ip); unsigned long parseduration(char *p); unsigned long getip(char *ipstr); char *gethstname(unsigned long ip); void parseline(char *arg,bool first,char *file,unsigned long line); void parsefile(char *cfgfile,bool first,char *callingfile,unsigned long callingline); void adddontblock(unsigned long ip, unsigned long mask,int block, char *func, char *what); void addoverride(unsigned long ip, unsigned long mask, unsigned long dur, char *func, char *what); void sortacceptlist(void); void sortdontblocklist(void); void sortoverridelist(void); void sortlimitlist(void); void sortsidfilterlist(void); void sortpluginindex(void); ACCEPTLIST *allowedhost(unsigned long addr); int dontblockhost(unsigned long addr,int block); unsigned long override_duration_on_host(unsigned long addr,unsigned long duration); unsigned long limit_duration_on_sensor(unsigned long addr,unsigned long duration); int sid_denied_from_sensor(unsigned long addr, unsigned long sid); SENSORLIST *getsnorty(unsigned long addr,ACCEPTLIST *ap); void removesnort(SENSORLIST *snorty) ; void newkey(SENSORLIST *snortbox,FWsamPacket *packet); int sendpacket(SENSORLIST *snortbox,char *packet,unsigned long packetsize); void rollback(SENSORLIST *sensor); BLOCKHISTORY *inhistory(BLOCKINFO *bd); int isrepetitive(BLOCKINFO *bd); #if !defined(__SSP_ISA_CPP__) && !defined(__SSP_ISA2004_CPP__) void savehistory(void); #endif void block(SENSORLIST *snortbox,unsigned long bsip,unsigned short bsport, unsigned long bdip,unsigned short bdport, unsigned short bproto,time_t bduration,unsigned char bmode, time_t btime,unsigned long bsig_id); void unblock(BLOCKINFO *bhp,char *comment,unsigned long reqip,int force); void addtohistory(BLOCKHISTORY *,int); void clearhistory(void); void reloadhistory(int reblock); int processincomingrequest(SENSORLIST *snortbox,char *buf,unsigned long packetsize,ACCEPTLIST *acceptp); int waitfor(SOCKET sock,char *text,unsigned long timeout); int sendreceive(SOCKET socket,unsigned int timeout,char *plugin,struct in_addr ip,char *sendmsg,char *response,char *errmsg1,char *errmsg2); void addrequesttoqueue(short,BLOCKINFO *,int,int,int,unsigned long); void queuehandler(void); int moreinqueue(unsigned long); void multithreadhandler(THREADTABLE *); void singlethreadhandler(THREADTABLE *); signed long getfreethreadindex(void); void sig_usr1_flagger(int i); void sig_usr2_flagger(int i); #endif /* __SNORTSAM_H__ */ void Sagan_FWSam( _SaganEvent * ); int FWsamBlock(char *); /* Typedefs */ typedef struct _FWsamstation { /* structure of a mgmt station */ unsigned short myseqno; unsigned short stationseqno; unsigned char mykeymod[4]; unsigned char fwkeymod[4]; unsigned short stationport; struct in_addr stationip; struct sockaddr_in localsocketaddr; struct sockaddr_in stationsocketaddr; SOCKET stationsocket; /* the socket of that station */ TWOFISH *stationfish; char initialkey[TwoFish_KEY_LENGTH+2]; char stationkey[TwoFish_KEY_LENGTH+2]; time_t lastcontact; int persistentsocket; /* Flag for permanent connection */ unsigned char packetversion; /* The packet version the sensor uses. */ } FWsamStation; void FWsamNewStationKey(FWsamStation *,FWsamPacket *); void FWsamCheckOut(FWsamStation *); int FWsamCheckIn(FWsamStation *); sagan-1.1.2/src/output-plugins/sagan-unified2.c0000644000175000017500000005466612770372750020347 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-unified2.c * * This allows Sagan to output to a Snort's 'unified2' format. This format * can then be read by programs like barnyard2, etc. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) #include #include #include #include #include #include #include #include #ifdef HAVE_DUMBNET_H #include #else #include #endif #include "sagan.h" #include "sagan-defs.h" #include "sagan-config.h" #include "sagan-unified2.h" #include "sagan-classifications.h" sbool endian; uintmax_t unified_event_id; struct _Rule_Struct *rulestruct; struct _Class_Struct *classstruct; struct _SaganCounters *counters; struct _SaganConfig *config; static void Unified2Write( uint8_t *, uint32_t ); static int SafeMemcpy(void *, const void *, size_t, const void *, const void *); static int inBounds(const uint8_t *, const uint8_t *, const uint8_t *); static void Unified2RotateFile( void ); /* Future note on IPv6 - This would have been * Serial_Unified2IDSEventIPv6_legacy. * - Champ Clark III - 02/15/2011 */ static uint8_t write_pkt_buffer[sizeof(Serial_Unified2_Header) + sizeof(Serial_Unified2IDSEvent_legacy) + IP_MAXPACKET]; #define write_pkt_end (write_pkt_buffer + sizeof(write_pkt_buffer)) #define MAX_XDATA_WRITE_BUF_LEN (MAX_XFF_WRITE_BUF_LENGTH - \ sizeof(struct in6_addr) + DECODE_BLEN) char *eth_addr="00:11:22:33:44:55"; /* Bogus ethernet address for ethernet frame */ /*********************************************************/ /* Unified2InitFile - Initializes the file to be openned */ /*********************************************************/ void Unified2InitFile( void ) { char filepath[1024]; char *fname_ptr; if (config == NULL) { Sagan_Log(S_ERROR, "[%s, line %d] Could not init Unified2. Config data is null", __FILE__, __LINE__ ); } config->unified2_timestamp = (uint32_t)time(NULL); if (!config->unified2_nostamp) { if (SaganSnprintf(filepath, sizeof(filepath), "%s.%u", config->unified2_filepath, config->unified2_timestamp) != SAGAN_SNPRINTF_SUCCESS) Sagan_Log(S_ERROR, "[%s, line %d] Failed to copy Unified2 file path", __FILE__, __LINE__); fname_ptr = filepath; } else { fname_ptr = config->unified2_filepath; } if ((config->unified2_stream = fopen(fname_ptr, "wb")) == NULL) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open file %s.", __FILE__, __LINE__, fname_ptr); } } /****************************************************/ /* Sagan_Unified2 - Write the Unified2 event */ /****************************************************/ void Sagan_Unified2( _SaganEvent *Event ) { Serial_Unified2_Header hdr; Serial_Unified2IDSEvent_legacy alertdata; uint32_t write_len = sizeof(Serial_Unified2_Header) + sizeof(Serial_Unified2IDSEvent_legacy); int i=0; memset(&alertdata, 0, sizeof(alertdata)); alertdata.event_id = htonl(unified_event_id); // Event ID (increments) alertdata.event_second = htonl(Event->event_time_sec); // Time of event; alertdata.event_microsecond = htonl(0); // Not recording to the microsecond alertdata.signature_id = htonl(atoi(Event->sid)); alertdata.signature_revision = htonl(atoi(Event->rev)); // Rule Revision /* Search for the classification type. */ /* There's probably a better way to do this - Champ Clark III - 02/17/2011 */ for(i=0; i < counters->classcount; i++) { if (!strcmp(Event->class, classstruct[i].s_shortname)) { alertdata.classification_id = htonl(i + 1); } } alertdata.priority_id = htonl(Event->pri); // Priority alertdata.protocol = Event->ip_proto; // Protocol alertdata.generator_id = htonl(Event->generatorid); // From gen-msg.map alertdata.ip_source = htonl(IP2Bit(Event->ip_src)); alertdata.ip_destination = htonl(IP2Bit(Event->ip_dst)); alertdata.sport_itype = htons(Event->src_port); alertdata.dport_icode = htons(Event->dst_port); /* Rotate if log has gotten to big */ if ((config->unified2_current + write_len) > config->unified2_limit) { Unified2RotateFile(); } hdr.length = htonl(sizeof(Serial_Unified2IDSEvent_legacy)); hdr.type = htonl(UNIFIED2_IDS_EVENT); // EXTRA DATA type if (SafeMemcpy(write_pkt_buffer, &hdr, sizeof(Serial_Unified2_Header), write_pkt_buffer, write_pkt_end) != SAFEMEM_SUCCESS) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to copy Serial_Unified2_Header", __FILE__, __LINE__); return; } if (SafeMemcpy(write_pkt_buffer + sizeof(Serial_Unified2_Header), &alertdata, sizeof(Serial_Unified2IDSEvent_legacy), write_pkt_buffer, write_pkt_end) != SAFEMEM_SUCCESS) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to copy Serial_Unified2IDSEvent_legacy", __FILE__, __LINE__); return; } Unified2Write(write_pkt_buffer, write_len); } /*****************************************************************************/ /* Sagan_Unified2LogPacketAlert - Create's a raw TCP/UDP/IP/ICMP 'packet' */ /* This packet is "fake", as we are taking syslog data and 'building' */ /* a packet with libdnet. This fake packet is then fed to the Unified2 */ /* file for reading by Barnyard2, etc. */ /*****************************************************************************/ void Sagan_Unified2LogPacketAlert( _SaganEvent *Event ) { Serial_Unified2_Header hdr; Serial_Unified2Packet logheader; uint32_t pkt_length = 0; uint32_t i = 0; uint32_t write_len = sizeof(Serial_Unified2_Header) + sizeof(Serial_Unified2Packet) - 4; /* Ethernet */ u_char *p_eth, eth_buf[ETH_LEN_MAX]; struct eth_hdr *eth; int len_eth = 0; struct addr addr; /* IP header */ struct ip_hdr *ip; u_char *p_iphdr, iphdr_buf[IP_LEN_MAX]; int len_iphdr = 0; /* TCP header */ struct tcp_hdr *tcp; u_char *p_tcp, tcp_buf[IP_LEN_MAX]; /* UDP header */ struct udp_hdr *udp; u_char *p_udp, udp_buf[IP_LEN_MAX]; /* ICMP header */ struct icmp_hdr *icmp; u_char *p_icmp, icmp_buf[IP_LEN_MAX]; /* 'Packet' payload (syslog data) */ u_char packet_buf[IP_LEN_MAX]; uint8_t packet_data[63556]; int p_len = 0; unsigned int len_payload = strlen(Event->message); // Our payload 'length' /* Build the ethernet frame */ eth = (struct eth_hdr *)eth_buf; memset(eth, 0, sizeof(*eth)); eth->eth_type = htons(ETH_TYPE_IP); addr_aton(eth_addr, &addr); memcpy(ð->eth_src, &addr.addr_eth, ETH_ADDR_LEN); addr_aton(eth_addr, &addr); memcpy(ð->eth_dst, &addr.addr_eth, ETH_ADDR_LEN); p_eth = eth_buf + ETH_HDR_LEN; len_eth = p_eth - eth_buf; if ( Event->ip_proto == 0 ) { Sagan_Log(S_WARN, "[%s, line %d] Protocol set to 0! NOT logging to unfied2!", __FILE__, __LINE__); return; } /* Type == UDP */ if ( Event->ip_proto == 17 ) { udp = (struct udp_hdr *)udp_buf; memset(udp, 0, sizeof(*udp)); udp->uh_sport = htons(Event->src_port); udp->uh_dport = htons(Event->dst_port); p_udp = udp_buf + UDP_HDR_LEN; p_len = p_udp - udp_buf; udp->uh_ulen = htons(p_len + len_payload); memcpy(packet_buf, udp_buf, sizeof(packet_buf)); } /* Type == TCP */ else if ( Event->ip_proto == 6 ) { tcp = (struct tcp_hdr *)tcp_buf; memset(tcp, 0, sizeof(*tcp)); tcp->th_sport = htons(Event->src_port); tcp->th_dport = htons(Event->dst_port); tcp->th_seq = 0; tcp->th_ack = 0; tcp->th_off = 5; tcp->th_flags = TH_SYN; // or TH_FIN, TH_PUSH tcp->th_win = TCP_WIN_MAX; tcp->th_urp = 0; p_tcp = tcp_buf + TCP_HDR_LEN; p_len = p_tcp - tcp_buf; memcpy(packet_buf, tcp_buf, sizeof(packet_buf)); } /* Type == ICMP */ else if ( Event->ip_proto == 1 ) { icmp = (struct icmp_hdr *)icmp_buf; memset(icmp, 0, sizeof(*icmp)); icmp->icmp_type = ICMP_ECHO; icmp->icmp_code = 0; p_icmp = icmp_buf + ICMP_HDR_LEN; p_len = p_icmp - icmp_buf; memcpy(packet_buf, icmp_buf, sizeof(packet_buf)); } /* We'll always need a IP header, so build it here */ ip = (struct ip_hdr *)iphdr_buf; memset(ip, 0, sizeof(*ip)); ip->ip_hl = 5; ip->ip_v = 4; ip->ip_tos = 0; ip->ip_id = 0; ip->ip_off = 0; ip->ip_ttl = IP_TTL_MAX; ip->ip_p = Event->ip_proto; // Protocol ip->ip_sum = 0; ip->ip_src = htonl(IP2Bit(Event->ip_src)); ip->ip_dst = htonl(IP2Bit(Event->ip_dst)); p_iphdr = iphdr_buf + IP_HDR_LEN; len_iphdr = p_iphdr - iphdr_buf; pkt_length = strlen(Event->message) + p_len + len_iphdr; ip->ip_len = htons( len_payload + p_len + len_iphdr); // Don't include eth frame. ip_checksum(iphdr_buf, len_iphdr); // Valid checksum pkt_length = len_eth + len_iphdr + p_len + len_payload; write_len += pkt_length; /***************************************************************************/ /* Here we populate the data needed for the Packet portion of the Unified2 */ /* output. */ /***************************************************************************/ logheader.sensor_id = 0; logheader.linktype = htonl(1); // linktype set to ethernet (don't need tokenring, etc). logheader.event_id = htonl(unified_event_id); logheader.event_second = htonl(Event->event_time_sec); logheader.packet_second = htonl(Event->event_time_sec); logheader.packet_microsecond = htonl(0); logheader.packet_length = htonl(len_eth + len_iphdr + p_len + len_payload); hdr.length = htonl(sizeof(Serial_Unified2Packet) - 4 + pkt_length); hdr.type = htonl(UNIFIED2_PACKET); if (SafeMemcpy(write_pkt_buffer, &hdr, sizeof(Serial_Unified2_Header), write_pkt_buffer, write_pkt_end) != SAFEMEM_SUCCESS) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to copy Serial_Unified2_Header.", __FILE__, __LINE__); return; } if (SafeMemcpy(write_pkt_buffer + sizeof(Serial_Unified2_Header), &logheader, sizeof(Serial_Unified2Packet) - 4, write_pkt_buffer, write_pkt_end) != SAFEMEM_SUCCESS) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to copy Serial_Unified2Packet.", __FILE__, __LINE__ ); return; } /* packet_data stores our fake 'packet' information. We now start building * the packet for use */ /* Ethernet */ for ( i = 0; i < len_eth; i++ ) { packet_data[i] = eth_buf[i]; } /* IP header */ for ( i = 0; i < len_iphdr; i++ ) { packet_data[i + len_eth] = iphdr_buf[i]; } /* UDP/TCP/ICMP header */ for ( i = 0; i < p_len-1; i++ ) { packet_data[i + len_eth + len_iphdr] = packet_buf[i]; } /* Payload ( Syslog message ) */ for ( i = 0; i < len_payload; i++ ) { packet_data[i + len_eth + len_iphdr + p_len ] = Event->message[i]; } /* Copy it to our Unified2/write_pkt_buffer */ if (SafeMemcpy(write_pkt_buffer + sizeof(Serial_Unified2_Header) + sizeof(Serial_Unified2Packet) - 4, packet_data, pkt_length, write_pkt_buffer, write_pkt_end) != SAFEMEM_SUCCESS) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to copy pseudo packet data.", __FILE__, __LINE__); return; } Unified2Write(write_pkt_buffer, write_len); } /*****************************************************************************/ /* The below functions where taken from Sourcefire's "Snort" for direct */ /* compatibility. */ /*****************************************************************************/ void Unified2CleanExit( void ) { if (config != NULL) { if (config->unified2_stream != NULL) fclose(config->unified2_stream); free(config); } } static void Unified2RotateFile( void ) { fclose(config->unified2_stream); config->unified2_current = 0; Unified2InitFile(); } int SaganSnprintf(char *buf, size_t buf_size, const char *format, ...) { va_list ap; int ret; if (buf == NULL || buf_size <= 0 || format == NULL) { return SAGAN_SNPRINTF_ERROR; } /* zero first byte in case an error occurs with * vsnprintf, so buffer is null terminated with * zero length */ buf[0] = '\0'; buf[buf_size - 1] = '\0'; va_start(ap, format); ret = vsnprintf(buf, buf_size, format, ap); va_end(ap); if (ret < 0) { return SAGAN_SNPRINTF_ERROR; } if (buf[buf_size - 1] != '\0' || (size_t)ret >= buf_size) { /* result was truncated */ buf[buf_size - 1] = '\0'; return SAGAN_SNPRINTF_TRUNCATION; } return SAGAN_SNPRINTF_SUCCESS; } int SafeMemcpy(void *dst, const void *src, size_t n, const void *start, const void *end) { void *tmp; if(n < 1) { ERRORRET; } if (!dst || !src || !start || !end) { ERRORRET; } tmp = ((uint8_t*)dst) + (n-1); if (tmp < dst) { ERRORRET; } if(!inBounds(start,end, dst) || !inBounds(start,end,tmp)) { ERRORRET; } memcpy(dst, src, n); return SAFEMEM_SUCCESS; } int inBounds(const uint8_t *start, const uint8_t *end, const uint8_t *p) { if(p >= start && p < end) { return 1; } return 0; } static void Unified2Write( uint8_t *buf, uint32_t buf_len ) { size_t fwcount = 0; int ffstatus = 0; /* Nothing to write or nothing to write to */ if ((buf == NULL) || (config == NULL) || (config->unified2_stream == NULL)) { return; } /* Don't use fsync(). It is a total performance killer */ if (((fwcount = fwrite(buf, (size_t)buf_len, 1, config->unified2_stream)) != 1) || ((ffstatus = fflush(config->unified2_stream)) != 0)) { /* errno is saved just to avoid other intervening calls * (e.g. ErrorMessage) potentially reseting it to something else. */ int error = errno; int max_retries = 3; /* On iterations other than the first, the only non-zero error will be * EINTR or interrupt. Only iterate a maximum of max_retries times so * there is no chance of infinite looping if for some reason the write * is constantly interrupted */ while ((error != 0) && (max_retries != 0)) { if (config->unified2_nostamp) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to write Unified2 file (%s): %s", __FILE__, __LINE__, config->unified2_filepath, strerror(error)); } else { Sagan_Log(S_ERROR, "[%s, line %d] Failed to write to Unified2 file. (%s.%u): %s", __FILE__, __LINE__, config->unified2_filepath, config->unified2_timestamp, strerror(error)); } while ((error == EINTR) && (max_retries != 0)) { max_retries--; /* Supposedly an interrupt can only occur before anything * has been written. Try again */ Sagan_Log(S_WARN, "[%s, line %d] Got interrupt. Retry write to Unified2.", __FILE__, __LINE__); if (fwcount != 1) { /* fwrite() failed. Redo fwrite and fflush */ if (((fwcount = fwrite(buf, (size_t)buf_len, 1, config->unified2_stream)) == 1) && ((ffstatus = fflush(config->unified2_stream)) == 0)) { Sagan_Log(S_NORMAL, "[%s, line %d] Write to Unified2 file succeeded!", __FILE__, __LINE__); error = 0; break; } } else if ((ffstatus = fflush(config->unified2_stream)) == 0) { Sagan_Log(S_NORMAL, "[%s, line %d] Write to Unified2 file succeeded!", __FILE__, __LINE__); error = 0; break; } error = errno; Sagan_Log(S_ERROR, "[%s, line %d] Retrying write to Unified2 file failed", __FILE__, __LINE__); } /* If we've reached the maximum number of interrupt retries, * just bail out of the main while loop */ if (max_retries == 0) continue; switch (error) { case 0: break; case EIO: Sagan_Log(S_ERROR, "[%s, line %d] Unified2 file is corrupt", __FILE__, __LINE__); Unified2RotateFile(); if (config->unified2_nostamp) { Sagan_Log(S_NORMAL, "[%s, line %d] New Unified2 file: %s", __FILE__, __LINE__, config->unified2_filepath); } else { Sagan_Log(S_NORMAL, "[%s, line %d] New Unified2 file: %s.%u", __FILE__, __LINE__, config->unified2_filepath, config->unified2_timestamp); } if (((fwcount = fwrite(buf, (size_t)buf_len, 1, config->unified2_stream)) == 1) && ((ffstatus = fflush(config->unified2_stream)) == 0)) { Sagan_Log(S_NORMAL, "[%s, line %d] Write to Unified2 file succeeded!", __FILE__, __LINE__); error = 0; break; } error = errno; /* Loop again if interrupt */ if (error == EINTR) break; /* Write out error message again, then fall through and fatal */ if (config->unified2_nostamp) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to write to Unified2 file", __FILE__, __LINE__); } else { Sagan_Log(S_ERROR, "[%s, line %d] Failed to write to Unified2 file", __FILE__, __LINE__); } /* Fall through */ case EAGAIN: /* We're not in non-blocking mode */ case EBADF: case EFAULT: case EFBIG: case EINVAL: case ENOSPC: case EPIPE: default: Sagan_Log(S_ERROR, "[%s, line %d] Cannot write to device", __FILE__, __LINE__); } } if ((max_retries == 0) && (error != 0)) { Sagan_Log(S_ERROR, "[%s, line %d] Maximum number of interrupts exceeded.", __FILE__, __LINE__); } } config->unified2_current += buf_len; } /***************************************************************************** * Sagan_WriteExtraData - Writes any "extra data" that might be useful for * for analysis. For example, we always write the syslog source IP as the * XFF or "original IP" address. *****************************************************************************/ void Sagan_WriteExtraData( _SaganEvent *Event, int type ) { Serial_Unified2_Header hdr; SerialUnified2ExtraData alertdata; Unified2ExtraDataHdr alertHdr; uint8_t write_buffer[MAX_XDATA_WRITE_BUF_LEN]; uint8_t *write_end = NULL; uint8_t *ptr = NULL; uint32_t ip; uint8_t *buffer = NULL; uint32_t len; uint32_t write_len; switch(type) { case EVENT_INFO_XFF_IPV4: ip = htonl(IP2Bit(Event->host)); buffer = (void *)&ip; break; case EVENT_INFO_HTTP_URI: buffer = Event->normalize_http_uri; break; case EVENT_INFO_HTTP_HOSTNAME: buffer = Event->normalize_http_hostname; break; default: Sagan_Log(S_ERROR,"[%s, line %d] Whoa. Unknown Unified2 Extra Data type passed! Abort!!", __FILE__, __LINE__); break; } len = sizeof(buffer); write_len = sizeof(Serial_Unified2_Header) + sizeof(Unified2ExtraDataHdr); alertdata.sensor_id = 0; alertdata.event_id = htonl(unified_event_id); alertdata.event_second = htonl(Event->event_time_sec); alertdata.data_type = htonl(EVENT_DATA_TYPE_BLOB); alertdata.type = htonl(type); alertdata.blob_length = htonl(sizeof(alertdata.data_type) + sizeof(alertdata.blob_length) + len); write_len = write_len + sizeof(alertdata) + len; alertHdr.event_type = htonl(EVENT_TYPE_EXTRA_DATA); alertHdr.event_length = htonl(write_len - sizeof(Serial_Unified2_Header)); if ((config->unified2_current + write_len) > config->unified2_limit) { Unified2RotateFile(); } hdr.length = htonl(write_len - sizeof(Serial_Unified2_Header)); hdr.type = htonl(UNIFIED2_EXTRA_DATA); write_end = write_buffer + sizeof(write_buffer); ptr = write_buffer; if (SafeMemcpy(ptr, &hdr, sizeof(hdr), write_buffer, write_end) != SAFEMEM_SUCCESS) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to copy Serial_Unified2_Header.", __FILE__, __LINE__); } ptr = ptr + sizeof(hdr); if (SafeMemcpy(ptr, &alertHdr, sizeof(alertHdr), write_buffer, write_end) != SAFEMEM_SUCCESS) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to copy Unified2ExtraDataHdr.", __FILE__, __LINE__); } ptr = ptr + sizeof(alertHdr); if (SafeMemcpy(ptr, &alertdata, sizeof(alertdata), write_buffer, write_end) != SAFEMEM_SUCCESS) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to copy SerialUnified2ExtraData.", __FILE__, __LINE__); } ptr = ptr + sizeof(alertdata); if (SafeMemcpy(ptr, buffer, len, write_buffer, write_end) != SAFEMEM_SUCCESS) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to copy extra data buffer.", __FILE__, __LINE__); } Unified2Write(write_buffer, write_len); } #endif sagan-1.1.2/src/output-plugins/sagan-esmtp.c0000644000175000017500000001755412770372750017765 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-esmtp.c * * Threaded output for e-mail support via the libesmtp. For more information * about libesmtp, please see: http://www.stafford.uklinux.net/libesmtp. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef HAVE_LIBESMTP #include #include #include /* Needs to be after above headers */ #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-config.h" #include "sagan-references.h" #include "sagan-rules.h" #include "sagan-esmtp.h" #include "version.h" struct _Rule_Struct *rulestruct; struct _SaganDebug *debug; struct _SaganConfig *config; struct _SaganCounters *counters; int Sagan_ESMTP_Thread (_SaganEvent *Event) { char tmpref[2048]; char tmpemail[255]; char tmpa[MAX_EMAILSIZE]; char tmpb[MAX_EMAILSIZE]; int r = 0; /* If the events doesnt have enought priority, short circuit here. If the * config->min_email_priority == 0, then e-mail everything */ if ( config->min_email_priority != 0 ) { if ( Event->pri > config->min_email_priority ) { if ( debug->debugesmtp ) { Sagan_Log(S_DEBUG, "Event priority (%d) is not < min_email_priority (%d)", Event->pri, config->min_email_priority); } return(0); } } snprintf(tmpref, sizeof(tmpref), "%s", Reference_Lookup( Event->found, 0 )); /* Rule "email:" takes priority. If not set, then the "send-to:" option in the configuration file */ if ( rulestruct[Event->found].email_flag ) { if ( debug->debugesmtp ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found e-mail in rule: %s", __FILE__, __LINE__, rulestruct[Event->found].email); } snprintf(tmpemail, sizeof(tmpemail), "%s", rulestruct[Event->found].email); } else { if ( debug->debugesmtp ) { Sagan_Log(S_DEBUG, "[%s, line %d] Found e-mail in configuration file: %s", __FILE__, __LINE__, config->sagan_esmtp_to); } if ( config->sagan_sendto_flag ) { snprintf(tmpemail, sizeof(tmpemail), "%s", config->sagan_esmtp_to); } } if ((r = snprintf(tmpa, sizeof(tmpa), "MIME-Version: 1.0\r\n" "Content-Type: text/plain;\r\n" "Content-Transfer-Encoding: 8bit\r\n" "From: %s\r\n" "To: %s\r\n" "Subject: %s%s\r\n" "\r\n\n" "[**] [%lu:%s] %s [**]\n" "[Classification: %s] [Priority: %d] [%s]\n" "%s %s %s:%d -> %s:%d %s %s\n" "Syslog message: %s\r\n%s\n\r", config->sagan_esmtp_from, tmpemail, config->sagan_email_subject, Event->f_msg, Event->generatorid, Event->sid, Event->f_msg, Event->class, Event->pri, Event->host, Event->date, Event->time, Event->ip_src, Event->src_port, Event->ip_dst, Event->dst_port, Event->facility, Event->priority, Event->message, tmpref)) < 0) { Sagan_Log(S_NORMAL, "[%s, line %d] Cannot build mail.", __FILE__, __LINE__); goto failure; } /* Start building libesmtp connection information */ smtp_session_t session; smtp_message_t message; smtp_recipient_t recipient; const smtp_status_t *status; struct sigaction sa; sa.sa_handler = SIG_IGN; sigemptyset (&sa.sa_mask); sa.sa_flags = 0; sigaction (SIGPIPE, &sa, NULL); if((session = smtp_create_session ()) == NULL) { Sagan_Log(S_WARN, "[%s, line %d] Cannot create smtp session.", __FILE__, __LINE__); counters->esmtp_count_failed++; goto failure; } if((message = smtp_add_message (session)) == NULL) { Sagan_Log(S_WARN, "[%s, line %d] Cannot add message to smtp session.", __FILE__, __LINE__); counters->esmtp_count_failed++; goto failure; } if(!smtp_set_server (session, config->sagan_esmtp_server)) { Sagan_Log(S_WARN, "[%s, line %d] Cannot set smtp server.", __FILE__, __LINE__); counters->esmtp_count_failed++; goto failure; } if((r = fixlf(config, tmpb, tmpa)) <= 0) { Sagan_Log(S_WARN, "[%s, line %d] Cannot fixlf.", __FILE__, __LINE__); counters->esmtp_count_failed++; goto failure; } if(!smtp_set_message_str (message, tmpb)) { Sagan_Log(S_WARN, "[%s, line %d] Cannot set message string.", __FILE__, __LINE__); counters->esmtp_count_failed++; goto failure; } if(!smtp_set_reverse_path (message, config->sagan_esmtp_from)) { Sagan_Log(S_WARN, "[%s, line %d] Cannot reverse path.", __FILE__, __LINE__); counters->esmtp_count_failed++; goto failure; } if((recipient = smtp_add_recipient (message, tmpemail)) == NULL) { Sagan_Log(S_WARN, "[%s, line %d] Cannot add recipient.", __FILE__, __LINE__); counters->esmtp_count_failed++; goto failure; } if (!smtp_start_session (session)) { char errtmp[128]; smtp_strerror (smtp_errno (), errtmp, sizeof(errtmp)); /* We log the error, but keep going. While SMTP failed, * we might be storing alerts another way */ Sagan_Log(S_WARN, "[%s, line %d] SMTP Error: %s", __FILE__, __LINE__, smtp_strerror (smtp_errno (), errtmp, sizeof(errtmp))); counters->esmtp_count_failed++; } else { /* SMTP sent successful */ status = smtp_message_transfer_status (message); counters->esmtp_count_success++; if ( debug->debugesmtp ) Sagan_Log(S_DEBUG, "SMTP %d %s", status->code, (status->text != NULL) ? status->text : "\n"); } failure: if (session != NULL) smtp_destroy_session (session); return(0); } int fixlf( _SaganConfig *config, char *d, char *s) { int sl=0; int i=0; int j=0; if(d == NULL) { return 0; } if(s == NULL) { d[0] = '\0'; return 0; } if((sl=strlen(s)) >= MAX_EMAILSIZE) { s[MAX_EMAILSIZE]='\0'; sl=MAX_EMAILSIZE; Sagan_Log(S_WARN, "[%s, line %d] Mail too large.", __FILE__, __LINE__); } for(i=0; i=MAX_EMAILSIZE) { d[MAX_EMAILSIZE]='\0'; Sagan_Log(S_WARN, "[%s, line %d] Mail too large.", __FILE__, __LINE__); break; } if(i>0 && s[i] == '\n' && s[i-1] != '\r') { d[j++] = '\r'; } d[j++] = s[i]; } if(j ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-syslog.c * * Send Sagan alerts to a remote syslog server using the same format that * Snort uses. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef WITH_SYSLOG #include #include #include #include #include #include "sagan.h" #include "sagan-alert.h" #include "sagan-classifications.h" #include "sagan-config.h" struct _Rule_Struct *rulestruct; struct _SaganConfig *config; struct _SaganCounters *counters; void Sagan_Alert_Syslog( _SaganEvent *Event ) { char syslog_message_output[1024] = { 0 }; char *tmp_proto = NULL; /* Template to mimic Snort syslog output */ char *syslog_template = "[%lu:%s:%s] %s [Classification: %s] [Priority: %d] %s %s:%d -> %s:%d - %s"; if ( Event->ip_proto != 1 || Event->ip_proto != 6 || Event->ip_proto != 17 ) { tmp_proto = "{UNKNOWN}"; } if ( Event->ip_proto == 1 ) { tmp_proto = "{ICMP}"; } if ( Event->ip_proto == 6 ) { tmp_proto = "{TCP}"; } if ( Event->ip_proto == 17 ) { tmp_proto = "{UDP}"; } snprintf(syslog_message_output, sizeof(syslog_message_output), syslog_template, Event->generatorid, Event->sid, Event->rev, Event->f_msg, Sagan_Classtype_Lookup ( Event->class ), Event->pri, tmp_proto, Event->ip_src, Event->src_port, Event->ip_dst, Event->dst_port, Event->message); /* Send syslog message */ openlog("sagan", config->sagan_syslog_options, config->sagan_syslog_facility); syslog(config->sagan_syslog_priority, "%s", syslog_message_output); closelog(); } #endif sagan-1.1.2/src/output-plugins/sagan-external.h0000644000175000017500000000203012770372750020443 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_Ext_Thread( _SaganEvent *, char * ); sagan-1.1.2/src/output-plugins/sagan-snortsam.c0000644000175000017500000011725712770372750020504 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-snortsam.c * * This allows Sagan to send block information to firewall via Snortsam. For * more information, see http://www.snortsam.net * * This is useful it you want to block an event network wide. Cool stuff! * * The majority of the code was taken from the samtool.c which is distributed * with Snortsam. * */ /* * Original Snortsam copyright information: * * Copyright (c) 2001-2009 Frank Knobbe * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This is the remote module that listens for snort alerts generated with the * Alert_FWsam plug-in. This module provides secure gateway functionality between * the snort alerts and various firewalls. It listens to the snort alerts, and can * invoke a block on following firewalls: * - Checkpoint Firewall-1 (by sending an OPSEC packet to port 18183, * either via the OPSEC API, or using a self-assembled packet, or by execution * of the fw.exe through command line. * - Cisco PIX (by telnetting into the PIX and issuing the SHUN command) * - Cisco Routers (by telnetting ino the router and modifying the ACL) * - Cisco Routers (by telnetting ino the router and adding a null-route) * - Netscreen firewalls (by telnetting in the Netscreen and adding IP's to a group * which is denied access in the policy) */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef WITH_SNORTSAM #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-rules.h" #include "sagan-config.h" #include "sagan-snortsam.h" #define NUM_HOSTS 255 #define FWSAM_NETWAIT 1000 #define FWSAM_NETHOLD 6000 struct _Rule_Struct *rulestruct; struct _SaganDebug *debug; struct _SaganConfig *config; unsigned long blockip[NUM_HOSTS +1],blockpeer[NUM_HOSTS +1],blockduration=0,blocksid=0; unsigned short blockport=0,blockproto=0,blocklog=FWSAM_LOG_NONE,blockhow=FWSAM_HOW_INOUT,blockmode=FWSAM_STATUS_BLOCK,checkout=true; pthread_mutex_t fwsam_mutex = PTHREAD_MUTEX_INITIALIZER; void Sagan_FWSam( _SaganEvent *Event ) { pthread_mutex_lock(&fwsam_mutex); int retval=0; blockduration=rulestruct[Event->found].fwsam_seconds; blocksid=atol(Event->sid); if ( rulestruct[Event->found].fwsam_src_or_dst == 1 ) { blockip[0]=inet_addr(Event->ip_src); blockip[1]=0; } else { blockip[0]=inet_addr(Event->ip_dst); blockip[1]=0; } retval|=FWsamBlock(config->sagan_fwsam_info); pthread_mutex_unlock(&fwsam_mutex); } int FWsamBlock(char *arg) { char str[512],*p,*encbuf,*decbuf,*samport,*sampass,*samhost; int i,error=true,len,ipidx=0,peeridx=0; FWsamPacket sampacket; struct hostent *hoste; unsigned long samip; FWsamStation station; strlcpy(str,arg, sizeof(str)); /* Pull apart the server info -- MOVE THIS TO sagan-config.c ? */ samhost=str; samport=NULL; sampass=NULL; p=str; while(*p && *p!=':' && *p!='/') p++; if(*p==':') { *p++=0; if(*p) samport=p; while(*p && *p!='/') p++; } if(*p=='/') { *p++=0; if(*p) sampass=p; } samip=0; if(inet_addr(samhost)==INADDR_NONE) { hoste=gethostbyname(samhost); if(!hoste) { Sagan_Log(S_WARN, "[%s, line %d] Unable to resolve host '%s', ignoring entry!" , __FILE__, __LINE__, samhost); return(1); } else samip=*(unsigned long *)hoste->h_addr; } else { samip=inet_addr(samhost); if(!samip) { Sagan_Log(S_WARN, "[%s, line %d] Invalid host address '%s', ignoring entry!", __FILE__, __LINE__, samhost); return(1); } } station.stationip.s_addr=samip; if(samport!=NULL && atoi(samport)>0) station.stationport=atoi(samport); else station.stationport=FWSAM_DEFAULTPORT; if(sampass!=NULL) { strncpy(station.stationkey,sampass,TwoFish_KEY_LENGTH); station.stationkey[TwoFish_KEY_LENGTH]=0; } else station.stationkey[0]=0; strlcpy(station.initialkey,station.stationkey,sizeof(station.initialkey)); station.stationfish=TwoFishInit(station.stationkey); station.localsocketaddr.sin_port=htons(0); station.localsocketaddr.sin_addr.s_addr=0; station.localsocketaddr.sin_family=AF_INET; station.stationsocketaddr.sin_port=htons(station.stationport); station.stationsocketaddr.sin_addr=station.stationip; station.stationsocketaddr.sin_family=AF_INET; do station.myseqno=rand(); while(station.myseqno<20 || station.myseqno>65500); station.mykeymod[0]=rand(); station.mykeymod[1]=rand(); station.mykeymod[2]=rand(); station.mykeymod[3]=rand(); station.stationseqno=0; station.persistentsocket=true; station.packetversion=FWSAM_PACKETVERSION_PERSISTENT_CONN; if(FWsamCheckIn(&station)) { error=false; do { ipidx=0; do { if(!station.persistentsocket) { /* create a socket for the station */ station.stationsocket=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); if(station.stationsocket==INVALID_SOCKET) { Sagan_Log(S_WARN, "[%s, line %d] Invalid Socket error!", __FILE__, __LINE__ ); error=true; } if(bind(station.stationsocket,(struct sockaddr *)&(station.localsocketaddr),sizeof(struct sockaddr))) { Sagan_Log(S_WARN, "[%s, line %d] Can not bind socket!", __FILE__, __LINE__); error=true; } } else error=false; if(!error) { if(!station.persistentsocket) { /* let's connect to the agent */ if(connect(station.stationsocket,(struct sockaddr *)&station.stationsocketaddr,sizeof(struct sockaddr))) { Sagan_Log(S_WARN, "[%s, line %d] Could not send block to host %s.", __FILE__, __LINE__, inet_ntoa(station.stationip)); closesocket(station.stationsocket); error=true; } } if(!error) { if( debug->debugfwsam ) { Sagan_Log(S_DEBUG, "[FWsamBlock] Connected to host %s. %s IP %s", inet_ntoa(station.stationip),blockmode==FWSAM_STATUS_BLOCK?"Blocking":"Unblocking",inettoa(blockip[ipidx])); } /* now build the packet */ station.myseqno+=station.stationseqno; /* increase my seqno by adding agent seq no */ sampacket.endiancheck=1; /* This is an endian indicator for Snortsam */ sampacket.snortseqno[0]=(char)station.myseqno; sampacket.snortseqno[1]=(char)(station.myseqno>>8); sampacket.fwseqno[0]=(char)station.stationseqno;/* fill station seqno */ sampacket.fwseqno[1]=(char)(station.stationseqno>>8); sampacket.status=blockmode; /* set block action */ sampacket.version=station.packetversion; /* set packet version */ sampacket.duration[0]=(char)blockduration; /* set duration */ sampacket.duration[1]=(char)(blockduration>>8); sampacket.duration[2]=(char)(blockduration>>16); sampacket.duration[3]=(char)(blockduration>>24); sampacket.fwmode=blocklog|blockhow|FWSAM_WHO_SRC; /* set the mode */ sampacket.dstip[0]=(char)blockpeer[peeridx]; /* destination IP */ sampacket.dstip[1]=(char)(blockpeer[peeridx]>>8); sampacket.dstip[2]=(char)(blockpeer[peeridx]>>16); sampacket.dstip[3]=(char)(blockpeer[peeridx]>>24); sampacket.srcip[0]=(char)blockip[ipidx]; /* source IP */ sampacket.srcip[1]=(char)(blockip[ipidx]>>8); sampacket.srcip[2]=(char)(blockip[ipidx]>>16); sampacket.srcip[3]=(char)(blockip[ipidx]>>24); sampacket.protocol[0]=(char)blockproto; /* protocol */ sampacket.protocol[1]=(char)(blockproto>>8);/* protocol */ if(blockproto==6 || blockproto==17) { sampacket.dstport[0]=(char)blockport; sampacket.dstport[1]=(char)(blockport>>8); } else sampacket.dstport[0]=sampacket.dstport[1]=0; sampacket.srcport[0]=sampacket.srcport[1]=0; sampacket.sig_id[0]=(char)blocksid; /* set signature ID */ sampacket.sig_id[1]=(char)(blocksid>>8); sampacket.sig_id[2]=(char)(blocksid>>16); sampacket.sig_id[3]=(char)(blocksid>>24); if( debug->debugfwsam ) { Sagan_Log(S_DEBUG, "[FWsamBlock] Sending %s",blockmode==FWSAM_STATUS_BLOCK?"BLOCK":"UNBLOCK"); Sagan_Log(S_DEBUG, "[FWsamBlock] Snort SeqNo: %x",station.myseqno); Sagan_Log(S_DEBUG, "[FWsamBlock] Mgmt SeqNo : %x",station.stationseqno); Sagan_Log(S_DEBUG, "[FWsamBlock] Status : %i",blockmode); Sagan_Log(S_DEBUG, "[FWsamBlock] Version : %i",station.packetversion); Sagan_Log(S_DEBUG, "[FWsamBlock] Mode : %i",blocklog|blockhow|FWSAM_WHO_SRC); Sagan_Log(S_DEBUG, "[FWsamBlock] Duration : %li",blockduration); Sagan_Log(S_DEBUG, "[FWsamBlock] Protocol : %i",blockproto); Sagan_Log(S_DEBUG, "[FWsamBlock] Src IP : %s",inettoa(blockip[ipidx])); Sagan_Log(S_DEBUG, "[FWsamBlock] Src Port : %i",0); Sagan_Log(S_DEBUG, "[FWsamBlock] Dest IP : %s",inettoa(blockpeer[peeridx])); Sagan_Log(S_DEBUG, "[FWsamBlock] Dest Port : %i",blockport); Sagan_Log(S_DEBUG, "[FWsamBlock] Sig_ID : %lu",blocksid); } encbuf=TwoFishAlloc(sizeof(FWsamPacket),false,false,station.stationfish); /* get the encryption buffer */ len=TwoFishEncrypt((char *)&sampacket,(char **)&encbuf,sizeof(FWsamPacket),false,station.stationfish); /* encrypt the packet with current key */ if(send(station.stationsocket,encbuf,len,0)!=len) { /* weird...could not send */ Sagan_Log(S_WARN, "[%s, line %d] Could not send to host %s" , __FILE__, __LINE__, inet_ntoa(station.stationip)); closesocket(station.stationsocket); error=true; } else { i=FWSAM_NETWAIT; ioctlsocket(station.stationsocket,FIONBIO,&i); /* set non blocking and wait for */ while(i-- >1) { /* the response packet */ waitms(10); /* wait for response (default maximum 3 secs */ if(recv(station.stationsocket,encbuf,len,0)==len) i=0; /* if we received packet we set the counter to 0. */ /* by the time we check with if, it's already dec'ed to -1 */ } if(!i) { /* id we timed out (i was one, then dec'ed)... */ Sagan_Log(S_WARN, "[%s, line %d] Did not receive response from host %s" , __FILE__, __LINE__, inet_ntoa(station.stationip) ); closesocket(station.stationsocket); error=true; } else { /* got a packet */ decbuf=(char *)&sampacket; /* get the pointer to the packet struct */ len=TwoFishDecrypt(encbuf,(char **)&decbuf,sizeof(FWsamPacket)+TwoFish_BLOCK_SIZE,false,station.stationfish); /* try to decrypt the packet with current key */ if(len!=sizeof(FWsamPacket)) { /* invalid decryption */ strlcpy(station.stationkey,station.initialkey,sizeof(station.stationkey)); /* try the intial key */ TwoFishDestroy(station.stationfish); station.stationfish=TwoFishInit(station.stationkey); /* re-initialize the TwoFish with the intial key */ len=TwoFishDecrypt(encbuf,(char **)&decbuf,sizeof(FWsamPacket)+TwoFish_BLOCK_SIZE,false,station.stationfish); /* try again to decrypt */ if ( debug->debugfwsam ) Sagan_Log(S_DEBUG, "FWsamCheckOut] Had to use initial key!"); } if(len==sizeof(FWsamPacket)) { /* valid decryption */ if(sampacket.version==station.packetversion) { /* master speaks my language */ if(sampacket.status==FWSAM_STATUS_OK || sampacket.status==FWSAM_STATUS_NEWKEY || sampacket.status==FWSAM_STATUS_RESYNC || sampacket.status==FWSAM_STATUS_HOLD) { station.stationseqno=sampacket.fwseqno[0] | (sampacket.fwseqno[1]<<8); /* get stations seqno */ station.lastcontact=(unsigned long)time(NULL); /* set the last contact time (not used yet) */ if ( debug->debugfwsam ) { Sagan_Log(S_DEBUG, "[FWsamBlock] Received %s",sampacket.status==FWSAM_STATUS_OK?"OK": sampacket.status==FWSAM_STATUS_NEWKEY?"NEWKEY": sampacket.status==FWSAM_STATUS_RESYNC?"RESYNC": sampacket.status==FWSAM_STATUS_HOLD?"HOLD":"ERROR"); Sagan_Log(S_DEBUG, "[FWsamBlock] Snort SeqNo: %x",sampacket.snortseqno[0]|(sampacket.snortseqno[1]<<8)); Sagan_Log(S_DEBUG, "[FWsamBlock] Mgmt SeqNo : %x",station.stationseqno); Sagan_Log(S_DEBUG, "[FWsamBlock] Status : %i",sampacket.status); Sagan_Log(S_DEBUG, "[FWsamBlock] Version : %i",sampacket.version); } if(sampacket.status==FWSAM_STATUS_HOLD) { i=FWSAM_NETHOLD; /* Stay on hold for a maximum of 60 secs (default) */ while(i-- >1) { /* the response packet */ waitms(10); /* wait for response */ if(recv(station.stationsocket,encbuf,sizeof(FWsamPacket)+TwoFish_BLOCK_SIZE,0)==sizeof(FWsamPacket)+TwoFish_BLOCK_SIZE) i=0; /* if we received packet we set the counter to 0. */ } if(!i) { /* id we timed out (i was one, then dec'ed)... */ Sagan_Log(S_WARN, "[%s, line %d] Did not receive response from host %s" , __FILE__, __LINE__, inet_ntoa(station.stationip) ); error=true; sampacket.status=FWSAM_STATUS_ERROR; } else { /* got a packet */ decbuf=(char *)&sampacket; /* get the pointer to the packet struct */ len=TwoFishDecrypt(encbuf,(char **)&decbuf,sizeof(FWsamPacket)+TwoFish_BLOCK_SIZE,false,station.stationfish); /* try to decrypt the packet with current key */ if(len!=sizeof(FWsamPacket)) { /* invalid decryption */ strlcpy(station.stationkey,station.initialkey,sizeof(station.stationkey)); /* try the intial key */ TwoFishDestroy(station.stationfish); station.stationfish=TwoFishInit(station.stationkey); /* re-initialize the TwoFish with the intial key */ len=TwoFishDecrypt(encbuf,(char **)&decbuf,sizeof(FWsamPacket)+TwoFish_BLOCK_SIZE,false,station.stationfish); /* try again to decrypt */ if ( debug->debugfwsam ) Sagan_Log(S_DEBUG, "[FWsamBlock] Had to use initial key again!"); } if( debug->debugfwsam ) { Sagan_Log(S_DEBUG, "[FWsamBlock] Received %s", sampacket.status==FWSAM_STATUS_OK?"OK": sampacket.status==FWSAM_STATUS_NEWKEY?"NEWKEY": sampacket.status==FWSAM_STATUS_RESYNC?"RESYNC": sampacket.status==FWSAM_STATUS_HOLD?"HOLD":"ERROR"); Sagan_Log(S_DEBUG, "[FWsamBlock] Snort SeqNo: %x",sampacket.snortseqno[0]|(sampacket.snortseqno[1]<<8)); Sagan_Log(S_DEBUG, "[FWsamBlock] Mgmt SeqNo : %x",station.stationseqno); Sagan_Log(S_DEBUG, "[FWsamBlock] Status : %i",sampacket.status); Sagan_Log(S_DEBUG, "[FWsamBlock] Version : %i",sampacket.version); } if(len!=sizeof(FWsamPacket)) { /* invalid decryption */ Sagan_Log(S_WARN, "[%s, line %d] Password mismatch! Ignoring host %s" , __FILE__, __LINE__, inet_ntoa(station.stationip)); error=true; sampacket.status=FWSAM_STATUS_ERROR; } else if(sampacket.version!=station.packetversion) { /* invalid protocol version */ Sagan_Log(S_WARN, "[%s, line %d] Protocol version error! Ignoring host %s" , __FILE__, __LINE__, inet_ntoa(station.stationip)); error=true; sampacket.status=FWSAM_STATUS_ERROR; } else if(sampacket.status!=FWSAM_STATUS_OK && sampacket.status!=FWSAM_STATUS_NEWKEY && sampacket.status!=FWSAM_STATUS_RESYNC) { Sagan_Log(S_WARN, "[%s, line %d] Funky handshake error! Ignoring host %s" , __FILE__, __LINE__, inet_ntoa(station.stationip)); error=true; sampacket.status=FWSAM_STATUS_ERROR; } } } if(sampacket.status==FWSAM_STATUS_RESYNC) { /* if station want's to resync... */ strlcpy(station.stationkey,station.initialkey,sizeof(station.stationkey)); /* ...we use the intial key... */ memcpy(station.fwkeymod,sampacket.duration,4); /* and note the random key modifier */ } if(sampacket.status==FWSAM_STATUS_NEWKEY || sampacket.status==FWSAM_STATUS_RESYNC) { FWsamNewStationKey(&station,&sampacket); /* generate new TwoFish keys */ if( debug->debugfwsam ) Sagan_Log(S_NORMAL, "[%s, line %d] Generated new encryption key.... " , __FILE__, __LINE__); } if(!station.persistentsocket) closesocket(station.stationsocket); } else if(sampacket.status==FWSAM_STATUS_ERROR) { /* if SnortSam reports an error on second try, */ closesocket(station.stationsocket); /* something is messed up and ... */ error=true; Sagan_Log(S_WARN, "[%s, line %d] Undetermined error right after CheckIn! Ignoring host %s" , __FILE__, __LINE__, inet_ntoa(station.stationip)); } else { /* an unknown status means trouble... */ Sagan_Log(S_WARN, "[%s, line %d] Funky handshake error! Ignoring host %s!" , __FILE__, __LINE__, inet_ntoa(station.stationip)); closesocket(station.stationsocket); error=true; } } else { /* if the SnortSam agent uses a different packet version, we have no choice but to ignore it. */ Sagan_Log(S_WARN, "[%s, line %d] Protocol version errror! Ignoring host %s!" , __FILE__, __LINE__, inet_ntoa(station.stationip)); closesocket(station.stationsocket); error=true; } } else { /* if the intial key failed to decrypt as well, the keys are not configured the same, and we ignore that SnortSam station. */ Sagan_Log(S_WARN, "[%s, line %d] Password mismatch! Ignoring host %s!" , __FILE__, __LINE__, inet_ntoa(station.stationip)); closesocket(station.stationsocket); error=true; } } } free(encbuf); /* release of the TwoFishAlloc'ed encryption buffer */ } } ipidx++; } while(!error && ipidxstationsocket=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); if(station->stationsocket==INVALID_SOCKET) { Sagan_Log(S_WARN, "[%s, line %d] Invalid Socket errror!" , __FILE__, __LINE__); return false; } if(bind(station->stationsocket,(struct sockaddr *)&(station->localsocketaddr),sizeof(struct sockaddr))) { Sagan_Log(S_WARN, "[%s, line %d] Can not bind to socket!" , __FILE__, __LINE__); return false; } /* let's connect to the agent */ if(connect(station->stationsocket,(struct sockaddr *)&station->stationsocketaddr,sizeof(struct sockaddr))) { Sagan_Log(S_WARN, "[%s, line %d] Could not connect to host %s", __FILE__, __LINE__, inet_ntoa(station->stationip)); return false; } else { if ( debug->debugfwsam ) { Sagan_Log(S_WARN, "[FWsamCheckIn] Connected to host %s", inet_ntoa(station->stationip)); } /* now build the packet */ sampacket.endiancheck=1; sampacket.snortseqno[0]=(char)station->myseqno; /* fill my sequence number number */ sampacket.snortseqno[1]=(char)(station->myseqno>>8); /* fill my sequence number number */ sampacket.status=FWSAM_STATUS_CHECKIN; /* let's check in */ sampacket.version=station->packetversion; /* set the packet version */ memcpy(sampacket.duration,station->mykeymod,4); /* we'll send SnortSam our key modifier in the duration slot */ /* (the checkin packet is just the plain initial key) */ if ( debug->debugfwsam ) { Sagan_Log(S_DEBUG, "[FWsamCheckIn] Sending CHECKIN"); Sagan_Log(S_DEBUG, "[FWsamCheckIn] Snort SeqNo: %x",station->myseqno); Sagan_Log(S_DEBUG, "[FWsamCheckIn] Mode : %i",sampacket.status); Sagan_Log(S_DEBUG, "[FWsamCheckIn] Version : %i",sampacket.version); } encbuf=TwoFishAlloc(sizeof(FWsamPacket),false,false,station->stationfish); /* get buffer for encryption */ len=TwoFishEncrypt((char *)&sampacket,(char **)&encbuf,sizeof(FWsamPacket),false,station->stationfish); /* encrypt with initial key */ if(send(station->stationsocket,encbuf,len,0)!=len) /* weird...could not send */ Sagan_Log(S_WARN, "Could not send to host %s", inet_ntoa(station->stationip)); else { i=FWSAM_NETWAIT; ioctlsocket(station->stationsocket,FIONBIO,&i); /* set non blocking and wait for */ while(i-- >1) { waitms(10); /* wait a maximum of 3 secs for response */ if(recv(station->stationsocket,encbuf,len,0)==len) i=0; } if(!i) /* time up? */ Sagan_Log(S_WARN, "Did not receive response from host %s", inet_ntoa(station->stationip)); else { decbuf=(char *)&sampacket; /* got status packet */ len=TwoFishDecrypt(encbuf,(char **)&decbuf,sizeof(FWsamPacket)+TwoFish_BLOCK_SIZE,false,station->stationfish); /* try to decrypt with initial key */ if(len==sizeof(FWsamPacket)) { /* valid decryption */ if ( debug->debugfwsam ) { Sagan_Log(S_DEBUG, "[FWsamCheckIn] Received %s",sampacket.status==FWSAM_STATUS_OK?"OK": sampacket.status==FWSAM_STATUS_NEWKEY?"NEWKEY": sampacket.status==FWSAM_STATUS_RESYNC?"RESYNC": sampacket.status==FWSAM_STATUS_HOLD?"HOLD":"ERROR"); Sagan_Log(S_DEBUG, "[FWsamCheckIn] Snort SeqNo: %x",sampacket.snortseqno[0]|(sampacket.snortseqno[1]<<8)); Sagan_Log(S_DEBUG, "[FWsamCheckIn] Mgmt SeqNo : %x",sampacket.fwseqno[0]|(sampacket.fwseqno[1]<<8)); Sagan_Log(S_DEBUG, "[FWsamCheckIn] Status : %i",sampacket.status); Sagan_Log(S_DEBUG, "[FWsamCheckIn] Version : %i",sampacket.version); } if(sampacket.version==FWSAM_PACKETVERSION_PERSISTENT_CONN || sampacket.version==FWSAM_PACKETVERSION) { /* master speaks my language */ if(sampacket.status==FWSAM_STATUS_OK || sampacket.status==FWSAM_STATUS_NEWKEY || sampacket.status==FWSAM_STATUS_RESYNC) { station->stationseqno=sampacket.fwseqno[0]|(sampacket.fwseqno[1]<<8); /* get stations seqno */ station->lastcontact=(unsigned long)time(NULL); stationok=true; station->packetversion=sampacket.version; if(sampacket.version==FWSAM_PACKETVERSION) station->persistentsocket=false; if(sampacket.status==FWSAM_STATUS_NEWKEY || sampacket.status==FWSAM_STATUS_RESYNC) { /* generate new keys */ memcpy(station->fwkeymod,sampacket.duration,4); /* note the key modifier */ FWsamNewStationKey(station,&sampacket); /* and generate new TwoFish keys (with key modifiers) */ if ( debug->debugfwsam ) Sagan_Log(S_DEBUG, "[FWsamCheckIn] Generated new encryption key....."); } } else if(sampacket.status==FWSAM_STATUS_ERROR && sampacket.version==FWSAM_PACKETVERSION) { if(station->persistentsocket) { Sagan_Log(S_WARN, "[%s, line %d] Host %s doesn't support packet version %i for persistent connections. Trying packet version %i!" , __FILE__, __LINE__, inet_ntoa(station->stationip),FWSAM_PACKETVERSION_PERSISTENT_CONN,FWSAM_PACKETVERSION); station->persistentsocket=false; station->packetversion=FWSAM_PACKETVERSION; again=true; } else Sagan_Log(S_WARN, "[%s, line %d] Protocol version mismatch! Ignoring host %s", __FILE__, __LINE__, inet_ntoa(station->stationip)); } else /* weird, got a strange status back */ Sagan_Log(S_WARN, "[%s, line %d] Funky handshake error! Ignoring host %s!", __FILE__, __LINE__, inet_ntoa(station->stationip)); } else /* packet version does not match */ Sagan_Log(S_WARN, "[%s, line %d] Potocol version error! Ignoring host %s!", __FILE__, __LINE__, inet_ntoa(station->stationip)); } else /* key does not match */ Sagan_Log(S_WARN, "[%s, line %d] Password mismatch! Ignoring host %s!",__FILE__, __LINE__, inet_ntoa(station->stationip)); } } free(encbuf); /* release TwoFishAlloc'ed buffer */ } if(!(stationok && station->persistentsocket)) closesocket(station->stationsocket); } while(again); return stationok; } void waitms(unsigned int dur) { usleep(dur*1000); } /* Generates a new encryption key for TwoFish based on seq numbers and a random that * the SnortSam agents send on checkin (in protocol) */ void FWsamNewStationKey(FWsamStation *station,FWsamPacket *packet) { unsigned char newkey[TwoFish_KEY_LENGTH+2]; int i; newkey[0]=packet->snortseqno[0]; /* current snort seq # (which both know) */ newkey[1]=packet->snortseqno[1]; newkey[2]=packet->fwseqno[0]; /* current SnortSam seq # (which both know) */ newkey[3]=packet->fwseqno[1]; newkey[4]=packet->protocol[0]; /* the random SnortSam chose */ newkey[5]=packet->protocol[1]; strncpy(newkey+6,station->stationkey,TwoFish_KEY_LENGTH-6); /* append old key */ newkey[TwoFish_KEY_LENGTH]=0; newkey[0]^=station->mykeymod[0]; /* modify key with key modifiers which were */ newkey[1]^=station->mykeymod[1]; /* exchanged during the check-in handshake. */ newkey[2]^=station->mykeymod[2]; newkey[3]^=station->mykeymod[3]; newkey[4]^=station->fwkeymod[0]; newkey[5]^=station->fwkeymod[1]; newkey[6]^=station->fwkeymod[2]; newkey[7]^=station->fwkeymod[3]; for(i=0; i<=7; i++) if(newkey[i]==0) newkey[i]++; // safecopy(station->stationkey,newkey); strlcpy(station->stationkey,newkey,sizeof(station->stationkey)); TwoFishDestroy(station->stationfish); station->stationfish=TwoFishInit(newkey); } /* This function (together with the define in snortsam.h) attempts * to prevent buffer overflows by checking the destination buffer size. */ /* This does nothing else than inet_ntoa, but it keeps 256 results in a static string * unlike inet_ntoa which keeps only one. This is used for (s)printf's were two IP * addresses are printed (this has been increased from four while multithreading the app). */ char *inettoa(unsigned long ip) { struct in_addr ips; static char addr[20]; ips.s_addr=ip; strncpy(addr,inet_ntoa(ips),19); addr[19]=0; return addr; } /* FWsamCheckOut will be called when samtool exists. It de-registeres this tool * from the list of sensor that the SnortSam agent keeps. */ void FWsamCheckOut(FWsamStation *station) { FWsamPacket sampacket; int i,len; char *encbuf,*decbuf; if(!station->persistentsocket) { station->stationsocket=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); if(station->stationsocket==INVALID_SOCKET) { Sagan_Log(S_WARN, "[%s, line %d] Invalid socket error!" , __FILE__, __LINE__); return; } if(bind(station->stationsocket,(struct sockaddr *)&(station->localsocketaddr),sizeof(struct sockaddr))) { Sagan_Log(S_WARN, "[%s, line %d] Can not bind socket!" , __FILE__, __LINE__); return; } /* let's connect to the agent */ i=!connect(station->stationsocket,(struct sockaddr *)&station->stationsocketaddr,sizeof(struct sockaddr)); } else i=true; if(i) { if( debug->debugfwsam ) Sagan_Log(S_DEBUG, "[FWsamCheckOut] Disconnecting from host %s",inet_ntoa(station->stationip)); /* now build the packet */ station->myseqno+=station->stationseqno; /* increase my seqno */ sampacket.endiancheck=1; sampacket.snortseqno[0]=(char)station->myseqno; sampacket.snortseqno[1]=(char)(station->myseqno>>8); sampacket.fwseqno[0]=(char)station->stationseqno; /* fill station seqno */ sampacket.fwseqno[1]=(char)(station->stationseqno>>8); sampacket.status=FWSAM_STATUS_CHECKOUT; /* checking out... */ sampacket.version=station->packetversion; if( debug->debugfwsam ) { Sagan_Log(S_DEBUG, "[FWsamCheckOut] Sending CHECKOUT"); Sagan_Log(S_DEBUG, "[FWsamCheckOut] Snort SeqNo: %x",station->myseqno); Sagan_Log(S_DEBUG, "[FWsamCheckOut] Mgmt SeqNo : %x",station->stationseqno); Sagan_Log(S_DEBUG, "[FWsamCheckOut] Status : %i",sampacket.status); } encbuf=TwoFishAlloc(sizeof(FWsamPacket),false,false,station->stationfish); /* get encryption buffer */ len=TwoFishEncrypt((char *)&sampacket,(char **)&encbuf,sizeof(FWsamPacket),false,station->stationfish); /* encrypt packet with current key */ if(send(station->stationsocket,encbuf,len,0)==len) { i=FWSAM_NETWAIT; ioctlsocket(station->stationsocket,FIONBIO,&i); /* set non blocking and wait for */ while(i-- >1) { waitms(10); /* ...wait a maximum of 3 secs for response... */ if(recv(station->stationsocket,encbuf,len,0)==len) /* ... for the status packet */ i=0; } if(i) { /* if we got the packet */ decbuf=(char *)&sampacket; len=TwoFishDecrypt(encbuf,(char **)&decbuf,sizeof(FWsamPacket)+TwoFish_BLOCK_SIZE,false,station->stationfish); if(len!=sizeof(FWsamPacket)) { /* invalid decryption */ strlcpy(station->stationkey,station->initialkey,sizeof(station->stationkey)); /* try initial key */ TwoFishDestroy(station->stationfish); /* toss this fish */ station->stationfish=TwoFishInit(station->stationkey); /* re-initialze TwoFish with initial key */ len=TwoFishDecrypt(encbuf,(char **)&decbuf,sizeof(FWsamPacket)+TwoFish_BLOCK_SIZE,false,station->stationfish); /* and try to decrypt again */ if( debug->debugfwsam ) Sagan_Log(S_DEBUG, "[FWsamCheckOut] Had to use initial key!"); } if(len==sizeof(FWsamPacket)) { /* valid decryption */ if(sampacket.version!=station->packetversion) /* but don't really care since we are on the way out */ Sagan_Log(S_WARN, "[%s, line %d] Protocol version error!", __FILE__, __LINE__ ); } else Sagan_Log(S_WARN, "[%s, line %d] Password mismatch!", __FILE__, __LINE__); } } free(encbuf); /* release TwoFishAlloc'ed buffer */ } else Sagan_Log(S_WARN, "[%s, line %d] Could not connect to host %s for CheckOut", __FILE__, __LINE__, inet_ntoa(station->stationip)); closesocket(station->stationsocket); station->persistentsocket=false; } #endif sagan-1.1.2/src/output-plugins/sagan-twofish.c0000644000175000017500000011575412770372750020321 0ustar champchamp/* $Id: twofish.c,v 2.1 2008/12/15 20:36:05 fknobbe Exp $ * * * Copyright (C) 1997-2000 The Cryptix Foundation Limited. * Copyright (C) 2000 Farm9. * Copyright (C) 2001 Frank Knobbe. * All rights reserved. * * For Cryptix code: * Use, modification, copying and distribution of this software is subject * the terms and conditions of the Cryptix General Licence. You should have * received a copy of the Cryptix General Licence along with this library; * if not, you can download a copy from http://www.cryptix.org/ . * * For Farm9: * --- jojo@farm9.com, August 2000, converted from Java to C++, added CBC mode and * ciphertext stealing technique, added AsciiTwofish class for easy encryption * decryption of text strings * * Frank Knobbe : * --- April 2001, converted from C++ to C, prefixed global variables * with TwoFish, substituted some defines, changed functions to make use of * variables supplied in a struct, modified and added routines for modular calls. * Cleaned up the code so that defines are used instead of fixed 16's and 32's. * Created two general purpose crypt routines for one block and multiple block * encryption using Joh's CBC code. * Added crypt routines that use a header (with a magic and data length). * (Basically a major rewrite). * * Note: Routines labeled _TwoFish are private and should not be used * (or with extreme caution). * */ #ifndef __TWOFISH_LIBRARY_SOURCE__ #define __TWOFISH_LIBRARY_SOURCE__ #include #include #include #include #include #include #ifdef WIN32 #ifndef u_long typedef unsigned long u_long; #endif #ifndef u_int32_t typedef unsigned long u_int32_t; #endif #ifndef u_word typedef unsigned short u_word; #endif #ifndef u_int16_t typedef unsigned short u_int16_t; #endif #ifndef u_char typedef unsigned char u_char; #endif #ifndef u_int8_t typedef unsigned char u_int8_t; #endif #endif /* WIN32 */ #include "sagan-twofish.h" bool TwoFish_srand=true; /* if TRUE, first call of TwoFishInit will seed rand(); */ /* of TwoFishInit */ /* Fixed 8x8 permutation S-boxes */ static const u_int8_t TwoFish_P[2][256] = { { /* p0 */ 0xA9, 0x67, 0xB3, 0xE8, 0x04, 0xFD, 0xA3, 0x76, 0x9A, 0x92, 0x80, 0x78, 0xE4, 0xDD, 0xD1, 0x38, 0x0D, 0xC6, 0x35, 0x98, 0x18, 0xF7, 0xEC, 0x6C, 0x43, 0x75, 0x37, 0x26, 0xFA, 0x13, 0x94, 0x48, 0xF2, 0xD0, 0x8B, 0x30, 0x84, 0x54, 0xDF, 0x23, 0x19, 0x5B, 0x3D, 0x59, 0xF3, 0xAE, 0xA2, 0x82, 0x63, 0x01, 0x83, 0x2E, 0xD9, 0x51, 0x9B, 0x7C, 0xA6, 0xEB, 0xA5, 0xBE, 0x16, 0x0C, 0xE3, 0x61, 0xC0, 0x8C, 0x3A, 0xF5, 0x73, 0x2C, 0x25, 0x0B, 0xBB, 0x4E, 0x89, 0x6B, 0x53, 0x6A, 0xB4, 0xF1, 0xE1, 0xE6, 0xBD, 0x45, 0xE2, 0xF4, 0xB6, 0x66, 0xCC, 0x95, 0x03, 0x56, 0xD4, 0x1C, 0x1E, 0xD7, 0xFB, 0xC3, 0x8E, 0xB5, 0xE9, 0xCF, 0xBF, 0xBA, 0xEA, 0x77, 0x39, 0xAF, 0x33, 0xC9, 0x62, 0x71, 0x81, 0x79, 0x09, 0xAD, 0x24, 0xCD, 0xF9, 0xD8, 0xE5, 0xC5, 0xB9, 0x4D, 0x44, 0x08, 0x86, 0xE7, 0xA1, 0x1D, 0xAA, 0xED, 0x06, 0x70, 0xB2, 0xD2, 0x41, 0x7B, 0xA0, 0x11, 0x31, 0xC2, 0x27, 0x90, 0x20, 0xF6, 0x60, 0xFF, 0x96, 0x5C, 0xB1, 0xAB, 0x9E, 0x9C, 0x52, 0x1B, 0x5F, 0x93, 0x0A, 0xEF, 0x91, 0x85, 0x49, 0xEE, 0x2D, 0x4F, 0x8F, 0x3B, 0x47, 0x87, 0x6D, 0x46, 0xD6, 0x3E, 0x69, 0x64, 0x2A, 0xCE, 0xCB, 0x2F, 0xFC, 0x97, 0x05, 0x7A, 0xAC, 0x7F, 0xD5, 0x1A, 0x4B, 0x0E, 0xA7, 0x5A, 0x28, 0x14, 0x3F, 0x29, 0x88, 0x3C, 0x4C, 0x02, 0xB8, 0xDA, 0xB0, 0x17, 0x55, 0x1F, 0x8A, 0x7D, 0x57, 0xC7, 0x8D, 0x74, 0xB7, 0xC4, 0x9F, 0x72, 0x7E, 0x15, 0x22, 0x12, 0x58, 0x07, 0x99, 0x34, 0x6E, 0x50, 0xDE, 0x68, 0x65, 0xBC, 0xDB, 0xF8, 0xC8, 0xA8, 0x2B, 0x40, 0xDC, 0xFE, 0x32, 0xA4, 0xCA, 0x10, 0x21, 0xF0, 0xD3, 0x5D, 0x0F, 0x00, 0x6F, 0x9D, 0x36, 0x42, 0x4A, 0x5E, 0xC1, 0xE0 }, { /* p1 */ 0x75, 0xF3, 0xC6, 0xF4, 0xDB, 0x7B, 0xFB, 0xC8, 0x4A, 0xD3, 0xE6, 0x6B, 0x45, 0x7D, 0xE8, 0x4B, 0xD6, 0x32, 0xD8, 0xFD, 0x37, 0x71, 0xF1, 0xE1, 0x30, 0x0F, 0xF8, 0x1B, 0x87, 0xFA, 0x06, 0x3F, 0x5E, 0xBA, 0xAE, 0x5B, 0x8A, 0x00, 0xBC, 0x9D, 0x6D, 0xC1, 0xB1, 0x0E, 0x80, 0x5D, 0xD2, 0xD5, 0xA0, 0x84, 0x07, 0x14, 0xB5, 0x90, 0x2C, 0xA3, 0xB2, 0x73, 0x4C, 0x54, 0x92, 0x74, 0x36, 0x51, 0x38, 0xB0, 0xBD, 0x5A, 0xFC, 0x60, 0x62, 0x96, 0x6C, 0x42, 0xF7, 0x10, 0x7C, 0x28, 0x27, 0x8C, 0x13, 0x95, 0x9C, 0xC7, 0x24, 0x46, 0x3B, 0x70, 0xCA, 0xE3, 0x85, 0xCB, 0x11, 0xD0, 0x93, 0xB8, 0xA6, 0x83, 0x20, 0xFF, 0x9F, 0x77, 0xC3, 0xCC, 0x03, 0x6F, 0x08, 0xBF, 0x40, 0xE7, 0x2B, 0xE2, 0x79, 0x0C, 0xAA, 0x82, 0x41, 0x3A, 0xEA, 0xB9, 0xE4, 0x9A, 0xA4, 0x97, 0x7E, 0xDA, 0x7A, 0x17, 0x66, 0x94, 0xA1, 0x1D, 0x3D, 0xF0, 0xDE, 0xB3, 0x0B, 0x72, 0xA7, 0x1C, 0xEF, 0xD1, 0x53, 0x3E, 0x8F, 0x33, 0x26, 0x5F, 0xEC, 0x76, 0x2A, 0x49, 0x81, 0x88, 0xEE, 0x21, 0xC4, 0x1A, 0xEB, 0xD9, 0xC5, 0x39, 0x99, 0xCD, 0xAD, 0x31, 0x8B, 0x01, 0x18, 0x23, 0xDD, 0x1F, 0x4E, 0x2D, 0xF9, 0x48, 0x4F, 0xF2, 0x65, 0x8E, 0x78, 0x5C, 0x58, 0x19, 0x8D, 0xE5, 0x98, 0x57, 0x67, 0x7F, 0x05, 0x64, 0xAF, 0x63, 0xB6, 0xFE, 0xF5, 0xB7, 0x3C, 0xA5, 0xCE, 0xE9, 0x68, 0x44, 0xE0, 0x4D, 0x43, 0x69, 0x29, 0x2E, 0xAC, 0x15, 0x59, 0xA8, 0x0A, 0x9E, 0x6E, 0x47, 0xDF, 0x34, 0x35, 0x6A, 0xCF, 0xDC, 0x22, 0xC9, 0xC0, 0x9B, 0x89, 0xD4, 0xED, 0xAB, 0x12, 0xA2, 0x0D, 0x52, 0xBB, 0x02, 0x2F, 0xA9, 0xD7, 0x61, 0x1E, 0xB4, 0x50, 0x04, 0xF6, 0xC2, 0x16, 0x25, 0x86, 0x56, 0x55, 0x09, 0xBE, 0x91 } }; static bool TwoFish_MDSready=false; static u_int32_t TwoFish_MDS[4][256]; /* TwoFish_MDS matrix */ #define TwoFish_LFSR1(x) (((x)>>1)^(((x)&0x01)?TwoFish_MDS_GF_FDBK/2:0)) #define TwoFish_LFSR2(x) (((x)>>2)^(((x)&0x02)?TwoFish_MDS_GF_FDBK/2:0)^(((x)&0x01)?TwoFish_MDS_GF_FDBK/4:0)) #define TwoFish_Mx_1(x) ((u_int32_t)(x)) /* force result to dword so << will work */ #define TwoFish_Mx_X(x) ((u_int32_t)((x)^TwoFish_LFSR2(x))) /* 5B */ #define TwoFish_Mx_Y(x) ((u_int32_t)((x)^TwoFish_LFSR1(x)^TwoFish_LFSR2(x))) /* EF */ #define TwoFish_RS_rem(x) { u_int8_t b=(u_int8_t)(x>>24); u_int32_t g2=((b<<1)^((b&0x80)?TwoFish_RS_GF_FDBK:0))&0xFF; u_int32_t g3=((b>>1)&0x7F)^((b&1)?TwoFish_RS_GF_FDBK>>1:0)^g2; x=(x<<8)^(g3<<24)^(g2<<16)^(g3<<8)^b; } /*#define TwoFish__b(x,N) (((u_int8_t *)&x)[((N)&3)^TwoFish_ADDR_XOR])*/ /* pick bytes out of a dword */ #define TwoFish_b0(x) TwoFish__b(x,0) /* extract LSB of u_int32_t */ #define TwoFish_b1(x) TwoFish__b(x,1) #define TwoFish_b2(x) TwoFish__b(x,2) #define TwoFish_b3(x) TwoFish__b(x,3) /* extract MSB of u_int32_t */ u_int8_t TwoFish__b(u_int32_t x,int n) { n&=3; while(n-->0) x>>=8; return (u_int8_t)x; } /* TwoFish Initialization * * This routine generates a global data structure for use with TwoFish, * initializes important values (such as subkeys, sBoxes), generates subkeys * and precomputes the MDS matrix if not already done. * * Input: User supplied password (will be appended by default password of 'SnortHas2FishEncryptionRoutines!') * * Output: Pointer to TWOFISH structure. This data structure contains key dependent data. * This pointer is used with all other crypt functions. */ TWOFISH *TwoFishInit(char *userkey) { TWOFISH *tfdata; int i,x,m; char tkey[TwoFish_KEY_LENGTH+40]; tfdata=malloc(sizeof(TWOFISH)); /* allocate the TwoFish structure */ if(tfdata!=NULL) { if(*userkey) { strncpy(tkey,userkey,TwoFish_KEY_LENGTH); /* use first 32 chars of user supplied password */ tkey[TwoFish_KEY_LENGTH]=0; /* make sure it wasn't more */ } else strcpy(tkey,TwoFish_DEFAULT_PW); /* if no key defined, use default password */ for(i=0,x=0,m=strlen(tkey); ikey[i]=tkey[x++]; /* fill the whole keyspace with repeating key. */ if(x==m) x=0; } if(!TwoFish_MDSready) _TwoFish_PrecomputeMDSmatrix(); /* "Wake Up, Neo" */ _TwoFish_MakeSubKeys(tfdata); /* generate subkeys */ _TwoFish_ResetCBC(tfdata); /* reset the CBC */ tfdata->output=NULL; /* nothing to output yet */ tfdata->dontflush=false; /* reset decrypt skip block flag */ if(TwoFish_srand) { TwoFish_srand=false; srand(time(NULL)); } } return tfdata; /* return the data pointer */ } void TwoFishDestroy(TWOFISH *tfdata) { if(tfdata!=NULL) free(tfdata); } /* en/decryption with CBC mode */ unsigned long _TwoFish_CryptRawCBC(char *in,char *out,unsigned long len,bool decrypt,TWOFISH *tfdata) { unsigned long rl; rl=len; /* remember how much data to crypt. */ while(len>TwoFish_BLOCK_SIZE) { /* and now we process block by block. */ _TwoFish_BlockCrypt(in,out,TwoFish_BLOCK_SIZE,decrypt,tfdata); /* de/encrypt it. */ in+=TwoFish_BLOCK_SIZE; /* adjust pointers. */ out+=TwoFish_BLOCK_SIZE; len-=TwoFish_BLOCK_SIZE; } if(len>0) /* if we have less than a block left... */ _TwoFish_BlockCrypt(in,out,len,decrypt,tfdata); /* ...then we de/encrypt that too. */ if(tfdata->qBlockDefined && !tfdata->dontflush) /* in case len was exactly one block... */ _TwoFish_FlushOutput(tfdata->qBlockCrypt,TwoFish_BLOCK_SIZE,tfdata); /* ...we need to write the... */ /* ...remaining bytes of the buffer */ return rl; } /* en/decryption on one block only */ unsigned long _TwoFish_CryptRaw16(char *in,char *out,unsigned long len,bool decrypt,TWOFISH *tfdata) { /* qBlockPlain already zero'ed through ResetCBC */ memcpy(tfdata->qBlockPlain,in,len); /* toss the data into it. */ _TwoFish_BlockCrypt16(tfdata->qBlockPlain,tfdata->qBlockCrypt,decrypt,tfdata); /* encrypt just that block without CBC. */ memcpy(out,tfdata->qBlockCrypt,TwoFish_BLOCK_SIZE); /* and return what we got */ return TwoFish_BLOCK_SIZE; } /* en/decryption without reset of CBC and output assignment */ unsigned long _TwoFish_CryptRaw(char *in,char *out,unsigned long len,bool decrypt,TWOFISH *tfdata) { if(in!=NULL && out!=NULL && len>0 && tfdata!=NULL) { /* if we have valid data, then... */ if(len>TwoFish_BLOCK_SIZE) /* ...check if we have more than one block. */ return _TwoFish_CryptRawCBC(in,out,len,decrypt,tfdata); /* if so, use the CBC routines... */ else return _TwoFish_CryptRaw16(in,out,len,decrypt,tfdata); /* ...otherwise just do one block. */ } return 0; } /* TwoFish Raw Encryption * * Does not use header, but does use CBC (if more than one block has to be encrypted). * * Input: Pointer to the buffer of the plaintext to be encrypted. * Pointer to the buffer receiving the ciphertext. * The length of the plaintext buffer. * The TwoFish structure. * * Output: The amount of bytes encrypted if successful, otherwise 0. */ unsigned long TwoFishEncryptRaw(char *in, char *out, unsigned long len, TWOFISH *tfdata) { _TwoFish_ResetCBC(tfdata); /* reset CBC flag. */ tfdata->output=out; /* output straight into output buffer. */ return _TwoFish_CryptRaw(in,out,len,false,tfdata); /* and go for it. */ } /* TwoFish Raw Decryption * * Does not use header, but does use CBC (if more than one block has to be decrypted). * * Input: Pointer to the buffer of the ciphertext to be decrypted. * Pointer to the buffer receiving the plaintext. * The length of the ciphertext buffer (at least one cipher block). * The TwoFish structure. * * Output: The amount of bytes decrypted if successful, otherwise 0. */ unsigned long TwoFishDecryptRaw(char *in, char *out, unsigned long len, TWOFISH *tfdata) { _TwoFish_ResetCBC(tfdata); /* reset CBC flag. */ tfdata->output=out; /* output straight into output buffer. */ return _TwoFish_CryptRaw(in,out,len,true,tfdata); /* and go for it. */ } /* TwoFish Free * * Free's the allocated buffer. * * Input: Pointer to the TwoFish structure * * Output: (none) */ void TwoFishFree(TWOFISH *tfdata) { if(tfdata->output!=NULL) { /* if a valid buffer is present... */ free(tfdata->output); /* ...then we free it for you... */ tfdata->output=NULL; /* ...and mark as such. */ } } /* TwoFish Set Output * * If you want to allocate the output buffer yourself, * then you can set it with this function. * * Input: Pointer to your output buffer * Pointer to the TwoFish structure * * Output: (none) */ void TwoFishSetOutput(char *outp,TWOFISH *tfdata) { tfdata->output=outp; /* (do we really need a function for this?) */ } /* TwoFish Alloc * * Allocates enough memory for the output buffer that would be required * * Input: Length of the plaintext. * Boolean flag for BinHex Output. * Pointer to the TwoFish structure. * * Output: Returns a pointer to the memory allocated. */ void *TwoFishAlloc(unsigned long len,bool binhex,bool decrypt,TWOFISH *tfdata) { /* TwoFishFree(tfdata); */ /* (don't for now) discard whatever was allocated earlier. */ if(decrypt) { /* if decrypting... */ if(binhex) /* ...and input is binhex encoded... */ len/=2; /* ...use half as much for output. */ len-=TwoFish_BLOCK_SIZE; /* Also, subtract the size of the header. */ } else { len+=TwoFish_BLOCK_SIZE; /* the size is just increased by the header... */ if(binhex) len*=2; /* ...and doubled if output is to be binhexed. */ } tfdata->output=malloc(len+TwoFish_BLOCK_SIZE);/* grab some memory...plus some extra (it's running over somewhere, crashes without extra padding) */ return tfdata->output; /* ...and return to caller. */ } /* bin2hex and hex2bin conversion */ void _TwoFish_BinHex(u_int8_t *buf,unsigned long len,bool bintohex) { u_int8_t *pi,*po,c; if(bintohex) { for(pi=buf+len-1,po=buf+(2*len)-1; len>0; pi--,po--,len--) { /* let's start from the end of the bin block. */ c=*pi; /* grab value. */ c&=15; /* use lower 4 bits. */ if(c>9) /* convert to ascii. */ c+=('a'-10); else c+='0'; *po--=c; /* set the lower nibble. */ c=*pi; /* grab value again. */ c>>=4; /* right shift 4 bits. */ c&=15; /* make sure we only have 4 bits. */ if(c>9) /* convert to ascii. */ c+=('a'-10); else c+='0'; *po=c; /* set the higher nibble. */ } /* and keep going. */ } else { for(pi=buf,po=buf; len>0; pi++,po++,len-=2) { /* let's start from the beginning of the hex block. */ c=tolower(*pi++)-'0'; /* grab higher nibble. */ if(c>9) /* convert to value. */ c-=('0'-9); *po=c<<4; /* left shit 4 bits. */ c=tolower(*pi)-'0'; /* grab lower nibble. */ if(c>9) /* convert to value. */ c-=('0'-9); *po|=c; /* and add to value. */ } } } /* TwoFish Encryption * * Uses header and CBC. If the output area has not been intialized with TwoFishAlloc, * this routine will alloc the memory. In addition, it will include a small 'header' * containing the magic and some salt. That way the decrypt routine can check if the * packet got decrypted successfully, and return 0 instead of garbage. * * Input: Pointer to the buffer of the plaintext to be encrypted. * Pointer to the pointer to the buffer receiving the ciphertext. * The pointer either points to user allocated output buffer space, or to NULL, in which case * this routine will set the pointer to the buffer allocated through the struct. * The length of the plaintext buffer. * Can be -1 if the input is a null terminated string, in which case we'll count for you. * Boolean flag for BinHex Output (if used, output will be twice as large as input). * Note: BinHex conversion overwrites (converts) input buffer! * The TwoFish structure. * * Output: The amount of bytes encrypted if successful, otherwise 0. */ unsigned long TwoFishEncrypt(char *in, char **out, signed long len, bool binhex, TWOFISH *tfdata) { unsigned long ilen,olen; if(len== -1) /* if we got -1 for len, we'll assume IN is a... */ ilen=strlen(in); /* ...\0 terminated string and figure len out ourselves... */ else ilen=len; /* ...otherwise we trust you supply a correct length. */ if(in!=NULL && out!=NULL && ilen>0 && tfdata!=NULL) { /* if we got usable stuff, we'll do it. */ if(*out==NULL) /* if OUT points to a NULL pointer... */ *out=TwoFishAlloc(ilen,binhex,false,tfdata); /* ...we'll (re-)allocate buffer space. */ if(*out!=NULL) { tfdata->output=*out; /* set output buffer. */ tfdata->header.salt=rand()*65536+rand(); /* toss in some salt. */ tfdata->header.length[0]= (u_int8_t)(ilen); tfdata->header.length[1]= (u_int8_t)(ilen>>8); tfdata->header.length[2]= (u_int8_t)(ilen>>16); tfdata->header.length[3]= (u_int8_t)(ilen>>24); memcpy(tfdata->header.magic,TwoFish_MAGIC,TwoFish_MAGIC_LEN); /* set the magic. */ olen=TwoFish_BLOCK_SIZE; /* set output counter. */ _TwoFish_ResetCBC(tfdata); /* reset the CBC flag */ _TwoFish_BlockCrypt((u_int8_t *)&(tfdata->header),*out,olen,false,tfdata); /* encrypt first block (without flush on 16 byte boundary). */ olen+=_TwoFish_CryptRawCBC(in,*out+TwoFish_BLOCK_SIZE,ilen,false,tfdata); /* and encrypt the rest (we do not reset the CBC flag). */ if(binhex) { /* if binhex... */ _TwoFish_BinHex(*out,olen,true); /* ...convert output to binhex... */ olen*=2; /* ...and size twice as large. */ } tfdata->output=*out; return olen; } } return 0; } /* TwoFish Decryption * * Uses header and CBC. If the output area has not been intialized with TwoFishAlloc, * this routine will alloc the memory. In addition, it will check the small 'header' * containing the magic. If magic does not match we return 0. Otherwise we return the * amount of bytes decrypted (should be the same as the length in the header). * * Input: Pointer to the buffer of the ciphertext to be decrypted. * Pointer to the pointer to the buffer receiving the plaintext. * The pointer either points to user allocated output buffer space, or to NULL, in which case * this routine will set the pointer to the buffer allocated through the struct. * The length of the ciphertext buffer. * Can be -1 if the input is a null terminated binhex string, in which case we'll count for you. * Boolean flag for BinHex Input (if used, plaintext will be half as large as input). * Note: BinHex conversion overwrites (converts) input buffer! * The TwoFish structure. * * Output: The amount of bytes decrypted if successful, otherwise 0. */ unsigned long TwoFishDecrypt(char *in, char **out, signed long len, bool binhex, TWOFISH *tfdata) { unsigned long ilen,elen,olen; const u_int8_t cmagic[TwoFish_MAGIC_LEN]=TwoFish_MAGIC; u_int8_t *tbuf; if(len== -1) /* if we got -1 for len, we'll assume IN is... */ ilen=strlen(in); /* ...\0 terminated binhex and figure len out ourselves... */ else ilen=len; /* ...otherwise we trust you supply a correct length. */ if(in!=NULL && out!=NULL && ilen>0 && tfdata!=NULL) { /* if we got usable stuff, we'll do it. */ if(*out==NULL) /* if OUT points to a NULL pointer... */ *out=TwoFishAlloc(ilen,binhex,true,tfdata); /* ...we'll (re-)allocate buffer space. */ if(*out!=NULL) { if(binhex) { /* if binhex... */ _TwoFish_BinHex(in,ilen,false); /* ...convert input to values... */ ilen/=2; /* ...and size half as much. */ } _TwoFish_ResetCBC(tfdata); /* reset the CBC flag. */ tbuf=(u_int8_t *)malloc(ilen+TwoFish_BLOCK_SIZE); /* get memory for data and header. */ if(tbuf==NULL) return 0; tfdata->output=tbuf; /* set output to temp buffer. */ olen=_TwoFish_CryptRawCBC(in,tbuf,ilen,true,tfdata)-TwoFish_BLOCK_SIZE; /* decrypt the whole thing. */ memcpy(&(tfdata->header),tbuf,TwoFish_BLOCK_SIZE); /* copy first block into header. */ tfdata->output=*out; for(elen=0; elenheader.magic[elen]!=cmagic[elen]) break; if(elen==TwoFish_MAGIC_LEN) { /* if magic matches then... */ elen=(tfdata->header.length[0]) | (tfdata->header.length[1])<<8 | (tfdata->header.length[2])<<16 | (tfdata->header.length[3])<<24; /* .. we know how much to expect. */ if(elen>olen) /* adjust if necessary. */ elen=olen; memcpy(*out,tbuf+TwoFish_BLOCK_SIZE,elen); /* copy data into intended output. */ free(tbuf); return elen; } free(tbuf); } } return 0; } void _TwoFish_PrecomputeMDSmatrix(void) /* precompute the TwoFish_MDS matrix */ { u_int32_t m1[2]; u_int32_t mX[2]; u_int32_t mY[2]; u_int32_t i, j; for (i = 0; i < 256; i++) { j = TwoFish_P[0][i] & 0xFF; /* compute all the matrix elements */ m1[0] = j; mX[0] = TwoFish_Mx_X( j ) & 0xFF; mY[0] = TwoFish_Mx_Y( j ) & 0xFF; j = TwoFish_P[1][i] & 0xFF; m1[1] = j; mX[1] = TwoFish_Mx_X( j ) & 0xFF; mY[1] = TwoFish_Mx_Y( j ) & 0xFF; TwoFish_MDS[0][i] = m1[TwoFish_P_00] | /* fill matrix w/ above elements */ mX[TwoFish_P_00] << 8 | mY[TwoFish_P_00] << 16 | mY[TwoFish_P_00] << 24; TwoFish_MDS[1][i] = mY[TwoFish_P_10] | mY[TwoFish_P_10] << 8 | mX[TwoFish_P_10] << 16 | m1[TwoFish_P_10] << 24; TwoFish_MDS[2][i] = mX[TwoFish_P_20] | mY[TwoFish_P_20] << 8 | m1[TwoFish_P_20] << 16 | mY[TwoFish_P_20] << 24; TwoFish_MDS[3][i] = mX[TwoFish_P_30] | m1[TwoFish_P_30] << 8 | mY[TwoFish_P_30] << 16 | mX[TwoFish_P_30] << 24; } TwoFish_MDSready=true; } void _TwoFish_MakeSubKeys(TWOFISH *tfdata) /* Expand a user-supplied key material into a session key. */ { u_int32_t k64Cnt = TwoFish_KEY_LENGTH / 8; u_int32_t k32e[4]; /* even 32-bit entities */ u_int32_t k32o[4]; /* odd 32-bit entities */ u_int32_t sBoxKey[4]; u_int32_t offset,i,j; u_int32_t A, B, q=0; u_int32_t k0,k1,k2,k3; u_int32_t b0,b1,b2,b3; /* split user key material into even and odd 32-bit entities and */ /* compute S-box keys using (12, 8) Reed-Solomon code over GF(256) */ for (offset=0,i=0,j=k64Cnt-1; i<4 && offsetkey[offset++]; k32e[i]|= tfdata->key[offset++]<<8; k32e[i]|= tfdata->key[offset++]<<16; k32e[i]|= tfdata->key[offset++]<<24; k32o[i] = tfdata->key[offset++]; k32o[i]|= tfdata->key[offset++]<<8; k32o[i]|= tfdata->key[offset++]<<16; k32o[i]|= tfdata->key[offset++]<<24; sBoxKey[j] = _TwoFish_RS_MDS_Encode( k32e[i], k32o[i] ); /* reverse order */ } /* compute the round decryption subkeys for PHT. these same subkeys */ /* will be used in encryption but will be applied in reverse order. */ i=0; while(i < TwoFish_TOTAL_SUBKEYS) { A = _TwoFish_F32( k64Cnt, q, k32e ); /* A uses even key entities */ q += TwoFish_SK_BUMP; B = _TwoFish_F32( k64Cnt, q, k32o ); /* B uses odd key entities */ q += TwoFish_SK_BUMP; B = B << 8 | B >> 24; A += B; tfdata->subKeys[i++] = A; /* combine with a PHT */ A += B; tfdata->subKeys[i++] = A << TwoFish_SK_ROTL | A >> (32-TwoFish_SK_ROTL); } /* fully expand the table for speed */ k0 = sBoxKey[0]; k1 = sBoxKey[1]; k2 = sBoxKey[2]; k3 = sBoxKey[3]; for (i = 0; i < 256; i++) { b0 = b1 = b2 = b3 = i; switch (k64Cnt & 3) { case 1: /* 64-bit keys */ tfdata->sBox[ 2*i ] = TwoFish_MDS[0][(TwoFish_P[TwoFish_P_01][b0]) ^ TwoFish_b0(k0)]; tfdata->sBox[ 2*i+1] = TwoFish_MDS[1][(TwoFish_P[TwoFish_P_11][b1]) ^ TwoFish_b1(k0)]; tfdata->sBox[0x200+2*i ] = TwoFish_MDS[2][(TwoFish_P[TwoFish_P_21][b2]) ^ TwoFish_b2(k0)]; tfdata->sBox[0x200+2*i+1] = TwoFish_MDS[3][(TwoFish_P[TwoFish_P_31][b3]) ^ TwoFish_b3(k0)]; break; case 0: /* 256-bit keys (same as 4) */ b0 = (TwoFish_P[TwoFish_P_04][b0]) ^ TwoFish_b0(k3); b1 = (TwoFish_P[TwoFish_P_14][b1]) ^ TwoFish_b1(k3); b2 = (TwoFish_P[TwoFish_P_24][b2]) ^ TwoFish_b2(k3); b3 = (TwoFish_P[TwoFish_P_34][b3]) ^ TwoFish_b3(k3); case 3: /* 192-bit keys */ b0 = (TwoFish_P[TwoFish_P_03][b0]) ^ TwoFish_b0(k2); b1 = (TwoFish_P[TwoFish_P_13][b1]) ^ TwoFish_b1(k2); b2 = (TwoFish_P[TwoFish_P_23][b2]) ^ TwoFish_b2(k2); b3 = (TwoFish_P[TwoFish_P_33][b3]) ^ TwoFish_b3(k2); case 2: /* 128-bit keys */ tfdata->sBox[ 2*i ]= TwoFish_MDS[0][(TwoFish_P[TwoFish_P_01][(TwoFish_P[TwoFish_P_02][b0]) ^ TwoFish_b0(k1)]) ^ TwoFish_b0(k0)]; tfdata->sBox[ 2*i+1]= TwoFish_MDS[1][(TwoFish_P[TwoFish_P_11][(TwoFish_P[TwoFish_P_12][b1]) ^ TwoFish_b1(k1)]) ^ TwoFish_b1(k0)]; tfdata->sBox[0x200+2*i ]= TwoFish_MDS[2][(TwoFish_P[TwoFish_P_21][(TwoFish_P[TwoFish_P_22][b2]) ^ TwoFish_b2(k1)]) ^ TwoFish_b2(k0)]; tfdata->sBox[0x200+2*i+1]= TwoFish_MDS[3][(TwoFish_P[TwoFish_P_31][(TwoFish_P[TwoFish_P_32][b3]) ^ TwoFish_b3(k1)]) ^ TwoFish_b3(k0)]; } } } /** * Encrypt or decrypt exactly one block of plaintext in CBC mode. * Use "ciphertext stealing" technique described on pg. 196 * of "Applied Cryptography" to encrypt the final partial * (i.e. <16 byte) block if necessary. * * jojo: the "ciphertext stealing" requires we read ahead and have * special handling for the last two blocks. Because of this, the * output from the TwoFish algorithm is handled internally here. * It would be better to have a higher level handle this as well as * CBC mode. Unfortunately, I've mixed the two together, which is * pretty crappy... The Java version separates these out correctly. * * fknobbe: I have reduced the CBC mode to work on memory buffer only. * Higher routines should use an intermediate buffer and handle * their output seperately (mainly so the data can be flushed * in one chunk, not seperate 16 byte blocks...) * * @param in The plaintext. * @param out The ciphertext * @param size how much to encrypt * @param tfdata: Pointer to the global data structure containing session keys. * @return none */ void _TwoFish_BlockCrypt(u_int8_t *in,u_int8_t *out,unsigned long size,int decrypt,TWOFISH *tfdata) { u_int8_t PnMinusOne[TwoFish_BLOCK_SIZE]; u_int8_t CnMinusOne[TwoFish_BLOCK_SIZE]; u_int8_t CBCplusCprime[TwoFish_BLOCK_SIZE]; u_int8_t Pn[TwoFish_BLOCK_SIZE]; u_int8_t *p,*pout; unsigned long i; /* here is where we implement CBC mode and cipher block stealing */ if(size==TwoFish_BLOCK_SIZE) { /* if we are encrypting, CBC means we XOR the plain text block with the */ /* previous cipher text block before encrypting */ if(!decrypt && tfdata->qBlockDefined) { for(p=in,i=0; iqBlockCrypt[i]; /* FK: I'm copying the xor'ed input into Pn... */ } else memcpy(Pn,in,TwoFish_BLOCK_SIZE); /* FK: same here. we work of Pn all the time. */ /* TwoFish block level encryption or decryption */ _TwoFish_BlockCrypt16(Pn,out,decrypt,tfdata); /* if we are decrypting, CBC means we XOR the result of the decryption */ /* with the previous cipher text block to get the resulting plain text */ if(decrypt && tfdata->qBlockDefined) { for (p=out,i=0; iqBlockPlain[i]; } /* save the input and output blocks, since CBC needs these for XOR */ /* operations */ _TwoFish_qBlockPush(Pn,out,tfdata); } else { /* cipher block stealing, we are at Pn, */ /* but since Cn-1 must now be replaced with CnC' */ /* we pop it off, and recalculate Cn-1 */ if(decrypt) { /* We are on an odd block, and had to do cipher block stealing, */ /* so the PnMinusOne has to be derived differently. */ /* First we decrypt it into CBC and C' */ _TwoFish_qBlockPop(CnMinusOne,PnMinusOne,tfdata); _TwoFish_BlockCrypt16(CnMinusOne,CBCplusCprime,decrypt,tfdata); /* we then xor the first few bytes with the "in" bytes (Cn) */ /* to recover Pn, which we put in out */ for(p=in,pout=out,i=0; iprevCipher[i]; /* So at this point, out has PnMinusOne */ _TwoFish_qBlockPush(CnMinusOne,PnMinusOne,tfdata); _TwoFish_FlushOutput(tfdata->qBlockCrypt,TwoFish_BLOCK_SIZE,tfdata); _TwoFish_FlushOutput(out,size,tfdata); } else { _TwoFish_qBlockPop(PnMinusOne,CnMinusOne,tfdata); memset(Pn,0,TwoFish_BLOCK_SIZE); memcpy(Pn,in,size); for(i=0; iqBlockCrypt,TwoFish_BLOCK_SIZE,tfdata); _TwoFish_FlushOutput(CnMinusOne,size,tfdata); /* old Cn-1 becomes new partial Cn */ } tfdata->qBlockDefined=false; } } void _TwoFish_qBlockPush(u_int8_t *p,u_int8_t *c,TWOFISH *tfdata) { if(tfdata->qBlockDefined) _TwoFish_FlushOutput(tfdata->qBlockCrypt,TwoFish_BLOCK_SIZE,tfdata); memcpy(tfdata->prevCipher,tfdata->qBlockPlain,TwoFish_BLOCK_SIZE); memcpy(tfdata->qBlockPlain,p,TwoFish_BLOCK_SIZE); memcpy(tfdata->qBlockCrypt,c,TwoFish_BLOCK_SIZE); tfdata->qBlockDefined=true; } void _TwoFish_qBlockPop(u_int8_t *p,u_int8_t *c,TWOFISH *tfdata) { memcpy(p,tfdata->qBlockPlain,TwoFish_BLOCK_SIZE ); memcpy(c,tfdata->qBlockCrypt,TwoFish_BLOCK_SIZE ); tfdata->qBlockDefined=false; } /* Reset's the CBC flag and zero's PrevCipher (through qBlockPlain) (important) */ void _TwoFish_ResetCBC(TWOFISH *tfdata) { tfdata->qBlockDefined=false; memset(tfdata->qBlockPlain,0,TwoFish_BLOCK_SIZE); } void _TwoFish_FlushOutput(u_int8_t *b,unsigned long len,TWOFISH *tfdata) { unsigned long i; for(i=0; idontflush; i++) *tfdata->output++ = *b++; tfdata->dontflush=false; } void _TwoFish_BlockCrypt16(u_int8_t *in,u_int8_t *out,bool decrypt,TWOFISH *tfdata) { u_int32_t x0,x1,x2,x3; u_int32_t k,t0,t1,R; x0=*in++; x0|=(*in++ << 8 ); x0|=(*in++ << 16); x0|=(*in++ << 24); x1=*in++; x1|=(*in++ << 8 ); x1|=(*in++ << 16); x1|=(*in++ << 24); x2=*in++; x2|=(*in++ << 8 ); x2|=(*in++ << 16); x2|=(*in++ << 24); x3=*in++; x3|=(*in++ << 8 ); x3|=(*in++ << 16); x3|=(*in++ << 24); if(decrypt) { x0 ^= tfdata->subKeys[4]; /* swap input and output whitening keys when decrypting */ x1 ^= tfdata->subKeys[5]; x2 ^= tfdata->subKeys[6]; x3 ^= tfdata->subKeys[7]; k = 7+(TwoFish_ROUNDS*2); for (R = 0; R < TwoFish_ROUNDS; R += 2) { t0 = _TwoFish_Fe320( tfdata->sBox, x0); t1 = _TwoFish_Fe323( tfdata->sBox, x1); x3 ^= t0 + (t1<<1) + tfdata->subKeys[k--]; x3 = x3 >> 1 | x3 << 31; x2 = x2 << 1 | x2 >> 31; x2 ^= t0 + t1 + tfdata->subKeys[k--]; t0 = _TwoFish_Fe320( tfdata->sBox, x2); t1 = _TwoFish_Fe323( tfdata->sBox, x3); x1 ^= t0 + (t1<<1) + tfdata->subKeys[k--]; x1 = x1 >> 1 | x1 << 31; x0 = x0 << 1 | x0 >> 31; x0 ^= t0 + t1 + tfdata->subKeys[k--]; } x2 ^= tfdata->subKeys[0]; x3 ^= tfdata->subKeys[1]; x0 ^= tfdata->subKeys[2]; x1 ^= tfdata->subKeys[3]; } else { x0 ^= tfdata->subKeys[0]; x1 ^= tfdata->subKeys[1]; x2 ^= tfdata->subKeys[2]; x3 ^= tfdata->subKeys[3]; k = 8; for (R = 0; R < TwoFish_ROUNDS; R += 2) { t0 = _TwoFish_Fe320( tfdata->sBox, x0); t1 = _TwoFish_Fe323( tfdata->sBox, x1); x2 ^= t0 + t1 + tfdata->subKeys[k++]; x2 = x2 >> 1 | x2 << 31; x3 = x3 << 1 | x3 >> 31; x3 ^= t0 + (t1<<1) + tfdata->subKeys[k++]; t0 = _TwoFish_Fe320( tfdata->sBox, x2); t1 = _TwoFish_Fe323( tfdata->sBox, x3); x0 ^= t0 + t1 + tfdata->subKeys[k++]; x0 = x0 >> 1 | x0 << 31; x1 = x1 << 1 | x1 >> 31; x1 ^= t0 + (t1<<1) + tfdata->subKeys[k++]; } x2 ^= tfdata->subKeys[4]; x3 ^= tfdata->subKeys[5]; x0 ^= tfdata->subKeys[6]; x1 ^= tfdata->subKeys[7]; } *out++ = (u_int8_t)(x2 ); *out++ = (u_int8_t)(x2 >> 8); *out++ = (u_int8_t)(x2 >> 16); *out++ = (u_int8_t)(x2 >> 24); *out++ = (u_int8_t)(x3 ); *out++ = (u_int8_t)(x3 >> 8); *out++ = (u_int8_t)(x3 >> 16); *out++ = (u_int8_t)(x3 >> 24); *out++ = (u_int8_t)(x0 ); *out++ = (u_int8_t)(x0 >> 8); *out++ = (u_int8_t)(x0 >> 16); *out++ = (u_int8_t)(x0 >> 24); *out++ = (u_int8_t)(x1 ); *out++ = (u_int8_t)(x1 >> 8); *out++ = (u_int8_t)(x1 >> 16); *out++ = (u_int8_t)(x1 >> 24); } /** * Use (12, 8) Reed-Solomon code over GF(256) to produce a key S-box * 32-bit entity from two key material 32-bit entities. * * @param k0 1st 32-bit entity. * @param k1 2nd 32-bit entity. * @return Remainder polynomial generated using RS code */ u_int32_t _TwoFish_RS_MDS_Encode(u_int32_t k0,u_int32_t k1) { u_int32_t i,r; for(r=k1,i=0; i<4; i++) /* shift 1 byte at a time */ TwoFish_RS_rem(r); r ^= k0; for(i=0; i<4; i++) TwoFish_RS_rem(r); return r; } u_int32_t _TwoFish_F32(u_int32_t k64Cnt,u_int32_t x,u_int32_t *k32) { u_int8_t b0,b1,b2,b3; u_int32_t k0,k1,k2,k3,result = 0; b0=TwoFish_b0(x); b1=TwoFish_b1(x); b2=TwoFish_b2(x); b3=TwoFish_b3(x); k0=k32[0]; k1=k32[1]; k2=k32[2]; k3=k32[3]; switch (k64Cnt & 3) { case 1: /* 64-bit keys */ result = TwoFish_MDS[0][(TwoFish_P[TwoFish_P_01][b0] & 0xFF) ^ TwoFish_b0(k0)] ^ TwoFish_MDS[1][(TwoFish_P[TwoFish_P_11][b1] & 0xFF) ^ TwoFish_b1(k0)] ^ TwoFish_MDS[2][(TwoFish_P[TwoFish_P_21][b2] & 0xFF) ^ TwoFish_b2(k0)] ^ TwoFish_MDS[3][(TwoFish_P[TwoFish_P_31][b3] & 0xFF) ^ TwoFish_b3(k0)]; break; case 0: /* 256-bit keys (same as 4) */ b0 = (TwoFish_P[TwoFish_P_04][b0] & 0xFF) ^ TwoFish_b0(k3); b1 = (TwoFish_P[TwoFish_P_14][b1] & 0xFF) ^ TwoFish_b1(k3); b2 = (TwoFish_P[TwoFish_P_24][b2] & 0xFF) ^ TwoFish_b2(k3); b3 = (TwoFish_P[TwoFish_P_34][b3] & 0xFF) ^ TwoFish_b3(k3); case 3: /* 192-bit keys */ b0 = (TwoFish_P[TwoFish_P_03][b0] & 0xFF) ^ TwoFish_b0(k2); b1 = (TwoFish_P[TwoFish_P_13][b1] & 0xFF) ^ TwoFish_b1(k2); b2 = (TwoFish_P[TwoFish_P_23][b2] & 0xFF) ^ TwoFish_b2(k2); b3 = (TwoFish_P[TwoFish_P_33][b3] & 0xFF) ^ TwoFish_b3(k2); case 2: /* 128-bit keys (optimize for this case) */ result = TwoFish_MDS[0][(TwoFish_P[TwoFish_P_01][(TwoFish_P[TwoFish_P_02][b0] & 0xFF) ^ TwoFish_b0(k1)] & 0xFF) ^ TwoFish_b0(k0)] ^ TwoFish_MDS[1][(TwoFish_P[TwoFish_P_11][(TwoFish_P[TwoFish_P_12][b1] & 0xFF) ^ TwoFish_b1(k1)] & 0xFF) ^ TwoFish_b1(k0)] ^ TwoFish_MDS[2][(TwoFish_P[TwoFish_P_21][(TwoFish_P[TwoFish_P_22][b2] & 0xFF) ^ TwoFish_b2(k1)] & 0xFF) ^ TwoFish_b2(k0)] ^ TwoFish_MDS[3][(TwoFish_P[TwoFish_P_31][(TwoFish_P[TwoFish_P_32][b3] & 0xFF) ^ TwoFish_b3(k1)] & 0xFF) ^ TwoFish_b3(k0)]; break; } return result; } u_int32_t _TwoFish_Fe320(u_int32_t *lsBox,u_int32_t x) { return lsBox[ TwoFish_b0(x)<<1 ]^ lsBox[ ((TwoFish_b1(x)<<1)|1)]^ lsBox[0x200+ (TwoFish_b2(x)<<1) ]^ lsBox[0x200+((TwoFish_b3(x)<<1)|1)]; } u_int32_t _TwoFish_Fe323(u_int32_t *lsBox,u_int32_t x) { return lsBox[ (TwoFish_b3(x)<<1) ]^ lsBox[ ((TwoFish_b0(x)<<1)|1)]^ lsBox[0x200+ (TwoFish_b1(x)<<1) ]^ lsBox[0x200+((TwoFish_b2(x)<<1)|1)]; } u_int32_t _TwoFish_Fe32(u_int32_t *lsBox,u_int32_t x,u_int32_t R) { return lsBox[ 2*TwoFish__b(x,R ) ]^ lsBox[ 2*TwoFish__b(x,R+1)+1]^ lsBox[0x200+2*TwoFish__b(x,R+2) ]^ lsBox[0x200+2*TwoFish__b(x,R+3)+1]; } #endif sagan-1.1.2/src/output-plugins/sagan-syslog.h0000644000175000017500000000220412770372750020144 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-syslog.c * * Send Sagan alerts to a remote syslog server using the same format that * Snort uses. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_Alert_Syslog( _SaganEvent * ); sagan-1.1.2/src/output-plugins/sagan-esmtp.h0000644000175000017500000000266412770372750017766 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-esmtp.h */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef HAVE_LIBESMTP #define ESMTPTO 32 /* 'To' buffer size max */ #define ESMTPFROM 32 /* 'From' buffer size max */ #define ESMTPSERVER 32 /* SMTP server size max */ #define MAX_EMAILSIZE 15360 /* Largest e-mail that can be sent */ const char *esmtp_cb (void **, int *, void *); int Sagan_ESMTP_Thread( _SaganEvent * ); int fixlf(_SaganConfig *, char *, char *); #endif sagan-1.1.2/src/output-plugins/sagan-unified2.h0000644000175000017500000001274312770372750020342 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* sagan-unified2.h */ #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) #include #include #define UNIFIED2_PACKET 2 #define UNIFIED2_IDS_EVENT 7 #define UNIFIED2_EXTRA_DATA 110 #define SAGAN_SNPRINTF_ERROR -1 #define SAGAN_SNPRINTF_TRUNCATION 1 #define SAGAN_SNPRINTF_SUCCESS 0 #define SAFEMEM_SUCCESS 1 #define IP_MAXPACKET 65535 /* maximum packet size */ #define SAFEMEM_ERROR 0 #define SAFEMEM_SUCCESS 1 #define ERRORRET return SAFEMEM_ERROR; #define MAX_XFF_WRITE_BUF_LENGTH (sizeof(Serial_Unified2_Header) + \ sizeof(Unified2ExtraDataHdr) + sizeof(SerialUnified2ExtraData) \ + sizeof(struct in6_addr)) #define DECODE_BLEN 65535 #define EVENT_TYPE_EXTRA_DATA 4 void Sagan_Unified2( _SaganEvent * ); void Sagan_Unified2LogPacketAlert( _SaganEvent * ); void Unified2InitFile( void ); int SaganSnprintf(char *buf, size_t buf_size, const char *format, ...); void *SaganAlloc( unsigned long ); void Unified2CleanExit( void ); void Sagan_WriteExtraData( _SaganEvent *, int ); /* Data structure used for serialization of Unified2 Records */ typedef struct _Serial_Unified2_Header { uint32_t type; uint32_t length; } Serial_Unified2_Header; //UNIFIED2_PACKET = type 2 typedef struct _Serial_Unified2Packet { uint32_t sensor_id; uint32_t event_id; uint32_t event_second; uint32_t packet_second; uint32_t packet_microsecond; uint32_t linktype; uint32_t packet_length; uint8_t packet_data[4]; } Serial_Unified2Packet; //---------------LEGACY, type '7' //These structures are not used anymore in the product typedef struct _Serial_Unified2IDSEvent_legacy { uint32_t sensor_id; uint32_t event_id; uint32_t event_second; uint32_t event_microsecond; uint32_t signature_id; uint32_t generator_id; uint32_t signature_revision; uint32_t classification_id; uint32_t priority_id; uint32_t ip_source; uint32_t ip_destination; uint16_t sport_itype; uint16_t dport_icode; uint8_t protocol; uint8_t impact_flag;//sets packet_action uint8_t impact; uint8_t blocked; } Serial_Unified2IDSEvent_legacy; /* Not used 'yet'. - Champ Clark III - 02/14/2011 */ /* typedef struct _Serial_Unified2IDSEventIPv6_legacy { uint32_t sensor_id; uint32_t event_id; uint32_t event_second; uint32_t event_microsecond; uint32_t signature_id; uint32_t generator_id; uint32_t signature_revision; uint32_t classification_id; uint32_t priority_id; struct in6_addr ip_source; struct in6_addr ip_destination; uint16_t sport_itype; uint16_t dport_icode; uint8_t protocol; uint8_t impact_flag; uint8_t impact; uint8_t blocked; } Serial_Unified2IDSEventIPv6_legacy; */ /* The below is from packet.h from Snort */ struct sf_timeval32 { uint32_t tv_sec; /* seconds */ uint32_t tv_usec; /* microseconds */ }; typedef struct _Event { uint32_t sig_generator; /* which part of snort generated the alert? */ uint32_t sig_id; /* sig id for this generator */ uint32_t sig_rev; /* sig revision for this id */ uint32_t classification; /* event classification */ uint32_t priority; /* event priority */ uint32_t event_id; /* event ID */ uint32_t event_reference; /* reference to other events that have gone off, * such as in the case of tagged packets... */ struct sf_timeval32 ref_time; /* reference time for the event reference */ } Event; typedef enum _EventDataType { EVENT_DATA_TYPE_BLOB = 1, EVENT_DATA_TYPE_MAX } EventDataType; //UNIFIED2_EXTRA_DATA - type 110 typedef struct _SerialUnified2ExtraData { uint32_t sensor_id; uint32_t event_id; uint32_t event_second; uint32_t type; /* EventInfo */ uint32_t data_type; /*EventDataType */ uint32_t blob_length; /* Length of the data + sizeof(blob_length) + sizeof(data_type)*/ } SerialUnified2ExtraData; typedef struct _Unified2ExtraDataHdr { uint32_t event_type; uint32_t event_length; } Unified2ExtraDataHdr; typedef enum _EventInfoEnum { EVENT_INFO_XFF_IPV4 = 1, EVENT_INFO_XFF_IPV6, EVENT_INFO_REVIEWED_BY, EVENT_INFO_GZIP_DATA, EVENT_INFO_SMTP_FILENAME, EVENT_INFO_SMTP_MAILFROM, EVENT_INFO_SMTP_RCPTTO, EVENT_INFO_SMTP_EMAIL_HDRS, EVENT_INFO_HTTP_URI, EVENT_INFO_HTTP_HOSTNAME, EVENT_INFO_IPV6_SRC, EVENT_INFO_IPV6_DST, EVENT_INFO_JSNORM_DATA } EventInfoEnum; #endif sagan-1.1.2/src/output-plugins/sagan-external.c0000644000175000017500000001056212770372750020447 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-external.c * * Threaded function for user defined external system (execl) calls. This * allows sagan to pass information to a external program. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "version.h" #include "sagan-lockfile.h" #include "sagan-references.h" #include "sagan-config.h" #include "output-plugins/sagan-external.h" struct _Rule_Struct *rulestruct; struct _SaganDebug *debug; struct _SaganConfig *config; pthread_mutex_t ext_mutex = PTHREAD_MUTEX_INITIALIZER; void Sagan_Ext_Thread ( _SaganEvent *Event, char *execute_script ) { int in[2]; int out[2]; int n, pid; char buf[MAX_SYSLOGMSG]; char data[MAX_SYSLOGMSG]; char *tmpref = NULL; char tmp[6]; if ( debug->debugexternal ) { Sagan_Log(S_WARN, "[%s, line %d] In sagan_ext_thread()", __FILE__, __LINE__); } tmpref = Reference_Lookup( Event->found, 1 ); if ( Event->drop == 1 ) { snprintf(tmp, sizeof(tmp), "True"); } else { snprintf(tmp, sizeof(tmp), "False"); } snprintf(data, sizeof(data), "\n\ ID:%lu:%s\n\ Message:%s\n\ Classification:%s\n\ Drop:%s\n\ Priority:%d\n\ Date:%s\n\ Time:%s\n\ Source:%s\n\ Source Port:%d\n\ Destination:%s\n\ Destination Port:%d\n\ Facility:%s\n\ Syslog Priority:%s\n\ %sSyslog message:%s\n"\ \ ,Event->generatorid\ ,Event->sid,\ Event->f_msg,\ Event->class,\ tmp,\ Event->pri,\ Event->date,\ Event->time,\ Event->ip_src,\ Event->src_port,\ Event->ip_dst,\ Event->dst_port,\ Event->facility,\ Event->priority,\ tmpref,\ Event->message); pthread_mutex_lock( &ext_mutex ); if ( pipe(in) < 0 ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] Cannot create input pipe!", __FILE__, __LINE__); } if ( pipe(out) < 0 ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] Cannot create output pipe!", __FILE__, __LINE__); } pid=fork(); if ( pid < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot create external program process", __FILE__, __LINE__); } else if ( pid == 0 ) { /* Causes problems with alert.log */ close(0); close(1); close(2); dup2(in[0],0); // Stdin.. dup2(out[1],1); dup2(out[1],2); close(in[1]); close(out[0]); //ret=execl(config->sagan_extern, config->sagan_extern, NULL, (char *)NULL); //execl(config->sagan_extern, config->sagan_extern, NULL, (char *)NULL); execl(execute_script, execute_script, NULL, (char *)NULL); Remove_Lock_File(); Sagan_Log(S_WARN, "[%s, line %d] Cannot execute %s", __FILE__, __LINE__, config->sagan_extern); } close(in[0]); close(out[1]); /* Write to child input */ n = write(in[1], data, strlen(data)); close(in[1]); n = read(out[0], buf, sizeof(buf)); close(out[0]); buf[n] = 0; waitpid(pid, NULL, 0); pthread_mutex_unlock( &ext_mutex ); if ( debug->debugexternal == 1 ) { Sagan_Log(S_DEBUG, "[%s, line %d] Executed %s", __FILE__, __LINE__, config->sagan_extern); } } sagan-1.1.2/src/output-plugins/sagan-twofish.h0000644000175000017500000002404312770372750020314 0ustar champchamp/* $Id: twofish.h,v 2.1 2008/12/15 20:36:05 fknobbe Exp $ * * * Copyright (C) 1997-2000 The Cryptix Foundation Limited. * Copyright (C) 2000 Farm9. * Copyright (C) 2001 Frank Knobbe. * All rights reserved. * * For Cryptix code: * Use, modification, copying and distribution of this software is subject * the terms and conditions of the Cryptix General Licence. You should have * received a copy of the Cryptix General Licence along with this library; * if not, you can download a copy from http://www.cryptix.org/ . * * For Farm9: * --- jojo@farm9.com, August 2000, converted from Java to C++, added CBC mode and * ciphertext stealing technique, added AsciiTwofish class for easy encryption * decryption of text strings * * Frank Knobbe : * --- April 2001, converted from C++ to C, prefixed global variables * with TwoFish, substituted some defines, changed functions to make use of * variables supplied in a struct, modified and added routines for modular calls. * Cleaned up the code so that defines are used instead of fixed 16's and 32's. * Created two general purpose crypt routines for one block and multiple block * encryption using Joh's CBC code. * Added crypt routines that use a header (with a magic and data length). * (Basically a major rewrite). * * Note: Routines labeled _TwoFish are private and should not be used * (or with extreme caution). * */ #ifndef __TWOFISH_LIBRARY_HEADER__ #define __TWOFISH_LIBRARY_HEADER__ #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE !FALSE #endif #ifndef bool #define bool int #endif /* Constants */ #define TwoFish_DEFAULT_PW "SnortHas2FishEncryptionRoutines!" /* default password (not more than 32 chars) */ #define TwoFish_MAGIC "TwoFish" /* to indentify a successful decryption */ enum { TwoFish_KEY_SIZE = 256, /* Valid values: 64, 128, 192, 256 */ /* User 256, other key sizes have not been tested. */ /* (But should work. I substituted as much as */ /* I could with this define.) */ TwoFish_ROUNDS = 16, TwoFish_BLOCK_SIZE = 16, /* bytes in a data-block */ TwoFish_KEY_LENGTH = TwoFish_KEY_SIZE/8, /* 32= 256-bit key */ TwoFish_TOTAL_SUBKEYS = 4+4+2*TwoFish_ROUNDS, TwoFish_MAGIC_LEN = TwoFish_BLOCK_SIZE-8, TwoFish_SK_BUMP = 0x01010101, TwoFish_SK_ROTL = 9, TwoFish_P_00 = 1, TwoFish_P_01 = 0, TwoFish_P_02 = 0, TwoFish_P_03 = TwoFish_P_01 ^ 1, TwoFish_P_04 = 1, TwoFish_P_10 = 0, TwoFish_P_11 = 0, TwoFish_P_12 = 1, TwoFish_P_13 = TwoFish_P_11 ^ 1, TwoFish_P_14 = 0, TwoFish_P_20 = 1, TwoFish_P_21 = 1, TwoFish_P_22 = 0, TwoFish_P_23 = TwoFish_P_21 ^ 1, TwoFish_P_24 = 0, TwoFish_P_30 = 0, TwoFish_P_31 = 1, TwoFish_P_32 = 1, TwoFish_P_33 = TwoFish_P_31 ^ 1, TwoFish_P_34 = 1, TwoFish_GF256_FDBK = 0x169, TwoFish_GF256_FDBK_2 = 0x169 / 2, TwoFish_GF256_FDBK_4 = 0x169 / 4, TwoFish_RS_GF_FDBK = 0x14D, /* field generator */ TwoFish_MDS_GF_FDBK = 0x169 /* primitive polynomial for GF(256) */ }; /* Global data structure for callers */ typedef struct { u_int32_t sBox[4 * 256]; /* Key dependent S-box */ u_int32_t subKeys[TwoFish_TOTAL_SUBKEYS]; /* Subkeys */ u_int8_t key[TwoFish_KEY_LENGTH]; /* Encryption Key */ u_int8_t *output; /* Pointer to output buffer */ u_int8_t qBlockPlain[TwoFish_BLOCK_SIZE]; /* Used by CBC */ u_int8_t qBlockCrypt[TwoFish_BLOCK_SIZE]; u_int8_t prevCipher[TwoFish_BLOCK_SIZE]; struct { /* Header for crypt functions. Has to be at least one block long. */ u_int32_t salt; /* Random salt in first block (will salt the rest through CBC) */ u_int8_t length[4]; /* The amount of data following the header */ u_int8_t magic[TwoFish_MAGIC_LEN]; /* Magic to identify successful decryption */ } header; bool qBlockDefined; bool dontflush; } TWOFISH; #ifndef __TWOFISH_LIBRARY_SOURCE__ extern bool TwoFish_srand; /* if set to TRUE (default), first call of TwoFishInit will seed rand(); */ /* call of TwoFishInit */ #endif /**** Public Functions ****/ /* TwoFish Initialization * * This routine generates a global data structure for use with TwoFish, * initializes important values (such as subkeys, sBoxes), generates subkeys * and precomputes the MDS matrix if not already done. * * Input: User supplied password (will be appended by default password of 'SnortHas2FishEncryptionRoutines!') * * Output: Pointer to TWOFISH structure. This data structure contains key dependent data. * This pointer is used with all other crypt functions. */ TWOFISH *TwoFishInit(char *userkey); /* TwoFish Destroy * * Nothing else but a free... * * Input: Pointer to the TwoFish structure. * */ void TwoFishDestroy(TWOFISH *tfdata); /* TwoFish Alloc * * Allocates enough memory for the output buffer as required. * * Input: Length of the plaintext. * Boolean flag for BinHex Output. * Pointer to the TwoFish structure. * * Output: Returns a pointer to the memory allocated. */ void *TwoFishAlloc(unsigned long len,bool binhex,bool decrypt,TWOFISH *tfdata); /* TwoFish Free * * Free's the allocated buffer. * * Input: Pointer to the TwoFish structure * * Output: (none) */ void TwoFishFree(TWOFISH *tfdata); /* TwoFish Set Output * * If you want to allocate the output buffer yourself, * then you can set it with this function. * * Input: Pointer to your output buffer * Pointer to the TwoFish structure * * Output: (none) */ void TwoFishSetOutput(char *outp,TWOFISH *tfdata); /* TwoFish Raw Encryption * * Does not use header, but does use CBC (if more than one block has to be encrypted). * * Input: Pointer to the buffer of the plaintext to be encrypted. * Pointer to the buffer receiving the ciphertext. * The length of the plaintext buffer. * The TwoFish structure. * * Output: The amount of bytes encrypted if successful, otherwise 0. */ unsigned long TwoFishEncryptRaw(char *in,char *out,unsigned long len,TWOFISH *tfdata); /* TwoFish Raw Decryption * * Does not use header, but does use CBC (if more than one block has to be decrypted). * * Input: Pointer to the buffer of the ciphertext to be decrypted. * Pointer to the buffer receiving the plaintext. * The length of the ciphertext buffer (at least one cipher block). * The TwoFish structure. * * Output: The amount of bytes decrypted if successful, otherwise 0. */ unsigned long TwoFishDecryptRaw(char *in,char *out,unsigned long len,TWOFISH *tfdata); /* TwoFish Encryption * * Uses header and CBC. If the output area has not been intialized with TwoFishAlloc, * this routine will alloc the memory. In addition, it will include a small 'header' * containing the magic and some salt. That way the decrypt routine can check if the * packet got decrypted successfully, and return 0 instead of garbage. * * Input: Pointer to the buffer of the plaintext to be encrypted. * Pointer to the pointer to the buffer receiving the ciphertext. * The pointer either points to user allocated output buffer space, or to NULL, in which case * this routine will set the pointer to the buffer allocated through the struct. * The length of the plaintext buffer. * Can be -1 if the input is a null terminated string, in which case we'll count for you. * Boolean flag for BinHex Output (if used, output will be twice as large as input). * Note: BinHex conversion overwrites (converts) input buffer! * The TwoFish structure. * * Output: The amount of bytes encrypted if successful, otherwise 0. */ unsigned long TwoFishEncrypt(char *in,char **out,signed long len,bool binhex,TWOFISH *tfdata); /* TwoFish Decryption * * Uses header and CBC. If the output area has not been intialized with TwoFishAlloc, * this routine will alloc the memory. In addition, it will check the small 'header' * containing the magic. If magic does not match we return 0. Otherwise we return the * amount of bytes decrypted (should be the same as the length in the header). * * Input: Pointer to the buffer of the ciphertext to be decrypted. * Pointer to the pointer to the buffer receiving the plaintext. * The pointer either points to user allocated output buffer space, or to NULL, in which case * this routine will set the pointer to the buffer allocated through the struct. * The length of the ciphertext buffer. * Can be -1 if the input is a null terminated binhex string, in which case we'll count for you. * Boolean flag for BinHex Input (if used, plaintext will be half as large as input). * Note: BinHex conversion overwrites (converts) input buffer! * The TwoFish structure. * * Output: The amount of bytes decrypted if successful, otherwise 0. */ unsigned long TwoFishDecrypt(char *in,char **out,signed long len,bool binhex,TWOFISH *tfdata); /**** Private Functions ****/ u_int8_t TwoFish__b(u_int32_t x,int n); void _TwoFish_BinHex(u_int8_t *buf,unsigned long len,bool bintohex); unsigned long _TwoFish_CryptRawCBC(char *in,char *out,unsigned long len,bool decrypt,TWOFISH *tfdata); unsigned long _TwoFish_CryptRaw16(char *in,char *out,unsigned long len,bool decrypt,TWOFISH *tfdata); unsigned long _TwoFish_CryptRaw(char *in,char *out,unsigned long len,bool decrypt,TWOFISH *tfdata); void _TwoFish_PrecomputeMDSmatrix(void); void _TwoFish_MakeSubKeys(TWOFISH *tfdata); void _TwoFish_qBlockPush(u_int8_t *p,u_int8_t *c,TWOFISH *tfdata); void _TwoFish_qBlockPop(u_int8_t *p,u_int8_t *c,TWOFISH *tfdata); void _TwoFish_ResetCBC(TWOFISH *tfdata); void _TwoFish_FlushOutput(u_int8_t *b,unsigned long len,TWOFISH *tfdata); void _TwoFish_BlockCrypt(u_int8_t *in,u_int8_t *out,unsigned long size,int decrypt,TWOFISH *tfdata); void _TwoFish_BlockCrypt16(u_int8_t *in,u_int8_t *out,bool decrypt,TWOFISH *tfdata); u_int32_t _TwoFish_RS_MDS_Encode(u_int32_t k0,u_int32_t k1); u_int32_t _TwoFish_F32(u_int32_t k64Cnt,u_int32_t x,u_int32_t *k32); u_int32_t _TwoFish_Fe320(u_int32_t *lsBox,u_int32_t x); u_int32_t _TwoFish_Fe323(u_int32_t *lsBox,u_int32_t x); u_int32_t _TwoFish_Fe32(u_int32_t *lsBox,u_int32_t x,u_int32_t R); #endif sagan-1.1.2/src/sagan-meta-content.h0000644000175000017500000000203212770372750016202 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif int Sagan_Meta_Content_Search(char *, int, int); sagan-1.1.2/src/sagan-gen-msg.h0000644000175000017500000000244012770372750015144 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif /* Storage for sagan-gen-msg.map */ typedef struct _Sagan_Processor_Generator _Sagan_Processor_Generator; struct _Sagan_Processor_Generator { unsigned long generatorid; unsigned long alertid; char generator_msg[512]; }; void Load_Gen_Map( const char * ); char *Sagan_Generator_Lookup( int, int ); sagan-1.1.2/src/sagan-util.c0000644000175000017500000010117612770372750014565 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-util.c * * Various re-usable functions. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-config.h" #include "sagan-lockfile.h" #include "parsers/sagan-strstr/sagan-strstr-hook.h" #include "version.h" struct _SaganConfig *config; struct _SaganCounters *counters; struct _SaganVar *var; struct _Sagan_Processor_Generator *generator; sbool daemonize; sbool quiet; /***************************************************************************** * This force Sagan to chroot. * * * * Note: printf/fprints are used, because we actually chroot before the log * * it initalized * *****************************************************************************/ void Sagan_Chroot(const char *chrootdir ) { printf("[*] Chroot to %s\n", chrootdir); if (chroot(chrootdir) != 0 || chdir ("/") != 0) { fprintf(stderr, "[E] Could not chroot to '%s'.\n", chrootdir); exit(1); /* sagan.log isn't open yet */ } } /************************************************ * Drop priv's so we aren't running as "root". * ************************************************/ void Sagan_Droppriv(void) { struct stat fifocheck; struct passwd *pw = NULL; int ret; pw = getpwnam(config->sagan_runas); if (!pw) { Sagan_Log(S_ERROR, "Couldn't locate user '%s'. Aborting...", config->sagan_runas); } if ( getuid() == 0 ) { Sagan_Log(S_NORMAL, "Dropping privileges [UID: %lu GID: %lu]", (unsigned long)pw->pw_uid, (unsigned long)pw->pw_gid); /* * We chown certain log files to our Sagan user. This is done so no files are "owned" * by "root". This prevents problems in the future when doing things like handling * SIGHUP's and what not. * * Champ Clark (04/14/2015) */ if ( config->sagan_is_file == 0 ) { /* Don't change ownsership/etc if we're processing a file */ ret = chown(config->sagan_fifo, (unsigned long)pw->pw_uid,(unsigned long)pw->pw_gid); if ( ret < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot change ownership of %s to username %s - %s", __FILE__, __LINE__, config->sagan_fifo, config->sagan_runas, strerror(errno)); } if (stat(config->sagan_fifo, &fifocheck) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open %s FIFO - %s!", __FILE__, __LINE__, config->sagan_fifo, strerror(errno)); } } if (initgroups(pw->pw_name, pw->pw_gid) != 0 || setgid(pw->pw_gid) != 0 || setuid(pw->pw_uid) != 0) { Sagan_Log(S_ERROR, "[%s, line %d] Could not drop privileges to uid: %lu gid: %lu - %s!", __FILE__, __LINE__, (unsigned long)pw->pw_uid, (unsigned long)pw->pw_gid, strerror(errno)); } } else { Sagan_Log(S_NORMAL, "Not dropping privileges. Already running as a non-privileged user"); } } /***************************************************************/ /* Convert syslog data to hex for input into the payload table */ /***************************************************************/ char *fasthex(char *xdata, int length) { char conv[] = "0123456789ABCDEF"; char *retbuf = NULL; char *index; char *end; char *ridx; index = xdata; end = xdata + length; retbuf = (char *) calloc((length*2)+1, sizeof(char)); if ( retbuf == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for retbuf. Abort!", __FILE__, __LINE__); } ridx = retbuf; while(index < end) { *ridx++ = conv[((*index & 0xFF)>>4)]; *ridx++ = conv[((*index & 0xFF)&0x0F)]; index++; } return(retbuf); } /* Remove new-lines */ char *Remove_Return(char *s) { char *s1, *s2; for(s1 = s2 = s; *s1; *s1++ = *s2++ ) while( *s2 == '\n' )s2++; return s; } /* Removes spaces from certain rule fields, etc */ char *Remove_Spaces(char *s) { char *s1, *s2; for(s1 = s2 = s; *s1; *s1++ = *s2++ ) while( *s2 == ' ')s2++; return s; } /* Shift a string to all uppercase */ char *To_UpperC(char *const s) { char* cur = s; while (*cur) { *cur = toupper(*cur); ++cur; } return s; } /* Shift a string to all lowercase */ char *To_LowerC(char *const s) { char* cur = s; while (*cur) { *cur = tolower(*cur); ++cur; } return s; } void Sagan_Log (int type, const char *format,... ) { char buf[5128]; va_list ap; va_start(ap, format); char *chr="*"; char curtime[64]; time_t t; struct tm *now; t = time(NULL); now=localtime(&t); strftime(curtime, sizeof(curtime), "%m/%d/%Y %H:%M:%S", now); if ( type == 1 ) { chr="E"; } if ( type == 2 ) { chr="W"; } if ( type == 3 ) { chr="D"; } vsnprintf(buf, sizeof(buf), format, ap); fprintf(config->sagan_log_stream, "[%s] [%s] - %s\n", chr, curtime, buf); fflush(config->sagan_log_stream); if ( config->daemonize == 0 && config->quiet == 0 ) { printf("[%s] %s\n", chr, buf); } if ( type == 1 ) { exit(1); } } int Check_Endian() { int i = 1; char *p = (char *) &i; if (p[0] == 1) // Lowest address contains the least significant byte return 0; // Little endian else return 1; // Big endian } /* Converts IP address. For IPv4, we convert the quad IP string to a 32 bit * value. We return the unsigned long value as a pointer to a string because * that's the way IPv6 is done. Basically, we'll probably want IPv6 when * snort supports DB IPv6. */ uint32_t IP2Bit (char *ipaddr) { struct sockaddr_in ipv4; static __thread uint32_t ip; /* Change to AF_UNSPEC for future ipv6 */ /* Champ Clark III - 01/18/2011 */ if (!inet_pton(AF_INET, ipaddr, &ipv4.sin_addr)) { Sagan_Log(S_WARN, "Warning: Got a inet_pton() error for \"%s\" but continuing...", ipaddr); } if ( config->endian == 0 ) { ip = htonl(ipv4.sin_addr.s_addr); } else { ip = ipv4.sin_addr.s_addr; } return(ip); } /* Check if string contains only numbers */ int Is_Numeric (char *str) { if(strlen(str) == strspn(str, "0123456789")) { return(true); } else { return(false); } } /* Grab's information between "quotes" and returns it. Use for things like * parsing msg: and pcre */ char *Between_Quotes(char *instring) { sbool flag=0; int i; char tmp1[2]; static __thread char tmp2[512]; memset(tmp2,0,sizeof(tmp2)); for ( i=0; isagan_host); } if ( config->disable_dns_warnings == 0 ) { Sagan_Log(S_WARN, "--------------------------------------------------------------------------"); Sagan_Log(S_WARN, "Sagan DNS lookup need for '%s'.", host); Sagan_Log(S_WARN, "This can affect performance. Please see:" ); Sagan_Log(S_WARN, "https://wiki.quadrantsec.com/bin/view/Main/SaganDNS"); Sagan_Log(S_WARN, "--------------------------------------------------------------------------"); } memset(&hints, 0, sizeof hints); hints.ai_family = AF_UNSPEC; // AF_INET or AF_INET6 to force version hints.ai_socktype = SOCK_STREAM; if ((status = getaddrinfo(host, NULL, &hints, &res)) != 0) { Sagan_Log(S_WARN, "%s: %s", gai_strerror(status), host); return "0"; } if (res->ai_family == AF_INET) { // IPv4 struct sockaddr_in *ipv4 = (struct sockaddr_in *)res->ai_addr; addr = &(ipv4->sin_addr); } else { // IPv6 struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)res->ai_addr; addr = &(ipv6->sin6_addr); } inet_ntop(res->ai_family, addr, ipstr, sizeof ipstr); free(res); return(ipstr); } /* String replacement function. Used for things like $RULE_PATH */ char *Replace_String(char *str, char *orig, char *rep) { static __thread char buffer[4096]; memset(buffer,0,sizeof(buffer)); char *p; if(!(p = strstr(str, orig))) { return str; } strlcpy(buffer, str, p-str); buffer[p-str] = '\0'; sprintf(buffer+(p-str), "%s%s", rep, p+strlen(orig)); return(buffer); } /* Get the filename from a path */ char *Get_Filename(char *file) { char *pfile = NULL; pfile = file + strlen(file); for (; pfile > file; pfile--) { if ((*pfile == '\\') || (*pfile == '/')) { /* *nix/Windows */ pfile++; break; } } return(pfile); } /****************************************************************************/ /* s_rfc1918 */ /* */ /* Checks to see if an ip address is RFC1918 or not */ /****************************************************************************/ sbool is_rfc1918 ( uint32_t ipint ) { if ( ipint > 167772160 && ipint < 184549375 ) { /* 10.X.X.X */ return(true); } if ( ipint > 3232235520 && ipint < 3232301055 ) { /* 192.168.X.X */ return(true); } if ( ipint > 2886729728 && ipint < 2887778303 ) { /* 172.16/31.X.X */ return(true); } if ( ipint > 2851995648 && ipint < 2852061183 ) { /* 169.254.X.X Link Local */ return(true); } if ( ipint == 2130706433 ) { /* 127.0.0.1 */ return(true); } /* Invalid IP addresses */ if ( ipint < 16777216 ) { /* Must be larger than than 1.0.0.0 */ return(false); } return(false); } /****************************************************************************/ /* Sagan_Var_To_Value - Changes a variable in a configuration file (for */ /* example - $RULE_PATH into it's true value. */ /****************************************************************************/ char *Sagan_Var_To_Value(char *instring) { char *ptmp = NULL; char *tok = NULL; char tmp2[MAX_VAR_VALUE_SIZE] = { 0 }; char tmp3[MAX_VAR_VALUE_SIZE] = { 0 }; char tmp_result[MAX_VAR_VALUE_SIZE] = { 0 }; static __thread char tmp[MAX_VAR_VALUE_SIZE] = { 0 }; char *tmpbuf = (char*)malloc(MAX_VAR_VALUE_SIZE); memset(tmpbuf,0,(sizeof((char*)tmpbuf))); int i=0; snprintf(tmp, sizeof(tmp), "%s", instring); // Segfault with strlcpy for (i=0; ivar_count; i++) { ptmp = strtok_r(tmp, " ", &tok); while (ptmp != NULL ) { strlcpy(tmp2, Replace_String(ptmp, var[i].var_name, var[i].var_value), sizeof(tmp2)); snprintf(tmp3, sizeof(tmp3), "%s ", tmp2); strlcat(tmp_result, tmp3, sizeof(tmp_result)); ptmp = strtok_r(NULL, " ", &tok); } strlcpy(tmp, tmp_result, sizeof(tmp)); tmpbuf = (char*)&tmp; memset(tmp_result, 0, sizeof(tmp_result)); } return(tmpbuf); } /****************************************************************************/ /* Sagan_Validate_HEX - Makes sure a string is valid hex. */ /****************************************************************************/ int Sagan_Validate_HEX (const char *string) { const char *curr = string; while (*curr != 0) { if (('A' <= *curr && *curr <= 'F') || ('a' <= *curr && *curr <= 'f') || ('0' <= *curr && *curr <= '9')) { ++curr; } else { return(false); } } return(true); } /****************************************************************************/ /* Sagan_Check_Var - Checks to make sure a "var" is present in memory */ /****************************************************************************/ int Sagan_Check_Var(const char *string) { int i; int flag = 0; for (i=0; ivar_count; i++) { if (!strcmp(string, var[i].var_name)) { flag = 1; break; } } return(flag); } /************************************************************************************************ * This is for |HEX| support (like in Snort). From example: content: "User |3a 3c 53| and such"; * If the content has no pipes, we leave it unaltered. If it has pipes, we insert the ASCII * values of the Hex within the content (keeping formating correct - Champ Clark - 12/04/2013 * Move to this function 05/05/2014 - Champ Clark *************************************************************************************************/ char *Sagan_Content_Pipe(char *in_string, int linecount, const char *ruleset) { int pipe_flag = 0; static char final_content[512] = { 0 }; memset(final_content,0,sizeof(final_content)); char final_content_tmp[512] = { 0 }; char tmp2[512]; int i; int x; char tmp[2]; strlcpy(tmp2, in_string, sizeof(tmp2)); pipe_flag = 0; for ( i=0; isagan_runas); if( pw == NULL) { fprintf(stderr, "[E] [%s, line %d] Invalid user %s (use -u option to set a user)\n", __FILE__, __LINE__, config->sagan_runas); exit(1); } if ( type == SAGAN_LOG || type == ALL_LOGS ) { /* For SIGHUP */ if ( state == REOPEN ) { fclose(config->sagan_log_stream); } if ((config->sagan_log_stream = fopen(config->sagan_log_filepath, "a")) == NULL) { fprintf(stderr, "[E] [%s, line %d] Cannot open %s - %s!\n", __FILE__, __LINE__, config->sagan_log_filepath, strerror(errno)); exit(1); } /* Chown the log files in case we get a SIGHUP or whatnot later (due to Sagan_Chroot()) */ ret = chown(config->sagan_log_filepath, (unsigned long)pw->pw_uid,(unsigned long)pw->pw_gid); if ( ret < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot change ownership of %s to username %s - %s", __FILE__, __LINE__, config->sagan_log_filepath, config->sagan_runas, strerror(errno)); } } if ( type == ALERT_LOG || type == ALL_LOGS ) { /* For SIGHUP */ if ( state == REOPEN ) { fclose(config->sagan_alert_stream); } if (( config->sagan_alert_stream = fopen(config->sagan_alert_filepath, "a" )) == NULL ) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] Can't open %s - %s!", __FILE__, __LINE__, config->sagan_alert_filepath, strerror(errno)); } /* Chown the log files in case we get a SIGHUP or whatnot later (due to Sagan_Chroot()) */ ret = chown(config->sagan_alert_filepath, (unsigned long)pw->pw_uid,(unsigned long)pw->pw_gid); if ( ret < 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot change ownership of %s to username %s - %s", __FILE__, __LINE__, config->sagan_alert_filepath, config->sagan_runas, strerror(errno)); } } } /**************************************************************************** * Sagan_Set_Pipe_Size - Changes the capacity of the pipe/FIFO. ****************************************************************************/ #if defined(F_GETPIPE_SZ) && defined(F_SETPIPE_SZ) void Sagan_Set_Pipe_Size ( FILE *fd ) { int fd_int; int current_fifo_size; int fd_results; if ( config->sagan_fifo_size != 0 ) { fd_int = fileno(fd); current_fifo_size = fcntl(fd_int, F_GETPIPE_SZ); if ( current_fifo_size == config->sagan_fifo_size ) { Sagan_Log(S_NORMAL, "FIFO capacity already set to %d bytes.", config->sagan_fifo_size); } else { Sagan_Log(S_NORMAL, "FIFO capacity is %d bytes. Changing to %d bytes.", current_fifo_size, config->sagan_fifo_size); fd_results = fcntl(fd_int, F_SETPIPE_SZ, config->sagan_fifo_size ); if ( fd_results == -1 ) { Sagan_Log(S_WARN, "FIFO capacity could not be changed. Continuing anyways..."); } if ( fd_results > config->sagan_fifo_size ) { Sagan_Log(S_WARN, "FIFO capacity was rounded up to the next page size of %d bytes.", fd_results); } } } } #endif char *Sagan_Return_Date( uintmax_t utime ) { struct tm tm; static __thread char time_buf[80]; char tmp[80]; char *return_date = NULL; memset(&tm, 0, sizeof(struct tm)); snprintf(tmp, sizeof(tmp) - 1, "%lu", utime); strptime(tmp, "%s", &tm); strftime(time_buf, sizeof(time_buf), "%F", &tm); return_date = (char*)&time_buf; return(return_date); } char *Sagan_Return_Time( uintmax_t utime ) { struct tm tm; static __thread char time_buf[80]; char tmp[80]; char *return_date = NULL; memset(&tm, 0, sizeof(struct tm)); snprintf(tmp, sizeof(tmp) - 1, "%lu", utime); strptime(tmp, "%s", &tm); strftime(time_buf, sizeof(time_buf), "%T", &tm); return_date = (char*)&time_buf; return(return_date); } /**************************************************************************** * Sagan_u32_Time_To_Human - Converts a 32/64 bit epoch time into a human * "readable" format. ****************************************************************************/ char *Sagan_u32_Time_To_Human ( uintmax_t utime ) { struct tm tm; static __thread char time_buf[80]; char tmp[80]; char *return_time = NULL; memset(&tm, 0, sizeof(struct tm)); snprintf(tmp, sizeof(tmp) - 1, "%lu", utime); strptime(tmp, "%s", &tm); strftime(time_buf, sizeof(time_buf), "%b %d %H:%M:%S %Y", &tm); return_time = (char*)&time_buf; return(return_time); } /**************************************************************************** * Sagan_File_Lock - Takes in a file descriptor and "locks" the file. Used * with IPC/memory mapped files. ****************************************************************************/ sbool Sagan_File_Lock ( int fd ) { struct flock fl; fl.l_type = F_WRLCK; fl.l_whence = SEEK_SET; fl.l_start = 0; fl.l_len = 0; fl.l_pid = getpid(); if (fcntl(fd, F_SETLKW, &fl) == -1) { Sagan_Log(S_WARN, "[%s, line %d] Unable to get LOCK on file. (%s)", __FILE__, __LINE__, strerror(errno)); } return(0); } /**************************************************************************** * Sagan_File_Unlock - Takes in a file descriptor and "unlocks" the file. * Used with IPC/memory mapped files. ****************************************************************************/ sbool Sagan_File_Unlock( int fd ) { struct flock fl; fl.l_type = F_UNLCK; fl.l_whence = SEEK_SET; fl.l_start = 0; fl.l_len = 0; fl.l_pid = getpid(); if (fcntl(fd, F_SETLK, &fl) == -1) { Sagan_Log(S_WARN, "[%s, line %d] Unable to get UNLOCK on file. (%s)", __FILE__, __LINE__, strerror(errno)); } return(0); } /**************************************************************************** * Bit2IP - Takes a 32 bit IP address and returns an octet notation ****************************************************************************/ char *Bit2IP(uint32_t ip_u32) { char *return_ip = NULL; struct in_addr ip_addr_convert; static __thread char retbuf[20]; memset(retbuf,0,sizeof(retbuf)); ip_addr_convert.s_addr = htonl(ip_u32); strlcpy(retbuf, inet_ntoa(ip_addr_convert), sizeof(retbuf)); return_ip = (char*)&retbuf; return(return_ip); } /****************************************/ /* Compute netmask address given prefix */ /****************************************/ in_addr_t Netmask( int prefix ) { if ( prefix == 0 || prefix == 32 ) return( ~((in_addr_t) -1) ); else return( ~((1 << (32 - prefix)) - 1) ); } /* netmask() */ /******************************************************/ /* Compute broadcast address given address and prefix */ /******************************************************/ in_addr_t Broadcast( in_addr_t addr, int prefix ) { return( addr | ~Netmask(prefix) ); } /* broadcast() */ /****************************************************/ /* Compute network address given address and prefix */ /****************************************************/ in_addr_t Network( in_addr_t addr, int prefix ) { return( addr & Netmask(prefix) ); } /* network() */ /*************************************************************/ /* Convert an A.B.C.D address into a 32-bit host-order value */ /*************************************************************/ in_addr_t A_To_Hl( char *ipstr ) { struct in_addr in; if ( !inet_aton(ipstr, &in) ) { Sagan_Log(S_ERROR, "[E] Invalid address %s!\n", ipstr ); } return( ntohl(in.s_addr) ); } /* a_to_hl() */ /*******************************************************************/ /* convert a network address char string into a host-order network */ /* address and an integer prefix value */ /*******************************************************************/ network_addr_t Str_To_Netaddr( char *ipstr ) { long int prefix = 32; char *prefixstr; network_addr_t netaddr; if ( (prefixstr = strchr(ipstr, '/')) ) { *prefixstr = '\0'; prefixstr++; prefix = strtol( prefixstr, (char **) NULL, 10 ); if ( errno || (*prefixstr == '\0') || (prefix < 1) || (prefix > 32) ) { Sagan_Log(S_ERROR, "[E]: Invalid IP %s/%s in your config file var declaration!\n", ipstr, prefixstr ); } if ( (prefix < 8) ) { Sagan_Log(S_WARN, "[W]: Your wildcard for '%s' is less than 8, is this really what you want?", ipstr ); } } netaddr.pfx = (int) prefix; netaddr.addr = Network( A_To_Hl(ipstr), prefix ); return( netaddr ); } /* str_to_netaddr() */ /***************************************************************************/ /* Convert an IP or IP/CIDR into 32bit decimal single IP or 32bit decimal */ /* IP low and high range */ /***************************************************************************/ char *Netaddr_To_Range( char ipstr[21] ) { network_addr_t *netaddrs = NULL; uint32_t lo, hi; char *t; char my_str[50]; char my_str2[101]; static __thread char result[101]; char tmp[512]; char tmp2[512]; if ( ( t = strchr(ipstr, '/') ) ) { netaddrs = realloc( netaddrs, 2 * sizeof(network_addr_t) ); netaddrs[0] = Str_To_Netaddr( ipstr ); lo = netaddrs[0].addr; hi = Broadcast( netaddrs[0].addr, netaddrs[0].pfx ); if(lo != hi) { snprintf(tmp , sizeof(tmp), "%lu-", (unsigned long)lo); snprintf(tmp2 , sizeof(tmp2), "%lu", (unsigned long)hi); strlcpy(my_str, tmp, sizeof(my_str)); strlcpy(my_str2, tmp2, sizeof(my_str2)); strcat(my_str, my_str2); sprintf( result, "%s", my_str); return(result); } else { snprintf( result, sizeof(result), "%lu", (unsigned long)lo); return(result); } } else { snprintf( result, sizeof(result), "%lu", (unsigned long)IP2Bit(ipstr)); return(result); } } /* netaddr_to_range() */ /**********************************/ /* Strip characters from a string */ /**********************************/ char *Strip_Chars(const char *string, const char *chars) { char * newstr = malloc(strlen(string) + 1); int counter = 0; for ( ; *string; string++) { if (!strchr(chars, *string)) { newstr[ counter ] = *string; ++ counter; } } newstr[counter] = 0; return newstr; } /***************************************************/ /* Check if str is valid IP from decimal or dotted */ /* quad ( 167772160, 1.1.1.1, 192.168.192.168/28 ) */ /***************************************************/ sbool Is_IP (char *str) { char *tmp; char *ip; int prefix; struct in_addr addr; if(strlen(str) == strspn(str, "0123456789./")) { if(strspn(str, "./") == 0) { if ( inet_aton(Bit2IP(atol(str)), &addr) == 0 ) { return(false); } } if ( strchr(str, '/') ) { ip = strtok_r(str, "/", &tmp); prefix = atoi(strtok_r(NULL, "/", &tmp)); if(inet_aton(ip, &addr) == 0 || prefix < 1 || prefix > 32) { return(false); } } else { if ( inet_aton(str, &addr) == 0 ) { return(false); } } return(true); } else { return(false); } } /*************************************************************/ /* Returns the numbers of seconds. For example, "1 hour" == */ /* 3600 */ /*************************************************************/ uintmax_t Sagan_Value_To_Seconds(char *type, uintmax_t number) { /* Covers both plural and non-plural (ie - minute/minutes) */ if (Sagan_strstr(type, "second")) { return(number); } if (Sagan_strstr(type, "minute")) { return(number * 60); } if (Sagan_strstr(type, "hour")) { return(number * 60 * 60); } if (Sagan_strstr(type, "day")) { return(number * 60 * 60 * 24); } if (Sagan_strstr(type, "week")) { return(number * 60 * 60 * 24 * 7); } if (Sagan_strstr(type, "month")) { return(number * 60 * 60 * 24 * 7 * 4); } if (Sagan_strstr(type, "year")) { return(number * 60 * 60 * 24 * 365); } Sagan_Log(S_WARN, "'%s' type is unknown!", type); return(0); } sagan-1.1.2/src/sagan-lockfile.c0000644000175000017500000001004312770372750015370 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-lockfile.c * * Creates a lock file for the Sagan process. We don't want Sagan to be * running more than once. Also does a simple 'test' to see if the PID * in the lock file is 'running' (via kill -0). Wrote this to decrease * the dependancies of Sagan, as opposed to using liblockfile. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-lockfile.h" #include "sagan-config.h" #include "version.h" struct _SaganConfig *config; /* Was using liblockfile but decided for portability reasons, it was a * bad idea */ void checklockfile ( void ) { char buf[10]; FILE *lck; int pid; struct stat lckcheck; /* Check for lockfile first */ if (stat(config->sagan_lockfile, &lckcheck) == 0 ) { /* Lock file is present, open for read */ if (( lck = fopen(config->sagan_lockfile, "r" )) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Lock file '%s' is present but can't be read [%s]", __FILE__, __LINE__, config->sagan_lockfile, strerror(errno)); } else { if (!fgets(buf, sizeof(buf), lck)) { Sagan_Log(S_ERROR, "[%s, line %d] Lock file (%s) is open for reading, but can't read contents.", __FILE__, __LINE__, config->sagan_lockfile); } fclose(lck); pid = atoi(buf); if ( pid == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Lock file read but pid value is zero. Aborting.....", __FILE__, __LINE__); } /* Check to see if process is running. We use kill with 0 signal * to determine this. We check this return value. Signal 0 * won't affect running processes */ if ( kill(pid, 0) != -1 ) { Sagan_Log(S_ERROR, "[%s, line %d] It appears that Sagan is already running (pid: %d).", __FILE__, __LINE__, pid); } else { Sagan_Log(S_NORMAL, "[%s, line %d] Lock file is present, but Sagan isn't at pid %d (Removing stale %s file)", __FILE__, __LINE__, pid, config->sagan_lockfile); if (unlink(config->sagan_lockfile)) { Sagan_Log(S_ERROR, "Unable to delete %s. ", config->sagan_lockfile); } } } } else { /* No lock file present, so create it */ if (( lck = fopen(config->sagan_lockfile, "w" )) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot create lock file (%s - %s)", __FILE__, __LINE__, config->sagan_lockfile, strerror(errno)); } else { fprintf(lck, "%d", getpid() ); fflush(lck); fclose(lck); } } } void Remove_Lock_File ( void ) { struct stat lckcheck; if ((stat(config->sagan_lockfile, &lckcheck) == 0) && unlink(config->sagan_lockfile) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot remove lock file (%s - %s)\n", __FILE__, __LINE__, config->sagan_lockfile, strerror(errno)); } } sagan-1.1.2/src/sagan-classifications.h0000644000175000017500000000241112770372750016763 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif /* Classification strucure */ typedef struct _Class_Struct _Class_Struct; struct _Class_Struct { unsigned s_size_class; char s_shortname[512]; char s_desc[512]; int s_priority; }; void Load_Classifications( const char * ); char *Sagan_Classtype_Lookup( const char *); sagan-1.1.2/src/sagan-classifications.c0000644000175000017500000001206112770372750016760 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-classifications.c * * Loads the classifications file into memory for future use. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "version.h" #include "sagan.h" #include "sagan-defs.h" #include "sagan-gen-msg.h" #include "sagan-classifications.h" struct _SaganCounters *counters; struct _Class_Struct *classstruct; struct _SaganDebug *debug; struct _SaganConfig *config; void Load_Classifications( const char *ruleset ) { FILE *classfile; char classbuf[CLASSBUF]; char *saveptr=NULL; char *tmptoken=NULL; char *laststring=NULL; char tmpbuf2[5]; int linecount=0; Sagan_Log(S_NORMAL, "Loading classifications.conf file. [%s]", ruleset); if (( classfile = fopen(ruleset, "r" )) == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open rule file (%s)", __FILE__, __LINE__, ruleset); } while(fgets(classbuf, sizeof(classbuf), classfile) != NULL) { linecount++; /* Skip comments and blank linkes */ if (classbuf[0] == '#' || classbuf[0] == 10 || classbuf[0] == ';' || classbuf[0] == 32) { continue; } else { /* Allocate memory for classifications, but not comments */ classstruct = (_Class_Struct *) realloc(classstruct, (counters->classcount+1) * sizeof(_Class_Struct)); if ( classstruct == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for classstruct. Abort!", __FILE__, __LINE__); } } strtok_r(classbuf, ":", &saveptr); tmptoken = strtok_r(NULL, ":" , &saveptr); laststring = strtok_r(tmptoken, ",", &saveptr); if ( laststring == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The file %s at line %d is improperly formated. Abort!", __FILE__, __LINE__, ruleset, linecount); } Remove_Spaces(laststring); strlcpy(classstruct[counters->classcount].s_shortname, laststring, sizeof(classstruct[counters->classcount].s_shortname)); laststring = strtok_r(NULL, ",", &saveptr); if ( laststring == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The file %s at line %d is improperly formated. Abort!", __FILE__, __LINE__, ruleset, linecount); } strlcpy(classstruct[counters->classcount].s_desc, laststring, sizeof(classstruct[counters->classcount].s_desc)); laststring = strtok_r(NULL, ",", &saveptr); if ( laststring == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] The file %s at line %d is improperly formated. Abort!", __FILE__, __LINE__, ruleset, linecount); } strlcpy(tmpbuf2, laststring, sizeof(tmpbuf2)); classstruct[counters->classcount].s_priority=atoi(tmpbuf2); if ( classstruct[counters->classcount].s_priority == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] Classification error at line number %d in %s", __FILE__, __LINE__, linecount, ruleset); } if (debug->debugload) { Sagan_Log(S_DEBUG, "[D-%d] Classification: %s|%s|%d", counters->classcount, classstruct[counters->classcount].s_shortname, classstruct[counters->classcount].s_desc, classstruct[counters->classcount].s_priority); } counters->classcount++; } fclose(classfile); Sagan_Log(S_NORMAL, "%d classifications loaded", counters->classcount); } /**************************************************************************** * Sagan_Classtype_Lookup - Simple routine that looks up the classtype * (s_shortname) and returns the classtype's description ****************************************************************************/ char *Sagan_Classtype_Lookup( const char *classtype) { int i; for (i = 0; i < counters->classcount; i++) { if (!strcmp(classtype, classstruct[i].s_shortname)) { return(classstruct[i].s_desc); } } return("UNKNOWN"); } sagan-1.1.2/src/sagan-ipc.h0000644000175000017500000000236612770372750014371 0ustar champchamp /* $Id$ */ /* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-ipc.c * * This allows Sagan to share data with other Sagan processes. This is for * Inter-process communications (IPC). * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_IPC_Init(void); sbool Sagan_Clean_IPC_Object( int ); void Sagan_IPC_Check_Object(char *, sbool, char *); sagan-1.1.2/src/sagan-config.h0000644000175000017500000001336512770372750015064 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif /* Sagan configuration struct (global) */ typedef struct _SaganConfig _SaganConfig; struct _SaganConfig { /* Non-dependent var's */ sbool sagan_reload; sbool daemonize; sbool quiet; const char *sagan_runas; char sagan_config[MAXPATH]; /* Master Sagan configuration file */ char sagan_alert_filepath[MAXPATH]; char sagan_interface[50]; FILE *sagan_alert_stream; char sagan_log_filepath[MAXPATH]; FILE *sagan_log_stream; char sagan_lockfile[MAXPATH]; char sagan_fifo[MAXPATH]; sbool sagan_is_file; /* FIFO or FILE */ char sagan_log_path[MAXPATH]; char sagan_rule_path[MAXPATH]; char sagan_host[MAXHOST]; char sagan_extern[MAXPATH]; char sagan_startutime[20]; /* Records utime at startup */ char home_net[MAXPATH]; char external_net[MAXPATH]; char sagan_droplistfile[MAXPATH]; /* Log lines to "ignore" */ sbool sagan_droplist_flag; sbool output_thread_flag; int max_processor_threads; sbool sagan_external_output_flag; /* For things like external, email, fwsam */ int sagan_port; sbool sagan_ext_flag; sbool disable_dns_warnings; sbool syslog_src_lookup; int sagan_proto; /* sbool home_any; */ /* 0 == no, 1 == yes */ /* sbool external_any; */ sbool endian; /* Processors */ int pp_sagan_track_clients; sbool sagan_track_clients_flag; sbool blacklist_flag; char blacklist_files[2048]; sbool perfmonitor_flag; int perfmonitor_time; char perfmonitor_file_name[MAXPATH]; FILE *perfmonitor_file_stream; sbool sagan_fwsam_flag; char sagan_fwsam_info[1024]; /* Syslog output */ sbool sagan_syslog_flag; int sagan_syslog_facility; int sagan_syslog_priority; int sagan_syslog_options; int shm_counters; int shm_flowbit; int shm_thresh_by_src; int shm_thresh_by_dst; int shm_thresh_by_dstport; int shm_thresh_by_srcport; int shm_thresh_by_username; int shm_after_by_src; int shm_after_by_dst; int shm_after_by_srcport; int shm_after_by_dstport; int shm_after_by_username; int shm_track_clients; /* IPC sizes for threshold, after, etc */ char ipc_directory[MAXPATH]; int max_flowbits; int max_threshold_by_src; int max_threshold_by_dst; int max_threshold_by_srcport; int max_threshold_by_dstport; int max_threshold_by_username; int max_after_by_src; int max_after_by_dst; int max_after_by_srcport; int max_after_by_dstport; int max_after_by_username; int max_track_clients; #ifdef HAVE_LIBPCAP char plog_interface[50]; char plog_logdev[50]; char plog_filter[256]; sbool plog_flag; int plog_promiscuous; #endif /* libesmtp/SMTP support */ #ifdef HAVE_LIBESMTP int min_email_priority; char sagan_esmtp_to[255]; sbool sagan_sendto_flag; char sagan_esmtp_from[255]; char sagan_esmtp_server[255]; sbool sagan_esmtp_flag; char sagan_email_subject[64]; #endif /* Prelude framework support */ #ifdef HAVE_LIBPRELUDE char sagan_prelude_profile[MAXPATH]; sbool sagan_prelude_flag; #endif /* libdnet - Used for unified2 support */ #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) char unified2_filepath[MAXPATH]; uint32_t unified2_timestamp; FILE *unified2_stream; unsigned int unified2_limit; unsigned int unified2_current; int unified2_nostamp; sbool sagan_unified2_flag; #endif /* Bluedot */ #ifdef WITH_BLUEDOT sbool bluedot_flag; char bluedot_device_id[64]; char bluedot_url[256]; char bluedot_auth[64]; char bluedot_cat[MAXPATH]; int bluedot_timeout; uintmax_t bluedot_max_cache; uintmax_t bluedot_last_time; /* For cache cleaning */ #endif /* Bro Intel Framework Support */ sbool brointel_flag; char brointel_files[2048]; /* For Maxmind GeoIP2 address lookup */ #ifdef HAVE_LIBMAXMINDDB MMDB_s geoip2; char geoip2_country_file[MAXPATH]; sbool have_geoip2; #endif /* Used for altering pipe size (if supported) */ #if defined(F_GETPIPE_SZ) && defined(F_SETPIPE_SZ) int sagan_fifo_size; #endif }; void Load_Config( void ); sagan-1.1.2/src/version.h0000644000175000017500000000003012770373020014165 0ustar champchamp#define VERSION "1.1.2" sagan-1.1.2/src/sagan-flowbit.c0000644000175000017500000006264112770372750015261 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* * sagan-flowbit.c - Functions used for tracking events over multiple log * lines. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-ipc.h" #include "sagan-flowbit.h" #include "sagan-rules.h" #include "sagan-config.h" #include "parsers/parsers.h" struct _SaganCounters *counters; struct _Rule_Struct *rulestruct; struct _SaganDebug *debug; struct _SaganConfig *config; pthread_mutex_t Flowbit_Mutex=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t CounterMutex; /* From sagan-engine.c */ struct _Sagan_IPC_Counters *counters_ipc; struct _Sagan_IPC_Flowbit *flowbit_ipc; /***************************************************************************** * Sagan_Flowbit_Condition - Used for testing "isset" & "isnotset". Full * rule condition is tested here and returned. *****************************************************************************/ int Sagan_Flowbit_Condition(int rule_position, char *ip_src_char, char *ip_dst_char ) { time_t t; struct tm *now; char timet[20]; char tmp[128] = { 0 }; char *tmp_flowbit_name = NULL; char *tok = NULL; int i; int a; uint32_t ip_src; uint32_t ip_dst; sbool flowbit_match = 0; int flowbit_total_match = 0; t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); ip_src = IP2Bit(ip_src_char); ip_dst = IP2Bit(ip_dst_char); int and_or = 0; Sagan_Flowbit_Cleanup(); for (i = 0; i < rulestruct[rule_position].flowbit_count; i++) { /******************* * ISSET * *******************/ if ( rulestruct[rule_position].flowbit_type[i] == 3 ) { for (a = 0; a < counters_ipc->flowbit_count; a++) { strlcpy(tmp, rulestruct[rule_position].flowbit_name[i], sizeof(tmp)); if (Sagan_strstr(rulestruct[rule_position].flowbit_name[i], "|")) { tmp_flowbit_name = strtok_r(tmp, "|", &tok); and_or = 1; } else { tmp_flowbit_name = strtok_r(tmp, "&", &tok); and_or = 0; /* Need this? */ } while (tmp_flowbit_name != NULL ) { if (!strcmp(tmp_flowbit_name, flowbit_ipc[a].flowbit_name) && flowbit_ipc[a].flowbit_state == 1 ) { /* direction: none */ if ( rulestruct[rule_position].flowbit_direction[i] == 0 ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"isset\" flowbit \"%s\" (direction: \"none\"). (any -> any)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name); } flowbit_total_match++; } /* direction: both */ if ( rulestruct[rule_position].flowbit_direction[i] == 1 && flowbit_ipc[a].ip_src == ip_src && flowbit_ipc[a].ip_dst == ip_dst ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"isset\" flowbit \"%s\" (direction: \"both\"). (%s -> %s)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_src_char, ip_dst_char); } flowbit_total_match++; } /* direction: by_src */ if ( rulestruct[rule_position].flowbit_direction[i] == 2 && flowbit_ipc[a].ip_src == ip_src ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"isset\" flowbit \"%s\" (direction: \"by_src\"). (%s -> any)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_src_char); } flowbit_total_match++; } /* direction: by_dst */ if ( rulestruct[rule_position].flowbit_direction[i] == 3 && flowbit_ipc[a].ip_dst == ip_dst ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"isset\" flowbit \"%s\" (direction: \"by_dst\"). (any -> %s)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_dst_char); } flowbit_total_match++; } /* direction: reverse */ if ( rulestruct[rule_position].flowbit_direction[i] == 4 && flowbit_ipc[a].ip_src == ip_dst && flowbit_ipc[a].ip_dst == ip_src ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"isset\" flowbit \"%s\" (direction: \"reverse\"). (%s -> %s)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_dst_char, ip_src_char); } flowbit_total_match++; } } /* End of strcmp flowbit_name & flowbit_state = 1 */ if ( and_or == 1) { tmp_flowbit_name = strtok_r(NULL, "|", &tok); } else { tmp_flowbit_name = strtok_r(NULL, "&", &tok); } } /* End of "while tmp_flowbit_name" */ } /* End of "for a" */ } /* End "if" flowbit_type == 3 (ISSET) */ /******************* * ISNOTSET * *******************/ if ( rulestruct[rule_position].flowbit_type[i] == 4 ) { flowbit_match = 0; for (a = 0; a < counters_ipc->flowbit_count; a++) { strlcpy(tmp, rulestruct[rule_position].flowbit_name[i], sizeof(tmp)); if (Sagan_strstr(rulestruct[rule_position].flowbit_name[i], "|")) { tmp_flowbit_name = strtok_r(tmp, "|", &tok); and_or = 1; } else { tmp_flowbit_name = strtok_r(tmp, "&", &tok); and_or = 0; /* Need this? */ } while (tmp_flowbit_name != NULL ) { if (!strcmp(tmp_flowbit_name, flowbit_ipc[a].flowbit_name)) { flowbit_match=1; if ( flowbit_ipc[a].flowbit_state == 0 ) { /* direction: none */ if ( rulestruct[rule_position].flowbit_direction[i] == 0 ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"isnotset\" flowbit \"%s\" (direction: \"none\"). (any -> any)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name); } flowbit_total_match++; } /* direction: both */ if ( rulestruct[rule_position].flowbit_direction[i] == 1 ) { if ( flowbit_ipc[a].ip_src == ip_src && flowbit_ipc[a].ip_dst == ip_dst ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"isnotset\" flowbit \"%s\" (direction: \"both\"). (%s -> %s)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_src_char, ip_dst_char); } flowbit_total_match++; } } /* direction: by_src */ if ( rulestruct[rule_position].flowbit_direction[i] == 2 ) { if ( flowbit_ipc[a].ip_src == ip_src ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"isnotset\" flowbit \"%s\" (direction: \"by_src\"). (%s -> any)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_src_char); } flowbit_total_match++; } } /* direction: by_dst */ if ( rulestruct[rule_position].flowbit_direction[i] == 3 ) { if ( flowbit_ipc[a].ip_dst == ip_dst ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"isnotset\" flowbit \"%s\" (direction: \"by_dst\"). (any -> %s)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_dst_char); } flowbit_total_match++; } } /* direction: reverse */ if ( rulestruct[rule_position].flowbit_direction[i] == 4 ) { if ( flowbit_ipc[a].ip_src == ip_dst && flowbit_ipc[a].ip_dst == ip_src ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"isnotset\" flowbit \"%s\" (direction: \"reverse\"). (%s -> %s)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_dst_char, ip_src_char); } flowbit_total_match++; } } } /* End flowbit_state == 0 */ } /* End of strcmp flowbit_name */ if ( and_or == 1) { tmp_flowbit_name = strtok_r(NULL, "|", &tok); } else { tmp_flowbit_name = strtok_r(NULL, "&", &tok); } } /* End of "while tmp_flowbit_name" */ } /* End of "for a" */ if ( and_or == 1 && flowbit_match == 1 ) { flowbit_total_match = rulestruct[rule_position].flowbit_condition_count; /* Do we even need this for OR? */ } if ( and_or == 0 && flowbit_match == 0 ) { flowbit_total_match = rulestruct[rule_position].flowbit_condition_count; } } /* End of "flowbit_type[i] == 4" */ } /* End of "for i" */ /* IF we match all criteria for isset/isnotset * * If we match the flowbit_conditon_count (number of concurrent flowbits) * we trigger. It it's an "or" statement, we trigger if any of the * flowbits are set. * */ if ( ( rulestruct[rule_position].flowbit_condition_count == flowbit_total_match ) || ( and_or == 1 && flowbit_total_match != 0 ) ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] Condition of flowbit returning TRUE. %d %d", __FILE__, __LINE__, rulestruct[rule_position].flowbit_condition_count, flowbit_total_match); } return(true); } /* isset/isnotset failed. */ if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] Condition of flowbit returning FALSE. %d %d", __FILE__, __LINE__, rulestruct[rule_position].flowbit_condition_count, flowbit_total_match); } return(false); } /* End of Sagan_Flowbit_Condition(); */ /***************************************************************************** * Sagan_Flowbit_Set - Used to "set" & "unset" flowbit. All rule "set" and * "unset" happen here. *****************************************************************************/ void Sagan_Flowbit_Set(int rule_position, char *ip_src_char, char *ip_dst_char ) { int i = 0; int a = 0; time_t t; struct tm *now; char timet[20]; char tmp[128] = { 0 }; char *tmp_flowbit_name = NULL; char *tok = NULL; sbool flowbit_match = 0; sbool flowbit_unset_match = 0; uint32_t ip_src = 0; uint32_t ip_dst = 0; ip_src = IP2Bit(ip_src_char); ip_dst = IP2Bit(ip_dst_char); t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); struct _Sagan_Flowbit_Track *flowbit_track; flowbit_track = malloc(sizeof(_Sagan_Flowbit_Track)); if ( flowbit_track == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for flowbit_track. Abort!", __FILE__, __LINE__); } memset(flowbit_track, 0, sizeof(_Sagan_Flowbit_Track)); int flowbit_track_count = 0; Sagan_Flowbit_Cleanup(); for (i = 0; i < rulestruct[rule_position].flowbit_count; i++) { /******************* * UNSET * *******************/ if ( rulestruct[rule_position].flowbit_type[i] == 2 ) { /* Flowbits & (ie - bit1&bit2) */ strlcpy(tmp, rulestruct[rule_position].flowbit_name[i], sizeof(tmp)); tmp_flowbit_name = strtok_r(tmp, "&", &tok); while( tmp_flowbit_name != NULL ) { for (a = 0; a < counters_ipc->flowbit_count; a++) { if ( !strcmp(tmp_flowbit_name, flowbit_ipc[a].flowbit_name )) { /* direction: none */ if ( rulestruct[rule_position].flowbit_direction[i] == 0 ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"unset\" flowbit \"%s\" (direction: \"none\"). (any -> any)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name); } Sagan_File_Lock(config->shm_flowbit); pthread_mutex_lock(&Flowbit_Mutex); flowbit_ipc[a].flowbit_state = 0; pthread_mutex_unlock(&Flowbit_Mutex); Sagan_File_Unlock(config->shm_flowbit); flowbit_unset_match = 1; } /* direction: both */ if ( rulestruct[rule_position].flowbit_direction[i] == 1 && flowbit_ipc[a].ip_src == ip_src && flowbit_ipc[a].ip_dst == ip_dst ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"unset\" flowbit \"%s\" (direction: \"both\"). (%s -> %s)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_src_char, ip_dst_char); } Sagan_File_Lock(config->shm_flowbit); pthread_mutex_lock(&Flowbit_Mutex); flowbit_ipc[a].flowbit_state = 0; pthread_mutex_unlock(&Flowbit_Mutex); Sagan_File_Unlock(config->shm_flowbit); flowbit_unset_match = 1; } /* direction: by_src */ if ( rulestruct[rule_position].flowbit_direction[i] == 2 && flowbit_ipc[a].ip_src == ip_src ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"unset\" flowbit \"%s\" (direction: \"by_src\"). (%s -> any)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_src_char); } Sagan_File_Lock(config->shm_flowbit); pthread_mutex_lock(&Flowbit_Mutex); flowbit_ipc[a].flowbit_state = 0; pthread_mutex_unlock(&Flowbit_Mutex); Sagan_File_Unlock(config->shm_flowbit); flowbit_unset_match = 1; } /* direction: by_dst */ if ( rulestruct[rule_position].flowbit_direction[i] == 3 && flowbit_ipc[a].ip_dst == ip_dst ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"unset\" flowbit \"%s\" (direction: \"by_dst\"). (any -> %s)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_dst_char); } Sagan_File_Lock(config->shm_flowbit); pthread_mutex_lock(&Flowbit_Mutex); flowbit_ipc[a].flowbit_state = 0; pthread_mutex_unlock(&Flowbit_Mutex); Sagan_File_Unlock(config->shm_flowbit); flowbit_unset_match = 1; } /* direction: reverse */ if ( rulestruct[rule_position].flowbit_direction[i] == 4 && flowbit_ipc[a].ip_dst == ip_src && flowbit_ipc[a].ip_src == ip_dst ) { if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] \"unset\" flowbit \"%s\" (direction: \"reverse\"). (%s -> %s)", __FILE__, __LINE__, flowbit_ipc[a].flowbit_name, ip_dst_char, ip_src_char); } Sagan_File_Lock(config->shm_flowbit); pthread_mutex_lock(&Flowbit_Mutex); flowbit_ipc[a].flowbit_state = 0; pthread_mutex_unlock(&Flowbit_Mutex); Sagan_File_Unlock(config->shm_flowbit); flowbit_unset_match = 1; } } } if ( debug->debugflowbit && flowbit_unset_match == 0 ) { Sagan_Log(S_DEBUG, "[%s, line %d] No flowbit found to \"unset\" for %s.", __FILE__, __LINE__, tmp_flowbit_name); } tmp_flowbit_name = strtok_r(NULL, "&", &tok); } } /* While & flowbits (ie - bit1&bit2) */ /******************* * SET * *******************/ if ( rulestruct[rule_position].flowbit_type[i] == 1 ) { flowbit_match = 0; /* Flowbits & (ie - bit1&bit2) */ strlcpy(tmp, rulestruct[rule_position].flowbit_name[i], sizeof(tmp)); tmp_flowbit_name = strtok_r(tmp, "&", &tok); while( tmp_flowbit_name != NULL ) { for (a = 0; a < counters_ipc->flowbit_count; a++) { /* Do we have the flowbit already in memory? If so, update the information */ if (!strcmp(flowbit_ipc[a].flowbit_name, tmp_flowbit_name) && flowbit_ipc[a].ip_src == ip_src && flowbit_ipc[a].ip_dst == ip_dst ) { Sagan_File_Lock(config->shm_flowbit); pthread_mutex_lock(&Flowbit_Mutex); flowbit_ipc[a].flowbit_date = atol(timet); flowbit_ipc[a].flowbit_expire = atol(timet) + rulestruct[rule_position].flowbit_timeout[i]; flowbit_ipc[a].flowbit_state = 1; if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] [%d] Updated via \"set\" for flowbit \"%s\", [%d]. New expire time is %d (%d) [%u -> %u]. ", __FILE__, __LINE__, a, tmp_flowbit_name, i, flowbit_ipc[i].flowbit_expire, rulestruct[rule_position].flowbit_timeout[i], flowbit_ipc[a].ip_src, flowbit_ipc[a].ip_dst); } pthread_mutex_unlock(&Flowbit_Mutex); Sagan_File_Unlock(config->shm_flowbit); flowbit_match = 1; } } /* If the flowbit isn't in memory, store it to be created later */ if ( flowbit_match == 0 ) { flowbit_track = ( _Sagan_Flowbit_Track * ) realloc(flowbit_track, (flowbit_track_count+1) * sizeof(_Sagan_Flowbit_Track)); if ( flowbit_track == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for flow_track. Abort!", __FILE__, __LINE__); } strlcpy(flowbit_track[flowbit_track_count].flowbit_name, tmp_flowbit_name, sizeof(flowbit_track[flowbit_track_count].flowbit_name)); flowbit_track[flowbit_track_count].flowbit_timeout = rulestruct[rule_position].flowbit_timeout[i]; flowbit_track_count++; } tmp_flowbit_name = strtok_r(NULL, "&", &tok); } /* While & flowbits (ie - bit1&bit2) */ } /* if flowbit_type == 1 */ } /* Out of for i loop */ /* Do we have any flowbits in memory that need to be created? */ if ( flowbit_track_count != 0 ) { for (i = 0; i < flowbit_track_count; i++) { if ( Sagan_Clean_IPC_Object(FLOWBIT) == 0 ) { Sagan_File_Lock(config->shm_flowbit); pthread_mutex_lock(&Flowbit_Mutex); flowbit_ipc[counters_ipc->flowbit_count].ip_src = ip_src; flowbit_ipc[counters_ipc->flowbit_count].ip_dst = ip_dst; flowbit_ipc[counters_ipc->flowbit_count].flowbit_date = atol(timet); flowbit_ipc[counters_ipc->flowbit_count].flowbit_expire = atol(timet) + flowbit_track[i].flowbit_timeout; flowbit_ipc[counters_ipc->flowbit_count].flowbit_state = 1; flowbit_ipc[counters_ipc->flowbit_count].expire = flowbit_track[i].flowbit_timeout; strlcpy(flowbit_ipc[counters_ipc->flowbit_count].flowbit_name, flowbit_track[i].flowbit_name, sizeof(flowbit_ipc[counters_ipc->flowbit_count].flowbit_name)); pthread_mutex_unlock(&Flowbit_Mutex); Sagan_File_Unlock(config->shm_flowbit); if ( debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] [%d] Created flowbit \"%s\" via \"set\" [%s -> %s],", __FILE__, __LINE__, counters_ipc->flowbit_count, flowbit_ipc[counters_ipc->flowbit_count].flowbit_name, ip_src_char, ip_dst_char); } Sagan_File_Lock(config->shm_counters); pthread_mutex_lock(&CounterMutex); counters_ipc->flowbit_count++; pthread_mutex_unlock(&CounterMutex); Sagan_File_Unlock(config->shm_counters); } } } free(flowbit_track); } /* End of Sagan_Flowbit_Set */ /***************************************************************************** * Sagan_Flowbit_Type - Defines the "type" of flowbit tracking based on user * input *****************************************************************************/ int Sagan_Flowbit_Type ( char *type, int linecount, const char *ruleset ) { if (!strcmp(type, "none")) { return(0); } if (!strcmp(type, "both")) { return(1); } if (!strcmp(type, "by_src")) { return(2); } if (!strcmp(type, "by_dst")) { return(3); } if (!strcmp(type, "reverse")) { return(4); } Sagan_Log(S_ERROR, "[%s, line %d] Expected 'none', 'both', by_src', 'by_dst' or 'reverse'. Got '%s' at line %d.", __FILE__, __LINE__, type, linecount, ruleset); return(0); /* Should never make it here */ } /***************************************************************************** * Sagan_Flowbit_Cleanup - Find "expired" flowbits and toggle the "state" * to "off" *****************************************************************************/ void Sagan_Flowbit_Cleanup(void) { int i = 0; time_t t; struct tm *now; char timet[20]; t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); for (i=0; iflowbit_count; i++) { if ( flowbit_ipc[i].flowbit_state == 1 && atol(timet) >= flowbit_ipc[i].flowbit_expire ) { if (debug->debugflowbit) { Sagan_Log(S_DEBUG, "[%s, line %d] Setting flowbit %s to \"expired\" state.", __FILE__, __LINE__, flowbit_ipc[i].flowbit_name); } flowbit_ipc[i].flowbit_state = 0; } } } sagan-1.1.2/src/sagan-strlcpy.c0000644000175000017500000000355312770372750015310 0ustar champchamp/* sagan-strlcpy * * Provided by the OpenBSD team. This file is here for systems that * do not support the strlcpy call. * */ /* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */ /* * Copyright (c) 1998 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifndef HAVE_STRLCPY #include #include /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. */ size_t strlcpy(char *dst, const char *src, size_t siz) { char *d = dst; const char *s = src; size_t n = siz; /* Copy as many bytes as will fit */ if (n != 0) { while (--n != 0) { if ((*d++ = *s++) == '\0') break; } } /* Not enough room in dst, add NUL and traverse rest of src */ if (n == 0) { if (siz != 0) *d = '\0'; /* NUL-terminate dst */ while (*s++) ; } return(s - src - 1); /* count does not include NUL */ } #endif sagan-1.1.2/src/sagan-output.h0000644000175000017500000000205712770372750015153 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_Output( _SaganEvent * ); void Sagan_Alert( _SaganEvent * ); sagan-1.1.2/src/sagan-liblognorm.c0000644000175000017500000002362712770372750015760 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-liblognorm.c * * These functions deal with liblognorm / data normalization. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef HAVE_LIBLOGNORM #include #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-liblognorm.h" #include "sagan-config.h" struct _SaganConfig *config; struct _SaganDebug *debug; struct _SaganNormalizeLiblognorm *SaganNormalizeLiblognorm = NULL; pthread_mutex_t Lognorm_Mutex = PTHREAD_MUTEX_INITIALIZER; /************************************************************************ * liblognorm GLOBALS ************************************************************************/ struct stat liblognorm_fileinfo; struct liblognorm_toload_struct *liblognormtoloadstruct; int liblognorm_count; static ln_ctx ctx; struct _SaganCounters *counters; /************************************************************************ * Sagan_Liblognorm_Load * * Load in the normalization files into memory ************************************************************************/ void Sagan_Liblognorm_Load(char *infile) { SaganNormalizeLiblognorm = malloc(sizeof(struct _SaganNormalizeLiblognorm)); if ( SaganNormalizeLiblognorm == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganNormalizeLiblognorm. Abort!", __FILE__, __LINE__); } memset(SaganNormalizeLiblognorm, 0, sizeof(_SaganNormalizeLiblognorm)); if((ctx = ln_initCtx()) == NULL) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot initialize liblognorm context.", __FILE__, __LINE__); } // for (i=0; i < counters->liblognormtoload_count; i++) // { Sagan_Log(S_NORMAL, "Loading %s for normalization.", infile); if (stat(infile, &liblognorm_fileinfo)) { Sagan_Log(S_ERROR, "%s was not fonnd.", infile); } ln_loadSamples(ctx, infile); // } } /*********************************************************************** * sagan_normalize_liblognom * * Locates interesting log data via Rainer's liblognorm library ***********************************************************************/ void Sagan_Normalize_Liblognorm(char *syslog_msg) { char buf[10*1024] = { 0 }; char tmp_host[254] = { 0 }; const char *cstr = NULL; const char *tmp = NULL; struct json_object *json = NULL; json_object *string_obj; SaganNormalizeLiblognorm->ip_src[0] = '0'; SaganNormalizeLiblognorm->ip_src[1] = '\0'; SaganNormalizeLiblognorm->ip_dst[0] = '0'; SaganNormalizeLiblognorm->ip_dst[1] = '\0'; SaganNormalizeLiblognorm->username[0] = '\0'; SaganNormalizeLiblognorm->src_host[0] = '\0'; SaganNormalizeLiblognorm->dst_host[0] = '\0'; SaganNormalizeLiblognorm->hash_sha1[0] = '\0'; SaganNormalizeLiblognorm->hash_sha256[0] = '\0'; SaganNormalizeLiblognorm->hash_md5[0] = '\0'; SaganNormalizeLiblognorm->http_uri[0] = '\0'; SaganNormalizeLiblognorm->http_hostname[0] = '\0'; SaganNormalizeLiblognorm->src_port = 0; SaganNormalizeLiblognorm->dst_port = 0; snprintf(buf, sizeof(buf),"%s", syslog_msg); /* int ln_normalize(ln_ctx ctx, const char *str, size_t strLen, struct json_object **json_p); */ ln_normalize(ctx, buf, strlen(buf), &json); cstr = (char*)json_object_to_json_string(json); /* Get source address information */ json_object_object_get_ex(json, "src-ip", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL) { snprintf(SaganNormalizeLiblognorm->ip_src, sizeof(SaganNormalizeLiblognorm->ip_src), "%s", tmp); } json_object_object_get_ex(json, "dst-ip", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { snprintf(SaganNormalizeLiblognorm->ip_dst, sizeof(SaganNormalizeLiblognorm->ip_dst), "%s", tmp); } /* Get username information - Will be used in the future */ json_object_object_get_ex(json, "username", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { snprintf(SaganNormalizeLiblognorm->username, sizeof(SaganNormalizeLiblognorm->username), "%s", tmp); } /* Do DNS lookup for source hostname */ json_object_object_get_ex(json, "src-host", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { strlcpy(SaganNormalizeLiblognorm->src_host, tmp, sizeof(SaganNormalizeLiblognorm->src_host)); if ( SaganNormalizeLiblognorm->ip_src[0] == '0' ) { strlcpy(tmp_host, DNS_Lookup(SaganNormalizeLiblognorm->src_host), sizeof(tmp_host)); if ( tmp_host[0] == '0' ) { Sagan_Log(S_WARN, "Failed to do a DNS lookup for source '%s'. Using '%s' instead.", SaganNormalizeLiblognorm->src_host, config->sagan_host); strlcpy(SaganNormalizeLiblognorm->src_host, config->sagan_host, sizeof(SaganNormalizeLiblognorm->src_host)); } } } json_object_object_get_ex(json, "dst-host", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { strlcpy(SaganNormalizeLiblognorm->dst_host, tmp, sizeof(SaganNormalizeLiblognorm->dst_host)); if ( SaganNormalizeLiblognorm->ip_dst[0] == '0' ) { strlcpy(tmp_host, DNS_Lookup(SaganNormalizeLiblognorm->dst_host), sizeof(tmp_host)); if ( tmp_host[0] == '0' ) { Sagan_Log(S_WARN, "Failed to do a DNS lookup for destination '%s'. Using '%s' instead.", SaganNormalizeLiblognorm->dst_host, config->sagan_host); strlcpy(SaganNormalizeLiblognorm->src_host, config->sagan_host, sizeof(SaganNormalizeLiblognorm->src_host)); } } } /* Get port information */ json_object_object_get_ex(json, "src-port", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { SaganNormalizeLiblognorm->src_port = atoi(tmp); } json_object_object_get_ex(json, "dst-port", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { SaganNormalizeLiblognorm->dst_port = atoi(tmp); } json_object_object_get_ex(json, "ash-md5", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { strlcpy(SaganNormalizeLiblognorm->hash_md5, tmp, sizeof(SaganNormalizeLiblognorm->hash_md5)); } json_object_object_get_ex(json, "hash-sha1", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { strlcpy(SaganNormalizeLiblognorm->hash_sha1, tmp, sizeof(SaganNormalizeLiblognorm->hash_sha1)); } json_object_object_get_ex(json, "hash-sha256", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { strlcpy(SaganNormalizeLiblognorm->hash_sha256, tmp, sizeof(SaganNormalizeLiblognorm->hash_sha256)); } json_object_object_get_ex(json, "http_uri", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { strlcpy(SaganNormalizeLiblognorm->http_uri, tmp, sizeof(SaganNormalizeLiblognorm->http_uri)); } json_object_object_get_ex(json, "http_hostname", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { strlcpy(SaganNormalizeLiblognorm->http_hostname, tmp, sizeof(SaganNormalizeLiblognorm->http_hostname)); } json_object_object_get_ex(json, "filename", &string_obj); tmp = json_object_get_string(string_obj); if ( tmp != NULL ) { strlcpy(SaganNormalizeLiblognorm->filename, tmp, sizeof(SaganNormalizeLiblognorm->filename)); } if ( debug->debugnormalize ) { Sagan_Log(S_DEBUG, "Liblognorm DEBUG output:"); Sagan_Log(S_DEBUG, "---------------------------------------------------"); Sagan_Log(S_DEBUG, "Log message to normalize: |%s|", syslog_msg); Sagan_Log(S_DEBUG, "Parsed: %s", cstr); Sagan_Log(S_DEBUG, "Source IP: %s", SaganNormalizeLiblognorm->ip_src); Sagan_Log(S_DEBUG, "Destination IP: %s", SaganNormalizeLiblognorm->ip_dst); Sagan_Log(S_DEBUG, "Source Port: %d", SaganNormalizeLiblognorm->src_port); Sagan_Log(S_DEBUG, "Destination Port: %d", SaganNormalizeLiblognorm->dst_port); Sagan_Log(S_DEBUG, "Source Host: %s", SaganNormalizeLiblognorm->src_host); Sagan_Log(S_DEBUG, "Destination Host: %s", SaganNormalizeLiblognorm->dst_host); Sagan_Log(S_DEBUG, "Username: %s", SaganNormalizeLiblognorm->username); Sagan_Log(S_DEBUG, "MD5 Hash: %s", SaganNormalizeLiblognorm->hash_md5); Sagan_Log(S_DEBUG, "SHA1 Hash: %s", SaganNormalizeLiblognorm->hash_sha1); Sagan_Log(S_DEBUG, "SHA265 Hash: %s", SaganNormalizeLiblognorm->hash_sha256); Sagan_Log(S_DEBUG, "HTTP URI: %s", SaganNormalizeLiblognorm->http_uri); Sagan_Log(S_DEBUG, "HTTP HOSTNAME: %s", SaganNormalizeLiblognorm->http_hostname); Sagan_Log(S_DEBUG, "Filename: %s", SaganNormalizeLiblognorm->filename); Sagan_Log(S_DEBUG, ""); } json_object_put(json); } #endif sagan-1.1.2/src/sagan-config.c0000644000175000017500000012353512770372750015060 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-config.c * * Loads the sagan.conf file into memory * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_LIBLOGNORM #include #include "sagan-liblognorm.h" #endif #include "version.h" #include "sagan.h" #include "sagan-defs.h" #include "sagan-rules.h" #include "sagan-config.h" #include "sagan-classifications.h" #include "sagan-gen-msg.h" #include "sagan-protocol-map.h" #include "sagan-references.h" #include "parsers/parsers.h" #ifdef HAVE_LIBMAXMINDDB #include "sagan-geoip2.h" #endif /* Processors */ #include "processors/sagan-blacklist.h" #include "processors/sagan-perfmon.h" #include "processors/sagan-bro-intel.h" #ifdef WITH_BLUEDOT #include "processors/sagan-bluedot.h" #endif #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) #include "output-plugins/sagan-unified2.h" #endif #ifdef HAVE_LIBLOGNORM struct liblognorm_struct *liblognormstruct; int liblognorm_count; #endif sbool liblognorm_load = 0; /* Need to stay outside of HAVE_LIBLOGNORM */ struct _Rule_Struct *rulestruct; struct _SaganCounters *counters; struct _SaganDebug *debug; struct _SaganConfig *config; struct _SaganVar *var; void Load_Config( void ) { struct stat filecheck; FILE *sagancfg; FILE *tmpcfg; char *filename; char ruleset[MAXPATH]; char tmpbuf[CONFBUF]; char tmpbuf2[CONFBUF]; char tmpstring[CONFBUF]; char *sagan_option=NULL; char *sagan_var1=NULL; char *sagan_var2=NULL; char *sagan_var3=NULL; char *ptmp=NULL; char *tok=NULL; char *tok2=NULL; int i,check; #ifdef HAVE_LIBLOGNORM #endif /* Set some system defaults */ strlcpy(config->sagan_alert_filepath, ALERTLOG, sizeof(config->sagan_alert_filepath)); strlcpy(config->sagan_lockfile, LOCKFILE, sizeof(config->sagan_lockfile)); strlcpy(config->sagan_log_path, SAGANLOGPATH, sizeof(config->sagan_log_path)); strlcpy(config->sagan_rule_path, RULE_PATH, sizeof(config->sagan_rule_path)); strlcpy(config->ipc_directory, IPC_DIRECTORY, sizeof(config->ipc_directory)); strlcpy(config->external_net, EXTERNAL_NET, sizeof(config->external_net)); strlcpy(config->home_net, HOME_NET, sizeof(config->home_net)); config->sagan_host[0] = '\0'; config->sagan_port = 514; config->max_flowbits = DEFAULT_IPC_FLOWBITS; config->max_threshold_by_src = DEFAULT_IPC_THRESH_BY_SRC; config->max_threshold_by_dst = DEFAULT_IPC_THRESH_BY_DST; config->max_threshold_by_srcport = DEFAULT_IPC_THRESH_BY_SRC_PORT; config->max_threshold_by_dstport = DEFAULT_IPC_THRESH_BY_DST_PORT; config->max_threshold_by_username = DEFAULT_IPC_THRESH_BY_USERNAME; config->max_after_by_src = DEFAULT_IPC_AFTER_BY_SRC; config->max_after_by_dst = DEFAULT_IPC_AFTER_BY_DST; config->max_after_by_srcport = DEFAULT_IPC_AFTER_BY_SRC_PORT; config->max_after_by_dstport = DEFAULT_IPC_AFTER_BY_DST_PORT; config->max_after_by_username = DEFAULT_IPC_AFTER_BY_USERNAME; config->max_track_clients = DEFAULT_IPC_CLIENT_TRACK_IPC; #if defined(F_GETPIPE_SZ) && defined(F_SETPIPE_SZ) config->sagan_fifo_size = MAX_FIFO_SIZE; #endif /* Copy default FIFO */ if ( config->sagan_is_file == 0 ) { strlcpy(config->sagan_fifo, FIFO, sizeof(config->sagan_fifo)); } #ifdef HAVE_LIBESMTP strlcpy(config->sagan_email_subject, DEFAULT_SMTP_SUBJECT, sizeof(config->sagan_email_subject)); #endif config->sagan_proto = 17; /* Default to UDP */ config->max_processor_threads = MAX_PROCESSOR_THREADS; /* PLOG defaults */ #ifdef HAVE_LIBPCAP strlcpy(config->plog_interface, PLOG_INTERFACE, sizeof(config->plog_interface)); strlcpy(config->plog_filter, PLOG_FILTER, sizeof(config->plog_filter)); strlcpy(config->plog_logdev, PLOG_LOGDEV, sizeof(config->plog_logdev)); #endif /* Start loading configuration */ rulestruct = (_Rule_Struct *) realloc(rulestruct, (counters->rulecount+1) * sizeof(_Rule_Struct)); if ( rulestruct == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for rulestruct. Abort!", __FILE__, __LINE__); } /* Gather information for the master configuration file */ if ((sagancfg = fopen(config->sagan_config, "r")) == NULL) { fprintf(stderr, "[%s, line %d] Cannot open configuration file (%s)\n", __FILE__, __LINE__, config->sagan_config); exit(1); } while(fgets(tmpbuf, sizeof(tmpbuf), sagancfg) != NULL) { if (tmpbuf[0] == '#') continue; if (tmpbuf[0] == ';') continue; if (tmpbuf[0] == 10 ) continue; if (tmpbuf[0] == 32 ) continue; strlcpy(tmpbuf2, tmpbuf, sizeof(tmpbuf2)); /* Retain a copy of the entire line */ sagan_option = strtok_r(tmpbuf, " ", &tok); if (!strcmp(Remove_Return(sagan_option), "max_processor_threads")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"max_processor_threads\" is incomplete!", __FILE__, __LINE__); } config->max_processor_threads = strtoull(sagan_var1, NULL, 10); } if (!strcmp(Remove_Return(sagan_option), "disable_dns_warnings")) { Sagan_Log(S_NORMAL, "Supressing DNS warnings"); config->disable_dns_warnings = 1; } if (!strcmp(Remove_Return(sagan_option), "syslog_src_lookup")) { Sagan_Log(S_NORMAL, "DNS lookup of source address supplied by syslog daemon"); config->syslog_src_lookup = 1; } if (!strcmp(Remove_Return(sagan_option), "sagan_host")) { sagan_var1 = Remove_Return(strtok_r(NULL, " ", &tok)); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"sagan_host\" is incomplete!", __FILE__, __LINE__); } strlcpy(config->sagan_host, sagan_var1, sizeof(config->sagan_host)); } if (!strcmp(sagan_option, "sagan_port")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"sagan_port\" is incomplete!", __FILE__, __LINE__); } config->sagan_port = atoi(sagan_var1); } /* IPC configurations! */ if (!strcmp(sagan_option, "ipc_directory")) { sagan_var1 = Remove_Return(strtok_r(NULL, " ", &tok)); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"ipc_directory\" is incomplete!", __FILE__, __LINE__); } strlcpy(config->ipc_directory, sagan_var1, sizeof(config->ipc_directory)); } if (!strcmp(sagan_option, "flowbits")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"flowbits\" is incomplete!", __FILE__, __LINE__); } config->max_flowbits = atoi(sagan_var1); } if (!strcmp(sagan_option, "threshold_by_src")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"threshold_by_src\" is incomplete!", __FILE__, __LINE__); } config->max_threshold_by_src = atoi(sagan_var1); } if (!strcmp(sagan_option, "threshold_by_dst")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"threshold_by_dst\" is incomplete!", __FILE__, __LINE__); } config->max_threshold_by_dst = atoi(sagan_var1); } if (!strcmp(sagan_option, "threshold_by_dstport")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"threshold_by_dstport\" is incomplete!", __FILE__, __LINE__); } config->max_threshold_by_dstport = atoi(sagan_var1); } if (!strcmp(sagan_option, "threshold_by_username")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"threshold_by_username\" is incomplete!", __FILE__, __LINE__); } config->max_threshold_by_username = atoi(sagan_var1); } if (!strcmp(sagan_option, "after_by_username")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"after_by_username\" is incomplete!", __FILE__, __LINE__); } config->max_after_by_username = atoi(sagan_var1); } if (!strcmp(sagan_option, "after_by_src")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"after_by_src\" is incomplete!", __FILE__, __LINE__); } config->max_after_by_src = atoi(sagan_var1); } if (!strcmp(sagan_option, "after_by_dst")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"after_by_dst\" is incomplete!", __FILE__, __LINE__); } config->max_after_by_dst = atoi(sagan_var1); } if (!strcmp(sagan_option, "after_by_dstport")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"after_by_dstport\" is incomplete!", __FILE__, __LINE__); } config->max_after_by_dstport = atoi(sagan_var1); } if (!strcmp(sagan_option, "track_clients")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"track_clients\" is incomplete!", __FILE__, __LINE__); } config->max_track_clients = atoi(sagan_var1); } #if defined(F_GETPIPE_SZ) && defined(F_SETPIPE_SZ) if (!strcmp(sagan_option, "sagan_fifo_size")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"sagan_fifo_size\" is incomplete!", __FILE__, __LINE__); } config->sagan_fifo_size = atoi(sagan_var1); } #endif #ifndef HAVE_LIBESMTP if (!strcmp(sagan_option, "send-to") || !strcmp(sagan_option, "min_email_priority")) { Sagan_Log(S_ERROR, "[%s, line %d] \"libesmtp\" support not found. Re-compile with ESMTP support or disable in the sagan.conf.", __FILE__, __LINE__); } #endif #ifdef HAVE_LIBESMTP if (!strcmp(sagan_option, "send-to")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"send-to\" is incomplete!", __FILE__, __LINE__); } strlcpy(config->sagan_esmtp_to, Remove_Return(sagan_var1), sizeof(config->sagan_esmtp_to)); config->sagan_esmtp_flag=1; config->sagan_sendto_flag=1; } if (!strcmp(sagan_option, "min_email_priority")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"min_email_priority\" is incomplete!", __FILE__, __LINE__); } config->min_email_priority = atoi(sagan_var1); } if (!strcmp(sagan_option, "email_subject")) { sagan_var1 = strtok_r(NULL, " ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \email_subject\" is incomplete!", __FILE__, __LINE__); } strlcpy(config->sagan_email_subject, Remove_Return(Between_Quotes(tmpbuf2)), sizeof(config->sagan_email_subject)); } #endif #ifndef HAVE_LIBPCAP if (!strcmp(sagan_option, "plog_interface") || !strcmp(sagan_option, "plog_logdev") || !strcmp(sagan_option, "plog_port")) { Sagan_Log(S_ERROR, "[%s, line %d] \"libpcap\" support not found. Re-compile with PCAP support or disable in the sagan.conf.", __FILE__, __LINE__); } #endif #ifdef HAVE_LIBPCAP if (!strcmp(sagan_option, "plog_interface")) { strlcpy(config->plog_interface, Remove_Return(strtok_r(NULL, " ", &tok)), sizeof(config->plog_interface)); config->plog_flag=1; } if (!strcmp(sagan_option, "plog_logdev")) { strlcpy(config->plog_logdev, Remove_Return(strtok_r(NULL, " ", &tok)), sizeof(config->plog_logdev)); config->plog_flag=1; } if (!strcmp(sagan_option, "plog_filter")) { strlcpy(config->plog_filter, Remove_Return(Between_Quotes(tmpbuf2)), sizeof(config->plog_filter)); config->plog_flag = 1; } if (!strcmp(sagan_option, "plog_promiscuous")) { config->plog_promiscuous = 1; config->plog_flag = 1; } #endif /* Detect and abort on deperciated "normalize" value */ if (!strcmp(sagan_option, "normalize:")) { Sagan_Log(S_ERROR, "[%s, line %d] Usage of deperciated 'normalize:' is no longer supported. Use 'normalize_file:' instead!", __FILE__, __LINE__); } #ifndef HAVE_LIBLOGNORM if (!strcmp(sagan_option, "normalize_file:")) { liblognorm_load = true; Sagan_Log(S_WARN, "WARNING: Sagan was not compiled with \"liblognorm\" support!"); Sagan_Log(S_WARN, "WARNING: Sagan will continue, but _without_ liblognorm!"); } #endif #ifdef HAVE_LIBLOGNORM if (!strcmp(sagan_option, "normalize_file:")) { liblognorm_load = true; liblognormstruct = (liblognorm_struct *) realloc(liblognormstruct, (liblognorm_count+1) * sizeof(liblognorm_struct)); if ( liblognormstruct == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for rulestruct. Abort!", __FILE__, __LINE__); } strlcpy(tmpstring, Remove_Return(strtok_r(NULL, ":", &tok)), sizeof(tmpstring)); strlcpy(ruleset, Sagan_Var_To_Value(tmpstring), sizeof(ruleset)); Remove_Spaces(ruleset); Sagan_Liblognorm_Load(ruleset); } #endif #ifndef HAVE_LIBMAXMINDDB if (!strcmp(sagan_option, "country_database")) { Sagan_Log(S_WARN, "WARNING: Sagan was not compiled with Maxmind \"GeoIP2\" support!"); Sagan_Log(S_WARN, "WARNING: Sagan will continue, but _without_ GeoIP2 enabled!"); } #endif #ifdef HAVE_LIBMAXMINDDB if (!strcmp(sagan_option, "country_database:")) { sagan_var1 = Remove_Return(strtok_r(NULL, " ", &tok)); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] country_database: is missing country codes!", __FILE__, __LINE__); } strlcpy(config->geoip2_country_file, sagan_var1, sizeof(config->geoip2_country_file)); Sagan_Log(S_NORMAL, "Loading GeoIP2 database. [%s]", config->geoip2_country_file); Sagan_Open_GeoIP2_Database(); config->have_geoip2 = 1; } #endif if (!strcmp(sagan_option, "ignore_list:")) { sagan_var1 = Remove_Return(strtok_r(NULL, " ", &tok)); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] No \"ignore file\" specified in the sagan.conf file!", __FILE__, __LINE__); } config->sagan_droplist_flag = 1; strlcpy(config->sagan_droplistfile, sagan_var1, sizeof(config->sagan_droplistfile)); } /**************************************************************************** * Processors ****************************************************************************/ if (!strcmp(sagan_option, "processor")) { sagan_var1 = strtok_r(NULL," ", &tok); /******* Client tracker *******/ if (!strcmp(sagan_var1, "sagan-track-clients:")) { /* Set defaults */ config->pp_sagan_track_clients = TRACK_TIME; config->sagan_track_clients_flag = 1; ptmp = sagan_var1; while (ptmp != NULL) { if (!strcmp(ptmp, "client_timeout")) { ptmp = strtok_r(NULL," ", &tok); config->pp_sagan_track_clients = atoi(ptmp); } ptmp = strtok_r(NULL, "=", &tok); } } /******* Perfmon ********/ if (!strcmp(sagan_var1, "perfmonitor:")) { config->perfmonitor_time = 0; config->perfmonitor_file_name[0] = '\0'; config->perfmonitor_flag = 1; ptmp = sagan_var1; while (ptmp != NULL ) { if (!strcmp(ptmp, "time")) { ptmp = strtok_r(NULL, " ", &tok); config->perfmonitor_time = atoi(ptmp); } if (!strcmp(ptmp, "file")) { ptmp = strtok_r(NULL," ", &tok); strlcpy(config->perfmonitor_file_name, Remove_Return(ptmp), sizeof(config->perfmonitor_file_name)); } ptmp = strtok_r(NULL, "=", &tok); } /* TODO: Do these same sanity checks on other processors! */ if ( config->perfmonitor_time == 0 || config->perfmonitor_file_name[0] == '\0' ) { Sagan_Log(S_ERROR, "[%s, line %d] Perfmonitor time or file is incorrect or missing!", __FILE__, __LINE__); } } /******* Backlist *******/ if (!strcmp(sagan_var1, "blacklist:")) { config->blacklist_flag=1; ptmp = strtok_r(NULL,"\0", &tok); if ( ptmp == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"blacklist:\" processor file(s) missing", __FILE__, __LINE__); } Remove_Return(ptmp); Remove_Spaces(ptmp); strlcpy(config->blacklist_files, ptmp, sizeof(config->blacklist_files)); } #ifdef WITH_BLUEDOT /******* Bluedot *******/ if (!strcmp(sagan_var1, "bluedot:")) { config->bluedot_flag=1; /* Set defaults */ strlcpy(config->bluedot_device_id, "NO_DEVICE_ID", sizeof(config->bluedot_device_id)); config->bluedot_timeout = 120; config->bluedot_cat[0] = '\0'; config->bluedot_url[0] = '\0'; ptmp = sagan_var1; while (ptmp != NULL ) { if (!strcmp(ptmp, "catagories")) { ptmp = strtok_r(NULL, " ", &tok); strlcpy(config->bluedot_cat, Remove_Return(ptmp), sizeof(config->bluedot_cat)); } if (!strcmp(ptmp, "url")) { ptmp = strtok_r(NULL, " ", &tok); strlcpy(config->bluedot_url, Remove_Return(ptmp), sizeof(config->bluedot_url)); } if (!strcmp(ptmp, "max_cache")) { ptmp = strtok_r(NULL, " ", &tok); config->bluedot_max_cache = strtoull(ptmp, NULL, 10); } if (!strcmp(ptmp, "cache_timeout")) { ptmp = strtok_r(NULL, " ", &tok); config->bluedot_timeout = atoi(ptmp) * 60; } if (!strcmp(ptmp, "device_id")) { ptmp = strtok_r(NULL, " ", &tok); strlcpy(config->bluedot_device_id, Remove_Return(ptmp), sizeof(config->bluedot_device_id)); } ptmp = strtok_r(NULL, "=", &tok); } /* Bluedot sanity checks */ if ( config->bluedot_cat[0] == '\0' ) { Sagan_Log(S_ERROR, "[%s, line %d] Bluedot \"catagories\" option is missing.", __FILE__, __LINE__); } if ( config->bluedot_url[0] == '\0' ) { Sagan_Log(S_ERROR, "[%s, line %d] Bluedott \"url\" optin is missing.", __FILE__, __LINE__); } Sagan_Bluedot_Load_Cat(); } #endif /* For the Bro Intellegence framework */ /* This allows Sagan to load Bro Intel files like Critical Stack Bro/Intel files */ if (!strcmp(sagan_var1, "bro-intel:")) { config->brointel_flag = 1; ptmp = strtok_r(NULL,"\0", &tok); if ( ptmp == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"bro-intel:\" processor file(s) missing", __FILE__, __LINE__); } Remove_Return(ptmp); Remove_Spaces(ptmp); strlcpy(config->brointel_files, ptmp, sizeof(config->brointel_files)); } } /**************************************************************************** * Output formats ****************************************************************************/ if (!strcmp(sagan_option, "output")) { config->output_thread_flag = 1; sagan_var1 = strtok_r(NULL," ", &tok); if ( sagan_var1 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"%s\" appears to be incomplete!", sagan_option, __FILE__, __LINE__); } if (!strcmp(sagan_var1, "external:")) { config->sagan_ext_flag=1; config->sagan_external_output_flag=1; ptmp = strtok_r(NULL, " ", &tok); if ( ptmp == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"external:\" output option is incomplete!", __FILE__, __LINE__); } Remove_Return(ptmp); Remove_Spaces(ptmp); if (stat(ptmp, &filecheck) != 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] \"external\" output program '%s' does not exist! Abort!", __FILE__, __LINE__, ptmp); } if (access(ptmp, X_OK) == -1) { Sagan_Log(S_ERROR, "[%s, line %d] \"external\" output program '%s' is not executable! Abort!", __FILE__, __LINE__, ptmp); } strlcpy(config->sagan_extern, ptmp, sizeof(config->sagan_extern)); } #ifdef WITH_SYSLOG if (!strcmp(sagan_var1, "syslog:") || !strcmp(sagan_var1, "alert_syslog:" ) ) { config->sagan_syslog_flag = 1; /* Set defaults */ config->sagan_syslog_facility = DEFAULT_SYSLOG_FACILITY; config->sagan_syslog_priority = DEFAULT_SYSLOG_PRIORITY; config->sagan_syslog_options = LOG_PID; /* Facility */ sagan_var3 = strtok_r(NULL, " ", &tok); if ( sagan_var3 != NULL ) { sagan_var2 = Remove_Return(sagan_var3); #ifdef LOG_AUTH if (!strcmp(sagan_var2, "LOG_AUTH")) { config->sagan_syslog_facility = LOG_AUTH; } #endif #ifdef LOG_AUTHPRIV if (!strcmp(sagan_var2, "LOG_AUTHPRIV")) { config->sagan_syslog_facility = LOG_AUTHPRIV; } #endif #ifdef LOG_CRON if (!strcmp(sagan_var2, "LOG_CRON")) { config->sagan_syslog_facility = LOG_CRON; } #endif #ifdef LOG_DAEMON if (!strcmp(sagan_var2, "LOG_DAEMON")) { config->sagan_syslog_facility = LOG_DAEMON; } #endif #ifdef LOG_FTP if (!strcmp(sagan_var2, "LOG_FTP")) { config->sagan_syslog_facility = LOG_FTP; } #endif #ifdef LOG_INSTALL if (!strcmp(sagan_var2, "LOG_INSTALL")) { config->sagan_syslog_facility = LOG_INSTALL; } #endif #ifdef LOG_KERN if (!strcmp(sagan_var2, "LOG_KERN")) { config->sagan_syslog_facility = LOG_KERN; } #endif #ifdef LOG_LPR if (!strcmp(sagan_var2, "LOG_LPR")) { config->sagan_syslog_facility = LOG_LPR; } #endif #ifdef LOG_MAIL if (!strcmp(sagan_var2, "LOG_MAIL")) { config->sagan_syslog_facility = LOG_MAIL; } #endif #ifdef LOG_NETINFO if (!strcmp(sagan_var2, "LOG_NETINFO")) { config->sagan_syslog_facility = LOG_NETINFO; } #endif #ifdef LOG_RAS if (!strcmp(sagan_var2, "LOG_RAS")) { config->sagan_syslog_facility = LOG_RAS; } #endif #ifdef LOG_REMOTEAUTH if (!strcmp(sagan_var2, "LOG_REMOTEAUTH")) { config->sagan_syslog_facility = LOG_REMOTEAUTH; } #endif #ifdef LOG_NEWS if (!strcmp(sagan_var2, "LOG_NEWS")) { config->sagan_syslog_facility = LOG_NEWS; } #endif #ifdef LOG_SYSLOG if (!strcmp(sagan_var2, "LOG_SYSLOG")) { config->sagan_syslog_facility = LOG_SYSLOG; } #endif #ifdef LOG_USER if (!strcmp(sagan_var2, "LOG_USER")) { config->sagan_syslog_facility = LOG_USER; } #endif #ifdef LOG_UUCP if (!strcmp(sagan_var2, "LOG_UUCP")) { config->sagan_syslog_facility = LOG_UUCP; } #endif #ifdef LOG_LOCAL0 if (!strcmp(sagan_var2, "LOG_LOCAL0")) { config->sagan_syslog_facility = LOG_LOCAL0; } #endif #ifdef LOG_LOCAL1 if (!strcmp(sagan_var2, "LOG_LOCAL1")) { config->sagan_syslog_facility = LOG_LOCAL1; } #endif #ifdef LOG_LOCAL2 if (!strcmp(sagan_var2, "LOG_LOCAL2")) { config->sagan_syslog_facility = LOG_LOCAL2; } #endif #ifdef LOG_LOCAL3 if (!strcmp(sagan_var2, "LOG_LOCAL3")) { config->sagan_syslog_facility = LOG_LOCAL3; } #endif #ifdef LOG_LOCAL4 if (!strcmp(sagan_var2, "LOG_LOCAL4")) { config->sagan_syslog_facility = LOG_LOCAL4; } #endif #ifdef LOG_LOCAL5 if (!strcmp(sagan_var2, "LOG_LOCAL5")) { config->sagan_syslog_facility = LOG_LOCAL5; } #endif #ifdef LOG_LOCAL6 if (!strcmp(sagan_var2, "LOG_LOCAL6")) { config->sagan_syslog_facility = LOG_LOCAL6; } #endif #ifdef LOG_LOCAL7 if (!strcmp(sagan_var2, "LOG_LOCAL7")) { config->sagan_syslog_facility = LOG_LOCAL7; } #endif } /* Priority */ sagan_var3 = strtok_r(NULL, " ", &tok); if ( sagan_var3 == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] \"syslog\" output \"priority\" is missing!", __FILE__, __LINE__); } if ( sagan_var3 != NULL ) { sagan_var2 = Remove_Return(sagan_var3); #ifdef LOG_EMERG if (!strcmp(sagan_var2, "LOG_EMERG")) { config->sagan_syslog_priority = LOG_EMERG; } #endif #ifdef LOG_ALERT if (!strcmp(sagan_var2, "LOG_ALERT")) { config->sagan_syslog_priority = LOG_ALERT; } #endif #ifdef LOG_CRIT if (!strcmp(sagan_var2, "LOG_CRIT")) { config->sagan_syslog_priority = LOG_CRIT; } #endif #ifdef LOG_ERR if (!strcmp(sagan_var2, "LOG_ERR")) { config->sagan_syslog_priority = LOG_ERR; } #endif #ifdef LOG_WARNING if (!strcmp(sagan_var2, "LOG_WARNING")) { config->sagan_syslog_priority = LOG_WARNING; } #endif #ifdef LOG_NOTICE if (!strcmp(sagan_var2, "LOG_NOTICE")) { config->sagan_syslog_priority = LOG_NOTICE; } #endif #ifdef LOG_INFO if (!strcmp(sagan_var2, "LOG_INFO")) { config->sagan_syslog_priority = LOG_INFO; } #endif #ifdef LOG_DEBUG if (!strcmp(sagan_var2, "LOG_DEBUG")) { config->sagan_syslog_priority = LOG_DEBUG; } #endif } /* Syslog options */ sagan_var3 = strtok_r(NULL, " ", &tok); if ( sagan_var3 != NULL ) { sagan_var2 = Remove_Return(sagan_var3); #ifdef LOG_CONS if (!strcmp(sagan_var2, "LOG_CONS")) { config->sagan_syslog_options |= LOG_CONS; } #endif #ifdef LOG_NDELAY if (!strcmp(sagan_var2, "LOG_NDELAY")) { config->sagan_syslog_options |= LOG_NDELAY; } #endif #ifdef LOG_PERROR if (!strcmp(sagan_var2, "LOG_PERROR")) { config->sagan_syslog_options |= LOG_PERROR; } #endif #ifdef LOG_PID if (!strcmp(sagan_var2, "LOG_PID")) { config->sagan_syslog_options |= LOG_PID; } #endif #ifdef LOG_NOWAIT if (!strcmp(sagan_var2, "LOG_NOWAIT")) { config->sagan_syslog_options |= LOG_NOWAIT; } #endif } } /* end of syslog config */ #endif #ifdef WITH_SNORTSAM if (!strcmp(sagan_var1, "alert_fwsam:")) { strlcpy(config->sagan_fwsam_info, Remove_Return(strtok_r(NULL, " ", &tok)), sizeof(config->sagan_fwsam_info)); config->sagan_fwsam_flag=1; } #endif #if !defined(HAVE_DNET_H) && !defined(HAVE_DUMBNET_H) if (!strcmp(sagan_var1, "unified2:")) { Sagan_Log(S_WARN,"\"libdnet\" support not found. This is needed for unified2."); Sagan_Log(S_WARN, "Re-compile with libdnet support or disable in the sagan.conf."); } #endif #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) if (!strcmp(sagan_var1, "unified2:")) { config->sagan_unified2_flag = 1; config->unified2_filepath[0] = '\0'; ptmp = sagan_var1; Remove_Return(ptmp); while (ptmp != NULL ) { if (!strcmp(ptmp, "filename")) { ptmp = strtok_r(NULL, ",", &tok); snprintf(config->unified2_filepath, sizeof(config->unified2_filepath)-1, "%s/%s", config->sagan_log_path, ptmp); } if (!strcmp(ptmp, "limit")) { ptmp = strtok_r(NULL, " ", &tok); config->unified2_limit = atoi(ptmp) * 1024 * 1024; } if (!strcmp(ptmp, "nostamp")) config->unified2_nostamp = 1; ptmp = strtok_r(NULL, " ", &tok); } /* Sanity check for unified2 */ if ( config->unified2_filepath == '\0' ) { Sagan_Log(S_ERROR, "[%s, line %d] Unified2 \"filename\" is missing.", __FILE__, __LINE__); } } #endif #ifdef HAVE_LIBESMTP if (!strcmp(sagan_var1, "email:")) { ptmp = sagan_var1; config->sagan_esmtp_from[0] = '\0'; config->sagan_esmtp_server[0] = '\0'; while (ptmp != NULL ) { if (!strcmp(ptmp, "from")) { ptmp = strtok_r(NULL, " ", &tok); strlcpy(config->sagan_esmtp_from, Remove_Return(ptmp), sizeof(config->sagan_esmtp_from)); } if (!strcmp(ptmp, "smtpserver")) { ptmp = strtok_r(NULL, " ", &tok); strlcpy(config->sagan_esmtp_server, Remove_Return(ptmp), sizeof(config->sagan_esmtp_server)); } ptmp = strtok_r(NULL, "=", &tok); } /* Sanity checks for email: */ if ( config->sagan_esmtp_from == '\0' ) { Sagan_Log(S_ERROR, "[%s, line %d] email: \"from\" option is missing.", __FILE__, __LINE__); } if ( config->sagan_esmtp_server == '\0' ) { Sagan_Log(S_ERROR, "[%s, line %d] email: \"smtpserver\" option is missing.", __FILE__, __LINE__); } } #endif } /* var */ if (!strcmp(sagan_option, "var")) { sagan_var1 = strtok_r(NULL, " ", &tok); var = (_SaganVar *) realloc(var, (counters->var_count+1) * sizeof(_SaganVar)); /* Allocate memory */ if ( var == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to reallocate memory for var. Abort!", __FILE__, __LINE__); } snprintf(var[counters->var_count].var_name, sizeof(var[counters->var_count].var_name)-1, "$%s", sagan_var1); /* Load var from file as suggested in https://github.com/beave/sagan/issues/75 */ if (Sagan_strstr(tmpbuf2, "file:/")) { sagan_var2 = strtok_r(NULL, " ", &tok); /* file://path/file */ strtok_r(sagan_var2, ":", &tok2); /* skip paste file: */ filename = Remove_Return(strtok_r(NULL, ":", &tok2)); /* Get path + filename */ if ((tmpcfg = fopen(filename, "r")) == NULL) { fprintf(stderr, "[%s, line %d] Cannot open var file:%s\n", __FILE__, __LINE__, filename); exit(1); } check = 0; while(fgets(tmpbuf2, sizeof(tmpbuf2), tmpcfg) != NULL) { /* Stuff to skip */ if (tmpbuf2[0] == '#') continue; if (tmpbuf2[0] == ';') continue; if (tmpbuf2[0] == 10 ) continue; if (tmpbuf2[0] == 32 ) continue; /* Simple check to see if this is the first entry or not. This is to keep our "," on mark */ if ( check == 0 ) { snprintf(tmpstring, sizeof(tmpstring), "%s", Remove_Return(tmpbuf2)); check = 1; } else { snprintf(tmpstring, sizeof(tmpstring), ",%s", Remove_Return(tmpbuf2)); } /* Append to the var */ strlcat(var[counters->var_count].var_value, tmpstring, sizeof(var[counters->var_count].var_value)); } fclose(tmpcfg); } else { /* Non-file based var's */ /* Test for multiple values via [ ] or single value */ if ((Sagan_strstr(tmpbuf2, "[") && !Sagan_strstr(tmpbuf2, "]")) || (!Sagan_strstr(tmpbuf2, "[") && Sagan_strstr(tmpbuf2, "]"))) { Sagan_Log(S_ERROR, "[%s, line %d] A 'var' in the sagan.conf file contains mismatched [ ]!", __FILE__, __LINE__); } /* Multiple values */ if (Sagan_strstr(tmpbuf2, "[") && Sagan_strstr(tmpbuf2, "]")) { sagan_var2 = strtok_r(NULL, "[", &tok); sagan_var3 = strtok_r(sagan_var2, "]", &tok2); Remove_Spaces(sagan_var3); Remove_Return(sagan_var3); strlcpy(var[counters->var_count].var_value, sagan_var3, sizeof(var[counters->var_count].var_value)); } else { /* Single value */ sagan_var2 = strtok_r(NULL, " ", &tok); /* Move to position of value of var */ strlcpy(var[counters->var_count].var_value, Remove_Return(sagan_var2), sizeof(var[counters->var_count].var_value)); } counters->var_count++; } /* Required var's - all others are optional */ if (!strcmp(sagan_var1, "FIFO") && config->sagan_is_file == 0) { strlcpy(config->sagan_fifo, sagan_var2, sizeof(config->sagan_fifo)); } if (!strcmp(sagan_var1, "LOCKFILE" )) { strlcpy(config->sagan_lockfile, sagan_var2, sizeof(config->sagan_lockfile)); } if (!strcmp(sagan_var1, "ALERTLOG" )) { strlcpy(config->sagan_alert_filepath, sagan_var2, sizeof(config->sagan_alert_filepath)); } if (!strcmp(sagan_var1, "SAGANLOGPATH" )) { strlcpy(config->sagan_log_path, sagan_var2, sizeof(config->sagan_log_path)); } } /* Check for duplicate VAR's */ for (i = 0; i < counters->var_count; i++) { for ( check = i+1; check < counters->var_count; check ++) { if (!strcmp (var[check].var_name, var[i].var_name )) { Sagan_Log(S_ERROR, "[%s, line %d] Detected duplicate var '%s' & '%s'. Please correct this.", __FILE__, __LINE__, var[check].var_name, var[i].var_name); } } } /* "include */ if (!strcmp(sagan_option, "include" )) { strlcpy(tmpstring, Remove_Return(strtok_r(NULL, " ", &tok)), sizeof(tmpstring)); strlcpy(ruleset, Sagan_Var_To_Value(tmpstring), sizeof(ruleset)); Remove_Spaces(ruleset); filename=Get_Filename(ruleset); /* Get the file name to figure out "what" we're loading */ if (!strcmp(filename, "classification.config")) { Load_Classifications(ruleset); } if (!strcmp(filename, "reference.config")) { Load_Reference(ruleset); } if (!strcmp(filename, "gen-msg.map")) { Load_Gen_Map(ruleset); } if (!strcmp(filename, "protocol.map")) { Load_Protocol_Map(ruleset); } /* It's not reference.config, classification.config, gen-msg.map or protocol.map, it must be a ruleset */ if (strcmp(filename, "reference.config") && strcmp(filename, "classification.config") && strcmp(filename, "gen-msg.map") && strcmp(filename, "protocol.map")) { Load_Rules(ruleset); } } } fclose(sagancfg); /* Check rules for duplicate sid. We can't have that! */ for (i = 0; i < counters->rulecount; i++) { for ( check = i+1; check < counters->rulecount; check ++) { if (!strcmp (rulestruct[check].s_sid, rulestruct[i].s_sid )) { Sagan_Log(S_ERROR, "[%s, line %d] Detected duplicate signature id [sid] number %s. Please correct this.", __FILE__, __LINE__, rulestruct[check].s_sid, rulestruct[i].s_sid); } } } /* If we have the "send-to" option, verify the configuration has the proper smtpserver, etc. */ #ifdef HAVE_LIBESMTP if (config->sagan_esmtp_flag && !strcmp(config->sagan_esmtp_server, "")) { Sagan_Log(S_ERROR, "[%s, line %d] Configuration SMTP 'smtpserver' field is missing! |%s|", __FILE__, __LINE__, config->sagan_esmtp_server); } if (config->sagan_esmtp_flag && !strcmp(config->sagan_esmtp_from, "" )) { Sagan_Log(S_ERROR, "[%s, line %d] Configuration SMTP 'from' field is missing!", __FILE__, __LINE__); } #endif if ( config->sagan_is_file == 0 && config->sagan_fifo[0] == '\0' ) { Sagan_Log(S_ERROR, "[%s, line %d] No FIFO option found which is required! Aborting!", __FILE__, __LINE__); } if ( config->sagan_host[0] == '\0' ) { Sagan_Log(S_ERROR, "[%s, line %d] The 'sagan_host' option was not found and is required.", __FILE__, __LINE__); } #ifdef HAVE_LIBMAXMINDDB if ( config->have_geoip2 ) { if ( Sagan_Check_Var("$HOME_COUNTRY") == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] GeoIP2 is in use, but $HOME_COUNTRY was never set in your configuration. Abort.", __FILE__, __LINE__); } } #endif #ifdef HAVE_LIBLOGNORM if ( liblognorm_load == 0 ) { Sagan_Log(S_ERROR, "[%s, line %d] liblognorm is in use but 'normalize_file' is not set. Abort.", __FILE__, __LINE__); } #endif } sagan-1.1.2/src/sagan-aetas.c0000644000175000017500000001172612770372750014706 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-aetas.c * * This is for time based alerting. This allows rules to have specific * times/days to trigger or otherwise be ignored. * * Orignally by Champ Clark III. * Largely re-written by Champ Clark III & Adam Hall (ahall@quadrantsec.com) * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include "sagan.h" #include "sagan-aetas.h" #include "sagan-rules.h" struct _Rule_Struct *rulestruct; int Sagan_Check_Time(int rule_number) { char ct[64] = { 0 }; char buf[80] = { 0 }; int day_current; time_t now; struct tm ts; /* For current utime */ time_t t; struct tm *now_utime; sbool next_day = 0; sbool off_day = 0; char current_time_tmp[5]; char hour_tmp[3]; char minute_tmp[3]; int current_time; /* Get current utime / and day of the week */ t = time(NULL); now_utime=localtime(&t); strftime(ct, sizeof(ct), "%s", now_utime); day_current = localtime(&t)->tm_wday; time(&now); ts = *localtime(&now); strftime(hour_tmp, sizeof(buf), "%H", &ts); strftime(minute_tmp, sizeof(buf), "%M", &ts); snprintf(current_time_tmp, sizeof(current_time_tmp), "%s%s", hour_tmp, minute_tmp); current_time = atoi(current_time_tmp); strftime(buf, sizeof(buf), "%d", &ts); /* We check if rule extends to a new day */ if ( rulestruct[rule_number].aetas_start > rulestruct[rule_number].aetas_end ) { next_day = 1; } /* We check if current day is not one of our days */ if ( ! Sagan_Check_Day(rulestruct[rule_number].alert_days, day_current ) ) { off_day = 1; } /* We check that we are in the current day || that the previous day is one of our days and the rule goes over to a new day */ if ( Sagan_Check_Day(rulestruct[rule_number].alert_days, day_current ) || ( Sagan_Check_Day(rulestruct[rule_number].alert_days, day_current - 1) && next_day == 1) ) { /* We check if rule is in current day and does not extend to a new day */ if ( next_day == 0 && off_day == 0) { if ( current_time >= rulestruct[rule_number].aetas_start && current_time <= rulestruct[rule_number].aetas_end ) { return(true); } } /* We check if rule extends to a new day and that we are in a current day */ if ( next_day == 1 && off_day == 0 ) { if ( current_time >= rulestruct[rule_number].aetas_start || current_time <= rulestruct[rule_number].aetas_end ) { return(true); } } /* We check if rule is on an off day but the rule rolled into the day */ if ( next_day == 1 && off_day == 1 ) { if ( current_time <= rulestruct[rule_number].aetas_end ) { return(true); } } } return(false); } /****************************************************************************/ /* Sagan_Check_Day - Returns days if found in the "day" bitmask */ /****************************************************************************/ int Sagan_Check_Day(unsigned char day, int day_current) { if ( day_current == 0 ) { if (( day & SUNDAY ) == SUNDAY ) { return(true); } } if ( day_current == 1 ) { if (( day & MONDAY ) == MONDAY ) { return(true); } } if ( day_current == 2 ) { if (( day & TUESDAY ) == TUESDAY ) { return(true); } } if ( day_current == 3 ) { if (( day & WEDNESDAY ) == WEDNESDAY ) { return(true); } } if ( day_current == 4 ) { if (( day & THURSDAY ) == THURSDAY ) { return(true); } } if ( day_current == 5 ) { if (( day & FRIDAY ) == FRIDAY ) { return(true); } } if ( day_current == 6 ) { if (( day & SATURDAY ) == SATURDAY ) { return(true); } } return(false); } sagan-1.1.2/src/sagan-plog.c0000644000175000017500000001450712770372750014552 0ustar champchamp/* - sagan-plog.c is largely based of Marcus J. Ranum (2004) work known as plog.c. The original source can be located at: http://www.ranum.com/security/computer_security/code/plog.tar This code (sagan-plog.c) is redistributed under the same license Marcus J. Ranum specified in his original work. -- From the plog.c source code and applies to sagan-plog.c as well: Marcus J. Ranum, 2004 - All rights reserved This software may be used and redistributed free of charge, but may not be incorporated into a commercial product or offering without the author's permission. Plog - promiscuous syslog injector. Listens to a pcap/bpf interface, sucks up UDP syslog messages, finds the message within the packet, and injects it into /dev/log. -- Permission to implement the plog functionality was obtain by Champ Clark III from Marcus J. Ranum on Jan. 6th, 2011. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #ifdef HAVE_LIBPCAP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-config.h" #include "sagan-signal.h" #include "sagan-plog.h" struct _SaganDebug *debug; struct _SaganConfig *config; struct my_udphdr { 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 */ }; static void logpkt(u_char *,const struct pcap_pkthdr *,const u_char *); static int wiredevlog( _SaganConfig *); static int outf; void plog_handler( void ) { pcap_t *bp; struct bpf_program filtr; char *iface=NULL; char eb[PCAP_ERRBUF_SIZE]; iface = config->plog_interface; Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, "Initalizing Sagan syslog sniffer thread (PLOG)"); Sagan_Log(S_NORMAL, "Interface: %s", iface); Sagan_Log(S_NORMAL, "Packet filter: \"%s\"", config->plog_filter); Sagan_Log(S_NORMAL, "Log device: %s", config->plog_logdev); if ( config->plog_promiscuous ) { Sagan_Log(S_NORMAL, "Promiscuous is enabled."); } Sagan_Log(S_NORMAL, ""); if(iface == (char *)0) { if((iface = pcap_lookupdev(eb)) == (char *)0) Sagan_Log(S_ERROR, "[%s, line %d] Cannot get device: %s", __FILE__, __LINE__, eb); } bp = pcap_open_live(iface,4096,config->plog_promiscuous,0,eb); if(bp == (pcap_t *)0) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot open interface %s: %s", __FILE__, __LINE__, iface, eb); } /* Apply user defined filter */ if(pcap_compile(bp,&filtr,config->plog_filter,1,0)) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot compile filter: %s", __FILE__, __LINE__, eb); } if(pcap_setfilter(bp,&filtr)) { Sagan_Log(S_ERROR, "[%s, line %d] Cannot install filter in %s: %s", __FILE__, __LINE__, iface, eb); } /* wireup /dev/log; we can't use openlog() because these are going to be raw inputs */ if(wiredevlog(config)) { Remove_Lock_File(); Sagan_Log(S_ERROR, "[%s, line %d] Cannot open %s (Syslog not using SOCK_DGRAM?)", __FILE__, __LINE__, config->plog_logdev); } /* endless loop */ (void)pcap_loop(bp,-1,logpkt, NULL); pcap_close(bp); exit(0); } /* take a raw packet and write it to /dev/log... we are evil! */ static void logpkt(u_char *pass_args,const struct pcap_pkthdr *p,const u_char *pkt) { struct ether_header *eh; struct ip *ih; struct my_udphdr *u; int off; int len; char *l; if ( config->plog_flag ) { /* crack the ethernet header */ eh = (struct ether_header *)pkt; if(ntohs(eh->ether_type) != ETHERTYPE_IP) goto bad; /* crack the IP header */ ih = (struct ip *)(pkt + sizeof(struct ether_header)); off = ntohs(ih->ip_off); len = ntohs(ih->ip_len); /* short packet */ if(len > p->len) { goto bad; } /* frags we don't deal with */ if((off & 0x1fff) != 0) { goto bad; } /* weird - we ASKED for UDP */ if(ih->ip_p != IPPROTO_UDP) { goto bad; } /* line the UDP header up */ u = (struct my_udphdr *)(pkt + sizeof(struct ether_header) + (ih->ip_hl * 4)); if(ntohs(u->uh_ulen < 8)) { goto bad; } /* our log message ought to be just past the UDP header now... */ l = (char *)u + sizeof(struct udphdr); len = ntohs(u->uh_ulen) - sizeof(struct udphdr); if(debug->debugplog) { int x; /* I can't use Sagan_Log() here, so we dump to strerr. * have the check the tty (isatty()) before dumping or * strange things happen if detached and threaded * - Champ Clark III Jan 7th 2011 */ for(x = 0; x < len; x++) { if(isprint(l[x]) && (isatty(1)) ) fprintf(stderr,"%c",(int)(l[x])); else fprintf(stderr,"[0x%x]",(int)(l[x])); } if (isatty(1)) fprintf(stderr,"\n"); } /* send it! */ if(send(outf,l,len,0) < 0) { Sagan_Log(S_ERROR, "[%s, line %d] Send error", __FILE__, __LINE__); } return; bad: Sagan_Log(S_WARN, "[%s, line %d] Malformed packet received.", __FILE__, __LINE__); } } static int wiredevlog( _SaganConfig *config ) { struct sockaddr s; s.sa_family = AF_UNIX; (void)strncpy(s.sa_data,config->plog_logdev,sizeof(s.sa_data)); /* Might want to investigate SOCK_STREAM (see syslog-ng) in the future. * Right now, the syslog server must use SOCK_DGRAM */ if((outf = socket(AF_UNIX,SOCK_DGRAM,0)) < 0) { return(true); } if(connect(outf,&s,sizeof(s))) { return(true); } return(false); } #endif sagan-1.1.2/src/sagan-lockfile.h0000644000175000017500000000204612770372750015401 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Remove_Lock_File ( void ); void checklockfile ( void ); sagan-1.1.2/src/sagan-output.c0000644000175000017500000001165112770372750015146 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-output.c * * This becomes a threaded operation. This handles all I/O intensive output plugins */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include "sagan.h" #include "sagan-output.h" #include "sagan-rules.h" #include "sagan-config.h" #include "output-plugins/sagan-unified2.h" #include "output-plugins/sagan-alert.h" #include "output-plugins/sagan-external.h" #ifdef WITH_SNORTSAM #include "output-plugins/sagan-snortsam.h" #endif #ifdef WITH_SYSLOG #include "output-plugins/sagan-syslog.h" #endif #ifdef HAVE_LIBESMTP #include "output-plugins/sagan-esmtp.h" #endif #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) uintmax_t unified_event_id; #endif struct _SaganCounters *counters; struct _Rule_Struct *rulestruct; struct _SaganConfig *config; sbool nonthread_alert_lock=0; pthread_mutex_t SaganOutputNonThreadMutex=PTHREAD_MUTEX_INITIALIZER; void Sagan_Output( _SaganEvent *Event ) { /******************************/ /* Single threaded operations */ /******************************/ /* Single threaded */ pthread_mutex_lock(&SaganOutputNonThreadMutex); nonthread_alert_lock = 1; Sagan_Alert_File(Event); #if defined(HAVE_DNET_H) || defined(HAVE_DUMBNET_H) if ( config->sagan_unified2_flag && rulestruct[Event->found].flowbit_nounified2 == 0 ) { Sagan_Unified2( Event ); Sagan_Unified2LogPacketAlert( Event ); if ( Event->host[0] != '\0' ) { Sagan_WriteExtraData( Event, EVENT_INFO_XFF_IPV4 ); } /* These get normalized in sagan-engine.c and passed via * sagan-send-alert.c. When adding more, remember to add * them there! */ if ( Event->normalize_http_uri[0] != '\0' ) { Sagan_WriteExtraData( Event, EVENT_INFO_HTTP_URI ); } if ( Event->normalize_http_hostname[0] != '\0' ) { Sagan_WriteExtraData( Event, EVENT_INFO_HTTP_HOSTNAME ); } unified_event_id++; } #endif nonthread_alert_lock = 0; pthread_mutex_unlock(&SaganOutputNonThreadMutex); /* End single threaded */ /****************************************************************************/ /* Syslog output */ /****************************************************************************/ #ifdef WITH_SYSLOG if ( config->sagan_syslog_flag ) { Sagan_Alert_Syslog( Event ); } #endif /****************************************************************************/ /* Snortsam Support */ /****************************************************************************/ /* If we have a snortsam server && the rule requires snortsam..... */ #ifdef WITH_SNORTSAM if ( config->sagan_fwsam_flag && rulestruct[Event->found].fwsam_src_or_dst ) { Sagan_FWSam( Event ); } #endif /****************************************************************************/ /* SMTP/Email support (libesmtp) */ /****************************************************************************/ #ifdef HAVE_LIBESMTP if ( config->sagan_esmtp_flag ) { Sagan_ESMTP_Thread( Event ); } #endif /****************************************************************************/ /* External program support */ /****************************************************************************/ if ( config->sagan_ext_flag ) { Sagan_Ext_Thread( Event, config->sagan_extern ); } /****************************************************************************/ /* External program via rule */ /****************************************************************************/ if ( rulestruct[Event->found].external_flag == 1 ) { Sagan_Ext_Thread( Event, rulestruct[Event->found].external_program ); } } sagan-1.1.2/src/sagan.h0000644000175000017500000002617012770372750013617 0ustar champchamp/* $Id$ */ /* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan.h * * Sagan prototypes and definitions. * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #ifdef HAVE_LIBMAXMINDDB #include #endif #include "sagan-defs.h" typedef char sbool; /* From rsyslog. 'bool' causes compatiablity problems on OSX. "(small bool) I intentionally use char, to keep it slim so that many fit into the CPU cache!". */ #ifndef HAVE_STRLCPY int strlcpy(char *, const char *, size_t ); #endif #ifndef HAVE_STRLCAT int strlcat(char *, const char *, size_t ); #endif int Is_Numeric (char *); char *To_UpperC(char* const ); char *To_LowerC(char* const ); int Check_Endian( void ); void Usage( void ); void Sagan_Chroot( const char * ); char *Remove_Return(char *); char *Remove_Spaces(char *); char *Between_Quotes( char * ); double CalcPct(uintmax_t, uintmax_t); char *Replace_String(char *, char *, char *); char *Get_Filename(char *); uintmax_t Sagan_Value_To_Seconds (char *, uintmax_t); typedef struct _SaganDNSCache _SaganDNSCache; struct _SaganDNSCache { char hostname[64]; char src_ip[20]; }; typedef struct _Sagan_IPC_Counters _Sagan_IPC_Counters; struct _Sagan_IPC_Counters { int flowbit_count; int thresh_count_by_src; int thresh_count_by_dst; int thresh_count_by_dstport; int thresh_count_by_srcport; int thresh_count_by_username; int after_count_by_src; int after_count_by_dst; int after_count_by_srcport; int after_count_by_dstport; int after_count_by_username; int track_client_count; int track_clients_client_count; int track_clients_down; }; typedef struct _SaganCounters _SaganCounters; struct _SaganCounters { uintmax_t threshold_total; uintmax_t after_total; uintmax_t sagantotal; uintmax_t saganfound; uintmax_t sagan_output_drop; uintmax_t sagan_processor_drop; uintmax_t sagan_log_drop; uintmax_t dns_cache_count; uintmax_t dns_miss_count; uintmax_t fwsam_count; uintmax_t ignore_count; uintmax_t blacklist_count; uintmax_t alert_total; uintmax_t malformed_host; uintmax_t malformed_facility; uintmax_t malformed_priority; uintmax_t malformed_level; uintmax_t malformed_tag; uintmax_t malformed_date; uintmax_t malformed_time; uintmax_t malformed_program; uintmax_t malformed_message; uintmax_t worker_thread_exhaustion; uintmax_t blacklist_hit_count; uintmax_t blacklist_lookup_count; int thread_output_counter; int thread_processor_counter; int flowbit_total_counter; int var_count; int classcount; int rulecount; int refcount; int ruletotal; int genmapcount; int mapcount; int mapcount_message; int mapcount_program; int droplist_count; int flowbit_count; int flowbit_track_count; int brointel_addr_count; int brointel_domain_count; int brointel_file_hash_count; int brointel_url_count; int brointel_software_count; int brointel_email_count; int brointel_user_name_count; int brointel_file_name_count; int brointel_cert_hash_count; int brointel_dups; uintmax_t follow_flow_total; /* This will only be needed if follow_flow is an option */ uintmax_t follow_flow_drop; /* Amount of flows that did not match and were dropped */ #ifdef HAVE_LIBMAXMINDDB uintmax_t geoip2_hit; /* GeoIP2 hit count */ uintmax_t geoip2_lookup; /* Total lookups */ uintmax_t geoip2_miss; /* Misses (country not found) */ #endif #ifdef WITH_BLUEDOT uintmax_t bluedot_ip_cache_count; /* Bluedot cache processor */ uintmax_t bluedot_ip_cache_hit; /* Bluedot hit's from Cache */ uintmax_t bluedot_ip_positive_hit; uintmax_t bluedot_ip_total; uintmax_t bluedot_mdate; /* Hits , but where over a modification date */ uintmax_t bluedot_cdate; /* Hits , but where over a creation date */ uintmax_t bluedot_mdate_cache; /* Hits from cache , but where over a modification date */ uintmax_t bluedot_cdate_cache; /* Hits from cache , but where over a create date */ uintmax_t bluedot_error_count; uintmax_t bluedot_hash_cache_count; uintmax_t bluedot_hash_cache_hit; uintmax_t bluedot_hash_positive_hit; uintmax_t bluedot_hash_total; uintmax_t bluedot_url_cache_count; uintmax_t bluedot_url_cache_hit; uintmax_t bluedot_url_positive_hit; uintmax_t bluedot_url_total; uintmax_t bluedot_filename_cache_count; uintmax_t bluedot_filename_cache_hit; uintmax_t bluedot_filename_positive_hit; uintmax_t bluedot_filename_total; int bluedot_cat_count; #endif #ifdef HAVE_LIBESMTP uintmax_t esmtp_count_success; uintmax_t esmtp_count_failed; #endif }; typedef struct _SaganDebug _SaganDebug; struct _SaganDebug { sbool debugsyslog; sbool debugload; sbool debugfwsam; sbool debugexternal; sbool debugthreads; sbool debugflowbit; sbool debugengine; sbool debugbrointel; sbool debugmalformed; sbool debuglimits; sbool debugipc; #ifdef HAVE_LIBMAXMINDDB sbool debuggeoip2; #endif #ifdef HAVE_LIBLOGNORM sbool debugnormalize; #endif #ifdef HAVE_LIBESMTP sbool debugesmtp; #endif #ifdef HAVE_LIBPCAP sbool debugplog; #endif #ifdef WITH_BLUEDOT sbool debugbluedot; #endif }; typedef struct _Sagan_Proc_Syslog { char syslog_host[50]; char syslog_facility[50]; char syslog_priority[50]; char syslog_level[50]; char syslog_tag[50]; char syslog_date[50]; char syslog_time[50]; char syslog_program[50]; char syslog_message[MAX_SYSLOGMSG]; } _SaganProcSyslog; typedef struct _Sagan_Event { char *ip_src; char *ip_dst; int dst_port; int src_port; time_t event_time_sec; int found; char *fpri; /* ?? == *priority */ sbool endian; sbool drop; char *f_msg; /* message information */ char *time; char *date; char *priority; /* Syslog priority */ char *host; char *facility; char *level; char *tag; char *program; char *message; char *sid; char *rev; char *class; int pri; int ip_proto; char *normalize_http_uri; char *normalize_http_hostname; unsigned long generatorid; unsigned long alertid; } _SaganEvent; /* Thresholding structure by source */ typedef struct thresh_by_src_ipc thresh_by_src_ipc; struct thresh_by_src_ipc { uint32_t ipsrc; int count; uintmax_t utime; char sid[20]; int expire; }; /* Thresholding structure by destination */ typedef struct thresh_by_dst_ipc thresh_by_dst_ipc; struct thresh_by_dst_ipc { uint32_t ipdst; int count; uintmax_t utime; char sid[20]; int expire; }; /* Thresholding structure by source port */ typedef struct thresh_by_srcport_ipc thresh_by_srcport_ipc; struct thresh_by_srcport_ipc { uint32_t ipsrcport; int count; uint64_t utime; char sid[20]; int expire; }; /* Thresholding structure by destination port */ typedef struct thresh_by_dstport_ipc thresh_by_dstport_ipc; struct thresh_by_dstport_ipc { uint32_t ipdstport; int count; uint64_t utime; char sid[20]; int expire; }; /* Thesholding structure by username */ typedef struct thresh_by_username_ipc thresh_by_username_ipc; struct thresh_by_username_ipc { char username[128]; int count; uintmax_t utime; char sid[20]; int expire; }; /* After structure by source */ typedef struct after_by_src_ipc after_by_src_ipc; struct after_by_src_ipc { uint32_t ipsrc; int count; uintmax_t utime; char sid[20]; int expire; }; /* After structure by destination */ typedef struct after_by_dst_ipc after_by_dst_ipc; struct after_by_dst_ipc { uint32_t ipdst; int count; uintmax_t utime; char sid[20]; int expire; }; /* After structure by source port */ typedef struct after_by_srcport_ipc after_by_srcport_ipc; struct after_by_srcport_ipc { uint32_t ipsrcport; int count; uint64_t utime; char sid[20]; int expire; }; /* After structure by destination port */ typedef struct after_by_dstport_ipc after_by_dstport_ipc; struct after_by_dstport_ipc { uint32_t ipdstport; int count; uint64_t utime; char sid[20]; int expire; }; /* After structure by username */ typedef struct after_by_username_ipc after_by_username_ipc; struct after_by_username_ipc { char username[128]; int count; uintmax_t utime; char sid[20]; int expire; }; typedef struct _SaganVar _SaganVar; struct _SaganVar { char var_name[MAX_VAR_NAME_SIZE]; char var_value[MAX_VAR_VALUE_SIZE]; }; typedef struct network_addr { in_addr_t addr; int pfx; } network_addr_t; typedef struct _Sagan_Processor_Info _Sagan_Processor_Info; struct _Sagan_Processor_Info { char *processor_name; char *processor_facility; char *processor_priority; /* Syslog priority */ int processor_pri; /* Sagan priority */ char *processor_class; char *processor_tag; char *processor_rev; int processor_generator_id; }; void Sagan_Log( int, const char *, ... ); void Sagan_Droppriv( void ); char *DNS_Lookup( char * ); char *Sagan_Var_To_Value(char *); uint32_t IP2Bit (char * ); char *Bit2IP(uint32_t); int Sagan_Validate_HEX (const char *); char *Sagan_Content_Pipe(char *, int, const char *); sbool is_rfc1918 ( uint32_t ); char *Sagan_Replace_Sagan( char *, char *); int Sagan_Character_Count ( char *, char *); sbool Sagan_Wildcard( char *, char *); void Sagan_Open_Log_File( sbool, int ); int Sagan_Check_Var(const char *); char *Sagan_u32_Time_To_Human ( uintmax_t ); char *Netaddr_To_Range( char * ); char *Strip_Chars(const char *string, const char *chars); sbool Is_IP (char *str); char *Sagan_Return_Date( uintmax_t ); char *Sagan_Return_Time( uintmax_t ); sbool Sagan_File_Lock ( int ); sbool Sagan_File_Unlock ( int ); #if defined(F_GETPIPE_SZ) && defined(F_SETPIPE_SZ) void Sagan_Set_Pipe_Size( FILE * ); #endif sagan-1.1.2/src/sagan-processor.c0000644000175000017500000001233612770372750015626 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-processor.c * * This becomes a threaded operation. This handles all CPU intensive processes. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-ignore-list.h" #include "sagan-config.h" #include "parsers/parsers.h" #include "processors/sagan-engine.h" #include "processors/sagan-track-clients.h" #include "processors/sagan-blacklist.h" struct _Sagan_Ignorelist *SaganIgnorelist; struct _SaganCounters *counters; struct _Sagan_Proc_Syslog *SaganProcSyslog; struct _SaganConfig *config; struct _Rule_Struct *rulestruct; int proc_msgslot; /* Comes from sagan.c */ pthread_cond_t SaganProcDoWork; pthread_mutex_t SaganProcWorkMutex; pthread_cond_t SaganReloadCond; pthread_mutex_t SaganReloadMutex; pthread_mutex_t SaganIgnoreCounter=PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t SaganClientTracker=PTHREAD_MUTEX_INITIALIZER; void Sagan_Processor ( void ) { struct _Sagan_Proc_Syslog *SaganProcSyslog_LOCAL = NULL; SaganProcSyslog_LOCAL = malloc(sizeof(struct _Sagan_Proc_Syslog)); if ( SaganProcSyslog_LOCAL == NULL ) { Sagan_Log(S_ERROR, "[%s, line %d] Failed to allocate memory for SaganProcSyslog_LOCAL. Abort!", __FILE__, __LINE__); } memset(SaganProcSyslog_LOCAL, 0, sizeof(struct _Sagan_Proc_Syslog)); sbool ignore_flag=0; int i; for (;;) { pthread_mutex_lock(&SaganProcWorkMutex); while ( proc_msgslot == 0 ) pthread_cond_wait(&SaganProcDoWork, &SaganProcWorkMutex); if ( config->sagan_reload == 1 ) { pthread_cond_wait(&SaganReloadCond, &SaganReloadMutex); } proc_msgslot--; /* This was ++ before coming over, so we now -- it to get to * original value */ strlcpy(SaganProcSyslog_LOCAL->syslog_host, SaganProcSyslog[proc_msgslot].syslog_host, sizeof(SaganProcSyslog_LOCAL->syslog_host)); strlcpy(SaganProcSyslog_LOCAL->syslog_facility, SaganProcSyslog[proc_msgslot].syslog_facility, sizeof(SaganProcSyslog_LOCAL->syslog_facility)); strlcpy(SaganProcSyslog_LOCAL->syslog_priority, SaganProcSyslog[proc_msgslot].syslog_priority, sizeof(SaganProcSyslog_LOCAL->syslog_priority)); strlcpy(SaganProcSyslog_LOCAL->syslog_level, SaganProcSyslog[proc_msgslot].syslog_level, sizeof(SaganProcSyslog_LOCAL->syslog_level)); strlcpy(SaganProcSyslog_LOCAL->syslog_tag, SaganProcSyslog[proc_msgslot].syslog_tag, sizeof(SaganProcSyslog_LOCAL->syslog_tag)); strlcpy(SaganProcSyslog_LOCAL->syslog_date, SaganProcSyslog[proc_msgslot].syslog_date, sizeof(SaganProcSyslog_LOCAL->syslog_date)); strlcpy(SaganProcSyslog_LOCAL->syslog_time, SaganProcSyslog[proc_msgslot].syslog_time, sizeof(SaganProcSyslog_LOCAL->syslog_time)); strlcpy(SaganProcSyslog_LOCAL->syslog_program, SaganProcSyslog[proc_msgslot].syslog_program, sizeof(SaganProcSyslog_LOCAL->syslog_program)); strlcpy(SaganProcSyslog_LOCAL->syslog_message, SaganProcSyslog[proc_msgslot].syslog_message, sizeof(SaganProcSyslog_LOCAL->syslog_message)); pthread_mutex_unlock(&SaganProcWorkMutex); /* Check for general "drop" items. We do this first so we can save CPU later */ if ( config->sagan_droplist_flag ) { ignore_flag=0; for (i = 0; i < counters->droplist_count; i++) { if (Sagan_strstr(SaganProcSyslog_LOCAL->syslog_message, SaganIgnorelist[i].ignore_string)) { pthread_mutex_lock(&SaganIgnoreCounter); counters->ignore_count++; pthread_mutex_unlock(&SaganIgnoreCounter); ignore_flag=1; goto outside_loop; /* Stop processing from ignore list */ } } } outside_loop: /* If we're in a ignore state, then we can bypass the processors */ if ( ignore_flag == 0 ) { Sagan_Engine(SaganProcSyslog_LOCAL); if ( config->sagan_track_clients_flag ) { Sagan_Track_Clients( IP2Bit(SaganProcSyslog_LOCAL->syslog_host) ); } } // End if if (ignore_Flag) } // for (;;) Sagan_Log(S_WARN, "[%s, line %d] Holy cow! You should never see this message!", __FILE__, __LINE__); free(SaganProcSyslog_LOCAL); /* Should never make it here */ } sagan-1.1.2/src/sagan-flowbit.h0000644000175000017500000000311412770372750015254 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif void Sagan_Flowbit_Set( int, char *, char * ); int Sagan_Flowbit_Condition ( int, char *, char * ); int Sagan_Flowbit_Type ( char *, int, const char *); void Sagan_Flowbit_Cleanup(void); typedef struct _Sagan_Flowbit_Track _Sagan_Flowbit_Track; struct _Sagan_Flowbit_Track { char flowbit_name[64]; int flowbit_timeout; }; typedef struct _Sagan_IPC_Flowbit _Sagan_IPC_Flowbit; struct _Sagan_IPC_Flowbit { char flowbit_name[64]; sbool flowbit_state; uint32_t ip_src; uint32_t ip_dst; char username[64]; uintmax_t flowbit_date; uintmax_t flowbit_expire; int expire; }; sagan-1.1.2/src/sagan-stats.c0000644000175000017500000003151212770372750014742 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-stats.c * * Simply dumps statistics of Sagan to the user or via sagan.log * */ #ifdef HAVE_CONFIG_H #include "config.h" /* From autoconf */ #endif #include #include #include #include #include #include #include "sagan.h" #include "sagan-defs.h" #include "sagan-stats.h" #include "sagan-config.h" struct _SaganCounters *counters; struct _Sagan_IPC_Counters *counters_ipc; struct _SaganConfig *config; void Sagan_Statistics( void ) { char timet[20]; time_t t; struct tm *now; int seconds = 0; unsigned long total=0; int uptime_days; int uptime_abovedays; int uptime_hours; int uptime_abovehours; int uptime_minutes; int uptime_seconds; #ifdef WITH_BLUEDOT unsigned long bluedot_ip_total=0; unsigned long bluedot_hash_total=0; unsigned long bluedot_url_total=0; unsigned long bluedot_filename_total=0; #endif /* This is used to calulate the events per/second */ /* Champ Clark III - 11/17/2011 */ t = time(NULL); now=localtime(&t); strftime(timet, sizeof(timet), "%s", now); seconds = atol(timet) - atol(config->sagan_startutime); /* if statement prevents floating point exception */ if ( seconds != 0 ) { total = counters->sagantotal / seconds; #ifdef WITH_BLUEDOT bluedot_ip_total = counters->bluedot_ip_total / seconds; bluedot_hash_total = counters->bluedot_hash_total / seconds; bluedot_url_total = counters->bluedot_url_total / seconds; bluedot_filename_total = counters->bluedot_filename_total / seconds; #endif } if ((isatty(1))) { Sagan_Log(S_NORMAL, " ,-._,-. -[ Sagan Version %s - Engine Statistics ]-", VERSION); Sagan_Log(S_NORMAL, " \\/)\"(\\/"); Sagan_Log(S_NORMAL, " (_o_) Events processed : %" PRIu64 "", counters->sagantotal); Sagan_Log(S_NORMAL, " / \\/) Signatures matched : %" PRIu64 " (%.3f%%)", counters->saganfound, CalcPct(counters->saganfound, counters->sagantotal ) ); Sagan_Log(S_NORMAL, " (|| ||) Alerts : %" PRIu64 " (%.3f%%)", counters->alert_total, CalcPct( counters->alert_total, counters->sagantotal) ); Sagan_Log(S_NORMAL, " oo-oo After : %" PRIu64 " (%.3f%%)", counters->after_total, CalcPct( counters->after_total, counters->sagantotal) ); Sagan_Log(S_NORMAL, " Threshold : %" PRIu64 " (%.3f%%)", counters->threshold_total, CalcPct( counters->threshold_total, counters->sagantotal) ); Sagan_Log(S_NORMAL, " Dropped : %" PRIu64 " (%.3f%%)", counters->sagan_processor_drop + counters->sagan_output_drop + counters->sagan_log_drop, CalcPct(counters->sagan_processor_drop + counters->sagan_output_drop + counters->sagan_log_drop, counters->sagantotal) ); // Sagan_Log(S_NORMAL, " Malformed : h:%" PRIu64 "|f:%" PRIu64 "|p:%" PRIu64 "|l:%" PRIu64 "|T:%" PRIu64 "|d:%" PRIu64 "|T:%" PRIu64 "|P:%" PRIu64 "|M:%" PRIu64 "", counters->malformed_host, counters->malformed_facility, counters->malformed_priority, counters->malformed_level, counters->malformed_tag, counters->malformed_date, counters->malformed_time, counters->malformed_program, counters->malformed_message); Sagan_Log(S_NORMAL, " Thread Exhaustion : %" PRIu64 " (%.3f%%)", counters->worker_thread_exhaustion, CalcPct( counters->worker_thread_exhaustion, counters->sagantotal) ); if (config->sagan_droplist_flag) { Sagan_Log(S_NORMAL, " Ignored Input : %" PRIu64 " (%.3f%%)", counters->ignore_count, CalcPct(counters->ignore_count, counters->sagantotal) ); } #ifdef HAVE_LIBMAXMINDDB Sagan_Log(S_NORMAL, " GeoIP2 Hits: : %" PRIu64 " (%.3f%%)", counters->geoip2_hit, CalcPct( counters->geoip2_hit, counters->sagantotal) ); Sagan_Log(S_NORMAL, " GeoIP2 Lookups: : %" PRIu64 "", counters->geoip2_lookup); Sagan_Log(S_NORMAL, " GeoIP2 Misses : %" PRIu64 "", counters->geoip2_miss); #endif uptime_days = seconds / 86400; uptime_abovedays = seconds % 86400; uptime_hours = uptime_abovedays / 3600; uptime_abovehours = uptime_abovedays % 3600; uptime_minutes = uptime_abovehours / 60; uptime_seconds = uptime_abovehours % 60; Sagan_Log(S_NORMAL, " Uptime : %d days, %d hours, %d minutes, %d seconds.", uptime_days, uptime_hours, uptime_minutes, uptime_seconds); /* If processing from a file, don't display events per/second */ if ( config->sagan_is_file == 0 ) { if ( seconds < 60 || seconds == 0 ) { Sagan_Log(S_NORMAL, " Avg. events per/second : %lu [%lu of 60 seconds. Calculating...]", total, seconds); } else { Sagan_Log(S_NORMAL, " Avg. events per/second : %lu", total); } } else { Sagan_Log(S_NORMAL, " Avg. events per/second : %lu", total); } Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " -[ Sagan Processor Statistics ]-"); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " Dropped : %" PRIu64 " (%.3f%%)", counters->sagan_processor_drop, CalcPct(counters->sagan_processor_drop, counters->sagantotal) ); if (config->blacklist_flag) { Sagan_Log(S_NORMAL, " Blacklist Lookups : %" PRIu64 " (%.3f%%)", counters->blacklist_lookup_count, CalcPct(counters->blacklist_lookup_count, counters->sagantotal) ); Sagan_Log(S_NORMAL, " Blacklist Hits : %" PRIu64 " (%.3f%%)", counters->blacklist_hit_count, CalcPct(counters->blacklist_hit_count, counters->sagantotal) ); } if (config->sagan_track_clients_flag) { Sagan_Log(S_NORMAL, " Tracking/Down : %" PRIu64 " / %"PRIu64 " [%d minutes]" , counters_ipc->track_clients_client_count, counters_ipc->track_clients_down, config->pp_sagan_track_clients); } if (config->output_thread_flag) { Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " -[ Sagan Output Plugin Statistics ]-"); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL," Dropped : %" PRIu64 " (%.3f%%)", counters->sagan_output_drop, CalcPct(counters->sagan_output_drop, counters->sagantotal) ); } #ifdef HAVE_LIBESMTP if ( config->sagan_esmtp_flag ) { Sagan_Log(S_NORMAL, " Email Success/Failed : %" PRIu64 " / %" PRIu64 "" , counters->esmtp_count_success, counters->esmtp_count_failed); } #endif if (config->syslog_src_lookup) { Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " -[ Sagan DNS Cache Statistics ]-"); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " Cached : %" PRIu64 "", counters->dns_cache_count); Sagan_Log(S_NORMAL, " Missed : %" PRIu64 " (%.3f%%)", counters->dns_miss_count, CalcPct(counters->dns_miss_count, counters->dns_cache_count)); } Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " -[ Sagan follow_flow Statistics ]-"); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " Total : %" PRIu64 "", counters->follow_flow_total); Sagan_Log(S_NORMAL, " Dropped : %" PRIu64 " (%.3f%%)", counters->follow_flow_drop, CalcPct(counters->follow_flow_drop, counters->follow_flow_total)); #ifdef WITH_BLUEDOT if (config->bluedot_flag) { Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " -[ Sagan Bluedot Processor ]-"); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " * IP Reputation *"); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " IP addresses in cache : %" PRIu64 " (%.3f%%)", counters->bluedot_ip_cache_count, CalcPct(counters->bluedot_ip_cache_count, config->bluedot_max_cache)); Sagan_Log(S_NORMAL, " IP hits from cache : %" PRIu64 " (%.3f%%)", counters->bluedot_ip_cache_hit, CalcPct(counters->bluedot_ip_cache_hit, counters->bluedot_ip_cache_count)); Sagan_Log(S_NORMAL, " IP/Bluedot hits in logs : %" PRIu64 "", counters->bluedot_ip_positive_hit); Sagan_Log(S_NORMAL, " IP with date > mdate : %" PRIu64 "", counters->bluedot_mdate); Sagan_Log(S_NORMAL, " IP with date > cdate : %" PRIu64 "", counters->bluedot_cdate); Sagan_Log(S_NORMAL, " IP with date > mdate [cache] : %" PRIu64 "", counters->bluedot_mdate_cache); Sagan_Log(S_NORMAL, " IP with date > cdate [cache] : %" PRIu64 "", counters->bluedot_cdate_cache); Sagan_Log(S_NORMAL, " IP queries per/second : %lu", bluedot_ip_total); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " * File Hash *"); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " Hashes in cache : %" PRIu64 " (%.3f%%)", counters->bluedot_hash_cache_count, CalcPct(counters->bluedot_hash_cache_count, config->bluedot_max_cache)); Sagan_Log(S_NORMAL, " Hash hits from cache : %" PRIu64 " (%.3f%%)", counters->bluedot_hash_cache_hit, CalcPct(counters->bluedot_hash_cache_hit, counters->bluedot_hash_cache_count)); Sagan_Log(S_NORMAL, " Hash/Bluedot hits in logs : %" PRIu64 "", counters->bluedot_hash_positive_hit); Sagan_Log(S_NORMAL, " Hash queries per/second : %lu", bluedot_hash_total); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " * URL Reputation *"); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " URLs in cache : %" PRIu64 " (%.3f%%)", counters->bluedot_url_cache_count, CalcPct(counters->bluedot_url_cache_count, config->bluedot_max_cache)); Sagan_Log(S_NORMAL, " URL hits from cache : %" PRIu64 " (%.3f%%)", counters->bluedot_url_cache_hit, CalcPct(counters->bluedot_url_cache_hit, counters->bluedot_url_cache_count)); Sagan_Log(S_NORMAL, " URL/Bluedot hits in logs : %" PRIu64 "", counters->bluedot_url_positive_hit); Sagan_Log(S_NORMAL, " URL queries per/second : %lu", bluedot_url_total); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " * Filename Reputation *"); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " Filenames in cache : %" PRIu64 " (%.3f%%)", counters->bluedot_filename_cache_count, CalcPct(counters->bluedot_filename_cache_count, config->bluedot_max_cache)); Sagan_Log(S_NORMAL, " Filename hits from cache : %" PRIu64 " (%.3f%%)", counters->bluedot_filename_cache_hit, CalcPct(counters->bluedot_filename_cache_hit, counters->bluedot_filename_cache_count)); Sagan_Log(S_NORMAL, " Filename/Bluedot hits in logs : %" PRIu64 "", counters->bluedot_filename_positive_hit); Sagan_Log(S_NORMAL, " URL queries per/second : %lu", bluedot_filename_total); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " * Bluedot Combined Statistics *"); Sagan_Log(S_NORMAL, ""); Sagan_Log(S_NORMAL, " Lookup error count : %" PRIu64 "", counters->bluedot_error_count); Sagan_Log(S_NORMAL, " Total query rate/per second : %lu", bluedot_ip_total + bluedot_hash_total + bluedot_url_total + bluedot_filename_total); } #endif Sagan_Log(S_NORMAL, "-------------------------------------------------------------------------------"); } } sagan-1.1.2/autogen.sh0000755000175000017500000000011012770372750013551 0ustar champchamp#!/bin/sh # This generates makefiles, configure, etc. autoreconf -vfi sagan-1.1.2/configure0000755000175000017500000113236012770373005013467 0ustar champchamp#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="src" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBLOGNORM_LIBS LIBLOGNORM_CFLAGS LIBESTR_LIBS LIBESTR_CFLAGS LIBFASTJSON_LIBS LIBFASTJSON_CFLAGS am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS SIMD_FLAGS LIBOBJS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM VERSION ENDIAN MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_snortsam enable_bluedot enable_esmtp enable_geoip2 enable_syslog enable_system_strstr with_esmtp_includes with_esmtp_libraries with_geoip2_includes with_geoip2_libraries enable_lognorm with_lognorm_includes with_lognorm_libraries enable_libfastjson with_libfastjson_includes with_libfastjson_c_libraries enable_libpcap with_libpcap_includes with_libpcap_libraries enable_libdnet with_libdnet_includes with_libdnet_libraries enable_dependency_tracking enable_silent_rules ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR CCAS CCASFLAGS LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS LIBESTR_CFLAGS LIBESTR_LIBS LIBLOGNORM_CFLAGS LIBLOGNORM_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-snortsam Disable Snortsam support. --enable-bluedot Enable Quadrant\'s "Bluedot" lookups. --enable-esmtp Enable libesmtp support. --enable-geoip2 Enable Maxmind GeoIP2 support. --disable-syslog Disable syslog support. --enable-system-strstr Enable system strstr. --disable-lognorm Disable Lognorm (liblognorm) support. --disable-libfastjson Disable libfastjson support. --disable-libpcap Disable libpcap (plog) support. --disable-libdnet Disable libdnet (unified2) support. --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-esmtp-includes=DIR libesmtp include directory --with-esmtp-libraries=DIR libesmtp library directory --with-geoip2-includes=DIR Maxmind GeoIP2 include directory --with-geoip2-libraries=DIR Maxmind GeoIP2 library directory --with-lognorm-includes=DIR liblognorm include directory --with-lognorm-libraries=DIR liblognorm library directory --with-libfastjson-includes=DIR libfastjson include directory --with-libfastjson-libraries=DIR libfastjson library directory --with-libpcap-includes=DIR libpcap include directory --with-libpcap-libraries=DIR libpcap library directory --with-libdnet-includes=DIR libdnet include directory --with-libdnet-libraries=DIR libdnet library directory Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) LIBFASTJSON_CFLAGS C compiler flags for LIBFASTJSON, overriding pkg-config LIBFASTJSON_LIBS linker flags for LIBFASTJSON, overriding pkg-config LIBESTR_CFLAGS C compiler flags for LIBESTR, overriding pkg-config LIBESTR_LIBS linker flags for LIBESTR, overriding pkg-config LIBLOGNORM_CFLAGS C compiler flags for LIBLOGNORM, overriding pkg-config LIBLOGNORM_LIBS linker flags for LIBLOGNORM, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE #VERSION=`cat $srcdir/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'` VERSION=`cat src/version.h | grep "#define VERSION " | sed -e 's/^.*\"\(.*\)\"/\1/'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) ENDIAN=big ;; #( no) ENDIAN=little ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac # Check whether --enable-snortsam was given. if test "${enable_snortsam+set}" = set; then : enableval=$enable_snortsam; SNORTSAM="$enableval" else SNORTSAM="yes" fi # Check whether --enable-bluedot was given. if test "${enable_bluedot+set}" = set; then : enableval=$enable_bluedot; BLUEDOT="$enableval" else BLUEDOT="no" fi # Check whether --enable-esmtp was given. if test "${enable_esmtp+set}" = set; then : enableval=$enable_esmtp; ESMTP="$enableval" else ESMTP="no" fi # Check whether --enable-geoip2 was given. if test "${enable_geoip2+set}" = set; then : enableval=$enable_geoip2; GEOIP2="$enableval" else GEOIP2="no" fi # Check whether --enable-syslog was given. if test "${enable_syslog+set}" = set; then : enableval=$enable_syslog; SYSLOG="$enableval" else SYSLOG="yes" fi # Check whether --enable-system-strstr was given. if test "${enable_system_strstr+set}" = set; then : enableval=$enable_system_strstr; SYSSTRSTR="$enableval" else SYSSTRSTR="no" fi # Check whether --with-esmtp_includes was given. if test "${with_esmtp_includes+set}" = set; then : withval=$with_esmtp_includes; with_esmtp_includes="$withval" else with_esmtp_includes="no" fi # Check whether --with-esmtp_libraries was given. if test "${with_esmtp_libraries+set}" = set; then : withval=$with_esmtp_libraries; with_esmtp_libraries="$withval" else with_esmtp_libraries="no" fi if test "x$with_esmtp_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_esmtp_includes}" fi if test "x$with_esmtp_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_esmtp_libraries}" fi # Check whether --with-geoip2_includes was given. if test "${with_geoip2_includes+set}" = set; then : withval=$with_geoip2_includes; with_geoip2_includes="$withval" else with_geoip2_includes="no" fi # Check whether --with-geoip2_libraries was given. if test "${with_geoip2_libraries+set}" = set; then : withval=$with_geoip2_libraries; with_geoip2_libraries="$withval" else with_geoip2_libraries="no" fi if test "x$with_geoip2_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_geoip2_includes}" fi if test "x$with_geoip2_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_geoip2_libraries}" fi # Check whether --enable-lognorm was given. if test "${enable_lognorm+set}" = set; then : enableval=$enable_lognorm; LOGNORM="$enableval" else LOGNORM="yes" fi # Check whether --with-lognorm_includes was given. if test "${with_lognorm_includes+set}" = set; then : withval=$with_lognorm_includes; with_lognorm_includes="$withval" else with_lognorm_includes="no" fi # Check whether --with-lognorm_libraries was given. if test "${with_lognorm_libraries+set}" = set; then : withval=$with_lognorm_libraries; with_lognorm_libraries="$withval" else with_lognorm_libraries="no" fi if test "x$with_lognorm_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_lognorm_includes}" fi if test "x$with_lognorm_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_lognorm_libraries}" fi # -- # Check whether --enable-libfastjson was given. if test "${enable_libfastjson+set}" = set; then : enableval=$enable_libfastjson; FASTJSON="$enableval" else FASTJSON="yes" fi # Check whether --with-libfastjson_includes was given. if test "${with_libfastjson_includes+set}" = set; then : withval=$with_libfastjson_includes; with_libfastjson_includes="$withval" else with_libfastjson_includes="no" fi # Check whether --with-libfastjson_c_libraries was given. if test "${with_libfastjson_c_libraries+set}" = set; then : withval=$with_libfastjson_c_libraries; with_libfastjson_libraries="$withval" else with_libfastjson_libraries="no" fi if test "x$with_libfastjson_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libfastjson_includes}" fi if test "x$with_libfastjson_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libfastjson_libraries}" fi # -- # Check whether --enable-libpcap was given. if test "${enable_libpcap+set}" = set; then : enableval=$enable_libpcap; LIBPCAP="$enableval" else LIBPCAP="no" fi # Check whether --with-libpcap_includes was given. if test "${with_libpcap_includes+set}" = set; then : withval=$with_libpcap_includes; with_libpcap_includes="$withval" else with_libpcap_includes="no" fi # Check whether --with-libpcap_libraries was given. if test "${with_libpcap_libraries+set}" = set; then : withval=$with_libpcap_libraries; with_libpcap_libraries="$withval" else with_libpcap_libraries="no" fi if test "x$with_libpcap_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libpcap_includes}" fi if test "x$with_libpcap_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libpcap_libraries}" fi # Check whether --enable-libdnet was given. if test "${enable_libdnet+set}" = set; then : enableval=$enable_libdnet; LIBDNET="$enableval" else LIBDNET="yes" fi # Check whether --with-libdnet_includes was given. if test "${with_libdnet_includes+set}" = set; then : withval=$with_libdnet_includes; with_libdnet_includes="$withval" else with_libdnet_includes="no" fi # Check whether --with-libdnet_libraries was given. if test "${with_libdnet_libraries+set}" = set; then : withval=$with_libdnet_libraries; with_libdnet_libraries="$withval" else with_libdnet_libraries="no" fi if test "x$with_libdnet_includes" != "xno"; then CPPFLAGS="${CPPFLAGS} -I${with_libdnet_includes}" fi if test "x$with_libdnet_libraries" != "xno"; then LDFLAGS="${LDFLAGS} -L${with_libdnet_libraries}" fi am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } 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. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi 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=sagan VERSION=${VERSION} cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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 cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers config.h" # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi for ac_header in stdio.h stdlib.h sys/types.h unistd.h stdint.h inttypes.h pthread.h ctype.h errno.h fcntl.h sys/stat.h string.h getopt.h time.h pcre.h stdarg.h limits.h stdbool.h arpa/inet.h netinet/in.h sys/time.h sys/socket.h sys/mmap.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 $as_echo "$ac_cv_sizeof_size_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF # F_SETPIPE_SZ in fcntl.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_SETPIPE_SZ in fcntl.h" >&5 $as_echo_n "checking for F_SETPIPE_SZ in fcntl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GNU_SOURCE #include #ifdef F_SETPIPE_SZ yes_have_f_setpipe_sz #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes_have_f_setpipe_sz" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_SETPIPE_SZ /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: F_SETPIPE_SZ not found, cannot alter FIFO" >&5 $as_echo "$as_me: F_SETPIPE_SZ not found, cannot alter FIFO" >&6;} fi rm -f conftest* # F_GETPIPE_SZ in fcntl.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_GETPIPE_SZ in fcntl.h" >&5 $as_echo_n "checking for F_GETPIPE_SZ in fcntl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _GNU_SOURCE #include #ifdef F_GETPIPE_SZ yes_have_f_getpipe_sz #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes_have_f_getpipe_sz" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_GETPIPE_SZ /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: F_GETPIPE_SZ not found, cannot alter FIFO" >&5 $as_echo "$as_me: F_GETPIPE_SZ not found, cannot alter FIFO" >&6;} fi rm -f conftest* # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi # Checks for library functions. if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$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 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRFTIME 1 _ACEOF else # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strftime (); int main () { return strftime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_strftime=yes else ac_cv_lib_intl_strftime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi fi done ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "#define HAVE_REALLOC 1" >>confdefs.h else $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac $as_echo "#define realloc rpl_realloc" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid output" >&5 $as_echo_n "checking for x86 cpuid output... " >&6; } if ${ax_cv_gcc_x86_cpuid_+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = , eax, ebx, ecx, edx; FILE *f; __asm__("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-AVX xgetbv output" >&5 $as_echo_n "checking for x86-AVX xgetbv output... " >&6; } if ${ax_cv_gcc_x86_avx_xgetbv_+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_avx_xgetbv_=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = , eax, edx; FILE *f; /* Opcodes for xgetbv */ __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (eax), "=d" (edx) : "c" (op)); f = fopen("conftest_xgetbv", "w"); if (!f) return 1; fprintf(f, "%x:%x\n", eax, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_avx_xgetbv_=`cat conftest_xgetbv`; rm -f conftest_xgetbv else ax_cv_gcc_x86_avx_xgetbv_=unknown; rm -f conftest_xgetbv fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_avx_xgetbv_" >&5 $as_echo "$ax_cv_gcc_x86_avx_xgetbv_" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu case $host_cpu in powerpc*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether altivec is supported" >&5 $as_echo_n "checking whether altivec is supported... " >&6; } if ${ax_cv_have_altivec_ext+:} false; then : $as_echo_n "(cached) " >&6 else if test `/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.optional.altivec` != 0; then if test `/usr/sbin/sysctl -n hw.optional.altivec` = 1; then ax_cv_have_altivec_ext=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_altivec_ext" >&5 $as_echo "$ax_cv_have_altivec_ext" >&6; } if test "$ax_cv_have_altivec_ext" = yes; then $as_echo "#define HAVE_ALTIVEC /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -faltivec" >&5 $as_echo_n "checking whether C compiler accepts -faltivec... " >&6; } if ${ax_cv_check_cflags___faltivec+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -faltivec" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___faltivec=yes else ax_cv_check_cflags___faltivec=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___faltivec" >&5 $as_echo "$ax_cv_check_cflags___faltivec" >&6; } if test x"$ax_cv_check_cflags___faltivec" = xyes; then : SIMD_FLAGS="$SIMD_FLAGS -faltivec" else : fi fi ;; i[3456]86*|x86_64*|amd64*) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0x00000001 output" >&5 $as_echo_n "checking for x86 cpuid 0x00000001 output... " >&6; } if ${ax_cv_gcc_x86_cpuid_0x00000001+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_cpuid_0x00000001=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 0x00000001, eax, ebx, ecx, edx; FILE *f; __asm__("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_cpuid_0x00000001=`cat conftest_cpuid`; rm -f conftest_cpuid else ax_cv_gcc_x86_cpuid_0x00000001=unknown; rm -f conftest_cpuid fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0x00000001" >&5 $as_echo "$ax_cv_gcc_x86_cpuid_0x00000001" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ecx=0 edx=0 if test "$ax_cv_gcc_x86_cpuid_0x00000001" != "unknown"; then ecx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 3` edx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 4` fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmx is supported" >&5 $as_echo_n "checking whether mmx is supported... " >&6; } if ${ax_cv_have_mmx_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_mmx_ext=no if test "$((0x$edx>>23&0x01))" = 1; then ax_cv_have_mmx_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_mmx_ext" >&5 $as_echo "$ax_cv_have_mmx_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse is supported" >&5 $as_echo_n "checking whether sse is supported... " >&6; } if ${ax_cv_have_sse_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse_ext=no if test "$((0x$edx>>25&0x01))" = 1; then ax_cv_have_sse_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse_ext" >&5 $as_echo "$ax_cv_have_sse_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse2 is supported" >&5 $as_echo_n "checking whether sse2 is supported... " >&6; } if ${ax_cv_have_sse2_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse2_ext=no if test "$((0x$edx>>26&0x01))" = 1; then ax_cv_have_sse2_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse2_ext" >&5 $as_echo "$ax_cv_have_sse2_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse3 is supported" >&5 $as_echo_n "checking whether sse3 is supported... " >&6; } if ${ax_cv_have_sse3_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse3_ext=no if test "$((0x$ecx&0x01))" = 1; then ax_cv_have_sse3_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse3_ext" >&5 $as_echo "$ax_cv_have_sse3_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ssse3 is supported" >&5 $as_echo_n "checking whether ssse3 is supported... " >&6; } if ${ax_cv_have_ssse3_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_ssse3_ext=no if test "$((0x$ecx>>9&0x01))" = 1; then ax_cv_have_ssse3_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_ssse3_ext" >&5 $as_echo "$ax_cv_have_ssse3_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse4.1 is supported" >&5 $as_echo_n "checking whether sse4.1 is supported... " >&6; } if ${ax_cv_have_sse41_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse41_ext=no if test "$((0x$ecx>>19&0x01))" = 1; then ax_cv_have_sse41_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse41_ext" >&5 $as_echo "$ax_cv_have_sse41_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse4.2 is supported" >&5 $as_echo_n "checking whether sse4.2 is supported... " >&6; } if ${ax_cv_have_sse42_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_sse42_ext=no if test "$((0x$ecx>>20&0x01))" = 1; then ax_cv_have_sse42_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse42_ext" >&5 $as_echo "$ax_cv_have_sse42_ext" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether avx is supported by processor" >&5 $as_echo_n "checking whether avx is supported by processor... " >&6; } if ${ax_cv_have_avx_cpu_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_avx_cpu_ext=no if test "$((0x$ecx>>28&0x01))" = 1; then ax_cv_have_avx_cpu_ext=yes fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_avx_cpu_ext" >&5 $as_echo "$ax_cv_have_avx_cpu_ext" >&6; } if test x"$ax_cv_have_avx_cpu_ext" = x"yes"; then 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-AVX xgetbv 0x00000000 output" >&5 $as_echo_n "checking for x86-AVX xgetbv 0x00000000 output... " >&6; } if ${ax_cv_gcc_x86_avx_xgetbv_0x00000000+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ax_cv_gcc_x86_avx_xgetbv_0x00000000=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int op = 0x00000000, eax, edx; FILE *f; /* Opcodes for xgetbv */ __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (eax), "=d" (edx) : "c" (op)); f = fopen("conftest_xgetbv", "w"); if (!f) return 1; fprintf(f, "%x:%x\n", eax, edx); fclose(f); return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ax_cv_gcc_x86_avx_xgetbv_0x00000000=`cat conftest_xgetbv`; rm -f conftest_xgetbv else ax_cv_gcc_x86_avx_xgetbv_0x00000000=unknown; rm -f conftest_xgetbv fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_avx_xgetbv_0x00000000" >&5 $as_echo "$ax_cv_gcc_x86_avx_xgetbv_0x00000000" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu xgetbv_eax="0" if test x"$ax_cv_gcc_x86_avx_xgetbv_0x00000000" != x"unknown"; then xgetbv_eax=`echo $ax_cv_gcc_x86_avx_xgetbv_0x00000000 | cut -d ":" -f 1` fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether avx is supported by operating system" >&5 $as_echo_n "checking whether avx is supported by operating system... " >&6; } if ${ax_cv_have_avx_ext+:} false; then : $as_echo_n "(cached) " >&6 else ax_cv_have_avx_ext=no if test "$((0x$ecx>>27&0x01))" = 1; then if test "$((0x$xgetbv_eax&0x6))" = 6; then ax_cv_have_avx_ext=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_avx_ext" >&5 $as_echo "$ax_cv_have_avx_ext" >&6; } if test x"$ax_cv_have_avx_ext" = x"no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports AVX, but your operating system doesn't" >&5 $as_echo "$as_me: WARNING: Your processor supports AVX, but your operating system doesn't" >&2;} fi fi if test "$ax_cv_have_mmx_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mmmx" >&5 $as_echo_n "checking whether C compiler accepts -mmmx... " >&6; } if ${ax_cv_check_cflags___mmmx+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -mmmx" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___mmmx=yes else ax_cv_check_cflags___mmmx=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mmmx" >&5 $as_echo "$ax_cv_check_cflags___mmmx" >&6; } if test x"$ax_cv_check_cflags___mmmx" = xyes; then : ax_cv_support_mmx_ext=yes else : fi if test x"$ax_cv_support_mmx_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mmmx" $as_echo "#define HAVE_MMX /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports mmx instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports mmx instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse" >&5 $as_echo_n "checking whether C compiler accepts -msse... " >&6; } if ${ax_cv_check_cflags___msse+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse=yes else ax_cv_check_cflags___msse=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse" >&5 $as_echo "$ax_cv_check_cflags___msse" >&6; } if test x"$ax_cv_check_cflags___msse" = xyes; then : ax_cv_support_sse_ext=yes else : fi if test x"$ax_cv_support_sse_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse" $as_echo "#define HAVE_SSE /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse2_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse2" >&5 $as_echo_n "checking whether C compiler accepts -msse2... " >&6; } if ${ax_cv_check_cflags___msse2+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse2=yes else ax_cv_check_cflags___msse2=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse2" >&5 $as_echo "$ax_cv_check_cflags___msse2" >&6; } if test x"$ax_cv_check_cflags___msse2" = xyes; then : ax_cv_support_sse2_ext=yes else : fi if test x"$ax_cv_support_sse2_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse2" $as_echo "#define HAVE_SSE2 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse2 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse2 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse3_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse3" >&5 $as_echo_n "checking whether C compiler accepts -msse3... " >&6; } if ${ax_cv_check_cflags___msse3+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse3=yes else ax_cv_check_cflags___msse3=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse3" >&5 $as_echo "$ax_cv_check_cflags___msse3" >&6; } if test x"$ax_cv_check_cflags___msse3" = xyes; then : ax_cv_support_sse3_ext=yes else : fi if test x"$ax_cv_support_sse3_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse3" $as_echo "#define HAVE_SSE3 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse3 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse3 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_ssse3_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mssse3" >&5 $as_echo_n "checking whether C compiler accepts -mssse3... " >&6; } if ${ax_cv_check_cflags___mssse3+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -mssse3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___mssse3=yes else ax_cv_check_cflags___mssse3=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mssse3" >&5 $as_echo "$ax_cv_check_cflags___mssse3" >&6; } if test x"$ax_cv_check_cflags___mssse3" = xyes; then : ax_cv_support_ssse3_ext=yes else : fi if test x"$ax_cv_support_ssse3_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mssse3" $as_echo "#define HAVE_SSSE3 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports ssse3 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports ssse3 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse41_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse4.1" >&5 $as_echo_n "checking whether C compiler accepts -msse4.1... " >&6; } if ${ax_cv_check_cflags___msse4_1+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse4.1" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse4_1=yes else ax_cv_check_cflags___msse4_1=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse4_1" >&5 $as_echo "$ax_cv_check_cflags___msse4_1" >&6; } if test x"$ax_cv_check_cflags___msse4_1" = xyes; then : ax_cv_support_sse41_ext=yes else : fi if test x"$ax_cv_support_sse41_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse4.1" $as_echo "#define HAVE_SSE4_1 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse4.1 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse4.1 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_sse42_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse4.2" >&5 $as_echo_n "checking whether C compiler accepts -msse4.2... " >&6; } if ${ax_cv_check_cflags___msse4_2+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -msse4.2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___msse4_2=yes else ax_cv_check_cflags___msse4_2=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse4_2" >&5 $as_echo "$ax_cv_check_cflags___msse4_2" >&6; } if test x"$ax_cv_check_cflags___msse4_2" = xyes; then : ax_cv_support_sse42_ext=yes else : fi if test x"$ax_cv_support_sse42_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse4.2" $as_echo "#define HAVE_SSE4_2 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports sse4.2 instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports sse4.2 instructions but not your compiler, can you try another compiler?" >&2;} fi fi if test "$ax_cv_have_avx_ext" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mavx" >&5 $as_echo_n "checking whether C compiler accepts -mavx... " >&6; } if ${ax_cv_check_cflags___mavx+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -mavx" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___mavx=yes else ax_cv_check_cflags___mavx=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mavx" >&5 $as_echo "$ax_cv_check_cflags___mavx" >&6; } if test x"$ax_cv_check_cflags___mavx" = xyes; then : ax_cv_support_avx_ext=yes else : fi if test x"$ax_cv_support_avx_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mavx" $as_echo "#define HAVE_AVX /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your processor supports avx instructions but not your compiler, can you try another compiler?" >&5 $as_echo "$as_me: WARNING: Your processor supports avx instructions but not your compiler, can you try another compiler?" >&2;} fi fi ;; esac # By default we simply use the C compiler to build assembly code. test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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_CCAS_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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_CCAS_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CCAS_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then am__fastdepCCAS_TRUE= am__fastdepCCAS_FALSE='#' else am__fastdepCCAS_TRUE='#' am__fastdepCCAS_FALSE= fi for ac_func in select strstr strchr strcmp strlen sizeof write snprintf strncat strlcat strlcpy getopt_long gethostbyname socket htons connect send recv dup2 strspn strdup memset access ftruncate strerror mmap shm_open do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcre" >&5 $as_echo_n "checking for main in -lpcre... " >&6; } if ${ac_cv_lib_pcre_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcre $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcre_main=yes else ac_cv_lib_pcre_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_main" >&5 $as_echo "$ac_cv_lib_pcre_main" >&6; } if test "x$ac_cv_lib_pcre_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPCRE 1 _ACEOF LIBS="-lpcre $LIBS" else as_fn_error $? "Sagan needs PCRE installed. Please see http://www.pcre.org." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5 $as_echo_n "checking for main in -lpthread... " >&6; } if ${ac_cv_lib_pthread_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_main=yes else ac_cv_lib_pthread_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5 $as_echo "$ac_cv_lib_pthread_main" >&6; } if test "x$ac_cv_lib_pthread_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" else as_fn_error $? "Sagan needs pthreads!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 $as_echo_n "checking for main in -lm... " >&6; } if ${ac_cv_lib_m_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_main=yes else ac_cv_lib_m_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 $as_echo "$ac_cv_lib_m_main" >&6; } if test "x$ac_cv_lib_m_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else as_fn_error $? "Sagan needs libm!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrt" >&5 $as_echo_n "checking for main in -lrt... " >&6; } if ${ac_cv_lib_rt_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_main=yes else ac_cv_lib_rt_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_main" >&5 $as_echo "$ac_cv_lib_rt_main" >&6; } if test "x$ac_cv_lib_rt_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" else as_fn_error $? "Sagan needs librt!" "$LINENO" 5 fi if test "$SYSSTRSTR" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using build in strstr()..." >&5 $as_echo "using build in strstr()..." >&6; } $as_echo "#define WITH_SYSSTRSTR 1" >>confdefs.h fi if test "$SYSLOG" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Syslog support is enabled -------" >&5 $as_echo "------- Syslog support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : fi $as_echo "#define WITH_SYSLOG 1" >>confdefs.h fi if test "$GEOIP2" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Maxmind GeoIP2 support is enabled -------" >&5 $as_echo "------- Maxmind GeoIP2 support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "maxminddb.h" "ac_cv_header_maxminddb_h" "$ac_includes_default" if test "x$ac_cv_header_maxminddb_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmaxminddb" >&5 $as_echo_n "checking for main in -lmaxminddb... " >&6; } if ${ac_cv_lib_maxminddb_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmaxminddb $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_maxminddb_main=yes else ac_cv_lib_maxminddb_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_maxminddb_main" >&5 $as_echo "$ac_cv_lib_maxminddb_main" >&6; } if test "x$ac_cv_lib_maxminddb_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMAXMINDDB 1 _ACEOF LIBS="-lmaxminddb $LIBS" else as_fn_error $? "The Maxmind GeoIP2 library cannot be found. If you're not interested in GeoIP2 support use the --disable-geoip2 flag." "$LINENO" 5 fi fi if test "$ESMTP" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libesmtp support is enabled -------" >&5 $as_echo "------- libesmtp support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "libesmtp.h" "ac_cv_header_libesmtp_h" "$ac_includes_default" if test "x$ac_cv_header_libesmtp_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lesmtp" >&5 $as_echo_n "checking for main in -lesmtp... " >&6; } if ${ac_cv_lib_esmtp_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lesmtp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_esmtp_main=yes else ac_cv_lib_esmtp_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_esmtp_main" >&5 $as_echo "$ac_cv_lib_esmtp_main" >&6; } if test "x$ac_cv_lib_esmtp_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBESMTP 1 _ACEOF LIBS="-lesmtp $LIBS" else as_fn_error $? "The libesmtp library cannot be found. If you're not interested in libesmtp support use the --disable-esmtp flag." "$LINENO" 5 fi fi if test "$FASTJSON" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libfastjson support is enabled -------" >&5 $as_echo "------- libfastjson support is enabled -------" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi if test "$LOGNORM" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- liblognorm support is enabled -------" >&5 $as_echo "------- liblognorm support is enabled -------" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBESTR" >&5 $as_echo_n "checking for LIBESTR... " >&6; } if test -n "$LIBESTR_CFLAGS"; then pkg_cv_LIBESTR_CFLAGS="$LIBESTR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libestr >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libestr >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBESTR_CFLAGS=`$PKG_CONFIG --cflags "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBESTR_LIBS"; then pkg_cv_LIBESTR_LIBS="$LIBESTR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libestr >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libestr >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBESTR_LIBS=`$PKG_CONFIG --libs "libestr >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBESTR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libestr >= 0.0.0" 2>&1` else LIBESTR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libestr >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBESTR_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libestr >= 0.0.0) were not met: $LIBESTR_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBESTR_CFLAGS and LIBESTR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBESTR_CFLAGS and LIBESTR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBESTR_CFLAGS=$pkg_cv_LIBESTR_CFLAGS LIBESTR_LIBS=$pkg_cv_LIBESTR_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLOGNORM" >&5 $as_echo_n "checking for LIBLOGNORM... " >&6; } if test -n "$LIBLOGNORM_CFLAGS"; then pkg_cv_LIBLOGNORM_CFLAGS="$LIBLOGNORM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lognorm >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lognorm >= 1.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBLOGNORM_CFLAGS=`$PKG_CONFIG --cflags "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBLOGNORM_LIBS"; then pkg_cv_LIBLOGNORM_LIBS="$LIBLOGNORM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lognorm >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lognorm >= 1.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBLOGNORM_LIBS=`$PKG_CONFIG --libs "lognorm >= 1.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBLOGNORM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lognorm >= 1.0.0" 2>&1` else LIBLOGNORM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lognorm >= 1.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBLOGNORM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (lognorm >= 1.0.0) were not met: $LIBLOGNORM_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBLOGNORM_CFLAGS and LIBLOGNORM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBLOGNORM_CFLAGS and LIBLOGNORM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBLOGNORM_CFLAGS=$pkg_cv_LIBLOGNORM_CFLAGS LIBLOGNORM_LIBS=$pkg_cv_LIBLOGNORM_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi ac_fn_c_check_header_mongrel "$LINENO" "liblognorm.h" "ac_cv_header_liblognorm_h" "$ac_includes_default" if test "x$ac_cv_header_liblognorm_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "libestr.h" "ac_cv_header_libestr_h" "$ac_includes_default" if test "x$ac_cv_header_libestr_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lestr" >&5 $as_echo_n "checking for main in -lestr... " >&6; } if ${ac_cv_lib_estr_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lestr $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_estr_main=yes else ac_cv_lib_estr_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_estr_main" >&5 $as_echo "$ac_cv_lib_estr_main" >&6; } if test "x$ac_cv_lib_estr_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBESTR 1 _ACEOF LIBS="-lestr $LIBS" else as_fn_error $? "The libestr library cannot be found. This library is important for the correlation aspects of Sagan! Please see https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature use the --disable-lognorm flag. " "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llognorm" >&5 $as_echo_n "checking for main in -llognorm... " >&6; } if ${ac_cv_lib_lognorm_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llognorm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lognorm_main=yes else ac_cv_lib_lognorm_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lognorm_main" >&5 $as_echo "$ac_cv_lib_lognorm_main" >&6; } if test "x$ac_cv_lib_lognorm_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLOGNORM 1 _ACEOF LIBS="-llognorm $LIBS" else as_fn_error $? "The liblognorm library cannot be found. This library is important for the correlation aspects of Sagan! Please see https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature use the --disable-lognorm flag. " "$LINENO" 5 fi fi if test "$LIBPCAP" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libpcap support is enabled -------" >&5 $as_echo "------- libpcap support is enabled -------" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "pcap.h" "ac_cv_header_pcap_h" "$ac_includes_default" if test "x$ac_cv_header_pcap_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default" if test "x$ac_cv_header_net_if_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "net/if_arp.h" "ac_cv_header_net_if_arp_h" "$ac_includes_default" if test "x$ac_cv_header_net_if_arp_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_systm_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_ip_h" = xyes; then : fi ac_fn_c_check_header_mongrel "$LINENO" "netinet/udp.h" "ac_cv_header_netinet_udp_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_udp_h" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5 $as_echo_n "checking for main in -lpcap... " >&6; } if ${ac_cv_lib_pcap_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcap_main=yes else ac_cv_lib_pcap_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_main" >&5 $as_echo "$ac_cv_lib_pcap_main" >&6; } if test "x$ac_cv_lib_pcap_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPCAP 1 _ACEOF LIBS="-lpcap $LIBS" else as_fn_error $? "The libpcap library cannot be found. This library is used to run Sagan in a syslog 'sniffer' mode. Please see https://wiki.quadrantsec.com/bin/view/Main/PLog. To disable this feature use the --disable-libpcap flag. " "$LINENO" 5 fi fi if test "$LIBDNET" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- libdnet support is enabled -------" >&5 $as_echo "------- libdnet support is enabled -------" >&6; } for ac_header in dnet.h do : ac_fn_c_check_header_mongrel "$LINENO" "dnet.h" "ac_cv_header_dnet_h" "$ac_includes_default" if test "x$ac_cv_header_dnet_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DNET_H 1 _ACEOF else DNET_H="no" fi done for ac_header in dumbnet.h do : ac_fn_c_check_header_mongrel "$LINENO" "dumbnet.h" "ac_cv_header_dumbnet_h" "$ac_includes_default" if test "x$ac_cv_header_dumbnet_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DUMBNET_H 1 _ACEOF else DUMBNET_H="no" fi done if test "x$DNET_H" = "xno" -a "x$DUMBNET_H" = "xno"; then echo echo "The libdnet headers cannot be found. This library is used for Sagan's" echo "Unified2 output support. Please see:" echo "https://wiki.quadrantsec.com/bin/view/Main/Unified2Output" echo "To disable this feature use the --disable-libdnet flag." exit fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eth_set in -ldnet" >&5 $as_echo_n "checking for eth_set in -ldnet... " >&6; } if ${ac_cv_lib_dnet_eth_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char eth_set (); int main () { return eth_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_eth_set=yes else ac_cv_lib_dnet_eth_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_eth_set" >&5 $as_echo "$ac_cv_lib_dnet_eth_set" >&6; } if test "x$ac_cv_lib_dnet_eth_set" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNET 1 _ACEOF LIBS="-ldnet $LIBS" else DNET="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for eth_set in -ldumbnet" >&5 $as_echo_n "checking for eth_set in -ldumbnet... " >&6; } if ${ac_cv_lib_dumbnet_eth_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldumbnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char eth_set (); int main () { return eth_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dumbnet_eth_set=yes else ac_cv_lib_dumbnet_eth_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dumbnet_eth_set" >&5 $as_echo "$ac_cv_lib_dumbnet_eth_set" >&6; } if test "x$ac_cv_lib_dumbnet_eth_set" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDUMBNET 1 _ACEOF LIBS="-ldumbnet $LIBS" else DUMBNET="no" fi if test "x$DNET" = "xno" -a "x$DUMBNET" = "xno"; then echo echo "The libdnet headers cannot be found. This library is used for Sagan's" echo "Unified2 output support. Please see:" echo "https://wiki.quadrantsec.com/bin/view/Main/Unified2Output" echo "To disable this feature use the --disable-libdnet flag." exit fi fi if test "$BLUEDOT" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Quadrant \"Bluedot\" is enabled -------" >&5 $as_echo "------- Quadrant \"Bluedot\" is enabled -------" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5 $as_echo_n "checking for main in -lcurl... " >&6; } if ${ac_cv_lib_curl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curl_main=yes else ac_cv_lib_curl_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_main" >&5 $as_echo "$ac_cv_lib_curl_main" >&6; } if test "x$ac_cv_lib_curl_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCURL 1 _ACEOF LIBS="-lcurl $LIBS" else as_fn_error $? "The libcurl library cannot be found. This library is used for Sagan's / \"Bluedot\" support. Please see https://quadrantsec.com for more information. To disable this feature use the --disable-bluedot flag. " "$LINENO" 5 fi $as_echo "#define WITH_BLUEDOT 1" >>confdefs.h ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" if test "x$ac_cv_header_curl_curl_h" = xyes; then : fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFASTJSON" >&5 $as_echo_n "checking for LIBFASTJSON... " >&6; } if test -n "$LIBFASTJSON_CFLAGS"; then pkg_cv_LIBFASTJSON_CFLAGS="$LIBFASTJSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_CFLAGS=`$PKG_CONFIG --cflags "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFASTJSON_LIBS"; then pkg_cv_LIBFASTJSON_LIBS="$LIBFASTJSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfastjson >= 0.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfastjson >= 0.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFASTJSON_LIBS=`$PKG_CONFIG --libs "libfastjson >= 0.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` else LIBFASTJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfastjson >= 0.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFASTJSON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libfastjson >= 0.0.0) were not met: $LIBFASTJSON_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBFASTJSON_CFLAGS and LIBFASTJSON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else LIBFASTJSON_CFLAGS=$pkg_cv_LIBFASTJSON_CFLAGS LIBFASTJSON_LIBS=$pkg_cv_LIBFASTJSON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi if test "$SNORTSAM" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------- Snortsam support is enabled -------" >&5 $as_echo "------- Snortsam support is enabled -------" >&6; } $as_echo "#define WITH_SNORTSAM 1" >>confdefs.h fi test "x$prefix" = x. || test "x$prefix" = xNONE && prefix=/usr/local cat >>confdefs.h <<_ACEOF #define CONFIG_FILE_PATH "`eval echo "${sysconfdir}/sagan.conf"`" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "sagan" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "Sagan $VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "cclark@quadrantsec.com" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "sagan" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$VERSION" _ACEOF ac_config_files="$ac_config_files Makefile src/Makefile" # AC_OUTPUT(Makefile) cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: ,-._,-. Sagan has been configured!" >&5 $as_echo " ,-._,-. Sagan has been configured!" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: \/)\"(\/ " >&5 $as_echo " \/)\"(\/ " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: (_o_) Champ Clark III & The Quadrant InfoSec Team [quadrantsec.com]" >&5 $as_echo " (_o_) Champ Clark III & The Quadrant InfoSec Team [quadrantsec.com]" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: / \/) Copyright (C) 2009-2016 Quadrant Information Security, et al." >&5 $as_echo " / \/) Copyright (C) 2009-2016 Quadrant Information Security, et al." >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: (|| ||) " >&5 $as_echo " (|| ||) " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: oo-oo " >&5 $as_echo " oo-oo " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } sagan-1.1.2/doc/0000755000175000017500000000000012770372750012325 5ustar champchampsagan-1.1.2/doc/Makefile.am0000644000175000017500000000000012770372750014347 0ustar champchampsagan-1.1.2/doc/sagan_freebsd.howto.md0000644000175000017500000003012412770372750016571 0ustar champchampBuilding & Installing SAGAN For FreeBSD =============================== Goal => **Configure Sagan with liblognorm to log to unified2 snort logging format, using barnyard2 for output plugins** This goal outlines the best practices to decouple the processor and allow for the fastest logging, and alerting chain possible. ## Install these Dependencies from Ports Tree: *Note: Althought the versions are listed here explicit, you may want/need to build the latest from the port tree.* Ports: ```shell pcre-8.30_2 Perl Compatible Regular Expressions library perl-5.12.4_4 Practical Extraction and Report Language libdnet-1.11_3 A simple interface to low level networking routines libee-0.3.2 An event expression library inspired by CEE libestr-0.1.2 A library for some string essentials autoconf-2.68 Automatically configure source code on many Un*x platforms automake-1.11.1 GNU Standards-compliant Makefile generator (1.11) pulledpork-0.6.1_2 Script to update snort-2.8+ rules syslog-ng-3.3.5 A powerful syslogd replacement ``` Example: Build these freebsd packages from '/usr/ports', 'pkg_add -r', or 'portmaster -n' ```shell [user@sensor /usr/ports/devel/libee]# sudo make clean install ``` ### Barnyard2 Output Plugins: Barnyard2 output plugins such as 'mysql' require additional dependencies to be prebuilt. Example: ```shell barnyard2-1.9_2 An output system for Snort or Suricata that parses unified2 mysql-client-5.5.23 Multithreaded SQL database (client) (can be added for barnyard2 sql logging) ``` ## Switch FreeBSD syslog to syslog-ng using FIFO Modify your '/etc/rc.conf' ```shell syslog_ng_enable="YES" syslogd_enable="NO" syslog_ng_config="-u root" syslog_ng_pid="/var/run/syslog-ng.pid" ``` Add New syslog-ng outputs to `/usr/local/etc/syslog-ng.conf` ```shell destination sagan { pipe( "/var/run/sagan.fifo" template("$SOURCEIP|$FACILITY|$PRIORITY|$LEVEL|$TAG|$YEAR-$MONTH-$DAY|$HOUR:$MIN:$SEC|$PROGRAM| $MSG\n") template-escape(no) ); }; log { source(s_local); # uncomment this line to open port 514 to receive messages #source(s_network); destination(d_local); destination(sagan); }; ``` Note: FreeBSD imports in the /etc/syslog.conf as a module to syslog-ng Stop old Syslog & Start syslog-ng ```shell [user@sensor ~/sagan-0.2.1]# sudo mkfifo /var/run/sagan.fifo [user@sensor ~/]# sudo /etc/rc.d/syslog stop [user@sensor ~/]# sudo /usr/local/etc/rc.d/syslog-ng start ``` Installing the rest From Source: (At this time Sagan and liblognorm are not in the FreeBSD ports tree.) ## Liblognorm ### Option 1. Fetch Nightly GIT REPO for liblognorm http://git.adiscon.com/?p=liblognorm.git;a=summary ```shell [user@sensor ~/]# wget -O liblognorm.0.3.4.tar.gz "http://git.adiscon.com/?p=liblognorm.git;a=snapshot;h=f4b985047cd23be087aa93632acdd7ef7ea8ec70;sf=tgz" - or - [user@sensor ~/]# git clone git://git.adiscon.com/git/liblognorm.git ``` Nightly requires auto tooling to build your ./configure file ```shell [user@sensor ~/]# cd liblognorm* [user@sensor ~/liblognorm]# aclocal [user@sensor ~/liblognorm]# autoconf [user@sensor ~/liblognorm]# autoreconf -f -i -Wall,no-obsolete ``` ### Option 2. Fetch a tag/snapshot Tags should be ready release with configure files *liblognorm.0.3.4.tar.gz* http://git.adiscon.com/?p=liblognorm.git;a=snapshot;h=f4b985047cd23be087aa93632acdd7ef7ea8ec70;sf=tgz ```shell [user@sensor ~/]# fetch http://www.liblognorm.com/files/download/liblognorm-0.3.4.tar.gz [user@sensor ~/]# tar -zxvf liblognorm-* ``` ### Continue to Compile liblognorm ```shell [user@sensor ~/]# cd liblognorm* [user@sensor ~/liblognorm]# LDFLAGS=-L/usr/local/lib CFLAGS=-I/usr/local/include ./configure [user@sensor ~/liblognorm]# make [user@sensor ~/liblognorm]# sudo make install ``` You should see ```shell ---------------------------------------------------------------------- Libraries have been installed in: /usr/local/lib ``` ### Normalizer The normalizer binary has been installed with liblognorm, and can assist you in testing your *.rulebase files. https://github.com/shadowbq/sagan-extras/blob/master/samples/README.normalizer.md ```shell $ normalizer -r ./example.rulebase -e json < ./example.log {"src-port": "14121", "src-ip": "192.168.0.1", "username": "bobuser"} ``` ## Sagan Download and Decompress Sagan ```shell [user@sensor ~/]# fetch http://sagan.softwink.com/download/sagan-0.2.1.tar.gz [user@sensor ~/]# tar zxvf sagan-* [user@sensor ~/]# cd sagan * ``` Configure Sagan to log to unified2 snort logging format. This is best way to decouple the processor and allow for the fastest logging. Use barnyard2 for output plugins. ```shell [user@sensor ~/sagan-0.2.1] LDFLAGS=-L/usr/local/lib CFLAGS=-I/usr/local/include ./configure --disable-mysql --disable-postgresql --disable-esmtp --disable-prelude --enable-lognorm --enable-libdnet --disable-snortsam [user@sensor ~/sagan-0.2.1]# make [user@sensor ~/sagan-0.2.1]# sudo make install ``` At the end of the install you should see ```shell ------------------------------------------------------------------------------ /usr/bin/install -c -d "/usr/local/share/man/man8" /usr/bin/install -c -m 644 etc/sagan.8 "/usr/local/share/man/man8" /usr/bin/install -c -m 755 src/sagan "/usr/local/sbin/sagan" /usr/bin/install -c -d "/var/log/sagan" /usr/bin/install -c -d "/var/run/sagan" ------------------------------------------------------------------------------ Sagan has been installed! You still need to do a few more things before your up and running. See https://wiki.quadrantsec.com/bin/view/Main/SaganHOWTO for more information. ------------------------------------------------------------------------------ ``` Ensure the binary is properly linked and will run without segfault - LDD shows that libee, libestr, liblognorm, libpcap, libdnet, threading, pcre are all enabled and compiled in. ```shell [user@sensor ~/sagan-0.2.1]# sudo ldd /usr/local/sbin/sagan /usr/local/sbin/sagan: libdnet.so => /usr/local/lib/libdnet.so (0x80085e000) libpcap.so.8 => /lib/libpcap.so.8 (0x800a6c000) liblognorm.so.0 => /usr/local/lib/liblognorm.so.0 (0x800c9f000) libee.so.0 => /usr/local/lib/libee.so.0 (0x800ea7000) libestr.so.0 => /usr/local/lib/libestr.so.0 (0x8010ae000) libm.so.5 => /lib/libm.so.5 (0x8012b0000) libthr.so.3 => /lib/libthr.so.3 (0x8014d1000) libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0x8016f4000) libc.so.7 => /lib/libc.so.7 (0x80194a000) ``` Create a FreeBSD Sagan Service Script ```shell [user@sensor ~/sagan-0.2.1]# fetch https://raw.github.com/shadowbq/sagan-extras/master/etc/rc.d/sagan -o /usr/local/etc/rc.d/sagan [user@sensor ~/sagan-0.2.1]# sudo chmod a+x /usr/local/etc/rc.d/sagan ``` Modify your '/etc/rc.conf' and this new sagan rc.d startup script. ```shell sagan_enable="YES" sagan_user="root" ``` ## Pulledpork Download rules via Pulledpork (rule set manager) Note: pulledpork does not at this time support the classification.config, reference.config, or any *.rulebase files ```shell [user@sensor ~/sagan-0.2.1]# fetch https://raw.github.com/shadowbq/sagan-extras/master/etc/pulledpork.sagan.conf -o /usr/local/etc/pulledpork/pulledpork.sagan.conf [user@sensor ~/sagan-0.2.1]# fetch https://raw.github.com/beave/sagan-rules/master/classification.config -o /usr/local/etc/sagan-rules/classification.config [user@sensor ~/sagan-0.2.1]# fetch https://raw.github.com/beave/sagan-rules/master/reference.config -o /usr/local/etc/sagan-rules/reference.config [user@sensor ~/sagan-0.2.1]# pulledpork.pl -d -T -vv -c /usr/local/etc/pulledpork/pulledpork.sagan.conf ``` You should see pulled pork run. ```shell ---------------------------------- Writing /var/log/sid_changes.log.... Done Rule Stats.... New:-------0 Deleted:---0 Enabled Rules:----1538 Dropped Rules:----6 Disabled Rules:---1 Total Rules:------1545 Done Please review /var/log/sid_changes.log for additional details Fly Piggy Fly! ``` Modify the Sagan Config '/usr/local/etc/sagan.conf' to # all rules file names and only use ```shell include $RULE_PATH/sagan.rules ``` ## FetchCarl Download and install 'fetchcarl' ```shell [user@sensor ~/sagan-0.2.1]# fetch https://raw.github.com/shadowbq/sagan-extras/master/bin/fetchcarl.sh -o /usr/local/bin/fetchcarl [user@sensor ~/sagan-0.2.1]# chmod +x /usr/local/bin/fetchcarl [user@sensor ~]# fetchcarl --help usage: fetchcarl options This command will assist in downloading and updating sagan-rules rulebase, and map files. OPTIONS: -f, --file Sagan configuration file location default: /usr/local/etc/sagan.conf -u, --url Sagan-rule git repo url default: https://github.com/beave/sagan-rules.git GENERIC: -v, --verbose Verbose -h, --help Show this message [user@sensor ~]# fetchcarl --verbose the folder (/tmp/sagan_rules) you specified does not exist or doesn't contain a git repo.. fetching /tmp/sagan_rules Cloning into '/tmp/sagan_rules'... remote: Counting objects: 549, done. remote: Compressing objects: 100% (255/255), done. remote: Total 549 (delta 462), reused 368 (delta 292) Receiving objects: 100% (549/549), 275.21 KiB, done. Resolving deltas: 100% (462/462), done. Finished pulling sagan rules. Sagan rulebase and config update complete. (Note: Sagan *.rules were not updated. Use pulledpork for this process.) ``` ## Running Sagan Run Sagan for the first time. ```shell [user@sensor ~]# /usr/local/etc/rc.d/sagan start ``` ... wait -- do stuff like fail ssh logins, and sudo cmds ... ```shell [user@sensor ~]# ls -la /var/log/sagan/sagan* -rw-r--r-- 1 root sagan 4785 May 10 18:20 sagan.u2.1336685484 ``` ## Barnyard2 ### Configuration Create barnyard2.conf files ```shell [user@sensor ~]# sudo fetch https://raw.github.com/shadowbq/sagan-extras/master/etc/barnyard2.cli.conf -o /usr/local/etc/barnyard2.cli.conf [user@sensor ~]# cat /usr/local/etc/barnyard2.cli.conf # this is not hard, only unified2 is supported ;) input unified2 # Step 3: setup the output plugins output alert_fast: stdout ``` ### Run Barnyard2 Collect the unified2 data and output to double check alert chain is working. ```shell [user@sensor ~]# sudo mkdir /var/log/barnyard2 # Barnyard complains when this directory doesnt exist, although it is not used. [user@sensor ~]# barnyard2 -c /usr/local/etc/barnyard2.cli.conf -C /usr/local/etc/sagan-rules/classification.config -S /usr/local/etc/sagan-rules/sagan-sid-msg.map -R /usr/local/etc/sagan-rules/reference.config -f sagan.u2 -d /var/log/sagan/ --nolock-pidfile [user@sensor ~]# cat alert [**] [5000075] [OPENSSH] Authentication success [shadowbq] [**] [Classification: successful-user] [Priority: 1] 2012-05-10 17:25:39 1.2.5.6:59625 -> 1.2.3.32:22 auth info Message: Accepted publickey for shadowbq from 1.2.5.6 port 59625 ssh2 [Xref => http://wiki.quadrantsec.com/bin/view/Main/5000075] [**] [5000406] [OPENSSH] Accepted publickey [**] [Classification: successful-user] [Priority: 1] 2012-05-10 17:25:39 1.2.5.3:59625 -> 1.2.5.3:22 auth info Message: Accepted publickey for shadowbq from 1.2.5.6 port 59625 ssh2 [Xref => http://wiki.quadrantsec.com/bin/view/Main/5000406] ``` ### YEA! Working.. Moving ON! ### Barnyard Production Service Set up barnyard2 to run in via rc.d Modify your '/etc/rc.conf' and barnyard rc.d startup script. ```shell barnyard2_enable="YES" barnyard2_flags="-D -f sagan.u2 -d /var/log/sagan" ``` ### Optional. Barnyard2 and Existing Snorby/Base/DB Set up barnyard2 to log to snorby mysql remote database (this can be skipped if not running snorby, or remote db) ```shell [user@sensor ~]# sudo fetch https://raw.github.com/shadowbq/sagan-extras/master/etc/barnyard2.sagan.conf -o /usr/local/etc/barnyard2.conf [user@sensor ~]# sudo cat /usr/local/etc/barnyard2.conf config reference_file: /usr/local/etc/sagan-rules/reference.config config classification_file: /usr/local/etc/sagan-rules/classification.config config sid_file: /usr/local/etc/sagan-rules/sagan-sid-msg.map config hostname: sagan config interface: misc config waldo_file: /var/log/sagan/barnyard2.waldo input unified2 output database: log, mysql, user=snorby password=s3cr3tsauce dbname=snorby host=snorby ``` ### Start Barnyard2 ```shell [user@sensor ~]# sudo /usr/local/etc/rc.d/barnyard2 start ``` sagan-1.1.2/m4/0000755000175000017500000000000012770372750012100 5ustar champchampsagan-1.1.2/m4/ax_gcc_x86_cpuid.m40000644000175000017500000000634012770372750015462 0ustar champchamp# =========================================================================== # http://autoconf-archive.cryp.to/ax_gcc_x86_cpuid.html # =========================================================================== # # SYNOPSIS # # AX_GCC_X86_CPUID(OP) # # DESCRIPTION # # On Pentium and later x86 processors, with gcc or a compiler that has a # compatible syntax for inline assembly instructions, run a small program # that executes the cpuid instruction with input OP. This can be used to # detect the CPU type. # # On output, the values of the eax, ebx, ecx, and edx registers are stored # as hexadecimal strings as "eax:ebx:ecx:edx" in the cache variable # ax_cv_gcc_x86_cpuid_OP. # # If the cpuid instruction fails (because you are running a # cross-compiler, or because you are not using gcc, or because you are on # a processor that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP # is set to the string "unknown". # # This macro mainly exists to be used in AX_GCC_ARCHFLAG. # # LICENSE # # Copyright (c) 2008 Steven G. Johnson # Copyright (c) 2008 Matteo Frigo # # 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 3 of the License, 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, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. AC_DEFUN([AX_GCC_X86_CPUID], [AC_REQUIRE([AC_PROG_CC]) AC_LANG_PUSH([C]) AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1, [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], [ int op = $1, eax, ebx, ecx, edx; FILE *f; __asm__("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (op)); f = fopen("conftest_cpuid", "w"); if (!f) return 1; fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); fclose(f); return 0; ])], [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid], [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid], [ax_cv_gcc_x86_cpuid_$1=unknown])]) AC_LANG_POP([C]) ]) sagan-1.1.2/m4/ax_gcc_x86_avx_xgetbv.m40000644000175000017500000000640312770372750016533 0ustar champchamp# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_avx_xgetbv.html # =========================================================================== # # SYNOPSIS # # AX_GCC_X86_AVX_XGETBV # # DESCRIPTION # # On later x86 processors with AVX SIMD support, with gcc or a compiler # that has a compatible syntax for inline assembly instructions, run a # small program that executes the xgetbv instruction with input OP. This # can be used to detect if the OS supports AVX instruction usage. # # On output, the values of the eax and edx registers are stored as # hexadecimal strings as "eax:edx" in the cache variable # ax_cv_gcc_x86_avx_xgetbv. # # If the xgetbv instruction fails (because you are running a # cross-compiler, or because you are not using gcc, or because you are on # a processor that doesn't have this instruction), # ax_cv_gcc_x86_avx_xgetbv_OP is set to the string "unknown". # # This macro mainly exists to be used in AX_EXT. # # LICENSE # # Copyright (c) 2013 Michael Petch # # 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 3 of the License, 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, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 1 AC_DEFUN([AX_GCC_X86_AVX_XGETBV], [AC_REQUIRE([AC_PROG_CC]) AC_LANG_PUSH([C]) AC_CACHE_CHECK(for x86-AVX xgetbv $1 output, ax_cv_gcc_x86_avx_xgetbv_$1, [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], [ int op = $1, eax, edx; FILE *f; /* Opcodes for xgetbv */ __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (eax), "=d" (edx) : "c" (op)); f = fopen("conftest_xgetbv", "w"); if (!f) return 1; fprintf(f, "%x:%x\n", eax, edx); fclose(f); return 0; ])], [ax_cv_gcc_x86_avx_xgetbv_$1=`cat conftest_xgetbv`; rm -f conftest_xgetbv], [ax_cv_gcc_x86_avx_xgetbv_$1=unknown; rm -f conftest_xgetbv], [ax_cv_gcc_x86_avx_xgetbv_$1=unknown])]) AC_LANG_POP([C]) ]) sagan-1.1.2/m4/ax_ext.m40000644000175000017500000002036012770372750013633 0ustar champchamp# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_ext.html # =========================================================================== # # SYNOPSIS # # AX_EXT # # DESCRIPTION # # Find supported SIMD extensions by requesting cpuid. When an SIMD # extension is found, the -m"simdextensionname" is added to SIMD_FLAGS if # compiler supports it. For example, if "sse2" is available, then "-msse2" # is added to SIMD_FLAGS. # # This macro calls: # # AC_SUBST(SIMD_FLAGS) # # And defines: # # HAVE_MMX / HAVE_SSE / HAVE_SSE2 / HAVE_SSE3 / HAVE_SSSE3 / HAVE_SSE4.1 / HAVE_SSE4.2 / HAVE_AVX # # LICENSE # # Copyright (c) 2007 Christophe Tournayre # Copyright (c) 2013 Michael Petch # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 13 AC_DEFUN([AX_EXT], [ AC_REQUIRE([AC_CANONICAL_HOST]) case $host_cpu in powerpc*) AC_CACHE_CHECK([whether altivec is supported], [ax_cv_have_altivec_ext], [ if test `/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.optional.altivec` != 0; then if test `/usr/sbin/sysctl -n hw.optional.altivec` = 1; then ax_cv_have_altivec_ext=yes fi fi ]) if test "$ax_cv_have_altivec_ext" = yes; then AC_DEFINE(HAVE_ALTIVEC,,[Support Altivec instructions]) AX_CHECK_COMPILE_FLAG(-faltivec, SIMD_FLAGS="$SIMD_FLAGS -faltivec", []) fi ;; i[[3456]]86*|x86_64*|amd64*) AC_REQUIRE([AX_GCC_X86_CPUID]) AC_REQUIRE([AX_GCC_X86_AVX_XGETBV]) AX_GCC_X86_CPUID(0x00000001) ecx=0 edx=0 if test "$ax_cv_gcc_x86_cpuid_0x00000001" != "unknown"; then ecx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 3` edx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 4` fi AC_CACHE_CHECK([whether mmx is supported], [ax_cv_have_mmx_ext], [ ax_cv_have_mmx_ext=no if test "$((0x$edx>>23&0x01))" = 1; then ax_cv_have_mmx_ext=yes fi ]) AC_CACHE_CHECK([whether sse is supported], [ax_cv_have_sse_ext], [ ax_cv_have_sse_ext=no if test "$((0x$edx>>25&0x01))" = 1; then ax_cv_have_sse_ext=yes fi ]) AC_CACHE_CHECK([whether sse2 is supported], [ax_cv_have_sse2_ext], [ ax_cv_have_sse2_ext=no if test "$((0x$edx>>26&0x01))" = 1; then ax_cv_have_sse2_ext=yes fi ]) AC_CACHE_CHECK([whether sse3 is supported], [ax_cv_have_sse3_ext], [ ax_cv_have_sse3_ext=no if test "$((0x$ecx&0x01))" = 1; then ax_cv_have_sse3_ext=yes fi ]) AC_CACHE_CHECK([whether ssse3 is supported], [ax_cv_have_ssse3_ext], [ ax_cv_have_ssse3_ext=no if test "$((0x$ecx>>9&0x01))" = 1; then ax_cv_have_ssse3_ext=yes fi ]) AC_CACHE_CHECK([whether sse4.1 is supported], [ax_cv_have_sse41_ext], [ ax_cv_have_sse41_ext=no if test "$((0x$ecx>>19&0x01))" = 1; then ax_cv_have_sse41_ext=yes fi ]) AC_CACHE_CHECK([whether sse4.2 is supported], [ax_cv_have_sse42_ext], [ ax_cv_have_sse42_ext=no if test "$((0x$ecx>>20&0x01))" = 1; then ax_cv_have_sse42_ext=yes fi ]) AC_CACHE_CHECK([whether avx is supported by processor], [ax_cv_have_avx_cpu_ext], [ ax_cv_have_avx_cpu_ext=no if test "$((0x$ecx>>28&0x01))" = 1; then ax_cv_have_avx_cpu_ext=yes fi ]) if test x"$ax_cv_have_avx_cpu_ext" = x"yes"; then AX_GCC_X86_AVX_XGETBV(0x00000000) xgetbv_eax="0" if test x"$ax_cv_gcc_x86_avx_xgetbv_0x00000000" != x"unknown"; then xgetbv_eax=`echo $ax_cv_gcc_x86_avx_xgetbv_0x00000000 | cut -d ":" -f 1` fi AC_CACHE_CHECK([whether avx is supported by operating system], [ax_cv_have_avx_ext], [ ax_cv_have_avx_ext=no if test "$((0x$ecx>>27&0x01))" = 1; then if test "$((0x$xgetbv_eax&0x6))" = 6; then ax_cv_have_avx_ext=yes fi fi ]) if test x"$ax_cv_have_avx_ext" = x"no"; then AC_MSG_WARN([Your processor supports AVX, but your operating system doesn't]) fi fi if test "$ax_cv_have_mmx_ext" = yes; then AX_CHECK_COMPILE_FLAG(-mmmx, ax_cv_support_mmx_ext=yes, []) if test x"$ax_cv_support_mmx_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mmmx" AC_DEFINE(HAVE_MMX,,[Support mmx instructions]) else AC_MSG_WARN([Your processor supports mmx instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_sse_ext" = yes; then AX_CHECK_COMPILE_FLAG(-msse, ax_cv_support_sse_ext=yes, []) if test x"$ax_cv_support_sse_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse" AC_DEFINE(HAVE_SSE,,[Support SSE (Streaming SIMD Extensions) instructions]) else AC_MSG_WARN([Your processor supports sse instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_sse2_ext" = yes; then AX_CHECK_COMPILE_FLAG(-msse2, ax_cv_support_sse2_ext=yes, []) if test x"$ax_cv_support_sse2_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse2" AC_DEFINE(HAVE_SSE2,,[Support SSE2 (Streaming SIMD Extensions 2) instructions]) else AC_MSG_WARN([Your processor supports sse2 instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_sse3_ext" = yes; then AX_CHECK_COMPILE_FLAG(-msse3, ax_cv_support_sse3_ext=yes, []) if test x"$ax_cv_support_sse3_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse3" AC_DEFINE(HAVE_SSE3,,[Support SSE3 (Streaming SIMD Extensions 3) instructions]) else AC_MSG_WARN([Your processor supports sse3 instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_ssse3_ext" = yes; then AX_CHECK_COMPILE_FLAG(-mssse3, ax_cv_support_ssse3_ext=yes, []) if test x"$ax_cv_support_ssse3_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mssse3" AC_DEFINE(HAVE_SSSE3,,[Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions]) else AC_MSG_WARN([Your processor supports ssse3 instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_sse41_ext" = yes; then AX_CHECK_COMPILE_FLAG(-msse4.1, ax_cv_support_sse41_ext=yes, []) if test x"$ax_cv_support_sse41_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse4.1" AC_DEFINE(HAVE_SSE4_1,,[Support SSSE4.1 (Streaming SIMD Extensions 4.1) instructions]) else AC_MSG_WARN([Your processor supports sse4.1 instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_sse42_ext" = yes; then AX_CHECK_COMPILE_FLAG(-msse4.2, ax_cv_support_sse42_ext=yes, []) if test x"$ax_cv_support_sse42_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -msse4.2" AC_DEFINE(HAVE_SSE4_2,,[Support SSSE4.2 (Streaming SIMD Extensions 4.2) instructions]) else AC_MSG_WARN([Your processor supports sse4.2 instructions but not your compiler, can you try another compiler?]) fi fi if test "$ax_cv_have_avx_ext" = yes; then AX_CHECK_COMPILE_FLAG(-mavx, ax_cv_support_avx_ext=yes, []) if test x"$ax_cv_support_avx_ext" = x"yes"; then SIMD_FLAGS="$SIMD_FLAGS -mavx" AC_DEFINE(HAVE_AVX,,[Support AVX (Advanced Vector Extensions) instructions]) else AC_MSG_WARN([Your processor supports avx instructions but not your compiler, can you try another compiler?]) fi fi ;; esac AC_SUBST(SIMD_FLAGS) ]) sagan-1.1.2/m4/ax_check_compile_flag.m40000644000175000017500000000625112770372750016614 0ustar champchamp# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) # # DESCRIPTION # # Check whether the given FLAG works with the current language's compiler # or gives an error. (Warnings, however, are ignored) # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # If EXTRA-FLAGS is defined, it is added to the current language's default # flags (e.g. CFLAGS) when the check is done. The check is thus made with # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # 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 3 of the License, 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, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 2 AC_DEFUN([AX_CHECK_COMPILE_FLAG], [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], [m4_default([$2], :)], [m4_default([$3], :)]) AS_VAR_POPDEF([CACHEVAR])dnl ])dnl AX_CHECK_COMPILE_FLAGS sagan-1.1.2/depcomp0000755000175000017500000005601612770373007013141 0ustar champchamp#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 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, see . # 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. # Originally written by Alexandre Oliva . 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 outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} 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 # 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" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # 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. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then 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" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; 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'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies 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$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # 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|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi 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. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | 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" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: sagan-1.1.2/INSTALL0000644000175000017500000003661012770373007012613 0ustar champchampInstallation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command `./configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. sagan-1.1.2/NEWS0000644000175000017500000000004112770372750012252 0ustar champchampSee http://sagan.quadrantsec.com sagan-1.1.2/stamp-h10000644000175000017500000000002712770372750013134 0ustar champchamptimestamp for config.h sagan-1.1.2/aclocal.m40000644000175000017500000014606612770373003013425 0ustar champchamp# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 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 distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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 of the License, 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. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------- # Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])# PKG_CHECK_VAR # Copyright (C) 2002-2013 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. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- # Copyright (C) 2001-2013 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_AS # ---------- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. AC_REQUIRE([AC_PROG_CC]) test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 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_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl 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])]) # Copyright (C) 1999-2013 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. # 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) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # 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 am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) 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. : > 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 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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 cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none 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]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 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_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # 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"` # 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'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])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]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # 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_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 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 if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 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. # 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])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2013 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_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 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_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .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]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 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_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 is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 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_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], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _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])]) # Copyright (C) 1999-2013 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_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2013 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_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 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_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 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_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 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_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. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} 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 /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 m4_include([m4/ax_check_compile_flag.m4]) m4_include([m4/ax_ext.m4]) m4_include([m4/ax_gcc_x86_avx_xgetbv.m4]) m4_include([m4/ax_gcc_x86_cpuid.m4]) sagan-1.1.2/COPYING0000644000175000017500000004307612770372750012625 0ustar champchamp GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy 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 of the License, 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., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. sagan-1.1.2/tools/0000755000175000017500000000000012770372750012720 5ustar champchampsagan-1.1.2/tools/Makefile0000644000175000017500000000034012770372750014355 0ustar champchampCC = gcc PROGRAM = sagan-peek PROGRAM_FILES = sagan-peek.c CFLAGS += -g LDFLAGS += -g LIBS += -lrt all: $(PROGRAM) %: %.c $(CC) $(PROGRAM_FILES) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(LIBS) clean: @rm -rf $(PROGRAM) sagan-1.1.2/tools/sagan-peek.c0000644000175000017500000004555712770372750015117 0ustar champchamp/* ** Copyright (C) 2009-2016 Quadrant Information Security ** Copyright (C) 2009-2016 Champ Clark III ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. */ /* sagan-peek.c * * This small utility "peeks" into Sagan memory to display thresholds, * afters, flowbis, etc. The term "peek" goes back to old BASIC "peek" * and "poke" of memory. * */ /* DEBUG: need to add dstport, srcport for threshold/after */ #include #include #include #include #include #include #include #include #include #include #include #include #include "../src/sagan.h" #include "../src/sagan-defs.h" #include "../src/sagan-flowbit.h" #include "../src/processors/sagan-track-clients.h" /**************************************************************************** * usage - Give the user some hints about how to use this utility! ****************************************************************************/ void usage( void ) { fprintf(stderr, "\nsagan-peek [IPC directory]\n"); } /**************************************************************************** * object_check - Verifies a memory object exists before doing an open. * This way, we don't mistakingly "create" the object! ****************************************************************************/ int object_check( char *object ) { struct stat object_check; if ( ( stat(object, &object_check) == -1 )) { return(false); } return(true); } /**************************************************************************** * u32_time_to_human - Convert epoch time to human readable ****************************************************************************/ char *u32_time_to_human( uint64_t utime ) { struct tm tm; static char time_buf[80]; char tmp[80]; char *return_time = NULL; memset(&tm, 0, sizeof(struct tm)); snprintf(tmp, sizeof(tmp) - 1, "%lu", utime); strptime(tmp, "%s", &tm); strftime(time_buf, sizeof(time_buf), "%b %d %H:%M:%S %Y", &tm); return_time = (char*)&time_buf; return(return_time); } /**************************************************************************** * main - Pull data from shared memory and display it! ****************************************************************************/ int main(int argc, char **argv) { struct _Sagan_IPC_Counters *counters_ipc; struct _Sagan_IPC_Flowbit *flowbit_ipc; struct _Sagan_Track_Clients_IPC *SaganTrackClients_ipc; struct thresh_by_src_ipc *threshbysrc_ipc; struct thresh_by_dst_ipc *threshbydst_ipc; struct thresh_by_username_ipc *threshbyusername_ipc; struct after_by_src_ipc *afterbysrc_ipc; struct after_by_dst_ipc *afterbydst_ipc; struct after_by_username_ipc *afterbyusername_ipc; /* For convert 32 bit IP to octet */ struct in_addr ip_addr_src; struct in_addr ip_addr_dst; /* Shared memory descriptors */ int shm_counters; int shm; int i; int file_check; char tmp_object_check[255]; char tmp[64]; char *ipc_directory = IPC_DIRECTORY; /* So users can point at the proper IPC location */ if ( argc == 2 ) { ipc_directory = argv[1]; } /* Load the "counters" first. The "counters" keep track of the number of elements on the * other arrays */ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", ipc_directory, COUNTERS_IPC_FILE); if ( object_check(tmp_object_check) == false ) { fprintf(stderr, "Error. Can't locate %s. Abort!\n", tmp_object_check); usage(); exit(1); } if ( ( shm_counters = open(tmp_object_check, O_RDONLY ) ) == -1 ) { fprintf(stderr, "[%s, line %d] Cannot open() for counters (%s)\n", __FILE__, __LINE__, strerror(errno)); exit(1); } if (( counters_ipc = mmap(0, sizeof(_Sagan_IPC_Counters) , PROT_READ, MAP_SHARED, shm_counters, 0)) == MAP_FAILED ) { fprintf(stderr, "[%s, line %d] Error allocating memory for counters object! [%s]\n", __FILE__, __LINE__, strerror(errno)); exit(1); } close(shm_counters); /*** Get "threshold by source" data ****/ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", ipc_directory, THRESH_BY_SRC_IPC_FILE); if ( object_check(tmp_object_check) == false ) { fprintf(stderr, "Error. Can't locate %s. Abort!\n", tmp_object_check); usage(); exit(1); } if ( (shm = open(tmp_object_check, O_RDONLY ) ) == -1 ) { fprintf(stderr, "[%s, line %d] Cannot open() for thresh_by_src (%s)\n", __FILE__, __LINE__, strerror(errno)); exit(1); } if (( threshbysrc_ipc = mmap(0, sizeof(thresh_by_src_ipc) + (sizeof(thresh_by_src_ipc) * counters_ipc->thresh_count_by_src), PROT_READ, MAP_SHARED, shm, 0)) == MAP_FAILED ) { fprintf(stderr, "[%s, line %d] Error allocating memory for thresh_by_src object! [%s]\n", __FILE__, __LINE__, strerror(errno)); exit(1); } close(shm); if ( counters_ipc->thresh_count_by_src >= 1 ) { printf("\n*** Threshold by source (%d) ***\n", counters_ipc->thresh_count_by_src); printf("---------------------------------------------------------------------------------\n"); printf("%-16s| %-15s| %-21s| %-11s| %s\n", "SRC IP", "Counter","Date added/modified", "SID", "Expire" ); printf("---------------------------------------------------------------------------------\n"); for ( i = 0; i < counters_ipc->thresh_count_by_src; i++) { ip_addr_src.s_addr = htonl(threshbysrc_ipc[i].ipsrc); printf("%-16s| %-15d| %-21s| %-11s| %d\n", inet_ntoa(ip_addr_src), threshbysrc_ipc[i].count, u32_time_to_human(threshbysrc_ipc[i].utime), threshbysrc_ipc[i].sid, threshbysrc_ipc[i].expire); } } /*** Get "threshold by destination" data ***/ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", ipc_directory, THRESH_BY_DST_IPC_FILE); if ( object_check(tmp_object_check) == false ) { fprintf(stderr, "Error. Can't locate %s. Abort!\n", tmp_object_check); usage(); exit(1); } if ((shm = open(tmp_object_check, O_RDONLY ) ) == -1 ) { fprintf(stderr, "[%s, line %d] Cannot open() (%s)\n", __FILE__, __LINE__, strerror(errno)); exit(1); } if (( threshbydst_ipc = mmap(0, sizeof(thresh_by_dst_ipc) + (sizeof(thresh_by_dst_ipc) * counters_ipc->thresh_count_by_dst) , PROT_READ, MAP_SHARED, shm, 0)) == MAP_FAILED ) { fprintf(stderr, "[%s, line %d] Error allocating memory object! [%s]\n", __FILE__, __LINE__, strerror(errno)); exit(1); } close(shm); if ( counters_ipc->thresh_count_by_dst >= 1 ) { printf("\n*** Threshold by destination (%d)***\n", counters_ipc->thresh_count_by_dst ); printf("---------------------------------------------------------------------------------\n"); printf("%-16s| %-15s| %-21s| %-11s| %s\n", "DST IP", "Counter","Date added/modified", "SID", "Expire" ); printf("---------------------------------------------------------------------------------\n"); for ( i = 0; i < counters_ipc->thresh_count_by_dst; i++) { ip_addr_dst.s_addr = htonl(threshbydst_ipc[i].ipdst); printf("%-16s| %-15d| %-21s| %-11s| %d\n", inet_ntoa(ip_addr_dst), threshbydst_ipc[i].count, u32_time_to_human(threshbydst_ipc[i].utime), threshbydst_ipc[i].sid, threshbydst_ipc[i].expire); } } /*** Get "threshold by username" data ***/ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", ipc_directory, THRESH_BY_USERNAME_IPC_FILE); if ( object_check(tmp_object_check) == false ) { fprintf(stderr, "Error. Can't locate %s. Abort!\n", tmp_object_check); usage(); exit(1); } if ((shm = open(tmp_object_check, O_RDONLY ) ) == -1 ) { fprintf(stderr, "[%s, line %d] Cannot open() (%s)\n", __FILE__, __LINE__, strerror(errno)); exit(1); } if (( threshbyusername_ipc = mmap(0, sizeof(thresh_by_username_ipc) + (sizeof(thresh_by_username_ipc) * counters_ipc->thresh_count_by_username ), PROT_READ, MAP_SHARED, shm, 0)) == MAP_FAILED ) { fprintf(stderr, "[%s, line %d] Error allocating memory object! [%s]\n", __FILE__, __LINE__, strerror(errno)); exit(1); } close(shm); if ( counters_ipc->thresh_count_by_username >= 1 ) { printf("\n*** Threshold by username (%d) ***\n", counters_ipc->thresh_count_by_username); printf("---------------------------------------------------------------------------------\n"); printf("%-16s| %-15s| %-21s| %-11s| %s\n", "Username", "Counter","Date added/modified", "SID", "Expire" ); printf("---------------------------------------------------------------------------------\n"); for ( i = 0; i < counters_ipc->thresh_count_by_username; i++) { printf("%-16s| %-15d| %-21s| %-11s| %d\n", inet_ntoa(ip_addr_src), threshbyusername_ipc[i].count, u32_time_to_human(threshbyusername_ipc[i].utime), threshbyusername_ipc[i].sid, threshbyusername_ipc[i].expire); } } /*** Get "after by source" data ***/ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", ipc_directory, AFTER_BY_SRC_IPC_FILE); if ( object_check(tmp_object_check) == false ) { fprintf(stderr, "Error. Can't locate %s. Abort!\n", tmp_object_check); usage(); exit(1); } if ((shm = open(tmp_object_check, O_RDONLY ) ) == -1 ) { fprintf(stderr, "[%s, line %d] Cannot open() (%s)\n", __FILE__, __LINE__, strerror(errno)); exit(1); } if (( afterbysrc_ipc = mmap(0, sizeof(after_by_src_ipc) + (sizeof(after_by_src_ipc) * counters_ipc->after_count_by_src ), PROT_READ, MAP_SHARED, shm, 0)) == MAP_FAILED ) { fprintf(stderr, "[%s, line %d] Error allocating memory object! [%s]\n", __FILE__, __LINE__, strerror(errno)); exit(1); } close(shm); if ( counters_ipc->after_count_by_src >= 1 ) { printf("\n*** After by source (%d) ***\n", counters_ipc->after_count_by_src); printf("---------------------------------------------------------------------------------\n"); printf("%-16s| %-15s| %-21s| %-11s| %s\n", "SRC IP", "Counter","Date added/modified", "SID", "Expire" ); printf("---------------------------------------------------------------------------------\n"); for ( i = 0; i < counters_ipc->after_count_by_src; i++) { ip_addr_src.s_addr = htonl(afterbysrc_ipc[i].ipsrc); printf("%-16s| %-15d| %-21s| %-11s| %d\n", inet_ntoa(ip_addr_src), afterbysrc_ipc[i].count, u32_time_to_human(afterbysrc_ipc[i].utime), afterbysrc_ipc[i].sid, afterbysrc_ipc[i].expire); } } /*** Get "After by destination" data ***/ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", ipc_directory, AFTER_BY_DST_IPC_FILE); if ( object_check(tmp_object_check) == false ) { fprintf(stderr, "Error. Can't locate %s. Abort!\n", tmp_object_check); usage(); exit(1); } if ((shm = open(tmp_object_check, O_RDONLY ) ) == -1 ) { fprintf(stderr, "[%s, line %d] Cannot open() (%s)\n", __FILE__, __LINE__, strerror(errno)); exit(1); } if (( afterbydst_ipc = mmap(0, sizeof(after_by_dst_ipc) + (sizeof(after_by_dst_ipc) * counters_ipc->after_count_by_dst ) , PROT_READ, MAP_SHARED, shm, 0)) == MAP_FAILED ) { fprintf(stderr, "[%s, line %d] Error allocating memory object! [%s]\n", __FILE__, __LINE__, strerror(errno)); exit(1); } close(shm); if ( counters_ipc->after_count_by_dst >= 1 ) { printf("\n*** After by destination (%d)***\n", counters_ipc->after_count_by_dst); printf("---------------------------------------------------------------------------------\n"); printf("%-16s| %-15s| %-21s| %-11s| %s\n", "DST IP", "Counter","Date added/modified", "SID", "Expire" ); printf("---------------------------------------------------------------------------------\n"); for ( i = 0; i < counters_ipc->after_count_by_dst; i++) { ip_addr_dst.s_addr = htonl(afterbydst_ipc[i].ipdst); printf("%-16s| %-15d| %-21s| %-11s| %d\n", inet_ntoa(ip_addr_dst), afterbydst_ipc[i].count, u32_time_to_human(afterbydst_ipc[i].utime), afterbydst_ipc[i].sid, afterbydst_ipc[i].expire); } } /*** Get "after by username" data ***/ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", ipc_directory, AFTER_BY_USERNAME_IPC_FILE); if ( object_check(tmp_object_check) == false ) { fprintf(stderr, "Error. Can't locate %s. Abort!\n", tmp_object_check); usage(); exit(1); } if ((shm = open(tmp_object_check, O_RDONLY ) ) == -1 ) { fprintf(stderr, "[%s, line %d] Cannot open() (%s)\n", __FILE__, __LINE__, strerror(errno)); exit(1); } if (( afterbyusername_ipc = mmap(0, sizeof(after_by_username_ipc) + (sizeof(after_by_username_ipc) * counters_ipc->after_count_by_username ) , PROT_READ, MAP_SHARED, shm, 0)) == MAP_FAILED ) { fprintf(stderr, "[%s, line %d] Error allocating memory object! [%s]\n", __FILE__, __LINE__, strerror(errno)); exit(1); } close(shm); if ( counters_ipc->after_count_by_username >= 1 ) { printf("\n*** After by username ***(%d)\n", counters_ipc->after_count_by_username); printf("---------------------------------------------------------------------------------\n"); printf("%-16s| %-15s| %-21s| %-11s| %s\n", "Username", "Counter","Date added/modified", "SID", "Expire" ); printf("---------------------------------------------------------------------------------\n"); for ( i = 0; i < counters_ipc->after_count_by_username; i++) { printf("%-16s| %-15d| %-21s| %-11s| %d\n", afterbyusername_ipc[i].username, afterbyusername_ipc[i].count, u32_time_to_human(afterbyusername_ipc[i].utime), afterbyusername_ipc[i].sid, afterbyusername_ipc[i].expire); } } /*** Get "flowbit" data ***/ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", ipc_directory, FLOWBIT_IPC_FILE); if ( object_check(tmp_object_check) == false ) { fprintf(stderr, "Error. Can't locate %s. Abort!\n", tmp_object_check); usage(); exit(1); } if ((shm = open(tmp_object_check, O_RDONLY ) ) == -1 ) { fprintf(stderr, "[%s, line %d] Cannot open() (%s)\n", __FILE__, __LINE__, strerror(errno)); exit(1); } if (( flowbit_ipc = mmap(0, sizeof(_Sagan_IPC_Flowbit) + (sizeof(_Sagan_IPC_Flowbit) * counters_ipc->flowbit_count ) , PROT_READ, MAP_SHARED, shm, 0)) == MAP_FAILED ) { fprintf(stderr, "[%s, line %d] Error allocating memory object! [%s]\n", __FILE__, __LINE__, strerror(errno)); exit(1); } close(shm); if ( counters_ipc->flowbit_count >= 1 ) { printf("\n*** Flowbits (%d) ****\n", counters_ipc->flowbit_count); printf("-----------------------------------------------------------------------------------------------------------------------------\n"); printf("%-9s| %-25s| %-16s| %-16s| %-21s| %s\n", "S", "Flowbit name", "SRC IP", "DST IP", "Date added/modified", "Expire"); printf("-----------------------------------------------------------------------------------------------------------------------------\n"); for ( i = 0; i < counters_ipc->flowbit_count; i++) { ip_addr_src.s_addr = htonl(flowbit_ipc[i].ip_src); ip_addr_dst.s_addr = htonl(flowbit_ipc[i].ip_dst); if ( flowbit_ipc[i].flowbit_state == 1 ) { printf("ACTIVE | %-25s| ", flowbit_ipc[i].flowbit_name); } else { printf("INACTIVE | %-25s| ", flowbit_ipc[i].flowbit_name); } printf("%-16s| ", inet_ntoa(ip_addr_src)); printf("%-16s| ", inet_ntoa(ip_addr_dst)); printf("%-21s| ", u32_time_to_human(flowbit_ipc[i].flowbit_date)); printf("%d (%s)\n", flowbit_ipc[i].expire, u32_time_to_human(flowbit_ipc[i].flowbit_date + flowbit_ipc[i].expire)); } } /**** Get "Tracking" data (if enabled) ****/ snprintf(tmp_object_check, sizeof(tmp_object_check) - 1, "%s/%s", ipc_directory, CLIENT_TRACK_IPC_FILE); if ( object_check(tmp_object_check) == true ) { if ((shm = open(tmp_object_check, O_RDONLY ) ) == -1 ) { fprintf(stderr, "[%s, line %d] Cannot open() (%s)\n", __FILE__, __LINE__, strerror(errno)); exit(1); } if (( SaganTrackClients_ipc = mmap(0, sizeof(_Sagan_Track_Clients_IPC) + (sizeof(_Sagan_Track_Clients_IPC) * counters_ipc->track_clients_client_count ) , PROT_READ, MAP_SHARED, shm, 0)) == MAP_FAILED ) { fprintf(stderr, "[%s, line %d] Error allocating memory object! [%s]\n", __FILE__, __LINE__, strerror(errno)); exit(1); } close(shm); if ( counters_ipc->track_clients_client_count >= 1 ) { printf("\n*** Client Tracking (%d) ****\n", counters_ipc->track_clients_client_count); printf("-----------------------------------------------------------------------------------------------\n"); printf("%-9s| %-16s| %-25s| %s\n", "State", "IP Address", "Last Seen Time", "Expire Seconds/Minutes" ); printf("-----------------------------------------------------------------------------------------------\n"); for ( i = 0; i < counters_ipc->track_clients_client_count; i++) { ip_addr_src.s_addr = htonl(SaganTrackClients_ipc[i].host_u32); if ( SaganTrackClients_ipc[i].status == 0 ) { printf("ACTIVE | %-16s| %-25s| %d/%d \n", inet_ntoa(ip_addr_src), u32_time_to_human(SaganTrackClients_ipc[i].utime), SaganTrackClients_ipc[i].expire, SaganTrackClients_ipc[i].expire / 60 ); } else { printf("INACTIVE | %-16s| %-25s| %d/%d \n", inet_ntoa(ip_addr_src), u32_time_to_human(SaganTrackClients_ipc[i].utime), SaganTrackClients_ipc[i].expire, SaganTrackClients_ipc[i].expire / 60 ); } } } close(shm); } /* object_check */ return(0); /* Clean exit */ }