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