1#! /bin/sh
2
3# From configure.in Revision: 1.46 # Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --with-ssl[=PATH]         Include SSL support (DIR is OpenSSL's install dir)."
16ac_help="$ac_help
17  --with-termcap     Forcibly refuse to use terminfo/ncurses "
18ac_help="$ac_help
19  --with-ipv6       Include IPv6 support"
20ac_help="$ac_help
21  --with-socks[=PATH]     Compile with SOCKS firewall traversal support."
22ac_help="$ac_help
23  --with-socks5[=PATH]     Compile with SOCKS5 firewall traversal support."
24ac_help="$ac_help
25  --with-perl              Compile with perl support."
26ac_help="$ac_help
27  --with-tcl[=PATH]        Compile with tcl support."
28ac_help="$ac_help
29  --with-bc[=PATH_TO_GCC]  You have bounds checking gcc and want to use it."
30ac_help="$ac_help
31  --with-warns          You wish to use FreeBSD WARNS-like compiler warnings."
32
33# Initialize some variables set by options.
34# The variables have the same names as the options, with
35# dashes changed to underlines.
36build=NONE
37cache_file=./config.cache
38exec_prefix=NONE
39host=NONE
40no_create=
41nonopt=NONE
42no_recursion=
43prefix=NONE
44program_prefix=NONE
45program_suffix=NONE
46program_transform_name=s,x,x,
47silent=
48site=
49srcdir=
50target=NONE
51verbose=
52x_includes=NONE
53x_libraries=NONE
54bindir='${exec_prefix}/bin'
55sbindir='${exec_prefix}/sbin'
56libexecdir='${exec_prefix}/libexec'
57datadir='${prefix}/share'
58sysconfdir='${prefix}/etc'
59sharedstatedir='${prefix}/com'
60localstatedir='${prefix}/var'
61libdir='${exec_prefix}/lib'
62includedir='${prefix}/include'
63oldincludedir='/usr/include'
64infodir='${prefix}/info'
65mandir='${prefix}/man'
66
67# Initialize some other variables.
68subdirs=
69MFLAGS= MAKEFLAGS=
70SHELL=${CONFIG_SHELL-/bin/sh}
71# Maximum number of lines to put in a shell here document.
72ac_max_here_lines=12
73
74ac_prev=
75for ac_option
76do
77
78  # If the previous option needs an argument, assign it.
79  if test -n "$ac_prev"; then
80    eval "$ac_prev=\$ac_option"
81    ac_prev=
82    continue
83  fi
84
85  case "$ac_option" in
86  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
87  *) ac_optarg= ;;
88  esac
89
90  # Accept the important Cygnus configure options, so we can diagnose typos.
91
92  case "$ac_option" in
93
94  -bindir | --bindir | --bindi | --bind | --bin | --bi)
95    ac_prev=bindir ;;
96  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
97    bindir="$ac_optarg" ;;
98
99  -build | --build | --buil | --bui | --bu)
100    ac_prev=build ;;
101  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
102    build="$ac_optarg" ;;
103
104  -cache-file | --cache-file | --cache-fil | --cache-fi \
105  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
106    ac_prev=cache_file ;;
107  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
108  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
109    cache_file="$ac_optarg" ;;
110
111  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
112    ac_prev=datadir ;;
113  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
114  | --da=*)
115    datadir="$ac_optarg" ;;
116
117  -disable-* | --disable-*)
118    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
119    # Reject names that are not valid shell variable names.
120    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
121      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
122    fi
123    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
124    eval "enable_${ac_feature}=no" ;;
125
126  -enable-* | --enable-*)
127    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
128    # Reject names that are not valid shell variable names.
129    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
130      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
131    fi
132    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
133    case "$ac_option" in
134      *=*) ;;
135      *) ac_optarg=yes ;;
136    esac
137    eval "enable_${ac_feature}='$ac_optarg'" ;;
138
139  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
140  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
141  | --exec | --exe | --ex)
142    ac_prev=exec_prefix ;;
143  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
144  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
145  | --exec=* | --exe=* | --ex=*)
146    exec_prefix="$ac_optarg" ;;
147
148  -gas | --gas | --ga | --g)
149    # Obsolete; use --with-gas.
150    with_gas=yes ;;
151
152  -help | --help | --hel | --he)
153    # Omit some internal or obsolete options to make the list less imposing.
154    # This message is too long to be a string in the A/UX 3.1 sh.
155    cat << EOF
156Usage: configure [options] [host]
157Options: [defaults in brackets after descriptions]
158Configuration:
159  --cache-file=FILE       cache test results in FILE
160  --help                  print this message
161  --no-create             do not create output files
162  --quiet, --silent       do not print \`checking...' messages
163  --version               print the version of autoconf that created configure
164Directory and file names:
165  --prefix=PREFIX         install architecture-independent files in PREFIX
166                          [$ac_default_prefix]
167  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
168                          [same as prefix]
169  --bindir=DIR            user executables in DIR [EPREFIX/bin]
170  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
171  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
172  --datadir=DIR           read-only architecture-independent data in DIR
173                          [PREFIX/share]
174  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
175  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
176                          [PREFIX/com]
177  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
178  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
179  --includedir=DIR        C header files in DIR [PREFIX/include]
180  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
181  --infodir=DIR           info documentation in DIR [PREFIX/info]
182  --mandir=DIR            man documentation in DIR [PREFIX/man]
183  --srcdir=DIR            find the sources in DIR [configure dir or ..]
184  --program-prefix=PREFIX prepend PREFIX to installed program names
185  --program-suffix=SUFFIX append SUFFIX to installed program names
186  --program-transform-name=PROGRAM
187                          run sed PROGRAM on installed program names
188EOF
189    cat << EOF
190Host type:
191  --build=BUILD           configure for building on BUILD [BUILD=HOST]
192  --host=HOST             configure for HOST [guessed]
193  --target=TARGET         configure for TARGET [TARGET=HOST]
194Features and packages:
195  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
196  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
197  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
198  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
199  --x-includes=DIR        X include files are in DIR
200  --x-libraries=DIR       X library files are in DIR
201EOF
202    if test -n "$ac_help"; then
203      echo "--enable and --with options recognized:$ac_help"
204    fi
205    exit 0 ;;
206
207  -host | --host | --hos | --ho)
208    ac_prev=host ;;
209  -host=* | --host=* | --hos=* | --ho=*)
210    host="$ac_optarg" ;;
211
212  -includedir | --includedir | --includedi | --included | --include \
213  | --includ | --inclu | --incl | --inc)
214    ac_prev=includedir ;;
215  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
216  | --includ=* | --inclu=* | --incl=* | --inc=*)
217    includedir="$ac_optarg" ;;
218
219  -infodir | --infodir | --infodi | --infod | --info | --inf)
220    ac_prev=infodir ;;
221  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
222    infodir="$ac_optarg" ;;
223
224  -libdir | --libdir | --libdi | --libd)
225    ac_prev=libdir ;;
226  -libdir=* | --libdir=* | --libdi=* | --libd=*)
227    libdir="$ac_optarg" ;;
228
229  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
230  | --libexe | --libex | --libe)
231    ac_prev=libexecdir ;;
232  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
233  | --libexe=* | --libex=* | --libe=*)
234    libexecdir="$ac_optarg" ;;
235
236  -localstatedir | --localstatedir | --localstatedi | --localstated \
237  | --localstate | --localstat | --localsta | --localst \
238  | --locals | --local | --loca | --loc | --lo)
239    ac_prev=localstatedir ;;
240  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
241  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
242  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
243    localstatedir="$ac_optarg" ;;
244
245  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
246    ac_prev=mandir ;;
247  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
248    mandir="$ac_optarg" ;;
249
250  -nfp | --nfp | --nf)
251    # Obsolete; use --without-fp.
252    with_fp=no ;;
253
254  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
255  | --no-cr | --no-c)
256    no_create=yes ;;
257
258  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
259  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
260    no_recursion=yes ;;
261
262  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
263  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
264  | --oldin | --oldi | --old | --ol | --o)
265    ac_prev=oldincludedir ;;
266  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
267  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
268  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
269    oldincludedir="$ac_optarg" ;;
270
271  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
272    ac_prev=prefix ;;
273  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
274    prefix="$ac_optarg" ;;
275
276  -program-prefix | --program-prefix | --program-prefi | --program-pref \
277  | --program-pre | --program-pr | --program-p)
278    ac_prev=program_prefix ;;
279  -program-prefix=* | --program-prefix=* | --program-prefi=* \
280  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
281    program_prefix="$ac_optarg" ;;
282
283  -program-suffix | --program-suffix | --program-suffi | --program-suff \
284  | --program-suf | --program-su | --program-s)
285    ac_prev=program_suffix ;;
286  -program-suffix=* | --program-suffix=* | --program-suffi=* \
287  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
288    program_suffix="$ac_optarg" ;;
289
290  -program-transform-name | --program-transform-name \
291  | --program-transform-nam | --program-transform-na \
292  | --program-transform-n | --program-transform- \
293  | --program-transform | --program-transfor \
294  | --program-transfo | --program-transf \
295  | --program-trans | --program-tran \
296  | --progr-tra | --program-tr | --program-t)
297    ac_prev=program_transform_name ;;
298  -program-transform-name=* | --program-transform-name=* \
299  | --program-transform-nam=* | --program-transform-na=* \
300  | --program-transform-n=* | --program-transform-=* \
301  | --program-transform=* | --program-transfor=* \
302  | --program-transfo=* | --program-transf=* \
303  | --program-trans=* | --program-tran=* \
304  | --progr-tra=* | --program-tr=* | --program-t=*)
305    program_transform_name="$ac_optarg" ;;
306
307  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
308  | -silent | --silent | --silen | --sile | --sil)
309    silent=yes ;;
310
311  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
312    ac_prev=sbindir ;;
313  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
314  | --sbi=* | --sb=*)
315    sbindir="$ac_optarg" ;;
316
317  -sharedstatedir | --sharedstatedir | --sharedstatedi \
318  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
319  | --sharedst | --shareds | --shared | --share | --shar \
320  | --sha | --sh)
321    ac_prev=sharedstatedir ;;
322  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
323  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
324  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
325  | --sha=* | --sh=*)
326    sharedstatedir="$ac_optarg" ;;
327
328  -site | --site | --sit)
329    ac_prev=site ;;
330  -site=* | --site=* | --sit=*)
331    site="$ac_optarg" ;;
332
333  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
334    ac_prev=srcdir ;;
335  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
336    srcdir="$ac_optarg" ;;
337
338  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
339  | --syscon | --sysco | --sysc | --sys | --sy)
340    ac_prev=sysconfdir ;;
341  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
342  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
343    sysconfdir="$ac_optarg" ;;
344
345  -target | --target | --targe | --targ | --tar | --ta | --t)
346    ac_prev=target ;;
347  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
348    target="$ac_optarg" ;;
349
350  -v | -verbose | --verbose | --verbos | --verbo | --verb)
351    verbose=yes ;;
352
353  -version | --version | --versio | --versi | --vers)
354    echo "configure generated by autoconf version 2.13"
355    exit 0 ;;
356
357  -with-* | --with-*)
358    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
359    # Reject names that are not valid shell variable names.
360    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
361      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362    fi
363    ac_package=`echo $ac_package| sed 's/-/_/g'`
364    case "$ac_option" in
365      *=*) ;;
366      *) ac_optarg=yes ;;
367    esac
368    eval "with_${ac_package}='$ac_optarg'" ;;
369
370  -without-* | --without-*)
371    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
372    # Reject names that are not valid shell variable names.
373    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
374      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
375    fi
376    ac_package=`echo $ac_package| sed 's/-/_/g'`
377    eval "with_${ac_package}=no" ;;
378
379  --x)
380    # Obsolete; use --with-x.
381    with_x=yes ;;
382
383  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
384  | --x-incl | --x-inc | --x-in | --x-i)
385    ac_prev=x_includes ;;
386  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
387  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
388    x_includes="$ac_optarg" ;;
389
390  -x-libraries | --x-libraries | --x-librarie | --x-librari \
391  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
392    ac_prev=x_libraries ;;
393  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
394  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
395    x_libraries="$ac_optarg" ;;
396
397  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
398    ;;
399
400  *)
401    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
402      echo "configure: warning: $ac_option: invalid host type" 1>&2
403    fi
404    if test "x$nonopt" != xNONE; then
405      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
406    fi
407    nonopt="$ac_option"
408    ;;
409
410  esac
411done
412
413if test -n "$ac_prev"; then
414  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
415fi
416
417trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
418
419# File descriptor usage:
420# 0 standard input
421# 1 file creation
422# 2 errors and warnings
423# 3 some systems may open it to /dev/tty
424# 4 used on the Kubota Titan
425# 6 checking for... messages and results
426# 5 compiler messages saved in config.log
427if test "$silent" = yes; then
428  exec 6>/dev/null
429else
430  exec 6>&1
431fi
432exec 5>./config.log
433
434echo "\
435This file contains any messages produced by compilers while
436running configure, to aid debugging if configure makes a mistake.
437" 1>&5
438
439# Strip out --no-create and --no-recursion so they do not pile up.
440# Also quote any args containing shell metacharacters.
441ac_configure_args=
442for ac_arg
443do
444  case "$ac_arg" in
445  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
446  | --no-cr | --no-c) ;;
447  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
448  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
449  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
450  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
451  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
452  esac
453done
454
455# NLS nuisances.
456# Only set these to C if already set.  These must not be set unconditionally
457# because not all systems understand e.g. LANG=C (notably SCO).
458# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
459# Non-C LC_CTYPE values break the ctype check.
460if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
461if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
462if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
463if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
464
465# confdefs.h avoids OS command line length limits that DEFS can exceed.
466rm -rf conftest* confdefs.h
467# AIX cpp loses on an empty file, so make sure it contains at least a newline.
468echo > confdefs.h
469
470# A filename unique to this package, relative to the directory that
471# configure is in, which we can look for to find out if srcdir is correct.
472ac_unique_file=source/irc.c
473
474# Find the source files, if location was not specified.
475if test -z "$srcdir"; then
476  ac_srcdir_defaulted=yes
477  # Try the directory containing this script, then its parent.
478  ac_prog=$0
479  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
480  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
481  srcdir=$ac_confdir
482  if test ! -r $srcdir/$ac_unique_file; then
483    srcdir=..
484  fi
485else
486  ac_srcdir_defaulted=no
487fi
488if test ! -r $srcdir/$ac_unique_file; then
489  if test "$ac_srcdir_defaulted" = yes; then
490    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
491  else
492    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
493  fi
494fi
495srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
496
497# Prefer explicitly selected file to automatically selected ones.
498if test -z "$CONFIG_SITE"; then
499  if test "x$prefix" != xNONE; then
500    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
501  else
502    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
503  fi
504fi
505for ac_site_file in $CONFIG_SITE; do
506  if test -r "$ac_site_file"; then
507    echo "loading site script $ac_site_file"
508    . "$ac_site_file"
509  fi
510done
511
512if test -r "$cache_file"; then
513  echo "loading cache $cache_file"
514  . $cache_file
515else
516  echo "creating cache $cache_file"
517  > $cache_file
518fi
519
520ac_ext=c
521# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
522ac_cpp='$CPP $CPPFLAGS'
523ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
524ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
525cross_compiling=$ac_cv_prog_cc_cross
526
527ac_exeext=
528ac_objext=o
529if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
530  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
531  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
532    ac_n= ac_c='
533' ac_t='	'
534  else
535    ac_n=-n ac_c= ac_t=
536  fi
537else
538  ac_n= ac_c='\c' ac_t=
539fi
540
541
542
543
544
545VERSION=`sed -n -e 's/";$//' -e '/const char irc_version.. = "/s///p' -e '/const char irc_version/q' < $srcdir/source/irc.c`
546echo this is ircii version $VERSION
547echo
548
549
550
551
552
553
554# Extract the first word of "gcc", so it can be a program name with args.
555set dummy gcc; ac_word=$2
556echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
557echo "configure:558: checking for $ac_word" >&5
558if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
559  echo $ac_n "(cached) $ac_c" 1>&6
560else
561  if test -n "$CC"; then
562  ac_cv_prog_CC="$CC" # Let the user override the test.
563else
564  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
565  ac_dummy="$PATH"
566  for ac_dir in $ac_dummy; do
567    test -z "$ac_dir" && ac_dir=.
568    if test -f $ac_dir/$ac_word; then
569      ac_cv_prog_CC="gcc"
570      break
571    fi
572  done
573  IFS="$ac_save_ifs"
574fi
575fi
576CC="$ac_cv_prog_CC"
577if test -n "$CC"; then
578  echo "$ac_t""$CC" 1>&6
579else
580  echo "$ac_t""no" 1>&6
581fi
582
583if test -z "$CC"; then
584  # Extract the first word of "cc", so it can be a program name with args.
585set dummy cc; ac_word=$2
586echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
587echo "configure:588: checking for $ac_word" >&5
588if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
589  echo $ac_n "(cached) $ac_c" 1>&6
590else
591  if test -n "$CC"; then
592  ac_cv_prog_CC="$CC" # Let the user override the test.
593else
594  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
595  ac_prog_rejected=no
596  ac_dummy="$PATH"
597  for ac_dir in $ac_dummy; do
598    test -z "$ac_dir" && ac_dir=.
599    if test -f $ac_dir/$ac_word; then
600      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
601        ac_prog_rejected=yes
602	continue
603      fi
604      ac_cv_prog_CC="cc"
605      break
606    fi
607  done
608  IFS="$ac_save_ifs"
609if test $ac_prog_rejected = yes; then
610  # We found a bogon in the path, so make sure we never use it.
611  set dummy $ac_cv_prog_CC
612  shift
613  if test $# -gt 0; then
614    # We chose a different compiler from the bogus one.
615    # However, it has the same basename, so the bogon will be chosen
616    # first if we set CC to just the basename; use the full file name.
617    shift
618    set dummy "$ac_dir/$ac_word" "$@"
619    shift
620    ac_cv_prog_CC="$@"
621  fi
622fi
623fi
624fi
625CC="$ac_cv_prog_CC"
626if test -n "$CC"; then
627  echo "$ac_t""$CC" 1>&6
628else
629  echo "$ac_t""no" 1>&6
630fi
631
632  if test -z "$CC"; then
633    case "`uname -s`" in
634    *win32* | *WIN32*)
635      # Extract the first word of "cl", so it can be a program name with args.
636set dummy cl; ac_word=$2
637echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
638echo "configure:639: checking for $ac_word" >&5
639if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
640  echo $ac_n "(cached) $ac_c" 1>&6
641else
642  if test -n "$CC"; then
643  ac_cv_prog_CC="$CC" # Let the user override the test.
644else
645  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
646  ac_dummy="$PATH"
647  for ac_dir in $ac_dummy; do
648    test -z "$ac_dir" && ac_dir=.
649    if test -f $ac_dir/$ac_word; then
650      ac_cv_prog_CC="cl"
651      break
652    fi
653  done
654  IFS="$ac_save_ifs"
655fi
656fi
657CC="$ac_cv_prog_CC"
658if test -n "$CC"; then
659  echo "$ac_t""$CC" 1>&6
660else
661  echo "$ac_t""no" 1>&6
662fi
663 ;;
664    esac
665  fi
666  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
667fi
668
669echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
670echo "configure:671: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
671
672ac_ext=c
673# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
674ac_cpp='$CPP $CPPFLAGS'
675ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
676ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
677cross_compiling=$ac_cv_prog_cc_cross
678
679cat > conftest.$ac_ext << EOF
680
681#line 682 "configure"
682#include "confdefs.h"
683
684main(){return(0);}
685EOF
686if { (eval echo configure:687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
687  ac_cv_prog_cc_works=yes
688  # If we can't run a trivial program, we are probably using a cross compiler.
689  if (./conftest; exit) 2>/dev/null; then
690    ac_cv_prog_cc_cross=no
691  else
692    ac_cv_prog_cc_cross=yes
693  fi
694else
695  echo "configure: failed program was:" >&5
696  cat conftest.$ac_ext >&5
697  ac_cv_prog_cc_works=no
698fi
699rm -fr conftest*
700ac_ext=c
701# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
702ac_cpp='$CPP $CPPFLAGS'
703ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
704ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
705cross_compiling=$ac_cv_prog_cc_cross
706
707echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
708if test $ac_cv_prog_cc_works = no; then
709  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
710fi
711echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
712echo "configure:713: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
713echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
714cross_compiling=$ac_cv_prog_cc_cross
715
716echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
717echo "configure:718: checking whether we are using GNU C" >&5
718if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
719  echo $ac_n "(cached) $ac_c" 1>&6
720else
721  cat > conftest.c <<EOF
722#ifdef __GNUC__
723  yes;
724#endif
725EOF
726if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
727  ac_cv_prog_gcc=yes
728else
729  ac_cv_prog_gcc=no
730fi
731fi
732
733echo "$ac_t""$ac_cv_prog_gcc" 1>&6
734
735if test $ac_cv_prog_gcc = yes; then
736  GCC=yes
737else
738  GCC=
739fi
740
741ac_test_CFLAGS="${CFLAGS+set}"
742ac_save_CFLAGS="$CFLAGS"
743CFLAGS=
744echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
745echo "configure:746: checking whether ${CC-cc} accepts -g" >&5
746if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
747  echo $ac_n "(cached) $ac_c" 1>&6
748else
749  echo 'void f(){}' > conftest.c
750if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
751  ac_cv_prog_cc_g=yes
752else
753  ac_cv_prog_cc_g=no
754fi
755rm -f conftest*
756
757fi
758
759echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
760if test "$ac_test_CFLAGS" = set; then
761  CFLAGS="$ac_save_CFLAGS"
762elif test $ac_cv_prog_cc_g = yes; then
763  if test "$GCC" = yes; then
764    CFLAGS="-g -O"
765  else
766    CFLAGS="-g"
767  fi
768else
769  if test "$GCC" = yes; then
770    CFLAGS="-O"
771  else
772    CFLAGS=
773  fi
774fi
775
776echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
777echo "configure:778: checking how to run the C preprocessor" >&5
778# On Suns, sometimes $CPP names a directory.
779if test -n "$CPP" && test -d "$CPP"; then
780  CPP=
781fi
782if test -z "$CPP"; then
783if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
784  echo $ac_n "(cached) $ac_c" 1>&6
785else
786    # This must be in double quotes, not single quotes, because CPP may get
787  # substituted into the Makefile and "${CC-cc}" will confuse make.
788  CPP="${CC-cc} -E"
789  # On the NeXT, cc -E runs the code through the compiler's parser,
790  # not just through cpp.
791  cat > conftest.$ac_ext <<EOF
792#line 793 "configure"
793#include "confdefs.h"
794#include <assert.h>
795Syntax Error
796EOF
797ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
798{ (eval echo configure:799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
799ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
800if test -z "$ac_err"; then
801  :
802else
803  echo "$ac_err" >&5
804  echo "configure: failed program was:" >&5
805  cat conftest.$ac_ext >&5
806  rm -rf conftest*
807  CPP="${CC-cc} -E -traditional-cpp"
808  cat > conftest.$ac_ext <<EOF
809#line 810 "configure"
810#include "confdefs.h"
811#include <assert.h>
812Syntax Error
813EOF
814ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
815{ (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
816ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
817if test -z "$ac_err"; then
818  :
819else
820  echo "$ac_err" >&5
821  echo "configure: failed program was:" >&5
822  cat conftest.$ac_ext >&5
823  rm -rf conftest*
824  CPP="${CC-cc} -nologo -E"
825  cat > conftest.$ac_ext <<EOF
826#line 827 "configure"
827#include "confdefs.h"
828#include <assert.h>
829Syntax Error
830EOF
831ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
832{ (eval echo configure:833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
833ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
834if test -z "$ac_err"; then
835  :
836else
837  echo "$ac_err" >&5
838  echo "configure: failed program was:" >&5
839  cat conftest.$ac_ext >&5
840  rm -rf conftest*
841  CPP=/lib/cpp
842fi
843rm -f conftest*
844fi
845rm -f conftest*
846fi
847rm -f conftest*
848  ac_cv_prog_CPP="$CPP"
849fi
850  CPP="$ac_cv_prog_CPP"
851else
852  ac_cv_prog_CPP="$CPP"
853fi
854echo "$ac_t""$CPP" 1>&6
855
856echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
857echo "configure:858: checking for POSIXized ISC" >&5
858if test -d /etc/conf/kconfig.d &&
859  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
860then
861  echo "$ac_t""yes" 1>&6
862  ISC=yes # If later tests want to check for ISC.
863  cat >> confdefs.h <<\EOF
864#define _POSIX_SOURCE 1
865EOF
866
867  if test "$GCC" = yes; then
868    CC="$CC -posix"
869  else
870    CC="$CC -Xp"
871  fi
872else
873  echo "$ac_t""no" 1>&6
874  ISC=
875fi
876
877echo $ac_n "checking for AIX""... $ac_c" 1>&6
878echo "configure:879: checking for AIX" >&5
879cat > conftest.$ac_ext <<EOF
880#line 881 "configure"
881#include "confdefs.h"
882#ifdef _AIX
883  yes
884#endif
885
886EOF
887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
888  egrep "yes" >/dev/null 2>&1; then
889  rm -rf conftest*
890  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
891#define _ALL_SOURCE 1
892EOF
893
894else
895  rm -rf conftest*
896  echo "$ac_t""no" 1>&6
897fi
898rm -f conftest*
899
900
901
902
903
904
905unamer=`uname -r 2> /dev/null`
906unames=`uname -s 2> /dev/null`
907
908
909
910echo $ac_n "checking for qnx""... $ac_c" 1>&6
911echo "configure:912: checking for qnx" >&5
912case "$unames" in
913  QNX*)
914    echo "$ac_t""yes" 1>&6
915    LDFLAGS=-N64k                      CFLAGS="-w4 -O -g -fi=unix.h"    ;;
916  *)
917    echo "$ac_t""no" 1>&6
918esac
919
920
921
922if test -d /usr/ccs/lib; then
923	LIBS="-L/usr/ccs/lib $LIBS"
924fi
925
926
927
928
929if test -z "$libsocket"; then
930	echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
931echo "configure:932: checking for socket in -lsocket" >&5
932ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
933if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
934  echo $ac_n "(cached) $ac_c" 1>&6
935else
936  ac_save_LIBS="$LIBS"
937LIBS="-lsocket  $LIBS"
938cat > conftest.$ac_ext <<EOF
939#line 940 "configure"
940#include "confdefs.h"
941/* Override any gcc2 internal prototype to avoid an error.  */
942/* We use char because int might match the return type of a gcc2
943    builtin and then its argument prototype would still apply.  */
944char socket();
945
946int main() {
947socket()
948; return 0; }
949EOF
950if { (eval echo configure:951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
951  rm -rf conftest*
952  eval "ac_cv_lib_$ac_lib_var=yes"
953else
954  echo "configure: failed program was:" >&5
955  cat conftest.$ac_ext >&5
956  rm -rf conftest*
957  eval "ac_cv_lib_$ac_lib_var=no"
958fi
959rm -f conftest*
960LIBS="$ac_save_LIBS"
961
962fi
963if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
964  echo "$ac_t""yes" 1>&6
965  LIBS="$LIBS -lsocket"
966else
967  echo "$ac_t""no" 1>&6
968fi
969
970fi
971
972# Check whether --with-ssl or --without-ssl was given.
973if test "${with_ssl+set}" = set; then
974  withval="$with_ssl"
975   test -z "$withval" && with_ssl="yes"
976else
977   with_ssl="maybe"
978fi
979
980
981echo $ac_n "checking whether to include SSL support""... $ac_c" 1>&6
982echo "configure:983: checking whether to include SSL support" >&5
983if test "x$with_ssl" = "xno"; then
984	echo "$ac_t""no" 1>&6
985else
986	saved_LIBS="$LIBS"
987	saved_CFLAGS="$CFLAGS"
988
989	if test "x$with_ssl" != "xyes" -a "x$with_ssl" != "xmaybe"; then
990		# The user gave us a specific OpenSSL install dir, so just try that and stop.
991
992		CFLAGS="$saved_CFLAGS -I$with_ssl/include"
993		LIBS="$saved_LIBS -L$with_ssl/lib -lssl -lcrypto"
994		cat > conftest.$ac_ext <<EOF
995#line 996 "configure"
996#include "confdefs.h"
997#include <openssl/ssl.h>
998int main() {
999SSL_accept(NULL);
1000; return 0; }
1001EOF
1002if { (eval echo configure:1003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1003  rm -rf conftest*
1004   have_ssl="yes"
1005else
1006  echo "configure: failed program was:" >&5
1007  cat conftest.$ac_ext >&5
1008fi
1009rm -f conftest*
1010	else
1011		# First just try to see if it exists in the default location
1012
1013		CFLAGS="$saved_CFLAGS"
1014		LIBS="$saved_LIBS -lssl -lcrypto"
1015		cat > conftest.$ac_ext <<EOF
1016#line 1017 "configure"
1017#include "confdefs.h"
1018#include <openssl/ssl.h>
1019int main() {
1020SSL_accept(NULL);
1021; return 0; }
1022EOF
1023if { (eval echo configure:1024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1024  rm -rf conftest*
1025   have_ssl="yes"
1026else
1027  echo "configure: failed program was:" >&5
1028  cat conftest.$ac_ext >&5
1029fi
1030rm -f conftest*
1031
1032		# Otherwise, go hunting for it.
1033		for ssldir in "/usr/local /usr/local/ssl /usr/local/openssl"; do
1034	    	test -n "$have_ssl" && break
1035
1036			CFLAGS="$saved_CFLAGS -I$ssldir/include"
1037			LIBS="$saved_LIBS -L$ssldir/lib -lssl -lcrypto"
1038			cat > conftest.$ac_ext <<EOF
1039#line 1040 "configure"
1040#include "confdefs.h"
1041#include <openssl/ssl.h>
1042int main() {
1043SSL_accept(NULL);
1044; return 0; }
1045EOF
1046if { (eval echo configure:1047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1047  rm -rf conftest*
1048   have_ssl="yes"
1049else
1050  echo "configure: failed program was:" >&5
1051  cat conftest.$ac_ext >&5
1052fi
1053rm -f conftest*
1054	    done
1055	fi
1056
1057	# If we found it somewhere, great!  Otherwise, revert.
1058	if test -n "$have_ssl"; then
1059		cat >> confdefs.h <<\EOF
1060#define HAVE_SSL 1
1061EOF
1062
1063		echo "$ac_t""yes" 1>&6
1064	else
1065		LIBS="$saved_LIBS"
1066		CFLAGS="$saved_CFLAGS"
1067		echo "$ac_t""no" 1>&6
1068		if test "x$with_ssl" != "xmaybe"; then
1069			{ echo "configure: error: You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL." 1>&2; exit 1; }
1070		fi
1071	fi
1072fi
1073
1074if test -z "$libinet"; then
1075	echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
1076echo "configure:1077: checking for socket in -linet" >&5
1077ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
1078if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1079  echo $ac_n "(cached) $ac_c" 1>&6
1080else
1081  ac_save_LIBS="$LIBS"
1082LIBS="-linet  $LIBS"
1083cat > conftest.$ac_ext <<EOF
1084#line 1085 "configure"
1085#include "confdefs.h"
1086/* Override any gcc2 internal prototype to avoid an error.  */
1087/* We use char because int might match the return type of a gcc2
1088    builtin and then its argument prototype would still apply.  */
1089char socket();
1090
1091int main() {
1092socket()
1093; return 0; }
1094EOF
1095if { (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1096  rm -rf conftest*
1097  eval "ac_cv_lib_$ac_lib_var=yes"
1098else
1099  echo "configure: failed program was:" >&5
1100  cat conftest.$ac_ext >&5
1101  rm -rf conftest*
1102  eval "ac_cv_lib_$ac_lib_var=no"
1103fi
1104rm -f conftest*
1105LIBS="$ac_save_LIBS"
1106
1107fi
1108if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1109  echo "$ac_t""yes" 1>&6
1110  libnsl=1; LIBS="$LIBS -linet -lnsl_s"
1111else
1112  echo "$ac_t""no" 1>&6
1113fi
1114
1115fi
1116
1117if test -z "$libnsl"; then
1118	echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
1119echo "configure:1120: checking for gethostname in -lnsl" >&5
1120ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
1121if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1122  echo $ac_n "(cached) $ac_c" 1>&6
1123else
1124  ac_save_LIBS="$LIBS"
1125LIBS="-lnsl  $LIBS"
1126cat > conftest.$ac_ext <<EOF
1127#line 1128 "configure"
1128#include "confdefs.h"
1129/* Override any gcc2 internal prototype to avoid an error.  */
1130/* We use char because int might match the return type of a gcc2
1131    builtin and then its argument prototype would still apply.  */
1132char gethostname();
1133
1134int main() {
1135gethostname()
1136; return 0; }
1137EOF
1138if { (eval echo configure:1139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1139  rm -rf conftest*
1140  eval "ac_cv_lib_$ac_lib_var=yes"
1141else
1142  echo "configure: failed program was:" >&5
1143  cat conftest.$ac_ext >&5
1144  rm -rf conftest*
1145  eval "ac_cv_lib_$ac_lib_var=no"
1146fi
1147rm -f conftest*
1148LIBS="$ac_save_LIBS"
1149
1150fi
1151if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1152  echo "$ac_t""yes" 1>&6
1153  LIBS="$LIBS -lnsl"
1154else
1155  echo "$ac_t""no" 1>&6
1156fi
1157
1158fi
1159
1160echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
1161echo "configure:1162: checking for getpwnam in -lsun" >&5
1162ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
1163if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1164  echo $ac_n "(cached) $ac_c" 1>&6
1165else
1166  ac_save_LIBS="$LIBS"
1167LIBS="-lsun  $LIBS"
1168cat > conftest.$ac_ext <<EOF
1169#line 1170 "configure"
1170#include "confdefs.h"
1171/* Override any gcc2 internal prototype to avoid an error.  */
1172/* We use char because int might match the return type of a gcc2
1173    builtin and then its argument prototype would still apply.  */
1174char getpwnam();
1175
1176int main() {
1177getpwnam()
1178; return 0; }
1179EOF
1180if { (eval echo configure:1181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1181  rm -rf conftest*
1182  eval "ac_cv_lib_$ac_lib_var=yes"
1183else
1184  echo "configure: failed program was:" >&5
1185  cat conftest.$ac_ext >&5
1186  rm -rf conftest*
1187  eval "ac_cv_lib_$ac_lib_var=no"
1188fi
1189rm -f conftest*
1190LIBS="$ac_save_LIBS"
1191
1192fi
1193if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1194  echo "$ac_t""yes" 1>&6
1195  LIBS="$LIBS -lsun"
1196else
1197  echo "$ac_t""no" 1>&6
1198fi
1199
1200echo $ac_n "checking for inet_addr in -ldgc""... $ac_c" 1>&6
1201echo "configure:1202: checking for inet_addr in -ldgc" >&5
1202ac_lib_var=`echo dgc'_'inet_addr | sed 'y%./+-%__p_%'`
1203if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1204  echo $ac_n "(cached) $ac_c" 1>&6
1205else
1206  ac_save_LIBS="$LIBS"
1207LIBS="-ldgc  $LIBS"
1208cat > conftest.$ac_ext <<EOF
1209#line 1210 "configure"
1210#include "confdefs.h"
1211/* Override any gcc2 internal prototype to avoid an error.  */
1212/* We use char because int might match the return type of a gcc2
1213    builtin and then its argument prototype would still apply.  */
1214char inet_addr();
1215
1216int main() {
1217inet_addr()
1218; return 0; }
1219EOF
1220if { (eval echo configure:1221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1221  rm -rf conftest*
1222  eval "ac_cv_lib_$ac_lib_var=yes"
1223else
1224  echo "configure: failed program was:" >&5
1225  cat conftest.$ac_ext >&5
1226  rm -rf conftest*
1227  eval "ac_cv_lib_$ac_lib_var=no"
1228fi
1229rm -f conftest*
1230LIBS="$ac_save_LIBS"
1231
1232fi
1233if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1234  echo "$ac_t""yes" 1>&6
1235  LIBS="$LIBS -ldgc"
1236else
1237  echo "$ac_t""no" 1>&6
1238fi
1239
1240echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
1241echo "configure:1242: checking for gethostbyname in -lresolv" >&5
1242ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
1243if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1244  echo $ac_n "(cached) $ac_c" 1>&6
1245else
1246  ac_save_LIBS="$LIBS"
1247LIBS="-lresolv  $LIBS"
1248cat > conftest.$ac_ext <<EOF
1249#line 1250 "configure"
1250#include "confdefs.h"
1251/* Override any gcc2 internal prototype to avoid an error.  */
1252/* We use char because int might match the return type of a gcc2
1253    builtin and then its argument prototype would still apply.  */
1254char gethostbyname();
1255
1256int main() {
1257gethostbyname()
1258; return 0; }
1259EOF
1260if { (eval echo configure:1261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1261  rm -rf conftest*
1262  eval "ac_cv_lib_$ac_lib_var=yes"
1263else
1264  echo "configure: failed program was:" >&5
1265  cat conftest.$ac_ext >&5
1266  rm -rf conftest*
1267  eval "ac_cv_lib_$ac_lib_var=no"
1268fi
1269rm -f conftest*
1270LIBS="$ac_save_LIBS"
1271
1272fi
1273if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1274  echo "$ac_t""yes" 1>&6
1275  LIBS="$LIBS -lresolv"
1276else
1277  echo "$ac_t""no" 1>&6
1278fi
1279
1280echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
1281echo "configure:1282: checking for crypt in -lcrypt" >&5
1282ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
1283if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1284  echo $ac_n "(cached) $ac_c" 1>&6
1285else
1286  ac_save_LIBS="$LIBS"
1287LIBS="-lcrypt  $LIBS"
1288cat > conftest.$ac_ext <<EOF
1289#line 1290 "configure"
1290#include "confdefs.h"
1291/* Override any gcc2 internal prototype to avoid an error.  */
1292/* We use char because int might match the return type of a gcc2
1293    builtin and then its argument prototype would still apply.  */
1294char crypt();
1295
1296int main() {
1297crypt()
1298; return 0; }
1299EOF
1300if { (eval echo configure:1301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1301  rm -rf conftest*
1302  eval "ac_cv_lib_$ac_lib_var=yes"
1303else
1304  echo "configure: failed program was:" >&5
1305  cat conftest.$ac_ext >&5
1306  rm -rf conftest*
1307  eval "ac_cv_lib_$ac_lib_var=no"
1308fi
1309rm -f conftest*
1310LIBS="$ac_save_LIBS"
1311
1312fi
1313if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1314  echo "$ac_t""yes" 1>&6
1315  LIBS="$LIBS -lcrypt"
1316else
1317  echo "$ac_t""no" 1>&6
1318fi
1319
1320echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
1321echo "configure:1322: checking for pow in -lm" >&5
1322ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
1323if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1324  echo $ac_n "(cached) $ac_c" 1>&6
1325else
1326  ac_save_LIBS="$LIBS"
1327LIBS="-lm  $LIBS"
1328cat > conftest.$ac_ext <<EOF
1329#line 1330 "configure"
1330#include "confdefs.h"
1331/* Override any gcc2 internal prototype to avoid an error.  */
1332/* We use char because int might match the return type of a gcc2
1333    builtin and then its argument prototype would still apply.  */
1334char pow();
1335
1336int main() {
1337pow()
1338; return 0; }
1339EOF
1340if { (eval echo configure:1341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1341  rm -rf conftest*
1342  eval "ac_cv_lib_$ac_lib_var=yes"
1343else
1344  echo "configure: failed program was:" >&5
1345  cat conftest.$ac_ext >&5
1346  rm -rf conftest*
1347  eval "ac_cv_lib_$ac_lib_var=no"
1348fi
1349rm -f conftest*
1350LIBS="$ac_save_LIBS"
1351
1352fi
1353if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1354  echo "$ac_t""yes" 1>&6
1355  LIBS="$LIBS -lm"
1356else
1357  echo "$ac_t""no" 1>&6
1358fi
1359
1360
1361termcap=0;
1362echo $ac_n "checking whether you want to use termcap""... $ac_c" 1>&6
1363echo "configure:1364: checking whether you want to use termcap" >&5
1364# Check whether --with-termcap or --without-termcap was given.
1365if test "${with_termcap+set}" = set; then
1366  withval="$with_termcap"
1367     echo "$ac_t""yes" 1>&6
1368    echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
1369echo "configure:1370: checking for tgetent in -ltermcap" >&5
1370ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
1371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1372  echo $ac_n "(cached) $ac_c" 1>&6
1373else
1374  ac_save_LIBS="$LIBS"
1375LIBS="-ltermcap  $LIBS"
1376cat > conftest.$ac_ext <<EOF
1377#line 1378 "configure"
1378#include "confdefs.h"
1379/* Override any gcc2 internal prototype to avoid an error.  */
1380/* We use char because int might match the return type of a gcc2
1381    builtin and then its argument prototype would still apply.  */
1382char tgetent();
1383
1384int main() {
1385tgetent()
1386; return 0; }
1387EOF
1388if { (eval echo configure:1389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1389  rm -rf conftest*
1390  eval "ac_cv_lib_$ac_lib_var=yes"
1391else
1392  echo "configure: failed program was:" >&5
1393  cat conftest.$ac_ext >&5
1394  rm -rf conftest*
1395  eval "ac_cv_lib_$ac_lib_var=no"
1396fi
1397rm -f conftest*
1398LIBS="$ac_save_LIBS"
1399
1400fi
1401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1402  echo "$ac_t""yes" 1>&6
1403  termcap=1;LIBS="-ltermcap $LIBS"
1404else
1405  echo "$ac_t""no" 1>&6
1406echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
1407echo "configure:1408: checking for tgetent in -ltermlib" >&5
1408ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
1409if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1410  echo $ac_n "(cached) $ac_c" 1>&6
1411else
1412  ac_save_LIBS="$LIBS"
1413LIBS="-ltermlib  $LIBS"
1414cat > conftest.$ac_ext <<EOF
1415#line 1416 "configure"
1416#include "confdefs.h"
1417/* Override any gcc2 internal prototype to avoid an error.  */
1418/* We use char because int might match the return type of a gcc2
1419    builtin and then its argument prototype would still apply.  */
1420char tgetent();
1421
1422int main() {
1423tgetent()
1424; return 0; }
1425EOF
1426if { (eval echo configure:1427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1427  rm -rf conftest*
1428  eval "ac_cv_lib_$ac_lib_var=yes"
1429else
1430  echo "configure: failed program was:" >&5
1431  cat conftest.$ac_ext >&5
1432  rm -rf conftest*
1433  eval "ac_cv_lib_$ac_lib_var=no"
1434fi
1435rm -f conftest*
1436LIBS="$ac_save_LIBS"
1437
1438fi
1439if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1440  echo "$ac_t""yes" 1>&6
1441  termcap=1;LIBS="-ltermlib $LIBS"
1442else
1443  echo "$ac_t""no" 1>&6
1444echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
1445echo "configure:1446: checking for tgetent in -lncurses" >&5
1446ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
1447if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1448  echo $ac_n "(cached) $ac_c" 1>&6
1449else
1450  ac_save_LIBS="$LIBS"
1451LIBS="-lncurses  $LIBS"
1452cat > conftest.$ac_ext <<EOF
1453#line 1454 "configure"
1454#include "confdefs.h"
1455/* Override any gcc2 internal prototype to avoid an error.  */
1456/* We use char because int might match the return type of a gcc2
1457    builtin and then its argument prototype would still apply.  */
1458char tgetent();
1459
1460int main() {
1461tgetent()
1462; return 0; }
1463EOF
1464if { (eval echo configure:1465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1465  rm -rf conftest*
1466  eval "ac_cv_lib_$ac_lib_var=yes"
1467else
1468  echo "configure: failed program was:" >&5
1469  cat conftest.$ac_ext >&5
1470  rm -rf conftest*
1471  eval "ac_cv_lib_$ac_lib_var=no"
1472fi
1473rm -f conftest*
1474LIBS="$ac_save_LIBS"
1475
1476fi
1477if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1478  echo "$ac_t""yes" 1>&6
1479  termcap=1;LIBS="-lncurses $LIBS"
1480else
1481  echo "$ac_t""no" 1>&6
1482echo "configure: warning: I cant find tgetent.  Youll have to help me." 1>&2
1483fi
1484
1485fi
1486
1487fi
1488
1489else
1490     echo "$ac_t""no" 1>&6
1491    echo $ac_n "checking for setupterm in -lncurses""... $ac_c" 1>&6
1492echo "configure:1493: checking for setupterm in -lncurses" >&5
1493ac_lib_var=`echo ncurses'_'setupterm | sed 'y%./+-%__p_%'`
1494if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1495  echo $ac_n "(cached) $ac_c" 1>&6
1496else
1497  ac_save_LIBS="$LIBS"
1498LIBS="-lncurses  $LIBS"
1499cat > conftest.$ac_ext <<EOF
1500#line 1501 "configure"
1501#include "confdefs.h"
1502/* Override any gcc2 internal prototype to avoid an error.  */
1503/* We use char because int might match the return type of a gcc2
1504    builtin and then its argument prototype would still apply.  */
1505char setupterm();
1506
1507int main() {
1508setupterm()
1509; return 0; }
1510EOF
1511if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1512  rm -rf conftest*
1513  eval "ac_cv_lib_$ac_lib_var=yes"
1514else
1515  echo "configure: failed program was:" >&5
1516  cat conftest.$ac_ext >&5
1517  rm -rf conftest*
1518  eval "ac_cv_lib_$ac_lib_var=no"
1519fi
1520rm -f conftest*
1521LIBS="$ac_save_LIBS"
1522
1523fi
1524if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1525  echo "$ac_t""yes" 1>&6
1526  LIBS="-lncurses $LIBS"
1527else
1528  echo "$ac_t""no" 1>&6
1529echo $ac_n "checking for setupterm in -ltinfo""... $ac_c" 1>&6
1530echo "configure:1531: checking for setupterm in -ltinfo" >&5
1531ac_lib_var=`echo tinfo'_'setupterm | sed 'y%./+-%__p_%'`
1532if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1533  echo $ac_n "(cached) $ac_c" 1>&6
1534else
1535  ac_save_LIBS="$LIBS"
1536LIBS="-ltinfo  $LIBS"
1537cat > conftest.$ac_ext <<EOF
1538#line 1539 "configure"
1539#include "confdefs.h"
1540/* Override any gcc2 internal prototype to avoid an error.  */
1541/* We use char because int might match the return type of a gcc2
1542    builtin and then its argument prototype would still apply.  */
1543char setupterm();
1544
1545int main() {
1546setupterm()
1547; return 0; }
1548EOF
1549if { (eval echo configure:1550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1550  rm -rf conftest*
1551  eval "ac_cv_lib_$ac_lib_var=yes"
1552else
1553  echo "configure: failed program was:" >&5
1554  cat conftest.$ac_ext >&5
1555  rm -rf conftest*
1556  eval "ac_cv_lib_$ac_lib_var=no"
1557fi
1558rm -f conftest*
1559LIBS="$ac_save_LIBS"
1560
1561fi
1562if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1563  echo "$ac_t""yes" 1>&6
1564  LIBS="-ltinfo $LIBS"
1565else
1566  echo "$ac_t""no" 1>&6
1567echo $ac_n "checking for setupterm in -lncurses""... $ac_c" 1>&6
1568echo "configure:1569: checking for setupterm in -lncurses" >&5
1569ac_lib_var=`echo curses'_'setupterm | sed 'y%./+-%__p_%'`
1570if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1571  echo $ac_n "(cached) $ac_c" 1>&6
1572else
1573  ac_save_LIBS="$LIBS"
1574LIBS="-lncurses  $LIBS"
1575cat > conftest.$ac_ext <<EOF
1576#line 1577 "configure"
1577#include "confdefs.h"
1578/* Override any gcc2 internal prototype to avoid an error.  */
1579/* We use char because int might match the return type of a gcc2
1580    builtin and then its argument prototype would still apply.  */
1581char setupterm();
1582
1583int main() {
1584setupterm()
1585; return 0; }
1586EOF
1587if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1588  rm -rf conftest*
1589  eval "ac_cv_lib_$ac_lib_var=yes"
1590else
1591  echo "configure: failed program was:" >&5
1592  cat conftest.$ac_ext >&5
1593  rm -rf conftest*
1594  eval "ac_cv_lib_$ac_lib_var=no"
1595fi
1596rm -f conftest*
1597LIBS="$ac_save_LIBS"
1598
1599fi
1600if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1601  echo "$ac_t""yes" 1>&6
1602  LIBS="-lncurses $LIBS"
1603else
1604  echo "$ac_t""no" 1>&6
1605echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
1606echo "configure:1607: checking for tgetent in -lncurses" >&5
1607ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
1608if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1609  echo $ac_n "(cached) $ac_c" 1>&6
1610else
1611  ac_save_LIBS="$LIBS"
1612LIBS="-lncurses  $LIBS"
1613cat > conftest.$ac_ext <<EOF
1614#line 1615 "configure"
1615#include "confdefs.h"
1616/* Override any gcc2 internal prototype to avoid an error.  */
1617/* We use char because int might match the return type of a gcc2
1618    builtin and then its argument prototype would still apply.  */
1619char tgetent();
1620
1621int main() {
1622tgetent()
1623; return 0; }
1624EOF
1625if { (eval echo configure:1626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1626  rm -rf conftest*
1627  eval "ac_cv_lib_$ac_lib_var=yes"
1628else
1629  echo "configure: failed program was:" >&5
1630  cat conftest.$ac_ext >&5
1631  rm -rf conftest*
1632  eval "ac_cv_lib_$ac_lib_var=no"
1633fi
1634rm -f conftest*
1635LIBS="$ac_save_LIBS"
1636
1637fi
1638if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1639  echo "$ac_t""yes" 1>&6
1640  LIBS="-lncurses $LIBS"
1641else
1642  echo "$ac_t""no" 1>&6
1643echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
1644echo "configure:1645: checking for tgetent in -ltermlib" >&5
1645ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
1646if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1647  echo $ac_n "(cached) $ac_c" 1>&6
1648else
1649  ac_save_LIBS="$LIBS"
1650LIBS="-ltermlib  $LIBS"
1651cat > conftest.$ac_ext <<EOF
1652#line 1653 "configure"
1653#include "confdefs.h"
1654/* Override any gcc2 internal prototype to avoid an error.  */
1655/* We use char because int might match the return type of a gcc2
1656    builtin and then its argument prototype would still apply.  */
1657char tgetent();
1658
1659int main() {
1660tgetent()
1661; return 0; }
1662EOF
1663if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1664  rm -rf conftest*
1665  eval "ac_cv_lib_$ac_lib_var=yes"
1666else
1667  echo "configure: failed program was:" >&5
1668  cat conftest.$ac_ext >&5
1669  rm -rf conftest*
1670  eval "ac_cv_lib_$ac_lib_var=no"
1671fi
1672rm -f conftest*
1673LIBS="$ac_save_LIBS"
1674
1675fi
1676if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1677  echo "$ac_t""yes" 1>&6
1678  LIBS="-ltermlib $LIBS"
1679else
1680  echo "$ac_t""no" 1>&6
1681echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
1682echo "configure:1683: checking for tgetent in -ltermcap" >&5
1683ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
1684if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1685  echo $ac_n "(cached) $ac_c" 1>&6
1686else
1687  ac_save_LIBS="$LIBS"
1688LIBS="-ltermcap  $LIBS"
1689cat > conftest.$ac_ext <<EOF
1690#line 1691 "configure"
1691#include "confdefs.h"
1692/* Override any gcc2 internal prototype to avoid an error.  */
1693/* We use char because int might match the return type of a gcc2
1694    builtin and then its argument prototype would still apply.  */
1695char tgetent();
1696
1697int main() {
1698tgetent()
1699; return 0; }
1700EOF
1701if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1702  rm -rf conftest*
1703  eval "ac_cv_lib_$ac_lib_var=yes"
1704else
1705  echo "configure: failed program was:" >&5
1706  cat conftest.$ac_ext >&5
1707  rm -rf conftest*
1708  eval "ac_cv_lib_$ac_lib_var=no"
1709fi
1710rm -f conftest*
1711LIBS="$ac_save_LIBS"
1712
1713fi
1714if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1715  echo "$ac_t""yes" 1>&6
1716  LIBS="-ltermcap $LIBS"
1717else
1718  echo "$ac_t""no" 1>&6
1719echo "configure: warning: I cant find tgetent.  Youll have to help me." 1>&2
1720fi
1721
1722fi
1723
1724fi
1725
1726fi
1727
1728fi
1729
1730fi
1731
1732fi
1733
1734
1735
1736for ac_hdr in fcntl.h netdb.h regex.h sys/fcntl.h sys/file.h sys/select.h sys/syslimits.h sys/un.h sys/time.h termcap.h sys/filio.h sys/sysctl.h inttypes.h stdint.h term.h
1737do
1738ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1739echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1740echo "configure:1741: checking for $ac_hdr" >&5
1741if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1742  echo $ac_n "(cached) $ac_c" 1>&6
1743else
1744  cat > conftest.$ac_ext <<EOF
1745#line 1746 "configure"
1746#include "confdefs.h"
1747#include <$ac_hdr>
1748EOF
1749ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1750{ (eval echo configure:1751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1751ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1752if test -z "$ac_err"; then
1753  rm -rf conftest*
1754  eval "ac_cv_header_$ac_safe=yes"
1755else
1756  echo "$ac_err" >&5
1757  echo "configure: failed program was:" >&5
1758  cat conftest.$ac_ext >&5
1759  rm -rf conftest*
1760  eval "ac_cv_header_$ac_safe=no"
1761fi
1762rm -f conftest*
1763fi
1764if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1765  echo "$ac_t""yes" 1>&6
1766    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1767  cat >> confdefs.h <<EOF
1768#define $ac_tr_hdr 1
1769EOF
1770
1771else
1772  echo "$ac_t""no" 1>&6
1773fi
1774done
1775
1776
1777if test $termcap -eq 0 ; then
1778	echo $ac_n "checking for setupterm""... $ac_c" 1>&6
1779echo "configure:1780: checking for setupterm" >&5
1780if eval "test \"`echo '$''{'ac_cv_func_setupterm'+set}'`\" = set"; then
1781  echo $ac_n "(cached) $ac_c" 1>&6
1782else
1783  cat > conftest.$ac_ext <<EOF
1784#line 1785 "configure"
1785#include "confdefs.h"
1786/* System header to define __stub macros and hopefully few prototypes,
1787    which can conflict with char setupterm(); below.  */
1788#include <assert.h>
1789/* Override any gcc2 internal prototype to avoid an error.  */
1790/* We use char because int might match the return type of a gcc2
1791    builtin and then its argument prototype would still apply.  */
1792char setupterm();
1793
1794int main() {
1795
1796/* The GNU C library defines this for functions which it implements
1797    to always fail with ENOSYS.  Some functions are actually named
1798    something starting with __ and the normal name is an alias.  */
1799#if defined (__stub_setupterm) || defined (__stub___setupterm)
1800choke me
1801#else
1802setupterm();
1803#endif
1804
1805; return 0; }
1806EOF
1807if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1808  rm -rf conftest*
1809  eval "ac_cv_func_setupterm=yes"
1810else
1811  echo "configure: failed program was:" >&5
1812  cat conftest.$ac_ext >&5
1813  rm -rf conftest*
1814  eval "ac_cv_func_setupterm=no"
1815fi
1816rm -f conftest*
1817fi
1818
1819if eval "test \"`echo '$ac_cv_func_'setupterm`\" = yes"; then
1820  echo "$ac_t""yes" 1>&6
1821  cat >> confdefs.h <<\EOF
1822#define HAVE_TERMINFO 1
1823EOF
1824
1825else
1826  echo "$ac_t""no" 1>&6
1827fi
1828
1829fi
1830echo $ac_n "checking for uname""... $ac_c" 1>&6
1831echo "configure:1832: checking for uname" >&5
1832if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
1833  echo $ac_n "(cached) $ac_c" 1>&6
1834else
1835  cat > conftest.$ac_ext <<EOF
1836#line 1837 "configure"
1837#include "confdefs.h"
1838/* System header to define __stub macros and hopefully few prototypes,
1839    which can conflict with char uname(); below.  */
1840#include <assert.h>
1841/* Override any gcc2 internal prototype to avoid an error.  */
1842/* We use char because int might match the return type of a gcc2
1843    builtin and then its argument prototype would still apply.  */
1844char uname();
1845
1846int main() {
1847
1848/* The GNU C library defines this for functions which it implements
1849    to always fail with ENOSYS.  Some functions are actually named
1850    something starting with __ and the normal name is an alias.  */
1851#if defined (__stub_uname) || defined (__stub___uname)
1852choke me
1853#else
1854uname();
1855#endif
1856
1857; return 0; }
1858EOF
1859if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1860  rm -rf conftest*
1861  eval "ac_cv_func_uname=yes"
1862else
1863  echo "configure: failed program was:" >&5
1864  cat conftest.$ac_ext >&5
1865  rm -rf conftest*
1866  eval "ac_cv_func_uname=no"
1867fi
1868rm -f conftest*
1869fi
1870
1871if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then
1872  echo "$ac_t""yes" 1>&6
1873  cat >> confdefs.h <<\EOF
1874#define HAVE_UNAME 1
1875EOF
1876
1877else
1878  echo "$ac_t""no" 1>&6
1879fi
1880
1881echo $ac_n "checking for setenv""... $ac_c" 1>&6
1882echo "configure:1883: checking for setenv" >&5
1883if eval "test \"`echo '$''{'ac_cv_func_setenv'+set}'`\" = set"; then
1884  echo $ac_n "(cached) $ac_c" 1>&6
1885else
1886  cat > conftest.$ac_ext <<EOF
1887#line 1888 "configure"
1888#include "confdefs.h"
1889/* System header to define __stub macros and hopefully few prototypes,
1890    which can conflict with char setenv(); below.  */
1891#include <assert.h>
1892/* Override any gcc2 internal prototype to avoid an error.  */
1893/* We use char because int might match the return type of a gcc2
1894    builtin and then its argument prototype would still apply.  */
1895char setenv();
1896
1897int main() {
1898
1899/* The GNU C library defines this for functions which it implements
1900    to always fail with ENOSYS.  Some functions are actually named
1901    something starting with __ and the normal name is an alias.  */
1902#if defined (__stub_setenv) || defined (__stub___setenv)
1903choke me
1904#else
1905setenv();
1906#endif
1907
1908; return 0; }
1909EOF
1910if { (eval echo configure:1911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1911  rm -rf conftest*
1912  eval "ac_cv_func_setenv=yes"
1913else
1914  echo "configure: failed program was:" >&5
1915  cat conftest.$ac_ext >&5
1916  rm -rf conftest*
1917  eval "ac_cv_func_setenv=no"
1918fi
1919rm -f conftest*
1920fi
1921
1922if eval "test \"`echo '$ac_cv_func_'setenv`\" = yes"; then
1923  echo "$ac_t""yes" 1>&6
1924  cat >> confdefs.h <<\EOF
1925#define HAVE_SETENV 1
1926EOF
1927
1928else
1929  echo "$ac_t""no" 1>&6
1930fi
1931
1932echo $ac_n "checking for unsetenv""... $ac_c" 1>&6
1933echo "configure:1934: checking for unsetenv" >&5
1934if eval "test \"`echo '$''{'ac_cv_func_unsetenv'+set}'`\" = set"; then
1935  echo $ac_n "(cached) $ac_c" 1>&6
1936else
1937  cat > conftest.$ac_ext <<EOF
1938#line 1939 "configure"
1939#include "confdefs.h"
1940/* System header to define __stub macros and hopefully few prototypes,
1941    which can conflict with char unsetenv(); below.  */
1942#include <assert.h>
1943/* Override any gcc2 internal prototype to avoid an error.  */
1944/* We use char because int might match the return type of a gcc2
1945    builtin and then its argument prototype would still apply.  */
1946char unsetenv();
1947
1948int main() {
1949
1950/* The GNU C library defines this for functions which it implements
1951    to always fail with ENOSYS.  Some functions are actually named
1952    something starting with __ and the normal name is an alias.  */
1953#if defined (__stub_unsetenv) || defined (__stub___unsetenv)
1954choke me
1955#else
1956unsetenv();
1957#endif
1958
1959; return 0; }
1960EOF
1961if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1962  rm -rf conftest*
1963  eval "ac_cv_func_unsetenv=yes"
1964else
1965  echo "configure: failed program was:" >&5
1966  cat conftest.$ac_ext >&5
1967  rm -rf conftest*
1968  eval "ac_cv_func_unsetenv=no"
1969fi
1970rm -f conftest*
1971fi
1972
1973if eval "test \"`echo '$ac_cv_func_'unsetenv`\" = yes"; then
1974  echo "$ac_t""yes" 1>&6
1975  cat >> confdefs.h <<\EOF
1976#define HAVE_UNSETENV 1
1977EOF
1978
1979else
1980  echo "$ac_t""no" 1>&6
1981fi
1982
1983echo $ac_n "checking for killpg""... $ac_c" 1>&6
1984echo "configure:1985: checking for killpg" >&5
1985if eval "test \"`echo '$''{'ac_cv_func_killpg'+set}'`\" = set"; then
1986  echo $ac_n "(cached) $ac_c" 1>&6
1987else
1988  cat > conftest.$ac_ext <<EOF
1989#line 1990 "configure"
1990#include "confdefs.h"
1991/* System header to define __stub macros and hopefully few prototypes,
1992    which can conflict with char killpg(); below.  */
1993#include <assert.h>
1994/* Override any gcc2 internal prototype to avoid an error.  */
1995/* We use char because int might match the return type of a gcc2
1996    builtin and then its argument prototype would still apply.  */
1997char killpg();
1998
1999int main() {
2000
2001/* The GNU C library defines this for functions which it implements
2002    to always fail with ENOSYS.  Some functions are actually named
2003    something starting with __ and the normal name is an alias.  */
2004#if defined (__stub_killpg) || defined (__stub___killpg)
2005choke me
2006#else
2007killpg();
2008#endif
2009
2010; return 0; }
2011EOF
2012if { (eval echo configure:2013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2013  rm -rf conftest*
2014  eval "ac_cv_func_killpg=yes"
2015else
2016  echo "configure: failed program was:" >&5
2017  cat conftest.$ac_ext >&5
2018  rm -rf conftest*
2019  eval "ac_cv_func_killpg=no"
2020fi
2021rm -f conftest*
2022fi
2023
2024if eval "test \"`echo '$ac_cv_func_'killpg`\" = yes"; then
2025  echo "$ac_t""yes" 1>&6
2026  cat >> confdefs.h <<\EOF
2027#define HAVE_KILLPG 1
2028EOF
2029
2030else
2031  echo "$ac_t""no" 1>&6
2032fi
2033
2034echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
2035echo "configure:2036: checking for gettimeofday" >&5
2036if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2037  echo $ac_n "(cached) $ac_c" 1>&6
2038else
2039  cat > conftest.$ac_ext <<EOF
2040#line 2041 "configure"
2041#include "confdefs.h"
2042/* System header to define __stub macros and hopefully few prototypes,
2043    which can conflict with char gettimeofday(); below.  */
2044#include <assert.h>
2045/* Override any gcc2 internal prototype to avoid an error.  */
2046/* We use char because int might match the return type of a gcc2
2047    builtin and then its argument prototype would still apply.  */
2048char gettimeofday();
2049
2050int main() {
2051
2052/* The GNU C library defines this for functions which it implements
2053    to always fail with ENOSYS.  Some functions are actually named
2054    something starting with __ and the normal name is an alias.  */
2055#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2056choke me
2057#else
2058gettimeofday();
2059#endif
2060
2061; return 0; }
2062EOF
2063if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2064  rm -rf conftest*
2065  eval "ac_cv_func_gettimeofday=yes"
2066else
2067  echo "configure: failed program was:" >&5
2068  cat conftest.$ac_ext >&5
2069  rm -rf conftest*
2070  eval "ac_cv_func_gettimeofday=no"
2071fi
2072rm -f conftest*
2073fi
2074
2075if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
2076  echo "$ac_t""yes" 1>&6
2077  cat >> confdefs.h <<\EOF
2078#define HAVE_GETTIMEOFDAY 1
2079EOF
2080
2081else
2082  echo "$ac_t""no" 1>&6
2083fi
2084
2085echo $ac_n "checking for getpass""... $ac_c" 1>&6
2086echo "configure:2087: checking for getpass" >&5
2087if eval "test \"`echo '$''{'ac_cv_func_getpass'+set}'`\" = set"; then
2088  echo $ac_n "(cached) $ac_c" 1>&6
2089else
2090  cat > conftest.$ac_ext <<EOF
2091#line 2092 "configure"
2092#include "confdefs.h"
2093/* System header to define __stub macros and hopefully few prototypes,
2094    which can conflict with char getpass(); below.  */
2095#include <assert.h>
2096/* Override any gcc2 internal prototype to avoid an error.  */
2097/* We use char because int might match the return type of a gcc2
2098    builtin and then its argument prototype would still apply.  */
2099char getpass();
2100
2101int main() {
2102
2103/* The GNU C library defines this for functions which it implements
2104    to always fail with ENOSYS.  Some functions are actually named
2105    something starting with __ and the normal name is an alias.  */
2106#if defined (__stub_getpass) || defined (__stub___getpass)
2107choke me
2108#else
2109getpass();
2110#endif
2111
2112; return 0; }
2113EOF
2114if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2115  rm -rf conftest*
2116  eval "ac_cv_func_getpass=yes"
2117else
2118  echo "configure: failed program was:" >&5
2119  cat conftest.$ac_ext >&5
2120  rm -rf conftest*
2121  eval "ac_cv_func_getpass=no"
2122fi
2123rm -f conftest*
2124fi
2125
2126if eval "test \"`echo '$ac_cv_func_'getpass`\" = yes"; then
2127  echo "$ac_t""yes" 1>&6
2128  cat >> confdefs.h <<\EOF
2129#define HAVE_GETPASS 1
2130EOF
2131
2132else
2133  echo "$ac_t""no" 1>&6
2134fi
2135
2136echo $ac_n "checking for strtoul""... $ac_c" 1>&6
2137echo "configure:2138: checking for strtoul" >&5
2138if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
2139  echo $ac_n "(cached) $ac_c" 1>&6
2140else
2141  cat > conftest.$ac_ext <<EOF
2142#line 2143 "configure"
2143#include "confdefs.h"
2144/* System header to define __stub macros and hopefully few prototypes,
2145    which can conflict with char strtoul(); below.  */
2146#include <assert.h>
2147/* Override any gcc2 internal prototype to avoid an error.  */
2148/* We use char because int might match the return type of a gcc2
2149    builtin and then its argument prototype would still apply.  */
2150char strtoul();
2151
2152int main() {
2153
2154/* The GNU C library defines this for functions which it implements
2155    to always fail with ENOSYS.  Some functions are actually named
2156    something starting with __ and the normal name is an alias.  */
2157#if defined (__stub_strtoul) || defined (__stub___strtoul)
2158choke me
2159#else
2160strtoul();
2161#endif
2162
2163; return 0; }
2164EOF
2165if { (eval echo configure:2166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2166  rm -rf conftest*
2167  eval "ac_cv_func_strtoul=yes"
2168else
2169  echo "configure: failed program was:" >&5
2170  cat conftest.$ac_ext >&5
2171  rm -rf conftest*
2172  eval "ac_cv_func_strtoul=no"
2173fi
2174rm -f conftest*
2175fi
2176
2177if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
2178  echo "$ac_t""yes" 1>&6
2179  cat >> confdefs.h <<\EOF
2180#define HAVE_STRTOUL 1
2181EOF
2182
2183else
2184  echo "$ac_t""no" 1>&6
2185fi
2186
2187echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
2188echo "configure:2189: checking for vsnprintf" >&5
2189if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
2190  echo $ac_n "(cached) $ac_c" 1>&6
2191else
2192  cat > conftest.$ac_ext <<EOF
2193#line 2194 "configure"
2194#include "confdefs.h"
2195/* System header to define __stub macros and hopefully few prototypes,
2196    which can conflict with char vsnprintf(); below.  */
2197#include <assert.h>
2198/* Override any gcc2 internal prototype to avoid an error.  */
2199/* We use char because int might match the return type of a gcc2
2200    builtin and then its argument prototype would still apply.  */
2201char vsnprintf();
2202
2203int main() {
2204
2205/* The GNU C library defines this for functions which it implements
2206    to always fail with ENOSYS.  Some functions are actually named
2207    something starting with __ and the normal name is an alias.  */
2208#if defined (__stub_vsnprintf) || defined (__stub___vsnprintf)
2209choke me
2210#else
2211vsnprintf();
2212#endif
2213
2214; return 0; }
2215EOF
2216if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2217  rm -rf conftest*
2218  eval "ac_cv_func_vsnprintf=yes"
2219else
2220  echo "configure: failed program was:" >&5
2221  cat conftest.$ac_ext >&5
2222  rm -rf conftest*
2223  eval "ac_cv_func_vsnprintf=no"
2224fi
2225rm -f conftest*
2226fi
2227
2228if eval "test \"`echo '$ac_cv_func_'vsnprintf`\" = yes"; then
2229  echo "$ac_t""yes" 1>&6
2230  cat >> confdefs.h <<\EOF
2231#define HAVE_VSNPRINTF 1
2232EOF
2233
2234else
2235  echo "$ac_t""no" 1>&6
2236fi
2237
2238echo $ac_n "checking for snprintf""... $ac_c" 1>&6
2239echo "configure:2240: checking for snprintf" >&5
2240if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
2241  echo $ac_n "(cached) $ac_c" 1>&6
2242else
2243  cat > conftest.$ac_ext <<EOF
2244#line 2245 "configure"
2245#include "confdefs.h"
2246/* System header to define __stub macros and hopefully few prototypes,
2247    which can conflict with char snprintf(); below.  */
2248#include <assert.h>
2249/* Override any gcc2 internal prototype to avoid an error.  */
2250/* We use char because int might match the return type of a gcc2
2251    builtin and then its argument prototype would still apply.  */
2252char snprintf();
2253
2254int main() {
2255
2256/* The GNU C library defines this for functions which it implements
2257    to always fail with ENOSYS.  Some functions are actually named
2258    something starting with __ and the normal name is an alias.  */
2259#if defined (__stub_snprintf) || defined (__stub___snprintf)
2260choke me
2261#else
2262snprintf();
2263#endif
2264
2265; return 0; }
2266EOF
2267if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2268  rm -rf conftest*
2269  eval "ac_cv_func_snprintf=yes"
2270else
2271  echo "configure: failed program was:" >&5
2272  cat conftest.$ac_ext >&5
2273  rm -rf conftest*
2274  eval "ac_cv_func_snprintf=no"
2275fi
2276rm -f conftest*
2277fi
2278
2279if eval "test \"`echo '$ac_cv_func_'snprintf`\" = yes"; then
2280  echo "$ac_t""yes" 1>&6
2281  cat >> confdefs.h <<\EOF
2282#define HAVE_SNPRINTF 1
2283EOF
2284
2285else
2286  echo "$ac_t""no" 1>&6
2287fi
2288
2289echo $ac_n "checking for sysconf""... $ac_c" 1>&6
2290echo "configure:2291: checking for sysconf" >&5
2291if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then
2292  echo $ac_n "(cached) $ac_c" 1>&6
2293else
2294  cat > conftest.$ac_ext <<EOF
2295#line 2296 "configure"
2296#include "confdefs.h"
2297/* System header to define __stub macros and hopefully few prototypes,
2298    which can conflict with char sysconf(); below.  */
2299#include <assert.h>
2300/* Override any gcc2 internal prototype to avoid an error.  */
2301/* We use char because int might match the return type of a gcc2
2302    builtin and then its argument prototype would still apply.  */
2303char sysconf();
2304
2305int main() {
2306
2307/* The GNU C library defines this for functions which it implements
2308    to always fail with ENOSYS.  Some functions are actually named
2309    something starting with __ and the normal name is an alias.  */
2310#if defined (__stub_sysconf) || defined (__stub___sysconf)
2311choke me
2312#else
2313sysconf();
2314#endif
2315
2316; return 0; }
2317EOF
2318if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2319  rm -rf conftest*
2320  eval "ac_cv_func_sysconf=yes"
2321else
2322  echo "configure: failed program was:" >&5
2323  cat conftest.$ac_ext >&5
2324  rm -rf conftest*
2325  eval "ac_cv_func_sysconf=no"
2326fi
2327rm -f conftest*
2328fi
2329
2330if eval "test \"`echo '$ac_cv_func_'sysconf`\" = yes"; then
2331  echo "$ac_t""yes" 1>&6
2332  cat >> confdefs.h <<\EOF
2333#define HAVE_SYSCONF 1
2334EOF
2335
2336else
2337  echo "$ac_t""no" 1>&6
2338fi
2339
2340echo $ac_n "checking for fpathconf""... $ac_c" 1>&6
2341echo "configure:2342: checking for fpathconf" >&5
2342if eval "test \"`echo '$''{'ac_cv_func_fpathconf'+set}'`\" = set"; then
2343  echo $ac_n "(cached) $ac_c" 1>&6
2344else
2345  cat > conftest.$ac_ext <<EOF
2346#line 2347 "configure"
2347#include "confdefs.h"
2348/* System header to define __stub macros and hopefully few prototypes,
2349    which can conflict with char fpathconf(); below.  */
2350#include <assert.h>
2351/* Override any gcc2 internal prototype to avoid an error.  */
2352/* We use char because int might match the return type of a gcc2
2353    builtin and then its argument prototype would still apply.  */
2354char fpathconf();
2355
2356int main() {
2357
2358/* The GNU C library defines this for functions which it implements
2359    to always fail with ENOSYS.  Some functions are actually named
2360    something starting with __ and the normal name is an alias.  */
2361#if defined (__stub_fpathconf) || defined (__stub___fpathconf)
2362choke me
2363#else
2364fpathconf();
2365#endif
2366
2367; return 0; }
2368EOF
2369if { (eval echo configure:2370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2370  rm -rf conftest*
2371  eval "ac_cv_func_fpathconf=yes"
2372else
2373  echo "configure: failed program was:" >&5
2374  cat conftest.$ac_ext >&5
2375  rm -rf conftest*
2376  eval "ac_cv_func_fpathconf=no"
2377fi
2378rm -f conftest*
2379fi
2380
2381if eval "test \"`echo '$ac_cv_func_'fpathconf`\" = yes"; then
2382  echo "$ac_t""yes" 1>&6
2383  cat >> confdefs.h <<\EOF
2384#define HAVE_FPATHCONF 1
2385EOF
2386
2387else
2388  echo "$ac_t""no" 1>&6
2389fi
2390
2391echo $ac_n "checking for strerror""... $ac_c" 1>&6
2392echo "configure:2393: checking for strerror" >&5
2393if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
2394  echo $ac_n "(cached) $ac_c" 1>&6
2395else
2396  cat > conftest.$ac_ext <<EOF
2397#line 2398 "configure"
2398#include "confdefs.h"
2399/* System header to define __stub macros and hopefully few prototypes,
2400    which can conflict with char strerror(); below.  */
2401#include <assert.h>
2402/* Override any gcc2 internal prototype to avoid an error.  */
2403/* We use char because int might match the return type of a gcc2
2404    builtin and then its argument prototype would still apply.  */
2405char strerror();
2406
2407int main() {
2408
2409/* The GNU C library defines this for functions which it implements
2410    to always fail with ENOSYS.  Some functions are actually named
2411    something starting with __ and the normal name is an alias.  */
2412#if defined (__stub_strerror) || defined (__stub___strerror)
2413choke me
2414#else
2415strerror();
2416#endif
2417
2418; return 0; }
2419EOF
2420if { (eval echo configure:2421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2421  rm -rf conftest*
2422  eval "ac_cv_func_strerror=yes"
2423else
2424  echo "configure: failed program was:" >&5
2425  cat conftest.$ac_ext >&5
2426  rm -rf conftest*
2427  eval "ac_cv_func_strerror=no"
2428fi
2429rm -f conftest*
2430fi
2431
2432if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
2433  echo "$ac_t""yes" 1>&6
2434  cat >> confdefs.h <<\EOF
2435#define HAVE_STRERROR 1
2436EOF
2437
2438else
2439  echo "$ac_t""no" 1>&6
2440fi
2441
2442echo $ac_n "checking for memmove""... $ac_c" 1>&6
2443echo "configure:2444: checking for memmove" >&5
2444if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
2445  echo $ac_n "(cached) $ac_c" 1>&6
2446else
2447  cat > conftest.$ac_ext <<EOF
2448#line 2449 "configure"
2449#include "confdefs.h"
2450/* System header to define __stub macros and hopefully few prototypes,
2451    which can conflict with char memmove(); below.  */
2452#include <assert.h>
2453/* Override any gcc2 internal prototype to avoid an error.  */
2454/* We use char because int might match the return type of a gcc2
2455    builtin and then its argument prototype would still apply.  */
2456char memmove();
2457
2458int main() {
2459
2460/* The GNU C library defines this for functions which it implements
2461    to always fail with ENOSYS.  Some functions are actually named
2462    something starting with __ and the normal name is an alias.  */
2463#if defined (__stub_memmove) || defined (__stub___memmove)
2464choke me
2465#else
2466memmove();
2467#endif
2468
2469; return 0; }
2470EOF
2471if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2472  rm -rf conftest*
2473  eval "ac_cv_func_memmove=yes"
2474else
2475  echo "configure: failed program was:" >&5
2476  cat conftest.$ac_ext >&5
2477  rm -rf conftest*
2478  eval "ac_cv_func_memmove=no"
2479fi
2480rm -f conftest*
2481fi
2482
2483if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then
2484  echo "$ac_t""yes" 1>&6
2485  cat >> confdefs.h <<\EOF
2486#define HAVE_MEMMOVE 1
2487EOF
2488
2489else
2490  echo "$ac_t""no" 1>&6
2491fi
2492
2493echo $ac_n "checking for setsid""... $ac_c" 1>&6
2494echo "configure:2495: checking for setsid" >&5
2495if eval "test \"`echo '$''{'ac_cv_func_setsid'+set}'`\" = set"; then
2496  echo $ac_n "(cached) $ac_c" 1>&6
2497else
2498  cat > conftest.$ac_ext <<EOF
2499#line 2500 "configure"
2500#include "confdefs.h"
2501/* System header to define __stub macros and hopefully few prototypes,
2502    which can conflict with char setsid(); below.  */
2503#include <assert.h>
2504/* Override any gcc2 internal prototype to avoid an error.  */
2505/* We use char because int might match the return type of a gcc2
2506    builtin and then its argument prototype would still apply.  */
2507char setsid();
2508
2509int main() {
2510
2511/* The GNU C library defines this for functions which it implements
2512    to always fail with ENOSYS.  Some functions are actually named
2513    something starting with __ and the normal name is an alias.  */
2514#if defined (__stub_setsid) || defined (__stub___setsid)
2515choke me
2516#else
2517setsid();
2518#endif
2519
2520; return 0; }
2521EOF
2522if { (eval echo configure:2523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2523  rm -rf conftest*
2524  eval "ac_cv_func_setsid=yes"
2525else
2526  echo "configure: failed program was:" >&5
2527  cat conftest.$ac_ext >&5
2528  rm -rf conftest*
2529  eval "ac_cv_func_setsid=no"
2530fi
2531rm -f conftest*
2532fi
2533
2534if eval "test \"`echo '$ac_cv_func_'setsid`\" = yes"; then
2535  echo "$ac_t""yes" 1>&6
2536  cat >> confdefs.h <<\EOF
2537#define HAVE_SETSID 1
2538EOF
2539
2540else
2541  echo "$ac_t""no" 1>&6
2542fi
2543
2544echo $ac_n "checking for getlogin""... $ac_c" 1>&6
2545echo "configure:2546: checking for getlogin" >&5
2546if eval "test \"`echo '$''{'ac_cv_func_getlogin'+set}'`\" = set"; then
2547  echo $ac_n "(cached) $ac_c" 1>&6
2548else
2549  cat > conftest.$ac_ext <<EOF
2550#line 2551 "configure"
2551#include "confdefs.h"
2552/* System header to define __stub macros and hopefully few prototypes,
2553    which can conflict with char getlogin(); below.  */
2554#include <assert.h>
2555/* Override any gcc2 internal prototype to avoid an error.  */
2556/* We use char because int might match the return type of a gcc2
2557    builtin and then its argument prototype would still apply.  */
2558char getlogin();
2559
2560int main() {
2561
2562/* The GNU C library defines this for functions which it implements
2563    to always fail with ENOSYS.  Some functions are actually named
2564    something starting with __ and the normal name is an alias.  */
2565#if defined (__stub_getlogin) || defined (__stub___getlogin)
2566choke me
2567#else
2568getlogin();
2569#endif
2570
2571; return 0; }
2572EOF
2573if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2574  rm -rf conftest*
2575  eval "ac_cv_func_getlogin=yes"
2576else
2577  echo "configure: failed program was:" >&5
2578  cat conftest.$ac_ext >&5
2579  rm -rf conftest*
2580  eval "ac_cv_func_getlogin=no"
2581fi
2582rm -f conftest*
2583fi
2584
2585if eval "test \"`echo '$ac_cv_func_'getlogin`\" = yes"; then
2586  echo "$ac_t""yes" 1>&6
2587  cat >> confdefs.h <<\EOF
2588#define HAVE_GETLOGIN 1
2589EOF
2590
2591else
2592  echo "$ac_t""no" 1>&6
2593fi
2594
2595echo $ac_n "checking for fchdir""... $ac_c" 1>&6
2596echo "configure:2597: checking for fchdir" >&5
2597if eval "test \"`echo '$''{'ac_cv_func_fchdir'+set}'`\" = set"; then
2598  echo $ac_n "(cached) $ac_c" 1>&6
2599else
2600  cat > conftest.$ac_ext <<EOF
2601#line 2602 "configure"
2602#include "confdefs.h"
2603/* System header to define __stub macros and hopefully few prototypes,
2604    which can conflict with char fchdir(); below.  */
2605#include <assert.h>
2606/* Override any gcc2 internal prototype to avoid an error.  */
2607/* We use char because int might match the return type of a gcc2
2608    builtin and then its argument prototype would still apply.  */
2609char fchdir();
2610
2611int main() {
2612
2613/* The GNU C library defines this for functions which it implements
2614    to always fail with ENOSYS.  Some functions are actually named
2615    something starting with __ and the normal name is an alias.  */
2616#if defined (__stub_fchdir) || defined (__stub___fchdir)
2617choke me
2618#else
2619fchdir();
2620#endif
2621
2622; return 0; }
2623EOF
2624if { (eval echo configure:2625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2625  rm -rf conftest*
2626  eval "ac_cv_func_fchdir=yes"
2627else
2628  echo "configure: failed program was:" >&5
2629  cat conftest.$ac_ext >&5
2630  rm -rf conftest*
2631  eval "ac_cv_func_fchdir=no"
2632fi
2633rm -f conftest*
2634fi
2635
2636if eval "test \"`echo '$ac_cv_func_'fchdir`\" = yes"; then
2637  echo "$ac_t""yes" 1>&6
2638  cat >> confdefs.h <<\EOF
2639#define HAVE_FCHDIR 1
2640EOF
2641
2642else
2643  echo "$ac_t""no" 1>&6
2644fi
2645
2646echo $ac_n "checking for realpath""... $ac_c" 1>&6
2647echo "configure:2648: checking for realpath" >&5
2648if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then
2649  echo $ac_n "(cached) $ac_c" 1>&6
2650else
2651  cat > conftest.$ac_ext <<EOF
2652#line 2653 "configure"
2653#include "confdefs.h"
2654/* System header to define __stub macros and hopefully few prototypes,
2655    which can conflict with char realpath(); below.  */
2656#include <assert.h>
2657/* Override any gcc2 internal prototype to avoid an error.  */
2658/* We use char because int might match the return type of a gcc2
2659    builtin and then its argument prototype would still apply.  */
2660char realpath();
2661
2662int main() {
2663
2664/* The GNU C library defines this for functions which it implements
2665    to always fail with ENOSYS.  Some functions are actually named
2666    something starting with __ and the normal name is an alias.  */
2667#if defined (__stub_realpath) || defined (__stub___realpath)
2668choke me
2669#else
2670realpath();
2671#endif
2672
2673; return 0; }
2674EOF
2675if { (eval echo configure:2676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2676  rm -rf conftest*
2677  eval "ac_cv_func_realpath=yes"
2678else
2679  echo "configure: failed program was:" >&5
2680  cat conftest.$ac_ext >&5
2681  rm -rf conftest*
2682  eval "ac_cv_func_realpath=no"
2683fi
2684rm -f conftest*
2685fi
2686
2687if eval "test \"`echo '$ac_cv_func_'realpath`\" = yes"; then
2688  echo "$ac_t""yes" 1>&6
2689  cat >> confdefs.h <<\EOF
2690#define HAVE_REALPATH 1
2691EOF
2692
2693else
2694  echo "$ac_t""no" 1>&6
2695fi
2696
2697echo $ac_n "checking for hstrerror""... $ac_c" 1>&6
2698echo "configure:2699: checking for hstrerror" >&5
2699if eval "test \"`echo '$''{'ac_cv_func_hstrerror'+set}'`\" = set"; then
2700  echo $ac_n "(cached) $ac_c" 1>&6
2701else
2702  cat > conftest.$ac_ext <<EOF
2703#line 2704 "configure"
2704#include "confdefs.h"
2705/* System header to define __stub macros and hopefully few prototypes,
2706    which can conflict with char hstrerror(); below.  */
2707#include <assert.h>
2708/* Override any gcc2 internal prototype to avoid an error.  */
2709/* We use char because int might match the return type of a gcc2
2710    builtin and then its argument prototype would still apply.  */
2711char hstrerror();
2712
2713int main() {
2714
2715/* The GNU C library defines this for functions which it implements
2716    to always fail with ENOSYS.  Some functions are actually named
2717    something starting with __ and the normal name is an alias.  */
2718#if defined (__stub_hstrerror) || defined (__stub___hstrerror)
2719choke me
2720#else
2721hstrerror();
2722#endif
2723
2724; return 0; }
2725EOF
2726if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2727  rm -rf conftest*
2728  eval "ac_cv_func_hstrerror=yes"
2729else
2730  echo "configure: failed program was:" >&5
2731  cat conftest.$ac_ext >&5
2732  rm -rf conftest*
2733  eval "ac_cv_func_hstrerror=no"
2734fi
2735rm -f conftest*
2736fi
2737
2738if eval "test \"`echo '$ac_cv_func_'hstrerror`\" = yes"; then
2739  echo "$ac_t""yes" 1>&6
2740  cat >> confdefs.h <<\EOF
2741#define HAVE_HSTRERROR 1
2742EOF
2743
2744else
2745  echo "$ac_t""no" 1>&6
2746fi
2747
2748echo $ac_n "checking for strlcpy""... $ac_c" 1>&6
2749echo "configure:2750: checking for strlcpy" >&5
2750if eval "test \"`echo '$''{'ac_cv_func_strlcpy'+set}'`\" = set"; then
2751  echo $ac_n "(cached) $ac_c" 1>&6
2752else
2753  cat > conftest.$ac_ext <<EOF
2754#line 2755 "configure"
2755#include "confdefs.h"
2756/* System header to define __stub macros and hopefully few prototypes,
2757    which can conflict with char strlcpy(); below.  */
2758#include <assert.h>
2759/* Override any gcc2 internal prototype to avoid an error.  */
2760/* We use char because int might match the return type of a gcc2
2761    builtin and then its argument prototype would still apply.  */
2762char strlcpy();
2763
2764int main() {
2765
2766/* The GNU C library defines this for functions which it implements
2767    to always fail with ENOSYS.  Some functions are actually named
2768    something starting with __ and the normal name is an alias.  */
2769#if defined (__stub_strlcpy) || defined (__stub___strlcpy)
2770choke me
2771#else
2772strlcpy();
2773#endif
2774
2775; return 0; }
2776EOF
2777if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2778  rm -rf conftest*
2779  eval "ac_cv_func_strlcpy=yes"
2780else
2781  echo "configure: failed program was:" >&5
2782  cat conftest.$ac_ext >&5
2783  rm -rf conftest*
2784  eval "ac_cv_func_strlcpy=no"
2785fi
2786rm -f conftest*
2787fi
2788
2789if eval "test \"`echo '$ac_cv_func_'strlcpy`\" = yes"; then
2790  echo "$ac_t""yes" 1>&6
2791  cat >> confdefs.h <<\EOF
2792#define HAVE_STRLCPY 1
2793EOF
2794
2795else
2796  echo "$ac_t""no" 1>&6
2797fi
2798
2799echo $ac_n "checking for strlcat""... $ac_c" 1>&6
2800echo "configure:2801: checking for strlcat" >&5
2801if eval "test \"`echo '$''{'ac_cv_func_strlcat'+set}'`\" = set"; then
2802  echo $ac_n "(cached) $ac_c" 1>&6
2803else
2804  cat > conftest.$ac_ext <<EOF
2805#line 2806 "configure"
2806#include "confdefs.h"
2807/* System header to define __stub macros and hopefully few prototypes,
2808    which can conflict with char strlcat(); below.  */
2809#include <assert.h>
2810/* Override any gcc2 internal prototype to avoid an error.  */
2811/* We use char because int might match the return type of a gcc2
2812    builtin and then its argument prototype would still apply.  */
2813char strlcat();
2814
2815int main() {
2816
2817/* The GNU C library defines this for functions which it implements
2818    to always fail with ENOSYS.  Some functions are actually named
2819    something starting with __ and the normal name is an alias.  */
2820#if defined (__stub_strlcat) || defined (__stub___strlcat)
2821choke me
2822#else
2823strlcat();
2824#endif
2825
2826; return 0; }
2827EOF
2828if { (eval echo configure:2829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2829  rm -rf conftest*
2830  eval "ac_cv_func_strlcat=yes"
2831else
2832  echo "configure: failed program was:" >&5
2833  cat conftest.$ac_ext >&5
2834  rm -rf conftest*
2835  eval "ac_cv_func_strlcat=no"
2836fi
2837rm -f conftest*
2838fi
2839
2840if eval "test \"`echo '$ac_cv_func_'strlcat`\" = yes"; then
2841  echo "$ac_t""yes" 1>&6
2842  cat >> confdefs.h <<\EOF
2843#define HAVE_STRLCAT 1
2844EOF
2845
2846else
2847  echo "$ac_t""no" 1>&6
2848fi
2849
2850echo $ac_n "checking for sysctlbyname""... $ac_c" 1>&6
2851echo "configure:2852: checking for sysctlbyname" >&5
2852if eval "test \"`echo '$''{'ac_cv_func_sysctlbyname'+set}'`\" = set"; then
2853  echo $ac_n "(cached) $ac_c" 1>&6
2854else
2855  cat > conftest.$ac_ext <<EOF
2856#line 2857 "configure"
2857#include "confdefs.h"
2858/* System header to define __stub macros and hopefully few prototypes,
2859    which can conflict with char sysctlbyname(); below.  */
2860#include <assert.h>
2861/* Override any gcc2 internal prototype to avoid an error.  */
2862/* We use char because int might match the return type of a gcc2
2863    builtin and then its argument prototype would still apply.  */
2864char sysctlbyname();
2865
2866int main() {
2867
2868/* The GNU C library defines this for functions which it implements
2869    to always fail with ENOSYS.  Some functions are actually named
2870    something starting with __ and the normal name is an alias.  */
2871#if defined (__stub_sysctlbyname) || defined (__stub___sysctlbyname)
2872choke me
2873#else
2874sysctlbyname();
2875#endif
2876
2877; return 0; }
2878EOF
2879if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2880  rm -rf conftest*
2881  eval "ac_cv_func_sysctlbyname=yes"
2882else
2883  echo "configure: failed program was:" >&5
2884  cat conftest.$ac_ext >&5
2885  rm -rf conftest*
2886  eval "ac_cv_func_sysctlbyname=no"
2887fi
2888rm -f conftest*
2889fi
2890
2891if eval "test \"`echo '$ac_cv_func_'sysctlbyname`\" = yes"; then
2892  echo "$ac_t""yes" 1>&6
2893  cat >> confdefs.h <<\EOF
2894#define HAVE_SYSCTLBYNAME 1
2895EOF
2896
2897else
2898  echo "$ac_t""no" 1>&6
2899fi
2900
2901echo $ac_n "checking for getservbyport""... $ac_c" 1>&6
2902echo "configure:2903: checking for getservbyport" >&5
2903if eval "test \"`echo '$''{'ac_cv_func_getservbyport'+set}'`\" = set"; then
2904  echo $ac_n "(cached) $ac_c" 1>&6
2905else
2906  cat > conftest.$ac_ext <<EOF
2907#line 2908 "configure"
2908#include "confdefs.h"
2909/* System header to define __stub macros and hopefully few prototypes,
2910    which can conflict with char getservbyport(); below.  */
2911#include <assert.h>
2912/* Override any gcc2 internal prototype to avoid an error.  */
2913/* We use char because int might match the return type of a gcc2
2914    builtin and then its argument prototype would still apply.  */
2915char getservbyport();
2916
2917int main() {
2918
2919/* The GNU C library defines this for functions which it implements
2920    to always fail with ENOSYS.  Some functions are actually named
2921    something starting with __ and the normal name is an alias.  */
2922#if defined (__stub_getservbyport) || defined (__stub___getservbyport)
2923choke me
2924#else
2925getservbyport();
2926#endif
2927
2928; return 0; }
2929EOF
2930if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2931  rm -rf conftest*
2932  eval "ac_cv_func_getservbyport=yes"
2933else
2934  echo "configure: failed program was:" >&5
2935  cat conftest.$ac_ext >&5
2936  rm -rf conftest*
2937  eval "ac_cv_func_getservbyport=no"
2938fi
2939rm -f conftest*
2940fi
2941
2942if eval "test \"`echo '$ac_cv_func_'getservbyport`\" = yes"; then
2943  echo "$ac_t""yes" 1>&6
2944  cat >> confdefs.h <<\EOF
2945#define HAVE_GETSERVBYPORT 1
2946EOF
2947
2948else
2949  echo "$ac_t""no" 1>&6
2950fi
2951
2952echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
2953echo "configure:2954: checking for getaddrinfo" >&5
2954if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then
2955  echo $ac_n "(cached) $ac_c" 1>&6
2956else
2957  cat > conftest.$ac_ext <<EOF
2958#line 2959 "configure"
2959#include "confdefs.h"
2960/* System header to define __stub macros and hopefully few prototypes,
2961    which can conflict with char getaddrinfo(); below.  */
2962#include <assert.h>
2963/* Override any gcc2 internal prototype to avoid an error.  */
2964/* We use char because int might match the return type of a gcc2
2965    builtin and then its argument prototype would still apply.  */
2966char getaddrinfo();
2967
2968int main() {
2969
2970/* The GNU C library defines this for functions which it implements
2971    to always fail with ENOSYS.  Some functions are actually named
2972    something starting with __ and the normal name is an alias.  */
2973#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
2974choke me
2975#else
2976getaddrinfo();
2977#endif
2978
2979; return 0; }
2980EOF
2981if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2982  rm -rf conftest*
2983  eval "ac_cv_func_getaddrinfo=yes"
2984else
2985  echo "configure: failed program was:" >&5
2986  cat conftest.$ac_ext >&5
2987  rm -rf conftest*
2988  eval "ac_cv_func_getaddrinfo=no"
2989fi
2990rm -f conftest*
2991fi
2992
2993if eval "test \"`echo '$ac_cv_func_'getaddrinfo`\" = yes"; then
2994  echo "$ac_t""yes" 1>&6
2995  cat >> confdefs.h <<\EOF
2996#define HAVE_GETADDRINFO 1
2997EOF
2998
2999else
3000  echo "$ac_t""no" 1>&6
3001fi
3002
3003echo $ac_n "checking for getnameinfo""... $ac_c" 1>&6
3004echo "configure:3005: checking for getnameinfo" >&5
3005if eval "test \"`echo '$''{'ac_cv_func_getnameinfo'+set}'`\" = set"; then
3006  echo $ac_n "(cached) $ac_c" 1>&6
3007else
3008  cat > conftest.$ac_ext <<EOF
3009#line 3010 "configure"
3010#include "confdefs.h"
3011/* System header to define __stub macros and hopefully few prototypes,
3012    which can conflict with char getnameinfo(); below.  */
3013#include <assert.h>
3014/* Override any gcc2 internal prototype to avoid an error.  */
3015/* We use char because int might match the return type of a gcc2
3016    builtin and then its argument prototype would still apply.  */
3017char getnameinfo();
3018
3019int main() {
3020
3021/* The GNU C library defines this for functions which it implements
3022    to always fail with ENOSYS.  Some functions are actually named
3023    something starting with __ and the normal name is an alias.  */
3024#if defined (__stub_getnameinfo) || defined (__stub___getnameinfo)
3025choke me
3026#else
3027getnameinfo();
3028#endif
3029
3030; return 0; }
3031EOF
3032if { (eval echo configure:3033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3033  rm -rf conftest*
3034  eval "ac_cv_func_getnameinfo=yes"
3035else
3036  echo "configure: failed program was:" >&5
3037  cat conftest.$ac_ext >&5
3038  rm -rf conftest*
3039  eval "ac_cv_func_getnameinfo=no"
3040fi
3041rm -f conftest*
3042fi
3043
3044if eval "test \"`echo '$ac_cv_func_'getnameinfo`\" = yes"; then
3045  echo "$ac_t""yes" 1>&6
3046  cat >> confdefs.h <<\EOF
3047#define HAVE_GETNAMEINFO 1
3048EOF
3049
3050else
3051  echo "$ac_t""no" 1>&6
3052fi
3053
3054echo $ac_n "checking for clock_gettime""... $ac_c" 1>&6
3055echo "configure:3056: checking for clock_gettime" >&5
3056if eval "test \"`echo '$''{'ac_cv_func_clock_gettime'+set}'`\" = set"; then
3057  echo $ac_n "(cached) $ac_c" 1>&6
3058else
3059  cat > conftest.$ac_ext <<EOF
3060#line 3061 "configure"
3061#include "confdefs.h"
3062/* System header to define __stub macros and hopefully few prototypes,
3063    which can conflict with char clock_gettime(); below.  */
3064#include <assert.h>
3065/* Override any gcc2 internal prototype to avoid an error.  */
3066/* We use char because int might match the return type of a gcc2
3067    builtin and then its argument prototype would still apply.  */
3068char clock_gettime();
3069
3070int main() {
3071
3072/* The GNU C library defines this for functions which it implements
3073    to always fail with ENOSYS.  Some functions are actually named
3074    something starting with __ and the normal name is an alias.  */
3075#if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
3076choke me
3077#else
3078clock_gettime();
3079#endif
3080
3081; return 0; }
3082EOF
3083if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3084  rm -rf conftest*
3085  eval "ac_cv_func_clock_gettime=yes"
3086else
3087  echo "configure: failed program was:" >&5
3088  cat conftest.$ac_ext >&5
3089  rm -rf conftest*
3090  eval "ac_cv_func_clock_gettime=no"
3091fi
3092rm -f conftest*
3093fi
3094
3095if eval "test \"`echo '$ac_cv_func_'clock_gettime`\" = yes"; then
3096  echo "$ac_t""yes" 1>&6
3097  cat >> confdefs.h <<\EOF
3098#define HAVE_CLOCK_GETTIME 1
3099EOF
3100
3101else
3102  echo "$ac_t""no" 1>&6
3103fi
3104
3105echo $ac_n "checking for atoll""... $ac_c" 1>&6
3106echo "configure:3107: checking for atoll" >&5
3107if eval "test \"`echo '$''{'ac_cv_func_atoll'+set}'`\" = set"; then
3108  echo $ac_n "(cached) $ac_c" 1>&6
3109else
3110  cat > conftest.$ac_ext <<EOF
3111#line 3112 "configure"
3112#include "confdefs.h"
3113/* System header to define __stub macros and hopefully few prototypes,
3114    which can conflict with char atoll(); below.  */
3115#include <assert.h>
3116/* Override any gcc2 internal prototype to avoid an error.  */
3117/* We use char because int might match the return type of a gcc2
3118    builtin and then its argument prototype would still apply.  */
3119char atoll();
3120
3121int main() {
3122
3123/* The GNU C library defines this for functions which it implements
3124    to always fail with ENOSYS.  Some functions are actually named
3125    something starting with __ and the normal name is an alias.  */
3126#if defined (__stub_atoll) || defined (__stub___atoll)
3127choke me
3128#else
3129atoll();
3130#endif
3131
3132; return 0; }
3133EOF
3134if { (eval echo configure:3135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3135  rm -rf conftest*
3136  eval "ac_cv_func_atoll=yes"
3137else
3138  echo "configure: failed program was:" >&5
3139  cat conftest.$ac_ext >&5
3140  rm -rf conftest*
3141  eval "ac_cv_func_atoll=no"
3142fi
3143rm -f conftest*
3144fi
3145
3146if eval "test \"`echo '$ac_cv_func_'atoll`\" = yes"; then
3147  echo "$ac_t""yes" 1>&6
3148  cat >> confdefs.h <<\EOF
3149#define HAVE_ATOLL 1
3150EOF
3151
3152else
3153  echo "$ac_t""no" 1>&6
3154fi
3155
3156echo $ac_n "checking for strtoll""... $ac_c" 1>&6
3157echo "configure:3158: checking for strtoll" >&5
3158if eval "test \"`echo '$''{'ac_cv_func_strtoll'+set}'`\" = set"; then
3159  echo $ac_n "(cached) $ac_c" 1>&6
3160else
3161  cat > conftest.$ac_ext <<EOF
3162#line 3163 "configure"
3163#include "confdefs.h"
3164/* System header to define __stub macros and hopefully few prototypes,
3165    which can conflict with char strtoll(); below.  */
3166#include <assert.h>
3167/* Override any gcc2 internal prototype to avoid an error.  */
3168/* We use char because int might match the return type of a gcc2
3169    builtin and then its argument prototype would still apply.  */
3170char strtoll();
3171
3172int main() {
3173
3174/* The GNU C library defines this for functions which it implements
3175    to always fail with ENOSYS.  Some functions are actually named
3176    something starting with __ and the normal name is an alias.  */
3177#if defined (__stub_strtoll) || defined (__stub___strtoll)
3178choke me
3179#else
3180strtoll();
3181#endif
3182
3183; return 0; }
3184EOF
3185if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3186  rm -rf conftest*
3187  eval "ac_cv_func_strtoll=yes"
3188else
3189  echo "configure: failed program was:" >&5
3190  cat conftest.$ac_ext >&5
3191  rm -rf conftest*
3192  eval "ac_cv_func_strtoll=no"
3193fi
3194rm -f conftest*
3195fi
3196
3197if eval "test \"`echo '$ac_cv_func_'strtoll`\" = yes"; then
3198  echo "$ac_t""yes" 1>&6
3199  cat >> confdefs.h <<\EOF
3200#define HAVE_STRTOLL 1
3201EOF
3202
3203else
3204  echo "$ac_t""no" 1>&6
3205fi
3206
3207echo $ac_n "checking for atoq""... $ac_c" 1>&6
3208echo "configure:3209: checking for atoq" >&5
3209if eval "test \"`echo '$''{'ac_cv_func_atoq'+set}'`\" = set"; then
3210  echo $ac_n "(cached) $ac_c" 1>&6
3211else
3212  cat > conftest.$ac_ext <<EOF
3213#line 3214 "configure"
3214#include "confdefs.h"
3215/* System header to define __stub macros and hopefully few prototypes,
3216    which can conflict with char atoq(); below.  */
3217#include <assert.h>
3218/* Override any gcc2 internal prototype to avoid an error.  */
3219/* We use char because int might match the return type of a gcc2
3220    builtin and then its argument prototype would still apply.  */
3221char atoq();
3222
3223int main() {
3224
3225/* The GNU C library defines this for functions which it implements
3226    to always fail with ENOSYS.  Some functions are actually named
3227    something starting with __ and the normal name is an alias.  */
3228#if defined (__stub_atoq) || defined (__stub___atoq)
3229choke me
3230#else
3231atoq();
3232#endif
3233
3234; return 0; }
3235EOF
3236if { (eval echo configure:3237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3237  rm -rf conftest*
3238  eval "ac_cv_func_atoq=yes"
3239else
3240  echo "configure: failed program was:" >&5
3241  cat conftest.$ac_ext >&5
3242  rm -rf conftest*
3243  eval "ac_cv_func_atoq=no"
3244fi
3245rm -f conftest*
3246fi
3247
3248if eval "test \"`echo '$ac_cv_func_'atoq`\" = yes"; then
3249  echo "$ac_t""yes" 1>&6
3250  cat >> confdefs.h <<\EOF
3251#define HAVE_ATOQ 1
3252EOF
3253
3254else
3255  echo "$ac_t""no" 1>&6
3256fi
3257
3258echo $ac_n "checking for finite""... $ac_c" 1>&6
3259echo "configure:3260: checking for finite" >&5
3260if eval "test \"`echo '$''{'ac_cv_func_finite'+set}'`\" = set"; then
3261  echo $ac_n "(cached) $ac_c" 1>&6
3262else
3263  cat > conftest.$ac_ext <<EOF
3264#line 3265 "configure"
3265#include "confdefs.h"
3266/* System header to define __stub macros and hopefully few prototypes,
3267    which can conflict with char finite(); below.  */
3268#include <assert.h>
3269/* Override any gcc2 internal prototype to avoid an error.  */
3270/* We use char because int might match the return type of a gcc2
3271    builtin and then its argument prototype would still apply.  */
3272char finite();
3273
3274int main() {
3275
3276/* The GNU C library defines this for functions which it implements
3277    to always fail with ENOSYS.  Some functions are actually named
3278    something starting with __ and the normal name is an alias.  */
3279#if defined (__stub_finite) || defined (__stub___finite)
3280choke me
3281#else
3282finite();
3283#endif
3284
3285; return 0; }
3286EOF
3287if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3288  rm -rf conftest*
3289  eval "ac_cv_func_finite=yes"
3290else
3291  echo "configure: failed program was:" >&5
3292  cat conftest.$ac_ext >&5
3293  rm -rf conftest*
3294  eval "ac_cv_func_finite=no"
3295fi
3296rm -f conftest*
3297fi
3298
3299if eval "test \"`echo '$ac_cv_func_'finite`\" = yes"; then
3300  echo "$ac_t""yes" 1>&6
3301  cat >> confdefs.h <<\EOF
3302#define HAVE_FINITE 1
3303EOF
3304
3305else
3306  echo "$ac_t""no" 1>&6
3307fi
3308
3309echo $ac_n "checking for isfinite""... $ac_c" 1>&6
3310echo "configure:3311: checking for isfinite" >&5
3311if eval "test \"`echo '$''{'ac_cv_func_isfinite'+set}'`\" = set"; then
3312  echo $ac_n "(cached) $ac_c" 1>&6
3313else
3314  cat > conftest.$ac_ext <<EOF
3315#line 3316 "configure"
3316#include "confdefs.h"
3317/* System header to define __stub macros and hopefully few prototypes,
3318    which can conflict with char isfinite(); below.  */
3319#include <assert.h>
3320/* Override any gcc2 internal prototype to avoid an error.  */
3321/* We use char because int might match the return type of a gcc2
3322    builtin and then its argument prototype would still apply.  */
3323char isfinite();
3324
3325int main() {
3326
3327/* The GNU C library defines this for functions which it implements
3328    to always fail with ENOSYS.  Some functions are actually named
3329    something starting with __ and the normal name is an alias.  */
3330#if defined (__stub_isfinite) || defined (__stub___isfinite)
3331choke me
3332#else
3333isfinite();
3334#endif
3335
3336; return 0; }
3337EOF
3338if { (eval echo configure:3339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3339  rm -rf conftest*
3340  eval "ac_cv_func_isfinite=yes"
3341else
3342  echo "configure: failed program was:" >&5
3343  cat conftest.$ac_ext >&5
3344  rm -rf conftest*
3345  eval "ac_cv_func_isfinite=no"
3346fi
3347rm -f conftest*
3348fi
3349
3350if eval "test \"`echo '$ac_cv_func_'isfinite`\" = yes"; then
3351  echo "$ac_t""yes" 1>&6
3352  cat >> confdefs.h <<\EOF
3353#define HAVE_ISFINITE 1
3354EOF
3355
3356else
3357  echo "$ac_t""no" 1>&6
3358fi
3359
3360echo $ac_n "checking for tparm""... $ac_c" 1>&6
3361echo "configure:3362: checking for tparm" >&5
3362if eval "test \"`echo '$''{'ac_cv_func_tparm'+set}'`\" = set"; then
3363  echo $ac_n "(cached) $ac_c" 1>&6
3364else
3365  cat > conftest.$ac_ext <<EOF
3366#line 3367 "configure"
3367#include "confdefs.h"
3368/* System header to define __stub macros and hopefully few prototypes,
3369    which can conflict with char tparm(); below.  */
3370#include <assert.h>
3371/* Override any gcc2 internal prototype to avoid an error.  */
3372/* We use char because int might match the return type of a gcc2
3373    builtin and then its argument prototype would still apply.  */
3374char tparm();
3375
3376int main() {
3377
3378/* The GNU C library defines this for functions which it implements
3379    to always fail with ENOSYS.  Some functions are actually named
3380    something starting with __ and the normal name is an alias.  */
3381#if defined (__stub_tparm) || defined (__stub___tparm)
3382choke me
3383#else
3384tparm();
3385#endif
3386
3387; return 0; }
3388EOF
3389if { (eval echo configure:3390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3390  rm -rf conftest*
3391  eval "ac_cv_func_tparm=yes"
3392else
3393  echo "configure: failed program was:" >&5
3394  cat conftest.$ac_ext >&5
3395  rm -rf conftest*
3396  eval "ac_cv_func_tparm=no"
3397fi
3398rm -f conftest*
3399fi
3400
3401if eval "test \"`echo '$ac_cv_func_'tparm`\" = yes"; then
3402  echo "$ac_t""yes" 1>&6
3403  cat >> confdefs.h <<\EOF
3404#define HAVE_TPARM 1
3405EOF
3406
3407else
3408  echo "$ac_t""no" 1>&6
3409fi
3410
3411
3412echo $ac_n "checking whether term.h works by itself""... $ac_c" 1>&6
3413echo "configure:3414: checking whether term.h works by itself" >&5
3414if test "$cross_compiling" = yes; then
3415  :
3416else
3417  cat > conftest.$ac_ext <<EOF
3418#line 3419 "configure"
3419#include "confdefs.h"
3420
3421#include <term.h>
3422
3423main ()
3424{
3425	exit(0);
3426}
3427
3428EOF
3429if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3430then
3431  echo "$ac_t""yes" 1>&6
3432else
3433  echo "configure: failed program was:" >&5
3434  cat conftest.$ac_ext >&5
3435  rm -fr conftest*
3436  echo "$ac_t""no" 1>&6
3437  echo $ac_n "checking whether term.h requires termio.h and curses.h""... $ac_c" 1>&6
3438echo "configure:3439: checking whether term.h requires termio.h and curses.h" >&5
3439  if test "$cross_compiling" = yes; then
3440  :
3441else
3442  cat > conftest.$ac_ext <<EOF
3443#line 3444 "configure"
3444#include "confdefs.h"
3445
3446#include <termio.h>
3447#include <curses.h>
3448#include <term.h>
3449
3450main ()
3451{
3452	exit(0);
3453}
3454  
3455EOF
3456if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3457then
3458  echo "$ac_t""yes" 1>&6
3459  cat >> confdefs.h <<\EOF
3460#define TERM_H_REQUIRES_CURSES_H 1
3461EOF
3462
3463else
3464  echo "configure: failed program was:" >&5
3465  cat conftest.$ac_ext >&5
3466  rm -fr conftest*
3467  echo "$ac_t""no" 1>&6
3468  cat >> confdefs.h <<\EOF
3469#define DONT_USE_TERM_H 1
3470EOF
3471
3472fi
3473rm -fr conftest*
3474fi
3475
3476fi
3477rm -fr conftest*
3478fi
3479
3480
3481echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3482echo "configure:3483: checking for ANSI C header files" >&5
3483if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3484  echo $ac_n "(cached) $ac_c" 1>&6
3485else
3486  cat > conftest.$ac_ext <<EOF
3487#line 3488 "configure"
3488#include "confdefs.h"
3489#include <stdlib.h>
3490#include <stdarg.h>
3491#include <string.h>
3492#include <float.h>
3493EOF
3494ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3495{ (eval echo configure:3496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3496ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3497if test -z "$ac_err"; then
3498  rm -rf conftest*
3499  ac_cv_header_stdc=yes
3500else
3501  echo "$ac_err" >&5
3502  echo "configure: failed program was:" >&5
3503  cat conftest.$ac_ext >&5
3504  rm -rf conftest*
3505  ac_cv_header_stdc=no
3506fi
3507rm -f conftest*
3508
3509if test $ac_cv_header_stdc = yes; then
3510  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3511cat > conftest.$ac_ext <<EOF
3512#line 3513 "configure"
3513#include "confdefs.h"
3514#include <string.h>
3515EOF
3516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3517  egrep "memchr" >/dev/null 2>&1; then
3518  :
3519else
3520  rm -rf conftest*
3521  ac_cv_header_stdc=no
3522fi
3523rm -f conftest*
3524
3525fi
3526
3527if test $ac_cv_header_stdc = yes; then
3528  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3529cat > conftest.$ac_ext <<EOF
3530#line 3531 "configure"
3531#include "confdefs.h"
3532#include <stdlib.h>
3533EOF
3534if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3535  egrep "free" >/dev/null 2>&1; then
3536  :
3537else
3538  rm -rf conftest*
3539  ac_cv_header_stdc=no
3540fi
3541rm -f conftest*
3542
3543fi
3544
3545if test $ac_cv_header_stdc = yes; then
3546  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3547if test "$cross_compiling" = yes; then
3548  :
3549else
3550  cat > conftest.$ac_ext <<EOF
3551#line 3552 "configure"
3552#include "confdefs.h"
3553#include <ctype.h>
3554#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3555#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3556#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3557int main () { int i; for (i = 0; i < 256; i++)
3558if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3559exit (0); }
3560
3561EOF
3562if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3563then
3564  :
3565else
3566  echo "configure: failed program was:" >&5
3567  cat conftest.$ac_ext >&5
3568  rm -fr conftest*
3569  ac_cv_header_stdc=no
3570fi
3571rm -fr conftest*
3572fi
3573
3574fi
3575fi
3576
3577echo "$ac_t""$ac_cv_header_stdc" 1>&6
3578if test $ac_cv_header_stdc = yes; then
3579  cat >> confdefs.h <<\EOF
3580#define STDC_HEADERS 1
3581EOF
3582
3583fi
3584
3585echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3586echo "configure:3587: checking whether time.h and sys/time.h may both be included" >&5
3587if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3588  echo $ac_n "(cached) $ac_c" 1>&6
3589else
3590  cat > conftest.$ac_ext <<EOF
3591#line 3592 "configure"
3592#include "confdefs.h"
3593#include <sys/types.h>
3594#include <sys/time.h>
3595#include <time.h>
3596int main() {
3597struct tm *tp;
3598; return 0; }
3599EOF
3600if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3601  rm -rf conftest*
3602  ac_cv_header_time=yes
3603else
3604  echo "configure: failed program was:" >&5
3605  cat conftest.$ac_ext >&5
3606  rm -rf conftest*
3607  ac_cv_header_time=no
3608fi
3609rm -f conftest*
3610fi
3611
3612echo "$ac_t""$ac_cv_header_time" 1>&6
3613if test $ac_cv_header_time = yes; then
3614  cat >> confdefs.h <<\EOF
3615#define TIME_WITH_SYS_TIME 1
3616EOF
3617
3618fi
3619
3620ac_header_dirent=no
3621for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3622do
3623ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3624echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3625echo "configure:3626: checking for $ac_hdr that defines DIR" >&5
3626if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3627  echo $ac_n "(cached) $ac_c" 1>&6
3628else
3629  cat > conftest.$ac_ext <<EOF
3630#line 3631 "configure"
3631#include "confdefs.h"
3632#include <sys/types.h>
3633#include <$ac_hdr>
3634int main() {
3635DIR *dirp = 0;
3636; return 0; }
3637EOF
3638if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3639  rm -rf conftest*
3640  eval "ac_cv_header_dirent_$ac_safe=yes"
3641else
3642  echo "configure: failed program was:" >&5
3643  cat conftest.$ac_ext >&5
3644  rm -rf conftest*
3645  eval "ac_cv_header_dirent_$ac_safe=no"
3646fi
3647rm -f conftest*
3648fi
3649if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3650  echo "$ac_t""yes" 1>&6
3651    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3652  cat >> confdefs.h <<EOF
3653#define $ac_tr_hdr 1
3654EOF
3655 ac_header_dirent=$ac_hdr; break
3656else
3657  echo "$ac_t""no" 1>&6
3658fi
3659done
3660# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3661if test $ac_header_dirent = dirent.h; then
3662echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3663echo "configure:3664: checking for opendir in -ldir" >&5
3664ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3665if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3666  echo $ac_n "(cached) $ac_c" 1>&6
3667else
3668  ac_save_LIBS="$LIBS"
3669LIBS="-ldir  $LIBS"
3670cat > conftest.$ac_ext <<EOF
3671#line 3672 "configure"
3672#include "confdefs.h"
3673/* Override any gcc2 internal prototype to avoid an error.  */
3674/* We use char because int might match the return type of a gcc2
3675    builtin and then its argument prototype would still apply.  */
3676char opendir();
3677
3678int main() {
3679opendir()
3680; return 0; }
3681EOF
3682if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3683  rm -rf conftest*
3684  eval "ac_cv_lib_$ac_lib_var=yes"
3685else
3686  echo "configure: failed program was:" >&5
3687  cat conftest.$ac_ext >&5
3688  rm -rf conftest*
3689  eval "ac_cv_lib_$ac_lib_var=no"
3690fi
3691rm -f conftest*
3692LIBS="$ac_save_LIBS"
3693
3694fi
3695if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3696  echo "$ac_t""yes" 1>&6
3697  LIBS="$LIBS -ldir"
3698else
3699  echo "$ac_t""no" 1>&6
3700fi
3701
3702else
3703echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3704echo "configure:3705: checking for opendir in -lx" >&5
3705ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3706if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3707  echo $ac_n "(cached) $ac_c" 1>&6
3708else
3709  ac_save_LIBS="$LIBS"
3710LIBS="-lx  $LIBS"
3711cat > conftest.$ac_ext <<EOF
3712#line 3713 "configure"
3713#include "confdefs.h"
3714/* Override any gcc2 internal prototype to avoid an error.  */
3715/* We use char because int might match the return type of a gcc2
3716    builtin and then its argument prototype would still apply.  */
3717char opendir();
3718
3719int main() {
3720opendir()
3721; return 0; }
3722EOF
3723if { (eval echo configure:3724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3724  rm -rf conftest*
3725  eval "ac_cv_lib_$ac_lib_var=yes"
3726else
3727  echo "configure: failed program was:" >&5
3728  cat conftest.$ac_ext >&5
3729  rm -rf conftest*
3730  eval "ac_cv_lib_$ac_lib_var=no"
3731fi
3732rm -f conftest*
3733LIBS="$ac_save_LIBS"
3734
3735fi
3736if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3737  echo "$ac_t""yes" 1>&6
3738  LIBS="$LIBS -lx"
3739else
3740  echo "$ac_t""no" 1>&6
3741fi
3742
3743fi
3744
3745echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3746echo "configure:3747: checking return type of signal handlers" >&5
3747if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3748  echo $ac_n "(cached) $ac_c" 1>&6
3749else
3750  cat > conftest.$ac_ext <<EOF
3751#line 3752 "configure"
3752#include "confdefs.h"
3753#include <sys/types.h>
3754#include <signal.h>
3755#ifdef signal
3756#undef signal
3757#endif
3758#ifdef __cplusplus
3759extern "C" void (*signal (int, void (*)(int)))(int);
3760#else
3761void (*signal ()) ();
3762#endif
3763
3764int main() {
3765int i;
3766; return 0; }
3767EOF
3768if { (eval echo configure:3769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3769  rm -rf conftest*
3770  ac_cv_type_signal=void
3771else
3772  echo "configure: failed program was:" >&5
3773  cat conftest.$ac_ext >&5
3774  rm -rf conftest*
3775  ac_cv_type_signal=int
3776fi
3777rm -f conftest*
3778fi
3779
3780echo "$ac_t""$ac_cv_type_signal" 1>&6
3781cat >> confdefs.h <<EOF
3782#define RETSIGTYPE $ac_cv_type_signal
3783EOF
3784
3785
3786echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3787echo "configure:3788: checking for mode_t" >&5
3788if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3789  echo $ac_n "(cached) $ac_c" 1>&6
3790else
3791  cat > conftest.$ac_ext <<EOF
3792#line 3793 "configure"
3793#include "confdefs.h"
3794#include <sys/types.h>
3795#if STDC_HEADERS
3796#include <stdlib.h>
3797#include <stddef.h>
3798#endif
3799EOF
3800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3801  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3802  rm -rf conftest*
3803  ac_cv_type_mode_t=yes
3804else
3805  rm -rf conftest*
3806  ac_cv_type_mode_t=no
3807fi
3808rm -f conftest*
3809
3810fi
3811echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3812if test $ac_cv_type_mode_t = no; then
3813  cat >> confdefs.h <<\EOF
3814#define mode_t int
3815EOF
3816
3817fi
3818
3819echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3820echo "configure:3821: checking for pid_t" >&5
3821if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3822  echo $ac_n "(cached) $ac_c" 1>&6
3823else
3824  cat > conftest.$ac_ext <<EOF
3825#line 3826 "configure"
3826#include "confdefs.h"
3827#include <sys/types.h>
3828#if STDC_HEADERS
3829#include <stdlib.h>
3830#include <stddef.h>
3831#endif
3832EOF
3833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3834  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3835  rm -rf conftest*
3836  ac_cv_type_pid_t=yes
3837else
3838  rm -rf conftest*
3839  ac_cv_type_pid_t=no
3840fi
3841rm -f conftest*
3842
3843fi
3844echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3845if test $ac_cv_type_pid_t = no; then
3846  cat >> confdefs.h <<\EOF
3847#define pid_t int
3848EOF
3849
3850fi
3851
3852echo $ac_n "checking for size_t""... $ac_c" 1>&6
3853echo "configure:3854: checking for size_t" >&5
3854if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3855  echo $ac_n "(cached) $ac_c" 1>&6
3856else
3857  cat > conftest.$ac_ext <<EOF
3858#line 3859 "configure"
3859#include "confdefs.h"
3860#include <sys/types.h>
3861#if STDC_HEADERS
3862#include <stdlib.h>
3863#include <stddef.h>
3864#endif
3865EOF
3866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3867  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3868  rm -rf conftest*
3869  ac_cv_type_size_t=yes
3870else
3871  rm -rf conftest*
3872  ac_cv_type_size_t=no
3873fi
3874rm -f conftest*
3875
3876fi
3877echo "$ac_t""$ac_cv_type_size_t" 1>&6
3878if test $ac_cv_type_size_t = no; then
3879  cat >> confdefs.h <<\EOF
3880#define size_t unsigned
3881EOF
3882
3883fi
3884
3885echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3886echo "configure:3887: checking for uid_t in sys/types.h" >&5
3887if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3888  echo $ac_n "(cached) $ac_c" 1>&6
3889else
3890  cat > conftest.$ac_ext <<EOF
3891#line 3892 "configure"
3892#include "confdefs.h"
3893#include <sys/types.h>
3894EOF
3895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3896  egrep "uid_t" >/dev/null 2>&1; then
3897  rm -rf conftest*
3898  ac_cv_type_uid_t=yes
3899else
3900  rm -rf conftest*
3901  ac_cv_type_uid_t=no
3902fi
3903rm -f conftest*
3904
3905fi
3906
3907echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3908if test $ac_cv_type_uid_t = no; then
3909  cat >> confdefs.h <<\EOF
3910#define uid_t int
3911EOF
3912
3913  cat >> confdefs.h <<\EOF
3914#define gid_t int
3915EOF
3916
3917fi
3918
3919# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3920# for constant arguments.  Useless!
3921echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3922echo "configure:3923: checking for working alloca.h" >&5
3923if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3924  echo $ac_n "(cached) $ac_c" 1>&6
3925else
3926  cat > conftest.$ac_ext <<EOF
3927#line 3928 "configure"
3928#include "confdefs.h"
3929#include <alloca.h>
3930int main() {
3931char *p = alloca(2 * sizeof(int));
3932; return 0; }
3933EOF
3934if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3935  rm -rf conftest*
3936  ac_cv_header_alloca_h=yes
3937else
3938  echo "configure: failed program was:" >&5
3939  cat conftest.$ac_ext >&5
3940  rm -rf conftest*
3941  ac_cv_header_alloca_h=no
3942fi
3943rm -f conftest*
3944fi
3945
3946echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3947if test $ac_cv_header_alloca_h = yes; then
3948  cat >> confdefs.h <<\EOF
3949#define HAVE_ALLOCA_H 1
3950EOF
3951
3952fi
3953
3954echo $ac_n "checking for alloca""... $ac_c" 1>&6
3955echo "configure:3956: checking for alloca" >&5
3956if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3957  echo $ac_n "(cached) $ac_c" 1>&6
3958else
3959  cat > conftest.$ac_ext <<EOF
3960#line 3961 "configure"
3961#include "confdefs.h"
3962
3963#ifdef __GNUC__
3964# define alloca __builtin_alloca
3965#else
3966# ifdef _MSC_VER
3967#  include <malloc.h>
3968#  define alloca _alloca
3969# else
3970#  if HAVE_ALLOCA_H
3971#   include <alloca.h>
3972#  else
3973#   ifdef _AIX
3974 #pragma alloca
3975#   else
3976#    ifndef alloca /* predefined by HP cc +Olibcalls */
3977char *alloca ();
3978#    endif
3979#   endif
3980#  endif
3981# endif
3982#endif
3983
3984int main() {
3985char *p = (char *) alloca(1);
3986; return 0; }
3987EOF
3988if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3989  rm -rf conftest*
3990  ac_cv_func_alloca_works=yes
3991else
3992  echo "configure: failed program was:" >&5
3993  cat conftest.$ac_ext >&5
3994  rm -rf conftest*
3995  ac_cv_func_alloca_works=no
3996fi
3997rm -f conftest*
3998fi
3999
4000echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4001if test $ac_cv_func_alloca_works = yes; then
4002  cat >> confdefs.h <<\EOF
4003#define HAVE_ALLOCA 1
4004EOF
4005
4006fi
4007
4008if test $ac_cv_func_alloca_works = no; then
4009  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4010  # that cause trouble.  Some versions do not even contain alloca or
4011  # contain a buggy version.  If you still want to use their alloca,
4012  # use ar to extract alloca.o from them instead of compiling alloca.c.
4013  ALLOCA=alloca.${ac_objext}
4014  cat >> confdefs.h <<\EOF
4015#define C_ALLOCA 1
4016EOF
4017
4018
4019echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4020echo "configure:4021: checking whether alloca needs Cray hooks" >&5
4021if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4022  echo $ac_n "(cached) $ac_c" 1>&6
4023else
4024  cat > conftest.$ac_ext <<EOF
4025#line 4026 "configure"
4026#include "confdefs.h"
4027#if defined(CRAY) && ! defined(CRAY2)
4028webecray
4029#else
4030wenotbecray
4031#endif
4032
4033EOF
4034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4035  egrep "webecray" >/dev/null 2>&1; then
4036  rm -rf conftest*
4037  ac_cv_os_cray=yes
4038else
4039  rm -rf conftest*
4040  ac_cv_os_cray=no
4041fi
4042rm -f conftest*
4043
4044fi
4045
4046echo "$ac_t""$ac_cv_os_cray" 1>&6
4047if test $ac_cv_os_cray = yes; then
4048for ac_func in _getb67 GETB67 getb67; do
4049  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4050echo "configure:4051: checking for $ac_func" >&5
4051if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4052  echo $ac_n "(cached) $ac_c" 1>&6
4053else
4054  cat > conftest.$ac_ext <<EOF
4055#line 4056 "configure"
4056#include "confdefs.h"
4057/* System header to define __stub macros and hopefully few prototypes,
4058    which can conflict with char $ac_func(); below.  */
4059#include <assert.h>
4060/* Override any gcc2 internal prototype to avoid an error.  */
4061/* We use char because int might match the return type of a gcc2
4062    builtin and then its argument prototype would still apply.  */
4063char $ac_func();
4064
4065int main() {
4066
4067/* The GNU C library defines this for functions which it implements
4068    to always fail with ENOSYS.  Some functions are actually named
4069    something starting with __ and the normal name is an alias.  */
4070#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4071choke me
4072#else
4073$ac_func();
4074#endif
4075
4076; return 0; }
4077EOF
4078if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4079  rm -rf conftest*
4080  eval "ac_cv_func_$ac_func=yes"
4081else
4082  echo "configure: failed program was:" >&5
4083  cat conftest.$ac_ext >&5
4084  rm -rf conftest*
4085  eval "ac_cv_func_$ac_func=no"
4086fi
4087rm -f conftest*
4088fi
4089
4090if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4091  echo "$ac_t""yes" 1>&6
4092  cat >> confdefs.h <<EOF
4093#define CRAY_STACKSEG_END $ac_func
4094EOF
4095
4096  break
4097else
4098  echo "$ac_t""no" 1>&6
4099fi
4100
4101done
4102fi
4103
4104echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4105echo "configure:4106: checking stack direction for C alloca" >&5
4106if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4107  echo $ac_n "(cached) $ac_c" 1>&6
4108else
4109  if test "$cross_compiling" = yes; then
4110  ac_cv_c_stack_direction=0
4111else
4112  cat > conftest.$ac_ext <<EOF
4113#line 4114 "configure"
4114#include "confdefs.h"
4115find_stack_direction ()
4116{
4117  static char *addr = 0;
4118  auto char dummy;
4119  if (addr == 0)
4120    {
4121      addr = &dummy;
4122      return find_stack_direction ();
4123    }
4124  else
4125    return (&dummy > addr) ? 1 : -1;
4126}
4127main ()
4128{
4129  exit (find_stack_direction() < 0);
4130}
4131EOF
4132if { (eval echo configure:4133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4133then
4134  ac_cv_c_stack_direction=1
4135else
4136  echo "configure: failed program was:" >&5
4137  cat conftest.$ac_ext >&5
4138  rm -fr conftest*
4139  ac_cv_c_stack_direction=-1
4140fi
4141rm -fr conftest*
4142fi
4143
4144fi
4145
4146echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4147cat >> confdefs.h <<EOF
4148#define STACK_DIRECTION $ac_cv_c_stack_direction
4149EOF
4150
4151fi
4152
4153
4154have_intptr_t=""
4155echo $ac_n "checking for intptr_t in inttypes.h or stdint.h""... $ac_c" 1>&6
4156echo "configure:4157: checking for intptr_t in inttypes.h or stdint.h" >&5
4157cat > conftest.$ac_ext <<EOF
4158#line 4159 "configure"
4159#include "confdefs.h"
4160#include <inttypes.h>
4161EOF
4162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4163  egrep "intptr_t" >/dev/null 2>&1; then
4164  rm -rf conftest*
4165  cat >> confdefs.h <<\EOF
4166#define HAVE_INTPTR_T 1
4167EOF
4168
4169					have_intptr_t=yes
4170fi
4171rm -f conftest*
4172
4173cat > conftest.$ac_ext <<EOF
4174#line 4175 "configure"
4175#include "confdefs.h"
4176#include <stdint.h>
4177EOF
4178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4179  egrep "intptr_t" >/dev/null 2>&1; then
4180  rm -rf conftest*
4181  cat >> confdefs.h <<\EOF
4182#define HAVE_INTPTR_T 1
4183EOF
4184
4185					have_intptr_t=yes
4186fi
4187rm -f conftest*
4188
4189if test "x$have_intptr_t" = "x"; then
4190	echo "$ac_t""no" 1>&6
4191else
4192	echo "$ac_t""yes" 1>&6
4193fi
4194
4195echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4196echo "configure:4197: checking for socklen_t" >&5
4197cat > conftest.$ac_ext <<EOF
4198#line 4199 "configure"
4199#include "confdefs.h"
4200#include <sys/socket.h>
4201EOF
4202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4203  egrep "socklen_t" >/dev/null 2>&1; then
4204  rm -rf conftest*
4205  echo "$ac_t""yes" 1>&6
4206  cat >> confdefs.h <<\EOF
4207#define HAVE_SOCKLEN_T 1
4208EOF
4209
4210else
4211  rm -rf conftest*
4212  echo "$ac_t""no" 1>&6
4213fi
4214rm -f conftest*
4215
4216
4217echo $ac_n "checking whether sys/types.h defines fd_set""... $ac_c" 1>&6
4218echo "configure:4219: checking whether sys/types.h defines fd_set" >&5
4219cat > conftest.$ac_ext <<EOF
4220#line 4221 "configure"
4221#include "confdefs.h"
4222#include <sys/types.h>
4223EOF
4224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4225  egrep "fd_set" >/dev/null 2>&1; then
4226  rm -rf conftest*
4227  echo "$ac_t""yes" 1>&6
4228else
4229  rm -rf conftest*
4230  echo "$ac_t""no" 1>&6
4231  echo $ac_n "checking whether sys/select.h defines fd_set""... $ac_c" 1>&6
4232echo "configure:4233: checking whether sys/select.h defines fd_set" >&5
4233  cat > conftest.$ac_ext <<EOF
4234#line 4235 "configure"
4235#include "confdefs.h"
4236#include <sys/select.h>
4237EOF
4238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4239  egrep "fd_set" >/dev/null 2>&1; then
4240  rm -rf conftest*
4241  echo "$ac_t""yes" 1>&6
4242    cat >> confdefs.h <<\EOF
4243#define NEED_SYS_SELECT_H 1
4244EOF
4245
4246else
4247  rm -rf conftest*
4248  echo "$ac_t""no. ugh." 1>&6
4249fi
4250rm -f conftest*
4251
4252fi
4253rm -f conftest*
4254
4255
4256
4257
4258echo $ac_n "checking for struct linger""... $ac_c" 1>&6
4259echo "configure:4260: checking for struct linger" >&5
4260cat > conftest.$ac_ext <<EOF
4261#line 4262 "configure"
4262#include "confdefs.h"
4263#include <sys/socket.h>
4264EOF
4265if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4266  egrep "struct( |	)*linger" >/dev/null 2>&1; then
4267  rm -rf conftest*
4268  echo "$ac_t""yes" 1>&6
4269else
4270  rm -rf conftest*
4271  cat >> confdefs.h <<\EOF
4272#define NO_STRUCT_LINGER 1
4273EOF
4274
4275  echo "$ac_t""no. ugh." 1>&6
4276fi
4277rm -f conftest*
4278
4279
4280
4281
4282
4283echo $ac_n "checking for getpgid""... $ac_c" 1>&6
4284echo "configure:4285: checking for getpgid" >&5
4285if eval "test \"`echo '$''{'ac_cv_func_getpgid'+set}'`\" = set"; then
4286  echo $ac_n "(cached) $ac_c" 1>&6
4287else
4288  cat > conftest.$ac_ext <<EOF
4289#line 4290 "configure"
4290#include "confdefs.h"
4291/* System header to define __stub macros and hopefully few prototypes,
4292    which can conflict with char getpgid(); below.  */
4293#include <assert.h>
4294/* Override any gcc2 internal prototype to avoid an error.  */
4295/* We use char because int might match the return type of a gcc2
4296    builtin and then its argument prototype would still apply.  */
4297char getpgid();
4298
4299int main() {
4300
4301/* The GNU C library defines this for functions which it implements
4302    to always fail with ENOSYS.  Some functions are actually named
4303    something starting with __ and the normal name is an alias.  */
4304#if defined (__stub_getpgid) || defined (__stub___getpgid)
4305choke me
4306#else
4307getpgid();
4308#endif
4309
4310; return 0; }
4311EOF
4312if { (eval echo configure:4313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4313  rm -rf conftest*
4314  eval "ac_cv_func_getpgid=yes"
4315else
4316  echo "configure: failed program was:" >&5
4317  cat conftest.$ac_ext >&5
4318  rm -rf conftest*
4319  eval "ac_cv_func_getpgid=no"
4320fi
4321rm -f conftest*
4322fi
4323
4324if eval "test \"`echo '$ac_cv_func_'getpgid`\" = yes"; then
4325  echo "$ac_t""yes" 1>&6
4326  cat >> confdefs.h <<\EOF
4327#define HAVE_GETPGID 1
4328EOF
4329
4330else
4331  echo "$ac_t""no" 1>&6
4332fi
4333
4334echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
4335echo "configure:4336: checking for getpgrp" >&5
4336if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
4337  echo $ac_n "(cached) $ac_c" 1>&6
4338else
4339  cat > conftest.$ac_ext <<EOF
4340#line 4341 "configure"
4341#include "confdefs.h"
4342/* System header to define __stub macros and hopefully few prototypes,
4343    which can conflict with char getpgrp(); below.  */
4344#include <assert.h>
4345/* Override any gcc2 internal prototype to avoid an error.  */
4346/* We use char because int might match the return type of a gcc2
4347    builtin and then its argument prototype would still apply.  */
4348char getpgrp();
4349
4350int main() {
4351
4352/* The GNU C library defines this for functions which it implements
4353    to always fail with ENOSYS.  Some functions are actually named
4354    something starting with __ and the normal name is an alias.  */
4355#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
4356choke me
4357#else
4358getpgrp();
4359#endif
4360
4361; return 0; }
4362EOF
4363if { (eval echo configure:4364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4364  rm -rf conftest*
4365  eval "ac_cv_func_getpgrp=yes"
4366else
4367  echo "configure: failed program was:" >&5
4368  cat conftest.$ac_ext >&5
4369  rm -rf conftest*
4370  eval "ac_cv_func_getpgrp=no"
4371fi
4372rm -f conftest*
4373fi
4374
4375if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
4376  echo "$ac_t""yes" 1>&6
4377  echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
4378echo "configure:4379: checking whether getpgrp takes no argument" >&5
4379if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
4380  echo $ac_n "(cached) $ac_c" 1>&6
4381else
4382  if test "$cross_compiling" = yes; then
4383  { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
4384else
4385  cat > conftest.$ac_ext <<EOF
4386#line 4387 "configure"
4387#include "confdefs.h"
4388
4389/*
4390 * If this system has a BSD-style getpgrp(),
4391 * which takes a pid argument, exit unsuccessfully.
4392 *
4393 * Snarfed from Chet Ramey's bash pgrp.c test program
4394 */
4395#include <stdio.h>
4396#include <sys/types.h>
4397
4398int     pid;
4399int     pg1, pg2, pg3, pg4;
4400int     ng, np, s, child;
4401
4402main()
4403{
4404        pid = getpid();
4405        pg1 = getpgrp(0);
4406        pg2 = getpgrp();
4407        pg3 = getpgrp(pid);
4408        pg4 = getpgrp(1);
4409
4410        /*
4411         * If all of these values are the same, it's pretty sure that
4412         * we're on a system that ignores getpgrp's first argument.
4413         */
4414        if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
4415                exit(0);
4416
4417        child = fork();
4418        if (child < 0)
4419                exit(1);
4420        else if (child == 0) {
4421                np = getpid();
4422                /*
4423                 * If this is Sys V, this will not work; pgrp will be
4424                 * set to np because setpgrp just changes a pgrp to be
4425                 * the same as the pid.
4426                 */
4427                setpgrp(np, pg1);
4428                ng = getpgrp(0);        /* Same result for Sys V and BSD */
4429                if (ng == pg1) {
4430                        exit(1);
4431                } else {
4432                        exit(0);
4433                }
4434        } else {
4435                wait(&s);
4436                exit(s>>8);
4437        }
4438}
4439
4440EOF
4441if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4442then
4443  ac_cv_func_getpgrp_void=yes
4444else
4445  echo "configure: failed program was:" >&5
4446  cat conftest.$ac_ext >&5
4447  rm -fr conftest*
4448  ac_cv_func_getpgrp_void=no
4449fi
4450rm -fr conftest*
4451fi
4452
4453
4454fi
4455
4456echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
4457if test $ac_cv_func_getpgrp_void = yes; then
4458  cat >> confdefs.h <<\EOF
4459#define GETPGRP_VOID 1
4460EOF
4461
4462fi
4463
4464else
4465  echo "$ac_t""no" 1>&6
4466fi
4467
4468
4469echo $ac_n "checking for useful SO_SNDLOWAT""... $ac_c" 1>&6
4470echo "configure:4471: checking for useful SO_SNDLOWAT" >&5
4471if test "$cross_compiling" = yes; then
4472  :
4473else
4474  cat > conftest.$ac_ext <<EOF
4475#line 4476 "configure"
4476#include "confdefs.h"
4477
4478#include <sys/types.h>
4479#include <sys/socket.h>
4480main ()
4481{
4482#ifndef SO_SNDLOWAT
4483        exit(1);
4484#else
4485        int d = socket(AF_INET, SOCK_STREAM, 0);
4486        int size = 256;
4487        if (setsockopt(d, SOL_SOCKET, SO_SNDLOWAT, &size, sizeof(size)) < 0)
4488                exit(1);
4489        exit (0);
4490#endif
4491}
4492
4493EOF
4494if { (eval echo configure:4495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4495then
4496  echo "$ac_t""yes" 1>&6
4497  cat >> confdefs.h <<\EOF
4498#define HAVE_SO_SNDLOWAT 1
4499EOF
4500
4501else
4502  echo "configure: failed program was:" >&5
4503  cat conftest.$ac_ext >&5
4504  rm -fr conftest*
4505  echo "$ac_t""no" 1>&6
4506fi
4507rm -fr conftest*
4508fi
4509
4510
4511echo $ac_n "checking for useful realpath""... $ac_c" 1>&6
4512echo "configure:4513: checking for useful realpath" >&5
4513if test "$cross_compiling" = yes; then
4514  :
4515else
4516  cat > conftest.$ac_ext <<EOF
4517#line 4518 "configure"
4518#include "confdefs.h"
4519
4520#include <sys/param.h>
4521#include <stdlib.h>
4522main ()
4523{
4524	char resolved_path[MAXPATHLEN];
4525
4526	if (realpath("/etc/filethatdoesnotexist", resolved_path) == NULL)
4527		exit(1);
4528	exit(0);
4529}
4530
4531EOF
4532if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4533then
4534  echo "$ac_t""yes" 1>&6
4535else
4536  echo "configure: failed program was:" >&5
4537  cat conftest.$ac_ext >&5
4538  rm -fr conftest*
4539  echo "$ac_t""no" 1>&6
4540  cat >> confdefs.h <<\EOF
4541#define HAVE_BROKEN_REALPATH 1
4542EOF
4543
4544fi
4545rm -fr conftest*
4546fi
4547
4548
4549
4550echo $ac_n "checking for sys_siglist declaration""... $ac_c" 1>&6
4551echo "configure:4552: checking for sys_siglist declaration" >&5
4552if test "$cross_compiling" = yes; then
4553  :
4554else
4555  cat > conftest.$ac_ext <<EOF
4556#line 4557 "configure"
4557#include "confdefs.h"
4558
4559#include <sys/types.h>
4560#include <sys/signal.h>
4561#include <signal.h>
4562#include <unistd.h>
4563main()
4564{
4565	char *s = sys_siglist[0];
4566	exit(0);
4567}
4568
4569EOF
4570if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4571then
4572  echo "$ac_t""yes" 1>&6
4573  sys_siglist="1"
4574  cat >> confdefs.h <<\EOF
4575#define SYS_SIGLIST_DECLARED 1
4576EOF
4577
4578else
4579  echo "configure: failed program was:" >&5
4580  cat conftest.$ac_ext >&5
4581  rm -fr conftest*
4582  echo "$ac_t""no" 1>&6
4583fi
4584rm -fr conftest*
4585fi
4586
4587
4588if test x$sys_siglist != x1
4589then
4590echo "generating a list of signal names..."
4591set X `cat /usr/include/signal.h /usr/include/sys/signal.h /usr/include/linux/signal.h 2>&1 | sed 's/^#[	]*/#/' | awk '
4592$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
4593  sig[$3] = substr($2,4,20)
4594  if (max < $3 && $3 < 60) {
4595	max = $3
4596  }
4597}
4598
4599END {
4600  for (i=1; i<=max; i++) {
4601    if (sig[i] == "")
4602      printf "%d", i
4603    else
4604      printf "%s", sig[i]
4605    if (i < max)
4606      printf " "
4607  }
4608  printf "\n"
4609}
4610'`
4611shift
4612case $# in
46130)
4614  if test -f /bin/csh; then
4615     set X `/bin/csh -cf 'kill -l'`
4616     shift
4617     case $* in
4618     0)
4619       set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
4620       ;;
4621    esac
4622  fi
4623  ;;
4624esac
4625
4626sig_name="ZERO $*"
4627if test -f sig.inc; then
4628  /bin/rm -f sig.inc
4629fi
4630echo $sig_name | sed -e 's/$/"};/' -e 's/ /", "/g' -e 's/^/static char *sys_siglist[] = { "/' >> sig.inc
4631fi
4632
4633
4634echo $ac_n "checking size of long long""... $ac_c" 1>&6
4635echo "configure:4636: checking size of long long" >&5
4636if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
4637  echo $ac_n "(cached) $ac_c" 1>&6
4638else
4639  if test "$cross_compiling" = yes; then
4640  ac_cv_sizeof_long_long=0
4641else
4642  cat > conftest.$ac_ext <<EOF
4643#line 4644 "configure"
4644#include "confdefs.h"
4645#include <stdio.h>
4646#include <sys/types.h>
4647main()
4648{
4649  FILE *f=fopen("conftestval", "w");
4650  if (!f) exit(1);
4651  fprintf(f, "%d\n", sizeof(long long));
4652  exit(0);
4653}
4654EOF
4655if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4656then
4657  ac_cv_sizeof_long_long=`cat conftestval`
4658else
4659  echo "configure: failed program was:" >&5
4660  cat conftest.$ac_ext >&5
4661  rm -fr conftest*
4662  ac_cv_sizeof_long_long=0
4663fi
4664rm -fr conftest*
4665fi
4666
4667fi
4668echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4669cat >> confdefs.h <<EOF
4670#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4671EOF
4672
4673
4674if test "$ac_cv_sizeof_long_long" != 0; then
4675	cat >> confdefs.h <<\EOF
4676#define HAVE_LONG_LONG 1
4677EOF
4678
4679fi
4680
4681
4682echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
4683echo "configure:4684: checking size of unsigned int" >&5
4684if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
4685  echo $ac_n "(cached) $ac_c" 1>&6
4686else
4687  if test "$cross_compiling" = yes; then
4688  ac_cv_sizeof_unsigned_int=4
4689else
4690  cat > conftest.$ac_ext <<EOF
4691#line 4692 "configure"
4692#include "confdefs.h"
4693#include <stdio.h>
4694#include <sys/types.h>
4695main()
4696{
4697  FILE *f=fopen("conftestval", "w");
4698  if (!f) exit(1);
4699  fprintf(f, "%d\n", sizeof(unsigned int));
4700  exit(0);
4701}
4702EOF
4703if { (eval echo configure:4704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4704then
4705  ac_cv_sizeof_unsigned_int=`cat conftestval`
4706else
4707  echo "configure: failed program was:" >&5
4708  cat conftest.$ac_ext >&5
4709  rm -fr conftest*
4710  ac_cv_sizeof_unsigned_int=0
4711fi
4712rm -fr conftest*
4713fi
4714
4715fi
4716echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
4717cat >> confdefs.h <<EOF
4718#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
4719EOF
4720
4721
4722if test "$ac_cv_sizeof_unsigned_int" = 4; then
4723	cat >> confdefs.h <<\EOF
4724#define UNSIGNED_INT32 1
4725EOF
4726
4727else
4728	echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
4729echo "configure:4730: checking size of unsigned long" >&5
4730if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
4731  echo $ac_n "(cached) $ac_c" 1>&6
4732else
4733  if test "$cross_compiling" = yes; then
4734  ac_cv_sizeof_unsigned_long=4
4735else
4736  cat > conftest.$ac_ext <<EOF
4737#line 4738 "configure"
4738#include "confdefs.h"
4739#include <stdio.h>
4740#include <sys/types.h>
4741main()
4742{
4743  FILE *f=fopen("conftestval", "w");
4744  if (!f) exit(1);
4745  fprintf(f, "%d\n", sizeof(unsigned long));
4746  exit(0);
4747}
4748EOF
4749if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4750then
4751  ac_cv_sizeof_unsigned_long=`cat conftestval`
4752else
4753  echo "configure: failed program was:" >&5
4754  cat conftest.$ac_ext >&5
4755  rm -fr conftest*
4756  ac_cv_sizeof_unsigned_long=0
4757fi
4758rm -fr conftest*
4759fi
4760
4761fi
4762echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
4763cat >> confdefs.h <<EOF
4764#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
4765EOF
4766
4767
4768	if test "$ac_cv_sizeof_unsigned_long" = 4; then
4769		cat >> confdefs.h <<\EOF
4770#define UNSIGNED_LONG32 1
4771EOF
4772
4773	else
4774		cat >> confdefs.h <<\EOF
4775#define UNKNOWN_32INT 1
4776EOF
4777
4778	fi
4779fi
4780
4781
4782echo $ac_n "checking to see if your struct sockaddr includes a length field""... $ac_c" 1>&6
4783echo "configure:4784: checking to see if your struct sockaddr includes a length field" >&5
4784if test "$cross_compiling" = yes; then
4785  :
4786else
4787  cat > conftest.$ac_ext <<EOF
4788#line 4789 "configure"
4789#include "confdefs.h"
4790
4791#include <sys/types.h>
4792#include <sys/socket.h>
4793main()
4794{
4795	struct sockaddr sa;
4796	sa.sa_len = 0;
4797	exit(0);
4798}
4799
4800EOF
4801if { (eval echo configure:4802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4802then
4803  cat >> confdefs.h <<\EOF
4804#define HAVE_SA_LEN 1
4805EOF
4806
4807  echo "$ac_t""yes" 1>&6
4808else
4809  echo "configure: failed program was:" >&5
4810  cat conftest.$ac_ext >&5
4811  rm -fr conftest*
4812  echo "$ac_t""no" 1>&6
4813fi
4814rm -fr conftest*
4815fi
4816
4817
4818
4819echo $ac_n "checking whether to support ipv6""... $ac_c" 1>&6
4820echo "configure:4821: checking whether to support ipv6" >&5
4821# Check whether --with-ipv6 or --without-ipv6 was given.
4822if test "${with_ipv6+set}" = set; then
4823  withval="$with_ipv6"
4824
4825	if test "x$withval" = "xno" ; then
4826		echo "$ac_t""no" 1>&6
4827		cat >> confdefs.h <<\EOF
4828#define DO_NOT_USE_IPV6 1
4829EOF
4830
4831	else
4832		echo "$ac_t""yes" 1>&6
4833	fi
4834
4835else
4836  echo "$ac_t""yes" 1>&6
4837fi
4838
4839
4840echo $ac_n "checking for struct sockaddr_storage""... $ac_c" 1>&6
4841echo "configure:4842: checking for struct sockaddr_storage" >&5
4842cat > conftest.$ac_ext <<EOF
4843#line 4844 "configure"
4844#include "confdefs.h"
4845#include <sys/socket.h>
4846EOF
4847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4848  egrep "struct( |	)*sockaddr_storage" >/dev/null 2>&1; then
4849  rm -rf conftest*
4850  echo "$ac_t""yes" 1>&6
4851  cat >> confdefs.h <<\EOF
4852#define HAVE_STRUCT_SOCKADDR_STORAGE 1
4853EOF
4854
4855else
4856  rm -rf conftest*
4857  echo "$ac_t""no" 1>&6
4858fi
4859rm -f conftest*
4860
4861
4862echo $ac_n "checking for struct sockaddr_in6""... $ac_c" 1>&6
4863echo "configure:4864: checking for struct sockaddr_in6" >&5
4864cat > conftest.$ac_ext <<EOF
4865#line 4866 "configure"
4866#include "confdefs.h"
4867#include <netinet/in.h>
4868EOF
4869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4870  egrep "struct( |	)*sockaddr_in6" >/dev/null 2>&1; then
4871  rm -rf conftest*
4872  echo "$ac_t""yes" 1>&6
4873  cat >> confdefs.h <<\EOF
4874#define HAVE_STRUCT_SOCKADDR_IN6 1
4875EOF
4876
4877else
4878  rm -rf conftest*
4879  echo "$ac_t""no" 1>&6
4880fi
4881rm -f conftest*
4882
4883
4884echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6
4885echo "configure:4886: checking for struct addrinfo" >&5
4886cat > conftest.$ac_ext <<EOF
4887#line 4888 "configure"
4888#include "confdefs.h"
4889#include <netdb.h>
4890EOF
4891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4892  egrep "struct( |	)*addrinfo" >/dev/null 2>&1; then
4893  rm -rf conftest*
4894  echo "$ac_t""yes" 1>&6
4895  cat >> confdefs.h <<\EOF
4896#define HAVE_STRUCT_ADDRINFO 1
4897EOF
4898
4899else
4900  rm -rf conftest*
4901  echo "$ac_t""no" 1>&6
4902fi
4903rm -f conftest*
4904
4905
4906
4907echo $ac_n "checking to see if your getaddrinfo supports AF_UNIX""... $ac_c" 1>&6
4908echo "configure:4909: checking to see if your getaddrinfo supports AF_UNIX" >&5
4909if test "$cross_compiling" = yes; then
4910  :
4911else
4912  cat > conftest.$ac_ext <<EOF
4913#line 4914 "configure"
4914#include "confdefs.h"
4915
4916#include <sys/types.h>
4917#include <sys/socket.h>
4918#include <netdb.h>
4919#include <sys/un.h>
4920#include <stdlib.h>
4921
4922main()
4923{
4924	struct addrinfo hints;
4925	struct addrinfo *results;
4926	int	retval;
4927
4928	memset(&hints, 0, sizeof(hints));
4929	hints.ai_flags = 0;
4930	hints.ai_family = AF_UNIX;
4931	hints.ai_socktype = SOCK_STREAM;
4932	hints.ai_protocol = 0;
4933
4934	retval = getaddrinfo(0, "/tmp/.ircd/6667", &hints, &results);
4935	if (retval != 0)
4936		exit(1);
4937	else
4938		exit(0);
4939}
4940
4941EOF
4942if { (eval echo configure:4943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4943then
4944  echo "$ac_t""yes" 1>&6
4945else
4946  echo "configure: failed program was:" >&5
4947  cat conftest.$ac_ext >&5
4948  rm -fr conftest*
4949  cat >> confdefs.h <<\EOF
4950#define GETADDRINFO_DOES_NOT_DO_AF_UNIX 1
4951EOF
4952
4953  echo "$ac_t""no. ugh" 1>&6
4954fi
4955rm -fr conftest*
4956fi
4957
4958
4959
4960echo $ac_n "checking whether to support SOCKS""... $ac_c" 1>&6
4961echo "configure:4962: checking whether to support SOCKS" >&5
4962# Check whether --with-socks or --without-socks was given.
4963if test "${with_socks+set}" = set; then
4964  withval="$with_socks"
4965   case "$withval" in
4966  no)
4967	echo "$ac_t""no" 1>&6
4968	;;
4969  *)
4970	if test "x$withval" != "xyes"; then
4971		LIBS="$LIBS -L$withval"
4972	fi
4973
4974	echo "$ac_t""yes" 1>&6
4975	LIBS="$LIBS -lsocks"
4976	cat >> confdefs.h <<\EOF
4977#define SOCKS 1
4978EOF
4979
4980	cat >> confdefs.h <<\EOF
4981#define connect Rconnect
4982EOF
4983
4984	cat >> confdefs.h <<\EOF
4985#define getsockname Rgetsockname
4986EOF
4987
4988	cat >> confdefs.h <<\EOF
4989#define bind Rbind
4990EOF
4991
4992	cat >> confdefs.h <<\EOF
4993#define accept Raccept
4994EOF
4995
4996	cat >> confdefs.h <<\EOF
4997#define listen Rlisten
4998EOF
4999
5000	cat >> confdefs.h <<\EOF
5001#define select Rselect
5002EOF
5003
5004	;;
5005  esac
5006else
5007  echo "$ac_t""no" 1>&6
5008
5009fi
5010
5011
5012echo $ac_n "checking whether to support SOCKS5""... $ac_c" 1>&6
5013echo "configure:5014: checking whether to support SOCKS5" >&5
5014# Check whether --with-socks5 or --without-socks5 was given.
5015if test "${with_socks5+set}" = set; then
5016  withval="$with_socks5"
5017   case "$withval" in
5018  no)
5019	echo "$ac_t""no" 1>&6
5020	;;
5021  *)
5022	if test "x$withval" != "xyes"; then
5023		LIBS="$LIBS -L$withval"
5024		CFLAGS="$CFLAGS -I$withval/../include/"
5025	fi
5026
5027	echo "$ac_t""yes" 1>&6
5028	LIBS="$LIBS -lsocks5"
5029	cat >> confdefs.h <<\EOF
5030#define SOCKS 1
5031EOF
5032
5033	cat >> confdefs.h <<\EOF
5034#define USE_SOCKS5 1
5035EOF
5036
5037	;;
5038  esac
5039else
5040  echo "$ac_t""no" 1>&6
5041
5042fi
5043
5044
5045
5046# Extract the first word of "perl", so it can be a program name with args.
5047set dummy perl; ac_word=$2
5048echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5049echo "configure:5050: checking for $ac_word" >&5
5050if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
5051  echo $ac_n "(cached) $ac_c" 1>&6
5052else
5053  case "$PERL" in
5054  /*)
5055  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5056  ;;
5057  ?:/*)
5058  ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
5059  ;;
5060  *)
5061  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
5062  ac_dummy="$PATH"
5063  for ac_dir in $ac_dummy; do
5064    test -z "$ac_dir" && ac_dir=.
5065    if test -f $ac_dir/$ac_word; then
5066      ac_cv_path_PERL="$ac_dir/$ac_word"
5067      break
5068    fi
5069  done
5070  IFS="$ac_save_ifs"
5071  ;;
5072esac
5073fi
5074PERL="$ac_cv_path_PERL"
5075if test -n "$PERL"; then
5076  echo "$ac_t""$PERL" 1>&6
5077else
5078  echo "$ac_t""no" 1>&6
5079fi
5080
5081echo $ac_n "checking whether to support Perl""... $ac_c" 1>&6
5082echo "configure:5083: checking whether to support Perl" >&5
5083# Check whether --with-perl or --without-perl was given.
5084if test "${with_perl+set}" = set; then
5085  withval="$with_perl"
5086  :
5087else
5088   with_perl="maybe"
5089fi
5090
5091if test "xno" != "x$withval"; then
5092
5093	if test ! -z "$PERL"; then
5094		saved_LIBS="$LIBS"
5095		saved_CFLAGS="$CFLAGS"
5096
5097		PERL_CFLAGS="`$PERL -MExtUtils::Embed -e ccopts`"
5098		CFLAGS="$CFLAGS $PERL_CFLAGS"
5099		LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`"
5100		cat > conftest.$ac_ext <<EOF
5101#line 5102 "configure"
5102#include "confdefs.h"
5103
5104			#include <EXTERN.h>
5105			#include <perl.h>
5106			
5107int main() {
5108perl_alloc();
5109; return 0; }
5110EOF
5111if { (eval echo configure:5112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5112  rm -rf conftest*
5113   have_perl="yes"
5114else
5115  echo "configure: failed program was:" >&5
5116  cat conftest.$ac_ext >&5
5117  rm -rf conftest*
5118   LIBS="$saved_LIBS"
5119fi
5120rm -f conftest*
5121		CFLAGS="$saved_CFLAGS"
5122	fi
5123fi
5124if test -n "$have_perl"; then
5125	echo "$ac_t""yes" 1>&6
5126	PERLDOTOH="perl.o"
5127	cat >> confdefs.h <<\EOF
5128#define PERL 1
5129EOF
5130
5131
5132else
5133	echo "$ac_t""no" 1>&6
5134	if test "x$with_perl" != "xno" -a "x$with_perl" != "xmaybe"; then
5135		{ echo "configure: error: --with-perl requested, but I could not find Perl" 1>&2; exit 1; }
5136	fi
5137fi
5138withval=''
5139
5140
5141echo $ac_n "checking whether to support Tcl""... $ac_c" 1>&6
5142echo "configure:5143: checking whether to support Tcl" >&5
5143# Check whether --with-tcl or --without-tcl was given.
5144if test "${with_tcl+set}" = set; then
5145  withval="$with_tcl"
5146   test -z "$withval" && withval=yes
5147else
5148   withval=maybe
5149fi
5150
5151if test "x$withval" != "xyes" -a "x$withval" != "xmaybe"; then
5152	tcl_base_search="$withval"
5153else
5154	tcl_base_search="/usr/local /usr"
5155fi
5156test "xno" != "x$withval" && for base in $tcl_base_search
5157do
5158	tcl_bin_dir="$base"
5159	test -r "$tcl_bin_dir/tclConfig.sh" && break
5160
5161	tcl_bin_dir="$base/lib"
5162	test -r "$tcl_bin_dir/tclConfig.sh" && break
5163
5164	for ver in 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0
5165	do
5166		tcl_bin_dir="$base/lib/tcl$ver"
5167		test -r "$tcl_bin_dir/tclConfig.sh" && break 2
5168	done
5169done
5170if test ! -z "$tcl_bin_dir" -a -r "$tcl_bin_dir/tclConfig.sh"; then
5171	. "$tcl_bin_dir/tclConfig.sh"
5172		echo "$ac_t""yes ($TCL_VERSION)" 1>&6
5173		CFLAGS="$CFLAGS $TCL_INCLUDE_SPEC"
5174		LIBS="$TCL_LIB_SPEC $LIBS"
5175		TCLDOTOH="tcl.o"
5176		cat >> confdefs.h <<\EOF
5177#define TCL 1
5178EOF
5179
5180else
5181	echo "$ac_t""no" 1>&6
5182	if test "x$withval" != "xno" -a "x$withval" != "xmaybe"; then
5183		{ echo "configure: error: --with-tcl requested, but I could not find TCL" 1>&2; exit 1; }
5184	fi
5185fi
5186
5187
5188
5189
5190if test -z "$CFLAGS"; then CFLAGS="-g -O"; fi
5191if test -z "$LDFLAGS"; then LDFLAGS= ; fi
5192if test -z "$PERLDOTOH"; then PERLDOTOH= ; fi
5193if test -z "$TCLDOTOH"; then TCLDOTOH= ; fi
5194if test -z "$bindir"; then bindir=\${prefix}/bin; fi
5195if test -z "$libdir"; then libdir=\${prefix}/lib; fi
5196if test -z "$irclibdir"; then irclibdir=\${libdir}/irc; fi
5197if test -z "$libexecdir"; then libexecdir=\${prefix}/libexec; fi
5198
5199epic=`echo "epic" | sed -e "$program_transform_name"`
5200if test "$program_prefix" = "NONE" ; then
5201	program_prefix=
5202fi
5203
5204echo $ac_n "checking whether to support bounds checking gcc""... $ac_c" 1>&6
5205echo "configure:5206: checking whether to support bounds checking gcc" >&5
5206# Check whether --with-bc or --without-bc was given.
5207if test "${with_bc+set}" = set; then
5208  withval="$with_bc"
5209     case "$withval" in
5210   no)
5211        echo "$ac_t""no" 1>&6;
5212        ;;
5213   *)
5214        if test "x$withval" != "xyes" ; then
5215                CC="$withval"
5216        fi
5217
5218        CFLAGS="$CFLAGS -Wall -fbounds-checking"
5219        LDFLAGS="$LDFLAGS -static"
5220        echo "$ac_t""yes" 1>&6
5221        ;;
5222   esac
5223else
5224  echo "$ac_t""no" 1>&6
5225
5226fi
5227
5228
5229echo $ac_n "checking whether to turn on FreeBSD WARNS-like compiler warnings""... $ac_c" 1>&6
5230echo "configure:5231: checking whether to turn on FreeBSD WARNS-like compiler warnings" >&5
5231# Check whether --with-warns or --without-warns was given.
5232if test "${with_warns+set}" = set; then
5233  withval="$with_warns"
5234     case "$withval" in
5235   no)
5236        echo "$ac_t""no" 1>&6;
5237        ;;
5238   *)
5239        if test "x$withval" != "xyes" ; then
5240                CFLAGS="$CFLAGS $withval"
5241        fi
5242
5243        CFLAGS="$CFLAGS -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wuninitialized -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wformat-extra-args -Wno-unused -ansi -fno-builtin"
5244        echo "$ac_t""yes" 1>&6
5245        ;;
5246   esac
5247else
5248  echo "$ac_t""no" 1>&6
5249
5250fi
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267trap '' 1 2 15
5268cat > confcache <<\EOF
5269# This file is a shell script that caches the results of configure
5270# tests run on this system so they can be shared between configure
5271# scripts and configure runs.  It is not useful on other systems.
5272# If it contains results you don't want to keep, you may remove or edit it.
5273#
5274# By default, configure uses ./config.cache as the cache file,
5275# creating it if it does not exist already.  You can give configure
5276# the --cache-file=FILE option to use a different cache file; that is
5277# what configure does when it calls configure scripts in
5278# subdirectories, so they share the cache.
5279# Giving --cache-file=/dev/null disables caching, for debugging configure.
5280# config.status only pays attention to the cache file if you give it the
5281# --recheck option to rerun configure.
5282#
5283EOF
5284# The following way of writing the cache mishandles newlines in values,
5285# but we know of no workaround that is simple, portable, and efficient.
5286# So, don't put newlines in cache variables' values.
5287# Ultrix sh set writes to stderr and can't be redirected directly,
5288# and sets the high bit in the cache file unless we assign to the vars.
5289(set) 2>&1 |
5290  case `(ac_space=' '; set | grep ac_space) 2>&1` in
5291  *ac_space=\ *)
5292    # `set' does not quote correctly, so add quotes (double-quote substitution
5293    # turns \\\\ into \\, and sed turns \\ into \).
5294    sed -n \
5295      -e "s/'/'\\\\''/g" \
5296      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5297    ;;
5298  *)
5299    # `set' quotes correctly as required by POSIX, so do not add quotes.
5300    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5301    ;;
5302  esac >> confcache
5303if cmp -s $cache_file confcache; then
5304  :
5305else
5306  if test -w $cache_file; then
5307    echo "updating cache $cache_file"
5308    cat confcache > $cache_file
5309  else
5310    echo "not updating unwritable cache $cache_file"
5311  fi
5312fi
5313rm -f confcache
5314
5315trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5316
5317test "x$prefix" = xNONE && prefix=$ac_default_prefix
5318# Let make expand exec_prefix.
5319test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5320
5321# Any assignment to VPATH causes Sun make to only execute
5322# the first set of double-colon rules, so remove it if not needed.
5323# If there is a colon in the path, we need to keep it.
5324if test "x$srcdir" = x.; then
5325  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
5326fi
5327
5328trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5329
5330DEFS=-DHAVE_CONFIG_H
5331
5332# Without the "./", some shells look in PATH for config.status.
5333: ${CONFIG_STATUS=./config.status}
5334
5335echo creating $CONFIG_STATUS
5336rm -f $CONFIG_STATUS
5337cat > $CONFIG_STATUS <<EOF
5338#! /bin/sh
5339# Generated automatically by configure.
5340# Run this file to recreate the current configuration.
5341# This directory was configured as follows,
5342# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5343#
5344# $0 $ac_configure_args
5345#
5346# Compiler output produced by configure, useful for debugging
5347# configure, is in ./config.log if it exists.
5348
5349ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5350for ac_option
5351do
5352  case "\$ac_option" in
5353  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5354    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5355    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5356  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5357    echo "$CONFIG_STATUS generated by autoconf version 2.13"
5358    exit 0 ;;
5359  -help | --help | --hel | --he | --h)
5360    echo "\$ac_cs_usage"; exit 0 ;;
5361  *) echo "\$ac_cs_usage"; exit 1 ;;
5362  esac
5363done
5364
5365ac_given_srcdir=$srcdir
5366
5367trap 'rm -fr `echo "Makefile source/Makefile source/info.c.sh include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5368EOF
5369cat >> $CONFIG_STATUS <<EOF
5370
5371# Protect against being on the right side of a sed subst in config.status.
5372sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5373 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5374$ac_vpsub
5375$extrasub
5376s%@SHELL@%$SHELL%g
5377s%@CFLAGS@%$CFLAGS%g
5378s%@CPPFLAGS@%$CPPFLAGS%g
5379s%@CXXFLAGS@%$CXXFLAGS%g
5380s%@FFLAGS@%$FFLAGS%g
5381s%@DEFS@%$DEFS%g
5382s%@LDFLAGS@%$LDFLAGS%g
5383s%@LIBS@%$LIBS%g
5384s%@exec_prefix@%$exec_prefix%g
5385s%@prefix@%$prefix%g
5386s%@program_transform_name@%$program_transform_name%g
5387s%@bindir@%$bindir%g
5388s%@sbindir@%$sbindir%g
5389s%@libexecdir@%$libexecdir%g
5390s%@datadir@%$datadir%g
5391s%@sysconfdir@%$sysconfdir%g
5392s%@sharedstatedir@%$sharedstatedir%g
5393s%@localstatedir@%$localstatedir%g
5394s%@libdir@%$libdir%g
5395s%@includedir@%$includedir%g
5396s%@oldincludedir@%$oldincludedir%g
5397s%@infodir@%$infodir%g
5398s%@mandir@%$mandir%g
5399s%@VERSION@%$VERSION%g
5400s%@CC@%$CC%g
5401s%@CPP@%$CPP%g
5402s%@ALLOCA@%$ALLOCA%g
5403s%@PERL@%$PERL%g
5404s%@PERL_CFLAGS@%$PERL_CFLAGS%g
5405s%@PERLDOTOH@%$PERLDOTOH%g
5406s%@TCLDOTOH@%$TCLDOTOH%g
5407s%@irclibdir@%$irclibdir%g
5408s%@srcdir@%$srcdir%g
5409s%@epic@%$epic%g
5410s%@program_prefix@%$program_prefix%g
5411
5412CEOF
5413EOF
5414
5415cat >> $CONFIG_STATUS <<\EOF
5416
5417# Split the substitutions into bite-sized pieces for seds with
5418# small command number limits, like on Digital OSF/1 and HP-UX.
5419ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5420ac_file=1 # Number of current file.
5421ac_beg=1 # First line for current file.
5422ac_end=$ac_max_sed_cmds # Line after last line for current file.
5423ac_more_lines=:
5424ac_sed_cmds=""
5425while $ac_more_lines; do
5426  if test $ac_beg -gt 1; then
5427    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5428  else
5429    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5430  fi
5431  if test ! -s conftest.s$ac_file; then
5432    ac_more_lines=false
5433    rm -f conftest.s$ac_file
5434  else
5435    if test -z "$ac_sed_cmds"; then
5436      ac_sed_cmds="sed -f conftest.s$ac_file"
5437    else
5438      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5439    fi
5440    ac_file=`expr $ac_file + 1`
5441    ac_beg=$ac_end
5442    ac_end=`expr $ac_end + $ac_max_sed_cmds`
5443  fi
5444done
5445if test -z "$ac_sed_cmds"; then
5446  ac_sed_cmds=cat
5447fi
5448EOF
5449
5450cat >> $CONFIG_STATUS <<EOF
5451
5452CONFIG_FILES=\${CONFIG_FILES-"Makefile source/Makefile source/info.c.sh"}
5453EOF
5454cat >> $CONFIG_STATUS <<\EOF
5455for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5456  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5457  case "$ac_file" in
5458  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5459       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5460  *) ac_file_in="${ac_file}.in" ;;
5461  esac
5462
5463  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5464
5465  # Remove last slash and all that follows it.  Not all systems have dirname.
5466  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5467  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5468    # The file is in a subdirectory.
5469    test ! -d "$ac_dir" && mkdir "$ac_dir"
5470    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5471    # A "../" for each directory in $ac_dir_suffix.
5472    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5473  else
5474    ac_dir_suffix= ac_dots=
5475  fi
5476
5477  case "$ac_given_srcdir" in
5478  .)  srcdir=.
5479      if test -z "$ac_dots"; then top_srcdir=.
5480      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5481  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5482  *) # Relative path.
5483    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5484    top_srcdir="$ac_dots$ac_given_srcdir" ;;
5485  esac
5486
5487
5488  echo creating "$ac_file"
5489  rm -f "$ac_file"
5490  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5491  case "$ac_file" in
5492  *Makefile*) ac_comsub="1i\\
5493# $configure_input" ;;
5494  *) ac_comsub= ;;
5495  esac
5496
5497  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5498  sed -e "$ac_comsub
5499s%@configure_input@%$configure_input%g
5500s%@srcdir@%$srcdir%g
5501s%@top_srcdir@%$top_srcdir%g
5502" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5503fi; done
5504rm -f conftest.s*
5505
5506# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5507# NAME is the cpp macro being defined and VALUE is the value it is being given.
5508#
5509# ac_d sets the value in "#define NAME VALUE" lines.
5510ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
5511ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
5512ac_dC='\3'
5513ac_dD='%g'
5514# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5515ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
5516ac_uB='\([ 	]\)%\1#\2define\3'
5517ac_uC=' '
5518ac_uD='\4%g'
5519# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5520ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
5521ac_eB='$%\1#\2define\3'
5522ac_eC=' '
5523ac_eD='%g'
5524
5525if test "${CONFIG_HEADERS+set}" != set; then
5526EOF
5527cat >> $CONFIG_STATUS <<EOF
5528  CONFIG_HEADERS="include/defs.h"
5529EOF
5530cat >> $CONFIG_STATUS <<\EOF
5531fi
5532for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5533  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5534  case "$ac_file" in
5535  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5536       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5537  *) ac_file_in="${ac_file}.in" ;;
5538  esac
5539
5540  echo creating $ac_file
5541
5542  rm -f conftest.frag conftest.in conftest.out
5543  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5544  cat $ac_file_inputs > conftest.in
5545
5546EOF
5547
5548# Transform confdefs.h into a sed script conftest.vals that substitutes
5549# the proper values into config.h.in to produce config.h.  And first:
5550# Protect against being on the right side of a sed subst in config.status.
5551# Protect against being in an unquoted here document in config.status.
5552rm -f conftest.vals
5553cat > conftest.hdr <<\EOF
5554s/[\\&%]/\\&/g
5555s%[\\$`]%\\&%g
5556s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5557s%ac_d%ac_u%gp
5558s%ac_u%ac_e%gp
5559EOF
5560sed -n -f conftest.hdr confdefs.h > conftest.vals
5561rm -f conftest.hdr
5562
5563# This sed command replaces #undef with comments.  This is necessary, for
5564# example, in the case of _POSIX_SOURCE, which is predefined and required
5565# on some systems where configure will not decide to define it.
5566cat >> conftest.vals <<\EOF
5567s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5568EOF
5569
5570# Break up conftest.vals because some shells have a limit on
5571# the size of here documents, and old seds have small limits too.
5572
5573rm -f conftest.tail
5574while :
5575do
5576  ac_lines=`grep -c . conftest.vals`
5577  # grep -c gives empty output for an empty file on some AIX systems.
5578  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5579  # Write a limited-size here document to conftest.frag.
5580  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5581  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5582  echo 'CEOF
5583  sed -f conftest.frag conftest.in > conftest.out
5584  rm -f conftest.in
5585  mv conftest.out conftest.in
5586' >> $CONFIG_STATUS
5587  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5588  rm -f conftest.vals
5589  mv conftest.tail conftest.vals
5590done
5591rm -f conftest.vals
5592
5593cat >> $CONFIG_STATUS <<\EOF
5594  rm -f conftest.frag conftest.h
5595  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5596  cat conftest.in >> conftest.h
5597  rm -f conftest.in
5598  if cmp -s $ac_file conftest.h 2>/dev/null; then
5599    echo "$ac_file is unchanged"
5600    rm -f conftest.h
5601  else
5602    # Remove last slash and all that follows it.  Not all systems have dirname.
5603      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5604      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5605      # The file is in a subdirectory.
5606      test ! -d "$ac_dir" && mkdir "$ac_dir"
5607    fi
5608    rm -f $ac_file
5609    mv conftest.h $ac_file
5610  fi
5611fi; done
5612
5613EOF
5614cat >> $CONFIG_STATUS <<EOF
5615
5616EOF
5617cat >> $CONFIG_STATUS <<\EOF
5618
5619exit 0
5620EOF
5621chmod +x $CONFIG_STATUS
5622rm -fr confdefs* $ac_clean_files
5623test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5624
5625
5626if test -f sig.inc ; then
5627    mv sig.inc include/
5628fi
5629
5630
5631
5632echo
5633echo "There you go.  Look at include/config.h for any options that "
5634echo "you might want to change before you 'make'.  Don't forget to "
5635echo "do a 'make install' before you're done."
5636echo
5637