]> git.sur5r.net Git - openldap/blob - configure
f9e5236b2b43231a0e88921486e0bbfb6adb139e
[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 LTHREAD_LIBS=
1006 if test "$opt_thread" = "no" ; then
1007         LTHREAD_DEFS="-DNO_THREADS"
1008         BUILD_SLURPD=no
1009 else
1010         LTHREAD_DEFS="-DNO_THREADS"
1011 fi
1012
1013 ## ldapd arguments
1014 LDAPD_DEFS=
1015 LDAPD_LIBS=
1016
1017 ## slapd arguments
1018 SLAPD_DEFS=
1019 SLAPD_LIBS=
1020 LUTIL_DEFS=
1021 if test "$SLAPD_PHONETIC" = "yes" ; then
1022         cat >> confdefs.h <<\EOF
1023 #define SLAPD_PHONETIC 1
1024 EOF
1025
1026         SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX"
1027 fi
1028
1029 if test "$SLAPD_MD5" = "yes" ; then
1030         cat >> confdefs.h <<\EOF
1031 #define SLAPD_MD5 1
1032 EOF
1033
1034         LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5"
1035 fi
1036
1037 if test "$SLAPD_SHA1" = "yes" ; then
1038         cat >> confdefs.h <<\EOF
1039 #define SLAPD_SHA1 1
1040 EOF
1041
1042         LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1"
1043 fi
1044
1045 if test "$SLAPD_LDBM" = "yes" ; then
1046         SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM"
1047 fi
1048 if test "$SLAPD_PASSWD" = "yes" ; then
1049         SLAPD_DEFS="$SLAPD_DEFS -DLDAP_PASSWD"
1050 fi
1051 if test "$SLAPD_SHELL" = "yes" ; then
1052         SLAPD_DEFS="$SLAPD_DEFS -DLDAP_SHELL"
1053 fi
1054
1055 SLURPD_DEFS=
1056 SLURPD_LIBS=
1057
1058
1059 # Extract the first word of "gcc", so it can be a program name with args.
1060 set dummy gcc; ac_word=$2
1061 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1062 echo "configure:1063: checking for $ac_word" >&5
1063 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1064   echo $ac_n "(cached) $ac_c" 1>&6
1065 else
1066   if test -n "$CC"; then
1067   ac_cv_prog_CC="$CC" # Let the user override the test.
1068 else
1069   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1070   for ac_dir in $PATH; do
1071     test -z "$ac_dir" && ac_dir=.
1072     if test -f $ac_dir/$ac_word; then
1073       ac_cv_prog_CC="gcc"
1074       break
1075     fi
1076   done
1077   IFS="$ac_save_ifs"
1078 fi
1079 fi
1080 CC="$ac_cv_prog_CC"
1081 if test -n "$CC"; then
1082   echo "$ac_t""$CC" 1>&6
1083 else
1084   echo "$ac_t""no" 1>&6
1085 fi
1086
1087 if test -z "$CC"; then
1088   # Extract the first word of "cc", so it can be a program name with args.
1089 set dummy cc; ac_word=$2
1090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1091 echo "configure:1092: checking for $ac_word" >&5
1092 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1093   echo $ac_n "(cached) $ac_c" 1>&6
1094 else
1095   if test -n "$CC"; then
1096   ac_cv_prog_CC="$CC" # Let the user override the test.
1097 else
1098   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1099   ac_prog_rejected=no
1100   for ac_dir in $PATH; do
1101     test -z "$ac_dir" && ac_dir=.
1102     if test -f $ac_dir/$ac_word; then
1103       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1104         ac_prog_rejected=yes
1105         continue
1106       fi
1107       ac_cv_prog_CC="cc"
1108       break
1109     fi
1110   done
1111   IFS="$ac_save_ifs"
1112 if test $ac_prog_rejected = yes; then
1113   # We found a bogon in the path, so make sure we never use it.
1114   set dummy $ac_cv_prog_CC
1115   shift
1116   if test $# -gt 0; then
1117     # We chose a different compiler from the bogus one.
1118     # However, it has the same basename, so the bogon will be chosen
1119     # first if we set CC to just the basename; use the full file name.
1120     shift
1121     set dummy "$ac_dir/$ac_word" "$@"
1122     shift
1123     ac_cv_prog_CC="$@"
1124   fi
1125 fi
1126 fi
1127 fi
1128 CC="$ac_cv_prog_CC"
1129 if test -n "$CC"; then
1130   echo "$ac_t""$CC" 1>&6
1131 else
1132   echo "$ac_t""no" 1>&6
1133 fi
1134
1135   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1136 fi
1137
1138 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1139 echo "configure:1140: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1140
1141 ac_ext=c
1142 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1143 ac_cpp='$CPP $CPPFLAGS'
1144 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1145 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1146 cross_compiling=$ac_cv_prog_cc_cross
1147
1148 cat > conftest.$ac_ext <<EOF
1149 #line 1150 "configure"
1150 #include "confdefs.h"
1151 main(){return(0);}
1152 EOF
1153 if { (eval echo configure:1154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1154   ac_cv_prog_cc_works=yes
1155   # If we can't run a trivial program, we are probably using a cross compiler.
1156   if (./conftest; exit) 2>/dev/null; then
1157     ac_cv_prog_cc_cross=no
1158   else
1159     ac_cv_prog_cc_cross=yes
1160   fi
1161 else
1162   echo "configure: failed program was:" >&5
1163   cat conftest.$ac_ext >&5
1164   ac_cv_prog_cc_works=no
1165 fi
1166 rm -fr conftest*
1167
1168 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1169 if test $ac_cv_prog_cc_works = no; then
1170   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1171 fi
1172 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1173 echo "configure:1174: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1174 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1175 cross_compiling=$ac_cv_prog_cc_cross
1176
1177 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1178 echo "configure:1179: checking whether we are using GNU C" >&5
1179 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1180   echo $ac_n "(cached) $ac_c" 1>&6
1181 else
1182   cat > conftest.c <<EOF
1183 #ifdef __GNUC__
1184   yes;
1185 #endif
1186 EOF
1187 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1188   ac_cv_prog_gcc=yes
1189 else
1190   ac_cv_prog_gcc=no
1191 fi
1192 fi
1193
1194 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1195
1196 if test $ac_cv_prog_gcc = yes; then
1197   GCC=yes
1198   ac_test_CFLAGS="${CFLAGS+set}"
1199   ac_save_CFLAGS="$CFLAGS"
1200   CFLAGS=
1201   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1202 echo "configure:1203: checking whether ${CC-cc} accepts -g" >&5
1203 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1204   echo $ac_n "(cached) $ac_c" 1>&6
1205 else
1206   echo 'void f(){}' > conftest.c
1207 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1208   ac_cv_prog_cc_g=yes
1209 else
1210   ac_cv_prog_cc_g=no
1211 fi
1212 rm -f conftest*
1213
1214 fi
1215
1216 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1217   if test "$ac_test_CFLAGS" = set; then
1218     CFLAGS="$ac_save_CFLAGS"
1219   elif test $ac_cv_prog_cc_g = yes; then
1220     CFLAGS="-g -O2"
1221   else
1222     CFLAGS="-O2"
1223   fi
1224 else
1225   GCC=
1226   test "${CFLAGS+set}" = set || CFLAGS="-g"
1227 fi
1228
1229 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1230 echo "configure:1231: checking how to run the C preprocessor" >&5
1231 # On Suns, sometimes $CPP names a directory.
1232 if test -n "$CPP" && test -d "$CPP"; then
1233   CPP=
1234 fi
1235 if test -z "$CPP"; then
1236 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1237   echo $ac_n "(cached) $ac_c" 1>&6
1238 else
1239     # This must be in double quotes, not single quotes, because CPP may get
1240   # substituted into the Makefile and "${CC-cc}" will confuse make.
1241   CPP="${CC-cc} -E"
1242   # On the NeXT, cc -E runs the code through the compiler's parser,
1243   # not just through cpp.
1244   cat > conftest.$ac_ext <<EOF
1245 #line 1246 "configure"
1246 #include "confdefs.h"
1247 #include <assert.h>
1248 Syntax Error
1249 EOF
1250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1251 { (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1252 ac_err=`grep -v '^ *+' conftest.out`
1253 if test -z "$ac_err"; then
1254   :
1255 else
1256   echo "$ac_err" >&5
1257   echo "configure: failed program was:" >&5
1258   cat conftest.$ac_ext >&5
1259   rm -rf conftest*
1260   CPP="${CC-cc} -E -traditional-cpp"
1261   cat > conftest.$ac_ext <<EOF
1262 #line 1263 "configure"
1263 #include "confdefs.h"
1264 #include <assert.h>
1265 Syntax Error
1266 EOF
1267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1268 { (eval echo configure:1269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1269 ac_err=`grep -v '^ *+' conftest.out`
1270 if test -z "$ac_err"; then
1271   :
1272 else
1273   echo "$ac_err" >&5
1274   echo "configure: failed program was:" >&5
1275   cat conftest.$ac_ext >&5
1276   rm -rf conftest*
1277   CPP=/lib/cpp
1278 fi
1279 rm -f conftest*
1280 fi
1281 rm -f conftest*
1282   ac_cv_prog_CPP="$CPP"
1283 fi
1284   CPP="$ac_cv_prog_CPP"
1285 else
1286   ac_cv_prog_CPP="$CPP"
1287 fi
1288 echo "$ac_t""$CPP" 1>&6
1289
1290 if test $ac_cv_prog_gcc = yes; then
1291     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1292 echo "configure:1293: checking whether ${CC-cc} needs -traditional" >&5
1293 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1294   echo $ac_n "(cached) $ac_c" 1>&6
1295 else
1296     ac_pattern="Autoconf.*'x'"
1297   cat > conftest.$ac_ext <<EOF
1298 #line 1299 "configure"
1299 #include "confdefs.h"
1300 #include <sgtty.h>
1301 Autoconf TIOCGETP
1302 EOF
1303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1304   egrep "$ac_pattern" >/dev/null 2>&1; then
1305   rm -rf conftest*
1306   ac_cv_prog_gcc_traditional=yes
1307 else
1308   rm -rf conftest*
1309   ac_cv_prog_gcc_traditional=no
1310 fi
1311 rm -f conftest*
1312
1313
1314   if test $ac_cv_prog_gcc_traditional = no; then
1315     cat > conftest.$ac_ext <<EOF
1316 #line 1317 "configure"
1317 #include "confdefs.h"
1318 #include <termio.h>
1319 Autoconf TCGETA
1320 EOF
1321 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1322   egrep "$ac_pattern" >/dev/null 2>&1; then
1323   rm -rf conftest*
1324   ac_cv_prog_gcc_traditional=yes
1325 fi
1326 rm -f conftest*
1327
1328   fi
1329 fi
1330
1331 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1332   if test $ac_cv_prog_gcc_traditional = yes; then
1333     CC="$CC -traditional"
1334   fi
1335 fi
1336
1337
1338 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1339 echo "configure:1340: checking whether ln -s works" >&5
1340 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1341   echo $ac_n "(cached) $ac_c" 1>&6
1342 else
1343   rm -f conftestdata
1344 if ln -s X conftestdata 2>/dev/null
1345 then
1346   rm -f conftestdata
1347   ac_cv_prog_LN_S="ln -s"
1348 else
1349   ac_cv_prog_LN_S=ln
1350 fi
1351 fi
1352 LN_S="$ac_cv_prog_LN_S"
1353 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1354   echo "$ac_t""yes" 1>&6
1355 else
1356   echo "$ac_t""no" 1>&6
1357 fi
1358
1359 # Find a good install program.  We prefer a C program (faster),
1360 # so one script is as good as another.  But avoid the broken or
1361 # incompatible versions:
1362 # SysV /etc/install, /usr/sbin/install
1363 # SunOS /usr/etc/install
1364 # IRIX /sbin/install
1365 # AIX /bin/install
1366 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1367 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1368 # ./install, which can be erroneously created by make from ./install.sh.
1369 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1370 echo "configure:1371: checking for a BSD compatible install" >&5
1371 if test -z "$INSTALL"; then
1372 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1373   echo $ac_n "(cached) $ac_c" 1>&6
1374 else
1375     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1376   for ac_dir in $PATH; do
1377     # Account for people who put trailing slashes in PATH elements.
1378     case "$ac_dir/" in
1379     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1380     *)
1381       # OSF1 and SCO ODT 3.0 have their own names for install.
1382       for ac_prog in ginstall installbsd scoinst install; do
1383         if test -f $ac_dir/$ac_prog; then
1384           if test $ac_prog = install &&
1385             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1386             # AIX install.  It has an incompatible calling convention.
1387             # OSF/1 installbsd also uses dspmsg, but is usable.
1388             :
1389           else
1390             ac_cv_path_install="$ac_dir/$ac_prog -c"
1391             break 2
1392           fi
1393         fi
1394       done
1395       ;;
1396     esac
1397   done
1398   IFS="$ac_save_IFS"
1399
1400 fi
1401   if test "${ac_cv_path_install+set}" = set; then
1402     INSTALL="$ac_cv_path_install"
1403   else
1404     # As a last resort, use the slow shell script.  We don't cache a
1405     # path for INSTALL within a source directory, because that will
1406     # break other packages using the cache if that directory is
1407     # removed, or if the path is relative.
1408     INSTALL="$ac_install_sh"
1409   fi
1410 fi
1411 echo "$ac_t""$INSTALL" 1>&6
1412
1413 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1414 # It thinks the first close brace ends the variable substitution.
1415 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1416
1417 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1418
1419 # Extract the first word of "ranlib", so it can be a program name with args.
1420 set dummy ranlib; ac_word=$2
1421 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1422 echo "configure:1423: checking for $ac_word" >&5
1423 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1424   echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426   if test -n "$RANLIB"; then
1427   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1428 else
1429   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1430   for ac_dir in $PATH; do
1431     test -z "$ac_dir" && ac_dir=.
1432     if test -f $ac_dir/$ac_word; then
1433       ac_cv_prog_RANLIB="ranlib"
1434       break
1435     fi
1436   done
1437   IFS="$ac_save_ifs"
1438   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1439 fi
1440 fi
1441 RANLIB="$ac_cv_prog_RANLIB"
1442 if test -n "$RANLIB"; then
1443   echo "$ac_t""$RANLIB" 1>&6
1444 else
1445   echo "$ac_t""no" 1>&6
1446 fi
1447
1448 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1449 echo "configure:1450: checking whether ${MAKE-make} sets \${MAKE}" >&5
1450 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1451 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1452   echo $ac_n "(cached) $ac_c" 1>&6
1453 else
1454   cat > conftestmake <<\EOF
1455 all:
1456         @echo 'ac_maketemp="${MAKE}"'
1457 EOF
1458 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1459 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1460 if test -n "$ac_maketemp"; then
1461   eval ac_cv_prog_make_${ac_make}_set=yes
1462 else
1463   eval ac_cv_prog_make_${ac_make}_set=no
1464 fi
1465 rm -f conftestmake
1466 fi
1467 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1468   echo "$ac_t""yes" 1>&6
1469   SET_MAKE=
1470 else
1471   echo "$ac_t""no" 1>&6
1472   SET_MAKE="MAKE=${MAKE-make}"
1473 fi
1474
1475
1476 # Extract the first word of "sendmail", so it can be a program name with args.
1477 set dummy sendmail; ac_word=$2
1478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1479 echo "configure:1480: checking for $ac_word" >&5
1480 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
1481   echo $ac_n "(cached) $ac_c" 1>&6
1482 else
1483   case "$SENDMAIL" in
1484   /*)
1485   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
1486   ;;
1487   *)
1488   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1489   for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do
1490     test -z "$ac_dir" && ac_dir=.
1491     if test -f $ac_dir/$ac_word; then
1492       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
1493       break
1494     fi
1495   done
1496   IFS="$ac_save_ifs"
1497   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
1498   ;;
1499 esac
1500 fi
1501 SENDMAIL="$ac_cv_path_SENDMAIL"
1502 if test -n "$SENDMAIL"; then
1503   echo "$ac_t""$SENDMAIL" 1>&6
1504 else
1505   echo "$ac_t""no" 1>&6
1506 fi
1507
1508 # Extract the first word of "vi", so it can be a program name with args.
1509 set dummy vi; ac_word=$2
1510 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1511 echo "configure:1512: checking for $ac_word" >&5
1512 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
1513   echo $ac_n "(cached) $ac_c" 1>&6
1514 else
1515   case "$EDITOR" in
1516   /*)
1517   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
1518   ;;
1519   *)
1520   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1521   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1522     test -z "$ac_dir" && ac_dir=.
1523     if test -f $ac_dir/$ac_word; then
1524       ac_cv_path_EDITOR="$ac_dir/$ac_word"
1525       break
1526     fi
1527   done
1528   IFS="$ac_save_ifs"
1529   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
1530   ;;
1531 esac
1532 fi
1533 EDITOR="$ac_cv_path_EDITOR"
1534 if test -n "$EDITOR"; then
1535   echo "$ac_t""$EDITOR" 1>&6
1536 else
1537   echo "$ac_t""no" 1>&6
1538 fi
1539
1540 # Extract the first word of "finger", so it can be a program name with args.
1541 set dummy finger; ac_word=$2
1542 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1543 echo "configure:1544: checking for $ac_word" >&5
1544 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
1545   echo $ac_n "(cached) $ac_c" 1>&6
1546 else
1547   case "$FINGER" in
1548   /*)
1549   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
1550   ;;
1551   *)
1552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1553   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
1554     test -z "$ac_dir" && ac_dir=.
1555     if test -f $ac_dir/$ac_word; then
1556       ac_cv_path_FINGER="$ac_dir/$ac_word"
1557       break
1558     fi
1559   done
1560   IFS="$ac_save_ifs"
1561   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
1562   ;;
1563 esac
1564 fi
1565 FINGER="$ac_cv_path_FINGER"
1566 if test -n "$FINGER"; then
1567   echo "$ac_t""$FINGER" 1>&6
1568 else
1569   echo "$ac_t""no" 1>&6
1570 fi
1571
1572
1573
1574 ldbm_use="none"
1575 LDBM_DEFS=
1576 LDBM_LIBS=
1577
1578 if test "$SLAPD_LDBM" = "yes" ; then
1579         if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \
1580                         -o $ldbm_prefer = dbhash ; then
1581                 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
1582 echo "configure:1583: checking for dbopen" >&5
1583 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
1584   echo $ac_n "(cached) $ac_c" 1>&6
1585 else
1586   cat > conftest.$ac_ext <<EOF
1587 #line 1588 "configure"
1588 #include "confdefs.h"
1589 /* System header to define __stub macros and hopefully few prototypes,
1590     which can conflict with char dbopen(); below.  */
1591 #include <assert.h>
1592 /* Override any gcc2 internal prototype to avoid an error.  */
1593 /* We use char because int might match the return type of a gcc2
1594     builtin and then its argument prototype would still apply.  */
1595 char dbopen();
1596
1597 int main() {
1598
1599 /* The GNU C library defines this for functions which it implements
1600     to always fail with ENOSYS.  Some functions are actually named
1601     something starting with __ and the normal name is an alias.  */
1602 #if defined (__stub_dbopen) || defined (__stub___dbopen)
1603 choke me
1604 #else
1605 dbopen();
1606 #endif
1607
1608 ; return 0; }
1609 EOF
1610 if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1611   rm -rf conftest*
1612   eval "ac_cv_func_dbopen=yes"
1613 else
1614   echo "configure: failed program was:" >&5
1615   cat conftest.$ac_ext >&5
1616   rm -rf conftest*
1617   eval "ac_cv_func_dbopen=no"
1618 fi
1619 rm -f conftest*
1620 fi
1621
1622 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
1623   echo "$ac_t""yes" 1>&6
1624   
1625                         ldbm_use=$ldbm_prefer
1626                         ldbm_prefer=found
1627 else
1628   echo "$ac_t""no" 1>&6
1629
1630                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
1631 echo "configure:1632: checking for dbopen in -ldb" >&5
1632 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
1633 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1634   echo $ac_n "(cached) $ac_c" 1>&6
1635 else
1636   ac_save_LIBS="$LIBS"
1637 LIBS="-ldb  $LIBS"
1638 cat > conftest.$ac_ext <<EOF
1639 #line 1640 "configure"
1640 #include "confdefs.h"
1641 /* Override any gcc2 internal prototype to avoid an error.  */
1642 /* We use char because int might match the return type of a gcc2
1643     builtin and then its argument prototype would still apply.  */
1644 char dbopen();
1645
1646 int main() {
1647 dbopen()
1648 ; return 0; }
1649 EOF
1650 if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1651   rm -rf conftest*
1652   eval "ac_cv_lib_$ac_lib_var=yes"
1653 else
1654   echo "configure: failed program was:" >&5
1655   cat conftest.$ac_ext >&5
1656   rm -rf conftest*
1657   eval "ac_cv_lib_$ac_lib_var=no"
1658 fi
1659 rm -f conftest*
1660 LIBS="$ac_save_LIBS"
1661
1662 fi
1663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1664   echo "$ac_t""yes" 1>&6
1665   
1666                                 ldbm_use=$ldbm_prefer
1667                                 ldbm_prefer=found
1668                                 LDBM_LIBS="$LDBM_LIBS -ldb"
1669                         
1670 else
1671   echo "$ac_t""no" 1>&6
1672 fi
1673  
1674                 
1675 fi
1676
1677
1678                 if test $ldbm_prefer = found ; then
1679                         if test $ldbm_use = dbhash ; then
1680                                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH"
1681                         else
1682                                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE"
1683                         fi
1684                 fi
1685
1686                 echo $ac_n "checking for db2""... $ac_c" 1>&6
1687 echo "configure:1688: checking for db2" >&5
1688                 if eval "test \"`echo '$''{'cf_cv_db2'+set}'`\" = set"; then
1689   echo $ac_n "(cached) $ac_c" 1>&6
1690 else
1691   
1692                         cat > conftest.$ac_ext <<EOF
1693 #line 1694 "configure"
1694 #include "confdefs.h"
1695
1696 #include <db.h>
1697 /* this check could be improved */
1698 #ifdef DB_VERSION_MAJOR
1699 #if DB_VERSION_MAJOR == 2
1700         __db_version_2
1701 #endif
1702 #endif
1703                         
1704 EOF
1705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1706   egrep "__db_version_2" >/dev/null 2>&1; then
1707   rm -rf conftest*
1708   cf_cv_db2=yes
1709 else
1710   rm -rf conftest*
1711   cf_cv_db2=no
1712 fi
1713 rm -f conftest*
1714
1715 fi
1716
1717                 echo "$ac_t""$cf_cv_db2" 1>&6
1718
1719                 if test $cf_cv_db2 = yes ; then
1720                         if test $opt_db2 = yes ; then
1721                                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2"
1722                         else
1723                                 for ac_hdr in db185.h
1724 do
1725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1727 echo "configure:1728: checking for $ac_hdr" >&5
1728 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1729   echo $ac_n "(cached) $ac_c" 1>&6
1730 else
1731   cat > conftest.$ac_ext <<EOF
1732 #line 1733 "configure"
1733 #include "confdefs.h"
1734 #include <$ac_hdr>
1735 EOF
1736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1737 { (eval echo configure:1738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1738 ac_err=`grep -v '^ *+' conftest.out`
1739 if test -z "$ac_err"; then
1740   rm -rf conftest*
1741   eval "ac_cv_header_$ac_safe=yes"
1742 else
1743   echo "$ac_err" >&5
1744   echo "configure: failed program was:" >&5
1745   cat conftest.$ac_ext >&5
1746   rm -rf conftest*
1747   eval "ac_cv_header_$ac_safe=no"
1748 fi
1749 rm -f conftest*
1750 fi
1751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1752   echo "$ac_t""yes" 1>&6
1753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1754   cat >> confdefs.h <<EOF
1755 #define $ac_tr_hdr 1
1756 EOF
1757  
1758 else
1759   echo "$ac_t""no" 1>&6
1760 fi
1761 done
1762
1763                                 if test $cf_cv_header_db185 = no ; then
1764                                         { echo "configure: error: select --with-db2 or install db2 with 1.85 compatibility" 1>&2; exit 1; }
1765                                 fi
1766
1767                                 LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185"
1768                         fi
1769                 else
1770                         if test $opt_db2 = yes ; then
1771                                 { echo "configure: error: could not local DB2" 1>&2; exit 1; }
1772                         fi
1773                 fi
1774         fi
1775
1776         if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then
1777                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
1778 echo "configure:1779: checking for gdbm_open in -lgdbm" >&5
1779 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
1780 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1781   echo $ac_n "(cached) $ac_c" 1>&6
1782 else
1783   ac_save_LIBS="$LIBS"
1784 LIBS="-lgdbm  $LIBS"
1785 cat > conftest.$ac_ext <<EOF
1786 #line 1787 "configure"
1787 #include "confdefs.h"
1788 /* Override any gcc2 internal prototype to avoid an error.  */
1789 /* We use char because int might match the return type of a gcc2
1790     builtin and then its argument prototype would still apply.  */
1791 char gdbm_open();
1792
1793 int main() {
1794 gdbm_open()
1795 ; return 0; }
1796 EOF
1797 if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1798   rm -rf conftest*
1799   eval "ac_cv_lib_$ac_lib_var=yes"
1800 else
1801   echo "configure: failed program was:" >&5
1802   cat conftest.$ac_ext >&5
1803   rm -rf conftest*
1804   eval "ac_cv_lib_$ac_lib_var=no"
1805 fi
1806 rm -f conftest*
1807 LIBS="$ac_save_LIBS"
1808
1809 fi
1810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1811   echo "$ac_t""yes" 1>&6
1812   
1813                         ldbm_use=$ldbm_prefer
1814                         ldbm_prefer=found
1815                         LDBM_LIBS="$LDBM_LIBS -lgdbm"
1816                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM"
1817                 
1818 else
1819   echo "$ac_t""no" 1>&6
1820 fi
1821  
1822         fi
1823         if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then
1824                 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
1825 echo "configure:1826: checking for dbm_open in -ldbm" >&5
1826 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
1827 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1828   echo $ac_n "(cached) $ac_c" 1>&6
1829 else
1830   ac_save_LIBS="$LIBS"
1831 LIBS="-ldbm  $LIBS"
1832 cat > conftest.$ac_ext <<EOF
1833 #line 1834 "configure"
1834 #include "confdefs.h"
1835 /* Override any gcc2 internal prototype to avoid an error.  */
1836 /* We use char because int might match the return type of a gcc2
1837     builtin and then its argument prototype would still apply.  */
1838 char dbm_open();
1839
1840 int main() {
1841 dbm_open()
1842 ; return 0; }
1843 EOF
1844 if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1845   rm -rf conftest*
1846   eval "ac_cv_lib_$ac_lib_var=yes"
1847 else
1848   echo "configure: failed program was:" >&5
1849   cat conftest.$ac_ext >&5
1850   rm -rf conftest*
1851   eval "ac_cv_lib_$ac_lib_var=no"
1852 fi
1853 rm -f conftest*
1854 LIBS="$ac_save_LIBS"
1855
1856 fi
1857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1858   echo "$ac_t""yes" 1>&6
1859   
1860                         ldbm_use=ndbm
1861                         ldbm_prefer=found
1862                         LDBM_LIBS="$LDBM_LIBS -ldbm"
1863                         LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM"
1864                 
1865 else
1866   echo "$ac_t""no" 1>&6
1867 fi
1868  
1869         fi
1870
1871         if test $ldbm_prefer != found ; then
1872                 { echo "configure: error: could not find suitable db for $ldbm_prefer backend" 1>&2; exit 1; }
1873         fi
1874
1875         if test $ldbm_use = ndbm ; then
1876                 echo "configure: warning: LDBM using NDBM" 1>&2
1877         fi
1878 fi
1879
1880 if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then
1881         echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6
1882 echo "configure:1883: checking for hosts_access in -lwrap" >&5
1883 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'`
1884 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1885   echo $ac_n "(cached) $ac_c" 1>&6
1886 else
1887   ac_save_LIBS="$LIBS"
1888 LIBS="-lwrap  $LIBS"
1889 cat > conftest.$ac_ext <<EOF
1890 #line 1891 "configure"
1891 #include "confdefs.h"
1892 /* Override any gcc2 internal prototype to avoid an error.  */
1893 /* We use char because int might match the return type of a gcc2
1894     builtin and then its argument prototype would still apply.  */
1895 char hosts_access();
1896
1897 int main() {
1898 hosts_access()
1899 ; return 0; }
1900 EOF
1901 if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1902   rm -rf conftest*
1903   eval "ac_cv_lib_$ac_lib_var=yes"
1904 else
1905   echo "configure: failed program was:" >&5
1906   cat conftest.$ac_ext >&5
1907   rm -rf conftest*
1908   eval "ac_cv_lib_$ac_lib_var=no"
1909 fi
1910 rm -f conftest*
1911 LIBS="$ac_save_LIBS"
1912
1913 fi
1914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1915   echo "$ac_t""yes" 1>&6
1916   LIBTCPD="-lwrap"
1917                 cat >> confdefs.h <<\EOF
1918 #define HAVE_TCPD 1
1919 EOF
1920
1921                 SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS"
1922         
1923 else
1924   echo "$ac_t""no" 1>&6
1925 fi
1926
1927 fi
1928
1929 # ud needs termcap (should insert check here)
1930 LIBTERMCAP="-ltermcap"
1931
1932
1933 # FreeBSD (and others) have crypt(3) in -lcrypt
1934 if test "$SLAPD_CRYPT" = "yes" ; then
1935         echo $ac_n "checking for crypt""... $ac_c" 1>&6
1936 echo "configure:1937: checking for crypt" >&5
1937 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
1938   echo $ac_n "(cached) $ac_c" 1>&6
1939 else
1940   cat > conftest.$ac_ext <<EOF
1941 #line 1942 "configure"
1942 #include "confdefs.h"
1943 /* System header to define __stub macros and hopefully few prototypes,
1944     which can conflict with char crypt(); below.  */
1945 #include <assert.h>
1946 /* Override any gcc2 internal prototype to avoid an error.  */
1947 /* We use char because int might match the return type of a gcc2
1948     builtin and then its argument prototype would still apply.  */
1949 char crypt();
1950
1951 int main() {
1952
1953 /* The GNU C library defines this for functions which it implements
1954     to always fail with ENOSYS.  Some functions are actually named
1955     something starting with __ and the normal name is an alias.  */
1956 #if defined (__stub_crypt) || defined (__stub___crypt)
1957 choke me
1958 #else
1959 crypt();
1960 #endif
1961
1962 ; return 0; }
1963 EOF
1964 if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1965   rm -rf conftest*
1966   eval "ac_cv_func_crypt=yes"
1967 else
1968   echo "configure: failed program was:" >&5
1969   cat conftest.$ac_ext >&5
1970   rm -rf conftest*
1971   eval "ac_cv_func_crypt=no"
1972 fi
1973 rm -f conftest*
1974 fi
1975
1976 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
1977   echo "$ac_t""yes" 1>&6
1978   have_crypt=yes
1979 else
1980   echo "$ac_t""no" 1>&6
1981
1982                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
1983 echo "configure:1984: checking for crypt in -lcrypt" >&5
1984 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
1985 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1986   echo $ac_n "(cached) $ac_c" 1>&6
1987 else
1988   ac_save_LIBS="$LIBS"
1989 LIBS="-lcrypt  $LIBS"
1990 cat > conftest.$ac_ext <<EOF
1991 #line 1992 "configure"
1992 #include "confdefs.h"
1993 /* Override any gcc2 internal prototype to avoid an error.  */
1994 /* We use char because int might match the return type of a gcc2
1995     builtin and then its argument prototype would still apply.  */
1996 char crypt();
1997
1998 int main() {
1999 crypt()
2000 ; return 0; }
2001 EOF
2002 if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2003   rm -rf conftest*
2004   eval "ac_cv_lib_$ac_lib_var=yes"
2005 else
2006   echo "configure: failed program was:" >&5
2007   cat conftest.$ac_ext >&5
2008   rm -rf conftest*
2009   eval "ac_cv_lib_$ac_lib_var=no"
2010 fi
2011 rm -f conftest*
2012 LIBS="$ac_save_LIBS"
2013
2014 fi
2015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2016   echo "$ac_t""yes" 1>&6
2017   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
2018                         have_crypt=yes
2019 else
2020   echo "$ac_t""no" 1>&6
2021 have_crypt=no
2022 fi
2023
2024 fi
2025
2026
2027         if test $have_crypt = yes ; then
2028                 cat >> confdefs.h <<\EOF
2029 #define SLAPD_CRYPT 1
2030 EOF
2031
2032                 LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT"
2033         else
2034                 echo "configure: warning: could not find crypt" 1>&2
2035         fi
2036 fi
2037
2038 ac_header_dirent=no
2039 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2040 do
2041 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2042 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2043 echo "configure:2044: checking for $ac_hdr that defines DIR" >&5
2044 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2045   echo $ac_n "(cached) $ac_c" 1>&6
2046 else
2047   cat > conftest.$ac_ext <<EOF
2048 #line 2049 "configure"
2049 #include "confdefs.h"
2050 #include <sys/types.h>
2051 #include <$ac_hdr>
2052 int main() {
2053 DIR *dirp = 0;
2054 ; return 0; }
2055 EOF
2056 if { (eval echo configure:2057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2057   rm -rf conftest*
2058   eval "ac_cv_header_dirent_$ac_safe=yes"
2059 else
2060   echo "configure: failed program was:" >&5
2061   cat conftest.$ac_ext >&5
2062   rm -rf conftest*
2063   eval "ac_cv_header_dirent_$ac_safe=no"
2064 fi
2065 rm -f conftest*
2066 fi
2067 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2068   echo "$ac_t""yes" 1>&6
2069     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2070   cat >> confdefs.h <<EOF
2071 #define $ac_tr_hdr 1
2072 EOF
2073  ac_header_dirent=$ac_hdr; break
2074 else
2075   echo "$ac_t""no" 1>&6
2076 fi
2077 done
2078 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2079 if test $ac_header_dirent = dirent.h; then
2080 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2081 echo "configure:2082: checking for opendir in -ldir" >&5
2082 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2083 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2084   echo $ac_n "(cached) $ac_c" 1>&6
2085 else
2086   ac_save_LIBS="$LIBS"
2087 LIBS="-ldir  $LIBS"
2088 cat > conftest.$ac_ext <<EOF
2089 #line 2090 "configure"
2090 #include "confdefs.h"
2091 /* Override any gcc2 internal prototype to avoid an error.  */
2092 /* We use char because int might match the return type of a gcc2
2093     builtin and then its argument prototype would still apply.  */
2094 char opendir();
2095
2096 int main() {
2097 opendir()
2098 ; return 0; }
2099 EOF
2100 if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2101   rm -rf conftest*
2102   eval "ac_cv_lib_$ac_lib_var=yes"
2103 else
2104   echo "configure: failed program was:" >&5
2105   cat conftest.$ac_ext >&5
2106   rm -rf conftest*
2107   eval "ac_cv_lib_$ac_lib_var=no"
2108 fi
2109 rm -f conftest*
2110 LIBS="$ac_save_LIBS"
2111
2112 fi
2113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2114   echo "$ac_t""yes" 1>&6
2115   LIBS="$LIBS -ldir"
2116 else
2117   echo "$ac_t""no" 1>&6
2118 fi
2119
2120 else
2121 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2122 echo "configure:2123: checking for opendir in -lx" >&5
2123 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2124 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2125   echo $ac_n "(cached) $ac_c" 1>&6
2126 else
2127   ac_save_LIBS="$LIBS"
2128 LIBS="-lx  $LIBS"
2129 cat > conftest.$ac_ext <<EOF
2130 #line 2131 "configure"
2131 #include "confdefs.h"
2132 /* Override any gcc2 internal prototype to avoid an error.  */
2133 /* We use char because int might match the return type of a gcc2
2134     builtin and then its argument prototype would still apply.  */
2135 char opendir();
2136
2137 int main() {
2138 opendir()
2139 ; return 0; }
2140 EOF
2141 if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2142   rm -rf conftest*
2143   eval "ac_cv_lib_$ac_lib_var=yes"
2144 else
2145   echo "configure: failed program was:" >&5
2146   cat conftest.$ac_ext >&5
2147   rm -rf conftest*
2148   eval "ac_cv_lib_$ac_lib_var=no"
2149 fi
2150 rm -f conftest*
2151 LIBS="$ac_save_LIBS"
2152
2153 fi
2154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2155   echo "$ac_t""yes" 1>&6
2156   LIBS="$LIBS -lx"
2157 else
2158   echo "$ac_t""no" 1>&6
2159 fi
2160
2161 fi
2162
2163 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2164 echo "configure:2165: checking for ANSI C header files" >&5
2165 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2166   echo $ac_n "(cached) $ac_c" 1>&6
2167 else
2168   cat > conftest.$ac_ext <<EOF
2169 #line 2170 "configure"
2170 #include "confdefs.h"
2171 #include <stdlib.h>
2172 #include <stdarg.h>
2173 #include <string.h>
2174 #include <float.h>
2175 EOF
2176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2177 { (eval echo configure:2178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2178 ac_err=`grep -v '^ *+' conftest.out`
2179 if test -z "$ac_err"; then
2180   rm -rf conftest*
2181   ac_cv_header_stdc=yes
2182 else
2183   echo "$ac_err" >&5
2184   echo "configure: failed program was:" >&5
2185   cat conftest.$ac_ext >&5
2186   rm -rf conftest*
2187   ac_cv_header_stdc=no
2188 fi
2189 rm -f conftest*
2190
2191 if test $ac_cv_header_stdc = yes; then
2192   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2193 cat > conftest.$ac_ext <<EOF
2194 #line 2195 "configure"
2195 #include "confdefs.h"
2196 #include <string.h>
2197 EOF
2198 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2199   egrep "memchr" >/dev/null 2>&1; then
2200   :
2201 else
2202   rm -rf conftest*
2203   ac_cv_header_stdc=no
2204 fi
2205 rm -f conftest*
2206
2207 fi
2208
2209 if test $ac_cv_header_stdc = yes; then
2210   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2211 cat > conftest.$ac_ext <<EOF
2212 #line 2213 "configure"
2213 #include "confdefs.h"
2214 #include <stdlib.h>
2215 EOF
2216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2217   egrep "free" >/dev/null 2>&1; then
2218   :
2219 else
2220   rm -rf conftest*
2221   ac_cv_header_stdc=no
2222 fi
2223 rm -f conftest*
2224
2225 fi
2226
2227 if test $ac_cv_header_stdc = yes; then
2228   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2229 if test "$cross_compiling" = yes; then
2230   :
2231 else
2232   cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2235 #include <ctype.h>
2236 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2237 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2238 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2239 int main () { int i; for (i = 0; i < 256; i++)
2240 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2241 exit (0); }
2242
2243 EOF
2244 if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2245 then
2246   :
2247 else
2248   echo "configure: failed program was:" >&5
2249   cat conftest.$ac_ext >&5
2250   rm -fr conftest*
2251   ac_cv_header_stdc=no
2252 fi
2253 rm -fr conftest*
2254 fi
2255
2256 fi
2257 fi
2258
2259 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2260 if test $ac_cv_header_stdc = yes; then
2261   cat >> confdefs.h <<\EOF
2262 #define STDC_HEADERS 1
2263 EOF
2264
2265 fi
2266
2267 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2268 echo "configure:2269: checking for sys/wait.h that is POSIX.1 compatible" >&5
2269 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2270   echo $ac_n "(cached) $ac_c" 1>&6
2271 else
2272   cat > conftest.$ac_ext <<EOF
2273 #line 2274 "configure"
2274 #include "confdefs.h"
2275 #include <sys/types.h>
2276 #include <sys/wait.h>
2277 #ifndef WEXITSTATUS
2278 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2279 #endif
2280 #ifndef WIFEXITED
2281 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2282 #endif
2283 int main() {
2284 int s;
2285 wait (&s);
2286 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2287 ; return 0; }
2288 EOF
2289 if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2290   rm -rf conftest*
2291   ac_cv_header_sys_wait_h=yes
2292 else
2293   echo "configure: failed program was:" >&5
2294   cat conftest.$ac_ext >&5
2295   rm -rf conftest*
2296   ac_cv_header_sys_wait_h=no
2297 fi
2298 rm -f conftest*
2299 fi
2300
2301 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2302 if test $ac_cv_header_sys_wait_h = yes; then
2303   cat >> confdefs.h <<\EOF
2304 #define HAVE_SYS_WAIT_H 1
2305 EOF
2306
2307 fi
2308
2309 for ac_hdr in \
2310         stddef.h        \
2311         fcntl.h         \
2312         limits.h        \
2313         malloc.h        \
2314         sgtty.h         \
2315         sys/file.h      \
2316         sys/ioctl.h     \
2317         sys/time.h      \
2318         syslog.h        \
2319         termio.h        \
2320         unistd.h        \
2321
2322 do
2323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2325 echo "configure:2326: checking for $ac_hdr" >&5
2326 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2327   echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329   cat > conftest.$ac_ext <<EOF
2330 #line 2331 "configure"
2331 #include "confdefs.h"
2332 #include <$ac_hdr>
2333 EOF
2334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2335 { (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2336 ac_err=`grep -v '^ *+' conftest.out`
2337 if test -z "$ac_err"; then
2338   rm -rf conftest*
2339   eval "ac_cv_header_$ac_safe=yes"
2340 else
2341   echo "$ac_err" >&5
2342   echo "configure: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   rm -rf conftest*
2345   eval "ac_cv_header_$ac_safe=no"
2346 fi
2347 rm -f conftest*
2348 fi
2349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2350   echo "$ac_t""yes" 1>&6
2351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2352   cat >> confdefs.h <<EOF
2353 #define $ac_tr_hdr 1
2354 EOF
2355  
2356 else
2357   echo "$ac_t""no" 1>&6
2358 fi
2359 done
2360
2361
2362 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2363 echo "configure:2364: checking for uid_t in sys/types.h" >&5
2364 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2365   echo $ac_n "(cached) $ac_c" 1>&6
2366 else
2367   cat > conftest.$ac_ext <<EOF
2368 #line 2369 "configure"
2369 #include "confdefs.h"
2370 #include <sys/types.h>
2371 EOF
2372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2373   egrep "uid_t" >/dev/null 2>&1; then
2374   rm -rf conftest*
2375   ac_cv_type_uid_t=yes
2376 else
2377   rm -rf conftest*
2378   ac_cv_type_uid_t=no
2379 fi
2380 rm -f conftest*
2381
2382 fi
2383
2384 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2385 if test $ac_cv_type_uid_t = no; then
2386   cat >> confdefs.h <<\EOF
2387 #define uid_t int
2388 EOF
2389
2390   cat >> confdefs.h <<\EOF
2391 #define gid_t int
2392 EOF
2393
2394 fi
2395
2396 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
2397 echo "configure:2398: checking type of array argument to getgroups" >&5
2398 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
2399   echo $ac_n "(cached) $ac_c" 1>&6
2400 else
2401   if test "$cross_compiling" = yes; then
2402   ac_cv_type_getgroups=cross
2403 else
2404   cat > conftest.$ac_ext <<EOF
2405 #line 2406 "configure"
2406 #include "confdefs.h"
2407
2408 /* Thanks to Mike Rendell for this test.  */
2409 #include <sys/types.h>
2410 #define NGID 256
2411 #undef MAX
2412 #define MAX(x, y) ((x) > (y) ? (x) : (y))
2413 main()
2414 {
2415   gid_t gidset[NGID];
2416   int i, n;
2417   union { gid_t gval; long lval; }  val;
2418
2419   val.lval = -1;
2420   for (i = 0; i < NGID; i++)
2421     gidset[i] = val.gval;
2422   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
2423                  gidset);
2424   /* Exit non-zero if getgroups seems to require an array of ints.  This
2425      happens when gid_t is short but getgroups modifies an array of ints.  */
2426   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
2427 }
2428
2429 EOF
2430 if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2431 then
2432     ac_cv_type_getgroups=gid_t
2433 else
2434   echo "configure: failed program was:" >&5
2435   cat conftest.$ac_ext >&5
2436   rm -fr conftest*
2437   ac_cv_type_getgroups=int
2438 fi
2439 rm -fr conftest*
2440 fi
2441
2442 if test $ac_cv_type_getgroups = cross; then
2443         cat > conftest.$ac_ext <<EOF
2444 #line 2445 "configure"
2445 #include "confdefs.h"
2446 #include <unistd.h>
2447 EOF
2448 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2449   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
2450   rm -rf conftest*
2451   ac_cv_type_getgroups=gid_t
2452 else
2453   rm -rf conftest*
2454   ac_cv_type_getgroups=int
2455 fi
2456 rm -f conftest*
2457
2458 fi
2459 fi
2460
2461 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
2462 cat >> confdefs.h <<EOF
2463 #define GETGROUPS_T $ac_cv_type_getgroups
2464 EOF
2465
2466
2467 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2468 echo "configure:2469: checking for mode_t" >&5
2469 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2470   echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472   cat > conftest.$ac_ext <<EOF
2473 #line 2474 "configure"
2474 #include "confdefs.h"
2475 #include <sys/types.h>
2476 #if STDC_HEADERS
2477 #include <stdlib.h>
2478 #include <stddef.h>
2479 #endif
2480 EOF
2481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2482   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2483   rm -rf conftest*
2484   ac_cv_type_mode_t=yes
2485 else
2486   rm -rf conftest*
2487   ac_cv_type_mode_t=no
2488 fi
2489 rm -f conftest*
2490
2491 fi
2492 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2493 if test $ac_cv_type_mode_t = no; then
2494   cat >> confdefs.h <<\EOF
2495 #define mode_t int
2496 EOF
2497
2498 fi
2499
2500 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2501 echo "configure:2502: checking for off_t" >&5
2502 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2503   echo $ac_n "(cached) $ac_c" 1>&6
2504 else
2505   cat > conftest.$ac_ext <<EOF
2506 #line 2507 "configure"
2507 #include "confdefs.h"
2508 #include <sys/types.h>
2509 #if STDC_HEADERS
2510 #include <stdlib.h>
2511 #include <stddef.h>
2512 #endif
2513 EOF
2514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2515   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2516   rm -rf conftest*
2517   ac_cv_type_off_t=yes
2518 else
2519   rm -rf conftest*
2520   ac_cv_type_off_t=no
2521 fi
2522 rm -f conftest*
2523
2524 fi
2525 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2526 if test $ac_cv_type_off_t = no; then
2527   cat >> confdefs.h <<\EOF
2528 #define off_t long
2529 EOF
2530
2531 fi
2532
2533 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2534 echo "configure:2535: checking for pid_t" >&5
2535 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2536   echo $ac_n "(cached) $ac_c" 1>&6
2537 else
2538   cat > conftest.$ac_ext <<EOF
2539 #line 2540 "configure"
2540 #include "confdefs.h"
2541 #include <sys/types.h>
2542 #if STDC_HEADERS
2543 #include <stdlib.h>
2544 #include <stddef.h>
2545 #endif
2546 EOF
2547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2548   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2549   rm -rf conftest*
2550   ac_cv_type_pid_t=yes
2551 else
2552   rm -rf conftest*
2553   ac_cv_type_pid_t=no
2554 fi
2555 rm -f conftest*
2556
2557 fi
2558 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2559 if test $ac_cv_type_pid_t = no; then
2560   cat >> confdefs.h <<\EOF
2561 #define pid_t int
2562 EOF
2563
2564 fi
2565
2566 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2567 echo "configure:2568: checking return type of signal handlers" >&5
2568 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2569   echo $ac_n "(cached) $ac_c" 1>&6
2570 else
2571   cat > conftest.$ac_ext <<EOF
2572 #line 2573 "configure"
2573 #include "confdefs.h"
2574 #include <sys/types.h>
2575 #include <signal.h>
2576 #ifdef signal
2577 #undef signal
2578 #endif
2579 #ifdef __cplusplus
2580 extern "C" void (*signal (int, void (*)(int)))(int);
2581 #else
2582 void (*signal ()) ();
2583 #endif
2584
2585 int main() {
2586 int i;
2587 ; return 0; }
2588 EOF
2589 if { (eval echo configure:2590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2590   rm -rf conftest*
2591   ac_cv_type_signal=void
2592 else
2593   echo "configure: failed program was:" >&5
2594   cat conftest.$ac_ext >&5
2595   rm -rf conftest*
2596   ac_cv_type_signal=int
2597 fi
2598 rm -f conftest*
2599 fi
2600
2601 echo "$ac_t""$ac_cv_type_signal" 1>&6
2602 cat >> confdefs.h <<EOF
2603 #define RETSIGTYPE $ac_cv_type_signal
2604 EOF
2605
2606
2607 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2608 echo "configure:2609: checking for size_t" >&5
2609 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2610   echo $ac_n "(cached) $ac_c" 1>&6
2611 else
2612   cat > conftest.$ac_ext <<EOF
2613 #line 2614 "configure"
2614 #include "confdefs.h"
2615 #include <sys/types.h>
2616 #if STDC_HEADERS
2617 #include <stdlib.h>
2618 #include <stddef.h>
2619 #endif
2620 EOF
2621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2622   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2623   rm -rf conftest*
2624   ac_cv_type_size_t=yes
2625 else
2626   rm -rf conftest*
2627   ac_cv_type_size_t=no
2628 fi
2629 rm -f conftest*
2630
2631 fi
2632 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2633 if test $ac_cv_type_size_t = no; then
2634   cat >> confdefs.h <<\EOF
2635 #define size_t unsigned
2636 EOF
2637
2638 fi
2639
2640 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2641 echo "configure:2642: checking for uid_t in sys/types.h" >&5
2642 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2643   echo $ac_n "(cached) $ac_c" 1>&6
2644 else
2645   cat > conftest.$ac_ext <<EOF
2646 #line 2647 "configure"
2647 #include "confdefs.h"
2648 #include <sys/types.h>
2649 EOF
2650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2651   egrep "uid_t" >/dev/null 2>&1; then
2652   rm -rf conftest*
2653   ac_cv_type_uid_t=yes
2654 else
2655   rm -rf conftest*
2656   ac_cv_type_uid_t=no
2657 fi
2658 rm -f conftest*
2659
2660 fi
2661
2662 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2663 if test $ac_cv_type_uid_t = no; then
2664   cat >> confdefs.h <<\EOF
2665 #define uid_t int
2666 EOF
2667
2668   cat >> confdefs.h <<\EOF
2669 #define gid_t int
2670 EOF
2671
2672 fi
2673
2674 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
2675 echo "configure:2676: checking for st_blksize in struct stat" >&5
2676 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
2677   echo $ac_n "(cached) $ac_c" 1>&6
2678 else
2679   cat > conftest.$ac_ext <<EOF
2680 #line 2681 "configure"
2681 #include "confdefs.h"
2682 #include <sys/types.h>
2683 #include <sys/stat.h>
2684 int main() {
2685 struct stat s; s.st_blksize;
2686 ; return 0; }
2687 EOF
2688 if { (eval echo configure:2689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2689   rm -rf conftest*
2690   ac_cv_struct_st_blksize=yes
2691 else
2692   echo "configure: failed program was:" >&5
2693   cat conftest.$ac_ext >&5
2694   rm -rf conftest*
2695   ac_cv_struct_st_blksize=no
2696 fi
2697 rm -f conftest*
2698 fi
2699
2700 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
2701 if test $ac_cv_struct_st_blksize = yes; then
2702   cat >> confdefs.h <<\EOF
2703 #define HAVE_ST_BLKSIZE 1
2704 EOF
2705
2706 fi
2707
2708 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2709 echo "configure:2710: checking whether time.h and sys/time.h may both be included" >&5
2710 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2711   echo $ac_n "(cached) $ac_c" 1>&6
2712 else
2713   cat > conftest.$ac_ext <<EOF
2714 #line 2715 "configure"
2715 #include "confdefs.h"
2716 #include <sys/types.h>
2717 #include <sys/time.h>
2718 #include <time.h>
2719 int main() {
2720 struct tm *tp;
2721 ; return 0; }
2722 EOF
2723 if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2724   rm -rf conftest*
2725   ac_cv_header_time=yes
2726 else
2727   echo "configure: failed program was:" >&5
2728   cat conftest.$ac_ext >&5
2729   rm -rf conftest*
2730   ac_cv_header_time=no
2731 fi
2732 rm -f conftest*
2733 fi
2734
2735 echo "$ac_t""$ac_cv_header_time" 1>&6
2736 if test $ac_cv_header_time = yes; then
2737   cat >> confdefs.h <<\EOF
2738 #define TIME_WITH_SYS_TIME 1
2739 EOF
2740
2741 fi
2742
2743 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2744 echo "configure:2745: checking whether struct tm is in sys/time.h or time.h" >&5
2745 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2746   echo $ac_n "(cached) $ac_c" 1>&6
2747 else
2748   cat > conftest.$ac_ext <<EOF
2749 #line 2750 "configure"
2750 #include "confdefs.h"
2751 #include <sys/types.h>
2752 #include <time.h>
2753 int main() {
2754 struct tm *tp; tp->tm_sec;
2755 ; return 0; }
2756 EOF
2757 if { (eval echo configure:2758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2758   rm -rf conftest*
2759   ac_cv_struct_tm=time.h
2760 else
2761   echo "configure: failed program was:" >&5
2762   cat conftest.$ac_ext >&5
2763   rm -rf conftest*
2764   ac_cv_struct_tm=sys/time.h
2765 fi
2766 rm -f conftest*
2767 fi
2768
2769 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2770 if test $ac_cv_struct_tm = sys/time.h; then
2771   cat >> confdefs.h <<\EOF
2772 #define TM_IN_SYS_TIME 1
2773 EOF
2774
2775 fi
2776
2777
2778 echo $ac_n "checking for working const""... $ac_c" 1>&6
2779 echo "configure:2780: checking for working const" >&5
2780 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2781   echo $ac_n "(cached) $ac_c" 1>&6
2782 else
2783   cat > conftest.$ac_ext <<EOF
2784 #line 2785 "configure"
2785 #include "confdefs.h"
2786
2787 int main() {
2788
2789 /* Ultrix mips cc rejects this.  */
2790 typedef int charset[2]; const charset x;
2791 /* SunOS 4.1.1 cc rejects this.  */
2792 char const *const *ccp;
2793 char **p;
2794 /* NEC SVR4.0.2 mips cc rejects this.  */
2795 struct point {int x, y;};
2796 static struct point const zero = {0,0};
2797 /* AIX XL C 1.02.0.0 rejects this.
2798    It does not let you subtract one const X* pointer from another in an arm
2799    of an if-expression whose if-part is not a constant expression */
2800 const char *g = "string";
2801 ccp = &g + (g ? g-g : 0);
2802 /* HPUX 7.0 cc rejects these. */
2803 ++ccp;
2804 p = (char**) ccp;
2805 ccp = (char const *const *) p;
2806 { /* SCO 3.2v4 cc rejects this.  */
2807   char *t;
2808   char const *s = 0 ? (char *) 0 : (char const *) 0;
2809
2810   *t++ = 0;
2811 }
2812 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2813   int x[] = {25, 17};
2814   const int *foo = &x[0];
2815   ++foo;
2816 }
2817 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2818   typedef const int *iptr;
2819   iptr p = 0;
2820   ++p;
2821 }
2822 { /* AIX XL C 1.02.0.0 rejects this saying
2823      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2824   struct s { int j; const int *ap[3]; };
2825   struct s *b; b->j = 5;
2826 }
2827 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2828   const int foo = 10;
2829 }
2830
2831 ; return 0; }
2832 EOF
2833 if { (eval echo configure:2834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2834   rm -rf conftest*
2835   ac_cv_c_const=yes
2836 else
2837   echo "configure: failed program was:" >&5
2838   cat conftest.$ac_ext >&5
2839   rm -rf conftest*
2840   ac_cv_c_const=no
2841 fi
2842 rm -f conftest*
2843 fi
2844
2845 echo "$ac_t""$ac_cv_c_const" 1>&6
2846 if test $ac_cv_c_const = no; then
2847   cat >> confdefs.h <<\EOF
2848 #define const 
2849 EOF
2850
2851 fi
2852
2853
2854 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2855 echo "configure:2856: checking for 8-bit clean memcmp" >&5
2856 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2857   echo $ac_n "(cached) $ac_c" 1>&6
2858 else
2859   if test "$cross_compiling" = yes; then
2860   ac_cv_func_memcmp_clean=no
2861 else
2862   cat > conftest.$ac_ext <<EOF
2863 #line 2864 "configure"
2864 #include "confdefs.h"
2865
2866 main()
2867 {
2868   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2869   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2870 }
2871
2872 EOF
2873 if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2874 then
2875   ac_cv_func_memcmp_clean=yes
2876 else
2877   echo "configure: failed program was:" >&5
2878   cat conftest.$ac_ext >&5
2879   rm -fr conftest*
2880   ac_cv_func_memcmp_clean=no
2881 fi
2882 rm -fr conftest*
2883 fi
2884
2885 fi
2886
2887 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2888 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
2889
2890 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2891 echo "configure:2892: checking return type of signal handlers" >&5
2892 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2893   echo $ac_n "(cached) $ac_c" 1>&6
2894 else
2895   cat > conftest.$ac_ext <<EOF
2896 #line 2897 "configure"
2897 #include "confdefs.h"
2898 #include <sys/types.h>
2899 #include <signal.h>
2900 #ifdef signal
2901 #undef signal
2902 #endif
2903 #ifdef __cplusplus
2904 extern "C" void (*signal (int, void (*)(int)))(int);
2905 #else
2906 void (*signal ()) ();
2907 #endif
2908
2909 int main() {
2910 int i;
2911 ; return 0; }
2912 EOF
2913 if { (eval echo configure:2914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2914   rm -rf conftest*
2915   ac_cv_type_signal=void
2916 else
2917   echo "configure: failed program was:" >&5
2918   cat conftest.$ac_ext >&5
2919   rm -rf conftest*
2920   ac_cv_type_signal=int
2921 fi
2922 rm -f conftest*
2923 fi
2924
2925 echo "$ac_t""$ac_cv_type_signal" 1>&6
2926 cat >> confdefs.h <<EOF
2927 #define RETSIGTYPE $ac_cv_type_signal
2928 EOF
2929
2930
2931 echo $ac_n "checking for strftime""... $ac_c" 1>&6
2932 echo "configure:2933: checking for strftime" >&5
2933 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
2934   echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936   cat > conftest.$ac_ext <<EOF
2937 #line 2938 "configure"
2938 #include "confdefs.h"
2939 /* System header to define __stub macros and hopefully few prototypes,
2940     which can conflict with char strftime(); below.  */
2941 #include <assert.h>
2942 /* Override any gcc2 internal prototype to avoid an error.  */
2943 /* We use char because int might match the return type of a gcc2
2944     builtin and then its argument prototype would still apply.  */
2945 char strftime();
2946
2947 int main() {
2948
2949 /* The GNU C library defines this for functions which it implements
2950     to always fail with ENOSYS.  Some functions are actually named
2951     something starting with __ and the normal name is an alias.  */
2952 #if defined (__stub_strftime) || defined (__stub___strftime)
2953 choke me
2954 #else
2955 strftime();
2956 #endif
2957
2958 ; return 0; }
2959 EOF
2960 if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2961   rm -rf conftest*
2962   eval "ac_cv_func_strftime=yes"
2963 else
2964   echo "configure: failed program was:" >&5
2965   cat conftest.$ac_ext >&5
2966   rm -rf conftest*
2967   eval "ac_cv_func_strftime=no"
2968 fi
2969 rm -f conftest*
2970 fi
2971
2972 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
2973   echo "$ac_t""yes" 1>&6
2974   cat >> confdefs.h <<\EOF
2975 #define HAVE_STRFTIME 1
2976 EOF
2977
2978 else
2979   echo "$ac_t""no" 1>&6
2980 # strftime is in -lintl on SCO UNIX.
2981 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
2982 echo "configure:2983: checking for strftime in -lintl" >&5
2983 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
2984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   ac_save_LIBS="$LIBS"
2988 LIBS="-lintl  $LIBS"
2989 cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992 /* Override any gcc2 internal prototype to avoid an error.  */
2993 /* We use char because int might match the return type of a gcc2
2994     builtin and then its argument prototype would still apply.  */
2995 char strftime();
2996
2997 int main() {
2998 strftime()
2999 ; return 0; }
3000 EOF
3001 if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3002   rm -rf conftest*
3003   eval "ac_cv_lib_$ac_lib_var=yes"
3004 else
3005   echo "configure: failed program was:" >&5
3006   cat conftest.$ac_ext >&5
3007   rm -rf conftest*
3008   eval "ac_cv_lib_$ac_lib_var=no"
3009 fi
3010 rm -f conftest*
3011 LIBS="$ac_save_LIBS"
3012
3013 fi
3014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3015   echo "$ac_t""yes" 1>&6
3016   cat >> confdefs.h <<\EOF
3017 #define HAVE_STRFTIME 1
3018 EOF
3019
3020 LIBS="-lintl $LIBS"
3021 else
3022   echo "$ac_t""no" 1>&6
3023 fi
3024
3025 fi
3026
3027 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3028 echo "configure:3029: checking for vprintf" >&5
3029 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   cat > conftest.$ac_ext <<EOF
3033 #line 3034 "configure"
3034 #include "confdefs.h"
3035 /* System header to define __stub macros and hopefully few prototypes,
3036     which can conflict with char vprintf(); below.  */
3037 #include <assert.h>
3038 /* Override any gcc2 internal prototype to avoid an error.  */
3039 /* We use char because int might match the return type of a gcc2
3040     builtin and then its argument prototype would still apply.  */
3041 char vprintf();
3042
3043 int main() {
3044
3045 /* The GNU C library defines this for functions which it implements
3046     to always fail with ENOSYS.  Some functions are actually named
3047     something starting with __ and the normal name is an alias.  */
3048 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3049 choke me
3050 #else
3051 vprintf();
3052 #endif
3053
3054 ; return 0; }
3055 EOF
3056 if { (eval echo configure:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3057   rm -rf conftest*
3058   eval "ac_cv_func_vprintf=yes"
3059 else
3060   echo "configure: failed program was:" >&5
3061   cat conftest.$ac_ext >&5
3062   rm -rf conftest*
3063   eval "ac_cv_func_vprintf=no"
3064 fi
3065 rm -f conftest*
3066 fi
3067
3068 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3069   echo "$ac_t""yes" 1>&6
3070   cat >> confdefs.h <<\EOF
3071 #define HAVE_VPRINTF 1
3072 EOF
3073
3074 else
3075   echo "$ac_t""no" 1>&6
3076 fi
3077
3078 if test "$ac_cv_func_vprintf" != yes; then
3079 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3080 echo "configure:3081: checking for _doprnt" >&5
3081 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087 /* System header to define __stub macros and hopefully few prototypes,
3088     which can conflict with char _doprnt(); below.  */
3089 #include <assert.h>
3090 /* Override any gcc2 internal prototype to avoid an error.  */
3091 /* We use char because int might match the return type of a gcc2
3092     builtin and then its argument prototype would still apply.  */
3093 char _doprnt();
3094
3095 int main() {
3096
3097 /* The GNU C library defines this for functions which it implements
3098     to always fail with ENOSYS.  Some functions are actually named
3099     something starting with __ and the normal name is an alias.  */
3100 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3101 choke me
3102 #else
3103 _doprnt();
3104 #endif
3105
3106 ; return 0; }
3107 EOF
3108 if { (eval echo configure:3109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3109   rm -rf conftest*
3110   eval "ac_cv_func__doprnt=yes"
3111 else
3112   echo "configure: failed program was:" >&5
3113   cat conftest.$ac_ext >&5
3114   rm -rf conftest*
3115   eval "ac_cv_func__doprnt=no"
3116 fi
3117 rm -f conftest*
3118 fi
3119
3120 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3121   echo "$ac_t""yes" 1>&6
3122   cat >> confdefs.h <<\EOF
3123 #define HAVE_DOPRNT 1
3124 EOF
3125
3126 else
3127   echo "$ac_t""no" 1>&6
3128 fi
3129
3130 fi
3131
3132 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
3133 echo "configure:3134: checking for wait3 that fills in rusage" >&5
3134 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
3135   echo $ac_n "(cached) $ac_c" 1>&6
3136 else
3137   if test "$cross_compiling" = yes; then
3138   ac_cv_func_wait3_rusage=no
3139 else
3140   cat > conftest.$ac_ext <<EOF
3141 #line 3142 "configure"
3142 #include "confdefs.h"
3143 #include <sys/types.h>
3144 #include <sys/time.h>
3145 #include <sys/resource.h>
3146 #include <stdio.h>
3147 /* HP-UX has wait3 but does not fill in rusage at all.  */
3148 main() {
3149   struct rusage r;
3150   int i;
3151   /* Use a field that we can force nonzero --
3152      voluntary context switches.
3153      For systems like NeXT and OSF/1 that don't set it,
3154      also use the system CPU time.  And page faults (I/O) for Linux.  */
3155   r.ru_nvcsw = 0;
3156   r.ru_stime.tv_sec = 0;
3157   r.ru_stime.tv_usec = 0;
3158   r.ru_majflt = r.ru_minflt = 0;
3159   switch (fork()) {
3160   case 0: /* Child.  */
3161     sleep(1); /* Give up the CPU.  */
3162     _exit(0);
3163   case -1: _exit(0); /* What can we do?  */
3164   default: /* Parent.  */
3165     wait3(&i, 0, &r);
3166     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
3167     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
3168          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
3169   }
3170 }
3171 EOF
3172 if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3173 then
3174   ac_cv_func_wait3_rusage=yes
3175 else
3176   echo "configure: failed program was:" >&5
3177   cat conftest.$ac_ext >&5
3178   rm -fr conftest*
3179   ac_cv_func_wait3_rusage=no
3180 fi
3181 rm -fr conftest*
3182 fi
3183
3184 fi
3185
3186 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
3187 if test $ac_cv_func_wait3_rusage = yes; then
3188   cat >> confdefs.h <<\EOF
3189 #define HAVE_WAIT3 1
3190 EOF
3191
3192 fi
3193
3194
3195 for ac_func in \
3196         gethostname             \
3197         gettimeofday    \
3198         mktime                  \
3199         select                  \
3200         socket                  \
3201         strdup                  \
3202         strerror                \
3203         strstr                  \
3204         strrchr                 \
3205         strtod                  \
3206         strtol                  \
3207         strtoul                 \
3208         memcpy                  \
3209
3210 do
3211 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3212 echo "configure:3213: checking for $ac_func" >&5
3213 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3214   echo $ac_n "(cached) $ac_c" 1>&6
3215 else
3216   cat > conftest.$ac_ext <<EOF
3217 #line 3218 "configure"
3218 #include "confdefs.h"
3219 /* System header to define __stub macros and hopefully few prototypes,
3220     which can conflict with char $ac_func(); below.  */
3221 #include <assert.h>
3222 /* Override any gcc2 internal prototype to avoid an error.  */
3223 /* We use char because int might match the return type of a gcc2
3224     builtin and then its argument prototype would still apply.  */
3225 char $ac_func();
3226
3227 int main() {
3228
3229 /* The GNU C library defines this for functions which it implements
3230     to always fail with ENOSYS.  Some functions are actually named
3231     something starting with __ and the normal name is an alias.  */
3232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3233 choke me
3234 #else
3235 $ac_func();
3236 #endif
3237
3238 ; return 0; }
3239 EOF
3240 if { (eval echo configure:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3241   rm -rf conftest*
3242   eval "ac_cv_func_$ac_func=yes"
3243 else
3244   echo "configure: failed program was:" >&5
3245   cat conftest.$ac_ext >&5
3246   rm -rf conftest*
3247   eval "ac_cv_func_$ac_func=no"
3248 fi
3249 rm -f conftest*
3250 fi
3251
3252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3253   echo "$ac_t""yes" 1>&6
3254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3255   cat >> confdefs.h <<EOF
3256 #define $ac_tr_func 1
3257 EOF
3258  
3259 else
3260   echo "$ac_t""no" 1>&6
3261 fi
3262 done
3263
3264
3265 for ac_func in strdup
3266 do
3267 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3268 echo "configure:3269: checking for $ac_func" >&5
3269 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3270   echo $ac_n "(cached) $ac_c" 1>&6
3271 else
3272   cat > conftest.$ac_ext <<EOF
3273 #line 3274 "configure"
3274 #include "confdefs.h"
3275 /* System header to define __stub macros and hopefully few prototypes,
3276     which can conflict with char $ac_func(); below.  */
3277 #include <assert.h>
3278 /* Override any gcc2 internal prototype to avoid an error.  */
3279 /* We use char because int might match the return type of a gcc2
3280     builtin and then its argument prototype would still apply.  */
3281 char $ac_func();
3282
3283 int main() {
3284
3285 /* The GNU C library defines this for functions which it implements
3286     to always fail with ENOSYS.  Some functions are actually named
3287     something starting with __ and the normal name is an alias.  */
3288 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3289 choke me
3290 #else
3291 $ac_func();
3292 #endif
3293
3294 ; return 0; }
3295 EOF
3296 if { (eval echo configure:3297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3297   rm -rf conftest*
3298   eval "ac_cv_func_$ac_func=yes"
3299 else
3300   echo "configure: failed program was:" >&5
3301   cat conftest.$ac_ext >&5
3302   rm -rf conftest*
3303   eval "ac_cv_func_$ac_func=no"
3304 fi
3305 rm -f conftest*
3306 fi
3307
3308 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3309   echo "$ac_t""yes" 1>&6
3310     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3311   cat >> confdefs.h <<EOF
3312 #define $ac_tr_func 1
3313 EOF
3314  
3315 else
3316   echo "$ac_t""no" 1>&6
3317 LIBOBJS="$LIBOBJS ${ac_func}.o"
3318 fi
3319 done
3320
3321
3322
3323 # Check Configuration
3324
3325 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
3326 echo "configure:3327: checking declaration of sys_errlist" >&5
3327 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then
3328   echo $ac_n "(cached) $ac_c" 1>&6
3329 else
3330   
3331         cat > conftest.$ac_ext <<EOF
3332 #line 3333 "configure"
3333 #include "confdefs.h"
3334
3335 #include <stdio.h>
3336 #include <sys/types.h>
3337 #include <errno.h> 
3338 int main() {
3339 char *c = (char *) *sys_errlist
3340 ; return 0; }
3341 EOF
3342 if { (eval echo configure:3343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3343   rm -rf conftest*
3344   cf_cv_dcl_sys_errlist=yes
3345 else
3346   echo "configure: failed program was:" >&5
3347   cat conftest.$ac_ext >&5
3348   rm -rf conftest*
3349   cf_cv_dcl_sys_errlist=no
3350 fi
3351 rm -f conftest*
3352 fi
3353
3354 echo "$ac_t""$cf_cv_dcl_sys_errlist" 1>&6
3355
3356 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
3357 if test $cf_cv_dcl_sys_errlist = no ; then
3358         cat >> confdefs.h <<\EOF
3359 #define DECL_SYS_ERRLIST 1
3360 EOF
3361
3362         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
3363 echo "configure:3364: checking existence of sys_errlist" >&5
3364         if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then
3365   echo $ac_n "(cached) $ac_c" 1>&6
3366 else
3367   
3368                 cat > conftest.$ac_ext <<EOF
3369 #line 3370 "configure"
3370 #include "confdefs.h"
3371 #include <errno.h>
3372 int main() {
3373 char *c = (char *) *sys_errlist
3374 ; return 0; }
3375 EOF
3376 if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3377   rm -rf conftest*
3378   cf_cv_have_sys_errlist=yes
3379 else
3380   echo "configure: failed program was:" >&5
3381   cat conftest.$ac_ext >&5
3382   rm -rf conftest*
3383   cf_cv_have_sys_errlist=no
3384 fi
3385 rm -f conftest*
3386 fi
3387
3388         echo "$ac_t""$cf_cv_have_sys_errlist" 1>&6
3389 fi
3390
3391
3392
3393
3394
3395   
3396   
3397   
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417 trap '' 1 2 15
3418 cat > confcache <<\EOF
3419 # This file is a shell script that caches the results of configure
3420 # tests run on this system so they can be shared between configure
3421 # scripts and configure runs.  It is not useful on other systems.
3422 # If it contains results you don't want to keep, you may remove or edit it.
3423 #
3424 # By default, configure uses ./config.cache as the cache file,
3425 # creating it if it does not exist already.  You can give configure
3426 # the --cache-file=FILE option to use a different cache file; that is
3427 # what configure does when it calls configure scripts in
3428 # subdirectories, so they share the cache.
3429 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3430 # config.status only pays attention to the cache file if you give it the
3431 # --recheck option to rerun configure.
3432 #
3433 EOF
3434 # The following way of writing the cache mishandles newlines in values,
3435 # but we know of no workaround that is simple, portable, and efficient.
3436 # So, don't put newlines in cache variables' values.
3437 # Ultrix sh set writes to stderr and can't be redirected directly,
3438 # and sets the high bit in the cache file unless we assign to the vars.
3439 (set) 2>&1 |
3440   case `(ac_space=' '; set) 2>&1` in
3441   *ac_space=\ *)
3442     # `set' does not quote correctly, so add quotes (double-quote substitution
3443     # turns \\\\ into \\, and sed turns \\ into \).
3444     sed -n \
3445       -e "s/'/'\\\\''/g" \
3446       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3447     ;;
3448   *)
3449     # `set' quotes correctly as required by POSIX, so do not add quotes.
3450     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3451     ;;
3452   esac >> confcache
3453 if cmp -s $cache_file confcache; then
3454   :
3455 else
3456   if test -w $cache_file; then
3457     echo "updating cache $cache_file"
3458     cat confcache > $cache_file
3459   else
3460     echo "not updating unwritable cache $cache_file"
3461   fi
3462 fi
3463 rm -f confcache
3464
3465 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3466
3467 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3468 # Let make expand exec_prefix.
3469 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3470
3471 # Any assignment to VPATH causes Sun make to only execute
3472 # the first set of double-colon rules, so remove it if not needed.
3473 # If there is a colon in the path, we need to keep it.
3474 if test "x$srcdir" = x.; then
3475   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3476 fi
3477
3478 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3479
3480 DEFS=-DHAVE_CONFIG_H
3481
3482 # Without the "./", some shells look in PATH for config.status.
3483 : ${CONFIG_STATUS=./config.status}
3484
3485 echo creating $CONFIG_STATUS
3486 rm -f $CONFIG_STATUS
3487 cat > $CONFIG_STATUS <<EOF
3488 #! /bin/sh
3489 # Generated automatically by configure.
3490 # Run this file to recreate the current configuration.
3491 # This directory was configured as follows,
3492 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3493 #
3494 # $0 $ac_configure_args
3495 #
3496 # Compiler output produced by configure, useful for debugging
3497 # configure, is in ./config.log if it exists.
3498
3499 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3500 for ac_option
3501 do
3502   case "\$ac_option" in
3503   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3504     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3505     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3506   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3507     echo "$CONFIG_STATUS generated by autoconf version 2.12"
3508     exit 0 ;;
3509   -help | --help | --hel | --he | --h)
3510     echo "\$ac_cs_usage"; exit 0 ;;
3511   *) echo "\$ac_cs_usage"; exit 1 ;;
3512   esac
3513 done
3514
3515 ac_given_srcdir=$srcdir
3516 ac_given_INSTALL="$INSTALL"
3517
3518 trap 'rm -fr `echo "\
3519 Makefile:build/top.mk:Makefile.in:build/dir.mk \
3520 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
3521 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
3522 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
3523 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
3524 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
3525 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
3526 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
3527 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
3528 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
3529 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
3530 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
3531 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
3532 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
3533 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
3534 include/Makefile:build/top.mk:include/Makefile.in \
3535 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
3536 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
3537 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
3538 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
3539 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
3540 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
3541 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
3542 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
3543 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
3544 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
3545 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
3546 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
3547 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
3548 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
3549 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
3550 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
3551 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
3552 tests/Makefile:build/top.mk:tests/Makefile.in \
3553  include/portable.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3554 EOF
3555 cat >> $CONFIG_STATUS <<EOF
3556
3557 # Protect against being on the right side of a sed subst in config.status.
3558 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3559  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3560 $ac_vpsub
3561 $extrasub
3562 s%@CFLAGS@%$CFLAGS%g
3563 s%@CPPFLAGS@%$CPPFLAGS%g
3564 s%@CXXFLAGS@%$CXXFLAGS%g
3565 s%@DEFS@%$DEFS%g
3566 s%@LDFLAGS@%$LDFLAGS%g
3567 s%@LIBS@%$LIBS%g
3568 s%@exec_prefix@%$exec_prefix%g
3569 s%@prefix@%$prefix%g
3570 s%@program_transform_name@%$program_transform_name%g
3571 s%@bindir@%$bindir%g
3572 s%@sbindir@%$sbindir%g
3573 s%@libexecdir@%$libexecdir%g
3574 s%@datadir@%$datadir%g
3575 s%@sysconfdir@%$sysconfdir%g
3576 s%@sharedstatedir@%$sharedstatedir%g
3577 s%@localstatedir@%$localstatedir%g
3578 s%@libdir@%$libdir%g
3579 s%@includedir@%$includedir%g
3580 s%@oldincludedir@%$oldincludedir%g
3581 s%@infodir@%$infodir%g
3582 s%@mandir@%$mandir%g
3583 s%@CC@%$CC%g
3584 s%@CPP@%$CPP%g
3585 s%@LN_S@%$LN_S%g
3586 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3587 s%@INSTALL_DATA@%$INSTALL_DATA%g
3588 s%@RANLIB@%$RANLIB%g
3589 s%@SET_MAKE@%$SET_MAKE%g
3590 s%@SENDMAIL@%$SENDMAIL%g
3591 s%@EDITOR@%$EDITOR%g
3592 s%@FINGER@%$FINGER%g
3593 s%@LIBTERMCAP@%$LIBTERMCAP%g
3594 s%@LIBOBJS@%$LIBOBJS%g
3595 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
3596 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
3597 s%@SLAPD_LDBM@%$SLAPD_LDBM%g
3598 s%@SLAPD_PASSWD@%$SLAPD_PASSWD%g
3599 s%@SLAPD_SHELL@%$SLAPD_SHELL%g
3600 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
3601 s%@LDAP_DEFS@%$LDAP_DEFS%g
3602 s%@LDAP_LIBS@%$LDAP_LIBS%g
3603 s%@LDAPD_DEFS@%$LDAPD_DEFS%g
3604 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
3605 s%@SLAPD_DEFS@%$SLAPD_DEFS%g
3606 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
3607 s%@SLURPD_DEFS@%$SLURPD_DEFS%g
3608 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
3609 s%@LDBM_DEFS@%$LDBM_DEFS%g
3610 s%@LDBM_LIBS@%$LDBM_LIBS%g
3611 s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g
3612 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
3613 s%@LUTIL_DEFS@%$LUTIL_DEFS%g
3614 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
3615
3616 CEOF
3617 EOF
3618
3619 cat >> $CONFIG_STATUS <<\EOF
3620
3621 # Split the substitutions into bite-sized pieces for seds with
3622 # small command number limits, like on Digital OSF/1 and HP-UX.
3623 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3624 ac_file=1 # Number of current file.
3625 ac_beg=1 # First line for current file.
3626 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3627 ac_more_lines=:
3628 ac_sed_cmds=""
3629 while $ac_more_lines; do
3630   if test $ac_beg -gt 1; then
3631     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3632   else
3633     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3634   fi
3635   if test ! -s conftest.s$ac_file; then
3636     ac_more_lines=false
3637     rm -f conftest.s$ac_file
3638   else
3639     if test -z "$ac_sed_cmds"; then
3640       ac_sed_cmds="sed -f conftest.s$ac_file"
3641     else
3642       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3643     fi
3644     ac_file=`expr $ac_file + 1`
3645     ac_beg=$ac_end
3646     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3647   fi
3648 done
3649 if test -z "$ac_sed_cmds"; then
3650   ac_sed_cmds=cat
3651 fi
3652 EOF
3653
3654 cat >> $CONFIG_STATUS <<EOF
3655
3656 CONFIG_FILES=\${CONFIG_FILES-"\
3657 Makefile:build/top.mk:Makefile.in:build/dir.mk \
3658 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
3659 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
3660 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
3661 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
3662 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
3663 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
3664 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
3665 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
3666 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
3667 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
3668 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
3669 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
3670 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
3671 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
3672 include/Makefile:build/top.mk:include/Makefile.in \
3673 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
3674 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk \
3675 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk \
3676 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk \
3677 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk \
3678 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk \
3679 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \
3680 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
3681 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
3682 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
3683 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
3684 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
3685 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
3686 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
3687 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
3688 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
3689 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
3690 tests/Makefile:build/top.mk:tests/Makefile.in \
3691 "}
3692 EOF
3693 cat >> $CONFIG_STATUS <<\EOF
3694 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3695   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3696   case "$ac_file" in
3697   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3698        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3699   *) ac_file_in="${ac_file}.in" ;;
3700   esac
3701
3702   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3703
3704   # Remove last slash and all that follows it.  Not all systems have dirname.
3705   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3706   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3707     # The file is in a subdirectory.
3708     test ! -d "$ac_dir" && mkdir "$ac_dir"
3709     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3710     # A "../" for each directory in $ac_dir_suffix.
3711     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3712   else
3713     ac_dir_suffix= ac_dots=
3714   fi
3715
3716   case "$ac_given_srcdir" in
3717   .)  srcdir=.
3718       if test -z "$ac_dots"; then top_srcdir=.
3719       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3720   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3721   *) # Relative path.
3722     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3723     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3724   esac
3725
3726   case "$ac_given_INSTALL" in
3727   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3728   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3729   esac
3730
3731   echo creating "$ac_file"
3732   rm -f "$ac_file"
3733   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3734   case "$ac_file" in
3735   *Makefile*) ac_comsub="1i\\
3736 # $configure_input" ;;
3737   *) ac_comsub= ;;
3738   esac
3739
3740   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3741   sed -e "$ac_comsub
3742 s%@configure_input@%$configure_input%g
3743 s%@srcdir@%$srcdir%g
3744 s%@top_srcdir@%$top_srcdir%g
3745 s%@INSTALL@%$INSTALL%g
3746 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3747 fi; done
3748 rm -f conftest.s*
3749
3750 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3751 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3752 #
3753 # ac_d sets the value in "#define NAME VALUE" lines.
3754 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3755 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3756 ac_dC='\3'
3757 ac_dD='%g'
3758 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3759 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3760 ac_uB='\([      ]\)%\1#\2define\3'
3761 ac_uC=' '
3762 ac_uD='\4%g'
3763 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3764 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3765 ac_eB='$%\1#\2define\3'
3766 ac_eC=' '
3767 ac_eD='%g'
3768
3769 if test "${CONFIG_HEADERS+set}" != set; then
3770 EOF
3771 cat >> $CONFIG_STATUS <<EOF
3772   CONFIG_HEADERS="include/portable.h"
3773 EOF
3774 cat >> $CONFIG_STATUS <<\EOF
3775 fi
3776 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3777   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3778   case "$ac_file" in
3779   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3780        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3781   *) ac_file_in="${ac_file}.in" ;;
3782   esac
3783
3784   echo creating $ac_file
3785
3786   rm -f conftest.frag conftest.in conftest.out
3787   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3788   cat $ac_file_inputs > conftest.in
3789
3790 EOF
3791
3792 # Transform confdefs.h into a sed script conftest.vals that substitutes
3793 # the proper values into config.h.in to produce config.h.  And first:
3794 # Protect against being on the right side of a sed subst in config.status.
3795 # Protect against being in an unquoted here document in config.status.
3796 rm -f conftest.vals
3797 cat > conftest.hdr <<\EOF
3798 s/[\\&%]/\\&/g
3799 s%[\\$`]%\\&%g
3800 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3801 s%ac_d%ac_u%gp
3802 s%ac_u%ac_e%gp
3803 EOF
3804 sed -n -f conftest.hdr confdefs.h > conftest.vals
3805 rm -f conftest.hdr
3806
3807 # This sed command replaces #undef with comments.  This is necessary, for
3808 # example, in the case of _POSIX_SOURCE, which is predefined and required
3809 # on some systems where configure will not decide to define it.
3810 cat >> conftest.vals <<\EOF
3811 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3812 EOF
3813
3814 # Break up conftest.vals because some shells have a limit on
3815 # the size of here documents, and old seds have small limits too.
3816
3817 rm -f conftest.tail
3818 while :
3819 do
3820   ac_lines=`grep -c . conftest.vals`
3821   # grep -c gives empty output for an empty file on some AIX systems.
3822   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3823   # Write a limited-size here document to conftest.frag.
3824   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3825   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3826   echo 'CEOF
3827   sed -f conftest.frag conftest.in > conftest.out
3828   rm -f conftest.in
3829   mv conftest.out conftest.in
3830 ' >> $CONFIG_STATUS
3831   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3832   rm -f conftest.vals
3833   mv conftest.tail conftest.vals
3834 done
3835 rm -f conftest.vals
3836
3837 cat >> $CONFIG_STATUS <<\EOF
3838   rm -f conftest.frag conftest.h
3839   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3840   cat conftest.in >> conftest.h
3841   rm -f conftest.in
3842   if cmp -s $ac_file conftest.h 2>/dev/null; then
3843     echo "$ac_file is unchanged"
3844     rm -f conftest.h
3845   else
3846     # Remove last slash and all that follows it.  Not all systems have dirname.
3847       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3848       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3849       # The file is in a subdirectory.
3850       test ! -d "$ac_dir" && mkdir "$ac_dir"
3851     fi
3852     rm -f $ac_file
3853     mv conftest.h $ac_file
3854   fi
3855 fi; done
3856
3857 EOF
3858 cat >> $CONFIG_STATUS <<EOF
3859
3860 EOF
3861 cat >> $CONFIG_STATUS <<\EOF
3862 date > stamp-h
3863 exit 0
3864 EOF
3865 chmod +x $CONFIG_STATUS
3866 rm -fr confdefs* $ac_clean_files
3867 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3868