diff -adNruX nodiff webalizer-orig/Makefile.MinGW webalizer-2.01-10/Makefile.MinGW --- webalizer-orig/Makefile.MinGW 1969-12-31 19:00:00.000000000 -0500 +++ webalizer-2.01-10/Makefile.MinGW 2007-01-15 18:21:52.000000000 -0500 @@ -0,0 +1,100 @@ +# +# Makefile for webalizer - a web server logfile analysis thingie +# +# (c)1997-2000 by Bradford L. Barrett (brad@mrunix.net) +# Distributed under the GNU GPL. See "README" and "Copyright" +# files supplied with this distribution for more information. +# +# Modified by Stanislaw Pusep (stas@sysd.org) to work with MinGW/MSYS +# To build this, first compile all dependencies, check CFLAGS & LDFLAGS, +# and then just: +# +# make distclean +# make all + +#BINDIR = ${exec_prefix}/bin +#MANDIR = ${prefix}/man/man1 +CC = gcc +CP = cp -fp +#CP = copy /Y +RM = rm -f +#RM = del + +CFLAGS = -Wall -Os -IWin32 -I../zlib-1.2.3 +LIBS = -static -lgd -lpng -lz -lm -liberty +LDFLAGS = -L../gd-1.8.4 -L../libpng-1.2.15/.libs -L../zlib-1.2.3 +DEFS = -DWIN32 -DHAVE_GETOPT_H=1 -DHAVE_MATH_H=1 + +# where are the GD header files? +GDLIB =../gd-1.8.4 + +# GeoIP feature: +CFLAGS += -I../GeoIP-1.4.1/libGeoIP +LIBS += -lGeoIP -lwsock32 +LDFLAGS += -L../GeoIP-1.4.1/libGeoIP/.libs +DEFS += -DUSE_GEOIP -DUSE_FLAGS + +# Shouldn't have to touch below here! + +all: webalizer.exe + +webalizer.exe: webalizer.o webalizer.h hashtab.o hashtab.h \ + linklist.o linklist.h preserve.o preserve.h \ + dns_resolv.o dns_resolv.h parser.o parser.h \ + output.o output.h graphs.o graphs.h lang.h \ + webalizer_lang.h win_port.o + $(CC) ${LDFLAGS} -o webalizer.exe webalizer.o hashtab.o linklist.o preserve.o parser.o output.o dns_resolv.o graphs.o win_port.o ${LIBS} + strip webalizer.exe + +webalizer.o: webalizer.c webalizer.h parser.h output.h preserve.h \ + graphs.h dns_resolv.h webalizer_lang.h + $(CC) ${CFLAGS} ${DEFS} -c webalizer.c + +parser.o: parser.c parser.h webalizer.h lang.h + $(CC) ${CFLAGS} ${DEFS} -c parser.c + +hashtab.o: hashtab.c hashtab.h dns_resolv.h webalizer.h lang.h + $(CC) ${CFLAGS} ${DEFS} -c hashtab.c + +linklist.o: linklist.c linklist.h webalizer.h lang.h + $(CC) ${CFLAGS} ${DEFS} -c linklist.c + +output.o: output.c output.h webalizer.h preserve.h \ + hashtab.h graphs.h lang.h + $(CC) ${CFLAGS} ${DEFS} -c output.c + +preserve.o: preserve.c preserve.h webalizer.h parser.h \ + hashtab.h graphs.h lang.h + $(CC) ${CFLAGS} ${DEFS} -c preserve.c + +dns_resolv.o: dns_resolv.c dns_resolv.h lang.h webalizer.h + $(CC) ${CFLAGS} ${DEFS} -c dns_resolv.c + +graphs.o: graphs.c graphs.h webalizer.h lang.h + $(CC) ${CFLAGS} ${DEFS} -I${GDLIB} -c graphs.c + +win_port.o: Win32/sys/times.h Win32/sys/utsname.h + $(CC) ${CFLAGS} ${DEFS} -c win_port.c + +clean: + $(RM) webalizer.exe *.o usage*.png daily*.png hourly*.png ctry*.png + $(RM) *.html *.hist *.current core *.gif + +distclean: clean + $(RM) webalizer.conf *.tar *.tgz *.Z *.tar.gz + $(RM) webalizer_lang.h config.cache config.log config.status + +install: all + @echo can't install: sorry this is win32 makefile! +# $(CP) webalizer.1 ${MANDIR}/webalizer.1 +# $(CP) webalizer.exe ${BINDIR}/webalizer.exe +# $(CP) sample.conf /etc/webalizer.conf.sample + +uninstall: + @echo can't uninstall: sorry this is win32 makefile! +# $(RM) ${MANDIR}/webalizer.1 +# $(RM) ${BINDIR}/webalizer.exe +# $(RM) /etc/webalizer.conf.sample + +webalizer_lang.h: + $(CP) lang/webalizer_lang.english webalizer_lang.h diff -adNruX nodiff webalizer-orig/Makefile.in webalizer-2.01-10/Makefile.in --- webalizer-orig/Makefile.in 2000-10-17 00:15:53.000000000 -0400 +++ webalizer-2.01-10/Makefile.in 2007-01-15 18:28:49.000000000 -0500 @@ -16,6 +16,7 @@ # GNU General Public License for more details (file "COPYING"). # +datadir = @datarootdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -44,6 +45,7 @@ output.o output.h graphs.o graphs.h lang.h \ webalizer_lang.h $(CC) ${LDFLAGS} -o webalizer webalizer.o hashtab.o linklist.o preserve.o parser.o output.o dns_resolv.o graphs.o ${LIBS} + strip webalizer rm -f webazolver @LN_S@ webalizer webazolver diff -adNruX nodiff webalizer-orig/Makefile.std webalizer-2.01-10/Makefile.std --- webalizer-orig/Makefile.std 2000-10-17 00:15:53.000000000 -0400 +++ webalizer-2.01-10/Makefile.std 2007-01-15 18:52:32.000000000 -0500 @@ -41,6 +41,10 @@ # Some might need this instead (Solaris?!?) #LIBS = -lgd -lpng -lz -lm -ldb -lnsl -lsocket +# GeoIP feature: +DEFS = -DUSE_GEOIP -DUSE_FLAGS ${DEFS} +LIBS = -lGeoIP ${LIBS} + # If your GD lib was compiled with X/truetype, use this # or some variation of it: @@ -56,6 +60,7 @@ output.o output.h graphs.o graphs.h lang.h \ webalizer_lang.h $(CC) ${LDFLAGS} -o webalizer webalizer.o hashtab.o linklist.o preserve.o parser.o output.o dns_resolv.o graphs.o ${LIBS} + strip webalizer webalizer.o: webalizer.c webalizer.h parser.h output.h preserve.h \ graphs.h dns_resolv.h webalizer_lang.h diff -adNruX nodiff webalizer-orig/README.Win32 webalizer-2.01-10/README.Win32 --- webalizer-orig/README.Win32 1969-12-31 19:00:00.000000000 -0500 +++ webalizer-2.01-10/README.Win32 2007-01-15 19:11:08.000000000 -0500 @@ -0,0 +1,24 @@ +Info about compiling Webalizer on Win32 platform under MinGW +============================================================ + +by Stanislaw Pusep (stas@sysd.org) + + +Wow, since last time I compiled this thingie on MinGW things evolved a lot :) +Now there's MSYS (http://www.mingw.org/msys.shtml) that closely simulates +Bash & RXVT so one could simply "./configure; make; make install" on Win32. +That was exactly what I did to compile zlib, libpng & gd dependencies. +libGeoIP didn't compiled that fine; I needed to patch the source and I hope +that libGeoIP 1.3.2 and future releases will have my Win32/MinGW patch +integrated (post-note: they did it ;). +It's perfectly possible to run configure script for patched webalizer itself +but I don't thing it's a good idea. If you really wish to do that just set +appropriate CFLAGS & LDFLAGS. They're almost the same as those set by +Makefile.MinGW; so why not just "make -f Makefile.MinGW"?! +So, copy Makefile.MinGW to Makefile, edit it, set proper dependency pathes +and uncomment GeoIP enabling lines if you got it working :) +Then simply "make distclean" and "make all". Note that "make distclean" is +necessary to set proper language header as Win32 doesn't supports symlinks. + + +Have a fun!!! diff -adNruX nodiff webalizer-orig/Win32/sys/times.h webalizer-2.01-10/Win32/sys/times.h --- webalizer-orig/Win32/sys/times.h 1969-12-31 19:00:00.000000000 -0500 +++ webalizer-2.01-10/Win32/sys/times.h 2002-08-19 14:44:39.000000000 -0400 @@ -0,0 +1,15 @@ +#ifndef __SYS_TIMES_H +#define __SYS_TIMES_H + +#include + +struct tms { + clock_t tms_utime; + clock_t tms_cstime; + clock_t tms_cutime; + clock_t tms_stime; +}; + +clock_t times(struct tms *buffer); + +#endif diff -adNruX nodiff webalizer-orig/Win32/sys/utsname.h webalizer-2.01-10/Win32/sys/utsname.h --- webalizer-orig/Win32/sys/utsname.h 1969-12-31 19:00:00.000000000 -0500 +++ webalizer-2.01-10/Win32/sys/utsname.h 2002-08-19 14:44:39.000000000 -0400 @@ -0,0 +1,14 @@ +#ifndef __SYS_UTSNAME_H +#define __SYS_UTSNAME_H + +#include + +struct utsname { + char nodename[MAX_COMPUTERNAME_LENGTH + 1]; + char release[32]; + char sysname[16]; +}; + +int uname(struct utsname *name); + +#endif diff -adNruX nodiff webalizer-orig/configure webalizer-2.01-10/configure --- webalizer-orig/configure 2000-10-06 03:51:48.000000000 -0400 +++ webalizer-2.01-10/configure 2007-01-15 18:28:52.000000000 -0500 @@ -1,52 +1,682 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.59d. # +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Defaults: -ac_help= +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +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.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +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 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +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 + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells which exist, to save several forks. + if test -f $as_shell && + { ($as_shell) 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { $as_shell 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. 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" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (dirname -- /) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +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 +fi +echo >conf$$.file +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 -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file + +# 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 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help ---enable-static Build as static executable" -ac_help="$ac_help ---enable-debug Compile with debugging code" -ac_help="$ac_help ---with-etcdir=DIR Where to look for default config file [/etc]" -ac_help="$ac_help ---with-gdlib=DIR Where to additionally look for libgd.a" -ac_help="$ac_help ---with-gd=DIR Where to additionally look for gd headers" -ac_help="$ac_help ---with-z-inc=DIR Alternate location for libz headers" -ac_help="$ac_help ---with-zlib=DIR Alternate location for libz library" -ac_help="$ac_help ---with-png-inc=DIR Alternate location of png header files" -ac_help="$ac_help ---with-png=DIR Alternate location for libpng library" -ac_help="$ac_help ---with-db=DIR Alternate location for db headers" -ac_help="$ac_help ---with-dblib=DIR Alternate location for db library" -ac_help="$ac_help ---enable-dns Enable DNS lookup code" -ac_help="$ac_help ---with-language=language Use 'language' (default is english)" +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="webalizer.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#endif +#if HAVE_STDINT_H +# include +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +DEFAULT_LANG +OPTS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +LN_S +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +CPP +GREP +EGREP +GDLOC +GDLIB +GEOIPINC +GEOIPLIB +ETCDIR +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +CPPFLAGS +CPP' + # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -55,94 +685,117 @@ silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +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" + eval $ac_prev=\$ac_option ac_prev= continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + 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" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; + -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_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval enable_$ac_feature=no ;; + + -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_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -151,116 +804,77 @@ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; + + -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" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; + + -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 | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + | --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" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -274,26 +888,26 @@ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -310,7 +924,17 @@ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + 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) @@ -320,7 +944,7 @@ ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -331,58 +955,53 @@ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -393,375 +1012,1434 @@ ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 +# Be sure to have absolute directory names. +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 + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi fi -exec 5>./config.log -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done +test "$silent" = yes && exec 6>/dev/null -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=webalizer.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + 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 +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] +--enable-static Build as static executable +--enable-debug Compile with debugging code +--enable-dns Enable DNS lookup code +--disable-geoip Disable GeoIP country lookup +--disable-flags Disable country flag pictures + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) +--with-etcdir=DIR Where to look for default config file /etc +--with-gdlib=DIR Where to additionally look for libgd.a +--with-gd=DIR Where to additionally look for gd headers +--with-z-inc=DIR Alternate location for libz headers +--with-zlib=DIR Alternate location for libz library +--with-png-inc=DIR Alternate location of png header files +--with-png=DIR Alternate location for libpng library +--with-db=DIR Alternate location for db headers +--with-dblib=DIR Alternate location for db library +--with-geoip-inc=DIR Alternate location for GeoIP headers +--with-geoip-lib=DIR Alternate location for GeoIP library +--with-language=language Use 'language' (default is english) + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +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 || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`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 + 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.59d + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 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 +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.59d. 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=. + 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_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: 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 + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_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 + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.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'; { (exit 1); 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 + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file fi -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= +# 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,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac fi -else - ac_n= ac_c='\c' ac_t= +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi + + + + + + + + + + + + + + +ac_ext=c +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 + + + DEFAULT_LANG="english" OPTS=${DEFS} IN_CFLAGS=${CFLAGS} -# Extract the first word of "gcc", so it can be a program name with args. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:561: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + + fi +fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:591: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +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 $# -gt 0; then + if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:642: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - ;; - esac + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:674: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross + test -n "$ac_ct_CC" && break +done -cat > conftest.$ac_ext << EOF + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi -#line 685 "configure" -#include "confdefs.h" +fi -main(){return(0);} -EOF -if { (eval echo configure:690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version >&5\"") >&5 + (eval $ac_compiler --version >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v >&5\"") >&5 + (eval $ac_compiler -v >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V >&5\"") >&5 + (eval $ac_compiler -V >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + + +# List of possible output files. We want to start from the most likely, +# but we have to check foo.exe before foo, because Cygwin `test -f' looks +# also for foo.exe. b.out is created by i960 compilers. +# As a last resort, we also try wildcards: `conftest.*' and `a.*'. +# But we are not allowed to rm a.*, and we do not want always remove +# conftest.*, so we will list them literally, when appropriate. +ac_outfiles="a_out.exe a.out conftest.exe conftest a.exe b.out" + +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +rm -f $ac_outfiles conftest.* + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $ac_outfiles" + +# The following tests should remove their output except files matching conftest.*. +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in $ac_outfiles a.* conftest.* NO +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) break;; + esac +done +if test "$ac_file" = NO; then + { { echo "$as_me:$LINENO: error: no output file found +See \`config.log' for more details." >&5 +echo "$as_me: error: no output file found +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no else - ac_cv_prog_cc_cross=yes + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +# Clean up; list also $ac_file, in case it matched a wildcard entry. +rm -f $ac_outfiles $ac_file + +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if test "${ac_cv_exeext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable), + # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will + # work properly (i.e., refer to `conftest.exe'), while it won't with `rm'. + for ac_file in conftest.exe conftest conftest.* NO; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac + done + if test "$ac_file" = NO; then + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: no output file found +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: no output file found +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + # Clean up; list also $ac_file, in case it matched conftest.*. + rm -f $ac_outfiles $ac_file + +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:716: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:721: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT + + +ac_clean_files=$ac_clean_files_save + +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes + rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in 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 ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done else - ac_cv_prog_gcc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi + fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test $ac_cv_prog_gcc = yes; then - GCC=yes +rm -f conftest.* +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - GCC= + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no fi -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:749: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - ac_cv_prog_cc_g=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" + CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" @@ -775,26 +2453,135 @@ CFLAGS= fi fi - -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:781: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* 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]; + +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" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_c89=$ac_arg else - ac_cv_prog_LN_S=ln + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + +rm -f 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 -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$ac_t""no" 1>&6 + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } fi ac_aux_dir= @@ -807,14 +2594,20 @@ ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -823,213 +2616,792 @@ # 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. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:832: checking for a BSD compatible install" >&5 +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then + 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 fi fi done - ;; - esac - done - IFS="$ac_save_IFS" + done + ;; +esac +done +IFS=$as_save_IFS + fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # 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 path is relative. - INSTALL="$ac_install_sh" + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:885: checking how to run the C preprocessor" >&5 + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + # 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. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -rm -f conftest* + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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" + { test -f "$ac_path_GREP" && $as_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 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + 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 + ac_count=`expr $ac_count + 1` + 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.*;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + fi -rm -f conftest* + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" + +else + ac_cv_path_GREP=$GREP fi - CPP="$ac_cv_prog_CPP" + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_CPP="$CPP" + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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" + { test -f "$ac_path_EGREP" && $as_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 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + 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 + ac_count=`expr $ac_count + 1` + 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.*;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } fi -echo "$ac_t""$CPP" 1>&6 -echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:965: checking whether char is unsigned" >&5 -if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$GCC" = yes; then - # GCC predefines this symbol on systems where it applies. -cat > conftest.$ac_ext <&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_c_char_unsigned=yes + $EGREP "memchr" >/dev/null 2>&1; then + : else - rm -rf conftest* - ac_cv_c_char_unsigned=no + 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : else -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 -main() { - volatile char c = 255; exit(c < 0); + +#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; } -EOF -if { (eval echo configure:1004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_c_char_unsigned=yes +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_char_unsigned=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no fi -rm -fr conftest* +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +if test "${ac_cv_c_char_unsigned+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_char_unsigned=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_char_unsigned=yes +fi + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 -EOF +_ACEOF fi if test "$GCC" = "yes"; then - # Check whether --enable-static or --disable-static was given. + # Check whether --enable-static was given. if test "${enable_static+set}" = set; then - enableval="$enable_static" - LDFLAGS="--static ${LDFLAGS}" + enableval=$enable_static; LDFLAGS="--static ${LDFLAGS}" fi @@ -1040,10 +3412,9 @@ CFLAGS="-fsigned-char ${CFLAGS}" fi - # Check whether --enable-debug or --disable-debug was given. + # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then - enableval="$enable_debug" - CFLAGS="-g ${CFLAGS}" + enableval=$enable_debug; CFLAGS="-g ${CFLAGS}" fi @@ -1053,206 +3424,305 @@ fi fi -# Check whether --with-etcdir or --without-etcdir was given. + +# Check whether --with-etcdir was given. if test "${with_etcdir+set}" = set; then - withval="$with_etcdir" - ETCDIR="${withval}" + withval=$with_etcdir; ETCDIR="${withval}" else CACHE_ETC="yes" fi -# Check whether --with-gdlib or --without-gdlib was given. + +# Check whether --with-gdlib was given. if test "${with_gdlib+set}" = set; then - withval="$with_gdlib" - EXTRA_GDLIB="${withval}" + withval=$with_gdlib; EXTRA_GDLIB="${withval}" else EXTRA_GDLIB="" fi -# Check whether --with-gd or --without-gd was given. + +# Check whether --with-gd was given. if test "${with_gd+set}" = set; then - withval="$with_gd" - EXTRA_GD="${withval}"; CFLAGS="-I${withval} ${CFLAGS}" + withval=$with_gd; EXTRA_GD="${withval}"; CFLAGS="-I${withval} ${CFLAGS}" else EXTRA_GD="" fi -# Check whether --with-z-inc or --without-z-inc was given. + +# Check whether --with-z-inc was given. if test "${with_z_inc+set}" = set; then - withval="$with_z_inc" - CFLAGS="-I${withval} ${CFLAGS}" + withval=$with_z_inc; CFLAGS="-I${withval} ${CFLAGS}" fi -# Check whether --with-zlib or --without-zlib was given. + +# Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then - withval="$with_zlib" - LDFLAGS="-L${withval} ${LDFLAGS}" + withval=$with_zlib; LDFLAGS="-L${withval} ${LDFLAGS}" fi -# Check whether --with-png-inc or --without-png-inc was given. + +# Check whether --with-png-inc was given. if test "${with_png_inc+set}" = set; then - withval="$with_png_inc" - CFLAGS="-I${withval} ${CFLAGS}" + withval=$with_png_inc; CFLAGS="-I${withval} ${CFLAGS}" fi -# Check whether --with-png or --without-png was given. + +# Check whether --with-png was given. if test "${with_png+set}" = set; then - withval="$with_png" - LDFLAGS="-L${withval} ${LDFLAGS}" + withval=$with_png; LDFLAGS="-L${withval} ${LDFLAGS}" fi -# Check whether --with-db or --without-db was given. + +# Check whether --with-db was given. if test "${with_db+set}" = set; then - withval="$with_db" - CFLAGS="-I${withval} ${CFLAGS}" + withval=$with_db; CFLAGS="-I${withval} ${CFLAGS}" fi -# Check whether --with-dblib or --without-dblib was given. + +# Check whether --with-dblib was given. if test "${with_dblib+set}" = set; then - withval="$with_dblib" - LDFLAGS="-L${withval} ${LDFLAGS}"; HAVE_DB="yes" + withval=$with_dblib; LDFLAGS="-L${withval} ${LDFLAGS}"; HAVE_DB="yes" else HAVE_DB="" fi -# Check whether --enable-dns or --disable-dns was given. + +# Check whether --with-geoip-inc was given. +if test "${with_geoip_inc+set}" = set; then + withval=$with_geoip_inc; EXTRA_GEOIPINC="${withval}" +fi + + + +# Check whether --with-geoip-lib was given. +if test "${with_geoip_lib+set}" = set; then + withval=$with_geoip_lib; EXTRA_GEOIPLIB="${withval}" +fi + + +# Check whether --enable-dns was given. if test "${enable_dns+set}" = set; then - enableval="$enable_dns" - USE_DNS="yes" + enableval=$enable_dns; USE_DNS="yes" +fi + + +USE_GEOIP="yes" +# Check whether --enable-geoip was given. +if test "${enable_geoip+set}" = set; then + enableval=$enable_geoip; USE_GEOIP="" fi +USE_FLAGS="yes" +# Check whether --enable-flags was given. +if test "${enable_flags+set}" = set; then + enableval=$enable_flags; USE_FLAGS="" +fi + + +if test "$USE_FLAGS" = "yes"; then + OPTS="-DUSE_FLAGS ${OPTS}" +fi + if test "$USE_DNS" = "yes"; then if test "$HAVE_DB" = ""; then - for ac_func in dbopen + +for ac_func in dbopen do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1139: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -int main() { +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func +/* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -$ac_func(); #endif -; return 0; } -EOF -if { (eval echo configure:1167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi -rm -f conftest* + +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done if test $ac_cv_func_dbopen = no; then - -echo $ac_n "checking for library containing dbopen""... $ac_c" 1>&6 -echo "configure:1194: checking for library containing dbopen" >&5 -if eval "test \"`echo '$''{'ac_cv_search_dbopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + { echo "$as_me:$LINENO: checking for library containing dbopen" >&5 +echo $ECHO_N "checking for library containing dbopen... $ECHO_C" >&6; } +if test "${ac_cv_search_dbopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_dbopen="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -dbopen() -; return 0; } -EOF -if { (eval echo configure:1212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_dbopen="none required" +/* 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 dbopen (); +int +main () +{ +return dbopen (); + ; + return 0; +} +_ACEOF +for ac_lib in '' db db1; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_dbopen=$ac_res else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -rm -f conftest* -test "$ac_cv_search_dbopen" = "no" && for i in db db1; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_dbopen="-l$i" -break -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_dbopen+set}" = set; then + break fi -rm -f conftest* done -LIBS="$ac_func_search_save_LIBS" +if test "${ac_cv_search_dbopen+set}" = set; then + : +else + ac_cv_search_dbopen=no fi - -echo "$ac_t""$ac_cv_search_dbopen" 1>&6 -if test "$ac_cv_search_dbopen" != "no"; then - test "$ac_cv_search_dbopen" = "none required" || LIBS="$ac_cv_search_dbopen $LIBS" +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_dbopen" >&5 +echo "${ECHO_T}$ac_cv_search_dbopen" >&6; } +ac_res=$ac_cv_search_dbopen +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" OPTS="-DUSE_DNS ${OPTS}"; HAVE_DB="yes" -else : - fi + if test "$HAVE_DB" = ""; then - echo "configure: warning: You must have a V1.85 compatable DB library!" 1>&2 - echo "configure: warning: DNS lookup code will be disabled..." 1>&2 + { echo "$as_me:$LINENO: WARNING: You must have a V1.85 compatable DB library!" >&5 +echo "$as_me: WARNING: You must have a V1.85 compatable DB library!" >&2;} + { echo "$as_me:$LINENO: WARNING: DNS lookup code will be disabled..." >&5 +echo "$as_me: WARNING: DNS lookup code will be disabled..." >&2;} fi else OPTS="-DUSE_DNS ${OPTS}"; HAVE_DB="yes" @@ -1261,511 +3731,1093 @@ OPTS="-DUSE_DNS ${OPTS}"; LIBS="-ldb ${LIBS}"; HAVE_DB="yes" fi if test "$HAVE_DB" = "yes"; then - for ac_hdr in db_185.h + +for ac_header in db_185.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1269: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi -rm -f conftest* + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + done - for ac_hdr in errno.h + +for ac_header in errno.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1309: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi -rm -f conftest* + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done fi - for ac_func in socket + +for ac_func in socket do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1349: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -int main() { +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func + +/* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -$ac_func(); #endif -; return 0; } -EOF -if { (eval echo configure:1377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi -rm -f conftest* + +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done if test $ac_cv_func_socket = no; then - echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:1403: checking for main in -lsocket" >&5 -ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + { echo "$as_me:$LINENO: checking for main in -lsocket" >&5 +echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6; } +if test "${ac_cv_lib_socket_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:1418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_main=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_main=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_main" >&6; } +if test $ac_cv_lib_socket_main = yes; then LIBS="-lsocket ${LIBS}"; -else - echo "$ac_t""no" 1>&6 fi fi - for ac_hdr in sys/socket.h + +for ac_header in sys/socket.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1443: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi -rm -f conftest* + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + done - echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:1480: checking for main in -lnsl" >&5 -ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + { echo "$as_me:$LINENO: checking for main in -lnsl" >&5 +echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6; } +if test "${ac_cv_lib_nsl_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:1495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_main=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_main=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6; } +if test $ac_cv_lib_nsl_main = yes; then LIBS="-lnsl ${LIBS}" -else - echo "$ac_t""no" 1>&6 fi fi -echo $ac_n "checking for main in -l44bsd""... $ac_c" 1>&6 -echo "configure:1518: checking for main in -l44bsd" >&5 -ac_lib_var=`echo 44bsd'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for main in -l44bsd" >&5 +echo $ECHO_N "checking for main in -l44bsd... $ECHO_C" >&6; } +if test "${ac_cv_lib_44bsd_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-l44bsd $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:1533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_44bsd_main=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_44bsd_main=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_44bsd_main" >&5 +echo "${ECHO_T}$ac_cv_lib_44bsd_main" >&6; } +if test $ac_cv_lib_44bsd_main = yes; then LIBS="-l44bsd ${LIBS}" -else - echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:1555: checking for main in -lm" >&5 -ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for main in -lm" >&5 +echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_m_main=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_main=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 +echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } +if test $ac_cv_lib_m_main = yes; then HAVE_LIBM="1"; LIBS="-lm ${LIBS}" -else - echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for main in -lz""... $ac_c" 1>&6 -echo "configure:1592: checking for main in -lz" >&5 -ac_lib_var=`echo z'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for main in -lz" >&5 +echo $ECHO_N "checking for main in -lz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:1607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_z_main=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_main=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_main" >&5 +echo "${ECHO_T}$ac_cv_lib_z_main" >&6; } +if test $ac_cv_lib_z_main = yes; then LIBZ="yes" else - echo "$ac_t""no" 1>&6 -LIBZ="no" + LIBZ="no" fi if test "$LIBZ" = "no"; then - { echo "configure: error: z library not found... please install zlib." 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: z library not found... please install zlib." >&5 +echo "$as_me: error: z library not found... please install zlib." >&2;} + { (exit 1); exit 1; }; } else - echo $ac_n "checking for gzrewind in -lz""... $ac_c" 1>&6 -echo "configure:1632: checking for gzrewind in -lz" >&5 -ac_lib_var=`echo z'_'gzrewind | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + { echo "$as_me:$LINENO: checking for gzrewind in -lz" >&5 +echo $ECHO_N "checking for gzrewind in -lz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z_gzrewind+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -gzrewind() -; return 0; } -EOF -if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +/* 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 gzrewind (); +int +main () +{ +return gzrewind (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_z_gzrewind=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_gzrewind=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzrewind" >&5 +echo "${ECHO_T}$ac_cv_lib_z_gzrewind" >&6; } +if test $ac_cv_lib_z_gzrewind = yes; then LIBS="-lz ${LIBS}" else - echo "$ac_t""no" 1>&6 -LIBZ="no" + LIBZ="no" fi if test "$LIBZ" = "no"; then - { echo "configure: error: Old version of zlib found" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: Old version of zlib found" >&5 +echo "$as_me: error: Old version of zlib found" >&2;} + { (exit please upgrade!); exit please upgrade!; }; } fi fi -echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6 -echo "configure:1678: checking for main in -lpng" >&5 -ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for main in -lpng" >&5 +echo $ECHO_N "checking for main in -lpng... $ECHO_C" >&6; } +if test "${ac_cv_lib_png_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lpng $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:1693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_png_main=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_png_main=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_main" >&5 +echo "${ECHO_T}$ac_cv_lib_png_main" >&6; } +if test $ac_cv_lib_png_main = yes; then LIBS="-lpng ${LIBS}" else - echo "$ac_t""no" 1>&6 -LIBPNG="no" + LIBPNG="no" fi if test "$LIBPNG" = "no"; then - { echo "configure: error: png library not found... please install png." 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: png library not found... please install png." >&5 +echo "$as_me: error: png library not found... please install png." >&2;} + { (exit 1); exit 1; }; } fi if test "$EXTRA_GD" = ""; then if test "$EXTRA_GDLIB" = ""; then - echo $ac_n "checking for gdImagePng in -lgd""... $ac_c" 1>&6 -echo "configure:1721: checking for gdImagePng in -lgd" >&5 -ac_lib_var=`echo gd'_'gdImagePng | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + { echo "$as_me:$LINENO: checking for gdImagePng in -lgd" >&5 +echo $ECHO_N "checking for gdImagePng in -lgd... $ECHO_C" >&6; } +if test "${ac_cv_lib_gd_gdImagePng+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lgd $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -gdImagePng() -; return 0; } -EOF -if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +/* 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 gdImagePng (); +int +main () +{ +return gdImagePng (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gd_gdImagePng=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gd_gdImagePng=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gd_gdImagePng" >&5 +echo "${ECHO_T}$ac_cv_lib_gd_gdImagePng" >&6; } +if test $ac_cv_lib_gd_gdImagePng = yes; then LIBS="-lgd ${LIBS}"; HAVE_LIBGD="yes" else - echo "$ac_t""no" 1>&6 -HAVE_LIBGD="" + HAVE_LIBGD="" fi fi fi if test "$HAVE_LIBGD" = ""; then - -echo $ac_n "checking for libgd.a""... $ac_c" 1>&6 -echo "configure:1767: checking for libgd.a" >&5 -if eval "test \"`echo '$''{'ac_cv_GDLOC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +{ echo "$as_me:$LINENO: checking for libgd.a" >&5 +echo $ECHO_N "checking for libgd.a... $ECHO_C" >&6; } +if test "${ac_cv_GDLOC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_GDLOC="" fi @@ -1780,20 +4832,22 @@ fi if test "$INPATH" = ""; then -echo "$ac_t""no" 1>&6 +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } GDLOC="" else -echo "$ac_t""$INPATH" 1>&6 +{ echo "$as_me:$LINENO: result: $INPATH" >&5 +echo "${ECHO_T}$INPATH" >&6; } GDLOC=$INPATH fi ac_cv_GDLOC=$GDLOC if test "$GDLOC" = ""; then - -echo $ac_n "checking for libgd.so""... $ac_c" 1>&6 -echo "configure:1795: checking for libgd.so" >&5 -if eval "test \"`echo '$''{'ac_cv_GDLOC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +{ echo "$as_me:$LINENO: checking for libgd.so" >&5 +echo $ECHO_N "checking for libgd.so... $ECHO_C" >&6; } +if test "${ac_cv_GDLOC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_GDLOC="" fi @@ -1808,17 +4862,21 @@ fi if test "$INPATH" = ""; then -echo "$ac_t""no" 1>&6 +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } GDLOC="" else -echo "$ac_t""$INPATH" 1>&6 +{ echo "$as_me:$LINENO: result: $INPATH" >&5 +echo "${ECHO_T}$INPATH" >&6; } GDLOC=$INPATH fi ac_cv_GDLOC=$GDLOC fi if test "$GDLOC" = ""; then - { echo "configure: error: gd library not found... please install gd." 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: gd library not found... please install gd." >&5 +echo "$as_me: error: gd library not found... please install gd." >&2;} + { (exit 1); exit 1; }; } else LIBS="-lgd ${LIBS}" LDFLAGS="-L${GDLOC} ${LDFLAGS}" @@ -1826,10 +4884,10 @@ fi -echo $ac_n "checking for gd.h""... $ac_c" 1>&6 -echo "configure:1831: checking for gd.h" >&5 -if eval "test \"`echo '$''{'ac_cv_GDLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +{ echo "$as_me:$LINENO: checking for gd.h" >&5 +echo $ECHO_N "checking for gd.h... $ECHO_C" >&6; } +if test "${ac_cv_GDLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_GDLIB="" fi @@ -1844,106 +4902,476 @@ fi if test "$INPATH" = ""; then -echo "$ac_t""no" 1>&6 +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } GDLIB="" else -echo "$ac_t""$INPATH" 1>&6 +{ echo "$as_me:$LINENO: result: $INPATH" >&5 +echo "${ECHO_T}$INPATH" >&6; } GDLIB=$INPATH fi ac_cv_GDLIB=$GDLIB if test "$GDLIB" = ""; then - { echo "configure: error: gd headers not found... please install gd." 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: gd headers not found... please install gd." >&5 +echo "$as_me: error: gd headers not found... please install gd." >&2;} + { (exit 1); exit 1; }; } fi -for ac_hdr in getopt.h +if test "$USE_GEOIP" = "yes"; then + +{ echo "$as_me:$LINENO: checking for GeoIP.h" >&5 +echo $ECHO_N "checking for GeoIP.h... $ECHO_C" >&6; } +if test "${ac_cv_GEOIPINC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_GEOIPINC="" +fi + +INPATH=$ac_cv_GEOIPINC +if test "$INPATH" = ""; then + for i in ${PREFIX}/include /usr/local/include /usr/include /include ${prefix}/include ./ ${EXTRA_GEOIPINC}; do + if test -f "$i/GeoIP.h"; then + INPATH=$i + fi + done +fi + +if test "$INPATH" = ""; then +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +GEOIPINC="" +else +{ echo "$as_me:$LINENO: result: $INPATH" >&5 +echo "${ECHO_T}$INPATH" >&6; } +GEOIPINC=$INPATH +fi +ac_cv_GEOIPINC=$GEOIPINC + + if test "$GEOIPINC" = ""; then + { { echo "$as_me:$LINENO: error: GeoIP headers not found... please install GeoIP." >&5 +echo "$as_me: error: GeoIP headers not found... please install GeoIP." >&2;} + { (exit 1); exit 1; }; } + else + CFLAGS="-I${GEOIPINC} ${CFLAGS}" + fi + + +{ echo "$as_me:$LINENO: checking for libGeoIP.a" >&5 +echo $ECHO_N "checking for libGeoIP.a... $ECHO_C" >&6; } +if test "${ac_cv_GEOIPLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_GEOIPLIB="" +fi + +INPATH=$ac_cv_GEOIPLIB +if test "$INPATH" = ""; then + for i in ${PREFIX}/lib /usr/local/lib /usr/lib /lib ${prefix}/lib ./ ${EXTRA_GEOIPLIB}; do + if test -f "$i/libGeoIP.a"; then + INPATH=$i + fi + done +fi + +if test "$INPATH" = ""; then +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +GEOIPLIB="" +else +{ echo "$as_me:$LINENO: result: $INPATH" >&5 +echo "${ECHO_T}$INPATH" >&6; } +GEOIPLIB=$INPATH +fi +ac_cv_GEOIPLIB=$GEOIPLIB + + if test "$GEOIPLIB" = ""; then + { { echo "$as_me:$LINENO: error: GeoIP library not found... please install GeoIP." >&5 +echo "$as_me: error: GeoIP library not found... please install GeoIP." >&2;} + { (exit 1); exit 1; }; } + else + LDFLAGS="-L${GEOIPLIB} ${LDFLAGS}" + fi + + { echo "$as_me:$LINENO: checking for GeoIP_new in -lGeoIP" >&5 +echo $ECHO_N "checking for GeoIP_new in -lGeoIP... $ECHO_C" >&6; } +if test "${ac_cv_lib_GeoIP_GeoIP_new+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lGeoIP $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 GeoIP_new (); +int +main () +{ +return GeoIP_new (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_GeoIP_GeoIP_new=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_GeoIP_GeoIP_new=no +fi + +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_GeoIP_GeoIP_new" >&5 +echo "${ECHO_T}$ac_cv_lib_GeoIP_GeoIP_new" >&6; } +if test $ac_cv_lib_GeoIP_GeoIP_new = yes; then + LIBS="-lGeoIP ${LIBS}" +else + LIBGEOIP="no" +fi + + if test "$LIBGEOIP" = "no"; then + { { echo "$as_me:$LINENO: error: GeoIP library not functional... please install GeoIP." >&5 +echo "$as_me: error: GeoIP library not functional... please install GeoIP." >&2;} + { (exit 1); exit 1; }; } + else + OPTS="-DUSE_GEOIP ${OPTS}" + fi +fi + + +for ac_header in getopt.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1864: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi -rm -f conftest* + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done if test "$HAVE_LIBM" = "1"; then - for ac_hdr in math.h + +for ac_header in math.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1905: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi -rm -f conftest* + +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + done fi -echo $ac_n "checking default config dir""... $ac_c" 1>&6 -echo "configure:1944: checking default config dir" >&5 +{ echo "$as_me:$LINENO: checking default config dir" >&5 +echo $ECHO_N "checking default config dir... $ECHO_C" >&6; } if test "$CACHE_ETC" = "yes"; then - if eval "test \"`echo '$''{'ac_cv_etcdir'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_etcdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_etcdir=/etc fi @@ -1951,24 +5379,25 @@ ETCDIR=$ac_cv_etcdir fi ac_cv_etcdir=$ETCDIR -echo "$ac_t""$ETCDIR" 1>&6 +{ echo "$as_me:$LINENO: result: $ETCDIR" >&5 +echo "${ECHO_T}$ETCDIR" >&6; } LANG_CACHE=yes -# Check whether --with-language or --without-language was given. + +# Check whether --with-language was given. if test "${with_language+set}" = set; then - withval="$with_language" - WEBALIZER_LANG="${withval}"; LANG_CACHE=no + withval=$with_language; WEBALIZER_LANG="${withval}"; LANG_CACHE=no else LANG_CACHE=yes fi if test "$WEBALIZER_LANG" = "no"; then WEBALIZER_LANG=english; fi -echo $ac_n "checking for language file""... $ac_c" 1>&6 -echo "configure:1969: checking for language file" >&5 +{ echo "$as_me:$LINENO: checking for language file" >&5 +echo $ECHO_N "checking for language file... $ECHO_C" >&6; } if test "$LANG_CACHE" = "yes"; then -if eval "test \"`echo '$''{'ac_cv_language'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_language+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_language=$DEFAULT_LANG fi @@ -1976,332 +5405,1069 @@ WEBALIZER_LANG=$ac_cv_language fi if test -f lang/webalizer_lang.${WEBALIZER_LANG}; then -echo "$ac_t""yes - ${WEBALIZER_LANG}" 1>&6 +{ echo "$as_me:$LINENO: result: yes - ${WEBALIZER_LANG}" >&5 +echo "${ECHO_T}yes - ${WEBALIZER_LANG}" >&6; } else if test -f lang/webalizer_lang.${DEFAULT_LANG}; then - echo "$ac_t""'${WEBALIZER_LANG}' not found - using ${DEFAULT_LANG}" 1>&6 + { echo "$as_me:$LINENO: result: '${WEBALIZER_LANG}' not found - using ${DEFAULT_LANG}" >&5 +echo "${ECHO_T}'${WEBALIZER_LANG}' not found - using ${DEFAULT_LANG}" >&6; } WEBALIZER_LANG=${DEFAULT_LANG} else - echo "$ac_t""no" 1>&6 - { echo "configure: error: language files not found... fix before continuing" 1>&2; exit 1; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + { { echo "$as_me:$LINENO: error: language files not found... fix before continuing" >&5 +echo "$as_me: error: language files not found... fix before continuing" >&2;} + { (exit 1); exit 1; }; } fi fi ac_cv_language=${WEBALIZER_LANG} +ac_sources="lang/webalizer_lang.${WEBALIZER_LANG}" +ac_dests="webalizer_lang.h" +while test -n "$ac_sources"; do + set $ac_dests; ac_dest=$1; shift; ac_dests=$* + set $ac_sources; ac_source=$1; shift; ac_sources=$* + ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" +done +ac_config_links="$ac_config_links $ac_config_links_1" + +ac_config_files="$ac_config_files Makefile" -trap '' 1 2 15 -cat > confcache <<\EOF +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# 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. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +( + 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_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 - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\_ACEOF +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +d +:quote +s/[ `~#$^&*(){}\\|;'"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`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. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +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.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - case "\$ac_option" in + 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 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +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 + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. 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" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (dirname -- /) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +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 +fi +echo >conf$$.file +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 -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file + +# 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 + +# 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.59d. 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 + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_links="$ac_config_links" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration links: +$config_links + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.59d, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 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' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + 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. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + esac + shift done -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +ac_configure_extra_args= -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS </dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@DEFAULT_LANG@%$DEFAULT_LANG%g -s%@OPTS@%$OPTS%g -s%@CC@%$CC%g -s%@LN_S@%$LN_S%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@CPP@%$CPP%g -s%@GDLOC@%$GDLOC%g -s%@GDLIB@%$GDLIB%g -s%@ETCDIR@%$ETCDIR%g +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0" $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi -CEOF -EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 -cat >> $CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links +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= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +DEFAULT_LANG!$DEFAULT_LANG$ac_delim +OPTS!$OPTS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +LN_S!$LN_S$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +GDLOC!$GDLOC$ac_delim +GDLIB!$GDLIB$ac_delim +GEOIPINC!$GEOIPINC$ac_delim +GEOIPLIB!$GEOIPLIB$ac_delim +ETCDIR!$ETCDIR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `grep -c "$ac_delim\$" conf$$subs.sed` = 60; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + +ac_eof= +if grep '^CEOF$' conf$$subs.sed >/dev/null; then + ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF//p' conf$$subs.sed | sort -nru | sed 1q` + ac_eof=`expr 0$ac_eof + 1` fi -EOF -cat >> $CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :L $CONFIG_LINKS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[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 - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$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 || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + 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 || +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" + case $as_dir in #( + -*) as_dir=./$as_dir;; esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`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 || +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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`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 +_ACEOF - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* +cat >>$CONFIG_STATUS <<\_ACEOF +# 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= -EOF +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + 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 -cat >> $CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;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 +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out -cat >> $CONFIG_STATUS <<\EOF -srcdir=$ac_given_srcdir -while test -n "$ac_sources"; do - set $ac_dests; ac_dest=$1; shift; ac_dests=$* - set $ac_sources; ac_source=$1; shift; ac_sources=$* + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; - echo "linking $srcdir/$ac_source to $ac_dest" + :L) + # + # CONFIG_LINK + # + + { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_file" >&5 +echo "$as_me: linking $srcdir/$ac_source to $ac_file" >&6;} if test ! -r $srcdir/$ac_source; then - { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5 +echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;} + { (exit 1); exit 1; }; } fi - rm -f $ac_dest + rm -f $ac_file - # Make relative symlinks. - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` - if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then - # The dest file is in a subdirectory. - test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" - ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dest_dir_suffix. - ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dest_dir_suffix= ac_dots= - fi + # Try a relative symlink, then a hard link, then a copy. + case $srcdir in + [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;; + *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;; + esac + ln -s $ac_rel_source $ac_file 2>/dev/null || + ln $srcdir/$ac_source $ac_file 2>/dev/null || + cp -p $srcdir/$ac_source $ac_file || + { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&5 +echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&2;} + { (exit 1); exit 1; }; } + ;; - case "$srcdir" in - [/$]*) ac_rel_source="$srcdir/$ac_source" ;; - *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; esac - # Make a symlink if possible; otherwise try a hard link. - if ln -s $ac_rel_source $ac_dest 2>/dev/null || - ln $srcdir/$ac_source $ac_dest; then : - else - { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } - fi -done -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -exit 0 -EOF +{ (exit 0); exit 0; } +_ACEOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi diff -adNruX nodiff webalizer-orig/configure.in webalizer-2.01-10/configure.in --- webalizer-orig/configure.in 2000-10-06 03:51:49.000000000 -0400 +++ webalizer-2.01-10/configure.in 2007-01-15 11:42:18.000000000 -0500 @@ -62,10 +62,30 @@ AC_ARG_WITH(dblib,--with-dblib=DIR Alternate location for db library, LDFLAGS="-L${withval} ${LDFLAGS}"; HAVE_DB="yes", HAVE_DB="") +AC_ARG_WITH(geoip-inc,--with-geoip-inc=DIR Alternate location for GeoIP headers, +EXTRA_GEOIPINC="${withval}") + +AC_ARG_WITH(geoip-lib,--with-geoip-lib=DIR Alternate location for GeoIP library, +EXTRA_GEOIPLIB="${withval}") + dnl enable-dns forces use of DNS code AC_ARG_ENABLE(dns,--enable-dns Enable DNS lookup code, USE_DNS="yes") +USE_GEOIP="yes" +dnl enable-geoip disables use of GeoIP library +AC_ARG_ENABLE(geoip,--disable-geoip Disable GeoIP country lookup, +USE_GEOIP="") + +USE_FLAGS="yes" +dnl enable-flags disables use of flag pictures +AC_ARG_ENABLE(flags,--disable-flags Disable country flag pictures, +USE_FLAGS="") + +if test "$USE_FLAGS" = "yes"; then + OPTS="-DUSE_FLAGS ${OPTS}" +fi + dnl DNS library check if test "$USE_DNS" = "yes"; then if test "$HAVE_DB" = ""; then @@ -146,6 +166,32 @@ AC_MSG_ERROR(gd headers not found... please install gd.) fi +dnl Check GeoIP if user wants it +if test "$USE_GEOIP" = "yes"; then + dnl Check for GeoIP headers + AC_FIND_PATH(GEOIPINC,GeoIP.h,"", ${PREFIX}/include /usr/local/include /usr/include /include ${prefix}/include ./ ${EXTRA_GEOIPINC}) + if test "$GEOIPINC" = ""; then + AC_MSG_ERROR(GeoIP headers not found... please install GeoIP.) + else + CFLAGS="-I${GEOIPINC} ${CFLAGS}" + fi + + dnl Check for GeoIP library + AC_FIND_PATH(GEOIPLIB,libGeoIP.a,"", ${PREFIX}/lib /usr/local/lib /usr/lib /lib ${prefix}/lib ./ ${EXTRA_GEOIPLIB}) + if test "$GEOIPLIB" = ""; then + AC_MSG_ERROR(GeoIP library not found... please install GeoIP.) + else + LDFLAGS="-L${GEOIPLIB} ${LDFLAGS}" + fi + + AC_CHECK_LIB(GeoIP, GeoIP_new, LIBS="-lGeoIP ${LIBS}", LIBGEOIP="no") + if test "$LIBGEOIP" = "no"; then + AC_MSG_ERROR(GeoIP library not functional... please install GeoIP.) + else + OPTS="-DUSE_GEOIP ${OPTS}" + fi +fi + dnl additonal platform specific checks AC_CHECK_HEADERS(getopt.h) if test "$HAVE_LIBM" = "1"; then diff -adNruX nodiff webalizer-orig/country-codes.txt webalizer-2.01-10/country-codes.txt --- webalizer-orig/country-codes.txt 2000-09-28 23:49:25.000000000 -0400 +++ webalizer-2.01-10/country-codes.txt 2007-01-15 18:32:53.000000000 -0500 @@ -1,252 +1,258 @@ -AD Andorra -AE United Arab Emirates -AF Afghanistan -AG Antigua and Barbuda -AI Anguilla -AL Albania -AM Armenia -AN Netherlands Antilles -AO Angola -AQ Antarctica -AR Argentina -AS American Samoa -AT Austria -AU Australia -AW Aruba -AZ Azerbaijan -BA Bosnia and Herzegovina -BB Barbados -BD Bangladesh -BE Belgium -BF Burkina Faso -BG Bulgaria -BH Bahrain -BI Burundi -BJ Benin -BM Bermuda -BN Brunei Darussalam -BO Bolivia -BR Brazil -BS Bahamas -BT Bhutan -BV Bouvet Island -BW Botswana -BY Belarus -BZ Belize -CA Canada -CC Cocos (Keeling) Islands -CF Central African Republic -CG Congo -CH Switzerland -CI Cote D'Ivoire (Ivory Coast) -CK Cook Islands -CL Chile -CM Cameroon -CN China -CO Colombia -CR Costa Rica -CS Czechoslovakia (former) -CU Cuba -CV Cape Verde -CX Christmas Island -CY Cyprus -CZ Czech Republic -DE Germany -DJ Djibouti -DK Denmark -DM Dominica -DO Dominican Republic -DZ Algeria -EC Ecuador -EE Estonia -EG Egypt -EH Western Sahara -ER Eritrea -ES Spain -ET Ethiopia -FI Finland -FJ Fiji -FK Falkland Islands (Malvinas) -FM Micronesia -FO Faroe Islands -FR France -FX France, Metropolitan -GA Gabon -GB Great Britain (UK) -GD Grenada -GE Georgia -GF French Guiana -GH Ghana -GI Gibraltar -GL Greenland -GM Gambia -GN Guinea -GP Guadeloupe -GQ Equatorial Guinea -GR Greece -GS S. Georgia and S. Sandwich Isls. -GT Guatemala -GU Guam -GW Guinea-Bissau -GY Guyana -HK Hong Kong -HM Heard and McDonald Islands -HN Honduras -HR Croatia (Hrvatska) -HT Haiti -HU Hungary -ID Indonesia -IE Ireland -IL Israel -IN India -IO British Indian Ocean Territory -IQ Iraq -IR Iran -IS Iceland -IT Italy -JM Jamaica -JO Jordan -JP Japan -KE Kenya -KG Kyrgyzstan -KH Cambodia -KI Kiribati -KM Comoros -KN Saint Kitts and Nevis -KP Korea (North) -KR Korea (South) -KW Kuwait -KY Cayman Islands -KZ Kazakhstan -LA Laos -LB Lebanon -LC Saint Lucia -LI Liechtenstein -LK Sri Lanka -LR Liberia -LS Lesotho -LT Lithuania -LU Luxembourg -LV Latvia -LY Libya -MA Morocco -MC Monaco -MD Moldova -MG Madagascar -MH Marshall Islands -MK Macedonia -ML Mali -MM Myanmar -MN Mongolia -MO Macau -MP Northern Mariana Islands -MQ Martinique -MR Mauritania -MS Montserrat -MT Malta -MU Mauritius -MV Maldives -MW Malawi -MX Mexico -MY Malaysia -MZ Mozambique -NA Namibia -NC New Caledonia -NE Niger -NF Norfolk Island -NG Nigeria -NI Nicaragua -NL Netherlands -NO Norway -NP Nepal -NR Nauru -NT Neutral Zone -NU Niue -NZ New Zealand (Aotearoa) -OM Oman -PA Panama -PE Peru -PF French Polynesia -PG Papua New Guinea -PH Philippines -PK Pakistan -PL Poland -PM St. Pierre and Miquelon -PN Pitcairn -PR Puerto Rico -PT Portugal -PW Palau -PY Paraguay -QA Qatar -RE Reunion -RO Romania -RU Russian Federation -RW Rwanda -SA Saudi Arabia -Sb Solomon Islands -SC Seychelles -SD Sudan -SE Sweden -SG Singapore -SH St. Helena -SI Slovenia -SJ Svalbard and Jan Mayen Islands -SK Slovak Republic -SL Sierra Leone -SM San Marino -SN Senegal -SO Somalia -SR Suriname -ST Sao Tome and Principe -SU USSR (former) -SV El Salvador -SY Syria -SZ Swaziland -TC Turks and Caicos Islands -TD Chad -TF French Southern Territories -TG Togo -TH Thailand -TJ Tajikistan -TK Tokelau -TM Turkmenistan -TN Tunisia -TO Tonga -TP East Timor -TR Turkey -TT Trinidad and Tobago -TV Tuvalu -TW Taiwan -TZ Tanzania -UA Ukraine -UG Uganda -UK United Kingdom -UM US Minor Outlying Islands -US United States -UY Uruguay -UZ Uzbekistan -VA Vatican City State (Holy See) -VC Saint Vincent and the Grenadines -VE Venezuela -VG Virgin Islands (British) -VI Virgin Islands (U.S.) -VN Viet Nam -VU Vanuatu -WF Wallis and Futuna Islands -WS Samoa -YE Yemen -YT Mayotte -YU Yugoslavia -ZA South Africa -ZM Zambia -ZR Zaire -ZW Zimbabwe -COM US Commercial -EDU US Educational -GOV US Government -INT International -MIL US Military -NET Network -ORG Non-Profit Organization -ARPA Old style Arpanet -NATO Nato field +arpa Old style Arpanet (arpa) +nato Nato field (nato) +com US Commercial +edu US Educational +gov US Government +int International (int) +mil US Military +net Network +org Non-Profit Organization +a1 Anonymous Proxy +a2 Satellite Provider +ad Andorra +ae United Arab Emirates +af Afghanistan +ag Antigua and Barbuda +ai Anguilla +al Albania +am Armenia +an Netherlands Antilles +ao Angola +ap Asia/Pacific Region +aq Antarctica +ar Argentina +as American Samoa +at Austria +au Australia +aw Aruba +ax Aland Islands +az Azerbaijan +ba Bosnia and Herzegovina +bb Barbados +bd Bangladesh +be Belgium +bf Burkina Faso +bg Bulgaria +bh Bahrain +bi Burundi +bj Benin +bm Bermuda +bn Brunei Darussalam +bo Bolivia +br Brazil +bs Bahamas +bt Bhutan +bv Bouvet Island +bw Botswana +by Belarus +bz Belize +ca Canada +cc Cocos (Keeling) Islands +cd Congo, The Democratic Republic of the +cf Central African Republic +cg Congo +ch Switzerland +ci Cote D'Ivoire +ck Cook Islands +cl Chile +cm Cameroon +cn China +co Colombia +cr Costa Rica +cu Cuba +cv Cape Verde +cx Christmas Island +cy Cyprus +cz Czech Republic +de Germany +dj Djibouti +dk Denmark +dm Dominica +do Dominican Republic +dz Algeria +ec Ecuador +ee Estonia +eg Egypt +eh Western Sahara +er Eritrea +es Spain +et Ethiopia +eu Europe +fi Finland +fj Fiji +fk Falkland Islands (Malvinas) +fm Micronesia, Federated States of +fo Faroe Islands +fr France +fx France, Metropolitan +ga Gabon +gb United Kingdom +gd Grenada +ge Georgia +gf French Guiana +gg Guernsey +gh Ghana +gi Gibraltar +gl Greenland +gm Gambia +gn Guinea +gp Guadeloupe +gq Equatorial Guinea +gr Greece +gs South Georgia and the South Sandwich Islands +gt Guatemala +gu Guam +gw Guinea-Bissau +gy Guyana +hk Hong Kong +hm Heard Island and McDonald Islands +hn Honduras +hr Croatia +ht Haiti +hu Hungary +id Indonesia +ie Ireland +il Israel +im Isle of Man +in India +io British Indian Ocean Territory +iq Iraq +ir Iran, Islamic Republic of +is Iceland +it Italy +je Jersey +jm Jamaica +jo Jordan +jp Japan +ke Kenya +kg Kyrgyzstan +kh Cambodia +ki Kiribati +km Comoros +kn Saint Kitts and Nevis +kp Korea, Democratic People's Republic of +kr Korea, Republic of +kw Kuwait +ky Cayman Islands +kz Kazakhstan +la Lao People's Democratic Republic +lb Lebanon +lc Saint Lucia +li Liechtenstein +lk Sri Lanka +lr Liberia +ls Lesotho +lt Lithuania +lu Luxembourg +lv Latvia +ly Libyan Arab Jamahiriya +ma Morocco +mc Monaco +md Moldova, Republic of +me Montenegro +mg Madagascar +mh Marshall Islands +mk Macedonia +ml Mali +mm Myanmar +mn Mongolia +mo Macau +mp Northern Mariana Islands +mq Martinique +mr Mauritania +ms Montserrat +mt Malta +mu Mauritius +mv Maldives +mw Malawi +mx Mexico +my Malaysia +mz Mozambique +na Namibia +nc New Caledonia +ne Niger +nf Norfolk Island +ng Nigeria +ni Nicaragua +nl Netherlands +no Norway +np Nepal +nr Nauru +nu Niue +nz New Zealand +om Oman +pa Panama +pe Peru +pf French Polynesia +pg Papua New Guinea +ph Philippines +pk Pakistan +pl Poland +pm Saint Pierre and Miquelon +pn Pitcairn Islands +pr Puerto Rico +ps Palestinian Territory +pt Portugal +pw Palau +py Paraguay +qa Qatar +re Reunion +ro Romania +rs Serbia +ru Russian Federation +rw Rwanda +sa Saudi Arabia +sb Solomon Islands +sc Seychelles +sd Sudan +se Sweden +sg Singapore +sh Saint Helena +si Slovenia +sj Svalbard and Jan Mayen +sk Slovakia +sl Sierra Leone +sm San Marino +sn Senegal +so Somalia +sr Suriname +st Sao Tome and Principe +sv El Salvador +sy Syrian Arab Republic +sz Swaziland +tc Turks and Caicos Islands +td Chad +tf French Southern Territories +tg Togo +th Thailand +tj Tajikistan +tk Tokelau +tl Timor-Leste +tm Turkmenistan +tn Tunisia +to Tonga +tr Turkey +tt Trinidad and Tobago +tv Tuvalu +tw Taiwan +tz Tanzania, United Republic of +ua Ukraine +ug Uganda +um United States Minor Outlying Islands +us United States +uy Uruguay +uz Uzbekistan +va Holy See (Vatican City State) +vc Saint Vincent and the Grenadines +ve Venezuela +vg Virgin Islands, British +vi Virgin Islands, U.S. +vn Vietnam +vu Vanuatu +wf Wallis and Futuna +ws Samoa +ye Yemen +yt Mayotte +za South Africa +zm Zambia +zw Zimbabwe diff -adNruX nodiff webalizer-orig/flags.h webalizer-2.01-10/flags.h --- webalizer-orig/flags.h 1969-12-31 19:00:00.000000000 -0500 +++ webalizer-2.01-10/flags.h 2007-01-15 18:32:53.000000000 -0500 @@ -0,0 +1,250 @@ +struct country_code country_flags[] = { +{ 0, "", 0,0,0 }, +{ IDX_2C('a','d'), " ", 0,0,0 }, +{ IDX_2C('a','e'), " ", 0,0,0 }, +{ IDX_2C('a','f'), " ", 0,0,0 }, +{ IDX_2C('a','g'), " ", 0,0,0 }, +{ IDX_2C('a','i'), " ", 0,0,0 }, +{ IDX_2C('a','l'), " ", 0,0,0 }, +{ IDX_2C('a','m'), " ", 0,0,0 }, +{ IDX_2C('a','n'), " ", 0,0,0 }, +{ IDX_2C('a','o'), " ", 0,0,0 }, +{ IDX_2C('a','p'), " ", 0,0,0 }, +{ IDX_2C('a','q'), " ", 0,0,0 }, +{ IDX_2C('a','r'), " ", 0,0,0 }, +{ IDX_2C('a','s'), " ", 0,0,0 }, +{ IDX_2C('a','t'), " ", 0,0,0 }, +{ IDX_2C('a','u'), " ", 0,0,0 }, +{ IDX_2C('a','w'), " ", 0,0,0 }, +{ IDX_2C('a','x'), " ", 0,0,0 }, +{ IDX_2C('a','z'), " ", 0,0,0 }, +{ IDX_2C('b','a'), " ", 0,0,0 }, +{ IDX_2C('b','b'), " ", 0,0,0 }, +{ IDX_2C('b','d'), " ", 0,0,0 }, +{ IDX_2C('b','e'), " ", 0,0,0 }, +{ IDX_2C('b','f'), " ", 0,0,0 }, +{ IDX_2C('b','g'), " ", 0,0,0 }, +{ IDX_2C('b','h'), " ", 0,0,0 }, +{ IDX_2C('b','i'), " ", 0,0,0 }, +{ IDX_2C('b','j'), " ", 0,0,0 }, +{ IDX_2C('b','m'), " ", 0,0,0 }, +{ IDX_2C('b','n'), " ", 0,0,0 }, +{ IDX_2C('b','o'), " ", 0,0,0 }, +{ IDX_2C('b','r'), " ", 0,0,0 }, +{ IDX_2C('b','s'), " ", 0,0,0 }, +{ IDX_2C('b','t'), " ", 0,0,0 }, +{ IDX_2C('b','v'), " ", 0,0,0 }, +{ IDX_2C('b','w'), " ", 0,0,0 }, +{ IDX_2C('b','y'), " ", 0,0,0 }, +{ IDX_2C('b','z'), " ", 0,0,0 }, +{ IDX_2C('c','a'), " ", 0,0,0 }, +{ IDX_2C('c','c'), " ", 0,0,0 }, +{ IDX_2C('c','d'), " ", 0,0,0 }, +{ IDX_2C('c','f'), " ", 0,0,0 }, +{ IDX_2C('c','g'), " ", 0,0,0 }, +{ IDX_2C('c','h'), " ", 0,0,0 }, +{ IDX_2C('c','i'), " ", 0,0,0 }, +{ IDX_2C('c','k'), " ", 0,0,0 }, +{ IDX_2C('c','l'), " ", 0,0,0 }, +{ IDX_2C('c','m'), " ", 0,0,0 }, +{ IDX_2C('c','n'), " ", 0,0,0 }, +{ IDX_2C('c','o'), " ", 0,0,0 }, +{ IDX_2C('c','r'), " ", 0,0,0 }, +{ IDX_2C('c','u'), " ", 0,0,0 }, +{ IDX_2C('c','v'), " ", 0,0,0 }, +{ IDX_2C('c','x'), " ", 0,0,0 }, +{ IDX_2C('c','y'), " ", 0,0,0 }, +{ IDX_2C('c','z'), " ", 0,0,0 }, +{ IDX_2C('d','e'), " ", 0,0,0 }, +{ IDX_2C('d','j'), " ", 0,0,0 }, +{ IDX_2C('d','k'), " ", 0,0,0 }, +{ IDX_2C('d','m'), " ", 0,0,0 }, +{ IDX_2C('d','o'), " ", 0,0,0 }, +{ IDX_2C('d','z'), " ", 0,0,0 }, +{ IDX_2C('e','c'), " ", 0,0,0 }, +{ IDX_2C('e','e'), " ", 0,0,0 }, +{ IDX_2C('e','g'), " ", 0,0,0 }, +{ IDX_2C('e','h'), " ", 0,0,0 }, +{ IDX_2C('e','r'), " ", 0,0,0 }, +{ IDX_2C('e','s'), " ", 0,0,0 }, +{ IDX_2C('e','t'), " ", 0,0,0 }, +{ IDX_2C('e','u'), " ", 0,0,0 }, +{ IDX_2C('f','i'), " ", 0,0,0 }, +{ IDX_2C('f','j'), " ", 0,0,0 }, +{ IDX_2C('f','k'), " ", 0,0,0 }, +{ IDX_2C('f','m'), " ", 0,0,0 }, +{ IDX_2C('f','o'), " ", 0,0,0 }, +{ IDX_2C('f','r'), " ", 0,0,0 }, +{ IDX_2C('f','x'), " ", 0,0,0 }, +{ IDX_2C('g','a'), " ", 0,0,0 }, +{ IDX_2C('g','b'), " ", 0,0,0 }, +{ IDX_2C('g','d'), " ", 0,0,0 }, +{ IDX_2C('g','e'), " ", 0,0,0 }, +{ IDX_2C('g','f'), " ", 0,0,0 }, +{ IDX_2C('g','g'), " ", 0,0,0 }, +{ IDX_2C('g','h'), " ", 0,0,0 }, +{ IDX_2C('g','i'), " ", 0,0,0 }, +{ IDX_2C('g','l'), " ", 0,0,0 }, +{ IDX_2C('g','m'), " ", 0,0,0 }, +{ IDX_2C('g','n'), " ", 0,0,0 }, +{ IDX_2C('g','p'), " ", 0,0,0 }, +{ IDX_2C('g','q'), " ", 0,0,0 }, +{ IDX_2C('g','r'), " ", 0,0,0 }, +{ IDX_2C('g','s'), " ", 0,0,0 }, +{ IDX_2C('g','t'), " ", 0,0,0 }, +{ IDX_2C('g','u'), " ", 0,0,0 }, +{ IDX_2C('g','w'), " ", 0,0,0 }, +{ IDX_2C('g','y'), " ", 0,0,0 }, +{ IDX_2C('h','k'), " ", 0,0,0 }, +{ IDX_2C('h','m'), " ", 0,0,0 }, +{ IDX_2C('h','n'), " ", 0,0,0 }, +{ IDX_2C('h','r'), " ", 0,0,0 }, +{ IDX_2C('h','t'), " ", 0,0,0 }, +{ IDX_2C('h','u'), " ", 0,0,0 }, +{ IDX_2C('i','d'), " ", 0,0,0 }, +{ IDX_2C('i','e'), " ", 0,0,0 }, +{ IDX_2C('i','l'), " ", 0,0,0 }, +{ IDX_2C('i','m'), " ", 0,0,0 }, +{ IDX_2C('i','n'), " ", 0,0,0 }, +{ IDX_2C('i','o'), " ", 0,0,0 }, +{ IDX_2C('i','q'), " ", 0,0,0 }, +{ IDX_2C('i','r'), " ", 0,0,0 }, +{ IDX_2C('i','s'), " ", 0,0,0 }, +{ IDX_2C('i','t'), " ", 0,0,0 }, +{ IDX_2C('j','e'), " ", 0,0,0 }, +{ IDX_2C('j','m'), " ", 0,0,0 }, +{ IDX_2C('j','o'), " ", 0,0,0 }, +{ IDX_2C('j','p'), " ", 0,0,0 }, +{ IDX_2C('k','e'), " ", 0,0,0 }, +{ IDX_2C('k','g'), " ", 0,0,0 }, +{ IDX_2C('k','h'), " ", 0,0,0 }, +{ IDX_2C('k','i'), " ", 0,0,0 }, +{ IDX_2C('k','m'), " ", 0,0,0 }, +{ IDX_2C('k','n'), " ", 0,0,0 }, +{ IDX_2C('k','p'), " ", 0,0,0 }, +{ IDX_2C('k','r'), " ", 0,0,0 }, +{ IDX_2C('k','w'), " ", 0,0,0 }, +{ IDX_2C('k','y'), " ", 0,0,0 }, +{ IDX_2C('k','z'), " ", 0,0,0 }, +{ IDX_2C('l','a'), " ", 0,0,0 }, +{ IDX_2C('l','b'), " ", 0,0,0 }, +{ IDX_2C('l','c'), " ", 0,0,0 }, +{ IDX_2C('l','i'), " ", 0,0,0 }, +{ IDX_2C('l','k'), " ", 0,0,0 }, +{ IDX_2C('l','r'), " ", 0,0,0 }, +{ IDX_2C('l','s'), " ", 0,0,0 }, +{ IDX_2C('l','t'), " ", 0,0,0 }, +{ IDX_2C('l','u'), " ", 0,0,0 }, +{ IDX_2C('l','v'), " ", 0,0,0 }, +{ IDX_2C('l','y'), " ", 0,0,0 }, +{ IDX_2C('m','a'), " ", 0,0,0 }, +{ IDX_2C('m','c'), " ", 0,0,0 }, +{ IDX_2C('m','d'), " ", 0,0,0 }, +{ IDX_2C('m','e'), " ", 0,0,0 }, +{ IDX_2C('m','g'), " ", 0,0,0 }, +{ IDX_2C('m','h'), " ", 0,0,0 }, +{ IDX_2C('m','k'), " ", 0,0,0 }, +{ IDX_2C('m','l'), " ", 0,0,0 }, +{ IDX_2C('m','m'), " ", 0,0,0 }, +{ IDX_2C('m','n'), " ", 0,0,0 }, +{ IDX_2C('m','o'), " ", 0,0,0 }, +{ IDX_2C('m','p'), " ", 0,0,0 }, +{ IDX_2C('m','q'), " ", 0,0,0 }, +{ IDX_2C('m','r'), " ", 0,0,0 }, +{ IDX_2C('m','s'), " ", 0,0,0 }, +{ IDX_2C('m','t'), " ", 0,0,0 }, +{ IDX_2C('m','u'), " ", 0,0,0 }, +{ IDX_2C('m','v'), " ", 0,0,0 }, +{ IDX_2C('m','w'), " ", 0,0,0 }, +{ IDX_2C('m','x'), " ", 0,0,0 }, +{ IDX_2C('m','y'), " ", 0,0,0 }, +{ IDX_2C('m','z'), " ", 0,0,0 }, +{ IDX_2C('n','a'), " ", 0,0,0 }, +{ IDX_2C('n','c'), " ", 0,0,0 }, +{ IDX_2C('n','e'), " ", 0,0,0 }, +{ IDX_2C('n','f'), " ", 0,0,0 }, +{ IDX_2C('n','g'), " ", 0,0,0 }, +{ IDX_2C('n','i'), " ", 0,0,0 }, +{ IDX_2C('n','l'), " ", 0,0,0 }, +{ IDX_2C('n','o'), " ", 0,0,0 }, +{ IDX_2C('n','p'), " ", 0,0,0 }, +{ IDX_2C('n','r'), " ", 0,0,0 }, +{ IDX_2C('n','u'), " ", 0,0,0 }, +{ IDX_2C('n','z'), " ", 0,0,0 }, +{ IDX_2C('o','m'), " ", 0,0,0 }, +{ IDX_2C('p','a'), " ", 0,0,0 }, +{ IDX_2C('p','e'), " ", 0,0,0 }, +{ IDX_2C('p','f'), " ", 0,0,0 }, +{ IDX_2C('p','g'), " ", 0,0,0 }, +{ IDX_2C('p','h'), " ", 0,0,0 }, +{ IDX_2C('p','k'), " ", 0,0,0 }, +{ IDX_2C('p','l'), " ", 0,0,0 }, +{ IDX_2C('p','m'), " ", 0,0,0 }, +{ IDX_2C('p','n'), " ", 0,0,0 }, +{ IDX_2C('p','r'), " ", 0,0,0 }, +{ IDX_2C('p','s'), " ", 0,0,0 }, +{ IDX_2C('p','t'), " ", 0,0,0 }, +{ IDX_2C('p','w'), " ", 0,0,0 }, +{ IDX_2C('p','y'), " ", 0,0,0 }, +{ IDX_2C('q','a'), " ", 0,0,0 }, +{ IDX_2C('r','e'), " ", 0,0,0 }, +{ IDX_2C('r','o'), " ", 0,0,0 }, +{ IDX_2C('r','s'), " ", 0,0,0 }, +{ IDX_2C('r','u'), " ", 0,0,0 }, +{ IDX_2C('r','w'), " ", 0,0,0 }, +{ IDX_2C('s','a'), " ", 0,0,0 }, +{ IDX_2C('s','b'), " ", 0,0,0 }, +{ IDX_2C('s','c'), " ", 0,0,0 }, +{ IDX_2C('s','d'), " ", 0,0,0 }, +{ IDX_2C('s','e'), " ", 0,0,0 }, +{ IDX_2C('s','g'), " ", 0,0,0 }, +{ IDX_2C('s','h'), " ", 0,0,0 }, +{ IDX_2C('s','i'), " ", 0,0,0 }, +{ IDX_2C('s','j'), " ", 0,0,0 }, +{ IDX_2C('s','k'), " ", 0,0,0 }, +{ IDX_2C('s','l'), " ", 0,0,0 }, +{ IDX_2C('s','m'), " ", 0,0,0 }, +{ IDX_2C('s','n'), " ", 0,0,0 }, +{ IDX_2C('s','o'), " ", 0,0,0 }, +{ IDX_2C('s','r'), " ", 0,0,0 }, +{ IDX_2C('s','t'), " ", 0,0,0 }, +{ IDX_2C('s','v'), " ", 0,0,0 }, +{ IDX_2C('s','y'), " ", 0,0,0 }, +{ IDX_2C('s','z'), " ", 0,0,0 }, +{ IDX_2C('t','c'), " ", 0,0,0 }, +{ IDX_2C('t','d'), " ", 0,0,0 }, +{ IDX_2C('t','f'), " ", 0,0,0 }, +{ IDX_2C('t','g'), " ", 0,0,0 }, +{ IDX_2C('t','h'), " ", 0,0,0 }, +{ IDX_2C('t','j'), " ", 0,0,0 }, +{ IDX_2C('t','k'), " ", 0,0,0 }, +{ IDX_2C('t','l'), " ", 0,0,0 }, +{ IDX_2C('t','m'), " ", 0,0,0 }, +{ IDX_2C('t','n'), " ", 0,0,0 }, +{ IDX_2C('t','o'), " ", 0,0,0 }, +{ IDX_2C('t','r'), " ", 0,0,0 }, +{ IDX_2C('t','t'), " ", 0,0,0 }, +{ IDX_2C('t','v'), " ", 0,0,0 }, +{ IDX_2C('t','w'), " ", 0,0,0 }, +{ IDX_2C('t','z'), " ", 0,0,0 }, +{ IDX_2C('u','a'), " ", 0,0,0 }, +{ IDX_2C('u','g'), " ", 0,0,0 }, +{ IDX_2C('u','m'), " ", 0,0,0 }, +{ IDX_2C('u','s'), " ", 0,0,0 }, +{ IDX_2C('u','y'), " ", 0,0,0 }, +{ IDX_2C('u','z'), " ", 0,0,0 }, +{ IDX_2C('v','a'), " ", 0,0,0 }, +{ IDX_2C('v','c'), " ", 0,0,0 }, +{ IDX_2C('v','e'), " ", 0,0,0 }, +{ IDX_2C('v','g'), " ", 0,0,0 }, +{ IDX_2C('v','i'), " ", 0,0,0 }, +{ IDX_2C('v','n'), " ", 0,0,0 }, +{ IDX_2C('v','u'), " ", 0,0,0 }, +{ IDX_2C('w','f'), " ", 0,0,0 }, +{ IDX_2C('w','s'), " ", 0,0,0 }, +{ IDX_2C('y','e'), " ", 0,0,0 }, +{ IDX_2C('y','t'), " ", 0,0,0 }, +{ IDX_2C('z','a'), " ", 0,0,0 }, +{ IDX_2C('z','m'), " ", 0,0,0 }, +{ IDX_2C('z','w'), " ", 0,0,0 }, +{ 0, NULL, 0,0,0 }}; diff -adNruX nodiff webalizer-orig/lang/webalizer_lang.english webalizer-2.01-10/lang/webalizer_lang.english --- webalizer-orig/lang/webalizer_lang.english 2000-10-06 01:27:48.000000000 -0400 +++ webalizer-2.01-10/lang/webalizer_lang.english 2007-01-15 18:34:17.000000000 -0500 @@ -154,6 +154,8 @@ "-X = Hide individual sites" , "-D name = Use DNS Cache file 'name'" , "-N num = Number of DNS processes (0=disable)" , + "-w = Disable GeoIP feature" , + "-W file = Use specific GeoIP database 'file'" , NULL}; /***********************************************************************/ @@ -323,258 +325,264 @@ /* Country codes (previously in ctry.h header file) */ -struct country_code ctry[] = { -{ 0, "Unresolved/Unknown", 0,0,0 }, -{ IDX_3C('c','o','m'), "US Commercial", 0,0,0 }, -{ IDX_3C('e','d','u'), "US Educational", 0,0,0 }, -{ IDX_3C('g','o','v'), "US Government", 0,0,0 }, -{ IDX_3C('i','n','t'), "International (int)", 0,0,0 }, -{ IDX_3C('m','i','l'), "US Military", 0,0,0 }, -{ IDX_3C('n','e','t'), "Network", 0,0,0 }, -{ IDX_3C('o','r','g'), "Non-Profit Organization", 0,0,0 }, -{ IDX_4C('a','r','p','a'),"Old style Arpanet (arpa)", 0,0,0 }, -{ IDX_4C('n','a','t','o'),"Nato field (nato)", 0,0,0 }, -{ IDX_2C('a','d'), "Andorra", 0,0,0 }, -{ IDX_2C('a','e'), "United Arab Emirates", 0,0,0 }, -{ IDX_2C('a','f'), "Afghanistan", 0,0,0 }, -{ IDX_2C('a','g'), "Antigua and Barbuda", 0,0,0 }, -{ IDX_2C('a','i'), "Anguilla", 0,0,0 }, -{ IDX_2C('a','l'), "Albania", 0,0,0 }, -{ IDX_2C('a','m'), "Armenia", 0,0,0 }, -{ IDX_2C('a','n'), "Netherlands Antilles", 0,0,0 }, -{ IDX_2C('a','o'), "Angola", 0,0,0 }, -{ IDX_2C('a','q'), "Antarctica", 0,0,0 }, -{ IDX_2C('a','r'), "Argentina", 0,0,0 }, -{ IDX_2C('a','s'), "American Samoa", 0,0,0 }, -{ IDX_2C('a','t'), "Austria", 0,0,0 }, -{ IDX_2C('a','u'), "Australia", 0,0,0 }, -{ IDX_2C('a','w'), "Aruba", 0,0,0 }, -{ IDX_2C('a','z'), "Azerbaijan", 0,0,0 }, -{ IDX_2C('b','a'), "Bosnia and Herzegovina", 0,0,0 }, -{ IDX_2C('b','b'), "Barbados", 0,0,0 }, -{ IDX_2C('b','d'), "Bangladesh", 0,0,0 }, -{ IDX_2C('b','e'), "Belgium", 0,0,0 }, -{ IDX_2C('b','f'), "Burkina Faso", 0,0,0 }, -{ IDX_2C('b','g'), "Bulgaria", 0,0,0 }, -{ IDX_2C('b','h'), "Bahrain", 0,0,0 }, -{ IDX_2C('b','i'), "Burundi", 0,0,0 }, -{ IDX_2C('b','j'), "Benin", 0,0,0 }, -{ IDX_2C('b','m'), "Bermuda", 0,0,0 }, -{ IDX_2C('b','n'), "Brunei Darussalam", 0,0,0 }, -{ IDX_2C('b','o'), "Bolivia", 0,0,0 }, -{ IDX_2C('b','r'), "Brazil", 0,0,0 }, -{ IDX_2C('b','s'), "Bahamas", 0,0,0 }, -{ IDX_2C('b','t'), "Bhutan", 0,0,0 }, -{ IDX_2C('b','v'), "Bouvet Island", 0,0,0 }, -{ IDX_2C('b','w'), "Botswana", 0,0,0 }, -{ IDX_2C('b','y'), "Belarus", 0,0,0 }, -{ IDX_2C('b','z'), "Belize", 0,0,0 }, -{ IDX_2C('c','a'), "Canada", 0,0,0 }, -{ IDX_2C('c','c'), "Cocos (Keeling) Islands", 0,0,0 }, -{ IDX_2C('c','f'), "Central African Republic", 0,0,0 }, -{ IDX_2C('c','g'), "Congo", 0,0,0 }, -{ IDX_2C('c','h'), "Switzerland", 0,0,0 }, -{ IDX_2C('c','i'), "Cote D'Ivoire (Ivory Coast)", 0,0,0 }, -{ IDX_2C('c','k'), "Cook Islands", 0,0,0 }, -{ IDX_2C('c','l'), "Chile", 0,0,0 }, -{ IDX_2C('c','m'), "Cameroon", 0,0,0 }, -{ IDX_2C('c','n'), "China", 0,0,0 }, -{ IDX_2C('c','o'), "Colombia", 0,0,0 }, -{ IDX_2C('c','r'), "Costa Rica", 0,0,0 }, -{ IDX_2C('c','s'), "Czechoslovakia (former)", 0,0,0 }, -{ IDX_2C('c','u'), "Cuba", 0,0,0 }, -{ IDX_2C('c','v'), "Cape Verde", 0,0,0 }, -{ IDX_2C('c','x'), "Christmas Island", 0,0,0 }, -{ IDX_2C('c','y'), "Cyprus", 0,0,0 }, -{ IDX_2C('c','z'), "Czech Republic", 0,0,0 }, -{ IDX_2C('d','e'), "Germany", 0,0,0 }, -{ IDX_2C('d','j'), "Djibouti", 0,0,0 }, -{ IDX_2C('d','k'), "Denmark", 0,0,0 }, -{ IDX_2C('d','m'), "Dominica", 0,0,0 }, -{ IDX_2C('d','o'), "Dominican Republic", 0,0,0 }, -{ IDX_2C('d','z'), "Algeria", 0,0,0 }, -{ IDX_2C('e','c'), "Ecuador", 0,0,0 }, -{ IDX_2C('e','e'), "Estonia", 0,0,0 }, -{ IDX_2C('e','g'), "Egypt", 0,0,0 }, -{ IDX_2C('e','h'), "Western Sahara", 0,0,0 }, -{ IDX_2C('e','r'), "Eritrea", 0,0,0 }, -{ IDX_2C('e','s'), "Spain", 0,0,0 }, -{ IDX_2C('e','t'), "Ethiopia", 0,0,0 }, -{ IDX_2C('f','i'), "Finland", 0,0,0 }, -{ IDX_2C('f','j'), "Fiji", 0,0,0 }, -{ IDX_2C('f','k'), "Falkland Islands (Malvinas)", 0,0,0 }, -{ IDX_2C('f','m'), "Micronesia", 0,0,0 }, -{ IDX_2C('f','o'), "Faroe Islands", 0,0,0 }, -{ IDX_2C('f','r'), "France", 0,0,0 }, -{ IDX_2C('f','x'), "France, Metropolitan", 0,0,0 }, -{ IDX_2C('g','a'), "Gabon", 0,0,0 }, -{ IDX_2C('g','b'), "Great Britain (UK)", 0,0,0 }, -{ IDX_2C('g','d'), "Grenada", 0,0,0 }, -{ IDX_2C('g','e'), "Georgia", 0,0,0 }, -{ IDX_2C('g','f'), "French Guiana", 0,0,0 }, -{ IDX_2C('g','h'), "Ghana", 0,0,0 }, -{ IDX_2C('g','i'), "Gibraltar", 0,0,0 }, -{ IDX_2C('g','l'), "Greenland", 0,0,0 }, -{ IDX_2C('g','m'), "Gambia", 0,0,0 }, -{ IDX_2C('g','n'), "Guinea", 0,0,0 }, -{ IDX_2C('g','p'), "Guadeloupe", 0,0,0 }, -{ IDX_2C('g','q'), "Equatorial Guinea", 0,0,0 }, -{ IDX_2C('g','r'), "Greece", 0,0,0 }, -{ IDX_2C('g','s'), "S. Georgia and S. Sandwich Isls.", 0,0,0 }, -{ IDX_2C('g','t'), "Guatemala", 0,0,0 }, -{ IDX_2C('g','u'), "Guam", 0,0,0 }, -{ IDX_2C('g','w'), "Guinea-Bissau", 0,0,0 }, -{ IDX_2C('g','y'), "Guyana", 0,0,0 }, -{ IDX_2C('h','k'), "Hong Kong", 0,0,0 }, -{ IDX_2C('h','m'), "Heard and McDonald Islands", 0,0,0 }, -{ IDX_2C('h','n'), "Honduras", 0,0,0 }, -{ IDX_2C('h','r'), "Croatia (Hrvatska)", 0,0,0 }, -{ IDX_2C('h','t'), "Haiti", 0,0,0 }, -{ IDX_2C('h','u'), "Hungary", 0,0,0 }, -{ IDX_2C('i','d'), "Indonesia", 0,0,0 }, -{ IDX_2C('i','e'), "Ireland", 0,0,0 }, -{ IDX_2C('i','l'), "Israel", 0,0,0 }, -{ IDX_2C('i','n'), "India", 0,0,0 }, -{ IDX_2C('i','o'), "British Indian Ocean Territory", 0,0,0 }, -{ IDX_2C('i','q'), "Iraq", 0,0,0 }, -{ IDX_2C('i','r'), "Iran", 0,0,0 }, -{ IDX_2C('i','s'), "Iceland", 0,0,0 }, -{ IDX_2C('i','t'), "Italy", 0,0,0 }, -{ IDX_2C('j','m'), "Jamaica", 0,0,0 }, -{ IDX_2C('j','o'), "Jordan", 0,0,0 }, -{ IDX_2C('j','p'), "Japan", 0,0,0 }, -{ IDX_2C('k','e'), "Kenya", 0,0,0 }, -{ IDX_2C('k','g'), "Kyrgyzstan", 0,0,0 }, -{ IDX_2C('k','h'), "Cambodia", 0,0,0 }, -{ IDX_2C('k','i'), "Kiribati", 0,0,0 }, -{ IDX_2C('k','m'), "Comoros", 0,0,0 }, -{ IDX_2C('k','n'), "Saint Kitts and Nevis", 0,0,0 }, -{ IDX_2C('k','p'), "Korea (North)", 0,0,0 }, -{ IDX_2C('k','r'), "Korea (South)", 0,0,0 }, -{ IDX_2C('k','w'), "Kuwait", 0,0,0 }, -{ IDX_2C('k','y'), "Cayman Islands", 0,0,0 }, -{ IDX_2C('k','z'), "Kazakhstan", 0,0,0 }, -{ IDX_2C('l','a'), "Laos", 0,0,0 }, -{ IDX_2C('l','b'), "Lebanon", 0,0,0 }, -{ IDX_2C('l','c'), "Saint Lucia", 0,0,0 }, -{ IDX_2C('l','i'), "Liechtenstein", 0,0,0 }, -{ IDX_2C('l','k'), "Sri Lanka", 0,0,0 }, -{ IDX_2C('l','r'), "Liberia", 0,0,0 }, -{ IDX_2C('l','s'), "Lesotho", 0,0,0 }, -{ IDX_2C('l','t'), "Lithuania", 0,0,0 }, -{ IDX_2C('l','u'), "Luxembourg", 0,0,0 }, -{ IDX_2C('l','v'), "Latvia", 0,0,0 }, -{ IDX_2C('l','y'), "Libya", 0,0,0 }, -{ IDX_2C('m','a'), "Morocco", 0,0,0 }, -{ IDX_2C('m','c'), "Monaco", 0,0,0 }, -{ IDX_2C('m','d'), "Moldova", 0,0,0 }, -{ IDX_2C('m','g'), "Madagascar", 0,0,0 }, -{ IDX_2C('m','h'), "Marshall Islands", 0,0,0 }, -{ IDX_2C('m','k'), "Macedonia", 0,0,0 }, -{ IDX_2C('m','l'), "Mali", 0,0,0 }, -{ IDX_2C('m','m'), "Myanmar", 0,0,0 }, -{ IDX_2C('m','n'), "Mongolia", 0,0,0 }, -{ IDX_2C('m','o'), "Macau", 0,0,0 }, -{ IDX_2C('m','p'), "Northern Mariana Islands", 0,0,0 }, -{ IDX_2C('m','q'), "Martinique", 0,0,0 }, -{ IDX_2C('m','r'), "Mauritania", 0,0,0 }, -{ IDX_2C('m','s'), "Montserrat", 0,0,0 }, -{ IDX_2C('m','t'), "Malta", 0,0,0 }, -{ IDX_2C('m','u'), "Mauritius", 0,0,0 }, -{ IDX_2C('m','v'), "Maldives", 0,0,0 }, -{ IDX_2C('m','w'), "Malawi", 0,0,0 }, -{ IDX_2C('m','x'), "Mexico", 0,0,0 }, -{ IDX_2C('m','y'), "Malaysia", 0,0,0 }, -{ IDX_2C('m','z'), "Mozambique", 0,0,0 }, -{ IDX_2C('n','a'), "Namibia", 0,0,0 }, -{ IDX_2C('n','c'), "New Caledonia", 0,0,0 }, -{ IDX_2C('n','e'), "Niger", 0,0,0 }, -{ IDX_2C('n','f'), "Norfolk Island", 0,0,0 }, -{ IDX_2C('n','g'), "Nigeria", 0,0,0 }, -{ IDX_2C('n','i'), "Nicaragua", 0,0,0 }, -{ IDX_2C('n','l'), "Netherlands", 0,0,0 }, -{ IDX_2C('n','o'), "Norway", 0,0,0 }, -{ IDX_2C('n','p'), "Nepal", 0,0,0 }, -{ IDX_2C('n','r'), "Nauru", 0,0,0 }, -{ IDX_2C('n','t'), "Neutral Zone", 0,0,0 }, -{ IDX_2C('n','u'), "Niue", 0,0,0 }, -{ IDX_2C('n','z'), "New Zealand (Aotearoa)", 0,0,0 }, -{ IDX_2C('o','m'), "Oman", 0,0,0 }, -{ IDX_2C('p','a'), "Panama", 0,0,0 }, -{ IDX_2C('p','e'), "Peru", 0,0,0 }, -{ IDX_2C('p','f'), "French Polynesia", 0,0,0 }, -{ IDX_2C('p','g'), "Papua New Guinea", 0,0,0 }, -{ IDX_2C('p','h'), "Philippines", 0,0,0 }, -{ IDX_2C('p','k'), "Pakistan", 0,0,0 }, -{ IDX_2C('p','l'), "Poland", 0,0,0 }, -{ IDX_2C('p','m'), "St. Pierre and Miquelon", 0,0,0 }, -{ IDX_2C('p','n'), "Pitcairn", 0,0,0 }, -{ IDX_2C('p','r'), "Puerto Rico", 0,0,0 }, -{ IDX_2C('p','t'), "Portugal", 0,0,0 }, -{ IDX_2C('p','w'), "Palau", 0,0,0 }, -{ IDX_2C('p','y'), "Paraguay", 0,0,0 }, -{ IDX_2C('q','a'), "Qatar", 0,0,0 }, -{ IDX_2C('r','e'), "Reunion", 0,0,0 }, -{ IDX_2C('r','o'), "Romania", 0,0,0 }, -{ IDX_2C('r','u'), "Russian Federation", 0,0,0 }, -{ IDX_2C('r','w'), "Rwanda", 0,0,0 }, -{ IDX_2C('s','a'), "Saudi Arabia", 0,0,0 }, -{ IDX_2C('s','B'), "Solomon Islands", 0,0,0 }, -{ IDX_2C('s','c'), "Seychelles", 0,0,0 }, -{ IDX_2C('s','d'), "Sudan", 0,0,0 }, -{ IDX_2C('s','e'), "Sweden", 0,0,0 }, -{ IDX_2C('s','g'), "Singapore", 0,0,0 }, -{ IDX_2C('s','h'), "St. Helena", 0,0,0 }, -{ IDX_2C('s','i'), "Slovenia", 0,0,0 }, -{ IDX_2C('s','j'), "Svalbard and Jan Mayen Islands", 0,0,0 }, -{ IDX_2C('s','k'), "Slovak Republic", 0,0,0 }, -{ IDX_2C('s','l'), "Sierra Leone", 0,0,0 }, -{ IDX_2C('s','m'), "San Marino", 0,0,0 }, -{ IDX_2C('s','n'), "Senegal", 0,0,0 }, -{ IDX_2C('s','o'), "Somalia", 0,0,0 }, -{ IDX_2C('s','r'), "Suriname", 0,0,0 }, -{ IDX_2C('s','t'), "Sao Tome and Principe", 0,0,0 }, -{ IDX_2C('s','u'), "USSR (former)", 0,0,0 }, -{ IDX_2C('s','v'), "El Salvador", 0,0,0 }, -{ IDX_2C('s','y'), "Syria", 0,0,0 }, -{ IDX_2C('s','z'), "Swaziland", 0,0,0 }, -{ IDX_2C('t','c'), "Turks and Caicos Islands", 0,0,0 }, -{ IDX_2C('t','d'), "Chad", 0,0,0 }, -{ IDX_2C('t','f'), "French Southern Territories", 0,0,0 }, -{ IDX_2C('t','g'), "Togo", 0,0,0 }, -{ IDX_2C('t','h'), "Thailand", 0,0,0 }, -{ IDX_2C('t','j'), "Tajikistan", 0,0,0 }, -{ IDX_2C('t','k'), "Tokelau", 0,0,0 }, -{ IDX_2C('t','m'), "Turkmenistan", 0,0,0 }, -{ IDX_2C('t','n'), "Tunisia", 0,0,0 }, -{ IDX_2C('t','o'), "Tonga", 0,0,0 }, -{ IDX_2C('t','p'), "East Timor", 0,0,0 }, -{ IDX_2C('t','r'), "Turkey", 0,0,0 }, -{ IDX_2C('t','t'), "Trinidad and Tobago", 0,0,0 }, -{ IDX_2C('t','v'), "Tuvalu", 0,0,0 }, -{ IDX_2C('t','w'), "Taiwan", 0,0,0 }, -{ IDX_2C('t','z'), "Tanzania", 0,0,0 }, -{ IDX_2C('u','a'), "Ukraine", 0,0,0 }, -{ IDX_2C('u','g'), "Uganda", 0,0,0 }, -{ IDX_2C('u','k'), "United Kingdom", 0,0,0 }, -{ IDX_2C('u','m'), "US Minor Outlying Islands", 0,0,0 }, -{ IDX_2C('u','s'), "United States", 0,0,0 }, -{ IDX_2C('u','y'), "Uruguay", 0,0,0 }, -{ IDX_2C('u','z'), "Uzbekistan", 0,0,0 }, -{ IDX_2C('v','a'), "Vatican City State (Holy See)", 0,0,0 }, -{ IDX_2C('v','c'), "Saint Vincent and the Grenadines", 0,0,0 }, -{ IDX_2C('v','e'), "Venezuela", 0,0,0 }, -{ IDX_2C('v','g'), "Virgin Islands (British)", 0,0,0 }, -{ IDX_2C('v','i'), "Virgin Islands (U.S.)", 0,0,0 }, -{ IDX_2C('v','n'), "Viet Nam", 0,0,0 }, -{ IDX_2C('v','u'), "Vanuatu", 0,0,0 }, -{ IDX_2C('w','f'), "Wallis and Futuna Islands", 0,0,0 }, -{ IDX_2C('w','s'), "Samoa", 0,0,0 }, -{ IDX_2C('y','e'), "Yemen", 0,0,0 }, -{ IDX_2C('y','t'), "Mayotte", 0,0,0 }, -{ IDX_2C('y','u'), "Yugoslavia", 0,0,0 }, -{ IDX_2C('z','a'), "South Africa", 0,0,0 }, -{ IDX_2C('z','m'), "Zambia", 0,0,0 }, -{ IDX_2C('z','r'), "Zaire", 0,0,0 }, -{ IDX_2C('z','w'), "Zimbabwe", 0,0,0 }, -{ 0 , NULL, 0,0,0 }}; +struct country_code ctry[] = { +{ 0, "Unresolved/Unknown", 0,0,0 }, +{ IDX_4C('a','r','p','a'),"Old style Arpanet (arpa)", 0,0,0 }, +{ IDX_4C('n','a','t','o'),"Nato field (nato)", 0,0,0 }, +{ IDX_3C('c','o','m'), "US Commercial", 0,0,0 }, +{ IDX_3C('e','d','u'), "US Educational", 0,0,0 }, +{ IDX_3C('g','o','v'), "US Government", 0,0,0 }, +{ IDX_3C('i','n','t'), "International (int)", 0,0,0 }, +{ IDX_3C('m','i','l'), "US Military", 0,0,0 }, +{ IDX_3C('n','e','t'), "Network", 0,0,0 }, +{ IDX_3C('o','r','g'), "Non-Profit Organization", 0,0,0 }, +{ IDX_2C('a','1'), "Anonymous Proxy", 0,0,0 }, +{ IDX_2C('a','2'), "Satellite Provider", 0,0,0 }, +{ IDX_2C('a','d'), "Andorra", 0,0,0 }, +{ IDX_2C('a','e'), "United Arab Emirates", 0,0,0 }, +{ IDX_2C('a','f'), "Afghanistan", 0,0,0 }, +{ IDX_2C('a','g'), "Antigua and Barbuda", 0,0,0 }, +{ IDX_2C('a','i'), "Anguilla", 0,0,0 }, +{ IDX_2C('a','l'), "Albania", 0,0,0 }, +{ IDX_2C('a','m'), "Armenia", 0,0,0 }, +{ IDX_2C('a','n'), "Netherlands Antilles", 0,0,0 }, +{ IDX_2C('a','o'), "Angola", 0,0,0 }, +{ IDX_2C('a','p'), "Asia/Pacific Region", 0,0,0 }, +{ IDX_2C('a','q'), "Antarctica", 0,0,0 }, +{ IDX_2C('a','r'), "Argentina", 0,0,0 }, +{ IDX_2C('a','s'), "American Samoa", 0,0,0 }, +{ IDX_2C('a','t'), "Austria", 0,0,0 }, +{ IDX_2C('a','u'), "Australia", 0,0,0 }, +{ IDX_2C('a','w'), "Aruba", 0,0,0 }, +{ IDX_2C('a','x'), "Aland Islands", 0,0,0 }, +{ IDX_2C('a','z'), "Azerbaijan", 0,0,0 }, +{ IDX_2C('b','a'), "Bosnia and Herzegovina", 0,0,0 }, +{ IDX_2C('b','b'), "Barbados", 0,0,0 }, +{ IDX_2C('b','d'), "Bangladesh", 0,0,0 }, +{ IDX_2C('b','e'), "Belgium", 0,0,0 }, +{ IDX_2C('b','f'), "Burkina Faso", 0,0,0 }, +{ IDX_2C('b','g'), "Bulgaria", 0,0,0 }, +{ IDX_2C('b','h'), "Bahrain", 0,0,0 }, +{ IDX_2C('b','i'), "Burundi", 0,0,0 }, +{ IDX_2C('b','j'), "Benin", 0,0,0 }, +{ IDX_2C('b','m'), "Bermuda", 0,0,0 }, +{ IDX_2C('b','n'), "Brunei Darussalam", 0,0,0 }, +{ IDX_2C('b','o'), "Bolivia", 0,0,0 }, +{ IDX_2C('b','r'), "Brazil", 0,0,0 }, +{ IDX_2C('b','s'), "Bahamas", 0,0,0 }, +{ IDX_2C('b','t'), "Bhutan", 0,0,0 }, +{ IDX_2C('b','v'), "Bouvet Island", 0,0,0 }, +{ IDX_2C('b','w'), "Botswana", 0,0,0 }, +{ IDX_2C('b','y'), "Belarus", 0,0,0 }, +{ IDX_2C('b','z'), "Belize", 0,0,0 }, +{ IDX_2C('c','a'), "Canada", 0,0,0 }, +{ IDX_2C('c','c'), "Cocos (Keeling) Islands", 0,0,0 }, +{ IDX_2C('c','d'), "Congo, The Democratic Republic of the", 0,0,0 }, +{ IDX_2C('c','f'), "Central African Republic", 0,0,0 }, +{ IDX_2C('c','g'), "Congo", 0,0,0 }, +{ IDX_2C('c','h'), "Switzerland", 0,0,0 }, +{ IDX_2C('c','i'), "Cote D'Ivoire", 0,0,0 }, +{ IDX_2C('c','k'), "Cook Islands", 0,0,0 }, +{ IDX_2C('c','l'), "Chile", 0,0,0 }, +{ IDX_2C('c','m'), "Cameroon", 0,0,0 }, +{ IDX_2C('c','n'), "China", 0,0,0 }, +{ IDX_2C('c','o'), "Colombia", 0,0,0 }, +{ IDX_2C('c','r'), "Costa Rica", 0,0,0 }, +{ IDX_2C('c','u'), "Cuba", 0,0,0 }, +{ IDX_2C('c','v'), "Cape Verde", 0,0,0 }, +{ IDX_2C('c','x'), "Christmas Island", 0,0,0 }, +{ IDX_2C('c','y'), "Cyprus", 0,0,0 }, +{ IDX_2C('c','z'), "Czech Republic", 0,0,0 }, +{ IDX_2C('d','e'), "Germany", 0,0,0 }, +{ IDX_2C('d','j'), "Djibouti", 0,0,0 }, +{ IDX_2C('d','k'), "Denmark", 0,0,0 }, +{ IDX_2C('d','m'), "Dominica", 0,0,0 }, +{ IDX_2C('d','o'), "Dominican Republic", 0,0,0 }, +{ IDX_2C('d','z'), "Algeria", 0,0,0 }, +{ IDX_2C('e','c'), "Ecuador", 0,0,0 }, +{ IDX_2C('e','e'), "Estonia", 0,0,0 }, +{ IDX_2C('e','g'), "Egypt", 0,0,0 }, +{ IDX_2C('e','h'), "Western Sahara", 0,0,0 }, +{ IDX_2C('e','r'), "Eritrea", 0,0,0 }, +{ IDX_2C('e','s'), "Spain", 0,0,0 }, +{ IDX_2C('e','t'), "Ethiopia", 0,0,0 }, +{ IDX_2C('e','u'), "Europe", 0,0,0 }, +{ IDX_2C('f','i'), "Finland", 0,0,0 }, +{ IDX_2C('f','j'), "Fiji", 0,0,0 }, +{ IDX_2C('f','k'), "Falkland Islands (Malvinas)", 0,0,0 }, +{ IDX_2C('f','m'), "Micronesia, Federated States of", 0,0,0 }, +{ IDX_2C('f','o'), "Faroe Islands", 0,0,0 }, +{ IDX_2C('f','r'), "France", 0,0,0 }, +{ IDX_2C('f','x'), "France, Metropolitan", 0,0,0 }, +{ IDX_2C('g','a'), "Gabon", 0,0,0 }, +{ IDX_2C('g','b'), "United Kingdom", 0,0,0 }, +{ IDX_2C('g','d'), "Grenada", 0,0,0 }, +{ IDX_2C('g','e'), "Georgia", 0,0,0 }, +{ IDX_2C('g','f'), "French Guiana", 0,0,0 }, +{ IDX_2C('g','g'), "Guernsey", 0,0,0 }, +{ IDX_2C('g','h'), "Ghana", 0,0,0 }, +{ IDX_2C('g','i'), "Gibraltar", 0,0,0 }, +{ IDX_2C('g','l'), "Greenland", 0,0,0 }, +{ IDX_2C('g','m'), "Gambia", 0,0,0 }, +{ IDX_2C('g','n'), "Guinea", 0,0,0 }, +{ IDX_2C('g','p'), "Guadeloupe", 0,0,0 }, +{ IDX_2C('g','q'), "Equatorial Guinea", 0,0,0 }, +{ IDX_2C('g','r'), "Greece", 0,0,0 }, +{ IDX_2C('g','s'), "South Georgia and the South Sandwich Islands", 0,0,0 }, +{ IDX_2C('g','t'), "Guatemala", 0,0,0 }, +{ IDX_2C('g','u'), "Guam", 0,0,0 }, +{ IDX_2C('g','w'), "Guinea-Bissau", 0,0,0 }, +{ IDX_2C('g','y'), "Guyana", 0,0,0 }, +{ IDX_2C('h','k'), "Hong Kong", 0,0,0 }, +{ IDX_2C('h','m'), "Heard Island and McDonald Islands", 0,0,0 }, +{ IDX_2C('h','n'), "Honduras", 0,0,0 }, +{ IDX_2C('h','r'), "Croatia", 0,0,0 }, +{ IDX_2C('h','t'), "Haiti", 0,0,0 }, +{ IDX_2C('h','u'), "Hungary", 0,0,0 }, +{ IDX_2C('i','d'), "Indonesia", 0,0,0 }, +{ IDX_2C('i','e'), "Ireland", 0,0,0 }, +{ IDX_2C('i','l'), "Israel", 0,0,0 }, +{ IDX_2C('i','m'), "Isle of Man", 0,0,0 }, +{ IDX_2C('i','n'), "India", 0,0,0 }, +{ IDX_2C('i','o'), "British Indian Ocean Territory", 0,0,0 }, +{ IDX_2C('i','q'), "Iraq", 0,0,0 }, +{ IDX_2C('i','r'), "Iran, Islamic Republic of", 0,0,0 }, +{ IDX_2C('i','s'), "Iceland", 0,0,0 }, +{ IDX_2C('i','t'), "Italy", 0,0,0 }, +{ IDX_2C('j','e'), "Jersey", 0,0,0 }, +{ IDX_2C('j','m'), "Jamaica", 0,0,0 }, +{ IDX_2C('j','o'), "Jordan", 0,0,0 }, +{ IDX_2C('j','p'), "Japan", 0,0,0 }, +{ IDX_2C('k','e'), "Kenya", 0,0,0 }, +{ IDX_2C('k','g'), "Kyrgyzstan", 0,0,0 }, +{ IDX_2C('k','h'), "Cambodia", 0,0,0 }, +{ IDX_2C('k','i'), "Kiribati", 0,0,0 }, +{ IDX_2C('k','m'), "Comoros", 0,0,0 }, +{ IDX_2C('k','n'), "Saint Kitts and Nevis", 0,0,0 }, +{ IDX_2C('k','p'), "Korea, Democratic People's Republic of", 0,0,0 }, +{ IDX_2C('k','r'), "Korea, Republic of", 0,0,0 }, +{ IDX_2C('k','w'), "Kuwait", 0,0,0 }, +{ IDX_2C('k','y'), "Cayman Islands", 0,0,0 }, +{ IDX_2C('k','z'), "Kazakhstan", 0,0,0 }, +{ IDX_2C('l','a'), "Lao People's Democratic Republic", 0,0,0 }, +{ IDX_2C('l','b'), "Lebanon", 0,0,0 }, +{ IDX_2C('l','c'), "Saint Lucia", 0,0,0 }, +{ IDX_2C('l','i'), "Liechtenstein", 0,0,0 }, +{ IDX_2C('l','k'), "Sri Lanka", 0,0,0 }, +{ IDX_2C('l','r'), "Liberia", 0,0,0 }, +{ IDX_2C('l','s'), "Lesotho", 0,0,0 }, +{ IDX_2C('l','t'), "Lithuania", 0,0,0 }, +{ IDX_2C('l','u'), "Luxembourg", 0,0,0 }, +{ IDX_2C('l','v'), "Latvia", 0,0,0 }, +{ IDX_2C('l','y'), "Libyan Arab Jamahiriya", 0,0,0 }, +{ IDX_2C('m','a'), "Morocco", 0,0,0 }, +{ IDX_2C('m','c'), "Monaco", 0,0,0 }, +{ IDX_2C('m','d'), "Moldova, Republic of", 0,0,0 }, +{ IDX_2C('m','e'), "Montenegro", 0,0,0 }, +{ IDX_2C('m','g'), "Madagascar", 0,0,0 }, +{ IDX_2C('m','h'), "Marshall Islands", 0,0,0 }, +{ IDX_2C('m','k'), "Macedonia", 0,0,0 }, +{ IDX_2C('m','l'), "Mali", 0,0,0 }, +{ IDX_2C('m','m'), "Myanmar", 0,0,0 }, +{ IDX_2C('m','n'), "Mongolia", 0,0,0 }, +{ IDX_2C('m','o'), "Macau", 0,0,0 }, +{ IDX_2C('m','p'), "Northern Mariana Islands", 0,0,0 }, +{ IDX_2C('m','q'), "Martinique", 0,0,0 }, +{ IDX_2C('m','r'), "Mauritania", 0,0,0 }, +{ IDX_2C('m','s'), "Montserrat", 0,0,0 }, +{ IDX_2C('m','t'), "Malta", 0,0,0 }, +{ IDX_2C('m','u'), "Mauritius", 0,0,0 }, +{ IDX_2C('m','v'), "Maldives", 0,0,0 }, +{ IDX_2C('m','w'), "Malawi", 0,0,0 }, +{ IDX_2C('m','x'), "Mexico", 0,0,0 }, +{ IDX_2C('m','y'), "Malaysia", 0,0,0 }, +{ IDX_2C('m','z'), "Mozambique", 0,0,0 }, +{ IDX_2C('n','a'), "Namibia", 0,0,0 }, +{ IDX_2C('n','c'), "New Caledonia", 0,0,0 }, +{ IDX_2C('n','e'), "Niger", 0,0,0 }, +{ IDX_2C('n','f'), "Norfolk Island", 0,0,0 }, +{ IDX_2C('n','g'), "Nigeria", 0,0,0 }, +{ IDX_2C('n','i'), "Nicaragua", 0,0,0 }, +{ IDX_2C('n','l'), "Netherlands", 0,0,0 }, +{ IDX_2C('n','o'), "Norway", 0,0,0 }, +{ IDX_2C('n','p'), "Nepal", 0,0,0 }, +{ IDX_2C('n','r'), "Nauru", 0,0,0 }, +{ IDX_2C('n','u'), "Niue", 0,0,0 }, +{ IDX_2C('n','z'), "New Zealand", 0,0,0 }, +{ IDX_2C('o','m'), "Oman", 0,0,0 }, +{ IDX_2C('p','a'), "Panama", 0,0,0 }, +{ IDX_2C('p','e'), "Peru", 0,0,0 }, +{ IDX_2C('p','f'), "French Polynesia", 0,0,0 }, +{ IDX_2C('p','g'), "Papua New Guinea", 0,0,0 }, +{ IDX_2C('p','h'), "Philippines", 0,0,0 }, +{ IDX_2C('p','k'), "Pakistan", 0,0,0 }, +{ IDX_2C('p','l'), "Poland", 0,0,0 }, +{ IDX_2C('p','m'), "Saint Pierre and Miquelon", 0,0,0 }, +{ IDX_2C('p','n'), "Pitcairn Islands", 0,0,0 }, +{ IDX_2C('p','r'), "Puerto Rico", 0,0,0 }, +{ IDX_2C('p','s'), "Palestinian Territory", 0,0,0 }, +{ IDX_2C('p','t'), "Portugal", 0,0,0 }, +{ IDX_2C('p','w'), "Palau", 0,0,0 }, +{ IDX_2C('p','y'), "Paraguay", 0,0,0 }, +{ IDX_2C('q','a'), "Qatar", 0,0,0 }, +{ IDX_2C('r','e'), "Reunion", 0,0,0 }, +{ IDX_2C('r','o'), "Romania", 0,0,0 }, +{ IDX_2C('r','s'), "Serbia", 0,0,0 }, +{ IDX_2C('r','u'), "Russian Federation", 0,0,0 }, +{ IDX_2C('r','w'), "Rwanda", 0,0,0 }, +{ IDX_2C('s','a'), "Saudi Arabia", 0,0,0 }, +{ IDX_2C('s','b'), "Solomon Islands", 0,0,0 }, +{ IDX_2C('s','c'), "Seychelles", 0,0,0 }, +{ IDX_2C('s','d'), "Sudan", 0,0,0 }, +{ IDX_2C('s','e'), "Sweden", 0,0,0 }, +{ IDX_2C('s','g'), "Singapore", 0,0,0 }, +{ IDX_2C('s','h'), "Saint Helena", 0,0,0 }, +{ IDX_2C('s','i'), "Slovenia", 0,0,0 }, +{ IDX_2C('s','j'), "Svalbard and Jan Mayen", 0,0,0 }, +{ IDX_2C('s','k'), "Slovakia", 0,0,0 }, +{ IDX_2C('s','l'), "Sierra Leone", 0,0,0 }, +{ IDX_2C('s','m'), "San Marino", 0,0,0 }, +{ IDX_2C('s','n'), "Senegal", 0,0,0 }, +{ IDX_2C('s','o'), "Somalia", 0,0,0 }, +{ IDX_2C('s','r'), "Suriname", 0,0,0 }, +{ IDX_2C('s','t'), "Sao Tome and Principe", 0,0,0 }, +{ IDX_2C('s','v'), "El Salvador", 0,0,0 }, +{ IDX_2C('s','y'), "Syrian Arab Republic", 0,0,0 }, +{ IDX_2C('s','z'), "Swaziland", 0,0,0 }, +{ IDX_2C('t','c'), "Turks and Caicos Islands", 0,0,0 }, +{ IDX_2C('t','d'), "Chad", 0,0,0 }, +{ IDX_2C('t','f'), "French Southern Territories", 0,0,0 }, +{ IDX_2C('t','g'), "Togo", 0,0,0 }, +{ IDX_2C('t','h'), "Thailand", 0,0,0 }, +{ IDX_2C('t','j'), "Tajikistan", 0,0,0 }, +{ IDX_2C('t','k'), "Tokelau", 0,0,0 }, +{ IDX_2C('t','l'), "Timor-Leste", 0,0,0 }, +{ IDX_2C('t','m'), "Turkmenistan", 0,0,0 }, +{ IDX_2C('t','n'), "Tunisia", 0,0,0 }, +{ IDX_2C('t','o'), "Tonga", 0,0,0 }, +{ IDX_2C('t','r'), "Turkey", 0,0,0 }, +{ IDX_2C('t','t'), "Trinidad and Tobago", 0,0,0 }, +{ IDX_2C('t','v'), "Tuvalu", 0,0,0 }, +{ IDX_2C('t','w'), "Taiwan", 0,0,0 }, +{ IDX_2C('t','z'), "Tanzania, United Republic of", 0,0,0 }, +{ IDX_2C('u','a'), "Ukraine", 0,0,0 }, +{ IDX_2C('u','g'), "Uganda", 0,0,0 }, +{ IDX_2C('u','m'), "United States Minor Outlying Islands", 0,0,0 }, +{ IDX_2C('u','s'), "United States", 0,0,0 }, +{ IDX_2C('u','y'), "Uruguay", 0,0,0 }, +{ IDX_2C('u','z'), "Uzbekistan", 0,0,0 }, +{ IDX_2C('v','a'), "Holy See (Vatican City State)", 0,0,0 }, +{ IDX_2C('v','c'), "Saint Vincent and the Grenadines", 0,0,0 }, +{ IDX_2C('v','e'), "Venezuela", 0,0,0 }, +{ IDX_2C('v','g'), "Virgin Islands, British", 0,0,0 }, +{ IDX_2C('v','i'), "Virgin Islands, U.S.", 0,0,0 }, +{ IDX_2C('v','n'), "Vietnam", 0,0,0 }, +{ IDX_2C('v','u'), "Vanuatu", 0,0,0 }, +{ IDX_2C('w','f'), "Wallis and Futuna", 0,0,0 }, +{ IDX_2C('w','s'), "Samoa", 0,0,0 }, +{ IDX_2C('y','e'), "Yemen", 0,0,0 }, +{ IDX_2C('y','t'), "Mayotte", 0,0,0 }, +{ IDX_2C('z','a'), "South Africa", 0,0,0 }, +{ IDX_2C('z','m'), "Zambia", 0,0,0 }, +{ IDX_2C('z','w'), "Zimbabwe", 0,0,0 }, +{ 0, NULL, 0,0,0 }}; diff -adNruX nodiff webalizer-orig/linklist.c webalizer-2.01-10/linklist.c --- webalizer-orig/linklist.c 2001-06-15 04:34:24.000000000 -0400 +++ webalizer-2.01-10/linklist.c 2005-05-20 14:09:01.000000000 -0400 @@ -190,12 +190,12 @@ int add_glist(char *str, GLISTPTR *list) { GLISTPTR newptr,cptr,pptr; - char temp_buf[80]; + char temp_buf[256]; char *name=temp_buf; /* make local copy of string */ - strncpy(temp_buf,str,79); - temp_buf[79]=0; + strncpy(temp_buf,str,255); + temp_buf[255]=0; while (!isspace((int)*name)&&*name!=0) name++; if (*name==0) name=temp_buf; diff -adNruX nodiff webalizer-orig/output.c webalizer-2.01-10/output.c --- webalizer-orig/output.c 2001-06-15 04:34:24.000000000 -0400 +++ webalizer-2.01-10/output.c 2007-01-15 18:48:01.000000000 -0500 @@ -59,6 +59,12 @@ #define CLK_TCK _SC_CLK_TCK #endif +/* GeoIP stuff */ +#ifdef USE_GEOIP +#include +extern GeoIP *gi; +#endif /* USE_GEOIP */ + #include "webalizer.h" /* main header */ #include "lang.h" #include "hashtab.h" @@ -67,6 +73,10 @@ #include "graphs.h" #include "output.h" +#ifdef USE_FLAGS +#include "flags.h" +#endif /* USE_FLAGS */ + /* internal function prototypes */ void write_html_head(char *, FILE *); /* head of html page */ void write_html_tail(FILE *); /* tail of html page */ @@ -100,6 +110,17 @@ int qs_ident_cmph(const void*, const void*); /* compare by hits */ int qs_ident_cmpk(const void*, const void*); /* compare by kbytes */ +const char *hr_size(unsigned long long int size); /* human readable size */ + +#ifdef USE_FLAGS +char *ctry_flag(u_long idx); /* returns country flag*/ +#endif /* USE_FLAGS */ + +#ifdef USE_GEOIP +char *geoip_cod(char *addr, int is_IP); /* returns country code*/ +char *geoip_str(char *addr, int is_IP, int no_flag);/* returns country name*/ +#endif /* USE_GEOIP */ + int all_sites_page(u_long, u_long); /* output site page */ int all_urls_page(u_long, u_long); /* output urls page */ int all_refs_page(u_long, u_long); /* output refs page */ @@ -140,6 +161,10 @@ FILE *out_fp; +/* human readable size warp buffer */ +char warpbuf[32][32]; +int wb_index = -1; + /*********************************************/ /* WRITE_HTML_HEAD - output top of HTML page */ /*********************************************/ @@ -207,7 +232,12 @@ } fprintf(out_fp,"

