]> git.sur5r.net Git - openldap/blob - configure
Merge changes from LDAP_3_3+prerelease into BOOLEAN_LDAP
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
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:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --enable-debug        enable debugging (yes)"
17 ac_help="$ac_help
18   --enable-cache        enable caching (yes)"
19 ac_help="$ac_help
20   --enable-referrals    enable referrals (yes)"
21 ac_help="$ac_help
22   --enable-clapd        enable connectionless ldap (no)"
23 ac_help="$ac_help
24   --enable-phonetic     enable phonetic/soundex  (no)"
25 ac_help="$ac_help
26   --enable-ldapd        enable building ldapd (no)"
27 ac_help="$ac_help
28   --enable-slapd        enable building slapd (yes)"
29 ac_help="$ac_help
30   --enable-slurpd       enable building slurpd (yes)"
31 ac_help="$ac_help
32   --enable-ldbm         enable ldbm backend (yes)"
33 ac_help="$ac_help
34   --enable-passwd       enable passwd backend (yes)"
35 ac_help="$ac_help
36   --enable-shell        enable shell backend (yes)"
37 ac_help="$ac_help
38   --with-ndbm           use NDB for LDBM backend (any)"
39 ac_help="$ac_help
40   --with-gdbm           use GDBM for LDBM backend (any)"
41 ac_help="$ac_help
42   --with-dbhash         use Berkeley DB Hash for LDBM backend (any)"
43 ac_help="$ac_help
44   --with-dbbtree        use Berkeley DB Btrees for LDBM backend (any)"
45 ac_help="$ac_help
46   --with-kerberos       use Kerberos (no)"
47 ac_help="$ac_help
48   --with-kerberos-afs   use AFS Kerberos (no)"
49 ac_help="$ac_help
50   --with-threads        use threads (yes)"
51
52 # Initialize some variables set by options.
53 # The variables have the same names as the options, with
54 # dashes changed to underlines.
55 build=NONE
56 cache_file=./config.cache
57 exec_prefix=NONE
58 host=NONE
59 no_create=
60 nonopt=NONE
61 no_recursion=
62 prefix=NONE
63 program_prefix=NONE
64 program_suffix=NONE
65 program_transform_name=s,x,x,
66 silent=
67 site=
68 srcdir=
69 target=NONE
70 verbose=
71 x_includes=NONE
72 x_libraries=NONE
73 bindir='${exec_prefix}/bin'
74 sbindir='${exec_prefix}/sbin'
75 libexecdir='${exec_prefix}/libexec'
76 datadir='${prefix}/share'
77 sysconfdir='${prefix}/etc'
78 sharedstatedir='${prefix}/com'
79 localstatedir='${prefix}/var'
80 libdir='${exec_prefix}/lib'
81 includedir='${prefix}/include'
82 oldincludedir='/usr/include'
83 infodir='${prefix}/info'
84 mandir='${prefix}/man'
85
86 # Initialize some other variables.
87 subdirs=
88 MFLAGS= MAKEFLAGS=
89 # Maximum number of lines to put in a shell here document.
90 ac_max_here_lines=12
91
92 ac_prev=
93 for ac_option
94 do
95
96   # If the previous option needs an argument, assign it.
97   if test -n "$ac_prev"; then
98     eval "$ac_prev=\$ac_option"
99     ac_prev=
100     continue
101   fi
102
103   case "$ac_option" in
104   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
105   *) ac_optarg= ;;
106   esac
107
108   # Accept the important Cygnus configure options, so we can diagnose typos.
109
110   case "$ac_option" in
111
112   -bindir | --bindir | --bindi | --bind | --bin | --bi)
113     ac_prev=bindir ;;
114   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
115     bindir="$ac_optarg" ;;
116
117   -build | --build | --buil | --bui | --bu)
118     ac_prev=build ;;
119   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
120     build="$ac_optarg" ;;
121
122   -cache-file | --cache-file | --cache-fil | --cache-fi \
123   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
124     ac_prev=cache_file ;;
125   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
126   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
127     cache_file="$ac_optarg" ;;
128
129   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
130     ac_prev=datadir ;;
131   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
132   | --da=*)
133     datadir="$ac_optarg" ;;
134
135   -disable-* | --disable-*)
136     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
137     # Reject names that are not valid shell variable names.
138     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
139       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
140     fi
141     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
142     eval "enable_${ac_feature}=no" ;;
143
144   -enable-* | --enable-*)
145     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
146     # Reject names that are not valid shell variable names.
147     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
148       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
149     fi
150     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
151     case "$ac_option" in
152       *=*) ;;
153       *) ac_optarg=yes ;;
154     esac
155     eval "enable_${ac_feature}='$ac_optarg'" ;;
156
157   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
158   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
159   | --exec | --exe | --ex)
160     ac_prev=exec_prefix ;;
161   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
162   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
163   | --exec=* | --exe=* | --ex=*)
164     exec_prefix="$ac_optarg" ;;
165
166   -gas | --gas | --ga | --g)
167     # Obsolete; use --with-gas.
168     with_gas=yes ;;
169
170   -help | --help | --hel | --he)
171     # Omit some internal or obsolete options to make the list less imposing.
172     # This message is too long to be a string in the A/UX 3.1 sh.
173     cat << EOF
174 Usage: configure [options] [host]
175 Options: [defaults in brackets after descriptions]
176 Configuration:
177   --cache-file=FILE       cache test results in FILE
178   --help                  print this message
179   --no-create             do not create output files
180   --quiet, --silent       do not print \`checking...' messages
181   --version               print the version of autoconf that created configure
182 Directory and file names:
183   --prefix=PREFIX         install architecture-independent files in PREFIX
184                           [$ac_default_prefix]
185   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
186                           [same as prefix]
187   --bindir=DIR            user executables in DIR [EPREFIX/bin]
188   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
189   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
190   --datadir=DIR           read-only architecture-independent data in DIR
191                           [PREFIX/share]
192   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
193   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
194                           [PREFIX/com]
195   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
196   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
197   --includedir=DIR        C header files in DIR [PREFIX/include]
198   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
199   --infodir=DIR           info documentation in DIR [PREFIX/info]
200   --mandir=DIR            man documentation in DIR [PREFIX/man]
201   --srcdir=DIR            find the sources in DIR [configure dir or ..]
202   --program-prefix=PREFIX prepend PREFIX to installed program names
203   --program-suffix=SUFFIX append SUFFIX to installed program names
204   --program-transform-name=PROGRAM
205                           run sed PROGRAM on installed program names
206 EOF
207     cat << EOF
208 Host type:
209   --build=BUILD           configure for building on BUILD [BUILD=HOST]
210   --host=HOST             configure for HOST [guessed]
211   --target=TARGET         configure for TARGET [TARGET=HOST]
212 Features and packages:
213   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
214   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
215   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
216   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
217   --x-includes=DIR        X include files are in DIR
218   --x-libraries=DIR       X library files are in DIR
219 EOF
220     if test -n "$ac_help"; then
221       echo "--enable and --with options recognized:$ac_help"
222     fi
223     exit 0 ;;
224
225   -host | --host | --hos | --ho)
226     ac_prev=host ;;
227   -host=* | --host=* | --hos=* | --ho=*)
228     host="$ac_optarg" ;;
229
230   -includedir | --includedir | --includedi | --included | --include \
231   | --includ | --inclu | --incl | --inc)
232     ac_prev=includedir ;;
233   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
234   | --includ=* | --inclu=* | --incl=* | --inc=*)
235     includedir="$ac_optarg" ;;
236
237   -infodir | --infodir | --infodi | --infod | --info | --inf)
238     ac_prev=infodir ;;
239   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
240     infodir="$ac_optarg" ;;
241
242   -libdir | --libdir | --libdi | --libd)
243     ac_prev=libdir ;;
244   -libdir=* | --libdir=* | --libdi=* | --libd=*)
245     libdir="$ac_optarg" ;;
246
247   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
248   | --libexe | --libex | --libe)
249     ac_prev=libexecdir ;;
250   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
251   | --libexe=* | --libex=* | --libe=*)
252     libexecdir="$ac_optarg" ;;
253
254   -localstatedir | --localstatedir | --localstatedi | --localstated \
255   | --localstate | --localstat | --localsta | --localst \
256   | --locals | --local | --loca | --loc | --lo)
257     ac_prev=localstatedir ;;
258   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
259   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
260   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
261     localstatedir="$ac_optarg" ;;
262
263   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
264     ac_prev=mandir ;;
265   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
266     mandir="$ac_optarg" ;;
267
268   -nfp | --nfp | --nf)
269     # Obsolete; use --without-fp.
270     with_fp=no ;;
271
272   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
273   | --no-cr | --no-c)
274     no_create=yes ;;
275
276   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
277   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
278     no_recursion=yes ;;
279
280   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
281   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
282   | --oldin | --oldi | --old | --ol | --o)
283     ac_prev=oldincludedir ;;
284   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
285   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
286   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
287     oldincludedir="$ac_optarg" ;;
288
289   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
290     ac_prev=prefix ;;
291   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
292     prefix="$ac_optarg" ;;
293
294   -program-prefix | --program-prefix | --program-prefi | --program-pref \
295   | --program-pre | --program-pr | --program-p)
296     ac_prev=program_prefix ;;
297   -program-prefix=* | --program-prefix=* | --program-prefi=* \
298   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
299     program_prefix="$ac_optarg" ;;
300
301   -program-suffix | --program-suffix | --program-suffi | --program-suff \
302   | --program-suf | --program-su | --program-s)
303     ac_prev=program_suffix ;;
304   -program-suffix=* | --program-suffix=* | --program-suffi=* \
305   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
306     program_suffix="$ac_optarg" ;;
307
308   -program-transform-name | --program-transform-name \
309   | --program-transform-nam | --program-transform-na \
310   | --program-transform-n | --program-transform- \
311   | --program-transform | --program-transfor \
312   | --program-transfo | --program-transf \
313   | --program-trans | --program-tran \
314   | --progr-tra | --program-tr | --program-t)
315     ac_prev=program_transform_name ;;
316   -program-transform-name=* | --program-transform-name=* \
317   | --program-transform-nam=* | --program-transform-na=* \
318   | --program-transform-n=* | --program-transform-=* \
319   | --program-transform=* | --program-transfor=* \
320   | --program-transfo=* | --program-transf=* \
321   | --program-trans=* | --program-tran=* \
322   | --progr-tra=* | --program-tr=* | --program-t=*)
323     program_transform_name="$ac_optarg" ;;
324
325   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
326   | -silent | --silent | --silen | --sile | --sil)
327     silent=yes ;;
328
329   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
330     ac_prev=sbindir ;;
331   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
332   | --sbi=* | --sb=*)
333     sbindir="$ac_optarg" ;;
334
335   -sharedstatedir | --sharedstatedir | --sharedstatedi \
336   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
337   | --sharedst | --shareds | --shared | --share | --shar \
338   | --sha | --sh)
339     ac_prev=sharedstatedir ;;
340   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
341   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
342   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
343   | --sha=* | --sh=*)
344     sharedstatedir="$ac_optarg" ;;
345
346   -site | --site | --sit)
347     ac_prev=site ;;
348   -site=* | --site=* | --sit=*)
349     site="$ac_optarg" ;;
350
351   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
352     ac_prev=srcdir ;;
353   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
354     srcdir="$ac_optarg" ;;
355
356   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
357   | --syscon | --sysco | --sysc | --sys | --sy)
358     ac_prev=sysconfdir ;;
359   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
360   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
361     sysconfdir="$ac_optarg" ;;
362
363   -target | --target | --targe | --targ | --tar | --ta | --t)
364     ac_prev=target ;;
365   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
366     target="$ac_optarg" ;;
367
368   -v | -verbose | --verbose | --verbos | --verbo | --verb)
369     verbose=yes ;;
370
371   -version | --version | --versio | --versi | --vers)
372     echo "configure generated by autoconf version 2.12"
373     exit 0 ;;
374
375   -with-* | --with-*)
376     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
377     # Reject names that are not valid shell variable names.
378     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
379       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
380     fi
381     ac_package=`echo $ac_package| sed 's/-/_/g'`
382     case "$ac_option" in
383       *=*) ;;
384       *) ac_optarg=yes ;;
385     esac
386     eval "with_${ac_package}='$ac_optarg'" ;;
387
388   -without-* | --without-*)
389     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
390     # Reject names that are not valid shell variable names.
391     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
392       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
393     fi
394     ac_package=`echo $ac_package| sed 's/-/_/g'`
395     eval "with_${ac_package}=no" ;;
396
397   --x)
398     # Obsolete; use --with-x.
399     with_x=yes ;;
400
401   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
402   | --x-incl | --x-inc | --x-in | --x-i)
403     ac_prev=x_includes ;;
404   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
405   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
406     x_includes="$ac_optarg" ;;
407
408   -x-libraries | --x-libraries | --x-librarie | --x-librari \
409   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
410     ac_prev=x_libraries ;;
411   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
412   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
413     x_libraries="$ac_optarg" ;;
414
415   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
416     ;;
417
418   *)
419     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
420       echo "configure: warning: $ac_option: invalid host type" 1>&2
421     fi
422     if test "x$nonopt" != xNONE; then
423       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
424     fi
425     nonopt="$ac_option"
426     ;;
427
428   esac
429 done
430
431 if test -n "$ac_prev"; then
432   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
433 fi
434
435 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
436
437 # File descriptor usage:
438 # 0 standard input
439 # 1 file creation
440 # 2 errors and warnings
441 # 3 some systems may open it to /dev/tty
442 # 4 used on the Kubota Titan
443 # 6 checking for... messages and results
444 # 5 compiler messages saved in config.log
445 if test "$silent" = yes; then
446   exec 6>/dev/null
447 else
448   exec 6>&1
449 fi
450 exec 5>./config.log
451
452 echo "\
453 This file contains any messages produced by compilers while
454 running configure, to aid debugging if configure makes a mistake.
455 " 1>&5
456
457 # Strip out --no-create and --no-recursion so they do not pile up.
458 # Also quote any args containing shell metacharacters.
459 ac_configure_args=
460 for ac_arg
461 do
462   case "$ac_arg" in
463   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
464   | --no-cr | --no-c) ;;
465   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
466   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
467   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
468   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
469   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
470   esac
471 done
472
473 # NLS nuisances.
474 # Only set these to C if already set.  These must not be set unconditionally
475 # because not all systems understand e.g. LANG=C (notably SCO).
476 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
477 # Non-C LC_CTYPE values break the ctype check.
478 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
479 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
480 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
481 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
482
483 # confdefs.h avoids OS command line length limits that DEFS can exceed.
484 rm -rf conftest* confdefs.h
485 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
486 echo > confdefs.h
487
488 # A filename unique to this package, relative to the directory that
489 # configure is in, which we can look for to find out if srcdir is correct.
490 ac_unique_file=include/ldap.h
491
492 # Find the source files, if location was not specified.
493 if test -z "$srcdir"; then
494   ac_srcdir_defaulted=yes
495   # Try the directory containing this script, then its parent.
496   ac_prog=$0
497   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
498   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
499   srcdir=$ac_confdir
500   if test ! -r $srcdir/$ac_unique_file; then
501     srcdir=..
502   fi
503 else
504   ac_srcdir_defaulted=no
505 fi
506 if test ! -r $srcdir/$ac_unique_file; then
507   if test "$ac_srcdir_defaulted" = yes; then
508     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
509   else
510     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
511   fi
512 fi
513 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
514
515 # Prefer explicitly selected file to automatically selected ones.
516 if test -z "$CONFIG_SITE"; then
517   if test "x$prefix" != xNONE; then
518     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
519   else
520     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
521   fi
522 fi
523 for ac_site_file in $CONFIG_SITE; do
524   if test -r "$ac_site_file"; then
525     echo "loading site script $ac_site_file"
526     . "$ac_site_file"
527   fi
528 done
529
530 if test -r "$cache_file"; then
531   echo "loading cache $cache_file"
532   . $cache_file
533 else
534   echo "creating cache $cache_file"
535   > $cache_file
536 fi
537
538 ac_ext=c
539 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
540 ac_cpp='$CPP $CPPFLAGS'
541 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
542 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
543 cross_compiling=$ac_cv_prog_cc_cross
544
545 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
546   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
547   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
548     ac_n= ac_c='
549 ' ac_t='        '
550   else
551     ac_n=-n ac_c= ac_t=
552   fi
553 else
554   ac_n= ac_c='\c' ac_t=
555 fi
556
557
558 ac_aux_dir=
559 for ac_dir in etc $srcdir/etc; do
560   if test -f $ac_dir/install-sh; then
561     ac_aux_dir=$ac_dir
562     ac_install_sh="$ac_aux_dir/install-sh -c"
563     break
564   elif test -f $ac_dir/install.sh; then
565     ac_aux_dir=$ac_dir
566     ac_install_sh="$ac_aux_dir/install.sh -c"
567     break
568   fi
569 done
570 if test -z "$ac_aux_dir"; then
571   { echo "configure: error: can not find install-sh or install.sh in etc $srcdir/etc" 1>&2; exit 1; }
572 fi
573 ac_config_guess=$ac_aux_dir/config.guess
574 ac_config_sub=$ac_aux_dir/config.sub
575 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
576
577 echo $ac_n "checking arguments""... $ac_c" 1>&6
578 echo "configure:579: checking arguments" >&5
579
580
581 # Check whether --enable-debug or --disable-debug was given.
582 if test "${enable_debug+set}" = set; then
583   enableval="$enable_debug"
584   test "$enableval" != no && enableval=yes
585   if test "$enableval" != "yes" ; then
586     
587         LDAP_DEBUG=no 
588   else
589     LDAP_DEBUG=yes
590   fi
591 else
592   enableval=yes 
593   LDAP_DEBUG=yes
594   
595 fi
596 # Check whether --enable-cache or --disable-cache was given.
597 if test "${enable_cache+set}" = set; then
598   enableval="$enable_cache"
599   test "$enableval" != no && enableval=yes
600   if test "$enableval" != "yes" ; then
601     
602         LDAP_CACHE=no 
603   else
604     LDAP_CACHE=yes
605   fi
606 else
607   enableval=yes 
608   LDAP_CACHE=yes
609   
610 fi
611 # Check whether --enable-referrals or --disable-referrals was given.
612 if test "${enable_referrals+set}" = set; then
613   enableval="$enable_referrals"
614   test "$enableval" != no && enableval=yes
615   if test "$enableval" != "yes" ; then
616     
617         LDAP_REFERRALS=no 
618   else
619     LDAP_REFERRALS=yes
620   fi
621 else
622   enableval=yes 
623   LDAP_REFERRALS=yes
624   
625 fi
626
627 # Check whether --enable-cldap or --disable-cldap was given.
628 if test "${enable_cldap+set}" = set; then
629   enableval="$enable_cldap"
630   test "$enableval" != yes && enableval=no
631   if test "$enableval" != "no" ; then
632     
633         LDAP_CLDAP=yes 
634   else
635     LDAP_CLDAP=no
636   fi
637 else
638   enableval=no 
639   LDAP_CLDAP=no
640   
641 fi
642 # Check whether --enable-phonetic or --disable-phonetic was given.
643 if test "${enable_phonetic+set}" = set; then
644   enableval="$enable_phonetic"
645   test "$enableval" != yes && enableval=no
646   if test "$enableval" != "no" ; then
647     
648         LDAP_PHONETIC=yes 
649   else
650     LDAP_PHONETIC=no
651   fi
652 else
653   enableval=no 
654   LDAP_PHONETIC=no
655   
656 fi
657
658 # Check whether --enable-ldapd or --disable-ldapd was given.
659 if test "${enable_ldapd+set}" = set; then
660   enableval="$enable_ldapd"
661   test "$enableval" != yes && enableval=no
662   if test "$enableval" != "no" ; then
663     
664         BUILD_LDAPD=yes 
665   else
666     BUILD_LDAPD=no
667   fi
668 else
669   enableval=no 
670   BUILD_LDAPD=no
671   
672 fi
673 # Check whether --enable-slapd or --disable-slapd was given.
674 if test "${enable_slapd+set}" = set; then
675   enableval="$enable_slapd"
676   test "$enableval" != no && enableval=yes
677   if test "$enableval" != "yes" ; then
678     
679         BUILD_SLAPD=no 
680   else
681     BUILD_SLAPD=yes
682   fi
683 else
684   enableval=yes 
685   BUILD_SLAPD=yes
686   
687 fi
688 # Check whether --enable-slurpd or --disable-slurpd was given.
689 if test "${enable_slurpd+set}" = set; then
690   enableval="$enable_slurpd"
691   test "$enableval" != no && enableval=yes
692   if test "$enableval" != "yes" ; then
693     
694         BUILD_SLURPD=no 
695   else
696     BUILD_SLURPD=yes
697   fi
698 else
699   enableval=yes 
700   BUILD_SLURPD=yes
701   
702 fi
703
704 # Check whether --enable-ldbm or --disable-ldbm was given.
705 if test "${enable_ldbm+set}" = set; then
706   enableval="$enable_ldbm"
707   test "$enableval" != no && enableval=yes
708   if test "$enableval" != "yes" ; then
709     
710         BUILD_LDBM=no 
711   else
712     BUILD_LDBM=yes
713   fi
714 else
715   enableval=yes 
716   BUILD_LDBM=yes
717   
718 fi
719 # Check whether --enable-passwd or --disable-passwd was given.
720 if test "${enable_passwd+set}" = set; then
721   enableval="$enable_passwd"
722   test "$enableval" != no && enableval=yes
723   if test "$enableval" != "yes" ; then
724     
725         BUILD_PASSWD=no 
726   else
727     BUILD_PASSWD=yes
728   fi
729 else
730   enableval=yes 
731   BUILD_PASSWD=yes
732   
733 fi
734 # Check whether --enable-shell or --disable-shell was given.
735 if test "${enable_shell+set}" = set; then
736   enableval="$enable_shell"
737   test "$enableval" != no && enableval=yes
738   if test "$enableval" != "yes" ; then
739     
740         BUILD_SHELL=no 
741   else
742     BUILD_SHELL=yes
743   fi
744 else
745   enableval=yes 
746   BUILD_SHELL=yes
747   
748 fi
749
750 # Check whether --with-ndbm or --without-ndbm was given.
751 if test "${with_ndbm+set}" = set; then
752   withval="$with_ndbm"
753   
754         opt_ndbm=yes
755 else
756   opt_ndbm=no
757 fi
758
759 # Check whether --with-gdbm or --without-gdbm was given.
760 if test "${with_gdbm+set}" = set; then
761   withval="$with_gdbm"
762   
763         opt_gdbm=yes
764 else
765   opt_gdbm=no
766 fi
767
768 # Check whether --with-dbhash or --without-dbhash was given.
769 if test "${with_dbhash+set}" = set; then
770   withval="$with_dbhash"
771   
772         opt_dbhash=yes
773 else
774   opt_dbhash=no
775 fi
776
777 # Check whether --with-dbbtree or --without-dbbtree was given.
778 if test "${with_dbbtree+set}" = set; then
779   withval="$with_dbbtree"
780   
781         opt_dbbtree=yes
782 else
783   opt_dbbtree=no
784 fi
785
786
787 # Check whether --with-kerberos or --without-kerberos was given.
788 if test "${with_kerberos+set}" = set; then
789   withval="$with_kerberos"
790   
791         opt_kerberos=yes
792 else
793   opt_kerberos=no
794 fi
795
796 # Check whether --with-kerberos-afs or --without-kerberos-afs was given.
797 if test "${with_kerberos_afs+set}" = set; then
798   withval="$with_kerberos_afs"
799   
800         opt_kerberos_afs=yes
801 else
802   opt_kerberos_afs=no
803 fi
804
805 # Check whether --with-threads or --without-threads was given.
806 if test "${with_threads+set}" = set; then
807   withval="$with_threads"
808   
809         opt_threads=yes
810 else
811   opt_threads=no
812 fi
813
814
815 echo "$ac_t""done" 1>&6
816
817 echo $ac_n "checking LDBM preferences""... $ac_c" 1>&6
818 echo "configure:819: checking LDBM preferences" >&5
819 ldbm_prefer=any
820
821 if test "$opt_ndbm" = yes ; then
822         ldbm_prefer=ndbm
823 fi
824 if test "$opt_gdbm" = yes ; then
825         ldbm_prefer=gdbm
826 fi
827 if test "$opt_dbhash" = yes ; then
828         ldbm_prefer=dbhash
829 fi
830 if test "$opt_dbbtree" = yes ; then
831         ldbm_prefer=dbbtree
832 fi
833 echo "$ac_t""$ldbm_prefer" 1>&6
834
835 if test "$BUILD_SLAPD" != "yes" ; then
836         BUILD_SLURPD="no"
837         BUILD_LDBM="no"
838         BUILD_PASSWD="no"
839         BUILD_SHELL="no"
840         ldbm_prefer="none"
841 fi
842
843
844
845
846
847
848
849
850
851 LDAP_DEFS=
852
853 if test "$LDAP_DEBUG" = "yes" ; then
854         LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG"
855 fi
856 if test "$LDAP_REFERRALS" = "yes" ; then
857         cat >> confdefs.h <<\EOF
858 #define LDAP_REFERRALS 1
859 EOF
860
861 fi
862 if test "$LDAP_CACHE" = "no" ; then
863         cat >> confdefs.h <<\EOF
864 #define LDAP_NOCACHE 1
865 EOF
866
867         LDAP_DEFS="$LDAP_DEFS -DNO_CACHE"
868 fi
869 if test "$LDAP_CLDAP" = "yes" ; then
870         cat >> confdefs.h <<\EOF
871 #define LDAP_CONN_LESS 1
872 EOF
873
874         LDAP_DEFS="$LDAP_DEFS -DCLDAP"
875 fi
876 if test "$LDAP_PHONETIC" = "yes" ; then
877         cat >> confdefs.h <<\EOF
878 #define LDAP_PHONETIC 1
879 EOF
880
881         LDAP_DEFS="$LDAP_DEFS -DSOUNDEX"
882 fi
883
884 if test "$BUILD_LDBM" = "yes" ; then
885         cat >> confdefs.h <<\EOF
886 #define LDAP_LDBM 1
887 EOF
888
889 fi
890 if test "$BUILD_PASSWD" = "yes" ; then
891         cat >> confdefs.h <<\EOF
892 #define LDAP_PASSWD 1
893 EOF
894
895 fi
896 if test "$BUILD_SHELL" = "yes" ; then
897         cat >> confdefs.h <<\EOF
898 #define LDAP_SHELL 1
899 EOF
900
901 fi
902
903
904 # Extract the first word of "gcc", so it can be a program name with args.
905 set dummy gcc; ac_word=$2
906 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
907 echo "configure:908: checking for $ac_word" >&5
908 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
909   echo $ac_n "(cached) $ac_c" 1>&6
910 else
911   if test -n "$CC"; then
912   ac_cv_prog_CC="$CC" # Let the user override the test.
913 else
914   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
915   for ac_dir in $PATH; do
916     test -z "$ac_dir" && ac_dir=.
917     if test -f $ac_dir/$ac_word; then
918       ac_cv_prog_CC="gcc"
919       break
920     fi
921   done
922   IFS="$ac_save_ifs"
923 fi
924 fi
925 CC="$ac_cv_prog_CC"
926 if test -n "$CC"; then
927   echo "$ac_t""$CC" 1>&6
928 else
929   echo "$ac_t""no" 1>&6
930 fi
931
932 if test -z "$CC"; then
933   # Extract the first word of "cc", so it can be a program name with args.
934 set dummy cc; ac_word=$2
935 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
936 echo "configure:937: checking for $ac_word" >&5
937 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
938   echo $ac_n "(cached) $ac_c" 1>&6
939 else
940   if test -n "$CC"; then
941   ac_cv_prog_CC="$CC" # Let the user override the test.
942 else
943   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
944   ac_prog_rejected=no
945   for ac_dir in $PATH; do
946     test -z "$ac_dir" && ac_dir=.
947     if test -f $ac_dir/$ac_word; then
948       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
949         ac_prog_rejected=yes
950         continue
951       fi
952       ac_cv_prog_CC="cc"
953       break
954     fi
955   done
956   IFS="$ac_save_ifs"
957 if test $ac_prog_rejected = yes; then
958   # We found a bogon in the path, so make sure we never use it.
959   set dummy $ac_cv_prog_CC
960   shift
961   if test $# -gt 0; then
962     # We chose a different compiler from the bogus one.
963     # However, it has the same basename, so the bogon will be chosen
964     # first if we set CC to just the basename; use the full file name.
965     shift
966     set dummy "$ac_dir/$ac_word" "$@"
967     shift
968     ac_cv_prog_CC="$@"
969   fi
970 fi
971 fi
972 fi
973 CC="$ac_cv_prog_CC"
974 if test -n "$CC"; then
975   echo "$ac_t""$CC" 1>&6
976 else
977   echo "$ac_t""no" 1>&6
978 fi
979
980   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
981 fi
982
983 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
984 echo "configure:985: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
985
986 ac_ext=c
987 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
988 ac_cpp='$CPP $CPPFLAGS'
989 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
990 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
991 cross_compiling=$ac_cv_prog_cc_cross
992
993 cat > conftest.$ac_ext <<EOF
994 #line 995 "configure"
995 #include "confdefs.h"
996 main(){return(0);}
997 EOF
998 if { (eval echo configure:999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
999   ac_cv_prog_cc_works=yes
1000   # If we can't run a trivial program, we are probably using a cross compiler.
1001   if (./conftest; exit) 2>/dev/null; then
1002     ac_cv_prog_cc_cross=no
1003   else
1004     ac_cv_prog_cc_cross=yes
1005   fi
1006 else
1007   echo "configure: failed program was:" >&5
1008   cat conftest.$ac_ext >&5
1009   ac_cv_prog_cc_works=no
1010 fi
1011 rm -fr conftest*
1012
1013 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1014 if test $ac_cv_prog_cc_works = no; then
1015   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1016 fi
1017 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1018 echo "configure:1019: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1019 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1020 cross_compiling=$ac_cv_prog_cc_cross
1021
1022 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1023 echo "configure:1024: checking whether we are using GNU C" >&5
1024 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1025   echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027   cat > conftest.c <<EOF
1028 #ifdef __GNUC__
1029   yes;
1030 #endif
1031 EOF
1032 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1033   ac_cv_prog_gcc=yes
1034 else
1035   ac_cv_prog_gcc=no
1036 fi
1037 fi
1038
1039 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1040
1041 if test $ac_cv_prog_gcc = yes; then
1042   GCC=yes
1043   ac_test_CFLAGS="${CFLAGS+set}"
1044   ac_save_CFLAGS="$CFLAGS"
1045   CFLAGS=
1046   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1047 echo "configure:1048: checking whether ${CC-cc} accepts -g" >&5
1048 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1049   echo $ac_n "(cached) $ac_c" 1>&6
1050 else
1051   echo 'void f(){}' > conftest.c
1052 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1053   ac_cv_prog_cc_g=yes
1054 else
1055   ac_cv_prog_cc_g=no
1056 fi
1057 rm -f conftest*
1058
1059 fi
1060
1061 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1062   if test "$ac_test_CFLAGS" = set; then
1063     CFLAGS="$ac_save_CFLAGS"
1064   elif test $ac_cv_prog_cc_g = yes; then
1065     CFLAGS="-g -O2"
1066   else
1067     CFLAGS="-O2"
1068   fi
1069 else
1070   GCC=
1071   test "${CFLAGS+set}" = set || CFLAGS="-g"
1072 fi
1073
1074 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1075 echo "configure:1076: checking how to run the C preprocessor" >&5
1076 # On Suns, sometimes $CPP names a directory.
1077 if test -n "$CPP" && test -d "$CPP"; then
1078   CPP=
1079 fi
1080 if test -z "$CPP"; then
1081 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1082   echo $ac_n "(cached) $ac_c" 1>&6
1083 else
1084     # This must be in double quotes, not single quotes, because CPP may get
1085   # substituted into the Makefile and "${CC-cc}" will confuse make.
1086   CPP="${CC-cc} -E"
1087   # On the NeXT, cc -E runs the code through the compiler's parser,
1088   # not just through cpp.
1089   cat > conftest.$ac_ext <<EOF
1090 #line 1091 "configure"
1091 #include "confdefs.h"
1092 #include <assert.h>
1093 Syntax Error
1094 EOF
1095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1096 { (eval echo configure:1097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1097 ac_err=`grep -v '^ *+' conftest.out`
1098 if test -z "$ac_err"; then
1099   :
1100 else
1101   echo "$ac_err" >&5
1102   echo "configure: failed program was:" >&5
1103   cat conftest.$ac_ext >&5
1104   rm -rf conftest*
1105   CPP="${CC-cc} -E -traditional-cpp"
1106   cat > conftest.$ac_ext <<EOF
1107 #line 1108 "configure"
1108 #include "confdefs.h"
1109 #include <assert.h>
1110 Syntax Error
1111 EOF
1112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1113 { (eval echo configure:1114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1114 ac_err=`grep -v '^ *+' conftest.out`
1115 if test -z "$ac_err"; then
1116   :
1117 else
1118   echo "$ac_err" >&5
1119   echo "configure: failed program was:" >&5
1120   cat conftest.$ac_ext >&5
1121   rm -rf conftest*
1122   CPP=/lib/cpp
1123 fi
1124 rm -f conftest*
1125 fi
1126 rm -f conftest*
1127   ac_cv_prog_CPP="$CPP"
1128 fi
1129   CPP="$ac_cv_prog_CPP"
1130 else
1131   ac_cv_prog_CPP="$CPP"
1132 fi
1133 echo "$ac_t""$CPP" 1>&6
1134
1135 if test $ac_cv_prog_gcc = yes; then
1136     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1137 echo "configure:1138: checking whether ${CC-cc} needs -traditional" >&5
1138 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1139   echo $ac_n "(cached) $ac_c" 1>&6
1140 else
1141     ac_pattern="Autoconf.*'x'"
1142   cat > conftest.$ac_ext <<EOF
1143 #line 1144 "configure"
1144 #include "confdefs.h"
1145 #include <sgtty.h>
1146 Autoconf TIOCGETP
1147 EOF
1148 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1149   egrep "$ac_pattern" >/dev/null 2>&1; then
1150   rm -rf conftest*
1151   ac_cv_prog_gcc_traditional=yes
1152 else
1153   rm -rf conftest*
1154   ac_cv_prog_gcc_traditional=no
1155 fi
1156 rm -f conftest*
1157
1158
1159   if test $ac_cv_prog_gcc_traditional = no; then
1160     cat > conftest.$ac_ext <<EOF
1161 #line 1162 "configure"
1162 #include "confdefs.h"
1163 #include <termio.h>
1164 Autoconf TCGETA
1165 EOF
1166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1167   egrep "$ac_pattern" >/dev/null 2>&1; then
1168   rm -rf conftest*
1169   ac_cv_prog_gcc_traditional=yes
1170 fi
1171 rm -f conftest*
1172
1173   fi
1174 fi
1175
1176 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1177   if test $ac_cv_prog_gcc_traditional = yes; then
1178     CC="$CC -traditional"
1179   fi
1180 fi
1181
1182
1183 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1184 echo "configure:1185: checking whether ln -s works" >&5
1185 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1186   echo $ac_n "(cached) $ac_c" 1>&6
1187 else
1188   rm -f conftestdata
1189 if ln -s X conftestdata 2>/dev/null
1190 then
1191   rm -f conftestdata
1192   ac_cv_prog_LN_S="ln -s"
1193 else
1194   ac_cv_prog_LN_S=ln
1195 fi
1196 fi
1197 LN_S="$ac_cv_prog_LN_S"
1198 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1199   echo "$ac_t""yes" 1>&6
1200 else
1201   echo "$ac_t""no" 1>&6
1202 fi
1203
1204 # Find a good install program.  We prefer a C program (faster),
1205 # so one script is as good as another.  But avoid the broken or
1206 # incompatible versions:
1207 # SysV /etc/install, /usr/sbin/install
1208 # SunOS /usr/etc/install
1209 # IRIX /sbin/install
1210 # AIX /bin/install
1211 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1212 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1213 # ./install, which can be erroneously created by make from ./install.sh.
1214 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1215 echo "configure:1216: checking for a BSD compatible install" >&5
1216 if test -z "$INSTALL"; then
1217 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1218   echo $ac_n "(cached) $ac_c" 1>&6
1219 else
1220     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1221   for ac_dir in $PATH; do
1222     # Account for people who put trailing slashes in PATH elements.
1223     case "$ac_dir/" in
1224     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1225     *)
1226       # OSF1 and SCO ODT 3.0 have their own names for install.
1227       for ac_prog in ginstall installbsd scoinst install; do
1228         if test -f $ac_dir/$ac_prog; then
1229           if test $ac_prog = install &&
1230             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1231             # AIX install.  It has an incompatible calling convention.
1232             # OSF/1 installbsd also uses dspmsg, but is usable.
1233             :
1234           else
1235             ac_cv_path_install="$ac_dir/$ac_prog -c"
1236             break 2
1237           fi
1238         fi
1239       done
1240       ;;
1241     esac
1242   done
1243   IFS="$ac_save_IFS"
1244
1245 fi
1246   if test "${ac_cv_path_install+set}" = set; then
1247     INSTALL="$ac_cv_path_install"
1248   else
1249     # As a last resort, use the slow shell script.  We don't cache a
1250     # path for INSTALL within a source directory, because that will
1251     # break other packages using the cache if that directory is
1252     # removed, or if the path is relative.
1253     INSTALL="$ac_install_sh"
1254   fi
1255 fi
1256 echo "$ac_t""$INSTALL" 1>&6
1257
1258 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1259 # It thinks the first close brace ends the variable substitution.
1260 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1261
1262 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1263
1264 # Extract the first word of "ranlib", so it can be a program name with args.
1265 set dummy ranlib; ac_word=$2
1266 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1267 echo "configure:1268: checking for $ac_word" >&5
1268 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1269   echo $ac_n "(cached) $ac_c" 1>&6
1270 else
1271   if test -n "$RANLIB"; then
1272   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1273 else
1274   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1275   for ac_dir in $PATH; do
1276     test -z "$ac_dir" && ac_dir=.
1277     if test -f $ac_dir/$ac_word; then
1278       ac_cv_prog_RANLIB="ranlib"
1279       break
1280     fi
1281   done
1282   IFS="$ac_save_ifs"
1283   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1284 fi
1285 fi
1286 RANLIB="$ac_cv_prog_RANLIB"
1287 if test -n "$RANLIB"; then
1288   echo "$ac_t""$RANLIB" 1>&6
1289 else
1290   echo "$ac_t""no" 1>&6
1291 fi
1292
1293 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1294 echo "configure:1295: checking whether ${MAKE-make} sets \${MAKE}" >&5
1295 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1296 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1297   echo $ac_n "(cached) $ac_c" 1>&6
1298 else
1299   cat > conftestmake <<\EOF
1300 all:
1301         @echo 'ac_maketemp="${MAKE}"'
1302 EOF
1303 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1304 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1305 if test -n "$ac_maketemp"; then
1306   eval ac_cv_prog_make_${ac_make}_set=yes
1307 else
1308   eval ac_cv_prog_make_${ac_make}_set=no
1309 fi
1310 rm -f conftestmake
1311 fi
1312 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1313   echo "$ac_t""yes" 1>&6
1314   SET_MAKE=
1315 else
1316   echo "$ac_t""no" 1>&6
1317   SET_MAKE="MAKE=${MAKE-make}"
1318 fi
1319
1320
1321 # Extract the first word of "sendmail", so it can be a program name with args.
1322 set dummy sendmail; ac_word=$2
1323 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1324 echo "configure:1325: checking for $ac_word" >&5
1325 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
1326   echo $ac_n "(cached) $ac_c" 1>&6
1327 else
1328   case "$SENDMAIL" in
1329   /*)
1330   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
1331   ;;
1332   *)
1333   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1334   for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:etc$ac_dummy; do
1335     test -z "$ac_dir" && ac_dir=.
1336     if test -f $ac_dir/$ac_word; then
1337       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
1338       break
1339     fi
1340   done
1341   IFS="$ac_save_ifs"
1342   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
1343   ;;
1344 esac
1345 fi
1346 SENDMAIL="$ac_cv_path_SENDMAIL"
1347 if test -n "$SENDMAIL"; then
1348   echo "$ac_t""$SENDMAIL" 1>&6
1349 else
1350   echo "$ac_t""no" 1>&6
1351 fi
1352
1353 # Extract the first word of "vi", so it can be a program name with args.
1354 set dummy vi; ac_word=$2
1355 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1356 echo "configure:1357: checking for $ac_word" >&5
1357 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
1358   echo $ac_n "(cached) $ac_c" 1>&6
1359 else
1360   case "$EDITOR" in
1361   /*)
1362   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
1363   ;;
1364   *)
1365   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1366   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1367     test -z "$ac_dir" && ac_dir=.
1368     if test -f $ac_dir/$ac_word; then
1369       ac_cv_path_EDITOR="$ac_dir/$ac_word"
1370       break
1371     fi
1372   done
1373   IFS="$ac_save_ifs"
1374   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
1375   ;;
1376 esac
1377 fi
1378 EDITOR="$ac_cv_path_EDITOR"
1379 if test -n "$EDITOR"; then
1380   echo "$ac_t""$EDITOR" 1>&6
1381 else
1382   echo "$ac_t""no" 1>&6
1383 fi
1384
1385 # Extract the first word of "finger", so it can be a program name with args.
1386 set dummy finger; ac_word=$2
1387 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1388 echo "configure:1389: checking for $ac_word" >&5
1389 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
1390   echo $ac_n "(cached) $ac_c" 1>&6
1391 else
1392   case "$FINGER" in
1393   /*)
1394   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
1395   ;;
1396   *)
1397   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1398   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1399     test -z "$ac_dir" && ac_dir=.
1400     if test -f $ac_dir/$ac_word; then
1401       ac_cv_path_FINGER="$ac_dir/$ac_word"
1402       break
1403     fi
1404   done
1405   IFS="$ac_save_ifs"
1406   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
1407   ;;
1408 esac
1409 fi
1410 FINGER="$ac_cv_path_FINGER"
1411 if test -n "$FINGER"; then
1412   echo "$ac_t""$FINGER" 1>&6
1413 else
1414   echo "$ac_t""no" 1>&6
1415 fi
1416
1417
1418 ldbm_use="none"
1419 LIBDB=""
1420
1421 if test "$BUILD_LDBM" = "yes" ; then
1422         if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \
1423                         -o $ldbm_prefer = dbhash ; then
1424                 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
1425 echo "configure:1426: checking for dbopen" >&5
1426 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
1427   echo $ac_n "(cached) $ac_c" 1>&6
1428 else
1429   cat > conftest.$ac_ext <<EOF
1430 #line 1431 "configure"
1431 #include "confdefs.h"
1432 /* System header to define __stub macros and hopefully few prototypes,
1433     which can conflict with char dbopen(); below.  */
1434 #include <assert.h>
1435 /* Override any gcc2 internal prototype to avoid an error.  */
1436 /* We use char because int might match the return type of a gcc2
1437     builtin and then its argument prototype would still apply.  */
1438 char dbopen();
1439
1440 int main() {
1441
1442 /* The GNU C library defines this for functions which it implements
1443     to always fail with ENOSYS.  Some functions are actually named
1444     something starting with __ and the normal name is an alias.  */
1445 #if defined (__stub_dbopen) || defined (__stub___dbopen)
1446 choke me
1447 #else
1448 dbopen();
1449 #endif
1450
1451 ; return 0; }
1452 EOF
1453 if { (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1454   rm -rf conftest*
1455   eval "ac_cv_func_dbopen=yes"
1456 else
1457   echo "configure: failed program was:" >&5
1458   cat conftest.$ac_ext >&5
1459   rm -rf conftest*
1460   eval "ac_cv_func_dbopen=no"
1461 fi
1462 rm -f conftest*
1463 fi
1464
1465 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
1466   echo "$ac_t""yes" 1>&6
1467   
1468                         ldbm_use=$ldbm_prefer
1469                         ldbm_prefer=found
1470 else
1471   echo "$ac_t""no" 1>&6
1472
1473                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
1474 echo "configure:1475: checking for dbopen in -ldb" >&5
1475 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
1476 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1477   echo $ac_n "(cached) $ac_c" 1>&6
1478 else
1479   ac_save_LIBS="$LIBS"
1480 LIBS="-ldb  $LIBS"
1481 cat > conftest.$ac_ext <<EOF
1482 #line 1483 "configure"
1483 #include "confdefs.h"
1484 /* Override any gcc2 internal prototype to avoid an error.  */
1485 /* We use char because int might match the return type of a gcc2
1486     builtin and then its argument prototype would still apply.  */
1487 char dbopen();
1488
1489 int main() {
1490 dbopen()
1491 ; return 0; }
1492 EOF
1493 if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1494   rm -rf conftest*
1495   eval "ac_cv_lib_$ac_lib_var=yes"
1496 else
1497   echo "configure: failed program was:" >&5
1498   cat conftest.$ac_ext >&5
1499   rm -rf conftest*
1500   eval "ac_cv_lib_$ac_lib_var=no"
1501 fi
1502 rm -f conftest*
1503 LIBS="$ac_save_LIBS"
1504
1505 fi
1506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1507   echo "$ac_t""yes" 1>&6
1508   
1509                                 ldbm_use=$ldbm_prefer
1510                                 ldbm_prefer=found
1511                                 LIBDB="-ldb"
1512                         
1513 else
1514   echo "$ac_t""no" 1>&6
1515 fi
1516  
1517                 
1518 fi
1519
1520
1521                 if test $ldbm_prefer = found ; then
1522                         if test $ldbm_use = dbhash ; then
1523                                 cat >> confdefs.h <<\EOF
1524 #define LDBM_USE_DBHASH 1
1525 EOF
1526
1527                         else
1528                                 cat >> confdefs.h <<\EOF
1529 #define LDBM_USE_DBBTREE 1
1530 EOF
1531
1532                         fi
1533                 fi
1534         fi
1535         if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then
1536                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
1537 echo "configure:1538: checking for gdbm_open in -lgdbm" >&5
1538 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
1539 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1540   echo $ac_n "(cached) $ac_c" 1>&6
1541 else
1542   ac_save_LIBS="$LIBS"
1543 LIBS="-lgdbm  $LIBS"
1544 cat > conftest.$ac_ext <<EOF
1545 #line 1546 "configure"
1546 #include "confdefs.h"
1547 /* Override any gcc2 internal prototype to avoid an error.  */
1548 /* We use char because int might match the return type of a gcc2
1549     builtin and then its argument prototype would still apply.  */
1550 char gdbm_open();
1551
1552 int main() {
1553 gdbm_open()
1554 ; return 0; }
1555 EOF
1556 if { (eval echo configure:1557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1557   rm -rf conftest*
1558   eval "ac_cv_lib_$ac_lib_var=yes"
1559 else
1560   echo "configure: failed program was:" >&5
1561   cat conftest.$ac_ext >&5
1562   rm -rf conftest*
1563   eval "ac_cv_lib_$ac_lib_var=no"
1564 fi
1565 rm -f conftest*
1566 LIBS="$ac_save_LIBS"
1567
1568 fi
1569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1570   echo "$ac_t""yes" 1>&6
1571   
1572                         ldbm_use=$ldbm_prefer
1573                         ldbm_prefer=found
1574                         LIBDB="-lgdbm"
1575                         cat >> confdefs.h <<\EOF
1576 #define LDBM_USE_GDBM 1
1577 EOF
1578
1579                 
1580 else
1581   echo "$ac_t""no" 1>&6
1582 fi
1583  
1584         fi
1585         if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then
1586                 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
1587 echo "configure:1588: checking for dbm_open in -ldbm" >&5
1588 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
1589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1590   echo $ac_n "(cached) $ac_c" 1>&6
1591 else
1592   ac_save_LIBS="$LIBS"
1593 LIBS="-ldbm  $LIBS"
1594 cat > conftest.$ac_ext <<EOF
1595 #line 1596 "configure"
1596 #include "confdefs.h"
1597 /* Override any gcc2 internal prototype to avoid an error.  */
1598 /* We use char because int might match the return type of a gcc2
1599     builtin and then its argument prototype would still apply.  */
1600 char dbm_open();
1601
1602 int main() {
1603 dbm_open()
1604 ; return 0; }
1605 EOF
1606 if { (eval echo configure:1607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1607   rm -rf conftest*
1608   eval "ac_cv_lib_$ac_lib_var=yes"
1609 else
1610   echo "configure: failed program was:" >&5
1611   cat conftest.$ac_ext >&5
1612   rm -rf conftest*
1613   eval "ac_cv_lib_$ac_lib_var=no"
1614 fi
1615 rm -f conftest*
1616 LIBS="$ac_save_LIBS"
1617
1618 fi
1619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1620   echo "$ac_t""yes" 1>&6
1621   
1622                         ldbm_use=ndbm
1623                         ldbm_prefer=found
1624                         LIBDB="-ldbm"
1625                         cat >> confdefs.h <<\EOF
1626 #define LDBM_USE_NDBM 1
1627 EOF
1628
1629                 
1630 else
1631   echo "$ac_t""no" 1>&6
1632 fi
1633  
1634         fi
1635
1636         if test $ldbm_prefer != found ; then
1637                 { echo "configure: error: could not find suitable db for $ldbm_prefer backend" 1>&2; exit 1; }
1638         fi
1639
1640         if test $ldbm_use = ndbm ; then
1641                 echo "configure: warning: LDBM using NDBM" 1>&2
1642         fi
1643 fi
1644
1645
1646
1647
1648 # ud needs termcap (should insert check here)
1649 LIBTERMCAP="-ltermcap"
1650
1651
1652 # FreeBSD has obsoleted re_comp(3) from -lc, needs -lcompat
1653 echo $ac_n "checking for re_comp in -lcompat""... $ac_c" 1>&6
1654 echo "configure:1655: checking for re_comp in -lcompat" >&5
1655 ac_lib_var=`echo compat'_'re_comp | sed 'y%./+-%__p_%'`
1656 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1657   echo $ac_n "(cached) $ac_c" 1>&6
1658 else
1659   ac_save_LIBS="$LIBS"
1660 LIBS="-lcompat  $LIBS"
1661 cat > conftest.$ac_ext <<EOF
1662 #line 1663 "configure"
1663 #include "confdefs.h"
1664 /* Override any gcc2 internal prototype to avoid an error.  */
1665 /* We use char because int might match the return type of a gcc2
1666     builtin and then its argument prototype would still apply.  */
1667 char re_comp();
1668
1669 int main() {
1670 re_comp()
1671 ; return 0; }
1672 EOF
1673 if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1674   rm -rf conftest*
1675   eval "ac_cv_lib_$ac_lib_var=yes"
1676 else
1677   echo "configure: failed program was:" >&5
1678   cat conftest.$ac_ext >&5
1679   rm -rf conftest*
1680   eval "ac_cv_lib_$ac_lib_var=no"
1681 fi
1682 rm -f conftest*
1683 LIBS="$ac_save_LIBS"
1684
1685 fi
1686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1687   echo "$ac_t""yes" 1>&6
1688     ac_tr_lib=HAVE_LIB`echo compat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1689     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1690   cat >> confdefs.h <<EOF
1691 #define $ac_tr_lib 1
1692 EOF
1693
1694   LIBS="-lcompat $LIBS"
1695
1696 else
1697   echo "$ac_t""no" 1>&6
1698 fi
1699  
1700
1701 # FreeBSD (and others) have crypt(3) in -lcrypt
1702 LIBCRYPT=
1703 echo $ac_n "checking for crypt""... $ac_c" 1>&6
1704 echo "configure:1705: checking for crypt" >&5
1705 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
1706   echo $ac_n "(cached) $ac_c" 1>&6
1707 else
1708   cat > conftest.$ac_ext <<EOF
1709 #line 1710 "configure"
1710 #include "confdefs.h"
1711 /* System header to define __stub macros and hopefully few prototypes,
1712     which can conflict with char crypt(); below.  */
1713 #include <assert.h>
1714 /* Override any gcc2 internal prototype to avoid an error.  */
1715 /* We use char because int might match the return type of a gcc2
1716     builtin and then its argument prototype would still apply.  */
1717 char crypt();
1718
1719 int main() {
1720
1721 /* The GNU C library defines this for functions which it implements
1722     to always fail with ENOSYS.  Some functions are actually named
1723     something starting with __ and the normal name is an alias.  */
1724 #if defined (__stub_crypt) || defined (__stub___crypt)
1725 choke me
1726 #else
1727 crypt();
1728 #endif
1729
1730 ; return 0; }
1731 EOF
1732 if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1733   rm -rf conftest*
1734   eval "ac_cv_func_crypt=yes"
1735 else
1736   echo "configure: failed program was:" >&5
1737   cat conftest.$ac_ext >&5
1738   rm -rf conftest*
1739   eval "ac_cv_func_crypt=no"
1740 fi
1741 rm -f conftest*
1742 fi
1743
1744 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
1745   echo "$ac_t""yes" 1>&6
1746   cat >> confdefs.h <<\EOF
1747 #define HAVE_CRYPT 1
1748 EOF
1749
1750 else
1751   echo "$ac_t""no" 1>&6
1752
1753         echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
1754 echo "configure:1755: checking for crypt in -lcrypt" >&5
1755 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
1756 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1757   echo $ac_n "(cached) $ac_c" 1>&6
1758 else
1759   ac_save_LIBS="$LIBS"
1760 LIBS="-lcrypt  $LIBS"
1761 cat > conftest.$ac_ext <<EOF
1762 #line 1763 "configure"
1763 #include "confdefs.h"
1764 /* Override any gcc2 internal prototype to avoid an error.  */
1765 /* We use char because int might match the return type of a gcc2
1766     builtin and then its argument prototype would still apply.  */
1767 char crypt();
1768
1769 int main() {
1770 crypt()
1771 ; return 0; }
1772 EOF
1773 if { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1774   rm -rf conftest*
1775   eval "ac_cv_lib_$ac_lib_var=yes"
1776 else
1777   echo "configure: failed program was:" >&5
1778   cat conftest.$ac_ext >&5
1779   rm -rf conftest*
1780   eval "ac_cv_lib_$ac_lib_var=no"
1781 fi
1782 rm -f conftest*
1783 LIBS="$ac_save_LIBS"
1784
1785 fi
1786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1787   echo "$ac_t""yes" 1>&6
1788   LIBCRYPT="-lcrypt"
1789         cat >> confdefs.h <<\EOF
1790 #define HAVE_CRYPT 1
1791 EOF
1792
1793 else
1794   echo "$ac_t""no" 1>&6
1795 fi
1796
1797
1798 fi
1799
1800
1801
1802 ac_header_dirent=no
1803 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1804 do
1805 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1806 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1807 echo "configure:1808: checking for $ac_hdr that defines DIR" >&5
1808 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1809   echo $ac_n "(cached) $ac_c" 1>&6
1810 else
1811   cat > conftest.$ac_ext <<EOF
1812 #line 1813 "configure"
1813 #include "confdefs.h"
1814 #include <sys/types.h>
1815 #include <$ac_hdr>
1816 int main() {
1817 DIR *dirp = 0;
1818 ; return 0; }
1819 EOF
1820 if { (eval echo configure:1821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1821   rm -rf conftest*
1822   eval "ac_cv_header_dirent_$ac_safe=yes"
1823 else
1824   echo "configure: failed program was:" >&5
1825   cat conftest.$ac_ext >&5
1826   rm -rf conftest*
1827   eval "ac_cv_header_dirent_$ac_safe=no"
1828 fi
1829 rm -f conftest*
1830 fi
1831 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1832   echo "$ac_t""yes" 1>&6
1833     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1834   cat >> confdefs.h <<EOF
1835 #define $ac_tr_hdr 1
1836 EOF
1837  ac_header_dirent=$ac_hdr; break
1838 else
1839   echo "$ac_t""no" 1>&6
1840 fi
1841 done
1842 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1843 if test $ac_header_dirent = dirent.h; then
1844 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1845 echo "configure:1846: checking for opendir in -ldir" >&5
1846 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1847 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1848   echo $ac_n "(cached) $ac_c" 1>&6
1849 else
1850   ac_save_LIBS="$LIBS"
1851 LIBS="-ldir  $LIBS"
1852 cat > conftest.$ac_ext <<EOF
1853 #line 1854 "configure"
1854 #include "confdefs.h"
1855 /* Override any gcc2 internal prototype to avoid an error.  */
1856 /* We use char because int might match the return type of a gcc2
1857     builtin and then its argument prototype would still apply.  */
1858 char opendir();
1859
1860 int main() {
1861 opendir()
1862 ; return 0; }
1863 EOF
1864 if { (eval echo configure:1865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1865   rm -rf conftest*
1866   eval "ac_cv_lib_$ac_lib_var=yes"
1867 else
1868   echo "configure: failed program was:" >&5
1869   cat conftest.$ac_ext >&5
1870   rm -rf conftest*
1871   eval "ac_cv_lib_$ac_lib_var=no"
1872 fi
1873 rm -f conftest*
1874 LIBS="$ac_save_LIBS"
1875
1876 fi
1877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1878   echo "$ac_t""yes" 1>&6
1879   LIBS="$LIBS -ldir"
1880 else
1881   echo "$ac_t""no" 1>&6
1882 fi
1883
1884 else
1885 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1886 echo "configure:1887: checking for opendir in -lx" >&5
1887 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1888 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1889   echo $ac_n "(cached) $ac_c" 1>&6
1890 else
1891   ac_save_LIBS="$LIBS"
1892 LIBS="-lx  $LIBS"
1893 cat > conftest.$ac_ext <<EOF
1894 #line 1895 "configure"
1895 #include "confdefs.h"
1896 /* Override any gcc2 internal prototype to avoid an error.  */
1897 /* We use char because int might match the return type of a gcc2
1898     builtin and then its argument prototype would still apply.  */
1899 char opendir();
1900
1901 int main() {
1902 opendir()
1903 ; return 0; }
1904 EOF
1905 if { (eval echo configure:1906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1906   rm -rf conftest*
1907   eval "ac_cv_lib_$ac_lib_var=yes"
1908 else
1909   echo "configure: failed program was:" >&5
1910   cat conftest.$ac_ext >&5
1911   rm -rf conftest*
1912   eval "ac_cv_lib_$ac_lib_var=no"
1913 fi
1914 rm -f conftest*
1915 LIBS="$ac_save_LIBS"
1916
1917 fi
1918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1919   echo "$ac_t""yes" 1>&6
1920   LIBS="$LIBS -lx"
1921 else
1922   echo "$ac_t""no" 1>&6
1923 fi
1924
1925 fi
1926
1927 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1928 echo "configure:1929: checking for ANSI C header files" >&5
1929 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1930   echo $ac_n "(cached) $ac_c" 1>&6
1931 else
1932   cat > conftest.$ac_ext <<EOF
1933 #line 1934 "configure"
1934 #include "confdefs.h"
1935 #include <stdlib.h>
1936 #include <stdarg.h>
1937 #include <string.h>
1938 #include <float.h>
1939 EOF
1940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1941 { (eval echo configure:1942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1942 ac_err=`grep -v '^ *+' conftest.out`
1943 if test -z "$ac_err"; then
1944   rm -rf conftest*
1945   ac_cv_header_stdc=yes
1946 else
1947   echo "$ac_err" >&5
1948   echo "configure: failed program was:" >&5
1949   cat conftest.$ac_ext >&5
1950   rm -rf conftest*
1951   ac_cv_header_stdc=no
1952 fi
1953 rm -f conftest*
1954
1955 if test $ac_cv_header_stdc = yes; then
1956   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1957 cat > conftest.$ac_ext <<EOF
1958 #line 1959 "configure"
1959 #include "confdefs.h"
1960 #include <string.h>
1961 EOF
1962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1963   egrep "memchr" >/dev/null 2>&1; then
1964   :
1965 else
1966   rm -rf conftest*
1967   ac_cv_header_stdc=no
1968 fi
1969 rm -f conftest*
1970
1971 fi
1972
1973 if test $ac_cv_header_stdc = yes; then
1974   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1975 cat > conftest.$ac_ext <<EOF
1976 #line 1977 "configure"
1977 #include "confdefs.h"
1978 #include <stdlib.h>
1979 EOF
1980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1981   egrep "free" >/dev/null 2>&1; then
1982   :
1983 else
1984   rm -rf conftest*
1985   ac_cv_header_stdc=no
1986 fi
1987 rm -f conftest*
1988
1989 fi
1990
1991 if test $ac_cv_header_stdc = yes; then
1992   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1993 if test "$cross_compiling" = yes; then
1994   :
1995 else
1996   cat > conftest.$ac_ext <<EOF
1997 #line 1998 "configure"
1998 #include "confdefs.h"
1999 #include <ctype.h>
2000 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2001 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2002 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2003 int main () { int i; for (i = 0; i < 256; i++)
2004 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2005 exit (0); }
2006
2007 EOF
2008 if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2009 then
2010   :
2011 else
2012   echo "configure: failed program was:" >&5
2013   cat conftest.$ac_ext >&5
2014   rm -fr conftest*
2015   ac_cv_header_stdc=no
2016 fi
2017 rm -fr conftest*
2018 fi
2019
2020 fi
2021 fi
2022
2023 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2024 if test $ac_cv_header_stdc = yes; then
2025   cat >> confdefs.h <<\EOF
2026 #define STDC_HEADERS 1
2027 EOF
2028
2029 fi
2030
2031 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2032 echo "configure:2033: checking for sys/wait.h that is POSIX.1 compatible" >&5
2033 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2034   echo $ac_n "(cached) $ac_c" 1>&6
2035 else
2036   cat > conftest.$ac_ext <<EOF
2037 #line 2038 "configure"
2038 #include "confdefs.h"
2039 #include <sys/types.h>
2040 #include <sys/wait.h>
2041 #ifndef WEXITSTATUS
2042 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2043 #endif
2044 #ifndef WIFEXITED
2045 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2046 #endif
2047 int main() {
2048 int s;
2049 wait (&s);
2050 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2051 ; return 0; }
2052 EOF
2053 if { (eval echo configure:2054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2054   rm -rf conftest*
2055   ac_cv_header_sys_wait_h=yes
2056 else
2057   echo "configure: failed program was:" >&5
2058   cat conftest.$ac_ext >&5
2059   rm -rf conftest*
2060   ac_cv_header_sys_wait_h=no
2061 fi
2062 rm -f conftest*
2063 fi
2064
2065 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2066 if test $ac_cv_header_sys_wait_h = yes; then
2067   cat >> confdefs.h <<\EOF
2068 #define HAVE_SYS_WAIT_H 1
2069 EOF
2070
2071 fi
2072
2073 for ac_hdr in \
2074         stddef.h        \
2075         fcntl.h         \
2076         limits.h        \
2077         malloc.h        \
2078         sgtty.h         \
2079         sys/file.h      \
2080         sys/ioctl.h     \
2081         sys/time.h      \
2082         syslog.h        \
2083         termio.h        \
2084         unistd.h        \
2085
2086 do
2087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2089 echo "configure:2090: checking for $ac_hdr" >&5
2090 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2091   echo $ac_n "(cached) $ac_c" 1>&6
2092 else
2093   cat > conftest.$ac_ext <<EOF
2094 #line 2095 "configure"
2095 #include "confdefs.h"
2096 #include <$ac_hdr>
2097 EOF
2098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2099 { (eval echo configure:2100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2100 ac_err=`grep -v '^ *+' conftest.out`
2101 if test -z "$ac_err"; then
2102   rm -rf conftest*
2103   eval "ac_cv_header_$ac_safe=yes"
2104 else
2105   echo "$ac_err" >&5
2106   echo "configure: failed program was:" >&5
2107   cat conftest.$ac_ext >&5
2108   rm -rf conftest*
2109   eval "ac_cv_header_$ac_safe=no"
2110 fi
2111 rm -f conftest*
2112 fi
2113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2114   echo "$ac_t""yes" 1>&6
2115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2116   cat >> confdefs.h <<EOF
2117 #define $ac_tr_hdr 1
2118 EOF
2119  
2120 else
2121   echo "$ac_t""no" 1>&6
2122 fi
2123 done
2124
2125
2126 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2127 echo "configure:2128: checking for uid_t in sys/types.h" >&5
2128 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2129   echo $ac_n "(cached) $ac_c" 1>&6
2130 else
2131   cat > conftest.$ac_ext <<EOF
2132 #line 2133 "configure"
2133 #include "confdefs.h"
2134 #include <sys/types.h>
2135 EOF
2136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2137   egrep "uid_t" >/dev/null 2>&1; then
2138   rm -rf conftest*
2139   ac_cv_type_uid_t=yes
2140 else
2141   rm -rf conftest*
2142   ac_cv_type_uid_t=no
2143 fi
2144 rm -f conftest*
2145
2146 fi
2147
2148 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2149 if test $ac_cv_type_uid_t = no; then
2150   cat >> confdefs.h <<\EOF
2151 #define uid_t int
2152 EOF
2153
2154   cat >> confdefs.h <<\EOF
2155 #define gid_t int
2156 EOF
2157
2158 fi
2159
2160 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
2161 echo "configure:2162: checking type of array argument to getgroups" >&5
2162 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
2163   echo $ac_n "(cached) $ac_c" 1>&6
2164 else
2165   if test "$cross_compiling" = yes; then
2166   ac_cv_type_getgroups=cross
2167 else
2168   cat > conftest.$ac_ext <<EOF
2169 #line 2170 "configure"
2170 #include "confdefs.h"
2171
2172 /* Thanks to Mike Rendell for this test.  */
2173 #include <sys/types.h>
2174 #define NGID 256
2175 #undef MAX
2176 #define MAX(x, y) ((x) > (y) ? (x) : (y))
2177 main()
2178 {
2179   gid_t gidset[NGID];
2180   int i, n;
2181   union { gid_t gval; long lval; }  val;
2182
2183   val.lval = -1;
2184   for (i = 0; i < NGID; i++)
2185     gidset[i] = val.gval;
2186   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
2187                  gidset);
2188   /* Exit non-zero if getgroups seems to require an array of ints.  This
2189      happens when gid_t is short but getgroups modifies an array of ints.  */
2190   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
2191 }
2192
2193 EOF
2194 if { (eval echo configure:2195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2195 then
2196     ac_cv_type_getgroups=gid_t
2197 else
2198   echo "configure: failed program was:" >&5
2199   cat conftest.$ac_ext >&5
2200   rm -fr conftest*
2201   ac_cv_type_getgroups=int
2202 fi
2203 rm -fr conftest*
2204 fi
2205
2206 if test $ac_cv_type_getgroups = cross; then
2207         cat > conftest.$ac_ext <<EOF
2208 #line 2209 "configure"
2209 #include "confdefs.h"
2210 #include <unistd.h>
2211 EOF
2212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2213   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
2214   rm -rf conftest*
2215   ac_cv_type_getgroups=gid_t
2216 else
2217   rm -rf conftest*
2218   ac_cv_type_getgroups=int
2219 fi
2220 rm -f conftest*
2221
2222 fi
2223 fi
2224
2225 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
2226 cat >> confdefs.h <<EOF
2227 #define GETGROUPS_T $ac_cv_type_getgroups
2228 EOF
2229
2230
2231 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2232 echo "configure:2233: checking for mode_t" >&5
2233 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2234   echo $ac_n "(cached) $ac_c" 1>&6
2235 else
2236   cat > conftest.$ac_ext <<EOF
2237 #line 2238 "configure"
2238 #include "confdefs.h"
2239 #include <sys/types.h>
2240 #if STDC_HEADERS
2241 #include <stdlib.h>
2242 #include <stddef.h>
2243 #endif
2244 EOF
2245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2246   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2247   rm -rf conftest*
2248   ac_cv_type_mode_t=yes
2249 else
2250   rm -rf conftest*
2251   ac_cv_type_mode_t=no
2252 fi
2253 rm -f conftest*
2254
2255 fi
2256 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2257 if test $ac_cv_type_mode_t = no; then
2258   cat >> confdefs.h <<\EOF
2259 #define mode_t int
2260 EOF
2261
2262 fi
2263
2264 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2265 echo "configure:2266: checking for off_t" >&5
2266 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2267   echo $ac_n "(cached) $ac_c" 1>&6
2268 else
2269   cat > conftest.$ac_ext <<EOF
2270 #line 2271 "configure"
2271 #include "confdefs.h"
2272 #include <sys/types.h>
2273 #if STDC_HEADERS
2274 #include <stdlib.h>
2275 #include <stddef.h>
2276 #endif
2277 EOF
2278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2279   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2280   rm -rf conftest*
2281   ac_cv_type_off_t=yes
2282 else
2283   rm -rf conftest*
2284   ac_cv_type_off_t=no
2285 fi
2286 rm -f conftest*
2287
2288 fi
2289 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2290 if test $ac_cv_type_off_t = no; then
2291   cat >> confdefs.h <<\EOF
2292 #define off_t long
2293 EOF
2294
2295 fi
2296
2297 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2298 echo "configure:2299: checking for pid_t" >&5
2299 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2300   echo $ac_n "(cached) $ac_c" 1>&6
2301 else
2302   cat > conftest.$ac_ext <<EOF
2303 #line 2304 "configure"
2304 #include "confdefs.h"
2305 #include <sys/types.h>
2306 #if STDC_HEADERS
2307 #include <stdlib.h>
2308 #include <stddef.h>
2309 #endif
2310 EOF
2311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2312   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2313   rm -rf conftest*
2314   ac_cv_type_pid_t=yes
2315 else
2316   rm -rf conftest*
2317   ac_cv_type_pid_t=no
2318 fi
2319 rm -f conftest*
2320
2321 fi
2322 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2323 if test $ac_cv_type_pid_t = no; then
2324   cat >> confdefs.h <<\EOF
2325 #define pid_t int
2326 EOF
2327
2328 fi
2329
2330 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2331 echo "configure:2332: checking return type of signal handlers" >&5
2332 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2333   echo $ac_n "(cached) $ac_c" 1>&6
2334 else
2335   cat > conftest.$ac_ext <<EOF
2336 #line 2337 "configure"
2337 #include "confdefs.h"
2338 #include <sys/types.h>
2339 #include <signal.h>
2340 #ifdef signal
2341 #undef signal
2342 #endif
2343 #ifdef __cplusplus
2344 extern "C" void (*signal (int, void (*)(int)))(int);
2345 #else
2346 void (*signal ()) ();
2347 #endif
2348
2349 int main() {
2350 int i;
2351 ; return 0; }
2352 EOF
2353 if { (eval echo configure:2354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2354   rm -rf conftest*
2355   ac_cv_type_signal=void
2356 else
2357   echo "configure: failed program was:" >&5
2358   cat conftest.$ac_ext >&5
2359   rm -rf conftest*
2360   ac_cv_type_signal=int
2361 fi
2362 rm -f conftest*
2363 fi
2364
2365 echo "$ac_t""$ac_cv_type_signal" 1>&6
2366 cat >> confdefs.h <<EOF
2367 #define RETSIGTYPE $ac_cv_type_signal
2368 EOF
2369
2370
2371 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2372 echo "configure:2373: checking for size_t" >&5
2373 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2374   echo $ac_n "(cached) $ac_c" 1>&6
2375 else
2376   cat > conftest.$ac_ext <<EOF
2377 #line 2378 "configure"
2378 #include "confdefs.h"
2379 #include <sys/types.h>
2380 #if STDC_HEADERS
2381 #include <stdlib.h>
2382 #include <stddef.h>
2383 #endif
2384 EOF
2385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2386   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2387   rm -rf conftest*
2388   ac_cv_type_size_t=yes
2389 else
2390   rm -rf conftest*
2391   ac_cv_type_size_t=no
2392 fi
2393 rm -f conftest*
2394
2395 fi
2396 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2397 if test $ac_cv_type_size_t = no; then
2398   cat >> confdefs.h <<\EOF
2399 #define size_t unsigned
2400 EOF
2401
2402 fi
2403
2404 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2405 echo "configure:2406: checking for uid_t in sys/types.h" >&5
2406 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2407   echo $ac_n "(cached) $ac_c" 1>&6
2408 else
2409   cat > conftest.$ac_ext <<EOF
2410 #line 2411 "configure"
2411 #include "confdefs.h"
2412 #include <sys/types.h>
2413 EOF
2414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2415   egrep "uid_t" >/dev/null 2>&1; then
2416   rm -rf conftest*
2417   ac_cv_type_uid_t=yes
2418 else
2419   rm -rf conftest*
2420   ac_cv_type_uid_t=no
2421 fi
2422 rm -f conftest*
2423
2424 fi
2425
2426 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2427 if test $ac_cv_type_uid_t = no; then
2428   cat >> confdefs.h <<\EOF
2429 #define uid_t int
2430 EOF
2431
2432   cat >> confdefs.h <<\EOF
2433 #define gid_t int
2434 EOF
2435
2436 fi
2437
2438 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
2439 echo "configure:2440: checking for st_blksize in struct stat" >&5
2440 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
2441   echo $ac_n "(cached) $ac_c" 1>&6
2442 else
2443   cat > conftest.$ac_ext <<EOF
2444 #line 2445 "configure"
2445 #include "confdefs.h"
2446 #include <sys/types.h>
2447 #include <sys/stat.h>
2448 int main() {
2449 struct stat s; s.st_blksize;
2450 ; return 0; }
2451 EOF
2452 if { (eval echo configure:2453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2453   rm -rf conftest*
2454   ac_cv_struct_st_blksize=yes
2455 else
2456   echo "configure: failed program was:" >&5
2457   cat conftest.$ac_ext >&5
2458   rm -rf conftest*
2459   ac_cv_struct_st_blksize=no
2460 fi
2461 rm -f conftest*
2462 fi
2463
2464 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
2465 if test $ac_cv_struct_st_blksize = yes; then
2466   cat >> confdefs.h <<\EOF
2467 #define HAVE_ST_BLKSIZE 1
2468 EOF
2469
2470 fi
2471
2472 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2473 echo "configure:2474: checking whether time.h and sys/time.h may both be included" >&5
2474 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2475   echo $ac_n "(cached) $ac_c" 1>&6
2476 else
2477   cat > conftest.$ac_ext <<EOF
2478 #line 2479 "configure"
2479 #include "confdefs.h"
2480 #include <sys/types.h>
2481 #include <sys/time.h>
2482 #include <time.h>
2483 int main() {
2484 struct tm *tp;
2485 ; return 0; }
2486 EOF
2487 if { (eval echo configure:2488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2488   rm -rf conftest*
2489   ac_cv_header_time=yes
2490 else
2491   echo "configure: failed program was:" >&5
2492   cat conftest.$ac_ext >&5
2493   rm -rf conftest*
2494   ac_cv_header_time=no
2495 fi
2496 rm -f conftest*
2497 fi
2498
2499 echo "$ac_t""$ac_cv_header_time" 1>&6
2500 if test $ac_cv_header_time = yes; then
2501   cat >> confdefs.h <<\EOF
2502 #define TIME_WITH_SYS_TIME 1
2503 EOF
2504
2505 fi
2506
2507 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2508 echo "configure:2509: checking whether struct tm is in sys/time.h or time.h" >&5
2509 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2510   echo $ac_n "(cached) $ac_c" 1>&6
2511 else
2512   cat > conftest.$ac_ext <<EOF
2513 #line 2514 "configure"
2514 #include "confdefs.h"
2515 #include <sys/types.h>
2516 #include <time.h>
2517 int main() {
2518 struct tm *tp; tp->tm_sec;
2519 ; return 0; }
2520 EOF
2521 if { (eval echo configure:2522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2522   rm -rf conftest*
2523   ac_cv_struct_tm=time.h
2524 else
2525   echo "configure: failed program was:" >&5
2526   cat conftest.$ac_ext >&5
2527   rm -rf conftest*
2528   ac_cv_struct_tm=sys/time.h
2529 fi
2530 rm -f conftest*
2531 fi
2532
2533 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2534 if test $ac_cv_struct_tm = sys/time.h; then
2535   cat >> confdefs.h <<\EOF
2536 #define TM_IN_SYS_TIME 1
2537 EOF
2538
2539 fi
2540
2541
2542 echo $ac_n "checking for working const""... $ac_c" 1>&6
2543 echo "configure:2544: checking for working const" >&5
2544 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2545   echo $ac_n "(cached) $ac_c" 1>&6
2546 else
2547   cat > conftest.$ac_ext <<EOF
2548 #line 2549 "configure"
2549 #include "confdefs.h"
2550
2551 int main() {
2552
2553 /* Ultrix mips cc rejects this.  */
2554 typedef int charset[2]; const charset x;
2555 /* SunOS 4.1.1 cc rejects this.  */
2556 char const *const *ccp;
2557 char **p;
2558 /* NEC SVR4.0.2 mips cc rejects this.  */
2559 struct point {int x, y;};
2560 static struct point const zero = {0,0};
2561 /* AIX XL C 1.02.0.0 rejects this.
2562    It does not let you subtract one const X* pointer from another in an arm
2563    of an if-expression whose if-part is not a constant expression */
2564 const char *g = "string";
2565 ccp = &g + (g ? g-g : 0);
2566 /* HPUX 7.0 cc rejects these. */
2567 ++ccp;
2568 p = (char**) ccp;
2569 ccp = (char const *const *) p;
2570 { /* SCO 3.2v4 cc rejects this.  */
2571   char *t;
2572   char const *s = 0 ? (char *) 0 : (char const *) 0;
2573
2574   *t++ = 0;
2575 }
2576 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2577   int x[] = {25, 17};
2578   const int *foo = &x[0];
2579   ++foo;
2580 }
2581 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2582   typedef const int *iptr;
2583   iptr p = 0;
2584   ++p;
2585 }
2586 { /* AIX XL C 1.02.0.0 rejects this saying
2587      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2588   struct s { int j; const int *ap[3]; };
2589   struct s *b; b->j = 5;
2590 }
2591 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2592   const int foo = 10;
2593 }
2594
2595 ; return 0; }
2596 EOF
2597 if { (eval echo configure:2598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2598   rm -rf conftest*
2599   ac_cv_c_const=yes
2600 else
2601   echo "configure: failed program was:" >&5
2602   cat conftest.$ac_ext >&5
2603   rm -rf conftest*
2604   ac_cv_c_const=no
2605 fi
2606 rm -f conftest*
2607 fi
2608
2609 echo "$ac_t""$ac_cv_c_const" 1>&6
2610 if test $ac_cv_c_const = no; then
2611   cat >> confdefs.h <<\EOF
2612 #define const 
2613 EOF
2614
2615 fi
2616
2617
2618 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2619 echo "configure:2620: checking for 8-bit clean memcmp" >&5
2620 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2621   echo $ac_n "(cached) $ac_c" 1>&6
2622 else
2623   if test "$cross_compiling" = yes; then
2624   ac_cv_func_memcmp_clean=no
2625 else
2626   cat > conftest.$ac_ext <<EOF
2627 #line 2628 "configure"
2628 #include "confdefs.h"
2629
2630 main()
2631 {
2632   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2633   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2634 }
2635
2636 EOF
2637 if { (eval echo configure:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2638 then
2639   ac_cv_func_memcmp_clean=yes
2640 else
2641   echo "configure: failed program was:" >&5
2642   cat conftest.$ac_ext >&5
2643   rm -fr conftest*
2644   ac_cv_func_memcmp_clean=no
2645 fi
2646 rm -fr conftest*
2647 fi
2648
2649 fi
2650
2651 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2652 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
2653
2654 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2655 echo "configure:2656: checking return type of signal handlers" >&5
2656 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2657   echo $ac_n "(cached) $ac_c" 1>&6
2658 else
2659   cat > conftest.$ac_ext <<EOF
2660 #line 2661 "configure"
2661 #include "confdefs.h"
2662 #include <sys/types.h>
2663 #include <signal.h>
2664 #ifdef signal
2665 #undef signal
2666 #endif
2667 #ifdef __cplusplus
2668 extern "C" void (*signal (int, void (*)(int)))(int);
2669 #else
2670 void (*signal ()) ();
2671 #endif
2672
2673 int main() {
2674 int i;
2675 ; return 0; }
2676 EOF
2677 if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2678   rm -rf conftest*
2679   ac_cv_type_signal=void
2680 else
2681   echo "configure: failed program was:" >&5
2682   cat conftest.$ac_ext >&5
2683   rm -rf conftest*
2684   ac_cv_type_signal=int
2685 fi
2686 rm -f conftest*
2687 fi
2688
2689 echo "$ac_t""$ac_cv_type_signal" 1>&6
2690 cat >> confdefs.h <<EOF
2691 #define RETSIGTYPE $ac_cv_type_signal
2692 EOF
2693
2694
2695 echo $ac_n "checking for strftime""... $ac_c" 1>&6
2696 echo "configure:2697: checking for strftime" >&5
2697 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
2698   echo $ac_n "(cached) $ac_c" 1>&6
2699 else
2700   cat > conftest.$ac_ext <<EOF
2701 #line 2702 "configure"
2702 #include "confdefs.h"
2703 /* System header to define __stub macros and hopefully few prototypes,
2704     which can conflict with char strftime(); below.  */
2705 #include <assert.h>
2706 /* Override any gcc2 internal prototype to avoid an error.  */
2707 /* We use char because int might match the return type of a gcc2
2708     builtin and then its argument prototype would still apply.  */
2709 char strftime();
2710
2711 int main() {
2712
2713 /* The GNU C library defines this for functions which it implements
2714     to always fail with ENOSYS.  Some functions are actually named
2715     something starting with __ and the normal name is an alias.  */
2716 #if defined (__stub_strftime) || defined (__stub___strftime)
2717 choke me
2718 #else
2719 strftime();
2720 #endif
2721
2722 ; return 0; }
2723 EOF
2724 if { (eval echo configure:2725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2725   rm -rf conftest*
2726   eval "ac_cv_func_strftime=yes"
2727 else
2728   echo "configure: failed program was:" >&5
2729   cat conftest.$ac_ext >&5
2730   rm -rf conftest*
2731   eval "ac_cv_func_strftime=no"
2732 fi
2733 rm -f conftest*
2734 fi
2735
2736 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
2737   echo "$ac_t""yes" 1>&6
2738   cat >> confdefs.h <<\EOF
2739 #define HAVE_STRFTIME 1
2740 EOF
2741
2742 else
2743   echo "$ac_t""no" 1>&6
2744 # strftime is in -lintl on SCO UNIX.
2745 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
2746 echo "configure:2747: checking for strftime in -lintl" >&5
2747 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
2748 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2749   echo $ac_n "(cached) $ac_c" 1>&6
2750 else
2751   ac_save_LIBS="$LIBS"
2752 LIBS="-lintl  $LIBS"
2753 cat > conftest.$ac_ext <<EOF
2754 #line 2755 "configure"
2755 #include "confdefs.h"
2756 /* Override any gcc2 internal prototype to avoid an error.  */
2757 /* We use char because int might match the return type of a gcc2
2758     builtin and then its argument prototype would still apply.  */
2759 char strftime();
2760
2761 int main() {
2762 strftime()
2763 ; return 0; }
2764 EOF
2765 if { (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2766   rm -rf conftest*
2767   eval "ac_cv_lib_$ac_lib_var=yes"
2768 else
2769   echo "configure: failed program was:" >&5
2770   cat conftest.$ac_ext >&5
2771   rm -rf conftest*
2772   eval "ac_cv_lib_$ac_lib_var=no"
2773 fi
2774 rm -f conftest*
2775 LIBS="$ac_save_LIBS"
2776
2777 fi
2778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2779   echo "$ac_t""yes" 1>&6
2780   cat >> confdefs.h <<\EOF
2781 #define HAVE_STRFTIME 1
2782 EOF
2783
2784 LIBS="-lintl $LIBS"
2785 else
2786   echo "$ac_t""no" 1>&6
2787 fi
2788
2789 fi
2790
2791 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2792 echo "configure:2793: checking for vprintf" >&5
2793 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2794   echo $ac_n "(cached) $ac_c" 1>&6
2795 else
2796   cat > conftest.$ac_ext <<EOF
2797 #line 2798 "configure"
2798 #include "confdefs.h"
2799 /* System header to define __stub macros and hopefully few prototypes,
2800     which can conflict with char vprintf(); below.  */
2801 #include <assert.h>
2802 /* Override any gcc2 internal prototype to avoid an error.  */
2803 /* We use char because int might match the return type of a gcc2
2804     builtin and then its argument prototype would still apply.  */
2805 char vprintf();
2806
2807 int main() {
2808
2809 /* The GNU C library defines this for functions which it implements
2810     to always fail with ENOSYS.  Some functions are actually named
2811     something starting with __ and the normal name is an alias.  */
2812 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2813 choke me
2814 #else
2815 vprintf();
2816 #endif
2817
2818 ; return 0; }
2819 EOF
2820 if { (eval echo configure:2821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2821   rm -rf conftest*
2822   eval "ac_cv_func_vprintf=yes"
2823 else
2824   echo "configure: failed program was:" >&5
2825   cat conftest.$ac_ext >&5
2826   rm -rf conftest*
2827   eval "ac_cv_func_vprintf=no"
2828 fi
2829 rm -f conftest*
2830 fi
2831
2832 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2833   echo "$ac_t""yes" 1>&6
2834   cat >> confdefs.h <<\EOF
2835 #define HAVE_VPRINTF 1
2836 EOF
2837
2838 else
2839   echo "$ac_t""no" 1>&6
2840 fi
2841
2842 if test "$ac_cv_func_vprintf" != yes; then
2843 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2844 echo "configure:2845: checking for _doprnt" >&5
2845 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2846   echo $ac_n "(cached) $ac_c" 1>&6
2847 else
2848   cat > conftest.$ac_ext <<EOF
2849 #line 2850 "configure"
2850 #include "confdefs.h"
2851 /* System header to define __stub macros and hopefully few prototypes,
2852     which can conflict with char _doprnt(); below.  */
2853 #include <assert.h>
2854 /* Override any gcc2 internal prototype to avoid an error.  */
2855 /* We use char because int might match the return type of a gcc2
2856     builtin and then its argument prototype would still apply.  */
2857 char _doprnt();
2858
2859 int main() {
2860
2861 /* The GNU C library defines this for functions which it implements
2862     to always fail with ENOSYS.  Some functions are actually named
2863     something starting with __ and the normal name is an alias.  */
2864 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2865 choke me
2866 #else
2867 _doprnt();
2868 #endif
2869
2870 ; return 0; }
2871 EOF
2872 if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2873   rm -rf conftest*
2874   eval "ac_cv_func__doprnt=yes"
2875 else
2876   echo "configure: failed program was:" >&5
2877   cat conftest.$ac_ext >&5
2878   rm -rf conftest*
2879   eval "ac_cv_func__doprnt=no"
2880 fi
2881 rm -f conftest*
2882 fi
2883
2884 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2885   echo "$ac_t""yes" 1>&6
2886   cat >> confdefs.h <<\EOF
2887 #define HAVE_DOPRNT 1
2888 EOF
2889
2890 else
2891   echo "$ac_t""no" 1>&6
2892 fi
2893
2894 fi
2895
2896 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
2897 echo "configure:2898: checking for wait3 that fills in rusage" >&5
2898 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
2899   echo $ac_n "(cached) $ac_c" 1>&6
2900 else
2901   if test "$cross_compiling" = yes; then
2902   ac_cv_func_wait3_rusage=no
2903 else
2904   cat > conftest.$ac_ext <<EOF
2905 #line 2906 "configure"
2906 #include "confdefs.h"
2907 #include <sys/types.h>
2908 #include <sys/time.h>
2909 #include <sys/resource.h>
2910 #include <stdio.h>
2911 /* HP-UX has wait3 but does not fill in rusage at all.  */
2912 main() {
2913   struct rusage r;
2914   int i;
2915   /* Use a field that we can force nonzero --
2916      voluntary context switches.
2917      For systems like NeXT and OSF/1 that don't set it,
2918      also use the system CPU time.  And page faults (I/O) for Linux.  */
2919   r.ru_nvcsw = 0;
2920   r.ru_stime.tv_sec = 0;
2921   r.ru_stime.tv_usec = 0;
2922   r.ru_majflt = r.ru_minflt = 0;
2923   switch (fork()) {
2924   case 0: /* Child.  */
2925     sleep(1); /* Give up the CPU.  */
2926     _exit(0);
2927   case -1: _exit(0); /* What can we do?  */
2928   default: /* Parent.  */
2929     wait3(&i, 0, &r);
2930     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
2931     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
2932          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
2933   }
2934 }
2935 EOF
2936 if { (eval echo configure:2937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2937 then
2938   ac_cv_func_wait3_rusage=yes
2939 else
2940   echo "configure: failed program was:" >&5
2941   cat conftest.$ac_ext >&5
2942   rm -fr conftest*
2943   ac_cv_func_wait3_rusage=no
2944 fi
2945 rm -fr conftest*
2946 fi
2947
2948 fi
2949
2950 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
2951 if test $ac_cv_func_wait3_rusage = yes; then
2952   cat >> confdefs.h <<\EOF
2953 #define HAVE_WAIT3 1
2954 EOF
2955
2956 fi
2957
2958
2959 for ac_func in \
2960         gethostname             \
2961         gettimeofday    \
2962         mktime                  \
2963         select                  \
2964         socket                  \
2965         strdup                  \
2966         strerror                \
2967         strstr                  \
2968         strrchr                 \
2969         strtod                  \
2970         strtol                  \
2971         strtoul                 \
2972         memcpy                  \
2973
2974 do
2975 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2976 echo "configure:2977: checking for $ac_func" >&5
2977 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2978   echo $ac_n "(cached) $ac_c" 1>&6
2979 else
2980   cat > conftest.$ac_ext <<EOF
2981 #line 2982 "configure"
2982 #include "confdefs.h"
2983 /* System header to define __stub macros and hopefully few prototypes,
2984     which can conflict with char $ac_func(); below.  */
2985 #include <assert.h>
2986 /* Override any gcc2 internal prototype to avoid an error.  */
2987 /* We use char because int might match the return type of a gcc2
2988     builtin and then its argument prototype would still apply.  */
2989 char $ac_func();
2990
2991 int main() {
2992
2993 /* The GNU C library defines this for functions which it implements
2994     to always fail with ENOSYS.  Some functions are actually named
2995     something starting with __ and the normal name is an alias.  */
2996 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2997 choke me
2998 #else
2999 $ac_func();
3000 #endif
3001
3002 ; return 0; }
3003 EOF
3004 if { (eval echo configure:3005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3005   rm -rf conftest*
3006   eval "ac_cv_func_$ac_func=yes"
3007 else
3008   echo "configure: failed program was:" >&5
3009   cat conftest.$ac_ext >&5
3010   rm -rf conftest*
3011   eval "ac_cv_func_$ac_func=no"
3012 fi
3013 rm -f conftest*
3014 fi
3015
3016 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3017   echo "$ac_t""yes" 1>&6
3018     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3019   cat >> confdefs.h <<EOF
3020 #define $ac_tr_func 1
3021 EOF
3022  
3023 else
3024   echo "$ac_t""no" 1>&6
3025 fi
3026 done
3027
3028
3029 for ac_func in strdup
3030 do
3031 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3032 echo "configure:3033: checking for $ac_func" >&5
3033 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   cat > conftest.$ac_ext <<EOF
3037 #line 3038 "configure"
3038 #include "confdefs.h"
3039 /* System header to define __stub macros and hopefully few prototypes,
3040     which can conflict with char $ac_func(); below.  */
3041 #include <assert.h>
3042 /* Override any gcc2 internal prototype to avoid an error.  */
3043 /* We use char because int might match the return type of a gcc2
3044     builtin and then its argument prototype would still apply.  */
3045 char $ac_func();
3046
3047 int main() {
3048
3049 /* The GNU C library defines this for functions which it implements
3050     to always fail with ENOSYS.  Some functions are actually named
3051     something starting with __ and the normal name is an alias.  */
3052 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3053 choke me
3054 #else
3055 $ac_func();
3056 #endif
3057
3058 ; return 0; }
3059 EOF
3060 if { (eval echo configure:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3061   rm -rf conftest*
3062   eval "ac_cv_func_$ac_func=yes"
3063 else
3064   echo "configure: failed program was:" >&5
3065   cat conftest.$ac_ext >&5
3066   rm -rf conftest*
3067   eval "ac_cv_func_$ac_func=no"
3068 fi
3069 rm -f conftest*
3070 fi
3071
3072 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3073   echo "$ac_t""yes" 1>&6
3074     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3075   cat >> confdefs.h <<EOF
3076 #define $ac_tr_func 1
3077 EOF
3078  
3079 else
3080   echo "$ac_t""no" 1>&6
3081 LIBOBJS="$LIBOBJS ${ac_func}.o"
3082 fi
3083 done
3084
3085
3086
3087 # Check Configuration
3088
3089 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
3090 echo "configure:3091: checking declaration of sys_errlist" >&5
3091 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then
3092   echo $ac_n "(cached) $ac_c" 1>&6
3093 else
3094   
3095         cat > conftest.$ac_ext <<EOF
3096 #line 3097 "configure"
3097 #include "confdefs.h"
3098
3099 #include <stdio.h>
3100 #include <sys/types.h>
3101 #include <errno.h> 
3102 int main() {
3103 char *c = (char *) *sys_errlist
3104 ; return 0; }
3105 EOF
3106 if { (eval echo configure:3107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3107   rm -rf conftest*
3108   cf_cv_dcl_sys_errlist=yes
3109 else
3110   echo "configure: failed program was:" >&5
3111   cat conftest.$ac_ext >&5
3112   rm -rf conftest*
3113   cf_cv_dcl_sys_errlist=no
3114 fi
3115 rm -f conftest*
3116 fi
3117
3118 echo "$ac_t""$cf_cv_dcl_sys_errlist" 1>&6
3119
3120 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
3121 if test $cf_cv_dcl_sys_errlist = no ; then
3122         cat >> confdefs.h <<\EOF
3123 #define DECL_SYS_ERRLIST 1
3124 EOF
3125
3126         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
3127 echo "configure:3128: checking existence of sys_errlist" >&5
3128         if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then
3129   echo $ac_n "(cached) $ac_c" 1>&6
3130 else
3131   
3132                 cat > conftest.$ac_ext <<EOF
3133 #line 3134 "configure"
3134 #include "confdefs.h"
3135 #include <errno.h>
3136 int main() {
3137 char *c = (char *) *sys_errlist
3138 ; return 0; }
3139 EOF
3140 if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3141   rm -rf conftest*
3142   cf_cv_have_sys_errlist=yes
3143 else
3144   echo "configure: failed program was:" >&5
3145   cat conftest.$ac_ext >&5
3146   rm -rf conftest*
3147   cf_cv_have_sys_errlist=no
3148 fi
3149 rm -f conftest*
3150 fi
3151
3152         echo "$ac_t""$cf_cv_have_sys_errlist" 1>&6
3153 fi
3154
3155
3156 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3157 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3158
3159 SYSCONFDIR=`eval echo $sysconfdir`
3160
3161
3162 trap '' 1 2 15
3163 cat > confcache <<\EOF
3164 # This file is a shell script that caches the results of configure
3165 # tests run on this system so they can be shared between configure
3166 # scripts and configure runs.  It is not useful on other systems.
3167 # If it contains results you don't want to keep, you may remove or edit it.
3168 #
3169 # By default, configure uses ./config.cache as the cache file,
3170 # creating it if it does not exist already.  You can give configure
3171 # the --cache-file=FILE option to use a different cache file; that is
3172 # what configure does when it calls configure scripts in
3173 # subdirectories, so they share the cache.
3174 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3175 # config.status only pays attention to the cache file if you give it the
3176 # --recheck option to rerun configure.
3177 #
3178 EOF
3179 # The following way of writing the cache mishandles newlines in values,
3180 # but we know of no workaround that is simple, portable, and efficient.
3181 # So, don't put newlines in cache variables' values.
3182 # Ultrix sh set writes to stderr and can't be redirected directly,
3183 # and sets the high bit in the cache file unless we assign to the vars.
3184 (set) 2>&1 |
3185   case `(ac_space=' '; set) 2>&1` in
3186   *ac_space=\ *)
3187     # `set' does not quote correctly, so add quotes (double-quote substitution
3188     # turns \\\\ into \\, and sed turns \\ into \).
3189     sed -n \
3190       -e "s/'/'\\\\''/g" \
3191       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3192     ;;
3193   *)
3194     # `set' quotes correctly as required by POSIX, so do not add quotes.
3195     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3196     ;;
3197   esac >> confcache
3198 if cmp -s $cache_file confcache; then
3199   :
3200 else
3201   if test -w $cache_file; then
3202     echo "updating cache $cache_file"
3203     cat confcache > $cache_file
3204   else
3205     echo "not updating unwritable cache $cache_file"
3206   fi
3207 fi
3208 rm -f confcache
3209
3210 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3211
3212 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3213 # Let make expand exec_prefix.
3214 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3215
3216 # Any assignment to VPATH causes Sun make to only execute
3217 # the first set of double-colon rules, so remove it if not needed.
3218 # If there is a colon in the path, we need to keep it.
3219 if test "x$srcdir" = x.; then
3220   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3221 fi
3222
3223 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3224
3225 DEFS=-DHAVE_CONFIG_H
3226
3227 # Without the "./", some shells look in PATH for config.status.
3228 : ${CONFIG_STATUS=./config.status}
3229
3230 echo creating $CONFIG_STATUS
3231 rm -f $CONFIG_STATUS
3232 cat > $CONFIG_STATUS <<EOF
3233 #! /bin/sh
3234 # Generated automatically by configure.
3235 # Run this file to recreate the current configuration.
3236 # This directory was configured as follows,
3237 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3238 #
3239 # $0 $ac_configure_args
3240 #
3241 # Compiler output produced by configure, useful for debugging
3242 # configure, is in ./config.log if it exists.
3243
3244 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3245 for ac_option
3246 do
3247   case "\$ac_option" in
3248   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3249     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3250     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3251   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3252     echo "$CONFIG_STATUS generated by autoconf version 2.12"
3253     exit 0 ;;
3254   -help | --help | --hel | --he | --h)
3255     echo "\$ac_cs_usage"; exit 0 ;;
3256   *) echo "\$ac_cs_usage"; exit 1 ;;
3257   esac
3258 done
3259
3260 ac_given_srcdir=$srcdir
3261 ac_given_INSTALL="$INSTALL"
3262
3263 trap 'rm -fr `echo "\
3264 include/ldapconfig.h \
3265 include/Makefile:etc/top.mk:include/Makefile.in \
3266 clients/Makefile:etc/top.mk:clients/Makefile.in:etc/dir.mk \
3267 clients/tools/Makefile:etc/top.mk:clients/tools/Makefile.in:etc/rules.mk \
3268 clients/ud/Makefile:etc/top.mk:clients/ud/Makefile.in:etc/rules.mk \
3269 clients/fax500/Makefile:etc/top.mk:clients/fax500/Makefile.in:etc/rules.mk \
3270 clients/finger/Makefile:etc/top.mk:clients/finger/Makefile.in:etc/rules.mk \
3271 clients/gopher/Makefile:etc/top.mk:clients/gopher/Makefile.in:etc/rules.mk \
3272 clients/mail500/Makefile:etc/top.mk:clients/mail500/Makefile.in:etc/rules.mk \
3273 clients/rcpt500/Makefile:etc/top.mk:clients/rcpt500/Makefile.in:etc/rules.mk \
3274 contrib/Makefile:etc/top.mk:contrib/Makefile.in:etc/dir.mk \
3275 contrib/saucer/Makefile:etc/top.mk:contrib/saucer/Makefile.in:etc/rules.mk \
3276 contrib/whois++/Makefile:etc/top.mk:contrib/whois++/Makefile.in:etc/rules.mk \
3277 libraries/Makefile:etc/top.mk:libraries/Makefile.in:etc/dir.mk  \
3278 libraries/libavl/Makefile:etc/top.mk:libraries/libavl/Makefile.in:etc/lib.mk \
3279 libraries/liblber/Makefile:etc/top.mk:libraries/liblber/Makefile.in:etc/lib.mk \
3280 libraries/libldap/Makefile:etc/top.mk:libraries/libldap/Makefile.in:etc/lib.mk \
3281 libraries/libldbm/Makefile:etc/top.mk:libraries/libldbm/Makefile.in:etc/lib.mk \
3282 libraries/libldif/Makefile:etc/top.mk:libraries/libldif/Makefile.in:etc/lib.mk \
3283 libraries/liblthread/Makefile:etc/top.mk:libraries/liblthread/Makefile.in:etc/lib.mk \
3284 servers/Makefile:etc/top.mk:servers/Makefile.in:etc/dir.mk \
3285 servers/ldapd/Makefile:etc/top.mk:servers/ldapd/Makefile.in:etc/srv.mk \
3286 servers/slapd/Makefile:etc/top.mk:servers/slapd/Makefile.in:etc/srv.mk \
3287 servers/slapd/back-ldbm/Makefile:etc/top.mk:servers/slapd/back-ldbm/Makefile.in:etc/srv.mk \
3288 servers/slapd/back-passwd/Makefile:etc/top.mk:servers/slapd/back-passwd/Makefile.in:etc/srv.mk \
3289 servers/slapd/back-shell/Makefile:etc/top.mk:servers/slapd/back-shell/Makefile.in:etc/srv.mk \
3290 servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in \
3291 servers/slapd/shell-backends/Makefile:etc/top.mk:servers/slapd/shell-backends/Makefile.in:etc/srv.mk \
3292 servers/slurpd/Makefile:etc/top.mk:servers/slurpd/Makefile.in:etc/srv.mk \
3293 tests/Makefile:etc/top.mk:tests/Makefile.in \
3294 Makefile:etc/top.mk:Makefile.in:etc/dir.mk include/portable.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3295 EOF
3296 cat >> $CONFIG_STATUS <<EOF
3297
3298 # Protect against being on the right side of a sed subst in config.status.
3299 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3300  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3301 $ac_vpsub
3302 $extrasub
3303 s%@CFLAGS@%$CFLAGS%g
3304 s%@CPPFLAGS@%$CPPFLAGS%g
3305 s%@CXXFLAGS@%$CXXFLAGS%g
3306 s%@DEFS@%$DEFS%g
3307 s%@LDFLAGS@%$LDFLAGS%g
3308 s%@LIBS@%$LIBS%g
3309 s%@exec_prefix@%$exec_prefix%g
3310 s%@prefix@%$prefix%g
3311 s%@program_transform_name@%$program_transform_name%g
3312 s%@bindir@%$bindir%g
3313 s%@sbindir@%$sbindir%g
3314 s%@libexecdir@%$libexecdir%g
3315 s%@datadir@%$datadir%g
3316 s%@sysconfdir@%$sysconfdir%g
3317 s%@sharedstatedir@%$sharedstatedir%g
3318 s%@localstatedir@%$localstatedir%g
3319 s%@libdir@%$libdir%g
3320 s%@includedir@%$includedir%g
3321 s%@oldincludedir@%$oldincludedir%g
3322 s%@infodir@%$infodir%g
3323 s%@mandir@%$mandir%g
3324 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
3325 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
3326 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
3327 s%@BUILD_LDBM@%$BUILD_LDBM%g
3328 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
3329 s%@BUILD_SHELL@%$BUILD_SHELL%g
3330 s%@CC@%$CC%g
3331 s%@CPP@%$CPP%g
3332 s%@LN_S@%$LN_S%g
3333 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3334 s%@INSTALL_DATA@%$INSTALL_DATA%g
3335 s%@RANLIB@%$RANLIB%g
3336 s%@SET_MAKE@%$SET_MAKE%g
3337 s%@SENDMAIL@%$SENDMAIL%g
3338 s%@EDITOR@%$EDITOR%g
3339 s%@FINGER@%$FINGER%g
3340 s%@LDAP_DEFS@%$LDAP_DEFS%g
3341 s%@LIBDB@%$LIBDB%g
3342 s%@LIBTERMCAP@%$LIBTERMCAP%g
3343 s%@LIBCRYPT@%$LIBCRYPT%g
3344 s%@LIBOBJS@%$LIBOBJS%g
3345 s%@SYSCONFDIR@%$SYSCONFDIR%g
3346
3347 CEOF
3348 EOF
3349
3350 cat >> $CONFIG_STATUS <<\EOF
3351
3352 # Split the substitutions into bite-sized pieces for seds with
3353 # small command number limits, like on Digital OSF/1 and HP-UX.
3354 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3355 ac_file=1 # Number of current file.
3356 ac_beg=1 # First line for current file.
3357 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3358 ac_more_lines=:
3359 ac_sed_cmds=""
3360 while $ac_more_lines; do
3361   if test $ac_beg -gt 1; then
3362     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3363   else
3364     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3365   fi
3366   if test ! -s conftest.s$ac_file; then
3367     ac_more_lines=false
3368     rm -f conftest.s$ac_file
3369   else
3370     if test -z "$ac_sed_cmds"; then
3371       ac_sed_cmds="sed -f conftest.s$ac_file"
3372     else
3373       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3374     fi
3375     ac_file=`expr $ac_file + 1`
3376     ac_beg=$ac_end
3377     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3378   fi
3379 done
3380 if test -z "$ac_sed_cmds"; then
3381   ac_sed_cmds=cat
3382 fi
3383 EOF
3384
3385 cat >> $CONFIG_STATUS <<EOF
3386
3387 CONFIG_FILES=\${CONFIG_FILES-"\
3388 include/ldapconfig.h \
3389 include/Makefile:etc/top.mk:include/Makefile.in \
3390 clients/Makefile:etc/top.mk:clients/Makefile.in:etc/dir.mk \
3391 clients/tools/Makefile:etc/top.mk:clients/tools/Makefile.in:etc/rules.mk \
3392 clients/ud/Makefile:etc/top.mk:clients/ud/Makefile.in:etc/rules.mk \
3393 clients/fax500/Makefile:etc/top.mk:clients/fax500/Makefile.in:etc/rules.mk \
3394 clients/finger/Makefile:etc/top.mk:clients/finger/Makefile.in:etc/rules.mk \
3395 clients/gopher/Makefile:etc/top.mk:clients/gopher/Makefile.in:etc/rules.mk \
3396 clients/mail500/Makefile:etc/top.mk:clients/mail500/Makefile.in:etc/rules.mk \
3397 clients/rcpt500/Makefile:etc/top.mk:clients/rcpt500/Makefile.in:etc/rules.mk \
3398 contrib/Makefile:etc/top.mk:contrib/Makefile.in:etc/dir.mk \
3399 contrib/saucer/Makefile:etc/top.mk:contrib/saucer/Makefile.in:etc/rules.mk \
3400 contrib/whois++/Makefile:etc/top.mk:contrib/whois++/Makefile.in:etc/rules.mk \
3401 libraries/Makefile:etc/top.mk:libraries/Makefile.in:etc/dir.mk  \
3402 libraries/libavl/Makefile:etc/top.mk:libraries/libavl/Makefile.in:etc/lib.mk \
3403 libraries/liblber/Makefile:etc/top.mk:libraries/liblber/Makefile.in:etc/lib.mk \
3404 libraries/libldap/Makefile:etc/top.mk:libraries/libldap/Makefile.in:etc/lib.mk \
3405 libraries/libldbm/Makefile:etc/top.mk:libraries/libldbm/Makefile.in:etc/lib.mk \
3406 libraries/libldif/Makefile:etc/top.mk:libraries/libldif/Makefile.in:etc/lib.mk \
3407 libraries/liblthread/Makefile:etc/top.mk:libraries/liblthread/Makefile.in:etc/lib.mk \
3408 servers/Makefile:etc/top.mk:servers/Makefile.in:etc/dir.mk \
3409 servers/ldapd/Makefile:etc/top.mk:servers/ldapd/Makefile.in:etc/srv.mk \
3410 servers/slapd/Makefile:etc/top.mk:servers/slapd/Makefile.in:etc/srv.mk \
3411 servers/slapd/back-ldbm/Makefile:etc/top.mk:servers/slapd/back-ldbm/Makefile.in:etc/srv.mk \
3412 servers/slapd/back-passwd/Makefile:etc/top.mk:servers/slapd/back-passwd/Makefile.in:etc/srv.mk \
3413 servers/slapd/back-shell/Makefile:etc/top.mk:servers/slapd/back-shell/Makefile.in:etc/srv.mk \
3414 servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in \
3415 servers/slapd/shell-backends/Makefile:etc/top.mk:servers/slapd/shell-backends/Makefile.in:etc/srv.mk \
3416 servers/slurpd/Makefile:etc/top.mk:servers/slurpd/Makefile.in:etc/srv.mk \
3417 tests/Makefile:etc/top.mk:tests/Makefile.in \
3418 Makefile:etc/top.mk:Makefile.in:etc/dir.mk"}
3419 EOF
3420 cat >> $CONFIG_STATUS <<\EOF
3421 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3422   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3423   case "$ac_file" in
3424   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3425        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3426   *) ac_file_in="${ac_file}.in" ;;
3427   esac
3428
3429   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3430
3431   # Remove last slash and all that follows it.  Not all systems have dirname.
3432   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3433   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3434     # The file is in a subdirectory.
3435     test ! -d "$ac_dir" && mkdir "$ac_dir"
3436     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3437     # A "../" for each directory in $ac_dir_suffix.
3438     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3439   else
3440     ac_dir_suffix= ac_dots=
3441   fi
3442
3443   case "$ac_given_srcdir" in
3444   .)  srcdir=.
3445       if test -z "$ac_dots"; then top_srcdir=.
3446       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3447   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3448   *) # Relative path.
3449     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3450     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3451   esac
3452
3453   case "$ac_given_INSTALL" in
3454   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3455   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3456   esac
3457
3458   echo creating "$ac_file"
3459   rm -f "$ac_file"
3460   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3461   case "$ac_file" in
3462   *Makefile*) ac_comsub="1i\\
3463 # $configure_input" ;;
3464   *) ac_comsub= ;;
3465   esac
3466
3467   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3468   sed -e "$ac_comsub
3469 s%@configure_input@%$configure_input%g
3470 s%@srcdir@%$srcdir%g
3471 s%@top_srcdir@%$top_srcdir%g
3472 s%@INSTALL@%$INSTALL%g
3473 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3474 fi; done
3475 rm -f conftest.s*
3476
3477 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3478 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3479 #
3480 # ac_d sets the value in "#define NAME VALUE" lines.
3481 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3482 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3483 ac_dC='\3'
3484 ac_dD='%g'
3485 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3486 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3487 ac_uB='\([      ]\)%\1#\2define\3'
3488 ac_uC=' '
3489 ac_uD='\4%g'
3490 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3491 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3492 ac_eB='$%\1#\2define\3'
3493 ac_eC=' '
3494 ac_eD='%g'
3495
3496 if test "${CONFIG_HEADERS+set}" != set; then
3497 EOF
3498 cat >> $CONFIG_STATUS <<EOF
3499   CONFIG_HEADERS="include/portable.h"
3500 EOF
3501 cat >> $CONFIG_STATUS <<\EOF
3502 fi
3503 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3504   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3505   case "$ac_file" in
3506   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3507        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3508   *) ac_file_in="${ac_file}.in" ;;
3509   esac
3510
3511   echo creating $ac_file
3512
3513   rm -f conftest.frag conftest.in conftest.out
3514   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3515   cat $ac_file_inputs > conftest.in
3516
3517 EOF
3518
3519 # Transform confdefs.h into a sed script conftest.vals that substitutes
3520 # the proper values into config.h.in to produce config.h.  And first:
3521 # Protect against being on the right side of a sed subst in config.status.
3522 # Protect against being in an unquoted here document in config.status.
3523 rm -f conftest.vals
3524 cat > conftest.hdr <<\EOF
3525 s/[\\&%]/\\&/g
3526 s%[\\$`]%\\&%g
3527 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3528 s%ac_d%ac_u%gp
3529 s%ac_u%ac_e%gp
3530 EOF
3531 sed -n -f conftest.hdr confdefs.h > conftest.vals
3532 rm -f conftest.hdr
3533
3534 # This sed command replaces #undef with comments.  This is necessary, for
3535 # example, in the case of _POSIX_SOURCE, which is predefined and required
3536 # on some systems where configure will not decide to define it.
3537 cat >> conftest.vals <<\EOF
3538 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3539 EOF
3540
3541 # Break up conftest.vals because some shells have a limit on
3542 # the size of here documents, and old seds have small limits too.
3543
3544 rm -f conftest.tail
3545 while :
3546 do
3547   ac_lines=`grep -c . conftest.vals`
3548   # grep -c gives empty output for an empty file on some AIX systems.
3549   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3550   # Write a limited-size here document to conftest.frag.
3551   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3552   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3553   echo 'CEOF
3554   sed -f conftest.frag conftest.in > conftest.out
3555   rm -f conftest.in
3556   mv conftest.out conftest.in
3557 ' >> $CONFIG_STATUS
3558   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3559   rm -f conftest.vals
3560   mv conftest.tail conftest.vals
3561 done
3562 rm -f conftest.vals
3563
3564 cat >> $CONFIG_STATUS <<\EOF
3565   rm -f conftest.frag conftest.h
3566   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3567   cat conftest.in >> conftest.h
3568   rm -f conftest.in
3569   if cmp -s $ac_file conftest.h 2>/dev/null; then
3570     echo "$ac_file is unchanged"
3571     rm -f conftest.h
3572   else
3573     # Remove last slash and all that follows it.  Not all systems have dirname.
3574       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3575       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3576       # The file is in a subdirectory.
3577       test ! -d "$ac_dir" && mkdir "$ac_dir"
3578     fi
3579     rm -f $ac_file
3580     mv conftest.h $ac_file
3581   fi
3582 fi; done
3583
3584 EOF
3585 cat >> $CONFIG_STATUS <<EOF
3586
3587 EOF
3588 cat >> $CONFIG_STATUS <<\EOF
3589 \
3590         date > stamp-h
3591 exit 0
3592 EOF
3593 chmod +x $CONFIG_STATUS
3594 rm -fr confdefs* $ac_clean_files
3595 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3596