1#! /bin/sh
2
3# 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-x                use the X Window System"
16
17# Initialize some variables set by options.
18# The variables have the same names as the options, with
19# dashes changed to underlines.
20build=NONE
21cache_file=./config.cache
22exec_prefix=NONE
23host=NONE
24no_create=
25nonopt=NONE
26no_recursion=
27prefix=NONE
28program_prefix=NONE
29program_suffix=NONE
30program_transform_name=s,x,x,
31silent=
32site=
33srcdir=
34target=NONE
35verbose=
36x_includes=NONE
37x_libraries=NONE
38bindir='${exec_prefix}/bin'
39sbindir='${exec_prefix}/sbin'
40libexecdir='${exec_prefix}/libexec'
41datadir='${prefix}/share'
42sysconfdir='${prefix}/etc'
43sharedstatedir='${prefix}/com'
44localstatedir='${prefix}/var'
45libdir='${exec_prefix}/lib'
46includedir='${prefix}/include'
47oldincludedir='/usr/include'
48infodir='${prefix}/info'
49mandir='${prefix}/man'
50
51# Initialize some other variables.
52subdirs=
53MFLAGS= MAKEFLAGS=
54SHELL=${CONFIG_SHELL-/bin/sh}
55# Maximum number of lines to put in a shell here document.
56ac_max_here_lines=12
57
58ac_prev=
59for ac_option
60do
61
62  # If the previous option needs an argument, assign it.
63  if test -n "$ac_prev"; then
64    eval "$ac_prev=\$ac_option"
65    ac_prev=
66    continue
67  fi
68
69  case "$ac_option" in
70  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
71  *) ac_optarg= ;;
72  esac
73
74  # Accept the important Cygnus configure options, so we can diagnose typos.
75
76  case "$ac_option" in
77
78  -bindir | --bindir | --bindi | --bind | --bin | --bi)
79    ac_prev=bindir ;;
80  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
81    bindir="$ac_optarg" ;;
82
83  -build | --build | --buil | --bui | --bu)
84    ac_prev=build ;;
85  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
86    build="$ac_optarg" ;;
87
88  -cache-file | --cache-file | --cache-fil | --cache-fi \
89  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
90    ac_prev=cache_file ;;
91  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
92  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
93    cache_file="$ac_optarg" ;;
94
95  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
96    ac_prev=datadir ;;
97  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
98  | --da=*)
99    datadir="$ac_optarg" ;;
100
101  -disable-* | --disable-*)
102    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
103    # Reject names that are not valid shell variable names.
104    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
105      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
106    fi
107    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
108    eval "enable_${ac_feature}=no" ;;
109
110  -enable-* | --enable-*)
111    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
112    # Reject names that are not valid shell variable names.
113    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
114      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
115    fi
116    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
117    case "$ac_option" in
118      *=*) ;;
119      *) ac_optarg=yes ;;
120    esac
121    eval "enable_${ac_feature}='$ac_optarg'" ;;
122
123  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
124  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
125  | --exec | --exe | --ex)
126    ac_prev=exec_prefix ;;
127  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
128  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
129  | --exec=* | --exe=* | --ex=*)
130    exec_prefix="$ac_optarg" ;;
131
132  -gas | --gas | --ga | --g)
133    # Obsolete; use --with-gas.
134    with_gas=yes ;;
135
136  -help | --help | --hel | --he)
137    # Omit some internal or obsolete options to make the list less imposing.
138    # This message is too long to be a string in the A/UX 3.1 sh.
139    cat << EOF
140Usage: configure [options] [host]
141Options: [defaults in brackets after descriptions]
142Configuration:
143  --cache-file=FILE       cache test results in FILE
144  --help                  print this message
145  --no-create             do not create output files
146  --quiet, --silent       do not print \`checking...' messages
147  --version               print the version of autoconf that created configure
148Directory and file names:
149  --prefix=PREFIX         install architecture-independent files in PREFIX
150                          [$ac_default_prefix]
151  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
152                          [same as prefix]
153  --bindir=DIR            user executables in DIR [EPREFIX/bin]
154  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
155  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
156  --datadir=DIR           read-only architecture-independent data in DIR
157                          [PREFIX/share]
158  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
159  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
160                          [PREFIX/com]
161  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
162  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
163  --includedir=DIR        C header files in DIR [PREFIX/include]
164  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
165  --infodir=DIR           info documentation in DIR [PREFIX/info]
166  --mandir=DIR            man documentation in DIR [PREFIX/man]
167  --srcdir=DIR            find the sources in DIR [configure dir or ..]
168  --program-prefix=PREFIX prepend PREFIX to installed program names
169  --program-suffix=SUFFIX append SUFFIX to installed program names
170  --program-transform-name=PROGRAM
171                          run sed PROGRAM on installed program names
172EOF
173    cat << EOF
174Host type:
175  --build=BUILD           configure for building on BUILD [BUILD=HOST]
176  --host=HOST             configure for HOST [guessed]
177  --target=TARGET         configure for TARGET [TARGET=HOST]
178Features and packages:
179  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
180  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
181  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
182  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
183  --x-includes=DIR        X include files are in DIR
184  --x-libraries=DIR       X library files are in DIR
185EOF
186    if test -n "$ac_help"; then
187      echo "--enable and --with options recognized:$ac_help"
188    fi
189    exit 0 ;;
190
191  -host | --host | --hos | --ho)
192    ac_prev=host ;;
193  -host=* | --host=* | --hos=* | --ho=*)
194    host="$ac_optarg" ;;
195
196  -includedir | --includedir | --includedi | --included | --include \
197  | --includ | --inclu | --incl | --inc)
198    ac_prev=includedir ;;
199  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
200  | --includ=* | --inclu=* | --incl=* | --inc=*)
201    includedir="$ac_optarg" ;;
202
203  -infodir | --infodir | --infodi | --infod | --info | --inf)
204    ac_prev=infodir ;;
205  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
206    infodir="$ac_optarg" ;;
207
208  -libdir | --libdir | --libdi | --libd)
209    ac_prev=libdir ;;
210  -libdir=* | --libdir=* | --libdi=* | --libd=*)
211    libdir="$ac_optarg" ;;
212
213  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
214  | --libexe | --libex | --libe)
215    ac_prev=libexecdir ;;
216  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
217  | --libexe=* | --libex=* | --libe=*)
218    libexecdir="$ac_optarg" ;;
219
220  -localstatedir | --localstatedir | --localstatedi | --localstated \
221  | --localstate | --localstat | --localsta | --localst \
222  | --locals | --local | --loca | --loc | --lo)
223    ac_prev=localstatedir ;;
224  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
225  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
226  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
227    localstatedir="$ac_optarg" ;;
228
229  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
230    ac_prev=mandir ;;
231  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
232    mandir="$ac_optarg" ;;
233
234  -nfp | --nfp | --nf)
235    # Obsolete; use --without-fp.
236    with_fp=no ;;
237
238  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
239  | --no-cr | --no-c)
240    no_create=yes ;;
241
242  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
243  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
244    no_recursion=yes ;;
245
246  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
247  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
248  | --oldin | --oldi | --old | --ol | --o)
249    ac_prev=oldincludedir ;;
250  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
251  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
252  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
253    oldincludedir="$ac_optarg" ;;
254
255  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
256    ac_prev=prefix ;;
257  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
258    prefix="$ac_optarg" ;;
259
260  -program-prefix | --program-prefix | --program-prefi | --program-pref \
261  | --program-pre | --program-pr | --program-p)
262    ac_prev=program_prefix ;;
263  -program-prefix=* | --program-prefix=* | --program-prefi=* \
264  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
265    program_prefix="$ac_optarg" ;;
266
267  -program-suffix | --program-suffix | --program-suffi | --program-suff \
268  | --program-suf | --program-su | --program-s)
269    ac_prev=program_suffix ;;
270  -program-suffix=* | --program-suffix=* | --program-suffi=* \
271  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
272    program_suffix="$ac_optarg" ;;
273
274  -program-transform-name | --program-transform-name \
275  | --program-transform-nam | --program-transform-na \
276  | --program-transform-n | --program-transform- \
277  | --program-transform | --program-transfor \
278  | --program-transfo | --program-transf \
279  | --program-trans | --program-tran \
280  | --progr-tra | --program-tr | --program-t)
281    ac_prev=program_transform_name ;;
282  -program-transform-name=* | --program-transform-name=* \
283  | --program-transform-nam=* | --program-transform-na=* \
284  | --program-transform-n=* | --program-transform-=* \
285  | --program-transform=* | --program-transfor=* \
286  | --program-transfo=* | --program-transf=* \
287  | --program-trans=* | --program-tran=* \
288  | --progr-tra=* | --program-tr=* | --program-t=*)
289    program_transform_name="$ac_optarg" ;;
290
291  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
292  | -silent | --silent | --silen | --sile | --sil)
293    silent=yes ;;
294
295  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
296    ac_prev=sbindir ;;
297  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
298  | --sbi=* | --sb=*)
299    sbindir="$ac_optarg" ;;
300
301  -sharedstatedir | --sharedstatedir | --sharedstatedi \
302  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
303  | --sharedst | --shareds | --shared | --share | --shar \
304  | --sha | --sh)
305    ac_prev=sharedstatedir ;;
306  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
307  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
308  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
309  | --sha=* | --sh=*)
310    sharedstatedir="$ac_optarg" ;;
311
312  -site | --site | --sit)
313    ac_prev=site ;;
314  -site=* | --site=* | --sit=*)
315    site="$ac_optarg" ;;
316
317  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
318    ac_prev=srcdir ;;
319  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
320    srcdir="$ac_optarg" ;;
321
322  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
323  | --syscon | --sysco | --sysc | --sys | --sy)
324    ac_prev=sysconfdir ;;
325  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
326  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
327    sysconfdir="$ac_optarg" ;;
328
329  -target | --target | --targe | --targ | --tar | --ta | --t)
330    ac_prev=target ;;
331  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
332    target="$ac_optarg" ;;
333
334  -v | -verbose | --verbose | --verbos | --verbo | --verb)
335    verbose=yes ;;
336
337  -version | --version | --versio | --versi | --vers)
338    echo "configure generated by autoconf version 2.13"
339    exit 0 ;;
340
341  -with-* | --with-*)
342    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
343    # Reject names that are not valid shell variable names.
344    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
345      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
346    fi
347    ac_package=`echo $ac_package| sed 's/-/_/g'`
348    case "$ac_option" in
349      *=*) ;;
350      *) ac_optarg=yes ;;
351    esac
352    eval "with_${ac_package}='$ac_optarg'" ;;
353
354  -without-* | --without-*)
355    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
356    # Reject names that are not valid shell variable names.
357    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
358      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
359    fi
360    ac_package=`echo $ac_package| sed 's/-/_/g'`
361    eval "with_${ac_package}=no" ;;
362
363  --x)
364    # Obsolete; use --with-x.
365    with_x=yes ;;
366
367  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
368  | --x-incl | --x-inc | --x-in | --x-i)
369    ac_prev=x_includes ;;
370  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
371  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
372    x_includes="$ac_optarg" ;;
373
374  -x-libraries | --x-libraries | --x-librarie | --x-librari \
375  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
376    ac_prev=x_libraries ;;
377  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
378  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
379    x_libraries="$ac_optarg" ;;
380
381  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
382    ;;
383
384  *)
385    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
386      echo "configure: warning: $ac_option: invalid host type" 1>&2
387    fi
388    if test "x$nonopt" != xNONE; then
389      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
390    fi
391    nonopt="$ac_option"
392    ;;
393
394  esac
395done
396
397if test -n "$ac_prev"; then
398  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
399fi
400
401trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
402
403# File descriptor usage:
404# 0 standard input
405# 1 file creation
406# 2 errors and warnings
407# 3 some systems may open it to /dev/tty
408# 4 used on the Kubota Titan
409# 6 checking for... messages and results
410# 5 compiler messages saved in config.log
411if test "$silent" = yes; then
412  exec 6>/dev/null
413else
414  exec 6>&1
415fi
416exec 5>./config.log
417
418echo "\
419This file contains any messages produced by compilers while
420running configure, to aid debugging if configure makes a mistake.
421" 1>&5
422
423# Strip out --no-create and --no-recursion so they do not pile up.
424# Also quote any args containing shell metacharacters.
425ac_configure_args=
426for ac_arg
427do
428  case "$ac_arg" in
429  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
430  | --no-cr | --no-c) ;;
431  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
432  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
433  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
434  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
435  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
436  esac
437done
438
439# NLS nuisances.
440# Only set these to C if already set.  These must not be set unconditionally
441# because not all systems understand e.g. LANG=C (notably SCO).
442# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
443# Non-C LC_CTYPE values break the ctype check.
444if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
445if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
446if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
447if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
448
449# confdefs.h avoids OS command line length limits that DEFS can exceed.
450rm -rf conftest* confdefs.h
451# AIX cpp loses on an empty file, so make sure it contains at least a newline.
452echo > confdefs.h
453
454# A filename unique to this package, relative to the directory that
455# configure is in, which we can look for to find out if srcdir is correct.
456ac_unique_file=console.c
457
458# Find the source files, if location was not specified.
459if test -z "$srcdir"; then
460  ac_srcdir_defaulted=yes
461  # Try the directory containing this script, then its parent.
462  ac_prog=$0
463  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
464  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
465  srcdir=$ac_confdir
466  if test ! -r $srcdir/$ac_unique_file; then
467    srcdir=..
468  fi
469else
470  ac_srcdir_defaulted=no
471fi
472if test ! -r $srcdir/$ac_unique_file; then
473  if test "$ac_srcdir_defaulted" = yes; then
474    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
475  else
476    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
477  fi
478fi
479srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
480
481# Prefer explicitly selected file to automatically selected ones.
482if test -z "$CONFIG_SITE"; then
483  if test "x$prefix" != xNONE; then
484    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
485  else
486    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
487  fi
488fi
489for ac_site_file in $CONFIG_SITE; do
490  if test -r "$ac_site_file"; then
491    echo "loading site script $ac_site_file"
492    . "$ac_site_file"
493  fi
494done
495
496if test -r "$cache_file"; then
497  echo "loading cache $cache_file"
498  . $cache_file
499else
500  echo "creating cache $cache_file"
501  > $cache_file
502fi
503
504ac_ext=c
505# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
506ac_cpp='$CPP $CPPFLAGS'
507ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
508ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
509cross_compiling=$ac_cv_prog_cc_cross
510
511ac_exeext=
512ac_objext=o
513if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
514  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
515  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
516    ac_n= ac_c='
517' ac_t='	'
518  else
519    ac_n=-n ac_c= ac_t=
520  fi
521else
522  ac_n= ac_c='\c' ac_t=
523fi
524
525
526
527
528
529
530# Extract the first word of "gcc", so it can be a program name with args.
531set dummy gcc; ac_word=$2
532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
533echo "configure:534: checking for $ac_word" >&5
534if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
535  echo $ac_n "(cached) $ac_c" 1>&6
536else
537  if test -n "$CC"; then
538  ac_cv_prog_CC="$CC" # Let the user override the test.
539else
540  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
541  ac_dummy="$PATH"
542  for ac_dir in $ac_dummy; do
543    test -z "$ac_dir" && ac_dir=.
544    if test -f $ac_dir/$ac_word; then
545      ac_cv_prog_CC="gcc"
546      break
547    fi
548  done
549  IFS="$ac_save_ifs"
550fi
551fi
552CC="$ac_cv_prog_CC"
553if test -n "$CC"; then
554  echo "$ac_t""$CC" 1>&6
555else
556  echo "$ac_t""no" 1>&6
557fi
558
559if test -z "$CC"; then
560  # Extract the first word of "cc", so it can be a program name with args.
561set dummy cc; ac_word=$2
562echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
563echo "configure:564: checking for $ac_word" >&5
564if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
565  echo $ac_n "(cached) $ac_c" 1>&6
566else
567  if test -n "$CC"; then
568  ac_cv_prog_CC="$CC" # Let the user override the test.
569else
570  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
571  ac_prog_rejected=no
572  ac_dummy="$PATH"
573  for ac_dir in $ac_dummy; do
574    test -z "$ac_dir" && ac_dir=.
575    if test -f $ac_dir/$ac_word; then
576      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
577        ac_prog_rejected=yes
578	continue
579      fi
580      ac_cv_prog_CC="cc"
581      break
582    fi
583  done
584  IFS="$ac_save_ifs"
585if test $ac_prog_rejected = yes; then
586  # We found a bogon in the path, so make sure we never use it.
587  set dummy $ac_cv_prog_CC
588  shift
589  if test $# -gt 0; then
590    # We chose a different compiler from the bogus one.
591    # However, it has the same basename, so the bogon will be chosen
592    # first if we set CC to just the basename; use the full file name.
593    shift
594    set dummy "$ac_dir/$ac_word" "$@"
595    shift
596    ac_cv_prog_CC="$@"
597  fi
598fi
599fi
600fi
601CC="$ac_cv_prog_CC"
602if test -n "$CC"; then
603  echo "$ac_t""$CC" 1>&6
604else
605  echo "$ac_t""no" 1>&6
606fi
607
608  if test -z "$CC"; then
609    case "`uname -s`" in
610    *win32* | *WIN32*)
611      # Extract the first word of "cl", so it can be a program name with args.
612set dummy cl; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
614echo "configure:615: checking for $ac_word" >&5
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616  echo $ac_n "(cached) $ac_c" 1>&6
617else
618  if test -n "$CC"; then
619  ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
622  ac_dummy="$PATH"
623  for ac_dir in $ac_dummy; do
624    test -z "$ac_dir" && ac_dir=.
625    if test -f $ac_dir/$ac_word; then
626      ac_cv_prog_CC="cl"
627      break
628    fi
629  done
630  IFS="$ac_save_ifs"
631fi
632fi
633CC="$ac_cv_prog_CC"
634if test -n "$CC"; then
635  echo "$ac_t""$CC" 1>&6
636else
637  echo "$ac_t""no" 1>&6
638fi
639 ;;
640    esac
641  fi
642  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
643fi
644
645echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
646echo "configure:647: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
647
648ac_ext=c
649# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
650ac_cpp='$CPP $CPPFLAGS'
651ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
652ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
653cross_compiling=$ac_cv_prog_cc_cross
654
655cat > conftest.$ac_ext << EOF
656
657#line 658 "configure"
658#include "confdefs.h"
659
660main(){return(0);}
661EOF
662if { (eval echo configure:663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
663  ac_cv_prog_cc_works=yes
664  # If we can't run a trivial program, we are probably using a cross compiler.
665  if (./conftest; exit) 2>/dev/null; then
666    ac_cv_prog_cc_cross=no
667  else
668    ac_cv_prog_cc_cross=yes
669  fi
670else
671  echo "configure: failed program was:" >&5
672  cat conftest.$ac_ext >&5
673  ac_cv_prog_cc_works=no
674fi
675rm -fr conftest*
676ac_ext=c
677# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
678ac_cpp='$CPP $CPPFLAGS'
679ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
680ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
681cross_compiling=$ac_cv_prog_cc_cross
682
683echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
684if test $ac_cv_prog_cc_works = no; then
685  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
686fi
687echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
688echo "configure:689: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
689echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
690cross_compiling=$ac_cv_prog_cc_cross
691
692echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
693echo "configure:694: checking whether we are using GNU C" >&5
694if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
695  echo $ac_n "(cached) $ac_c" 1>&6
696else
697  cat > conftest.c <<EOF
698#ifdef __GNUC__
699  yes;
700#endif
701EOF
702if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
703  ac_cv_prog_gcc=yes
704else
705  ac_cv_prog_gcc=no
706fi
707fi
708
709echo "$ac_t""$ac_cv_prog_gcc" 1>&6
710
711if test $ac_cv_prog_gcc = yes; then
712  GCC=yes
713else
714  GCC=
715fi
716
717ac_test_CFLAGS="${CFLAGS+set}"
718ac_save_CFLAGS="$CFLAGS"
719CFLAGS=
720echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
721echo "configure:722: checking whether ${CC-cc} accepts -g" >&5
722if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
723  echo $ac_n "(cached) $ac_c" 1>&6
724else
725  echo 'void f(){}' > conftest.c
726if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
727  ac_cv_prog_cc_g=yes
728else
729  ac_cv_prog_cc_g=no
730fi
731rm -f conftest*
732
733fi
734
735echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
736if test "$ac_test_CFLAGS" = set; then
737  CFLAGS="$ac_save_CFLAGS"
738elif test $ac_cv_prog_cc_g = yes; then
739  if test "$GCC" = yes; then
740    CFLAGS="-g -O2"
741  else
742    CFLAGS="-g"
743  fi
744else
745  if test "$GCC" = yes; then
746    CFLAGS="-O2"
747  else
748    CFLAGS=
749  fi
750fi
751
752
753echo $ac_n "checking for EMX""... $ac_c" 1>&6
754echo "configure:755: checking for EMX" >&5
755if eval "test \"`echo '$''{'ac_cv_have_emx'+set}'`\" = set"; then
756  echo $ac_n "(cached) $ac_c" 1>&6
757else
758  cat > conftest.$ac_ext <<EOF
759#line 760 "configure"
760#include "confdefs.h"
761
762int main() {
763#ifndef __EMX__
764	kill me!
765	#endif 
766; return 0; }
767EOF
768if { (eval echo configure:769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
769  rm -rf conftest*
770  ac_cv_have_emx=yes
771else
772  echo "configure: failed program was:" >&5
773  cat conftest.$ac_ext >&5
774  rm -rf conftest*
775  ac_cv_have_emx=no
776fi
777rm -f conftest*
778
779fi
780
781echo "$ac_t""$ac_cv_have_emx" 1>&6
782if test "$ac_cv_have_emx" = yes; then
783	LDFLAGS="`echo "$LDFLAGS -Zsysv-signals -Zbin-files" | sed "s/-Zexe//g" | sed "s/-Zmt//g"`"
784	CFLAGS="`echo "$CFLAGS" | sed "s/-Zmt//g"`"
785fi
786
787echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
788echo "configure:789: checking for main in -lm" >&5
789ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
790if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
791  echo $ac_n "(cached) $ac_c" 1>&6
792else
793  ac_save_LIBS="$LIBS"
794LIBS="-lm  $LIBS"
795cat > conftest.$ac_ext <<EOF
796#line 797 "configure"
797#include "confdefs.h"
798
799int main() {
800main()
801; return 0; }
802EOF
803if { (eval echo configure:804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
804  rm -rf conftest*
805  eval "ac_cv_lib_$ac_lib_var=yes"
806else
807  echo "configure: failed program was:" >&5
808  cat conftest.$ac_ext >&5
809  rm -rf conftest*
810  eval "ac_cv_lib_$ac_lib_var=no"
811fi
812rm -f conftest*
813LIBS="$ac_save_LIBS"
814
815fi
816if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
817  echo "$ac_t""yes" 1>&6
818    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
819    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
820  cat >> confdefs.h <<EOF
821#define $ac_tr_lib 1
822EOF
823
824  LIBS="-lm $LIBS"
825
826else
827  echo "$ac_t""no" 1>&6
828fi
829
830
831echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
832echo "configure:833: checking how to run the C preprocessor" >&5
833# On Suns, sometimes $CPP names a directory.
834if test -n "$CPP" && test -d "$CPP"; then
835  CPP=
836fi
837if test -z "$CPP"; then
838if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
839  echo $ac_n "(cached) $ac_c" 1>&6
840else
841    # This must be in double quotes, not single quotes, because CPP may get
842  # substituted into the Makefile and "${CC-cc}" will confuse make.
843  CPP="${CC-cc} -E"
844  # On the NeXT, cc -E runs the code through the compiler's parser,
845  # not just through cpp.
846  cat > conftest.$ac_ext <<EOF
847#line 848 "configure"
848#include "confdefs.h"
849#include <assert.h>
850Syntax Error
851EOF
852ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
853{ (eval echo configure:854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
854ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
855if test -z "$ac_err"; then
856  :
857else
858  echo "$ac_err" >&5
859  echo "configure: failed program was:" >&5
860  cat conftest.$ac_ext >&5
861  rm -rf conftest*
862  CPP="${CC-cc} -E -traditional-cpp"
863  cat > conftest.$ac_ext <<EOF
864#line 865 "configure"
865#include "confdefs.h"
866#include <assert.h>
867Syntax Error
868EOF
869ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
870{ (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
871ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
872if test -z "$ac_err"; then
873  :
874else
875  echo "$ac_err" >&5
876  echo "configure: failed program was:" >&5
877  cat conftest.$ac_ext >&5
878  rm -rf conftest*
879  CPP="${CC-cc} -nologo -E"
880  cat > conftest.$ac_ext <<EOF
881#line 882 "configure"
882#include "confdefs.h"
883#include <assert.h>
884Syntax Error
885EOF
886ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
887{ (eval echo configure:888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
888ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
889if test -z "$ac_err"; then
890  :
891else
892  echo "$ac_err" >&5
893  echo "configure: failed program was:" >&5
894  cat conftest.$ac_ext >&5
895  rm -rf conftest*
896  CPP=/lib/cpp
897fi
898rm -f conftest*
899fi
900rm -f conftest*
901fi
902rm -f conftest*
903  ac_cv_prog_CPP="$CPP"
904fi
905  CPP="$ac_cv_prog_CPP"
906else
907  ac_cv_prog_CPP="$CPP"
908fi
909echo "$ac_t""$CPP" 1>&6
910
911echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
912echo "configure:913: checking for ANSI C header files" >&5
913if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
914  echo $ac_n "(cached) $ac_c" 1>&6
915else
916  cat > conftest.$ac_ext <<EOF
917#line 918 "configure"
918#include "confdefs.h"
919#include <stdlib.h>
920#include <stdarg.h>
921#include <string.h>
922#include <float.h>
923EOF
924ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
925{ (eval echo configure:926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
926ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
927if test -z "$ac_err"; then
928  rm -rf conftest*
929  ac_cv_header_stdc=yes
930else
931  echo "$ac_err" >&5
932  echo "configure: failed program was:" >&5
933  cat conftest.$ac_ext >&5
934  rm -rf conftest*
935  ac_cv_header_stdc=no
936fi
937rm -f conftest*
938
939if test $ac_cv_header_stdc = yes; then
940  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
941cat > conftest.$ac_ext <<EOF
942#line 943 "configure"
943#include "confdefs.h"
944#include <string.h>
945EOF
946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
947  egrep "memchr" >/dev/null 2>&1; then
948  :
949else
950  rm -rf conftest*
951  ac_cv_header_stdc=no
952fi
953rm -f conftest*
954
955fi
956
957if test $ac_cv_header_stdc = yes; then
958  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
959cat > conftest.$ac_ext <<EOF
960#line 961 "configure"
961#include "confdefs.h"
962#include <stdlib.h>
963EOF
964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
965  egrep "free" >/dev/null 2>&1; then
966  :
967else
968  rm -rf conftest*
969  ac_cv_header_stdc=no
970fi
971rm -f conftest*
972
973fi
974
975if test $ac_cv_header_stdc = yes; then
976  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
977if test "$cross_compiling" = yes; then
978  :
979else
980  cat > conftest.$ac_ext <<EOF
981#line 982 "configure"
982#include "confdefs.h"
983#include <ctype.h>
984#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
985#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
986#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
987int main () { int i; for (i = 0; i < 256; i++)
988if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
989exit (0); }
990
991EOF
992if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
993then
994  :
995else
996  echo "configure: failed program was:" >&5
997  cat conftest.$ac_ext >&5
998  rm -fr conftest*
999  ac_cv_header_stdc=no
1000fi
1001rm -fr conftest*
1002fi
1003
1004fi
1005fi
1006
1007echo "$ac_t""$ac_cv_header_stdc" 1>&6
1008if test $ac_cv_header_stdc = yes; then
1009  cat >> confdefs.h <<\EOF
1010#define STDC_HEADERS 1
1011EOF
1012
1013fi
1014
1015for ac_hdr in fcntl.h sys/ioctl.h sys/time.h unistd.h linux/vt.h linux/kd.h siginfo.h float.h sys/select.h
1016do
1017ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1018echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1019echo "configure:1020: checking for $ac_hdr" >&5
1020if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1021  echo $ac_n "(cached) $ac_c" 1>&6
1022else
1023  cat > conftest.$ac_ext <<EOF
1024#line 1025 "configure"
1025#include "confdefs.h"
1026#include <$ac_hdr>
1027EOF
1028ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1029{ (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1030ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1031if test -z "$ac_err"; then
1032  rm -rf conftest*
1033  eval "ac_cv_header_$ac_safe=yes"
1034else
1035  echo "$ac_err" >&5
1036  echo "configure: failed program was:" >&5
1037  cat conftest.$ac_ext >&5
1038  rm -rf conftest*
1039  eval "ac_cv_header_$ac_safe=no"
1040fi
1041rm -f conftest*
1042fi
1043if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1044  echo "$ac_t""yes" 1>&6
1045    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1046  cat >> confdefs.h <<EOF
1047#define $ac_tr_hdr 1
1048EOF
1049
1050else
1051  echo "$ac_t""no" 1>&6
1052fi
1053done
1054
1055
1056echo $ac_n "checking for working const""... $ac_c" 1>&6
1057echo "configure:1058: checking for working const" >&5
1058if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1059  echo $ac_n "(cached) $ac_c" 1>&6
1060else
1061  cat > conftest.$ac_ext <<EOF
1062#line 1063 "configure"
1063#include "confdefs.h"
1064
1065int main() {
1066
1067/* Ultrix mips cc rejects this.  */
1068typedef int charset[2]; const charset x = {0,0};
1069/* SunOS 4.1.1 cc rejects this.  */
1070char const *const *ccp;
1071char **p;
1072/* NEC SVR4.0.2 mips cc rejects this.  */
1073struct point {int x, y;};
1074static struct point const zero = {0,0};
1075/* AIX XL C 1.02.0.0 rejects this.
1076   It does not let you subtract one const X* pointer from another in an arm
1077   of an if-expression whose if-part is not a constant expression */
1078const char *g = "string";
1079ccp = &g + (g ? g-g : 0);
1080/* HPUX 7.0 cc rejects these. */
1081++ccp;
1082p = (char**) ccp;
1083ccp = (char const *const *) p;
1084{ /* SCO 3.2v4 cc rejects this.  */
1085  char *t;
1086  char const *s = 0 ? (char *) 0 : (char const *) 0;
1087
1088  *t++ = 0;
1089}
1090{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1091  int x[] = {25, 17};
1092  const int *foo = &x[0];
1093  ++foo;
1094}
1095{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1096  typedef const int *iptr;
1097  iptr p = 0;
1098  ++p;
1099}
1100{ /* AIX XL C 1.02.0.0 rejects this saying
1101     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1102  struct s { int j; const int *ap[3]; };
1103  struct s *b; b->j = 5;
1104}
1105{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1106  const int foo = 10;
1107}
1108
1109; return 0; }
1110EOF
1111if { (eval echo configure:1112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1112  rm -rf conftest*
1113  ac_cv_c_const=yes
1114else
1115  echo "configure: failed program was:" >&5
1116  cat conftest.$ac_ext >&5
1117  rm -rf conftest*
1118  ac_cv_c_const=no
1119fi
1120rm -f conftest*
1121fi
1122
1123echo "$ac_t""$ac_cv_c_const" 1>&6
1124if test $ac_cv_c_const = no; then
1125  cat >> confdefs.h <<\EOF
1126#define const
1127EOF
1128
1129fi
1130
1131echo $ac_n "checking for inline""... $ac_c" 1>&6
1132echo "configure:1133: checking for inline" >&5
1133if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1134  echo $ac_n "(cached) $ac_c" 1>&6
1135else
1136  ac_cv_c_inline=no
1137for ac_kw in inline __inline__ __inline; do
1138  cat > conftest.$ac_ext <<EOF
1139#line 1140 "configure"
1140#include "confdefs.h"
1141
1142int main() {
1143} int $ac_kw foo() {
1144; return 0; }
1145EOF
1146if { (eval echo configure:1147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1147  rm -rf conftest*
1148  ac_cv_c_inline=$ac_kw; break
1149else
1150  echo "configure: failed program was:" >&5
1151  cat conftest.$ac_ext >&5
1152fi
1153rm -f conftest*
1154done
1155
1156fi
1157
1158echo "$ac_t""$ac_cv_c_inline" 1>&6
1159case "$ac_cv_c_inline" in
1160  inline | yes) ;;
1161  no) cat >> confdefs.h <<\EOF
1162#define inline
1163EOF
1164 ;;
1165  *)  cat >> confdefs.h <<EOF
1166#define inline $ac_cv_c_inline
1167EOF
1168 ;;
1169esac
1170
1171echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1172echo "configure:1173: checking whether time.h and sys/time.h may both be included" >&5
1173if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1174  echo $ac_n "(cached) $ac_c" 1>&6
1175else
1176  cat > conftest.$ac_ext <<EOF
1177#line 1178 "configure"
1178#include "confdefs.h"
1179#include <sys/types.h>
1180#include <sys/time.h>
1181#include <time.h>
1182int main() {
1183struct tm *tp;
1184; return 0; }
1185EOF
1186if { (eval echo configure:1187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1187  rm -rf conftest*
1188  ac_cv_header_time=yes
1189else
1190  echo "configure: failed program was:" >&5
1191  cat conftest.$ac_ext >&5
1192  rm -rf conftest*
1193  ac_cv_header_time=no
1194fi
1195rm -f conftest*
1196fi
1197
1198echo "$ac_t""$ac_cv_header_time" 1>&6
1199if test $ac_cv_header_time = yes; then
1200  cat >> confdefs.h <<\EOF
1201#define TIME_WITH_SYS_TIME 1
1202EOF
1203
1204fi
1205
1206echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1207echo "configure:1208: checking whether struct tm is in sys/time.h or time.h" >&5
1208if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1209  echo $ac_n "(cached) $ac_c" 1>&6
1210else
1211  cat > conftest.$ac_ext <<EOF
1212#line 1213 "configure"
1213#include "confdefs.h"
1214#include <sys/types.h>
1215#include <time.h>
1216int main() {
1217struct tm *tp; tp->tm_sec;
1218; return 0; }
1219EOF
1220if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1221  rm -rf conftest*
1222  ac_cv_struct_tm=time.h
1223else
1224  echo "configure: failed program was:" >&5
1225  cat conftest.$ac_ext >&5
1226  rm -rf conftest*
1227  ac_cv_struct_tm=sys/time.h
1228fi
1229rm -f conftest*
1230fi
1231
1232echo "$ac_t""$ac_cv_struct_tm" 1>&6
1233if test $ac_cv_struct_tm = sys/time.h; then
1234  cat >> confdefs.h <<\EOF
1235#define TM_IN_SYS_TIME 1
1236EOF
1237
1238fi
1239
1240
1241if test $ac_cv_prog_gcc = yes; then
1242    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1243echo "configure:1244: checking whether ${CC-cc} needs -traditional" >&5
1244if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1245  echo $ac_n "(cached) $ac_c" 1>&6
1246else
1247    ac_pattern="Autoconf.*'x'"
1248  cat > conftest.$ac_ext <<EOF
1249#line 1250 "configure"
1250#include "confdefs.h"
1251#include <sgtty.h>
1252Autoconf TIOCGETP
1253EOF
1254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1255  egrep "$ac_pattern" >/dev/null 2>&1; then
1256  rm -rf conftest*
1257  ac_cv_prog_gcc_traditional=yes
1258else
1259  rm -rf conftest*
1260  ac_cv_prog_gcc_traditional=no
1261fi
1262rm -f conftest*
1263
1264
1265  if test $ac_cv_prog_gcc_traditional = no; then
1266    cat > conftest.$ac_ext <<EOF
1267#line 1268 "configure"
1268#include "confdefs.h"
1269#include <termio.h>
1270Autoconf TCGETA
1271EOF
1272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1273  egrep "$ac_pattern" >/dev/null 2>&1; then
1274  rm -rf conftest*
1275  ac_cv_prog_gcc_traditional=yes
1276fi
1277rm -f conftest*
1278
1279  fi
1280fi
1281
1282echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1283  if test $ac_cv_prog_gcc_traditional = yes; then
1284    CC="$CC -traditional"
1285  fi
1286fi
1287
1288echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1289echo "configure:1290: checking return type of signal handlers" >&5
1290if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1291  echo $ac_n "(cached) $ac_c" 1>&6
1292else
1293  cat > conftest.$ac_ext <<EOF
1294#line 1295 "configure"
1295#include "confdefs.h"
1296#include <sys/types.h>
1297#include <signal.h>
1298#ifdef signal
1299#undef signal
1300#endif
1301#ifdef __cplusplus
1302extern "C" void (*signal (int, void (*)(int)))(int);
1303#else
1304void (*signal ()) ();
1305#endif
1306
1307int main() {
1308int i;
1309; return 0; }
1310EOF
1311if { (eval echo configure:1312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1312  rm -rf conftest*
1313  ac_cv_type_signal=void
1314else
1315  echo "configure: failed program was:" >&5
1316  cat conftest.$ac_ext >&5
1317  rm -rf conftest*
1318  ac_cv_type_signal=int
1319fi
1320rm -f conftest*
1321fi
1322
1323echo "$ac_t""$ac_cv_type_signal" 1>&6
1324cat >> confdefs.h <<EOF
1325#define RETSIGTYPE $ac_cv_type_signal
1326EOF
1327
1328
1329for ac_func in gettimeofday select strtol strtoul getopt
1330do
1331echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1332echo "configure:1333: checking for $ac_func" >&5
1333if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1334  echo $ac_n "(cached) $ac_c" 1>&6
1335else
1336  cat > conftest.$ac_ext <<EOF
1337#line 1338 "configure"
1338#include "confdefs.h"
1339/* System header to define __stub macros and hopefully few prototypes,
1340    which can conflict with char $ac_func(); below.  */
1341#include <assert.h>
1342/* Override any gcc2 internal prototype to avoid an error.  */
1343/* We use char because int might match the return type of a gcc2
1344    builtin and then its argument prototype would still apply.  */
1345char $ac_func();
1346
1347int main() {
1348
1349/* The GNU C library defines this for functions which it implements
1350    to always fail with ENOSYS.  Some functions are actually named
1351    something starting with __ and the normal name is an alias.  */
1352#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1353choke me
1354#else
1355$ac_func();
1356#endif
1357
1358; return 0; }
1359EOF
1360if { (eval echo configure:1361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1361  rm -rf conftest*
1362  eval "ac_cv_func_$ac_func=yes"
1363else
1364  echo "configure: failed program was:" >&5
1365  cat conftest.$ac_ext >&5
1366  rm -rf conftest*
1367  eval "ac_cv_func_$ac_func=no"
1368fi
1369rm -f conftest*
1370fi
1371
1372if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1373  echo "$ac_t""yes" 1>&6
1374    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1375  cat >> confdefs.h <<EOF
1376#define $ac_tr_func 1
1377EOF
1378
1379else
1380  echo "$ac_t""no" 1>&6
1381fi
1382done
1383
1384
1385for ac_func in psignal
1386do
1387echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1388echo "configure:1389: checking for $ac_func" >&5
1389if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1390  echo $ac_n "(cached) $ac_c" 1>&6
1391else
1392  cat > conftest.$ac_ext <<EOF
1393#line 1394 "configure"
1394#include "confdefs.h"
1395/* System header to define __stub macros and hopefully few prototypes,
1396    which can conflict with char $ac_func(); below.  */
1397#include <assert.h>
1398/* Override any gcc2 internal prototype to avoid an error.  */
1399/* We use char because int might match the return type of a gcc2
1400    builtin and then its argument prototype would still apply.  */
1401char $ac_func();
1402
1403int main() {
1404
1405/* The GNU C library defines this for functions which it implements
1406    to always fail with ENOSYS.  Some functions are actually named
1407    something starting with __ and the normal name is an alias.  */
1408#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1409choke me
1410#else
1411$ac_func();
1412#endif
1413
1414; return 0; }
1415EOF
1416if { (eval echo configure:1417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1417  rm -rf conftest*
1418  eval "ac_cv_func_$ac_func=yes"
1419else
1420  echo "configure: failed program was:" >&5
1421  cat conftest.$ac_ext >&5
1422  rm -rf conftest*
1423  eval "ac_cv_func_$ac_func=no"
1424fi
1425rm -f conftest*
1426fi
1427
1428if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1429  echo "$ac_t""yes" 1>&6
1430    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1431  cat >> confdefs.h <<EOF
1432#define $ac_tr_func 1
1433EOF
1434
1435else
1436  echo "$ac_t""no" 1>&6
1437fi
1438done
1439
1440
1441echo $ac_n "checking for random""... $ac_c" 1>&6
1442echo "configure:1443: checking for random" >&5
1443if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then
1444  echo $ac_n "(cached) $ac_c" 1>&6
1445else
1446  cat > conftest.$ac_ext <<EOF
1447#line 1448 "configure"
1448#include "confdefs.h"
1449/* System header to define __stub macros and hopefully few prototypes,
1450    which can conflict with char random(); below.  */
1451#include <assert.h>
1452/* Override any gcc2 internal prototype to avoid an error.  */
1453/* We use char because int might match the return type of a gcc2
1454    builtin and then its argument prototype would still apply.  */
1455char random();
1456
1457int main() {
1458
1459/* The GNU C library defines this for functions which it implements
1460    to always fail with ENOSYS.  Some functions are actually named
1461    something starting with __ and the normal name is an alias.  */
1462#if defined (__stub_random) || defined (__stub___random)
1463choke me
1464#else
1465random();
1466#endif
1467
1468; return 0; }
1469EOF
1470if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1471  rm -rf conftest*
1472  eval "ac_cv_func_random=yes"
1473else
1474  echo "configure: failed program was:" >&5
1475  cat conftest.$ac_ext >&5
1476  rm -rf conftest*
1477  eval "ac_cv_func_random=no"
1478fi
1479rm -f conftest*
1480fi
1481
1482if eval "test \"`echo '$ac_cv_func_'random`\" = yes"; then
1483  echo "$ac_t""yes" 1>&6
1484  cf_result=yes
1485else
1486  echo "$ac_t""no" 1>&6
1487cf_result=no
1488fi
1489
1490if test "$cf_result" = no; then
1491	echo $ac_n "checking for random in -lbsd""... $ac_c" 1>&6
1492echo "configure:1493: checking for random in -lbsd" >&5
1493ac_lib_var=`echo bsd'_'random | 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="-lbsd  $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 random();
1506
1507int main() {
1508random()
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    ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1527    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1528  cat >> confdefs.h <<EOF
1529#define $ac_tr_lib 1
1530EOF
1531
1532  LIBS="-lbsd $LIBS"
1533
1534else
1535  echo "$ac_t""no" 1>&6
1536fi
1537
1538fi
1539
1540echo $ac_n "checking for srandom""... $ac_c" 1>&6
1541echo "configure:1542: checking for srandom" >&5
1542if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then
1543  echo $ac_n "(cached) $ac_c" 1>&6
1544else
1545  cat > conftest.$ac_ext <<EOF
1546#line 1547 "configure"
1547#include "confdefs.h"
1548/* System header to define __stub macros and hopefully few prototypes,
1549    which can conflict with char srandom(); below.  */
1550#include <assert.h>
1551/* Override any gcc2 internal prototype to avoid an error.  */
1552/* We use char because int might match the return type of a gcc2
1553    builtin and then its argument prototype would still apply.  */
1554char srandom();
1555
1556int main() {
1557
1558/* The GNU C library defines this for functions which it implements
1559    to always fail with ENOSYS.  Some functions are actually named
1560    something starting with __ and the normal name is an alias.  */
1561#if defined (__stub_srandom) || defined (__stub___srandom)
1562choke me
1563#else
1564srandom();
1565#endif
1566
1567; return 0; }
1568EOF
1569if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1570  rm -rf conftest*
1571  eval "ac_cv_func_srandom=yes"
1572else
1573  echo "configure: failed program was:" >&5
1574  cat conftest.$ac_ext >&5
1575  rm -rf conftest*
1576  eval "ac_cv_func_srandom=no"
1577fi
1578rm -f conftest*
1579fi
1580
1581if eval "test \"`echo '$ac_cv_func_'srandom`\" = yes"; then
1582  echo "$ac_t""yes" 1>&6
1583  cf_result=yes
1584else
1585  echo "$ac_t""no" 1>&6
1586cf_result=no
1587fi
1588
1589if test "$cf_result" = no; then
1590	echo $ac_n "checking for srandom in -lbsd""... $ac_c" 1>&6
1591echo "configure:1592: checking for srandom in -lbsd" >&5
1592ac_lib_var=`echo bsd'_'srandom | sed 'y%./+-%__p_%'`
1593if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1594  echo $ac_n "(cached) $ac_c" 1>&6
1595else
1596  ac_save_LIBS="$LIBS"
1597LIBS="-lbsd  $LIBS"
1598cat > conftest.$ac_ext <<EOF
1599#line 1600 "configure"
1600#include "confdefs.h"
1601/* Override any gcc2 internal prototype to avoid an error.  */
1602/* We use char because int might match the return type of a gcc2
1603    builtin and then its argument prototype would still apply.  */
1604char srandom();
1605
1606int main() {
1607srandom()
1608; return 0; }
1609EOF
1610if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1611  rm -rf conftest*
1612  eval "ac_cv_lib_$ac_lib_var=yes"
1613else
1614  echo "configure: failed program was:" >&5
1615  cat conftest.$ac_ext >&5
1616  rm -rf conftest*
1617  eval "ac_cv_lib_$ac_lib_var=no"
1618fi
1619rm -f conftest*
1620LIBS="$ac_save_LIBS"
1621
1622fi
1623if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1624  echo "$ac_t""yes" 1>&6
1625    ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1626    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1627  cat >> confdefs.h <<EOF
1628#define $ac_tr_lib 1
1629EOF
1630
1631  LIBS="-lbsd $LIBS"
1632
1633else
1634  echo "$ac_t""no" 1>&6
1635fi
1636
1637fi
1638
1639echo $ac_n "checking for socket""... $ac_c" 1>&6
1640echo "configure:1641: checking for socket" >&5
1641if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
1642  echo $ac_n "(cached) $ac_c" 1>&6
1643else
1644  cat > conftest.$ac_ext <<EOF
1645#line 1646 "configure"
1646#include "confdefs.h"
1647/* System header to define __stub macros and hopefully few prototypes,
1648    which can conflict with char socket(); below.  */
1649#include <assert.h>
1650/* Override any gcc2 internal prototype to avoid an error.  */
1651/* We use char because int might match the return type of a gcc2
1652    builtin and then its argument prototype would still apply.  */
1653char socket();
1654
1655int main() {
1656
1657/* The GNU C library defines this for functions which it implements
1658    to always fail with ENOSYS.  Some functions are actually named
1659    something starting with __ and the normal name is an alias.  */
1660#if defined (__stub_socket) || defined (__stub___socket)
1661choke me
1662#else
1663socket();
1664#endif
1665
1666; return 0; }
1667EOF
1668if { (eval echo configure:1669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1669  rm -rf conftest*
1670  eval "ac_cv_func_socket=yes"
1671else
1672  echo "configure: failed program was:" >&5
1673  cat conftest.$ac_ext >&5
1674  rm -rf conftest*
1675  eval "ac_cv_func_socket=no"
1676fi
1677rm -f conftest*
1678fi
1679
1680if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
1681  echo "$ac_t""yes" 1>&6
1682  cf_result=yes
1683else
1684  echo "$ac_t""no" 1>&6
1685cf_result=no
1686fi
1687
1688if test "$cf_result" = no; then
1689	echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1690echo "configure:1691: checking for socket in -lsocket" >&5
1691ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1692if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1693  echo $ac_n "(cached) $ac_c" 1>&6
1694else
1695  ac_save_LIBS="$LIBS"
1696LIBS="-lsocket  $LIBS"
1697cat > conftest.$ac_ext <<EOF
1698#line 1699 "configure"
1699#include "confdefs.h"
1700/* Override any gcc2 internal prototype to avoid an error.  */
1701/* We use char because int might match the return type of a gcc2
1702    builtin and then its argument prototype would still apply.  */
1703char socket();
1704
1705int main() {
1706socket()
1707; return 0; }
1708EOF
1709if { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1710  rm -rf conftest*
1711  eval "ac_cv_lib_$ac_lib_var=yes"
1712else
1713  echo "configure: failed program was:" >&5
1714  cat conftest.$ac_ext >&5
1715  rm -rf conftest*
1716  eval "ac_cv_lib_$ac_lib_var=no"
1717fi
1718rm -f conftest*
1719LIBS="$ac_save_LIBS"
1720
1721fi
1722if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1723  echo "$ac_t""yes" 1>&6
1724    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1725    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1726  cat >> confdefs.h <<EOF
1727#define $ac_tr_lib 1
1728EOF
1729
1730  LIBS="-lsocket $LIBS"
1731
1732else
1733  echo "$ac_t""no" 1>&6
1734fi
1735
1736fi
1737
1738echo $ac_n "checking for typeof""... $ac_c" 1>&6
1739echo "configure:1740: checking for typeof" >&5
1740if eval "test \"`echo '$''{'ac_cv_have_typeof'+set}'`\" = set"; then
1741  echo $ac_n "(cached) $ac_c" 1>&6
1742else
1743  cat > conftest.$ac_ext <<EOF
1744#line 1745 "configure"
1745#include "confdefs.h"
1746
1747int main() {
1748int a;
1749	typeof(a) b;
1750; return 0; }
1751EOF
1752if { (eval echo configure:1753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1753  rm -rf conftest*
1754  ac_cv_have_typeof=yes
1755else
1756  echo "configure: failed program was:" >&5
1757  cat conftest.$ac_ext >&5
1758  rm -rf conftest*
1759  ac_cv_have_typeof=no
1760fi
1761rm -f conftest*
1762
1763fi
1764
1765echo "$ac_t""$ac_cv_have_typeof" 1>&6
1766test "$ac_cv_have_typeof" = yes && cat >> confdefs.h <<\EOF
1767#define HAVE_TYPEOF 1
1768EOF
1769
1770
1771#AC_MSG_CHECKING([for gethostbyname])
1772#AC_TRY_LINK([#include <netdb.h>], [gethostbyname("")], cf_result=yes, cf_result=no)
1773#AC_MSG_RESULT($cf_result)
1774echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1775echo "configure:1776: checking for gethostbyname" >&5
1776if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1777  echo $ac_n "(cached) $ac_c" 1>&6
1778else
1779  cat > conftest.$ac_ext <<EOF
1780#line 1781 "configure"
1781#include "confdefs.h"
1782/* System header to define __stub macros and hopefully few prototypes,
1783    which can conflict with char gethostbyname(); below.  */
1784#include <assert.h>
1785/* Override any gcc2 internal prototype to avoid an error.  */
1786/* We use char because int might match the return type of a gcc2
1787    builtin and then its argument prototype would still apply.  */
1788char gethostbyname();
1789
1790int main() {
1791
1792/* The GNU C library defines this for functions which it implements
1793    to always fail with ENOSYS.  Some functions are actually named
1794    something starting with __ and the normal name is an alias.  */
1795#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1796choke me
1797#else
1798gethostbyname();
1799#endif
1800
1801; return 0; }
1802EOF
1803if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1804  rm -rf conftest*
1805  eval "ac_cv_func_gethostbyname=yes"
1806else
1807  echo "configure: failed program was:" >&5
1808  cat conftest.$ac_ext >&5
1809  rm -rf conftest*
1810  eval "ac_cv_func_gethostbyname=no"
1811fi
1812rm -f conftest*
1813fi
1814
1815if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1816  echo "$ac_t""yes" 1>&6
1817  cf_result=yes
1818else
1819  echo "$ac_t""no" 1>&6
1820cf_result=no
1821fi
1822
1823if test "$cf_result" = no; then
1824	echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
1825echo "configure:1826: checking for gethostbyname in -lsocket" >&5
1826ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
1827if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1828  echo $ac_n "(cached) $ac_c" 1>&6
1829else
1830  ac_save_LIBS="$LIBS"
1831LIBS="-lsocket  $LIBS"
1832cat > conftest.$ac_ext <<EOF
1833#line 1834 "configure"
1834#include "confdefs.h"
1835/* Override any gcc2 internal prototype to avoid an error.  */
1836/* We use char because int might match the return type of a gcc2
1837    builtin and then its argument prototype would still apply.  */
1838char gethostbyname();
1839
1840int main() {
1841gethostbyname()
1842; return 0; }
1843EOF
1844if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1845  rm -rf conftest*
1846  eval "ac_cv_lib_$ac_lib_var=yes"
1847else
1848  echo "configure: failed program was:" >&5
1849  cat conftest.$ac_ext >&5
1850  rm -rf conftest*
1851  eval "ac_cv_lib_$ac_lib_var=no"
1852fi
1853rm -f conftest*
1854LIBS="$ac_save_LIBS"
1855
1856fi
1857if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1858  echo "$ac_t""yes" 1>&6
1859  cf_result=yes
1860else
1861  echo "$ac_t""no" 1>&6
1862cf_result=no
1863fi
1864
1865	if test "$cf_result" = no; then
1866		echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1867echo "configure:1868: checking for gethostbyname in -lnsl" >&5
1868ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1869if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1870  echo $ac_n "(cached) $ac_c" 1>&6
1871else
1872  ac_save_LIBS="$LIBS"
1873LIBS="-lnsl  $LIBS"
1874cat > conftest.$ac_ext <<EOF
1875#line 1876 "configure"
1876#include "confdefs.h"
1877/* Override any gcc2 internal prototype to avoid an error.  */
1878/* We use char because int might match the return type of a gcc2
1879    builtin and then its argument prototype would still apply.  */
1880char gethostbyname();
1881
1882int main() {
1883gethostbyname()
1884; return 0; }
1885EOF
1886if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1887  rm -rf conftest*
1888  eval "ac_cv_lib_$ac_lib_var=yes"
1889else
1890  echo "configure: failed program was:" >&5
1891  cat conftest.$ac_ext >&5
1892  rm -rf conftest*
1893  eval "ac_cv_lib_$ac_lib_var=no"
1894fi
1895rm -f conftest*
1896LIBS="$ac_save_LIBS"
1897
1898fi
1899if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1900  echo "$ac_t""yes" 1>&6
1901    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1902    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1903  cat >> confdefs.h <<EOF
1904#define $ac_tr_lib 1
1905EOF
1906
1907  LIBS="-lnsl $LIBS"
1908
1909else
1910  echo "$ac_t""no" 1>&6
1911fi
1912
1913	else
1914		test -z "`echo $LIBS | grep -- -lsocket`" && LIBS="$LIBS -lsocket"
1915	fi
1916fi
1917
1918if test "$with_x" = yes ; then
1919	if test "$ac_cv_have_emx" = yes && test -n "$X11ROOT"; then
1920		CFLAGS="$CFLAGS -I$X11ROOT/XFree86/include"
1921		LDFLAGS="$LDFLAGS -L$X11ROOT/XFree86/lib"
1922	fi
1923	# If we find X, set shell vars x_includes and x_libraries to the
1924# paths, otherwise set no_x=yes.
1925# Uses ac_ vars as temps to allow command line to override cache and checks.
1926# --without-x overrides everything else, but does not touch the cache.
1927echo $ac_n "checking for X""... $ac_c" 1>&6
1928echo "configure:1929: checking for X" >&5
1929
1930# Check whether --with-x or --without-x was given.
1931if test "${with_x+set}" = set; then
1932  withval="$with_x"
1933  :
1934fi
1935
1936# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1937if test "x$with_x" = xno; then
1938  # The user explicitly disabled X.
1939  have_x=disabled
1940else
1941  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1942    # Both variables are already set.
1943    have_x=yes
1944  else
1945if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1946  echo $ac_n "(cached) $ac_c" 1>&6
1947else
1948  # One or both of the vars are not set, and there is no cached value.
1949ac_x_includes=NO ac_x_libraries=NO
1950rm -fr conftestdir
1951if mkdir conftestdir; then
1952  cd conftestdir
1953  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1954  cat > Imakefile <<'EOF'
1955acfindx:
1956	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1957EOF
1958  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1959    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1960    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1961    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1962    for ac_extension in a so sl; do
1963      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1964        test -f $ac_im_libdir/libX11.$ac_extension; then
1965        ac_im_usrlibdir=$ac_im_libdir; break
1966      fi
1967    done
1968    # Screen out bogus values from the imake configuration.  They are
1969    # bogus both because they are the default anyway, and because
1970    # using them would break gcc on systems where it needs fixed includes.
1971    case "$ac_im_incroot" in
1972	/usr/include) ;;
1973	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1974    esac
1975    case "$ac_im_usrlibdir" in
1976	/usr/lib | /lib) ;;
1977	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1978    esac
1979  fi
1980  cd ..
1981  rm -fr conftestdir
1982fi
1983
1984if test "$ac_x_includes" = NO; then
1985  # Guess where to find include files, by looking for this one X11 .h file.
1986  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1987
1988  # First, try using that file with no special directory specified.
1989cat > conftest.$ac_ext <<EOF
1990#line 1991 "configure"
1991#include "confdefs.h"
1992#include <$x_direct_test_include>
1993EOF
1994ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1995{ (eval echo configure:1996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1996ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1997if test -z "$ac_err"; then
1998  rm -rf conftest*
1999  # We can compile using X headers with no special include directory.
2000ac_x_includes=
2001else
2002  echo "$ac_err" >&5
2003  echo "configure: failed program was:" >&5
2004  cat conftest.$ac_ext >&5
2005  rm -rf conftest*
2006  # Look for the header file in a standard set of common directories.
2007# Check X11 before X11Rn because it is often a symlink to the current release.
2008  for ac_dir in               \
2009    /usr/X11/include          \
2010    /usr/X11R6/include        \
2011    /usr/X11R5/include        \
2012    /usr/X11R4/include        \
2013                              \
2014    /usr/include/X11          \
2015    /usr/include/X11R6        \
2016    /usr/include/X11R5        \
2017    /usr/include/X11R4        \
2018                              \
2019    /usr/local/X11/include    \
2020    /usr/local/X11R6/include  \
2021    /usr/local/X11R5/include  \
2022    /usr/local/X11R4/include  \
2023                              \
2024    /usr/local/include/X11    \
2025    /usr/local/include/X11R6  \
2026    /usr/local/include/X11R5  \
2027    /usr/local/include/X11R4  \
2028                              \
2029    /usr/X386/include         \
2030    /usr/x386/include         \
2031    /usr/XFree86/include/X11  \
2032                              \
2033    /usr/include              \
2034    /usr/local/include        \
2035    /usr/unsupported/include  \
2036    /usr/athena/include       \
2037    /usr/local/x11r5/include  \
2038    /usr/lpp/Xamples/include  \
2039                              \
2040    /usr/openwin/include      \
2041    /usr/openwin/share/include \
2042    ; \
2043  do
2044    if test -r "$ac_dir/$x_direct_test_include"; then
2045      ac_x_includes=$ac_dir
2046      break
2047    fi
2048  done
2049fi
2050rm -f conftest*
2051fi # $ac_x_includes = NO
2052
2053if test "$ac_x_libraries" = NO; then
2054  # Check for the libraries.
2055
2056  test -z "$x_direct_test_library" && x_direct_test_library=Xt
2057  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2058
2059  # See if we find them without any special options.
2060  # Don't add to $LIBS permanently.
2061  ac_save_LIBS="$LIBS"
2062  LIBS="-l$x_direct_test_library $LIBS"
2063cat > conftest.$ac_ext <<EOF
2064#line 2065 "configure"
2065#include "confdefs.h"
2066
2067int main() {
2068${x_direct_test_function}()
2069; return 0; }
2070EOF
2071if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2072  rm -rf conftest*
2073  LIBS="$ac_save_LIBS"
2074# We can link X programs with no special library path.
2075ac_x_libraries=
2076else
2077  echo "configure: failed program was:" >&5
2078  cat conftest.$ac_ext >&5
2079  rm -rf conftest*
2080  LIBS="$ac_save_LIBS"
2081# First see if replacing the include by lib works.
2082# Check X11 before X11Rn because it is often a symlink to the current release.
2083for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2084    /usr/X11/lib          \
2085    /usr/X11R6/lib        \
2086    /usr/X11R5/lib        \
2087    /usr/X11R4/lib        \
2088                          \
2089    /usr/lib/X11          \
2090    /usr/lib/X11R6        \
2091    /usr/lib/X11R5        \
2092    /usr/lib/X11R4        \
2093                          \
2094    /usr/local/X11/lib    \
2095    /usr/local/X11R6/lib  \
2096    /usr/local/X11R5/lib  \
2097    /usr/local/X11R4/lib  \
2098                          \
2099    /usr/local/lib/X11    \
2100    /usr/local/lib/X11R6  \
2101    /usr/local/lib/X11R5  \
2102    /usr/local/lib/X11R4  \
2103                          \
2104    /usr/X386/lib         \
2105    /usr/x386/lib         \
2106    /usr/XFree86/lib/X11  \
2107                          \
2108    /usr/lib              \
2109    /usr/local/lib        \
2110    /usr/unsupported/lib  \
2111    /usr/athena/lib       \
2112    /usr/local/x11r5/lib  \
2113    /usr/lpp/Xamples/lib  \
2114    /lib/usr/lib/X11	  \
2115                          \
2116    /usr/openwin/lib      \
2117    /usr/openwin/share/lib \
2118    ; \
2119do
2120  for ac_extension in a so sl; do
2121    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2122      ac_x_libraries=$ac_dir
2123      break 2
2124    fi
2125  done
2126done
2127fi
2128rm -f conftest*
2129fi # $ac_x_libraries = NO
2130
2131if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2132  # Didn't find X anywhere.  Cache the known absence of X.
2133  ac_cv_have_x="have_x=no"
2134else
2135  # Record where we found X for the cache.
2136  ac_cv_have_x="have_x=yes \
2137	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2138fi
2139fi
2140  fi
2141  eval "$ac_cv_have_x"
2142fi # $with_x != no
2143
2144if test "$have_x" != yes; then
2145  echo "$ac_t""$have_x" 1>&6
2146  no_x=yes
2147else
2148  # If each of the values was on the command line, it overrides each guess.
2149  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2150  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2151  # Update the cache value to reflect the command line values.
2152  ac_cv_have_x="have_x=yes \
2153		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2154  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2155fi
2156
2157if test "$no_x" = yes; then
2158  # Not all programs may use this symbol, but it does not hurt to define it.
2159  cat >> confdefs.h <<\EOF
2160#define X_DISPLAY_MISSING 1
2161EOF
2162
2163  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2164else
2165  if test -n "$x_includes"; then
2166    X_CFLAGS="$X_CFLAGS -I$x_includes"
2167  fi
2168
2169  # It would also be nice to do this for all -L options, not just this one.
2170  if test -n "$x_libraries"; then
2171    X_LIBS="$X_LIBS -L$x_libraries"
2172    # For Solaris; some versions of Sun CC require a space after -R and
2173    # others require no space.  Words are not sufficient . . . .
2174    case "`(uname -sr) 2>/dev/null`" in
2175    "SunOS 5"*)
2176      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2177echo "configure:2178: checking whether -R must be followed by a space" >&5
2178      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2179      cat > conftest.$ac_ext <<EOF
2180#line 2181 "configure"
2181#include "confdefs.h"
2182
2183int main() {
2184
2185; return 0; }
2186EOF
2187if { (eval echo configure:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2188  rm -rf conftest*
2189  ac_R_nospace=yes
2190else
2191  echo "configure: failed program was:" >&5
2192  cat conftest.$ac_ext >&5
2193  rm -rf conftest*
2194  ac_R_nospace=no
2195fi
2196rm -f conftest*
2197      if test $ac_R_nospace = yes; then
2198	echo "$ac_t""no" 1>&6
2199	X_LIBS="$X_LIBS -R$x_libraries"
2200      else
2201	LIBS="$ac_xsave_LIBS -R $x_libraries"
2202	cat > conftest.$ac_ext <<EOF
2203#line 2204 "configure"
2204#include "confdefs.h"
2205
2206int main() {
2207
2208; return 0; }
2209EOF
2210if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2211  rm -rf conftest*
2212  ac_R_space=yes
2213else
2214  echo "configure: failed program was:" >&5
2215  cat conftest.$ac_ext >&5
2216  rm -rf conftest*
2217  ac_R_space=no
2218fi
2219rm -f conftest*
2220	if test $ac_R_space = yes; then
2221	  echo "$ac_t""yes" 1>&6
2222	  X_LIBS="$X_LIBS -R $x_libraries"
2223	else
2224	  echo "$ac_t""neither works" 1>&6
2225	fi
2226      fi
2227      LIBS="$ac_xsave_LIBS"
2228    esac
2229  fi
2230
2231  # Check for system-dependent libraries X programs must link with.
2232  # Do this before checking for the system-independent R6 libraries
2233  # (-lICE), since we may need -lsocket or whatever for X linking.
2234
2235  if test "$ISC" = yes; then
2236    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2237  else
2238    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2239    # libraries were built with DECnet support.  And karl@cs.umb.edu says
2240    # the Alpha needs dnet_stub (dnet does not exist).
2241    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2242echo "configure:2243: checking for dnet_ntoa in -ldnet" >&5
2243ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2244if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2245  echo $ac_n "(cached) $ac_c" 1>&6
2246else
2247  ac_save_LIBS="$LIBS"
2248LIBS="-ldnet  $LIBS"
2249cat > conftest.$ac_ext <<EOF
2250#line 2251 "configure"
2251#include "confdefs.h"
2252/* Override any gcc2 internal prototype to avoid an error.  */
2253/* We use char because int might match the return type of a gcc2
2254    builtin and then its argument prototype would still apply.  */
2255char dnet_ntoa();
2256
2257int main() {
2258dnet_ntoa()
2259; return 0; }
2260EOF
2261if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2262  rm -rf conftest*
2263  eval "ac_cv_lib_$ac_lib_var=yes"
2264else
2265  echo "configure: failed program was:" >&5
2266  cat conftest.$ac_ext >&5
2267  rm -rf conftest*
2268  eval "ac_cv_lib_$ac_lib_var=no"
2269fi
2270rm -f conftest*
2271LIBS="$ac_save_LIBS"
2272
2273fi
2274if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2275  echo "$ac_t""yes" 1>&6
2276  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2277else
2278  echo "$ac_t""no" 1>&6
2279fi
2280
2281    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2282      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2283echo "configure:2284: checking for dnet_ntoa in -ldnet_stub" >&5
2284ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2285if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2286  echo $ac_n "(cached) $ac_c" 1>&6
2287else
2288  ac_save_LIBS="$LIBS"
2289LIBS="-ldnet_stub  $LIBS"
2290cat > conftest.$ac_ext <<EOF
2291#line 2292 "configure"
2292#include "confdefs.h"
2293/* Override any gcc2 internal prototype to avoid an error.  */
2294/* We use char because int might match the return type of a gcc2
2295    builtin and then its argument prototype would still apply.  */
2296char dnet_ntoa();
2297
2298int main() {
2299dnet_ntoa()
2300; return 0; }
2301EOF
2302if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2303  rm -rf conftest*
2304  eval "ac_cv_lib_$ac_lib_var=yes"
2305else
2306  echo "configure: failed program was:" >&5
2307  cat conftest.$ac_ext >&5
2308  rm -rf conftest*
2309  eval "ac_cv_lib_$ac_lib_var=no"
2310fi
2311rm -f conftest*
2312LIBS="$ac_save_LIBS"
2313
2314fi
2315if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2316  echo "$ac_t""yes" 1>&6
2317  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2318else
2319  echo "$ac_t""no" 1>&6
2320fi
2321
2322    fi
2323
2324    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2325    # to get the SysV transport functions.
2326    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2327    # needs -lnsl.
2328    # The nsl library prevents programs from opening the X display
2329    # on Irix 5.2, according to dickey@clark.net.
2330    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2331echo "configure:2332: checking for gethostbyname" >&5
2332if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2333  echo $ac_n "(cached) $ac_c" 1>&6
2334else
2335  cat > conftest.$ac_ext <<EOF
2336#line 2337 "configure"
2337#include "confdefs.h"
2338/* System header to define __stub macros and hopefully few prototypes,
2339    which can conflict with char gethostbyname(); below.  */
2340#include <assert.h>
2341/* Override any gcc2 internal prototype to avoid an error.  */
2342/* We use char because int might match the return type of a gcc2
2343    builtin and then its argument prototype would still apply.  */
2344char gethostbyname();
2345
2346int main() {
2347
2348/* The GNU C library defines this for functions which it implements
2349    to always fail with ENOSYS.  Some functions are actually named
2350    something starting with __ and the normal name is an alias.  */
2351#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2352choke me
2353#else
2354gethostbyname();
2355#endif
2356
2357; return 0; }
2358EOF
2359if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2360  rm -rf conftest*
2361  eval "ac_cv_func_gethostbyname=yes"
2362else
2363  echo "configure: failed program was:" >&5
2364  cat conftest.$ac_ext >&5
2365  rm -rf conftest*
2366  eval "ac_cv_func_gethostbyname=no"
2367fi
2368rm -f conftest*
2369fi
2370
2371if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2372  echo "$ac_t""yes" 1>&6
2373  :
2374else
2375  echo "$ac_t""no" 1>&6
2376fi
2377
2378    if test $ac_cv_func_gethostbyname = no; then
2379      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2380echo "configure:2381: checking for gethostbyname in -lnsl" >&5
2381ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2382if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2383  echo $ac_n "(cached) $ac_c" 1>&6
2384else
2385  ac_save_LIBS="$LIBS"
2386LIBS="-lnsl  $LIBS"
2387cat > conftest.$ac_ext <<EOF
2388#line 2389 "configure"
2389#include "confdefs.h"
2390/* Override any gcc2 internal prototype to avoid an error.  */
2391/* We use char because int might match the return type of a gcc2
2392    builtin and then its argument prototype would still apply.  */
2393char gethostbyname();
2394
2395int main() {
2396gethostbyname()
2397; return 0; }
2398EOF
2399if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2400  rm -rf conftest*
2401  eval "ac_cv_lib_$ac_lib_var=yes"
2402else
2403  echo "configure: failed program was:" >&5
2404  cat conftest.$ac_ext >&5
2405  rm -rf conftest*
2406  eval "ac_cv_lib_$ac_lib_var=no"
2407fi
2408rm -f conftest*
2409LIBS="$ac_save_LIBS"
2410
2411fi
2412if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2413  echo "$ac_t""yes" 1>&6
2414  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2415else
2416  echo "$ac_t""no" 1>&6
2417fi
2418
2419    fi
2420
2421    # lieder@skyler.mavd.honeywell.com says without -lsocket,
2422    # socket/setsockopt and other routines are undefined under SCO ODT
2423    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
2424    # on later versions), says simon@lia.di.epfl.ch: it contains
2425    # gethostby* variants that don't use the nameserver (or something).
2426    # -lsocket must be given before -lnsl if both are needed.
2427    # We assume that if connect needs -lnsl, so does gethostbyname.
2428    echo $ac_n "checking for connect""... $ac_c" 1>&6
2429echo "configure:2430: checking for connect" >&5
2430if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2431  echo $ac_n "(cached) $ac_c" 1>&6
2432else
2433  cat > conftest.$ac_ext <<EOF
2434#line 2435 "configure"
2435#include "confdefs.h"
2436/* System header to define __stub macros and hopefully few prototypes,
2437    which can conflict with char connect(); below.  */
2438#include <assert.h>
2439/* Override any gcc2 internal prototype to avoid an error.  */
2440/* We use char because int might match the return type of a gcc2
2441    builtin and then its argument prototype would still apply.  */
2442char connect();
2443
2444int main() {
2445
2446/* The GNU C library defines this for functions which it implements
2447    to always fail with ENOSYS.  Some functions are actually named
2448    something starting with __ and the normal name is an alias.  */
2449#if defined (__stub_connect) || defined (__stub___connect)
2450choke me
2451#else
2452connect();
2453#endif
2454
2455; return 0; }
2456EOF
2457if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2458  rm -rf conftest*
2459  eval "ac_cv_func_connect=yes"
2460else
2461  echo "configure: failed program was:" >&5
2462  cat conftest.$ac_ext >&5
2463  rm -rf conftest*
2464  eval "ac_cv_func_connect=no"
2465fi
2466rm -f conftest*
2467fi
2468
2469if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2470  echo "$ac_t""yes" 1>&6
2471  :
2472else
2473  echo "$ac_t""no" 1>&6
2474fi
2475
2476    if test $ac_cv_func_connect = no; then
2477      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2478echo "configure:2479: checking for connect in -lsocket" >&5
2479ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2480if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2481  echo $ac_n "(cached) $ac_c" 1>&6
2482else
2483  ac_save_LIBS="$LIBS"
2484LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2485cat > conftest.$ac_ext <<EOF
2486#line 2487 "configure"
2487#include "confdefs.h"
2488/* Override any gcc2 internal prototype to avoid an error.  */
2489/* We use char because int might match the return type of a gcc2
2490    builtin and then its argument prototype would still apply.  */
2491char connect();
2492
2493int main() {
2494connect()
2495; return 0; }
2496EOF
2497if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2498  rm -rf conftest*
2499  eval "ac_cv_lib_$ac_lib_var=yes"
2500else
2501  echo "configure: failed program was:" >&5
2502  cat conftest.$ac_ext >&5
2503  rm -rf conftest*
2504  eval "ac_cv_lib_$ac_lib_var=no"
2505fi
2506rm -f conftest*
2507LIBS="$ac_save_LIBS"
2508
2509fi
2510if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2511  echo "$ac_t""yes" 1>&6
2512  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2513else
2514  echo "$ac_t""no" 1>&6
2515fi
2516
2517    fi
2518
2519    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2520    echo $ac_n "checking for remove""... $ac_c" 1>&6
2521echo "configure:2522: checking for remove" >&5
2522if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2523  echo $ac_n "(cached) $ac_c" 1>&6
2524else
2525  cat > conftest.$ac_ext <<EOF
2526#line 2527 "configure"
2527#include "confdefs.h"
2528/* System header to define __stub macros and hopefully few prototypes,
2529    which can conflict with char remove(); below.  */
2530#include <assert.h>
2531/* Override any gcc2 internal prototype to avoid an error.  */
2532/* We use char because int might match the return type of a gcc2
2533    builtin and then its argument prototype would still apply.  */
2534char remove();
2535
2536int main() {
2537
2538/* The GNU C library defines this for functions which it implements
2539    to always fail with ENOSYS.  Some functions are actually named
2540    something starting with __ and the normal name is an alias.  */
2541#if defined (__stub_remove) || defined (__stub___remove)
2542choke me
2543#else
2544remove();
2545#endif
2546
2547; return 0; }
2548EOF
2549if { (eval echo configure:2550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2550  rm -rf conftest*
2551  eval "ac_cv_func_remove=yes"
2552else
2553  echo "configure: failed program was:" >&5
2554  cat conftest.$ac_ext >&5
2555  rm -rf conftest*
2556  eval "ac_cv_func_remove=no"
2557fi
2558rm -f conftest*
2559fi
2560
2561if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2562  echo "$ac_t""yes" 1>&6
2563  :
2564else
2565  echo "$ac_t""no" 1>&6
2566fi
2567
2568    if test $ac_cv_func_remove = no; then
2569      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2570echo "configure:2571: checking for remove in -lposix" >&5
2571ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2572if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2573  echo $ac_n "(cached) $ac_c" 1>&6
2574else
2575  ac_save_LIBS="$LIBS"
2576LIBS="-lposix  $LIBS"
2577cat > conftest.$ac_ext <<EOF
2578#line 2579 "configure"
2579#include "confdefs.h"
2580/* Override any gcc2 internal prototype to avoid an error.  */
2581/* We use char because int might match the return type of a gcc2
2582    builtin and then its argument prototype would still apply.  */
2583char remove();
2584
2585int main() {
2586remove()
2587; return 0; }
2588EOF
2589if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2590  rm -rf conftest*
2591  eval "ac_cv_lib_$ac_lib_var=yes"
2592else
2593  echo "configure: failed program was:" >&5
2594  cat conftest.$ac_ext >&5
2595  rm -rf conftest*
2596  eval "ac_cv_lib_$ac_lib_var=no"
2597fi
2598rm -f conftest*
2599LIBS="$ac_save_LIBS"
2600
2601fi
2602if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2603  echo "$ac_t""yes" 1>&6
2604  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2605else
2606  echo "$ac_t""no" 1>&6
2607fi
2608
2609    fi
2610
2611    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2612    echo $ac_n "checking for shmat""... $ac_c" 1>&6
2613echo "configure:2614: checking for shmat" >&5
2614if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2615  echo $ac_n "(cached) $ac_c" 1>&6
2616else
2617  cat > conftest.$ac_ext <<EOF
2618#line 2619 "configure"
2619#include "confdefs.h"
2620/* System header to define __stub macros and hopefully few prototypes,
2621    which can conflict with char shmat(); below.  */
2622#include <assert.h>
2623/* Override any gcc2 internal prototype to avoid an error.  */
2624/* We use char because int might match the return type of a gcc2
2625    builtin and then its argument prototype would still apply.  */
2626char shmat();
2627
2628int main() {
2629
2630/* The GNU C library defines this for functions which it implements
2631    to always fail with ENOSYS.  Some functions are actually named
2632    something starting with __ and the normal name is an alias.  */
2633#if defined (__stub_shmat) || defined (__stub___shmat)
2634choke me
2635#else
2636shmat();
2637#endif
2638
2639; return 0; }
2640EOF
2641if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2642  rm -rf conftest*
2643  eval "ac_cv_func_shmat=yes"
2644else
2645  echo "configure: failed program was:" >&5
2646  cat conftest.$ac_ext >&5
2647  rm -rf conftest*
2648  eval "ac_cv_func_shmat=no"
2649fi
2650rm -f conftest*
2651fi
2652
2653if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2654  echo "$ac_t""yes" 1>&6
2655  :
2656else
2657  echo "$ac_t""no" 1>&6
2658fi
2659
2660    if test $ac_cv_func_shmat = no; then
2661      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2662echo "configure:2663: checking for shmat in -lipc" >&5
2663ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2664if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2665  echo $ac_n "(cached) $ac_c" 1>&6
2666else
2667  ac_save_LIBS="$LIBS"
2668LIBS="-lipc  $LIBS"
2669cat > conftest.$ac_ext <<EOF
2670#line 2671 "configure"
2671#include "confdefs.h"
2672/* Override any gcc2 internal prototype to avoid an error.  */
2673/* We use char because int might match the return type of a gcc2
2674    builtin and then its argument prototype would still apply.  */
2675char shmat();
2676
2677int main() {
2678shmat()
2679; return 0; }
2680EOF
2681if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2682  rm -rf conftest*
2683  eval "ac_cv_lib_$ac_lib_var=yes"
2684else
2685  echo "configure: failed program was:" >&5
2686  cat conftest.$ac_ext >&5
2687  rm -rf conftest*
2688  eval "ac_cv_lib_$ac_lib_var=no"
2689fi
2690rm -f conftest*
2691LIBS="$ac_save_LIBS"
2692
2693fi
2694if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2695  echo "$ac_t""yes" 1>&6
2696  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2697else
2698  echo "$ac_t""no" 1>&6
2699fi
2700
2701    fi
2702  fi
2703
2704  # Check for libraries that X11R6 Xt/Xaw programs need.
2705  ac_save_LDFLAGS="$LDFLAGS"
2706  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2707  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
2708  # check for ICE first), but we must link in the order -lSM -lICE or
2709  # we get undefined symbols.  So assume we have SM if we have ICE.
2710  # These have to be linked with before -lX11, unlike the other
2711  # libraries we check for below, so use a different variable.
2712  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
2713  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
2714echo "configure:2715: checking for IceConnectionNumber in -lICE" >&5
2715ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
2716if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2717  echo $ac_n "(cached) $ac_c" 1>&6
2718else
2719  ac_save_LIBS="$LIBS"
2720LIBS="-lICE $X_EXTRA_LIBS $LIBS"
2721cat > conftest.$ac_ext <<EOF
2722#line 2723 "configure"
2723#include "confdefs.h"
2724/* Override any gcc2 internal prototype to avoid an error.  */
2725/* We use char because int might match the return type of a gcc2
2726    builtin and then its argument prototype would still apply.  */
2727char IceConnectionNumber();
2728
2729int main() {
2730IceConnectionNumber()
2731; return 0; }
2732EOF
2733if { (eval echo configure:2734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2734  rm -rf conftest*
2735  eval "ac_cv_lib_$ac_lib_var=yes"
2736else
2737  echo "configure: failed program was:" >&5
2738  cat conftest.$ac_ext >&5
2739  rm -rf conftest*
2740  eval "ac_cv_lib_$ac_lib_var=no"
2741fi
2742rm -f conftest*
2743LIBS="$ac_save_LIBS"
2744
2745fi
2746if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2747  echo "$ac_t""yes" 1>&6
2748  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
2749else
2750  echo "$ac_t""no" 1>&6
2751fi
2752
2753  LDFLAGS="$ac_save_LDFLAGS"
2754
2755fi
2756
2757		echo $ac_n "checking for main in -lX11""... $ac_c" 1>&6
2758echo "configure:2759: checking for main in -lX11" >&5
2759ac_lib_var=`echo X11'_'main | sed 'y%./+-%__p_%'`
2760if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2761  echo $ac_n "(cached) $ac_c" 1>&6
2762else
2763  ac_save_LIBS="$LIBS"
2764LIBS="-lX11 -L$x_libraries $LIBS"
2765cat > conftest.$ac_ext <<EOF
2766#line 2767 "configure"
2767#include "confdefs.h"
2768
2769int main() {
2770main()
2771; return 0; }
2772EOF
2773if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2774  rm -rf conftest*
2775  eval "ac_cv_lib_$ac_lib_var=yes"
2776else
2777  echo "configure: failed program was:" >&5
2778  cat conftest.$ac_ext >&5
2779  rm -rf conftest*
2780  eval "ac_cv_lib_$ac_lib_var=no"
2781fi
2782rm -f conftest*
2783LIBS="$ac_save_LIBS"
2784
2785fi
2786if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2787  echo "$ac_t""yes" 1>&6
2788  cat >> confdefs.h <<\EOF
2789#define HAVE_LIBXPM 1
2790EOF
2791 X_LIBS="$X_LIBS -lX11"
2792else
2793  echo "$ac_t""no" 1>&6
2794fi
2795
2796		echo $ac_n "checking for main in -lXpm""... $ac_c" 1>&6
2797echo "configure:2798: checking for main in -lXpm" >&5
2798ac_lib_var=`echo Xpm'_'main | sed 'y%./+-%__p_%'`
2799if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2800  echo $ac_n "(cached) $ac_c" 1>&6
2801else
2802  ac_save_LIBS="$LIBS"
2803LIBS="-lXpm -L$x_libraries -lX11 $LIBS"
2804cat > conftest.$ac_ext <<EOF
2805#line 2806 "configure"
2806#include "confdefs.h"
2807
2808int main() {
2809main()
2810; return 0; }
2811EOF
2812if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2813  rm -rf conftest*
2814  eval "ac_cv_lib_$ac_lib_var=yes"
2815else
2816  echo "configure: failed program was:" >&5
2817  cat conftest.$ac_ext >&5
2818  rm -rf conftest*
2819  eval "ac_cv_lib_$ac_lib_var=no"
2820fi
2821rm -f conftest*
2822LIBS="$ac_save_LIBS"
2823
2824fi
2825if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2826  echo "$ac_t""yes" 1>&6
2827  cat >> confdefs.h <<\EOF
2828#define HAVE_LIBX11 1
2829EOF
2830 X_LIBS="$X_LIBS -lXpm"
2831else
2832  echo "$ac_t""no" 1>&6
2833fi
2834
2835	X0VERKILL=x0verkill
2836	XEDITOR=xeditor
2837	XAVI=xavi
2838
2839
2840
2841fi
2842
2843if test "$ac_cv_have_emx" = yes; then
2844	LDFLAGS="$LDFLAGS -Zexe"
2845	OVERKILL_SPECIAL="emxbind -e -f -q 0verkill.exe"
2846fi
2847
2848
2849trap '' 1 2 15
2850cat > confcache <<\EOF
2851# This file is a shell script that caches the results of configure
2852# tests run on this system so they can be shared between configure
2853# scripts and configure runs.  It is not useful on other systems.
2854# If it contains results you don't want to keep, you may remove or edit it.
2855#
2856# By default, configure uses ./config.cache as the cache file,
2857# creating it if it does not exist already.  You can give configure
2858# the --cache-file=FILE option to use a different cache file; that is
2859# what configure does when it calls configure scripts in
2860# subdirectories, so they share the cache.
2861# Giving --cache-file=/dev/null disables caching, for debugging configure.
2862# config.status only pays attention to the cache file if you give it the
2863# --recheck option to rerun configure.
2864#
2865EOF
2866# The following way of writing the cache mishandles newlines in values,
2867# but we know of no workaround that is simple, portable, and efficient.
2868# So, don't put newlines in cache variables' values.
2869# Ultrix sh set writes to stderr and can't be redirected directly,
2870# and sets the high bit in the cache file unless we assign to the vars.
2871(set) 2>&1 |
2872  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2873  *ac_space=\ *)
2874    # `set' does not quote correctly, so add quotes (double-quote substitution
2875    # turns \\\\ into \\, and sed turns \\ into \).
2876    sed -n \
2877      -e "s/'/'\\\\''/g" \
2878      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2879    ;;
2880  *)
2881    # `set' quotes correctly as required by POSIX, so do not add quotes.
2882    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2883    ;;
2884  esac >> confcache
2885if cmp -s $cache_file confcache; then
2886  :
2887else
2888  if test -w $cache_file; then
2889    echo "updating cache $cache_file"
2890    cat confcache > $cache_file
2891  else
2892    echo "not updating unwritable cache $cache_file"
2893  fi
2894fi
2895rm -f confcache
2896
2897trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2898
2899test "x$prefix" = xNONE && prefix=$ac_default_prefix
2900# Let make expand exec_prefix.
2901test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2902
2903# Any assignment to VPATH causes Sun make to only execute
2904# the first set of double-colon rules, so remove it if not needed.
2905# If there is a colon in the path, we need to keep it.
2906if test "x$srcdir" = x.; then
2907  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
2908fi
2909
2910trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2911
2912DEFS=-DHAVE_CONFIG_H
2913
2914# Without the "./", some shells look in PATH for config.status.
2915: ${CONFIG_STATUS=./config.status}
2916
2917echo creating $CONFIG_STATUS
2918rm -f $CONFIG_STATUS
2919cat > $CONFIG_STATUS <<EOF
2920#! /bin/sh
2921# Generated automatically by configure.
2922# Run this file to recreate the current configuration.
2923# This directory was configured as follows,
2924# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2925#
2926# $0 $ac_configure_args
2927#
2928# Compiler output produced by configure, useful for debugging
2929# configure, is in ./config.log if it exists.
2930
2931ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2932for ac_option
2933do
2934  case "\$ac_option" in
2935  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2936    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2937    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2938  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2939    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2940    exit 0 ;;
2941  -help | --help | --hel | --he | --h)
2942    echo "\$ac_cs_usage"; exit 0 ;;
2943  *) echo "\$ac_cs_usage"; exit 1 ;;
2944  esac
2945done
2946
2947ac_given_srcdir=$srcdir
2948
2949trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2950EOF
2951cat >> $CONFIG_STATUS <<EOF
2952
2953# Protect against being on the right side of a sed subst in config.status.
2954sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2955 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2956$ac_vpsub
2957$extrasub
2958s%@SHELL@%$SHELL%g
2959s%@CFLAGS@%$CFLAGS%g
2960s%@CPPFLAGS@%$CPPFLAGS%g
2961s%@CXXFLAGS@%$CXXFLAGS%g
2962s%@FFLAGS@%$FFLAGS%g
2963s%@DEFS@%$DEFS%g
2964s%@LDFLAGS@%$LDFLAGS%g
2965s%@LIBS@%$LIBS%g
2966s%@exec_prefix@%$exec_prefix%g
2967s%@prefix@%$prefix%g
2968s%@program_transform_name@%$program_transform_name%g
2969s%@bindir@%$bindir%g
2970s%@sbindir@%$sbindir%g
2971s%@libexecdir@%$libexecdir%g
2972s%@datadir@%$datadir%g
2973s%@sysconfdir@%$sysconfdir%g
2974s%@sharedstatedir@%$sharedstatedir%g
2975s%@localstatedir@%$localstatedir%g
2976s%@libdir@%$libdir%g
2977s%@includedir@%$includedir%g
2978s%@oldincludedir@%$oldincludedir%g
2979s%@infodir@%$infodir%g
2980s%@mandir@%$mandir%g
2981s%@CC@%$CC%g
2982s%@CPP@%$CPP%g
2983s%@X_CFLAGS@%$X_CFLAGS%g
2984s%@X_PRE_LIBS@%$X_PRE_LIBS%g
2985s%@X_LIBS@%$X_LIBS%g
2986s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
2987s%@X0VERKILL@%$X0VERKILL%g
2988s%@XEDITOR@%$XEDITOR%g
2989s%@XAVI@%$XAVI%g
2990s%@OVERKILL_SPECIAL@%$OVERKILL_SPECIAL%g
2991
2992CEOF
2993EOF
2994
2995cat >> $CONFIG_STATUS <<\EOF
2996
2997# Split the substitutions into bite-sized pieces for seds with
2998# small command number limits, like on Digital OSF/1 and HP-UX.
2999ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3000ac_file=1 # Number of current file.
3001ac_beg=1 # First line for current file.
3002ac_end=$ac_max_sed_cmds # Line after last line for current file.
3003ac_more_lines=:
3004ac_sed_cmds=""
3005while $ac_more_lines; do
3006  if test $ac_beg -gt 1; then
3007    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3008  else
3009    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3010  fi
3011  if test ! -s conftest.s$ac_file; then
3012    ac_more_lines=false
3013    rm -f conftest.s$ac_file
3014  else
3015    if test -z "$ac_sed_cmds"; then
3016      ac_sed_cmds="sed -f conftest.s$ac_file"
3017    else
3018      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3019    fi
3020    ac_file=`expr $ac_file + 1`
3021    ac_beg=$ac_end
3022    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3023  fi
3024done
3025if test -z "$ac_sed_cmds"; then
3026  ac_sed_cmds=cat
3027fi
3028EOF
3029
3030cat >> $CONFIG_STATUS <<EOF
3031
3032CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3033EOF
3034cat >> $CONFIG_STATUS <<\EOF
3035for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3036  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3037  case "$ac_file" in
3038  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3039       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3040  *) ac_file_in="${ac_file}.in" ;;
3041  esac
3042
3043  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3044
3045  # Remove last slash and all that follows it.  Not all systems have dirname.
3046  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3047  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3048    # The file is in a subdirectory.
3049    test ! -d "$ac_dir" && mkdir "$ac_dir"
3050    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3051    # A "../" for each directory in $ac_dir_suffix.
3052    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3053  else
3054    ac_dir_suffix= ac_dots=
3055  fi
3056
3057  case "$ac_given_srcdir" in
3058  .)  srcdir=.
3059      if test -z "$ac_dots"; then top_srcdir=.
3060      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3061  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3062  *) # Relative path.
3063    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3064    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3065  esac
3066
3067
3068  echo creating "$ac_file"
3069  rm -f "$ac_file"
3070  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3071  case "$ac_file" in
3072  *Makefile*) ac_comsub="1i\\
3073# $configure_input" ;;
3074  *) ac_comsub= ;;
3075  esac
3076
3077  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3078  sed -e "$ac_comsub
3079s%@configure_input@%$configure_input%g
3080s%@srcdir@%$srcdir%g
3081s%@top_srcdir@%$top_srcdir%g
3082" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3083fi; done
3084rm -f conftest.s*
3085
3086# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3087# NAME is the cpp macro being defined and VALUE is the value it is being given.
3088#
3089# ac_d sets the value in "#define NAME VALUE" lines.
3090ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
3091ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
3092ac_dC='\3'
3093ac_dD='%g'
3094# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3095ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
3096ac_uB='\([ 	]\)%\1#\2define\3'
3097ac_uC=' '
3098ac_uD='\4%g'
3099# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3100ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
3101ac_eB='$%\1#\2define\3'
3102ac_eC=' '
3103ac_eD='%g'
3104
3105if test "${CONFIG_HEADERS+set}" != set; then
3106EOF
3107cat >> $CONFIG_STATUS <<EOF
3108  CONFIG_HEADERS="config.h"
3109EOF
3110cat >> $CONFIG_STATUS <<\EOF
3111fi
3112for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3113  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3114  case "$ac_file" in
3115  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3116       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3117  *) ac_file_in="${ac_file}.in" ;;
3118  esac
3119
3120  echo creating $ac_file
3121
3122  rm -f conftest.frag conftest.in conftest.out
3123  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3124  cat $ac_file_inputs > conftest.in
3125
3126EOF
3127
3128# Transform confdefs.h into a sed script conftest.vals that substitutes
3129# the proper values into config.h.in to produce config.h.  And first:
3130# Protect against being on the right side of a sed subst in config.status.
3131# Protect against being in an unquoted here document in config.status.
3132rm -f conftest.vals
3133cat > conftest.hdr <<\EOF
3134s/[\\&%]/\\&/g
3135s%[\\$`]%\\&%g
3136s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3137s%ac_d%ac_u%gp
3138s%ac_u%ac_e%gp
3139EOF
3140sed -n -f conftest.hdr confdefs.h > conftest.vals
3141rm -f conftest.hdr
3142
3143# This sed command replaces #undef with comments.  This is necessary, for
3144# example, in the case of _POSIX_SOURCE, which is predefined and required
3145# on some systems where configure will not decide to define it.
3146cat >> conftest.vals <<\EOF
3147s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3148EOF
3149
3150# Break up conftest.vals because some shells have a limit on
3151# the size of here documents, and old seds have small limits too.
3152
3153rm -f conftest.tail
3154while :
3155do
3156  ac_lines=`grep -c . conftest.vals`
3157  # grep -c gives empty output for an empty file on some AIX systems.
3158  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3159  # Write a limited-size here document to conftest.frag.
3160  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3161  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3162  echo 'CEOF
3163  sed -f conftest.frag conftest.in > conftest.out
3164  rm -f conftest.in
3165  mv conftest.out conftest.in
3166' >> $CONFIG_STATUS
3167  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3168  rm -f conftest.vals
3169  mv conftest.tail conftest.vals
3170done
3171rm -f conftest.vals
3172
3173cat >> $CONFIG_STATUS <<\EOF
3174  rm -f conftest.frag conftest.h
3175  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3176  cat conftest.in >> conftest.h
3177  rm -f conftest.in
3178  if cmp -s $ac_file conftest.h 2>/dev/null; then
3179    echo "$ac_file is unchanged"
3180    rm -f conftest.h
3181  else
3182    # Remove last slash and all that follows it.  Not all systems have dirname.
3183      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3184      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3185      # The file is in a subdirectory.
3186      test ! -d "$ac_dir" && mkdir "$ac_dir"
3187    fi
3188    rm -f $ac_file
3189    mv conftest.h $ac_file
3190  fi
3191fi; done
3192
3193EOF
3194cat >> $CONFIG_STATUS <<EOF
3195
3196
3197EOF
3198cat >> $CONFIG_STATUS <<\EOF
3199test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3200
3201exit 0
3202EOF
3203chmod +x $CONFIG_STATUS
3204rm -fr confdefs* $ac_clean_files
3205test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3206
3207