%s %s

\n",msg_title, hname); fprintf(out_fp,"\n%s: %s
\n",msg_hhdr_sp,period); - fprintf(out_fp,"%s %s
\n
\n",msg_hhdr_gt,cur_time()); + fprintf(out_fp,"%s %s
\n",msg_hhdr_gt,cur_time()); +#ifdef USE_GEOIP + if (use_geoip) + fprintf(out_fp,"%s
\n", gi_db_info); +#endif /* USE_GEOIP */ + fprintf(out_fp, "\n"); lptr=html_post; while (lptr!=NULL) { @@ -234,6 +264,12 @@ fprintf(out_fp,"Generated by\n"); fprintf(out_fp,""); fprintf(out_fp,"Webalizer Version %s\n",version); +#ifdef USE_GEOIP + if (use_geoip) + fprintf(out_fp,"(with " \ + "" \ + "Geolizer patch)\n"); +#endif /* USE_GEOIP */ fprintf(out_fp,"\n\n"); lptr=html_tail; if (lptr) @@ -544,8 +580,8 @@ "\n",msg_h_total, msg_h_visits, t_visit); /* Total XFer */ fprintf(out_fp,"%s\n" \ - "%.0f" \ - "\n",msg_mtot_tx,t_xfer/1024); + "%s" \ + "\n",msg_mtot_tx,hr_size(t_xfer)); fprintf(out_fp,"\n"); /**********************************************/ /* Unique Sites */ @@ -620,10 +656,10 @@ /* Max/Avg KBytes per Day */ fprintf(out_fp,"" \ "%s\n" \ - "%.0f\n" \ - "%.0f" \ + "%s\n" \ + "%s" \ "\n",msg_mtot_mkd, - (t_xfer/1024)/days_in_month,max_xfer/1024); + hr_size(t_xfer/days_in_month),hr_size(max_xfer)); fprintf(out_fp,"\n"); /**********************************************/ /* response code totals */ @@ -713,9 +749,9 @@ "%3.02f%%\n", tm_site[i],PCENT(tm_site[i],t_site)); fprintf(out_fp,"" \ - "%.0f\n" \ + "%s\n" \ "%3.02f%%\n", - tm_xfer[i]/1024,PCENT(tm_xfer[i],t_xfer)); + hr_size(tm_xfer[i]),PCENT(tm_xfer[i],t_xfer)); } fprintf(out_fp,"\n"); fprintf(out_fp,"\n"); @@ -801,10 +837,10 @@ th_page[i]/days_in_month,th_page[i], PCENT(th_page[i],t_page)); fprintf(out_fp, - "%.0f\n" \ - "%.0f\n" \ + "%s\n" \ + "%s\n" \ "%3.02f%%\n", - (th_xfer[i]/days_in_month)/1024,th_xfer[i]/1024, + hr_size(th_xfer[i]/days_in_month),hr_size(th_xfer[i]), PCENT(th_xfer[i],t_xfer)); avg_file += th_file[i]/days_in_month; avg_xfer+= (th_xfer[i]/days_in_month)/1024; @@ -822,6 +858,11 @@ u_long cnt=0, h_reg=0, h_grp=0, h_hid=0, tot_num; int i; HNODEPTR hptr, *pointer; +#ifdef USE_GEOIP + int cols=use_geoip?11:10; +#else + int cols=10; +#endif /* USE_GEOIP */ cnt=a_ctr; pointer=h_array; while(cnt--) @@ -845,13 +886,13 @@ fprintf(out_fp,"\n"); fprintf(out_fp,"\n"); - if (flag) fprintf(out_fp,"\n", - GREY, msg_top_top,tot_num,msg_top_of, + GREY, cols, msg_top_top,tot_num,msg_top_of, t_site,msg_top_s,msg_h_by,msg_h_xfer); - else fprintf(out_fp,"\n", - GREY,msg_top_top, tot_num, msg_top_of, t_site, msg_top_s); + GREY, cols, msg_top_top, tot_num, msg_top_of, t_site, msg_top_s); fprintf(out_fp,"\n"); fprintf(out_fp,"\n",GREY); @@ -864,7 +905,13 @@ fprintf(out_fp,"\n",YELLOW,msg_h_visits); fprintf(out_fp,"\n",CYAN,msg_h_hname); + "%s\n",CYAN,msg_h_hname); +#ifdef USE_GEOIP + if (use_geoip) + fprintf(out_fp,"\n",ORANGE); +#endif /* USE_GEOIP */ + fprintf(out_fp,"\n"); fprintf(out_fp,"\n"); pointer=h_array; i=0; @@ -884,22 +931,36 @@ "\n" \ "\n" \ "\n" \ - "\n" \ + "\n" \ "\n" \ "\n" \ "\n" \ "\n", hptr->string); +#ifdef USE_GEOIP + else + { + fprintf(out_fp,"%s", hptr->string); + if (use_geoip) + { + fprintf(out_fp,"\n\n", geoip_str(hptr->string, 0, 0)); + } + else + fprintf(out_fp,"\n"); + } +#else else fprintf(out_fp,"%s\n", hptr->string); +#endif /* USE_GEOIP */ tot_num--; i++; } @@ -913,7 +974,7 @@ if (all_sites_page(h_reg, h_grp)) { fprintf(out_fp,"",GRPCOLOR); - fprintf(out_fp,"\n" \ "\n" \ "\n" \ - "\n"\ + "\n"\ "\n" \ "\n" \ "\n" \ "\n" \ - "\n" \ + "\n" \ "\n" \ "\n" \ "\n" \ "" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ - "\n" \ + "\n" \ + "\n" \ + "\n", + i+1,top_ctrys[i]->count, + (t_hit==0)?0:((float)top_ctrys[i]->count/t_hit)*100.0, + top_ctrys[i]->files, + (t_file==0)?0:((float)top_ctrys[i]->files/t_file)*100.0, + hr_size(top_ctrys[i]->xfer), + (t_xfer==0)?0:((float)top_ctrys[i]->xfer/t_xfer)*100.0, + ctry_flag(top_ctrys[i]->idx),top_ctrys[i]->desc); +#else + fprintf(out_fp,"" \ + "\n" \ + "\n" \ + "\n" \ + "\n" \ + "\n" \ + "\n" \ "\n" \ "\n", i+1,top_ctrys[i]->count, (t_hit==0)?0:((float)top_ctrys[i]->count/t_hit)*100.0, top_ctrys[i]->files, (t_file==0)?0:((float)top_ctrys[i]->files/t_file)*100.0, - top_ctrys[i]->xfer/1024, + hr_size(top_ctrys[i]->xfer), (t_xfer==0)?0:((float)top_ctrys[i]->xfer/t_xfer)*100.0, top_ctrys[i]->desc); +#endif /* USE_FLAGS */ } fprintf(out_fp,"\n"); fprintf(out_fp,"
" \ + if (flag) fprintf(out_fp,"
" \ "%s %lu %s %lu %s %s %s
" \ + else fprintf(out_fp,"
" \ "%s %lu %s %lu %s
" \ "#" \ "%s" \ - "%s
" \ + "Country
%3.02f%%%lu%3.02f%%%.0f%s%3.02f%%%lu%3.02f%%", i+1,hptr->count, (t_hit==0)?0:((float)hptr->count/t_hit)*100.0,hptr->files, - (t_file==0)?0:((float)hptr->files/t_file)*100.0,hptr->xfer/1024, + (t_file==0)?0:((float)hptr->files/t_file)*100.0,hr_size(hptr->xfer), (t_xfer==0)?0:((float)hptr->xfer/t_xfer)*100.0,hptr->visit, (t_visit==0)?0:((float)hptr->visit/t_visit)*100.0); if ((hptr->flag==OBJ_GRP)&&hlite_groups) fprintf(out_fp,"%s
%s" \ + "
\n"); + fprintf(out_fp,"\n", cols); fprintf(out_fp,""); fprintf(out_fp,"", cur_year,cur_month,html_ext); @@ -948,10 +1009,27 @@ fprintf(out_fp,"
\n");
 
