1#! /bin/sh
2
3# From configure.in Id: configure.in,v 1.3 2001/05/07 09:51:03 martins Exp 
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19# Guess values for system-dependent variables and create Makefiles.
20# Generated automatically using autoconf version 2.13 
21# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
22#
23# This configure script is free software; the Free Software Foundation
24# gives unlimited permission to copy, distribute and modify it.
25
26# Defaults:
27ac_help=
28ac_default_prefix=/usr/local
29# Any additions from configure.in:
30ac_help="$ac_help
31  --with-resolv           Use -lresolv for host name lookups.
32  --without-resolv        Do not use -lresolv for host name lookups."
33ac_help="$ac_help
34  --enable-xauth          Support XAUTH authentication support.
35  --disable-xauth         Do not support XAUTH authentication support."
36ac_help="$ac_help
37  --with-x                use the X Window System"
38ac_help="$ac_help
39  --disable-internet-domain-sockets
40                          Do not use Internet domain sockets"
41ac_help="$ac_help
42  --disable-unix-domain-sockets
43                          Do not use Unix domain sockets"
44ac_help="$ac_help
45  --disable-sysv-ipc
46                          Do not use SYSV IPC"
47
48# Initialize some variables set by options.
49# The variables have the same names as the options, with
50# dashes changed to underlines.
51build=NONE
52cache_file=./config.cache
53exec_prefix=NONE
54host=NONE
55no_create=
56nonopt=NONE
57no_recursion=
58prefix=NONE
59program_prefix=NONE
60program_suffix=NONE
61program_transform_name=s,x,x,
62silent=
63site=
64srcdir=
65target=NONE
66verbose=
67x_includes=NONE
68x_libraries=NONE
69bindir='${exec_prefix}/bin'
70sbindir='${exec_prefix}/sbin'
71libexecdir='${exec_prefix}/libexec'
72datadir='${prefix}/share'
73sysconfdir='${prefix}/etc'
74sharedstatedir='${prefix}/com'
75localstatedir='${prefix}/var'
76libdir='${exec_prefix}/lib'
77includedir='${prefix}/include'
78oldincludedir='/usr/include'
79infodir='${prefix}/info'
80mandir='${prefix}/man'
81
82# Initialize some other variables.
83subdirs=
84MFLAGS= MAKEFLAGS=
85SHELL=${CONFIG_SHELL-/bin/sh}
86# Maximum number of lines to put in a shell here document.
87ac_max_here_lines=12
88
89ac_prev=
90for ac_option
91do
92
93  # If the previous option needs an argument, assign it.
94  if test -n "$ac_prev"; then
95    eval "$ac_prev=\$ac_option"
96    ac_prev=
97    continue
98  fi
99
100  case "$ac_option" in
101  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
102  *) ac_optarg= ;;
103  esac
104
105  # Accept the important Cygnus configure options, so we can diagnose typos.
106
107  case "$ac_option" in
108
109  -bindir | --bindir | --bindi | --bind | --bin | --bi)
110    ac_prev=bindir ;;
111  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
112    bindir="$ac_optarg" ;;
113
114  -build | --build | --buil | --bui | --bu)
115    ac_prev=build ;;
116  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
117    build="$ac_optarg" ;;
118
119  -cache-file | --cache-file | --cache-fil | --cache-fi \
120  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
121    ac_prev=cache_file ;;
122  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
123  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
124    cache_file="$ac_optarg" ;;
125
126  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
127    ac_prev=datadir ;;
128  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
129  | --da=*)
130    datadir="$ac_optarg" ;;
131
132  -disable-* | --disable-*)
133    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
134    # Reject names that are not valid shell variable names.
135    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
136      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
137    fi
138    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
139    eval "enable_${ac_feature}=no" ;;
140
141  -enable-* | --enable-*)
142    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
143    # Reject names that are not valid shell variable names.
144    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
145      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
146    fi
147    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
148    case "$ac_option" in
149      *=*) ;;
150      *) ac_optarg=yes ;;
151    esac
152    eval "enable_${ac_feature}='$ac_optarg'" ;;
153
154  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
155  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
156  | --exec | --exe | --ex)
157    ac_prev=exec_prefix ;;
158  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
159  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
160  | --exec=* | --exe=* | --ex=*)
161    exec_prefix="$ac_optarg" ;;
162
163  -gas | --gas | --ga | --g)
164    # Obsolete; use --with-gas.
165    with_gas=yes ;;
166
167  -help | --help | --hel | --he)
168    # Omit some internal or obsolete options to make the list less imposing.
169    # This message is too long to be a string in the A/UX 3.1 sh.
170    cat << EOF
171Usage: configure [options] [host]
172Options: [defaults in brackets after descriptions]
173Configuration:
174  --cache-file=FILE       cache test results in FILE
175  --help                  print this message
176  --no-create             do not create output files
177  --quiet, --silent       do not print \`checking...' messages
178  --version               print the version of autoconf that created configure
179Directory and file names:
180  --prefix=PREFIX         install architecture-independent files in PREFIX
181                          [$ac_default_prefix]
182  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
183                          [same as prefix]
184  --bindir=DIR            user executables in DIR [EPREFIX/bin]
185  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
186  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
187  --datadir=DIR           read-only architecture-independent data in DIR
188                          [PREFIX/share]
189  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
190  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
191                          [PREFIX/com]
192  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
193  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
194  --includedir=DIR        C header files in DIR [PREFIX/include]
195  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
196  --infodir=DIR           info documentation in DIR [PREFIX/info]
197  --mandir=DIR            man documentation in DIR [PREFIX/man]
198  --srcdir=DIR            find the sources in DIR [configure dir or ..]
199  --program-prefix=PREFIX prepend PREFIX to installed program names
200  --program-suffix=SUFFIX append SUFFIX to installed program names
201  --program-transform-name=PROGRAM
202                          run sed PROGRAM on installed program names
203EOF
204    cat << EOF
205Host type:
206  --build=BUILD           configure for building on BUILD [BUILD=HOST]
207  --host=HOST             configure for HOST [guessed]
208  --target=TARGET         configure for TARGET [TARGET=HOST]
209Features and packages:
210  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
211  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
212  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
213  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
214  --x-includes=DIR        X include files are in DIR
215  --x-libraries=DIR       X library files are in DIR
216EOF
217    if test -n "$ac_help"; then
218      echo "--enable and --with options recognized:$ac_help"
219    fi
220    exit 0 ;;
221
222  -host | --host | --hos | --ho)
223    ac_prev=host ;;
224  -host=* | --host=* | --hos=* | --ho=*)
225    host="$ac_optarg" ;;
226
227  -includedir | --includedir | --includedi | --included | --include \
228  | --includ | --inclu | --incl | --inc)
229    ac_prev=includedir ;;
230  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
231  | --includ=* | --inclu=* | --incl=* | --inc=*)
232    includedir="$ac_optarg" ;;
233
234  -infodir | --infodir | --infodi | --infod | --info | --inf)
235    ac_prev=infodir ;;
236  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
237    infodir="$ac_optarg" ;;
238
239  -libdir | --libdir | --libdi | --libd)
240    ac_prev=libdir ;;
241  -libdir=* | --libdir=* | --libdi=* | --libd=*)
242    libdir="$ac_optarg" ;;
243
244  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
245  | --libexe | --libex | --libe)
246    ac_prev=libexecdir ;;
247  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
248  | --libexe=* | --libex=* | --libe=*)
249    libexecdir="$ac_optarg" ;;
250
251  -localstatedir | --localstatedir | --localstatedi | --localstated \
252  | --localstate | --localstat | --localsta | --localst \
253  | --locals | --local | --loca | --loc | --lo)
254    ac_prev=localstatedir ;;
255  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
256  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
257  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
258    localstatedir="$ac_optarg" ;;
259
260  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
261    ac_prev=mandir ;;
262  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
263    mandir="$ac_optarg" ;;
264
265  -nfp | --nfp | --nf)
266    # Obsolete; use --without-fp.
267    with_fp=no ;;
268
269  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
270  | --no-cr | --no-c)
271    no_create=yes ;;
272
273  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
274  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
275    no_recursion=yes ;;
276
277  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
278  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
279  | --oldin | --oldi | --old | --ol | --o)
280    ac_prev=oldincludedir ;;
281  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
282  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
283  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
284    oldincludedir="$ac_optarg" ;;
285
286  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
287    ac_prev=prefix ;;
288  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
289    prefix="$ac_optarg" ;;
290
291  -program-prefix | --program-prefix | --program-prefi | --program-pref \
292  | --program-pre | --program-pr | --program-p)
293    ac_prev=program_prefix ;;
294  -program-prefix=* | --program-prefix=* | --program-prefi=* \
295  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
296    program_prefix="$ac_optarg" ;;
297
298  -program-suffix | --program-suffix | --program-suffi | --program-suff \
299  | --program-suf | --program-su | --program-s)
300    ac_prev=program_suffix ;;
301  -program-suffix=* | --program-suffix=* | --program-suffi=* \
302  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
303    program_suffix="$ac_optarg" ;;
304
305  -program-transform-name | --program-transform-name \
306  | --program-transform-nam | --program-transform-na \
307  | --program-transform-n | --program-transform- \
308  | --program-transform | --program-transfor \
309  | --program-transfo | --program-transf \
310  | --program-trans | --program-tran \
311  | --progr-tra | --program-tr | --program-t)
312    ac_prev=program_transform_name ;;
313  -program-transform-name=* | --program-transform-name=* \
314  | --program-transform-nam=* | --program-transform-na=* \
315  | --program-transform-n=* | --program-transform-=* \
316  | --program-transform=* | --program-transfor=* \
317  | --program-transfo=* | --program-transf=* \
318  | --program-trans=* | --program-tran=* \
319  | --progr-tra=* | --program-tr=* | --program-t=*)
320    program_transform_name="$ac_optarg" ;;
321
322  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
323  | -silent | --silent | --silen | --sile | --sil)
324    silent=yes ;;
325
326  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
327    ac_prev=sbindir ;;
328  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
329  | --sbi=* | --sb=*)
330    sbindir="$ac_optarg" ;;
331
332  -sharedstatedir | --sharedstatedir | --sharedstatedi \
333  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
334  | --sharedst | --shareds | --shared | --share | --shar \
335  | --sha | --sh)
336    ac_prev=sharedstatedir ;;
337  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
338  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
339  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
340  | --sha=* | --sh=*)
341    sharedstatedir="$ac_optarg" ;;
342
343  -site | --site | --sit)
344    ac_prev=site ;;
345  -site=* | --site=* | --sit=*)
346    site="$ac_optarg" ;;
347
348  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
349    ac_prev=srcdir ;;
350  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
351    srcdir="$ac_optarg" ;;
352
353  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
354  | --syscon | --sysco | --sysc | --sys | --sy)
355    ac_prev=sysconfdir ;;
356  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
357  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
358    sysconfdir="$ac_optarg" ;;
359
360  -target | --target | --targe | --targ | --tar | --ta | --t)
361    ac_prev=target ;;
362  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
363    target="$ac_optarg" ;;
364
365  -v | -verbose | --verbose | --verbos | --verbo | --verb)
366    verbose=yes ;;
367
368  -version | --version | --versio | --versi | --vers)
369    echo "configure generated by autoconf version 2.13"
370    exit 0 ;;
371
372  -with-* | --with-*)
373    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
374    # Reject names that are not valid shell variable names.
375    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
376      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
377    fi
378    ac_package=`echo $ac_package| sed 's/-/_/g'`
379    case "$ac_option" in
380      *=*) ;;
381      *) ac_optarg=yes ;;
382    esac
383    eval "with_${ac_package}='$ac_optarg'" ;;
384
385  -without-* | --without-*)
386    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
387    # Reject names that are not valid shell variable names.
388    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
389      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
390    fi
391    ac_package=`echo $ac_package| sed 's/-/_/g'`
392    eval "with_${ac_package}=no" ;;
393
394  --x)
395    # Obsolete; use --with-x.
396    with_x=yes ;;
397
398  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
399  | --x-incl | --x-inc | --x-in | --x-i)
400    ac_prev=x_includes ;;
401  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
402  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
403    x_includes="$ac_optarg" ;;
404
405  -x-libraries | --x-libraries | --x-librarie | --x-librari \
406  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
407    ac_prev=x_libraries ;;
408  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
409  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
410    x_libraries="$ac_optarg" ;;
411
412  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
413    ;;
414
415  *)
416    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
417      echo "configure: warning: $ac_option: invalid host type" 1>&2
418    fi
419    if test "x$nonopt" != xNONE; then
420      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
421    fi
422    nonopt="$ac_option"
423    ;;
424
425  esac
426done
427
428if test -n "$ac_prev"; then
429  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
430fi
431
432trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
433
434# File descriptor usage:
435# 0 standard input
436# 1 file creation
437# 2 errors and warnings
438# 3 some systems may open it to /dev/tty
439# 4 used on the Kubota Titan
440# 6 checking for... messages and results
441# 5 compiler messages saved in config.log
442if test "$silent" = yes; then
443  exec 6>/dev/null
444else
445  exec 6>&1
446fi
447exec 5>./config.log
448
449echo "\
450This file contains any messages produced by compilers while
451running configure, to aid debugging if configure makes a mistake.
452" 1>&5
453
454# Strip out --no-create and --no-recursion so they do not pile up.
455# Also quote any args containing shell metacharacters.
456ac_configure_args=
457for ac_arg
458do
459  case "$ac_arg" in
460  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
461  | --no-cr | --no-c) ;;
462  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
463  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
464  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
465  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
466  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
467  esac
468done
469
470# NLS nuisances.
471# Only set these to C if already set.  These must not be set unconditionally
472# because not all systems understand e.g. LANG=C (notably SCO).
473# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
474# Non-C LC_CTYPE values break the ctype check.
475if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
476if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
477if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
478if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
479
480# confdefs.h avoids OS command line length limits that DEFS can exceed.
481rm -rf conftest* confdefs.h
482# AIX cpp loses on an empty file, so make sure it contains at least a newline.
483echo > confdefs.h
484
485# A filename unique to this package, relative to the directory that
486# configure is in, which we can look for to find out if srcdir is correct.
487ac_unique_file=gnuserv.c
488
489# Find the source files, if location was not specified.
490if test -z "$srcdir"; then
491  ac_srcdir_defaulted=yes
492  # Try the directory containing this script, then its parent.
493  ac_prog=$0
494  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
495  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
496  srcdir=$ac_confdir
497  if test ! -r $srcdir/$ac_unique_file; then
498    srcdir=..
499  fi
500else
501  ac_srcdir_defaulted=no
502fi
503if test ! -r $srcdir/$ac_unique_file; then
504  if test "$ac_srcdir_defaulted" = yes; then
505    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
506  else
507    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
508  fi
509fi
510srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
511
512# Prefer explicitly selected file to automatically selected ones.
513if test -z "$CONFIG_SITE"; then
514  if test "x$prefix" != xNONE; then
515    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
516  else
517    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
518  fi
519fi
520for ac_site_file in $CONFIG_SITE; do
521  if test -r "$ac_site_file"; then
522    echo "loading site script $ac_site_file"
523    . "$ac_site_file"
524  fi
525done
526
527if test -r "$cache_file"; then
528  echo "loading cache $cache_file"
529  . $cache_file
530else
531  echo "creating cache $cache_file"
532  > $cache_file
533fi
534
535ac_ext=c
536# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
537ac_cpp='$CPP $CPPFLAGS'
538ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
539ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
540cross_compiling=$ac_cv_prog_cc_cross
541
542ac_exeext=
543ac_objext=o
544if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
545  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
546  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
547    ac_n= ac_c='
548' ac_t='	'
549  else
550    ac_n=-n ac_c= ac_t=
551  fi
552else
553  ac_n= ac_c='\c' ac_t=
554fi
555
556
557
558# Extract the first word of "gcc", so it can be a program name with args.
559set dummy gcc; ac_word=$2
560echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
561echo "configure:562: checking for $ac_word" >&5
562if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
563  echo $ac_n "(cached) $ac_c" 1>&6
564else
565  if test -n "$CC"; then
566  ac_cv_prog_CC="$CC" # Let the user override the test.
567else
568  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
569  ac_dummy="$PATH"
570  for ac_dir in $ac_dummy; do
571    test -z "$ac_dir" && ac_dir=.
572    if test -f $ac_dir/$ac_word; then
573      ac_cv_prog_CC="gcc"
574      break
575    fi
576  done
577  IFS="$ac_save_ifs"
578fi
579fi
580CC="$ac_cv_prog_CC"
581if test -n "$CC"; then
582  echo "$ac_t""$CC" 1>&6
583else
584  echo "$ac_t""no" 1>&6
585fi
586
587if test -z "$CC"; then
588  # Extract the first word of "cc", so it can be a program name with args.
589set dummy cc; ac_word=$2
590echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
591echo "configure:592: checking for $ac_word" >&5
592if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
593  echo $ac_n "(cached) $ac_c" 1>&6
594else
595  if test -n "$CC"; then
596  ac_cv_prog_CC="$CC" # Let the user override the test.
597else
598  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
599  ac_prog_rejected=no
600  ac_dummy="$PATH"
601  for ac_dir in $ac_dummy; do
602    test -z "$ac_dir" && ac_dir=.
603    if test -f $ac_dir/$ac_word; then
604      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
605        ac_prog_rejected=yes
606	continue
607      fi
608      ac_cv_prog_CC="cc"
609      break
610    fi
611  done
612  IFS="$ac_save_ifs"
613if test $ac_prog_rejected = yes; then
614  # We found a bogon in the path, so make sure we never use it.
615  set dummy $ac_cv_prog_CC
616  shift
617  if test $# -gt 0; then
618    # We chose a different compiler from the bogus one.
619    # However, it has the same basename, so the bogon will be chosen
620    # first if we set CC to just the basename; use the full file name.
621    shift
622    set dummy "$ac_dir/$ac_word" "$@"
623    shift
624    ac_cv_prog_CC="$@"
625  fi
626fi
627fi
628fi
629CC="$ac_cv_prog_CC"
630if test -n "$CC"; then
631  echo "$ac_t""$CC" 1>&6
632else
633  echo "$ac_t""no" 1>&6
634fi
635
636  if test -z "$CC"; then
637    case "`uname -s`" in
638    *win32* | *WIN32*)
639      # Extract the first word of "cl", so it can be a program name with args.
640set dummy cl; ac_word=$2
641echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
642echo "configure:643: checking for $ac_word" >&5
643if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
644  echo $ac_n "(cached) $ac_c" 1>&6
645else
646  if test -n "$CC"; then
647  ac_cv_prog_CC="$CC" # Let the user override the test.
648else
649  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
650  ac_dummy="$PATH"
651  for ac_dir in $ac_dummy; do
652    test -z "$ac_dir" && ac_dir=.
653    if test -f $ac_dir/$ac_word; then
654      ac_cv_prog_CC="cl"
655      break
656    fi
657  done
658  IFS="$ac_save_ifs"
659fi
660fi
661CC="$ac_cv_prog_CC"
662if test -n "$CC"; then
663  echo "$ac_t""$CC" 1>&6
664else
665  echo "$ac_t""no" 1>&6
666fi
667 ;;
668    esac
669  fi
670  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
671fi
672
673echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
674echo "configure:675: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
675
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
683cat > conftest.$ac_ext << EOF
684
685#line 686 "configure"
686#include "confdefs.h"
687
688main(){return(0);}
689EOF
690if { (eval echo configure:691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
691  ac_cv_prog_cc_works=yes
692  # If we can't run a trivial program, we are probably using a cross compiler.
693  if (./conftest; exit) 2>/dev/null; then
694    ac_cv_prog_cc_cross=no
695  else
696    ac_cv_prog_cc_cross=yes
697  fi
698else
699  echo "configure: failed program was:" >&5
700  cat conftest.$ac_ext >&5
701  ac_cv_prog_cc_works=no
702fi
703rm -fr conftest*
704ac_ext=c
705# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
706ac_cpp='$CPP $CPPFLAGS'
707ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
708ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
709cross_compiling=$ac_cv_prog_cc_cross
710
711echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
712if test $ac_cv_prog_cc_works = no; then
713  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
714fi
715echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
716echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
717echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
718cross_compiling=$ac_cv_prog_cc_cross
719
720echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
721echo "configure:722: checking whether we are using GNU C" >&5
722if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
723  echo $ac_n "(cached) $ac_c" 1>&6
724else
725  cat > conftest.c <<EOF
726#ifdef __GNUC__
727  yes;
728#endif
729EOF
730if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
731  ac_cv_prog_gcc=yes
732else
733  ac_cv_prog_gcc=no
734fi
735fi
736
737echo "$ac_t""$ac_cv_prog_gcc" 1>&6
738
739if test $ac_cv_prog_gcc = yes; then
740  GCC=yes
741else
742  GCC=
743fi
744
745ac_test_CFLAGS="${CFLAGS+set}"
746ac_save_CFLAGS="$CFLAGS"
747CFLAGS=
748echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
749echo "configure:750: checking whether ${CC-cc} accepts -g" >&5
750if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
751  echo $ac_n "(cached) $ac_c" 1>&6
752else
753  echo 'void f(){}' > conftest.c
754if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
755  ac_cv_prog_cc_g=yes
756else
757  ac_cv_prog_cc_g=no
758fi
759rm -f conftest*
760
761fi
762
763echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
764if test "$ac_test_CFLAGS" = set; then
765  CFLAGS="$ac_save_CFLAGS"
766elif test $ac_cv_prog_cc_g = yes; then
767  if test "$GCC" = yes; then
768    CFLAGS="-g -O2"
769  else
770    CFLAGS="-g"
771  fi
772else
773  if test "$GCC" = yes; then
774    CFLAGS="-O2"
775  else
776    CFLAGS=
777  fi
778fi
779
780ac_aux_dir=
781for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
782  if test -f $ac_dir/install-sh; then
783    ac_aux_dir=$ac_dir
784    ac_install_sh="$ac_aux_dir/install-sh -c"
785    break
786  elif test -f $ac_dir/install.sh; then
787    ac_aux_dir=$ac_dir
788    ac_install_sh="$ac_aux_dir/install.sh -c"
789    break
790  fi
791done
792if test -z "$ac_aux_dir"; then
793  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
794fi
795ac_config_guess=$ac_aux_dir/config.guess
796ac_config_sub=$ac_aux_dir/config.sub
797ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
798
799# Find a good install program.  We prefer a C program (faster),
800# so one script is as good as another.  But avoid the broken or
801# incompatible versions:
802# SysV /etc/install, /usr/sbin/install
803# SunOS /usr/etc/install
804# IRIX /sbin/install
805# AIX /bin/install
806# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
807# AFS /usr/afsws/bin/install, which mishandles nonexistent args
808# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
809# ./install, which can be erroneously created by make from ./install.sh.
810echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
811echo "configure:812: checking for a BSD compatible install" >&5
812if test -z "$INSTALL"; then
813if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
814  echo $ac_n "(cached) $ac_c" 1>&6
815else
816    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
817  for ac_dir in $PATH; do
818    # Account for people who put trailing slashes in PATH elements.
819    case "$ac_dir/" in
820    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
821    *)
822      # OSF1 and SCO ODT 3.0 have their own names for install.
823      # Don't use installbsd from OSF since it installs stuff as root
824      # by default.
825      for ac_prog in ginstall scoinst install; do
826        if test -f $ac_dir/$ac_prog; then
827	  if test $ac_prog = install &&
828            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
829	    # AIX install.  It has an incompatible calling convention.
830	    :
831	  else
832	    ac_cv_path_install="$ac_dir/$ac_prog -c"
833	    break 2
834	  fi
835	fi
836      done
837      ;;
838    esac
839  done
840  IFS="$ac_save_IFS"
841
842fi
843  if test "${ac_cv_path_install+set}" = set; then
844    INSTALL="$ac_cv_path_install"
845  else
846    # As a last resort, use the slow shell script.  We don't cache a
847    # path for INSTALL within a source directory, because that will
848    # break other packages using the cache if that directory is
849    # removed, or if the path is relative.
850    INSTALL="$ac_install_sh"
851  fi
852fi
853echo "$ac_t""$INSTALL" 1>&6
854
855# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
856# It thinks the first close brace ends the variable substitution.
857test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
858
859test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
860
861test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
862
863echo $ac_n "checking for working const""... $ac_c" 1>&6
864echo "configure:865: checking for working const" >&5
865if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
866  echo $ac_n "(cached) $ac_c" 1>&6
867else
868  cat > conftest.$ac_ext <<EOF
869#line 870 "configure"
870#include "confdefs.h"
871
872int main() {
873
874/* Ultrix mips cc rejects this.  */
875typedef int charset[2]; const charset x;
876/* SunOS 4.1.1 cc rejects this.  */
877char const *const *ccp;
878char **p;
879/* NEC SVR4.0.2 mips cc rejects this.  */
880struct point {int x, y;};
881static struct point const zero = {0,0};
882/* AIX XL C 1.02.0.0 rejects this.
883   It does not let you subtract one const X* pointer from another in an arm
884   of an if-expression whose if-part is not a constant expression */
885const char *g = "string";
886ccp = &g + (g ? g-g : 0);
887/* HPUX 7.0 cc rejects these. */
888++ccp;
889p = (char**) ccp;
890ccp = (char const *const *) p;
891{ /* SCO 3.2v4 cc rejects this.  */
892  char *t;
893  char const *s = 0 ? (char *) 0 : (char const *) 0;
894
895  *t++ = 0;
896}
897{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
898  int x[] = {25, 17};
899  const int *foo = &x[0];
900  ++foo;
901}
902{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
903  typedef const int *iptr;
904  iptr p = 0;
905  ++p;
906}
907{ /* AIX XL C 1.02.0.0 rejects this saying
908     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
909  struct s { int j; const int *ap[3]; };
910  struct s *b; b->j = 5;
911}
912{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
913  const int foo = 10;
914}
915
916; return 0; }
917EOF
918if { (eval echo configure:919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
919  rm -rf conftest*
920  ac_cv_c_const=yes
921else
922  echo "configure: failed program was:" >&5
923  cat conftest.$ac_ext >&5
924  rm -rf conftest*
925  ac_cv_c_const=no
926fi
927rm -f conftest*
928fi
929
930echo "$ac_t""$ac_cv_c_const" 1>&6
931if test $ac_cv_c_const = no; then
932  cat >> confdefs.h <<\EOF
933#define const 
934EOF
935
936fi
937
938# Check whether --with-resolv or --without-resolv was given.
939if test "${with_resolv+set}" = set; then
940  withval="$with_resolv"
941  sed_downcase='y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'
942    val=`echo "$withval" | sed -e "$sed_downcase"`
943    case "$val" in
944      "" )               ac_use_resolv=yes ;;
945      yes | no | maybe ) ac_use_resolv=$val ;;
946      * ) { echo "configure: error: $withval: invalid argument to --with-resolv" 1>&2; exit 1; } ;;
947    esac
948   
949else
950  # Default is not to link with resolv.
951      ac_use_resolv=no
952   
953fi
954
955# Check whether --enable-xauth or --disable-xauth was given.
956if test "${enable_xauth+set}" = set; then
957  enableval="$enable_xauth"
958  sed_downcase='y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'
959   val=`echo "$enableval" | sed -e "$sed_downcase"`
960   case "$val" in
961     yes | no | try ) require_xauth=$val ;;
962     * ) { echo "configure: error: $enableval: invalid argument to --enable-xauth" 1>&2; exit 1; } ;;
963    esac
964else
965  require_xauth=try
966fi
967
968
969echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
970echo "configure:971: checking how to run the C preprocessor" >&5
971# On Suns, sometimes $CPP names a directory.
972if test -n "$CPP" && test -d "$CPP"; then
973  CPP=
974fi
975if test -z "$CPP"; then
976if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
977  echo $ac_n "(cached) $ac_c" 1>&6
978else
979    # This must be in double quotes, not single quotes, because CPP may get
980  # substituted into the Makefile and "${CC-cc}" will confuse make.
981  CPP="${CC-cc} -E"
982  # On the NeXT, cc -E runs the code through the compiler's parser,
983  # not just through cpp.
984  cat > conftest.$ac_ext <<EOF
985#line 986 "configure"
986#include "confdefs.h"
987#include <assert.h>
988Syntax Error
989EOF
990ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
991{ (eval echo configure:992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
992ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
993if test -z "$ac_err"; then
994  :
995else
996  echo "$ac_err" >&5
997  echo "configure: failed program was:" >&5
998  cat conftest.$ac_ext >&5
999  rm -rf conftest*
1000  CPP="${CC-cc} -E -traditional-cpp"
1001  cat > conftest.$ac_ext <<EOF
1002#line 1003 "configure"
1003#include "confdefs.h"
1004#include <assert.h>
1005Syntax Error
1006EOF
1007ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1008{ (eval echo configure:1009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1009ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1010if test -z "$ac_err"; then
1011  :
1012else
1013  echo "$ac_err" >&5
1014  echo "configure: failed program was:" >&5
1015  cat conftest.$ac_ext >&5
1016  rm -rf conftest*
1017  CPP="${CC-cc} -nologo -E"
1018  cat > conftest.$ac_ext <<EOF
1019#line 1020 "configure"
1020#include "confdefs.h"
1021#include <assert.h>
1022Syntax Error
1023EOF
1024ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1025{ (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1026ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1027if test -z "$ac_err"; then
1028  :
1029else
1030  echo "$ac_err" >&5
1031  echo "configure: failed program was:" >&5
1032  cat conftest.$ac_ext >&5
1033  rm -rf conftest*
1034  CPP=/lib/cpp
1035fi
1036rm -f conftest*
1037fi
1038rm -f conftest*
1039fi
1040rm -f conftest*
1041  ac_cv_prog_CPP="$CPP"
1042fi
1043  CPP="$ac_cv_prog_CPP"
1044else
1045  ac_cv_prog_CPP="$CPP"
1046fi
1047echo "$ac_t""$CPP" 1>&6
1048
1049echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1050echo "configure:1051: checking for ANSI C header files" >&5
1051if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1052  echo $ac_n "(cached) $ac_c" 1>&6
1053else
1054  cat > conftest.$ac_ext <<EOF
1055#line 1056 "configure"
1056#include "confdefs.h"
1057#include <stdlib.h>
1058#include <stdarg.h>
1059#include <string.h>
1060#include <float.h>
1061EOF
1062ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1063{ (eval echo configure:1064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1064ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1065if test -z "$ac_err"; then
1066  rm -rf conftest*
1067  ac_cv_header_stdc=yes
1068else
1069  echo "$ac_err" >&5
1070  echo "configure: failed program was:" >&5
1071  cat conftest.$ac_ext >&5
1072  rm -rf conftest*
1073  ac_cv_header_stdc=no
1074fi
1075rm -f conftest*
1076
1077if test $ac_cv_header_stdc = yes; then
1078  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1079cat > conftest.$ac_ext <<EOF
1080#line 1081 "configure"
1081#include "confdefs.h"
1082#include <string.h>
1083EOF
1084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1085  egrep "memchr" >/dev/null 2>&1; then
1086  :
1087else
1088  rm -rf conftest*
1089  ac_cv_header_stdc=no
1090fi
1091rm -f conftest*
1092
1093fi
1094
1095if test $ac_cv_header_stdc = yes; then
1096  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1097cat > conftest.$ac_ext <<EOF
1098#line 1099 "configure"
1099#include "confdefs.h"
1100#include <stdlib.h>
1101EOF
1102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1103  egrep "free" >/dev/null 2>&1; then
1104  :
1105else
1106  rm -rf conftest*
1107  ac_cv_header_stdc=no
1108fi
1109rm -f conftest*
1110
1111fi
1112
1113if test $ac_cv_header_stdc = yes; then
1114  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1115if test "$cross_compiling" = yes; then
1116  :
1117else
1118  cat > conftest.$ac_ext <<EOF
1119#line 1120 "configure"
1120#include "confdefs.h"
1121#include <ctype.h>
1122#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1123#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1124#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1125int main () { int i; for (i = 0; i < 256; i++)
1126if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1127exit (0); }
1128
1129EOF
1130if { (eval echo configure:1131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1131then
1132  :
1133else
1134  echo "configure: failed program was:" >&5
1135  cat conftest.$ac_ext >&5
1136  rm -fr conftest*
1137  ac_cv_header_stdc=no
1138fi
1139rm -fr conftest*
1140fi
1141
1142fi
1143fi
1144
1145echo "$ac_t""$ac_cv_header_stdc" 1>&6
1146if test $ac_cv_header_stdc = yes; then
1147  cat >> confdefs.h <<\EOF
1148#define STDC_HEADERS 1
1149EOF
1150
1151fi
1152
1153for ac_hdr in string.h unistd.h
1154do
1155ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1156echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1157echo "configure:1158: checking for $ac_hdr" >&5
1158if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1159  echo $ac_n "(cached) $ac_c" 1>&6
1160else
1161  cat > conftest.$ac_ext <<EOF
1162#line 1163 "configure"
1163#include "confdefs.h"
1164#include <$ac_hdr>
1165EOF
1166ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1167{ (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1168ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1169if test -z "$ac_err"; then
1170  rm -rf conftest*
1171  eval "ac_cv_header_$ac_safe=yes"
1172else
1173  echo "$ac_err" >&5
1174  echo "configure: failed program was:" >&5
1175  cat conftest.$ac_ext >&5
1176  rm -rf conftest*
1177  eval "ac_cv_header_$ac_safe=no"
1178fi
1179rm -f conftest*
1180fi
1181if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1182  echo "$ac_t""yes" 1>&6
1183    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1184  cat >> confdefs.h <<EOF
1185#define $ac_tr_hdr 1
1186EOF
1187 
1188else
1189  echo "$ac_t""no" 1>&6
1190fi
1191done
1192
1193for ac_hdr in sys/types.h sys/select.h sys/socket.h sys/time.h
1194do
1195ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1196echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1197echo "configure:1198: checking for $ac_hdr" >&5
1198if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1199  echo $ac_n "(cached) $ac_c" 1>&6
1200else
1201  cat > conftest.$ac_ext <<EOF
1202#line 1203 "configure"
1203#include "confdefs.h"
1204#include <$ac_hdr>
1205EOF
1206ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1207{ (eval echo configure:1208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1208ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1209if test -z "$ac_err"; then
1210  rm -rf conftest*
1211  eval "ac_cv_header_$ac_safe=yes"
1212else
1213  echo "$ac_err" >&5
1214  echo "configure: failed program was:" >&5
1215  cat conftest.$ac_ext >&5
1216  rm -rf conftest*
1217  eval "ac_cv_header_$ac_safe=no"
1218fi
1219rm -f conftest*
1220fi
1221if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1222  echo "$ac_t""yes" 1>&6
1223    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1224  cat >> confdefs.h <<EOF
1225#define $ac_tr_hdr 1
1226EOF
1227 
1228else
1229  echo "$ac_t""no" 1>&6
1230fi
1231done
1232
1233for ac_hdr in libintl.h sys/un.h
1234do
1235ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1236echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1237echo "configure:1238: checking for $ac_hdr" >&5
1238if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1239  echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241  cat > conftest.$ac_ext <<EOF
1242#line 1243 "configure"
1243#include "confdefs.h"
1244#include <$ac_hdr>
1245EOF
1246ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1247{ (eval echo configure:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1248ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1249if test -z "$ac_err"; then
1250  rm -rf conftest*
1251  eval "ac_cv_header_$ac_safe=yes"
1252else
1253  echo "$ac_err" >&5
1254  echo "configure: failed program was:" >&5
1255  cat conftest.$ac_ext >&5
1256  rm -rf conftest*
1257  eval "ac_cv_header_$ac_safe=no"
1258fi
1259rm -f conftest*
1260fi
1261if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1262  echo "$ac_t""yes" 1>&6
1263    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1264  cat >> confdefs.h <<EOF
1265#define $ac_tr_hdr 1
1266EOF
1267 
1268else
1269  echo "$ac_t""no" 1>&6
1270fi
1271done
1272
1273for ac_hdr in sgtty.h bsd/sgtty.h
1274do
1275ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1276echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1277echo "configure:1278: checking for $ac_hdr" >&5
1278if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1279  echo $ac_n "(cached) $ac_c" 1>&6
1280else
1281  cat > conftest.$ac_ext <<EOF
1282#line 1283 "configure"
1283#include "confdefs.h"
1284#include <$ac_hdr>
1285EOF
1286ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1287{ (eval echo configure:1288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1288ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1289if test -z "$ac_err"; then
1290  rm -rf conftest*
1291  eval "ac_cv_header_$ac_safe=yes"
1292else
1293  echo "$ac_err" >&5
1294  echo "configure: failed program was:" >&5
1295  cat conftest.$ac_ext >&5
1296  rm -rf conftest*
1297  eval "ac_cv_header_$ac_safe=no"
1298fi
1299rm -f conftest*
1300fi
1301if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1302  echo "$ac_t""yes" 1>&6
1303    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1304  cat >> confdefs.h <<EOF
1305#define $ac_tr_hdr 1
1306EOF
1307 
1308else
1309  echo "$ac_t""no" 1>&6
1310fi
1311done
1312
1313
1314echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
1315echo "configure:1316: checking for socklen_t" >&5
1316cat > conftest.$ac_ext <<EOF
1317#line 1318 "configure"
1318#include "confdefs.h"
1319
1320#include <sys/socket.h>
1321socklen_t x;
1322
1323int main() {
1324
1325; return 0; }
1326EOF
1327if { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1328  rm -rf conftest*
1329  echo "$ac_t""yes" 1>&6
1330else
1331  echo "configure: failed program was:" >&5
1332  cat conftest.$ac_ext >&5
1333  rm -rf conftest*
1334  
1335cat > conftest.$ac_ext <<EOF
1336#line 1337 "configure"
1337#include "confdefs.h"
1338
1339#include <sys/socket.h>
1340int accept (int, struct sockaddr *, size_t *);
1341
1342int main() {
1343
1344; return 0; }
1345EOF
1346if { (eval echo configure:1347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1347  rm -rf conftest*
1348  
1349echo "$ac_t""size_t" 1>&6
1350cat >> confdefs.h <<\EOF
1351#define socklen_t size_t
1352EOF
1353
1354else
1355  echo "configure: failed program was:" >&5
1356  cat conftest.$ac_ext >&5
1357  rm -rf conftest*
1358  
1359echo "$ac_t""int" 1>&6
1360cat >> confdefs.h <<\EOF
1361#define socklen_t int
1362EOF
1363
1364fi
1365rm -f conftest*
1366fi
1367rm -f conftest*
1368
1369echo $ac_n "checking size of long""... $ac_c" 1>&6
1370echo "configure:1371: checking size of long" >&5
1371if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1372  echo $ac_n "(cached) $ac_c" 1>&6
1373else
1374  if test "$cross_compiling" = yes; then
1375  ac_cv_sizeof_long=32
1376else
1377  cat > conftest.$ac_ext <<EOF
1378#line 1379 "configure"
1379#include "confdefs.h"
1380#include <stdio.h>
1381#include <sys/types.h>
1382main()
1383{
1384  FILE *f=fopen("conftestval", "w");
1385  if (!f) exit(1);
1386  fprintf(f, "%d\n", sizeof(long));
1387  exit(0);
1388}
1389EOF
1390if { (eval echo configure:1391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1391then
1392  ac_cv_sizeof_long=`cat conftestval`
1393else
1394  echo "configure: failed program was:" >&5
1395  cat conftest.$ac_ext >&5
1396  rm -fr conftest*
1397  ac_cv_sizeof_long=0
1398fi
1399rm -fr conftest*
1400fi
1401
1402fi
1403echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1404cat >> confdefs.h <<EOF
1405#define SIZEOF_LONG $ac_cv_sizeof_long
1406EOF
1407
1408
1409
1410# If we find X, set shell vars x_includes and x_libraries to the
1411# paths, otherwise set no_x=yes.
1412# Uses ac_ vars as temps to allow command line to override cache and checks.
1413# --without-x overrides everything else, but does not touch the cache.
1414echo $ac_n "checking for X""... $ac_c" 1>&6
1415echo "configure:1416: checking for X" >&5
1416
1417# Check whether --with-x or --without-x was given.
1418if test "${with_x+set}" = set; then
1419  withval="$with_x"
1420  :
1421fi
1422
1423# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1424if test "x$with_x" = xno; then
1425  # The user explicitly disabled X.
1426  have_x=disabled
1427else
1428  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1429    # Both variables are already set.
1430    have_x=yes
1431  else
1432if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1433  echo $ac_n "(cached) $ac_c" 1>&6
1434else
1435  # One or both of the vars are not set, and there is no cached value.
1436ac_x_includes=NO ac_x_libraries=NO
1437rm -fr conftestdir
1438if mkdir conftestdir; then
1439  cd conftestdir
1440  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1441  cat > Imakefile <<'EOF'
1442acfindx:
1443	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1444EOF
1445  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1446    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1447    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1448    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1449    for ac_extension in a so sl; do
1450      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1451        test -f $ac_im_libdir/libX11.$ac_extension; then
1452        ac_im_usrlibdir=$ac_im_libdir; break
1453      fi
1454    done
1455    # Screen out bogus values from the imake configuration.  They are
1456    # bogus both because they are the default anyway, and because
1457    # using them would break gcc on systems where it needs fixed includes.
1458    case "$ac_im_incroot" in
1459	/usr/include) ;;
1460	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1461    esac
1462    case "$ac_im_usrlibdir" in
1463	/usr/lib | /lib) ;;
1464	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1465    esac
1466  fi
1467  cd ..
1468  rm -fr conftestdir
1469fi
1470
1471if test "$ac_x_includes" = NO; then
1472  # Guess where to find include files, by looking for this one X11 .h file.
1473  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1474
1475  # First, try using that file with no special directory specified.
1476cat > conftest.$ac_ext <<EOF
1477#line 1478 "configure"
1478#include "confdefs.h"
1479#include <$x_direct_test_include>
1480EOF
1481ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1482{ (eval echo configure:1483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1483ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1484if test -z "$ac_err"; then
1485  rm -rf conftest*
1486  # We can compile using X headers with no special include directory.
1487ac_x_includes=
1488else
1489  echo "$ac_err" >&5
1490  echo "configure: failed program was:" >&5
1491  cat conftest.$ac_ext >&5
1492  rm -rf conftest*
1493  # Look for the header file in a standard set of common directories.
1494# Check X11 before X11Rn because it is often a symlink to the current release.
1495  for ac_dir in               \
1496    /usr/X11/include          \
1497    /usr/X11R6/include        \
1498    /usr/X11R5/include        \
1499    /usr/X11R4/include        \
1500                              \
1501    /usr/include/X11          \
1502    /usr/include/X11R6        \
1503    /usr/include/X11R5        \
1504    /usr/include/X11R4        \
1505                              \
1506    /usr/local/X11/include    \
1507    /usr/local/X11R6/include  \
1508    /usr/local/X11R5/include  \
1509    /usr/local/X11R4/include  \
1510                              \
1511    /usr/local/include/X11    \
1512    /usr/local/include/X11R6  \
1513    /usr/local/include/X11R5  \
1514    /usr/local/include/X11R4  \
1515                              \
1516    /usr/X386/include         \
1517    /usr/x386/include         \
1518    /usr/XFree86/include/X11  \
1519                              \
1520    /usr/include              \
1521    /usr/local/include        \
1522    /usr/unsupported/include  \
1523    /usr/athena/include       \
1524    /usr/local/x11r5/include  \
1525    /usr/lpp/Xamples/include  \
1526                              \
1527    /usr/openwin/include      \
1528    /usr/openwin/share/include \
1529    ; \
1530  do
1531    if test -r "$ac_dir/$x_direct_test_include"; then
1532      ac_x_includes=$ac_dir
1533      break
1534    fi
1535  done
1536fi
1537rm -f conftest*
1538fi # $ac_x_includes = NO
1539
1540if test "$ac_x_libraries" = NO; then
1541  # Check for the libraries.
1542
1543  test -z "$x_direct_test_library" && x_direct_test_library=Xt
1544  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1545
1546  # See if we find them without any special options.
1547  # Don't add to $LIBS permanently.
1548  ac_save_LIBS="$LIBS"
1549  LIBS="-l$x_direct_test_library $LIBS"
1550cat > conftest.$ac_ext <<EOF
1551#line 1552 "configure"
1552#include "confdefs.h"
1553
1554int main() {
1555${x_direct_test_function}()
1556; return 0; }
1557EOF
1558if { (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1559  rm -rf conftest*
1560  LIBS="$ac_save_LIBS"
1561# We can link X programs with no special library path.
1562ac_x_libraries=
1563else
1564  echo "configure: failed program was:" >&5
1565  cat conftest.$ac_ext >&5
1566  rm -rf conftest*
1567  LIBS="$ac_save_LIBS"
1568# First see if replacing the include by lib works.
1569# Check X11 before X11Rn because it is often a symlink to the current release.
1570for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1571    /usr/X11/lib          \
1572    /usr/X11R6/lib        \
1573    /usr/X11R5/lib        \
1574    /usr/X11R4/lib        \
1575                          \
1576    /usr/lib/X11          \
1577    /usr/lib/X11R6        \
1578    /usr/lib/X11R5        \
1579    /usr/lib/X11R4        \
1580                          \
1581    /usr/local/X11/lib    \
1582    /usr/local/X11R6/lib  \
1583    /usr/local/X11R5/lib  \
1584    /usr/local/X11R4/lib  \
1585                          \
1586    /usr/local/lib/X11    \
1587    /usr/local/lib/X11R6  \
1588    /usr/local/lib/X11R5  \
1589    /usr/local/lib/X11R4  \
1590                          \
1591    /usr/X386/lib         \
1592    /usr/x386/lib         \
1593    /usr/XFree86/lib/X11  \
1594                          \
1595    /usr/lib              \
1596    /usr/local/lib        \
1597    /usr/unsupported/lib  \
1598    /usr/athena/lib       \
1599    /usr/local/x11r5/lib  \
1600    /usr/lpp/Xamples/lib  \
1601    /lib/usr/lib/X11	  \
1602                          \
1603    /usr/openwin/lib      \
1604    /usr/openwin/share/lib \
1605    ; \
1606do
1607  for ac_extension in a so sl; do
1608    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1609      ac_x_libraries=$ac_dir
1610      break 2
1611    fi
1612  done
1613done
1614fi
1615rm -f conftest*
1616fi # $ac_x_libraries = NO
1617
1618if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1619  # Didn't find X anywhere.  Cache the known absence of X.
1620  ac_cv_have_x="have_x=no"
1621else
1622  # Record where we found X for the cache.
1623  ac_cv_have_x="have_x=yes \
1624	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1625fi
1626fi
1627  fi
1628  eval "$ac_cv_have_x"
1629fi # $with_x != no
1630
1631if test "$have_x" != yes; then
1632  echo "$ac_t""$have_x" 1>&6
1633  no_x=yes
1634else
1635  # If each of the values was on the command line, it overrides each guess.
1636  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1637  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1638  # Update the cache value to reflect the command line values.
1639  ac_cv_have_x="have_x=yes \
1640		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1641  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1642fi
1643
1644
1645if test "$require_xauth" != "no" ; then
1646  if test "$have_x" = yes; then
1647    o_CPPFLAGS="$CPPFLAGS"
1648    CPPFLAGS="$CPPFLAGS -I$x_includes -L$x_libraries"
1649  fi
1650
1651  ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
1652echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
1653echo "configure:1654: checking for X11/Xauth.h" >&5
1654if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1655  echo $ac_n "(cached) $ac_c" 1>&6
1656else
1657  cat > conftest.$ac_ext <<EOF
1658#line 1659 "configure"
1659#include "confdefs.h"
1660#include <X11/Xauth.h>
1661EOF
1662ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1663{ (eval echo configure:1664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1664ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1665if test -z "$ac_err"; then
1666  rm -rf conftest*
1667  eval "ac_cv_header_$ac_safe=yes"
1668else
1669  echo "$ac_err" >&5
1670  echo "configure: failed program was:" >&5
1671  cat conftest.$ac_ext >&5
1672  rm -rf conftest*
1673  eval "ac_cv_header_$ac_safe=no"
1674fi
1675rm -f conftest*
1676fi
1677if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1678  echo "$ac_t""yes" 1>&6
1679  use_xauth=yes
1680else
1681  echo "$ac_t""no" 1>&6
1682use_xauth=no
1683fi
1684
1685  echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
1686echo "configure:1687: checking for XauGetAuthByAddr in -lXau" >&5
1687ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
1688if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1689  echo $ac_n "(cached) $ac_c" 1>&6
1690else
1691  ac_save_LIBS="$LIBS"
1692LIBS="-lXau  $LIBS"
1693cat > conftest.$ac_ext <<EOF
1694#line 1695 "configure"
1695#include "confdefs.h"
1696/* Override any gcc2 internal prototype to avoid an error.  */
1697/* We use char because int might match the return type of a gcc2
1698    builtin and then its argument prototype would still apply.  */
1699char XauGetAuthByAddr();
1700
1701int main() {
1702XauGetAuthByAddr()
1703; return 0; }
1704EOF
1705if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1706  rm -rf conftest*
1707  eval "ac_cv_lib_$ac_lib_var=yes"
1708else
1709  echo "configure: failed program was:" >&5
1710  cat conftest.$ac_ext >&5
1711  rm -rf conftest*
1712  eval "ac_cv_lib_$ac_lib_var=no"
1713fi
1714rm -f conftest*
1715LIBS="$ac_save_LIBS"
1716
1717fi
1718if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1719  echo "$ac_t""yes" 1>&6
1720  use_xauth=yes
1721else
1722  echo "$ac_t""no" 1>&6
1723use_xauth=no
1724fi
1725
1726
1727  if test "$have_x" = yes ; then
1728    CPPFLAGS="$o_CPPFLAGS"
1729  fi
1730
1731  if test "$use_xauth" = "yes" ; then
1732    cat >> confdefs.h <<\EOF
1733#define HAVE_XAUTH 1
1734EOF
1735
1736    LIBXAUTH="-lXau"
1737    if test "$have_x" = yes ; then
1738      LIBXAUTH="-L$x_libraries $LIBXAUTH"
1739      CPPFLAGS="$CPPFLAGS -I$x_includes"
1740    fi
1741  elif test "$require_xauth" = "yes" ; then
1742    { echo "configure: error: Cannot find headers or libraries for XAUTH support." 1>&2; exit 1; }
1743  fi
1744fi
1745echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1746echo "configure:1747: checking for socket in -lsocket" >&5
1747ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1748if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1749  echo $ac_n "(cached) $ac_c" 1>&6
1750else
1751  ac_save_LIBS="$LIBS"
1752LIBS="-lsocket  $LIBS"
1753cat > conftest.$ac_ext <<EOF
1754#line 1755 "configure"
1755#include "confdefs.h"
1756/* Override any gcc2 internal prototype to avoid an error.  */
1757/* We use char because int might match the return type of a gcc2
1758    builtin and then its argument prototype would still apply.  */
1759char socket();
1760
1761int main() {
1762socket()
1763; return 0; }
1764EOF
1765if { (eval echo configure:1766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1766  rm -rf conftest*
1767  eval "ac_cv_lib_$ac_lib_var=yes"
1768else
1769  echo "configure: failed program was:" >&5
1770  cat conftest.$ac_ext >&5
1771  rm -rf conftest*
1772  eval "ac_cv_lib_$ac_lib_var=no"
1773fi
1774rm -f conftest*
1775LIBS="$ac_save_LIBS"
1776
1777fi
1778if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1779  echo "$ac_t""yes" 1>&6
1780    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1781    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1782  cat >> confdefs.h <<EOF
1783#define $ac_tr_lib 1
1784EOF
1785
1786  LIBS="-lsocket $LIBS"
1787
1788else
1789  echo "$ac_t""no" 1>&6
1790fi
1791
1792echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6
1793echo "configure:1794: checking for inet_ntoa in -lnsl" >&5
1794ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'`
1795if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1796  echo $ac_n "(cached) $ac_c" 1>&6
1797else
1798  ac_save_LIBS="$LIBS"
1799LIBS="-lnsl  $LIBS"
1800cat > conftest.$ac_ext <<EOF
1801#line 1802 "configure"
1802#include "confdefs.h"
1803/* Override any gcc2 internal prototype to avoid an error.  */
1804/* We use char because int might match the return type of a gcc2
1805    builtin and then its argument prototype would still apply.  */
1806char inet_ntoa();
1807
1808int main() {
1809inet_ntoa()
1810; return 0; }
1811EOF
1812if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1813  rm -rf conftest*
1814  eval "ac_cv_lib_$ac_lib_var=yes"
1815else
1816  echo "configure: failed program was:" >&5
1817  cat conftest.$ac_ext >&5
1818  rm -rf conftest*
1819  eval "ac_cv_lib_$ac_lib_var=no"
1820fi
1821rm -f conftest*
1822LIBS="$ac_save_LIBS"
1823
1824fi
1825if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1826  echo "$ac_t""yes" 1>&6
1827    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1828    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1829  cat >> confdefs.h <<EOF
1830#define $ac_tr_lib 1
1831EOF
1832
1833  LIBS="-lnsl $LIBS"
1834
1835else
1836  echo "$ac_t""no" 1>&6
1837fi
1838
1839echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
1840echo "configure:1841: checking for gettext in -lintl" >&5
1841ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
1842if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1843  echo $ac_n "(cached) $ac_c" 1>&6
1844else
1845  ac_save_LIBS="$LIBS"
1846LIBS="-lintl  $LIBS"
1847cat > conftest.$ac_ext <<EOF
1848#line 1849 "configure"
1849#include "confdefs.h"
1850/* Override any gcc2 internal prototype to avoid an error.  */
1851/* We use char because int might match the return type of a gcc2
1852    builtin and then its argument prototype would still apply.  */
1853char gettext();
1854
1855int main() {
1856gettext()
1857; return 0; }
1858EOF
1859if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1860  rm -rf conftest*
1861  eval "ac_cv_lib_$ac_lib_var=yes"
1862else
1863  echo "configure: failed program was:" >&5
1864  cat conftest.$ac_ext >&5
1865  rm -rf conftest*
1866  eval "ac_cv_lib_$ac_lib_var=no"
1867fi
1868rm -f conftest*
1869LIBS="$ac_save_LIBS"
1870
1871fi
1872if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1873  echo "$ac_t""yes" 1>&6
1874    ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1875    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1876  cat >> confdefs.h <<EOF
1877#define $ac_tr_lib 1
1878EOF
1879
1880  LIBS="-lintl $LIBS"
1881
1882else
1883  echo "$ac_t""no" 1>&6
1884fi
1885
1886
1887# Check whether resolv support is desired.
1888# If --with-resolv is specified to configure, support for resolv must
1889#   be available or configure will exit with an error.
1890# If --without-resolv is specified, no attempt is made to look for
1891#   resolv headers or libraries.
1892# By default, configure will use resolv if all the necessary support is
1893#   available, otherwise it won't.  No fatal errors should occur in either
1894#   circumstance.
1895
1896# Default if not otherwise found
1897ac_resolv_support=no
1898
1899if test $ac_use_resolv != no ; then
1900  echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
1901echo "configure:1902: checking for gethostbyname in -lresolv" >&5
1902ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
1903if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1904  echo $ac_n "(cached) $ac_c" 1>&6
1905else
1906  ac_save_LIBS="$LIBS"
1907LIBS="-lresolv  $LIBS"
1908cat > conftest.$ac_ext <<EOF
1909#line 1910 "configure"
1910#include "confdefs.h"
1911/* Override any gcc2 internal prototype to avoid an error.  */
1912/* We use char because int might match the return type of a gcc2
1913    builtin and then its argument prototype would still apply.  */
1914char gethostbyname();
1915
1916int main() {
1917gethostbyname()
1918; return 0; }
1919EOF
1920if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1921  rm -rf conftest*
1922  eval "ac_cv_lib_$ac_lib_var=yes"
1923else
1924  echo "configure: failed program was:" >&5
1925  cat conftest.$ac_ext >&5
1926  rm -rf conftest*
1927  eval "ac_cv_lib_$ac_lib_var=no"
1928fi
1929rm -f conftest*
1930LIBS="$ac_save_LIBS"
1931
1932fi
1933if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1934  echo "$ac_t""yes" 1>&6
1935    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1936    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1937  cat >> confdefs.h <<EOF
1938#define $ac_tr_lib 1
1939EOF
1940
1941  LIBS="-lresolv $LIBS"
1942
1943else
1944  echo "$ac_t""no" 1>&6
1945fi
1946
1947  if eval test '$'ac_cv_lib_resolv_gethostbyname = yes; then
1948    ac_resolv_support=yes
1949  elif test $ac_use_resolv = yes; then
1950    { echo "configure: error: Cannot link with -lresolv.  Is it missing?" 1>&2; exit 1; }
1951  fi
1952fi
1953
1954for ac_func in getcwd memcmp
1955do
1956echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1957echo "configure:1958: checking for $ac_func" >&5
1958if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1959  echo $ac_n "(cached) $ac_c" 1>&6
1960else
1961  cat > conftest.$ac_ext <<EOF
1962#line 1963 "configure"
1963#include "confdefs.h"
1964/* System header to define __stub macros and hopefully few prototypes,
1965    which can conflict with char $ac_func(); below.  */
1966#include <assert.h>
1967/* Override any gcc2 internal prototype to avoid an error.  */
1968/* We use char because int might match the return type of a gcc2
1969    builtin and then its argument prototype would still apply.  */
1970char $ac_func();
1971
1972int main() {
1973
1974/* The GNU C library defines this for functions which it implements
1975    to always fail with ENOSYS.  Some functions are actually named
1976    something starting with __ and the normal name is an alias.  */
1977#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1978choke me
1979#else
1980$ac_func();
1981#endif
1982
1983; return 0; }
1984EOF
1985if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1986  rm -rf conftest*
1987  eval "ac_cv_func_$ac_func=yes"
1988else
1989  echo "configure: failed program was:" >&5
1990  cat conftest.$ac_ext >&5
1991  rm -rf conftest*
1992  eval "ac_cv_func_$ac_func=no"
1993fi
1994rm -f conftest*
1995fi
1996
1997if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1998  echo "$ac_t""yes" 1>&6
1999    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2000  cat >> confdefs.h <<EOF
2001#define $ac_tr_func 1
2002EOF
2003 
2004else
2005  echo "$ac_t""no" 1>&6
2006fi
2007done
2008
2009
2010# Check whether --enable-internet-domain-sockets or --disable-internet-domain-sockets was given.
2011if test "${enable_internet_domain_sockets+set}" = set; then
2012  enableval="$enable_internet_domain_sockets"
2013  :
2014fi
2015
2016
2017if test "$enable_internet_domain_sockets" != "no" ; then
2018echo $ac_n "checking for internet-domain sockets""... $ac_c" 1>&6
2019echo "configure:2020: checking for internet-domain sockets" >&5
2020cat > conftest.$ac_ext <<EOF
2021#line 2022 "configure"
2022#include "confdefs.h"
2023
2024#include <sys/socket.h>
2025#ifdef AF_INET
2026yes
2027#endif
2028
2029EOF
2030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2031  egrep "yes" >/dev/null 2>&1; then
2032  rm -rf conftest*
2033  cat >> confdefs.h <<\EOF
2034#define HAVE_INTERNET_DOMAIN_SOCKETS 1
2035EOF
2036
2037   echo "$ac_t""yes" 1>&6
2038else
2039  rm -rf conftest*
2040  echo "$ac_t""no" 1>&6
2041fi
2042rm -f conftest*
2043
2044fi
2045
2046# Check whether --enable-internet-unix-sockets or --disable-internet-unix-sockets was given.
2047if test "${enable_internet_unix_sockets+set}" = set; then
2048  enableval="$enable_internet_unix_sockets"
2049  :
2050fi
2051
2052
2053if test "$enable_unix_domain_sockets" != "no" ; then
2054echo $ac_n "checking for unix-domain sockets""... $ac_c" 1>&6
2055echo "configure:2056: checking for unix-domain sockets" >&5
2056cat > conftest.$ac_ext <<EOF
2057#line 2058 "configure"
2058#include "confdefs.h"
2059
2060#include <sys/socket.h>
2061#ifdef AF_UNIX
2062yes
2063#endif
2064
2065EOF
2066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2067  egrep "yes" >/dev/null 2>&1; then
2068  rm -rf conftest*
2069  cat >> confdefs.h <<\EOF
2070#define HAVE_UNIX_DOMAIN_SOCKETS 1
2071EOF
2072
2073   echo "$ac_t""yes" 1>&6
2074else
2075  rm -rf conftest*
2076  echo "$ac_t""no" 1>&6
2077fi
2078rm -f conftest*
2079
2080fi
2081
2082# Check whether --enable-sysv-ipc or --disable-sysv-ipc was given.
2083if test "${enable_sysv_ipc+set}" = set; then
2084  enableval="$enable_sysv_ipc"
2085  :
2086fi
2087
2088
2089if test "$enable_sysv_ipc" != "no" ; then
2090for ac_func in msgget
2091do
2092echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2093echo "configure:2094: checking for $ac_func" >&5
2094if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2095  echo $ac_n "(cached) $ac_c" 1>&6
2096else
2097  cat > conftest.$ac_ext <<EOF
2098#line 2099 "configure"
2099#include "confdefs.h"
2100/* System header to define __stub macros and hopefully few prototypes,
2101    which can conflict with char $ac_func(); below.  */
2102#include <assert.h>
2103/* Override any gcc2 internal prototype to avoid an error.  */
2104/* We use char because int might match the return type of a gcc2
2105    builtin and then its argument prototype would still apply.  */
2106char $ac_func();
2107
2108int main() {
2109
2110/* The GNU C library defines this for functions which it implements
2111    to always fail with ENOSYS.  Some functions are actually named
2112    something starting with __ and the normal name is an alias.  */
2113#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2114choke me
2115#else
2116$ac_func();
2117#endif
2118
2119; return 0; }
2120EOF
2121if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2122  rm -rf conftest*
2123  eval "ac_cv_func_$ac_func=yes"
2124else
2125  echo "configure: failed program was:" >&5
2126  cat conftest.$ac_ext >&5
2127  rm -rf conftest*
2128  eval "ac_cv_func_$ac_func=no"
2129fi
2130rm -f conftest*
2131fi
2132
2133if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2134  echo "$ac_t""yes" 1>&6
2135    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2136  cat >> confdefs.h <<EOF
2137#define $ac_tr_func 1
2138EOF
2139 cat >> confdefs.h <<\EOF
2140#define HAVE_SYSVIPC 1
2141EOF
2142
2143else
2144  echo "$ac_t""no" 1>&6
2145fi
2146done
2147
2148fi
2149
2150trap '' 1 2 15
2151cat > confcache <<\EOF
2152# This file is a shell script that caches the results of configure
2153# tests run on this system so they can be shared between configure
2154# scripts and configure runs.  It is not useful on other systems.
2155# If it contains results you don't want to keep, you may remove or edit it.
2156#
2157# By default, configure uses ./config.cache as the cache file,
2158# creating it if it does not exist already.  You can give configure
2159# the --cache-file=FILE option to use a different cache file; that is
2160# what configure does when it calls configure scripts in
2161# subdirectories, so they share the cache.
2162# Giving --cache-file=/dev/null disables caching, for debugging configure.
2163# config.status only pays attention to the cache file if you give it the
2164# --recheck option to rerun configure.
2165#
2166EOF
2167# The following way of writing the cache mishandles newlines in values,
2168# but we know of no workaround that is simple, portable, and efficient.
2169# So, don't put newlines in cache variables' values.
2170# Ultrix sh set writes to stderr and can't be redirected directly,
2171# and sets the high bit in the cache file unless we assign to the vars.
2172(set) 2>&1 |
2173  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2174  *ac_space=\ *)
2175    # `set' does not quote correctly, so add quotes (double-quote substitution
2176    # turns \\\\ into \\, and sed turns \\ into \).
2177    sed -n \
2178      -e "s/'/'\\\\''/g" \
2179      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2180    ;;
2181  *)
2182    # `set' quotes correctly as required by POSIX, so do not add quotes.
2183    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2184    ;;
2185  esac >> confcache
2186if cmp -s $cache_file confcache; then
2187  :
2188else
2189  if test -w $cache_file; then
2190    echo "updating cache $cache_file"
2191    cat confcache > $cache_file
2192  else
2193    echo "not updating unwritable cache $cache_file"
2194  fi
2195fi
2196rm -f confcache
2197
2198trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2199
2200test "x$prefix" = xNONE && prefix=$ac_default_prefix
2201# Let make expand exec_prefix.
2202test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2203
2204# Any assignment to VPATH causes Sun make to only execute
2205# the first set of double-colon rules, so remove it if not needed.
2206# If there is a colon in the path, we need to keep it.
2207if test "x$srcdir" = x.; then
2208  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
2209fi
2210
2211trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2212
2213DEFS=-DHAVE_CONFIG_H
2214
2215# Without the "./", some shells look in PATH for config.status.
2216: ${CONFIG_STATUS=./config.status}
2217
2218echo creating $CONFIG_STATUS
2219rm -f $CONFIG_STATUS
2220cat > $CONFIG_STATUS <<EOF
2221#! /bin/sh
2222# Generated automatically by configure.
2223# Run this file to recreate the current configuration.
2224# This directory was configured as follows,
2225# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2226#
2227# $0 $ac_configure_args
2228#
2229# Compiler output produced by configure, useful for debugging
2230# configure, is in ./config.log if it exists.
2231
2232ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2233for ac_option
2234do
2235  case "\$ac_option" in
2236  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2237    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2238    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2239  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2240    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2241    exit 0 ;;
2242  -help | --help | --hel | --he | --h)
2243    echo "\$ac_cs_usage"; exit 0 ;;
2244  *) echo "\$ac_cs_usage"; exit 1 ;;
2245  esac
2246done
2247
2248ac_given_srcdir=$srcdir
2249ac_given_INSTALL="$INSTALL"
2250
2251trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2252EOF
2253cat >> $CONFIG_STATUS <<EOF
2254
2255# Protect against being on the right side of a sed subst in config.status.
2256sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2257 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2258$ac_vpsub
2259$extrasub
2260s%@SHELL@%$SHELL%g
2261s%@CFLAGS@%$CFLAGS%g
2262s%@CPPFLAGS@%$CPPFLAGS%g
2263s%@CXXFLAGS@%$CXXFLAGS%g
2264s%@FFLAGS@%$FFLAGS%g
2265s%@DEFS@%$DEFS%g
2266s%@LDFLAGS@%$LDFLAGS%g
2267s%@LIBS@%$LIBS%g
2268s%@exec_prefix@%$exec_prefix%g
2269s%@prefix@%$prefix%g
2270s%@program_transform_name@%$program_transform_name%g
2271s%@bindir@%$bindir%g
2272s%@sbindir@%$sbindir%g
2273s%@libexecdir@%$libexecdir%g
2274s%@datadir@%$datadir%g
2275s%@sysconfdir@%$sysconfdir%g
2276s%@sharedstatedir@%$sharedstatedir%g
2277s%@localstatedir@%$localstatedir%g
2278s%@libdir@%$libdir%g
2279s%@includedir@%$includedir%g
2280s%@oldincludedir@%$oldincludedir%g
2281s%@infodir@%$infodir%g
2282s%@mandir@%$mandir%g
2283s%@CC@%$CC%g
2284s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2285s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2286s%@INSTALL_DATA@%$INSTALL_DATA%g
2287s%@CPP@%$CPP%g
2288s%@LIBXAUTH@%$LIBXAUTH%g
2289
2290CEOF
2291EOF
2292
2293cat >> $CONFIG_STATUS <<\EOF
2294
2295# Split the substitutions into bite-sized pieces for seds with
2296# small command number limits, like on Digital OSF/1 and HP-UX.
2297ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2298ac_file=1 # Number of current file.
2299ac_beg=1 # First line for current file.
2300ac_end=$ac_max_sed_cmds # Line after last line for current file.
2301ac_more_lines=:
2302ac_sed_cmds=""
2303while $ac_more_lines; do
2304  if test $ac_beg -gt 1; then
2305    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2306  else
2307    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2308  fi
2309  if test ! -s conftest.s$ac_file; then
2310    ac_more_lines=false
2311    rm -f conftest.s$ac_file
2312  else
2313    if test -z "$ac_sed_cmds"; then
2314      ac_sed_cmds="sed -f conftest.s$ac_file"
2315    else
2316      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2317    fi
2318    ac_file=`expr $ac_file + 1`
2319    ac_beg=$ac_end
2320    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2321  fi
2322done
2323if test -z "$ac_sed_cmds"; then
2324  ac_sed_cmds=cat
2325fi
2326EOF
2327
2328cat >> $CONFIG_STATUS <<EOF
2329
2330CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2331EOF
2332cat >> $CONFIG_STATUS <<\EOF
2333for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2334  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2335  case "$ac_file" in
2336  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2337       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2338  *) ac_file_in="${ac_file}.in" ;;
2339  esac
2340
2341  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2342
2343  # Remove last slash and all that follows it.  Not all systems have dirname.
2344  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2345  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2346    # The file is in a subdirectory.
2347    test ! -d "$ac_dir" && mkdir "$ac_dir"
2348    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2349    # A "../" for each directory in $ac_dir_suffix.
2350    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2351  else
2352    ac_dir_suffix= ac_dots=
2353  fi
2354
2355  case "$ac_given_srcdir" in
2356  .)  srcdir=.
2357      if test -z "$ac_dots"; then top_srcdir=.
2358      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2359  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2360  *) # Relative path.
2361    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2362    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2363  esac
2364
2365  case "$ac_given_INSTALL" in
2366  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2367  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2368  esac
2369
2370  echo creating "$ac_file"
2371  rm -f "$ac_file"
2372  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2373  case "$ac_file" in
2374  *Makefile*) ac_comsub="1i\\
2375# $configure_input" ;;
2376  *) ac_comsub= ;;
2377  esac
2378
2379  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2380  sed -e "$ac_comsub
2381s%@configure_input@%$configure_input%g
2382s%@srcdir@%$srcdir%g
2383s%@top_srcdir@%$top_srcdir%g
2384s%@INSTALL@%$INSTALL%g
2385" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2386fi; done
2387rm -f conftest.s*
2388
2389# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2390# NAME is the cpp macro being defined and VALUE is the value it is being given.
2391#
2392# ac_d sets the value in "#define NAME VALUE" lines.
2393ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
2394ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
2395ac_dC='\3'
2396ac_dD='%g'
2397# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2398ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
2399ac_uB='\([ 	]\)%\1#\2define\3'
2400ac_uC=' '
2401ac_uD='\4%g'
2402# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2403ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
2404ac_eB='$%\1#\2define\3'
2405ac_eC=' '
2406ac_eD='%g'
2407
2408if test "${CONFIG_HEADERS+set}" != set; then
2409EOF
2410cat >> $CONFIG_STATUS <<EOF
2411  CONFIG_HEADERS="config.h"
2412EOF
2413cat >> $CONFIG_STATUS <<\EOF
2414fi
2415for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2416  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2417  case "$ac_file" in
2418  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2419       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2420  *) ac_file_in="${ac_file}.in" ;;
2421  esac
2422
2423  echo creating $ac_file
2424
2425  rm -f conftest.frag conftest.in conftest.out
2426  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2427  cat $ac_file_inputs > conftest.in
2428
2429EOF
2430
2431# Transform confdefs.h into a sed script conftest.vals that substitutes
2432# the proper values into config.h.in to produce config.h.  And first:
2433# Protect against being on the right side of a sed subst in config.status.
2434# Protect against being in an unquoted here document in config.status.
2435rm -f conftest.vals
2436cat > conftest.hdr <<\EOF
2437s/[\\&%]/\\&/g
2438s%[\\$`]%\\&%g
2439s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2440s%ac_d%ac_u%gp
2441s%ac_u%ac_e%gp
2442EOF
2443sed -n -f conftest.hdr confdefs.h > conftest.vals
2444rm -f conftest.hdr
2445
2446# This sed command replaces #undef with comments.  This is necessary, for
2447# example, in the case of _POSIX_SOURCE, which is predefined and required
2448# on some systems where configure will not decide to define it.
2449cat >> conftest.vals <<\EOF
2450s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2451EOF
2452
2453# Break up conftest.vals because some shells have a limit on
2454# the size of here documents, and old seds have small limits too.
2455
2456rm -f conftest.tail
2457while :
2458do
2459  ac_lines=`grep -c . conftest.vals`
2460  # grep -c gives empty output for an empty file on some AIX systems.
2461  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2462  # Write a limited-size here document to conftest.frag.
2463  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2464  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2465  echo 'CEOF
2466  sed -f conftest.frag conftest.in > conftest.out
2467  rm -f conftest.in
2468  mv conftest.out conftest.in
2469' >> $CONFIG_STATUS
2470  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2471  rm -f conftest.vals
2472  mv conftest.tail conftest.vals
2473done
2474rm -f conftest.vals
2475
2476cat >> $CONFIG_STATUS <<\EOF
2477  rm -f conftest.frag conftest.h
2478  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2479  cat conftest.in >> conftest.h
2480  rm -f conftest.in
2481  if cmp -s $ac_file conftest.h 2>/dev/null; then
2482    echo "$ac_file is unchanged"
2483    rm -f conftest.h
2484  else
2485    # Remove last slash and all that follows it.  Not all systems have dirname.
2486      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2487      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2488      # The file is in a subdirectory.
2489      test ! -d "$ac_dir" && mkdir "$ac_dir"
2490    fi
2491    rm -f $ac_file
2492    mv conftest.h $ac_file
2493  fi
2494fi; done
2495
2496EOF
2497cat >> $CONFIG_STATUS <<EOF
2498
2499EOF
2500cat >> $CONFIG_STATUS <<\EOF
2501
2502exit 0
2503EOF
2504chmod +x $CONFIG_STATUS
2505rm -fr confdefs* $ac_clean_files
2506test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2507
2508