-   fprintf(out_fp," %12s      %12s      %12s      %12s      %s\n",
+#ifdef USE_GEOIP
+   if (use_geoip)
+   {
+      fprintf(out_fp," %12s      %12s         %12s      %12s      %s              Country\n",
+              msg_h_hits, msg_h_files, msg_h_xfer, msg_h_visits, msg_h_hname);
+      fprintf(out_fp,"----------------  ----------------  -------------------  " \
+                     "----------------  --------------------  -------------------------\n\n");
+   }
+   else
+   {
+      fprintf(out_fp," %12s      %12s         %12s      %12s      %s\n",
+              msg_h_hits, msg_h_files, msg_h_xfer, msg_h_visits, msg_h_hname);
+      fprintf(out_fp,"----------------  ----------------  -------------------  " \
+                     "----------------  --------------------\n\n");
+   }
+#else
+   fprintf(out_fp," %12s      %12s         %12s      %12s      %s\n",
            msg_h_hits, msg_h_files, msg_h_xfer, msg_h_visits, msg_h_hname);
-   fprintf(out_fp,"----------------  ----------------  ----------------  " \
+   fprintf(out_fp,"----------------  ----------------  -------------------  " \
                   "----------------  --------------------\n\n");
+#endif	/* USE_GEOIP */
 
    /* Do groups first (if any) */
    pointer=h_array;
@@ -961,10 +1039,10 @@
       if (hptr->flag == OBJ_GRP)
       {
          fprintf(out_fp,
-         "%-8lu %6.02f%%  %8lu %6.02f%%  %8.0f %6.02f%%  %8lu %6.02f%%  %s\n",
+         "%-8lu %6.02f%%  %8lu %6.02f%%  %16s %6.02f%%  %8lu %6.02f%%  %s\n",
             hptr->count,
             (t_hit==0)?0:((float)hptr->count/t_hit)*100.0,hptr->files,
-            (t_file==0)?0:((float)hptr->files/t_file)*100.0,hptr->xfer/1024,
+            (t_file==0)?0:((float)hptr->files/t_file)*100.0,hr_size(hptr->xfer),
             (t_xfer==0)?0:((float)hptr->xfer/t_xfer)*100.0,hptr->visit,
             (t_visit==0)?0:((float)hptr->visit/t_visit)*100.0,
             hptr->string);
@@ -981,6 +1059,30 @@
       hptr=*pointer++;
       if (hptr->flag == OBJ_REG)
       {
+#ifdef USE_GEOIP
+         if (use_geoip)
+         {
+            fprintf(out_fp,
+            "%-8lu %6.02f%%  %8lu %6.02f%%  %16s %6.02f%%  %8lu %6.02f%%  %-20s  %s\n",
+               hptr->count,
+               (t_hit==0)?0:((float)hptr->count/t_hit)*100.0,hptr->files,
+               (t_file==0)?0:((float)hptr->files/t_file)*100.0,hr_size(hptr->xfer),
+               (t_xfer==0)?0:((float)hptr->xfer/t_xfer)*100.0,hptr->visit,
+               (t_visit==0)?0:((float)hptr->visit/t_visit)*100.0,
+               hptr->string, geoip_str(hptr->string, 1, 1));
+         }
+         else
+         {
+            fprintf(out_fp,
+            "%-8lu %6.02f%%  %8lu %6.02f%%  %8.0f %6.02f%%  %8lu %6.02f%%  %s\n",
+               hptr->count,
+               (t_hit==0)?0:((float)hptr->count/t_hit)*100.0,hptr->files,
+               (t_file==0)?0:((float)hptr->files/t_file)*100.0,hptr->xfer/1024,
+               (t_xfer==0)?0:((float)hptr->xfer/t_xfer)*100.0,hptr->visit,
+               (t_visit==0)?0:((float)hptr->visit/t_visit)*100.0,
+               hptr->string);
+         }
+#else
          fprintf(out_fp,
          "%-8lu %6.02f%%  %8lu %6.02f%%  %8.0f %6.02f%%  %8lu %6.02f%%  %s\n",
             hptr->count,
@@ -989,6 +1091,7 @@
             (t_xfer==0)?0:((float)hptr->xfer/t_xfer)*100.0,hptr->visit,
             (t_visit==0)?0:((float)hptr->visit/t_visit)*100.0,
             hptr->string);
+#endif	/* USE_GEOIP */
          h_reg--;
       }
    }
@@ -1066,12 +1169,12 @@
             "
%d%lu%3.02f%%%.0f%s%3.02f%%", i+1,uptr->count, (t_hit==0)?0:((float)uptr->count/t_hit)*100.0, - uptr->xfer/1024, + hr_size(uptr->xfer), (t_xfer==0)?0:((float)uptr->xfer/t_xfer)*100.0); if (uptr->flag==OBJ_GRP) @@ -1153,9 +1256,9 @@ fprintf(out_fp,"
\n");
 
-   fprintf(out_fp," %12s      %12s      %s\n",
+   fprintf(out_fp," %12s         %12s      %s\n",
            msg_h_hits,msg_h_xfer,msg_h_url);
-   fprintf(out_fp,"----------------  ----------------  " \
+   fprintf(out_fp,"----------------  -------------------  " \
                   "--------------------\n\n");
 
    /* do groups first (if any) */
@@ -1165,10 +1268,10 @@
       uptr=*pointer++;
       if (uptr->flag == OBJ_GRP)
       {
-         fprintf(out_fp,"%-8lu %6.02f%%  %8.0f %6.02f%%  %s\n",
+         fprintf(out_fp,"%-8lu %6.02f%%  %16s %6.02f%%  %s\n",
             uptr->count,
             (t_hit==0)?0:((float)uptr->count/t_hit)*100.0,
-            uptr->xfer/1024,
+            hr_size(uptr->xfer),
             (t_xfer==0)?0:((float)uptr->xfer/t_xfer)*100.0,
             uptr->string);
          u_grp--;
@@ -1184,10 +1287,10 @@
       uptr=*pointer++;
       if (uptr->flag == OBJ_REG)
       {
-         fprintf(out_fp,"%-8lu %6.02f%%  %8.0f %6.02f%%  %s\n",
+         fprintf(out_fp,"%-8lu %6.02f%%  %16s %6.02f%%  %s\n",
             uptr->count,
             (t_hit==0)?0:((float)uptr->count/t_hit)*100.0,
-            uptr->xfer/1024,
+            hr_size(uptr->xfer),
             (t_xfer==0)?0:((float)uptr->xfer/t_xfer)*100.0,
             uptr->string);
          u_reg--;
@@ -1794,14 +1897,14 @@
               "
%3.02f%%%lu%3.02f%%%.0f%s%3.02f%%%lu%3.02f%%", i+1,iptr->count, (t_hit==0)?0:((float)iptr->count/t_hit)*100.0,iptr->files, - (t_file==0)?0:((float)iptr->files/t_file)*100.0,iptr->xfer/1024, + (t_file==0)?0:((float)iptr->files/t_file)*100.0,hr_size(iptr->xfer), (t_xfer==0)?0:((float)iptr->xfer/t_xfer)*100.0,iptr->visit, (t_visit==0)?0:((float)iptr->visit/t_visit)*100.0); @@ -1866,10 +1969,10 @@ if (iptr->flag == OBJ_GRP) { fprintf(out_fp, - "%-8lu %6.02f%% %8lu %6.02f%% %8.0f %6.02f%% %8lu %6.02f%% %s\n", + "%-8lu %6.02f%% %8lu %6.02f%% %8s %6.02f%% %8lu %6.02f%% %s\n", iptr->count, (t_hit==0)?0:((float)iptr->count/t_hit)*100.0,iptr->files, - (t_file==0)?0:((float)iptr->files/t_file)*100.0,iptr->xfer/1024, + (t_file==0)?0:((float)iptr->files/t_file)*100.0,hr_size(iptr->xfer), (t_xfer==0)?0:((float)iptr->xfer/t_xfer)*100.0,iptr->visit, (t_visit==0)?0:((float)iptr->visit/t_visit)*100.0, iptr->string); @@ -1887,10 +1990,10 @@ if (iptr->flag == OBJ_REG) { fprintf(out_fp, - "%-8lu %6.02f%% %8lu %6.02f%% %8.0f %6.02f%% %8lu %6.02f%% %s\n", + "%-8lu %6.02f%% %8lu %6.02f%% %8s %6.02f%% %8lu %6.02f%% %s\n", iptr->count, (t_hit==0)?0:((float)iptr->count/t_hit)*100.0,iptr->files, - (t_file==0)?0:((float)iptr->files/t_file)*100.0,iptr->xfer/1024, + (t_file==0)?0:((float)iptr->files/t_file)*100.0,hr_size(iptr->xfer), (t_xfer==0)?0:((float)iptr->xfer/t_xfer)*100.0,iptr->visit, (t_visit==0)?0:((float)iptr->visit/t_visit)*100.0, iptr->string); @@ -1914,7 +2017,7 @@ int ctry_fnd; u_long idx; HNODEPTR hptr; - char *domain; + char *domain, *country = NULL; u_long pie_data[10]; char *pie_legend[10]; char pie_title[48]; @@ -1932,16 +2035,26 @@ { domain = hptr->string+strlen(hptr->string)-1; while ( (*domain!='.')&&(domain!=hptr->string)) domain--; - if ((domain==hptr->string)||(isdigit((int)*++domain))) + if (domain==hptr->string) + country=NULL; + else if (isdigit((int)*++domain)) { - ctry[0].count+=hptr->count; - ctry[0].files+=hptr->files; - ctry[0].xfer +=hptr->xfer; +#ifdef USE_GEOIP + if (use_geoip) + country=geoip_cod(hptr->string, 1); + else + country=NULL; +#else + country=NULL; +#endif /* USE_GEOIP */ } else + country=domain; + + ctry_fnd=0; + if (country!=NULL) { - ctry_fnd=0; - idx=ctry_idx(domain); + idx=ctry_idx(country); for (j=0;ctry[j].desc;j++) { if (idx==ctry[j].idx) @@ -1953,12 +2066,19 @@ break; } } - if (!ctry_fnd) - { - ctry[0].count+=hptr->count; - ctry[0].files+=hptr->files; - ctry[0].xfer +=hptr->xfer; - } + } + if ((!ctry_fnd)||(country==NULL)) + { +#ifdef USE_GEOIP + if (use_geoip && debug_mode) + fprintf(stderr, "--> unresolved country for '%s' (GeoIP says %s:%s)\n", + hptr->string, + GeoIP_country_code_by_addr(gi, hptr->string), + GeoIP_country_name_by_addr(gi, hptr->string)); +#endif /* USE_GEOIP */ + ctry[0].count+=hptr->count; + ctry[0].files+=hptr->files; + ctry[0].xfer +=hptr->xfer; } } hptr=hptr->next; @@ -2030,22 +2150,41 @@ for (i=0;icount!=0) +#ifdef USE_FLAGS fprintf(out_fp,"
%d%lu%3.02f%%%lu%3.02f%%%.0f%s%3.02f%%%s%s
%d%lu%3.02f%%%lu%3.02f%%%s%3.02f%%%s
\n

\n"); @@ -2072,8 +2211,17 @@ /* need a header? */ if (dump_header) { +#ifdef USE_GEOIP + if (use_geoip) + fprintf(out_fp,"%s\t%s\t%s\t%s\t%s\tCountry\n", + msg_h_hits,msg_h_files,msg_h_xfer,msg_h_visits,msg_h_hname); + else + fprintf(out_fp,"%s\t%s\t%s\t%s\t%s\n", + msg_h_hits,msg_h_files,msg_h_xfer,msg_h_visits,msg_h_hname); +#else fprintf(out_fp,"%s\t%s\t%s\t%s\t%s\n", msg_h_hits,msg_h_files,msg_h_xfer,msg_h_visits,msg_h_hname); +#endif /* USE_GEOIP */ } /* dump 'em */ @@ -2083,10 +2231,25 @@ hptr=*pointer++; if (hptr->flag != OBJ_GRP) { +#ifdef USE_GEOIP + if (use_geoip) + { + fprintf(out_fp, + "%lu\t%lu\t%.0f\t%lu\t%s\t%s\n", + hptr->count,hptr->files,hptr->xfer/1024, + hptr->visit,hptr->string,geoip_str(hptr->string, 1, 1)); + } + else + fprintf(out_fp, + "%lu\t%lu\t%.0f\t%lu\t%s\n", + hptr->count,hptr->files,hptr->xfer/1024, + hptr->visit,hptr->string); +#else fprintf(out_fp, "%lu\t%lu\t%.0f\t%lu\t%s\n", hptr->count,hptr->files,hptr->xfer/1024, hptr->visit,hptr->string); +#endif /* USE_GEOIP */ } cnt--; } @@ -2402,8 +2565,8 @@ hist_visit[s_mth]/days_in_month); fprintf(out_fp,"%lu\n", hist_site[s_mth]); - fprintf(out_fp,"%.0f\n", - hist_xfer[s_mth]); + fprintf(out_fp,"%s\n", + hr_size(hist_xfer[s_mth]*1024)); fprintf(out_fp,"%lu\n", hist_visit[s_mth]); fprintf(out_fp,"%lu\n", @@ -2422,7 +2585,7 @@ fprintf(out_fp,"" \ "%s\n",GREY,msg_h_totals); fprintf(out_fp,"" \ - "%.0f\n",GREY,gt_xfer); + "%s\n",GREY,hr_size(gt_xfer*1024)); fprintf(out_fp,"" \ "%.0f\n",GREY,gt_visits); fprintf(out_fp,"" \ @@ -2750,3 +2913,124 @@ return out_fp; } +/*********************************************/ +/* HR_SIZE - Returns a human readable size */ +/*********************************************/ + +const char *hr_size(unsigned long long int size) +{ + int base=1024; + char suffixes[14]="??KBMBGBTBPBEB"; + float n=size; + int usesuf=0; + + if (wb_index<0 || wb_index>31) + wb_index=0; + + while (n>=base && usesuf<=10) + { + n/=base; + usesuf+=2; + } + + if (usesuf) + snprintf(warpbuf[wb_index], 31, \ + "%.2f %c%c", n, suffixes[usesuf], suffixes[usesuf+1]); + else + snprintf(warpbuf[wb_index], 31, "%d bytes", (unsigned int) size); + + return warpbuf[wb_index++]; +} + +#ifdef USE_FLAGS +/*********************************************/ +/* CTRY_FLAG - Returns country flag */ +/*********************************************/ +char *ctry_flag(u_long idx) +{ + int i; + int ctry_fnd=0; + + for (i=0;country_flags[i].desc;i++) + { + if (idx==country_flags[i].idx) + { + ctry_fnd=i; + break; + } + } + + return country_flags[ctry_fnd].desc; +} +#endif /* USE_FLAGS */ + +#ifdef USE_GEOIP +/*********************************************/ +/* GEOIP_COD - Returns country code */ +/*********************************************/ + +char *geoip_cod(char *addr, int is_IP) +{ + const char *result; + static char code[3]; + + code[2]='\0'; + + if (is_IP) + result=GeoIP_country_code_by_addr(gi, addr); + else + result=GeoIP_country_code_by_name(gi, addr); + + if ((result!=NULL)&&(result[0]!='-')&&(result[1]!='-')) + { + code[0]=tolower(result[0]); + code[1]=tolower(result[1]); + return code; + } + else + return NULL; +} + +/*********************************************/ +/* GEOIP_STR - Returns country name */ +/*********************************************/ + +char *geoip_str(char *addr, int is_IP, int no_flag) +{ + int i; + int ctry_fnd=0; + u_long idx; + static char str[256]; + char *code = geoip_cod(addr, is_IP); + + if (code != NULL) + idx = ctry_idx(code); + else + return ctry[0].desc; + + for (i=0;ctry[i].desc;i++) + { + if (idx==ctry[i].idx) + { + ctry_fnd=i; + break; + } + } + + memset(str, sizeof(str), '\0'); + +#ifdef USE_FLAGS + if (!no_flag) + { + strncpy(str, ctry_flag(idx), sizeof(str) - 1); + strncat(str, ctry[ctry_fnd].desc, sizeof(str) - 1); + } + else + strncpy(str, ctry[ctry_fnd].desc, sizeof(str) - 1); +#else + strncpy(str, ctry[ctry_fnd].desc, sizeof(str) - 1); +#endif /* USE_FLAGS */ + + return str; +} +#endif /* USE_GEOIP */ diff -adNruX nodiff webalizer-orig/sample.conf webalizer-2.01-10/sample.conf --- webalizer-orig/sample.conf 2000-09-28 23:51:42.000000000 -0400 +++ webalizer-2.01-10/sample.conf 2002-07-17 06:36:03.000000000 -0400 @@ -568,4 +568,12 @@ #DumpUsers no #DumpSearchStr no +# If you compiled Webalizer with GeoIP library, it becomes enabled +# by default. But if you wish to disable it, just set GeoIP to 'no'. +# You may also want to specify database file path manually, if you +# don't have one installed on system (in case of static build). + +#GeoIP yes +#GeoIPDatabase /usr/local/share/GeoIP/GeoIP.dat + # End of configuration file... Have a nice day! diff -adNruX nodiff webalizer-orig/webalizer.1 webalizer-2.01-10/webalizer.1 --- webalizer-orig/webalizer.1 2001-10-23 02:05:50.000000000 -0400 +++ webalizer-2.01-10/webalizer.1 2007-01-15 18:18:44.000000000 -0500 @@ -1,4 +1,4 @@ -.TH webalizer 1 "22-Oct-2001" "Version 2.01" "The Webalizer" +.TH webalizer 1 "16-Feb-2004" "Version 2.01-10-glzr" "The Webalizer" .SH NAME webalizer - A web server log file analysis tool. .SH SYNOPSIS @@ -329,6 +329,14 @@ .TP 8 .B \-E \fInum\fP \fBTopExit\fP. Display the top \fInum\fP exit pages table. +.PP +.I GeoIP options +.TP 8 +.B \-w +\fBGeoIP\fP. Disable GeoIP fearure +.TP 8 +.B \-W \fIfile\fP +\fBGeoIPDatabase\fP. Use specific GeoIP database \fIfile\fP. .SH CONFIGURATION FILES Configuration files are standard \fBascii(7)\fP text files that may be created or edited using any standard editor. Blank lines and lines that begin @@ -669,6 +677,15 @@ Dump the search string data to a tab delimited file. This data is only available if processing a web log that contains referrer information and had search string information present. +.PP +.I GeoIP Feature Keywords +.TP 8 +.B GeoIP \fP( \fByes\fP | no ) +Enable/disable use of GeoIP feature. +.TP 8 +.B GeoIPDatabase \fIfile\fP +Specifies GeoIP database file. Defaults to libGeoIP precompiled one +(normally \fI/usr/local/share/GeoIP/GeoIP.dat\fP). .SH FILES .TP 20 .I webalizer.conf @@ -697,3 +714,8 @@ supplied with all distributions for additional information. .SH AUTHOR Bradford L. Barrett <\fIbrad@mrunix.net\fP> +.SH GEOLIZER PATCH +Integration with \fIlibGeoIP (http://www.maxmind.com/app/ip-location)\fP made by +Stanislaw Y. Pusep <\fIstas@sysd.org\fP>. +.PP +Official project page is \fIhttp://sysd.org/stas/node/10\fP diff -adNruX nodiff webalizer-orig/webalizer.c webalizer-2.01-10/webalizer.c --- webalizer-orig/webalizer.c 2002-04-16 18:11:31.000000000 -0400 +++ webalizer-2.01-10/webalizer.c 2007-01-15 18:07:50.000000000 -0500 @@ -71,6 +71,11 @@ #endif /* HAVE_DB_185_H */ #endif /* USE_DNS */ +#ifdef USE_GEOIP +#include +#define GEOIP_FLAGS GEOIP_MEMORY_CACHE +#endif /* USE_GEOIP */ + #include "webalizer.h" /* main header */ #include "output.h" #include "parser.h" @@ -101,8 +106,8 @@ /*********************************************/ char *version = "2.01"; /* program version */ -char *editlvl = "10"; /* edit level */ -char *moddate = "16-Apr-2002"; /* modification date */ +char *editlvl = "10-glzr"; /* edit level */ +char *moddate = "20-May-2005"; /* modification date */ char *copyright = "Copyright 1997-2001 by Bradford L. Barrett"; int verbose = 2; /* 2=verbose,1=err, 0=none */ @@ -139,6 +144,13 @@ char *dns_cache = NULL; /* DNS cache file name */ int dns_children = 0; /* DNS children (0=don't do)*/ +#ifdef USE_GEOIP +int use_geoip = 1; /* Use GeoIP library */ +char *geoip_dbase = NULL; /* Use specific GeoIP dbase */ +GeoIP *gi = NULL; /* GeoIP handle */ +char gi_db_info[256]; /* GeoIP db info (HTMLized) */ +#endif /* USE_GEOIP */ + int ntop_sites = 30; /* top n sites to display */ int ntop_sitesK = 10; /* top n sites (by kbytes) */ int ntop_urls = 30; /* top n url's to display */ @@ -209,7 +221,7 @@ time_t now; /* used by cur_time funct */ struct tm *tp; /* to generate timestamp */ -char timestamp[32]; /* for the reports */ +char timestamp[64]; /* for the reports */ gzFile gzlog_fp; /* gzip logfile pointer */ FILE *log_fp; /* regular logfile pointer */ @@ -257,13 +269,26 @@ "jul", "aug", "sep", "oct", "nov", "dec"}; +#ifdef WIN32 + char *p; + int len; + + memset(tmp_buf, '\0', sizeof(tmp_buf)); + + len = GetModuleFileName(GetModuleHandle(NULL), tmp_buf, sizeof(tmp_buf) - 1); + for (p = tmp_buf + len; (p > tmp_buf) && (*p != '\\'); p--); + *p = '\0'; + strncat(tmp_buf, "\\webalizer.conf", sizeof(tmp_buf) - 1); +#else + sprintf(tmp_buf,"%s/webalizer.conf",ETCDIR); +#endif /* WIN32 */ + /* initalize epoch */ epoch=jdate(1,1,1970); /* used for timestamp adj. */ /* add default index. alias */ add_nlist("index.",&index_alias); - sprintf(tmp_buf,"%s/webalizer.conf",ETCDIR); /* check for default config file */ if (!access("webalizer.conf",F_OK)) get_config("webalizer.conf"); @@ -272,7 +297,11 @@ /* get command line options */ opterr = 0; /* disable parser errors */ +#ifndef USE_GEOIP while ((i=getopt(argc,argv,"a:A:c:C:dD:e:E:fF:g:GhHiI:l:Lm:M:n:N:o:pP:qQr:R:s:S:t:Tu:U:vVx:XY"))!=EOF) +#else + while ((i=getopt(argc,argv,"a:A:c:C:dD:e:E:fF:g:GhHiI:l:Lm:M:n:N:o:pP:qQr:R:s:S:t:Tu:U:vVwW:x:XY"))!=EOF) +#endif /* USE_GEOIP */ { switch (i) { @@ -315,6 +344,10 @@ case 'U': ntop_urls=atoi(optarg); break; /* Top urls */ case 'v': case 'V': print_version(); break; /* Version */ +#ifdef USE_GEOIP + case 'w': use_geoip=0; break; /* Disable GeoIP */ + case 'W': geoip_dbase=optarg; break; /* Use GeoIP database */ +#endif /* USE_GEOIP */ case 'x': html_ext=optarg; break; /* HTML file extension */ case 'X': hide_sites=1; break; /* Hide ind. sites */ case 'Y': ctry_graph=0; break; /* Supress ctry graph */ @@ -443,6 +476,43 @@ } } +#ifdef USE_GEOIP + /* Open GeoIP database */ + if (use_geoip) + { + if (geoip_dbase!=NULL) + { + if (verbose>1) printf("Using GeoIP database %s:\n", geoip_dbase); + gi=GeoIP_open(geoip_dbase, GEOIP_FLAGS); + } + else + { + if (verbose>1) printf("Using default GeoIP database:\n"); + gi=GeoIP_new(GEOIP_FLAGS); + } + + /* GeoIP already prints error (in English!) */ + if (gi==NULL) + exit(1); + + /* get database information */ + cp1=GeoIP_database_info(gi); + if (verbose>1) printf("%s\n", cp1); + + /* HTMLize db info */ + memset(gi_db_info, 0, sizeof(gi_db_info)); + if ((cp2=strstr(cp1, "MaxMind"))==NULL) + strncpy(gi_db_info, cp1, sizeof(gi_db_info)-1); + else + { + strncpy(gi_db_info, cp1, cp2-cp1); + strcat(gi_db_info, "MaxMind"); + strcat(gi_db_info, cp2+7); + } + free(cp1); + } +#endif /* USE_GEOIP */ + /* switch directories if needed */ if (out_dir) { @@ -1345,6 +1415,10 @@ if (dns_db) close_cache(); #endif +#ifdef USE_GEOIP + if (gi) GeoIP_delete(gi); +#endif /* USE_GEOIP */ + /* Whew, all done! Exit with completion status (0) */ exit(0); } @@ -1449,7 +1523,11 @@ "DNSCache", /* DNS Cache file name 84 */ "DNSChildren", /* DNS Children (0=no DNS) 85 */ "DailyGraph", /* Daily Graph (0=no) 86 */ - "DailyStats" /* Daily Stats (0=no) 87 */ + "DailyStats", /* Daily Stats (0=no) 87 */ +#ifdef USE_GEOIP + "GeoIP", /* Use GeoIP library (0=no) 88 */ + "GeoIPDatabase", /* GeoIP database 89 */ +#endif /* USE_GEOIP */ }; FILE *fp; @@ -1468,6 +1546,9 @@ return; } + if (verbose && debug_mode) + fprintf(stderr,"Using config file %s\n",fname); + while ( (fgets(buffer,BUFSIZE,fp)) != NULL) { /* skip comments and blank lines */ @@ -1593,6 +1674,10 @@ #endif /* USE_DNS */ case 86: daily_graph=(value[0]=='n')?0:1; break; /* HourlyGraph */ case 87: daily_stats=(value[0]=='n')?0:1; break; /* HourlyStats */ +#ifdef USE_GEOIP + case 88: use_geoip=(value[0]=='n')?0:1; break; /* GeoIP */ + case 89: geoip_dbase=save_opt(value); break; /* GeoIPDatabase */ +#endif /* USE_GEOIP */ } } fclose(fp); @@ -1684,10 +1769,20 @@ printf("Mod date: %s Options: ",moddate); #ifdef USE_DNS printf("DNS "); -#else +#endif +#ifdef USE_GEOIP + printf("GeoIP "); +#endif /* USE_GEOIP */ + +#if !((defined(USE_DNS)) || (defined(USE_GEOIP))) printf("none"); #endif + +#ifndef WIN32 printf("\nDefault config dir: %s\n\n",ETCDIR); +#else + printf("\nNo default config dir (Win32 Build)\n\n"); +#endif /* WIN32 */ } else printf("\n"); exit(1); diff -adNruX nodiff webalizer-orig/webalizer.h webalizer-2.01-10/webalizer.h --- webalizer-orig/webalizer.h 2001-02-09 19:58:18.000000000 -0500 +++ webalizer-2.01-10/webalizer.h 2005-05-20 14:37:42.000000000 -0400 @@ -16,8 +16,8 @@ #define MAXURL 1024 /* Max HTTP request/URL field size */ #define MAXURLH 128 /* Max URL field size in htab */ #define MAXREF 1024 /* Max referrer field size */ -#define MAXREFH 128 /* Max referrer field size in htab */ -#define MAXAGENT 64 /* Max user agent field size */ +#define MAXREFH 512 /* Max referrer field size in htab */ +#define MAXAGENT 256 /* Max user agent field size */ #define MAXCTRY 48 /* Max country name size */ #define MAXSRCH 256 /* Max size of search string buffer */ #define MAXSRCHH 64 /* Max size of search str in htab */ @@ -123,6 +123,10 @@ #endif /* INADDR_NONE */ #endif +#ifdef WIN32 +#include +#endif + /* Response code structure */ struct response_code { char *desc; /* response code struct */ u_long count; }; @@ -191,6 +195,12 @@ extern char *dns_cache ; /* DNS cache file name */ extern int dns_children ; /* # of DNS children */ +#ifdef USE_GEOIP +extern int use_geoip ; /* Use GeoIP library */ +extern char *geoip_dbase ; /* Use specific GeoIP dbase */ +extern char gi_db_info[256]; /* GeoIP db info (HTMLized) */ +#endif /* USE_GEOIP */ + extern int ntop_sites ; /* top n sites to display */ extern int ntop_sitesK ; /* top n sites (by kbytes) */ extern int ntop_urls ; /* top n url's to display */ diff -adNruX nodiff webalizer-orig/win_port.c webalizer-2.01-10/win_port.c --- webalizer-orig/win_port.c 1969-12-31 19:00:00.000000000 -0500 +++ webalizer-2.01-10/win_port.c 2002-08-25 16:57:45.000000000 -0400 @@ -0,0 +1,35 @@ +#include +#include +#include +#include +#include + +int uname(struct utsname *name) +{ + char buf[256]; + DWORD size = MAX_COMPUTERNAME_LENGTH; + int i; + OSVERSIONINFO osver; + + GetComputerName(buf, &size); + for (i = 0; i < strlen(buf); i++) { + name->nodename[i] = tolower(buf[i]); + } + + osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&osver); + sprintf(buf, "%ld.%ld (Build %d)", osver.dwMajorVersion, osver.dwMinorVersion, (int) (osver.dwBuildNumber & 0xffff)); + strcpy(name->release, buf); + + strcpy(name->sysname, "Windows"); + + if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT) + strcat(name->sysname, " NT"); + + return 0; +} + +clock_t times(struct tms *buffer) +{ + return GetTickCount(); +}